DPGEN_AND3(3)

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

πŸ’– DPGEN_AND3(3) β€” the AND3 macro-generator, bestie edition πŸ’–

okay so real quick: this page lives in the Alliance - genlib User's Manual and it's literally the glow-up guide for DPGEN_AND3. let's get into it 🫢


✨ NAME ✨

DPGEN_AND3 β€” the AND3 Macro-Generator. yes bestie, she generates macros. that's the whole vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

#include  <genlib.h>

void GENLIB_MACRO (DPGEN_AND3, char *modelname, long flags, long N, long
drive);

πŸŽ€ DESCRIPTION πŸŽ€

okay so what she does is: she generates an N bits three inputs AND with an output power of drive, and you name the whole thing modelname. that's it, that's the job, and she ate. πŸ’…

Valid drive are : 2 or 4. like, those are the only two options, no cap. don't try to be creative here.

πŸ”Œ TERMINAL NAMES πŸ”Œ

here's the roster of terminals, in order, main character lineup fr fr:

  1. i2 : input.
  2. i1 : input.
  3. i0 : input.
  4. q : output.
  5. vdd : power.
  6. vss : ground.

three inputs, one output, power, ground. iconic little squad. πŸ¦‹

🧠 BEHAVIOR 🧠

the whole personality, in one line:

q <= not(i0 and i1 and i2)

so yeah, she's an AND of i0, i1 and i2 β€” and then she flips it. NAND energy honestly. not me exposing the logic like this 😭


πŸ”₯ EXAMPLE πŸ”₯

here's how you actually call her, copy-paste blessed:

GENLIB_MACRO(DPGEN_AND3, "model_and3_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       , 2
                       );

GENLIB_LOINS( "model_and3_32"
            , "instance1_and3_32"
            , "i2[31:0]"
            , "i1[31:0]"
            , "i0[31:0]"
            ,  "q[31:0]"
            , "vdd", "vss", NULL
            );

32 bits, drive of 2, flags F_BEHAV|F_PLACE, and then the GENLIB_LOINS call wires up the instance with all those 32-bit buses. periodt. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

go read these next, iykyk:


and that's the page, bestie. this was brought to you by ASIM/LIP6, dated 30 July 2004 β€” yeah she's an elder but she still slays. mwah πŸ’‹βœ¨