DPGEN_XNOR2MASK(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

πŸ’– DPGEN_XNOR2MASK πŸ’–

okay bestie, welcome to the Alliance - genlib User's Manual corner of the internet, where today we're unlocking the Programmable Mask Macro-Generator ✨ it's giving hardware, it's giving generator, it's giving iconic πŸŽ€


✨ NAME ✨

DPGEN_XNOR2MASK β€” the Programmable Mask Macro-Generator, no cap πŸ‘‘


🌸 SYNOPSIS 🌸

#include  <genlib.h>

void GENLIB_MACRO (DPGEN_XNOR2MASK, char *modelname, long flags, long N,
char *constVal);

like, that's the whole vibe right there πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So basically it generates an N bits conditionnal XNOR mask and names it modelname. slay.

How it works, bestie, listen up :

  • if the cmd signal is set to '0', the mask is NOT applied, so the whole operator behave like an inverter. it's literally just flipping bits, periodt πŸ™ƒ
  • if the cmd signal is set to '1', the mask IS applied, and the output is the complemented result of the input value XORed with the mask (supplied by constVal). ate that πŸ’…

The constant constVal is given to the macro-generator call, therefore the value cannot be changed afterward : it's hard wired in the operator. it's committed. no takebacks, no edits, iykyk πŸ”’

⚠️ A common error is to give a real C constant for the constVal argument. Be aware that it is a character string. yes, a string, bestie, not a number. the number of people who trip on this... 😭

πŸŽ€ TERMINAL NAMES πŸŽ€

  1. cmd : mask control (1 bit). the main character of this whole operation πŸ‘‘
  2. i0 : input (N bits).
  3. q : output (N bits).
  4. vdd : power.
  5. vss : ground.

🌈 BEHAVIOR 🌈

nq <= WITH cmd SELECT not(i0)                 WHEN '0',
                      not(i0 xor X"0000FFFF") WHEN '1';

look at her. the conditional. the range. the drama ✨


πŸ“ EXAMPLE πŸ“

GENLIB_MACRO(DPGEN_XNOR2MASK, "model_xnor2mask_0000FFFF_32"
                            , F_BEHAV|F_PLACE
                            , 32
                            , "0x0000FFFF" /* A string! */
                            );

GENLIB_LOINS( "model_xnor2mask_0000FFFF_32"
            , "instance1_xnor2mask_32"
            , "cmd"
            , "i0[31:0]"
            ,  "q[31:0]"
            , "vdd", "vss", NULL
            );

see that /* A string! */ comment? yeah, that's the whole point, don't forget it πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ


and that's the tea, bestie 🫢 this lil page came to you from ASIM/LIP6, dated 30 July 2004 β€” oldie but a goodie, fr fr πŸ’–βœ¨πŸŽ€