DPGEN_NAND3(3)

πŸ“¦ version 5.1.1-unstable-2025-02, in nixos 26.05, nixpkgs unstable

πŸ’– DPGEN_NAND3 β€” NAND3 Macro-Generator πŸ’–

okay bestie, welcome to the DPGEN_NAND3 page from the Alliance - genlib User's Manual πŸŽ€ this is the third section of the manual, iykyk, and she's a macro-generator, which is literally so iconic of her.


✨ NAME ✨

DPGEN_NAND3 β€” NAND3 Macro-Generator πŸ¦‹


✨ SYNOPSIS ✨

#include  <genlib.h>

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

no cap, that's the whole vibe up there ⭐


✨ DESCRIPTION ✨

She generates a N bits three inputs NAND with an output power of drive named modelname. periodt πŸ’…

Valid drive are : 1 or 4. that's it. those are the only two. don't try anything else, she will not be serving it πŸ™ˆ

🌸 TERMINAL NAMES 🌸

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

six terminals, all of them main characters, all of them doing their little job 🫢

🌈 BEHAVIOR 🌈

nq <= not(i0 and i1 and i2)

so nq is literally the negation of all three inputs ANDed together. the way that's just a NAND3. obsessed. πŸ’œ


✨ EXAMPLE ✨

here's how you actually use her, bestie πŸ‘‘

GENLIB_MACRO(DPGEN_NAND3, "model_nand3_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       , 1
                       );

GENLIB_LOINS( "model_nand3_32"
            , "instance1_nand3_32"
            , "i2[31:0]"
            , "i1[31:0]"
            , "i0[31:0]"
            , "nq[31:0]"
            , "vdd", "vss", NULL
            );

look at her go 😭 32 bits, drive of 1, F_BEHAV|F_PLACE flags, and a clean little instantiation right after. chef's kiss, fr fr ✨


✨ SEE ALSO ✨


πŸŽ€ friendly reminder bestie: keep every flag, every terminal, every number exactly as written. the vibe is flexible, the facts are not πŸ’…

and that's the whole page, babe πŸ¦‹ this one came from ASIM/LIP6, dated 30 July 2004 β€” yeah she's vintage, and she still ate πŸ’– slay, bye bestie πŸ‘‘

πŸ“¦ where this page comes from