DPGEN_NAND2(3)

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

πŸ’– DPGEN_NAND2(3) πŸ’–

ok so bestie, this is the DPGEN_NAND2 page from the Alliance - genlib User's Manual, and honestly? it's giving iconic macro-generator energy and you're gonna eat this up. let's go ✨


🌸 NAME 🌸

DPGEN_NAND2 β€” the NAND2 Macro-Generator πŸŽ€


✨ SYNOPSIS ✨

#include  <genlib.h>

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

like, that's the whole summoning ritual. write it exactly like that or the compiler will simply not know what you want from it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, this one makes you a N bits two inputs NAND, with an output power of drive, and you get to name it modelname. yes you get to name it. main character moment fr fr.

Valid drive values are: 1 or 4. that's it. those are the only two that are valid, don't try to be creative with it πŸ™ˆ

πŸ”₯ TERMINAL NAMES πŸ”₯

  1. i1 β€” input. yes. an input. πŸ’œ
  2. i0 β€” input. the other input. twin vibes.
  3. nq β€” output. this is where the result leaves the building ✨
  4. vdd β€” power. she's fed.
  5. vss β€” ground. she's grounded (literally).

πŸŽ€ BEHAVIOR πŸŽ€

lowkey the whole personality in one line:

nq <= not(i0 and i1)

that's it. that's the vibe check. NAND. no cap.


🌈 EXAMPLE 🌈

ok here's what it looks like when you actually use it, copy this energy:

GENLIB_MACRO(DPGEN_NAND2, "model_nand2_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       , 1
                       );

GENLIB_LOINS( "model_nand2_32"
            , "instance1_nand2_32"
            , "i1[31:0]"
            , "i0[31:0]"
            , "nq[31:0]"
            , "vdd", "vss", NULL
            );

see how it's a 32 bit nand2 and the drive is 1? obsessed. and then GENLIB_LOINS wires her up all pretty 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

iykyk, go read those too, they're part of the lore πŸ’–


and that's the page bestie!! this lil masterpiece comes to you from ASIM/LIP6, and the date on it is 30 July 2004 β€” yeah, she's vintage, she's classic, she's still slaying πŸ’…βœ¨ periodt. πŸŒΈπŸ¦‹πŸ’–

πŸ“¦ where this page comes from