DPGEN_NOR4(3)

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

πŸ’– DPGEN_NOR4 β€” the NOR4 Macro-Generator, bestie edition πŸ’–

okay so this is a page from the Alliance - genlib User's Manual, and it's all about one very specific little guy: DPGEN_NOR4. it lives in section 3 of the manual (that's the library-functions section, iykyk). buckle up πŸŽ€


✨ NAME ✨

DPGEN_NOR4 β€” the NOR4 Macro-Generator. that's it, that's the name, she's a macro generator and she does NOR4 πŸ’…


🌸 SYNOPSIS 🌸

#include  <genlib.h>

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

yes bestie you gotta #include <genlib.h> first, and then you call GENLIB_MACRO with the macro DPGEN_NOR4 β€” that's the whole vibe. the rest of the args we'll get to πŸ¦‹


πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do? she generates a N bits four inputs NOR with an output power of drive, and she names it modelname. that's the whole job, no cap. ✨

the valid values for drive are: 1 or 4. that's it. those are the only two. don't get creative πŸ’€

πŸ”Œ TERMINAL NAMES πŸ”Œ

here's the full cast of characters, in order:

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

four inputs, one output, power, ground. the whole friend group 🫢

🧠 BEHAVIOR 🧠

the logic, spelled out, fr fr:

nq <= not(i0 or i1 or i2 or i3)

that's giving "NOR gate but with four of them". iconic. 🌈


πŸŽ€ EXAMPLE πŸŽ€

here's what it looks like in the wild, copy this energy:

GENLIB_MACRO(DPGEN_NOR4, "model_nor4_32"
                        , F_BEHAV|F_PLACE
                        , 32
                        , 1
                        );

GENLIB_LOINS( "model_nor4_32"
            , "instance1_nor4_32"
            , "i3[31:0]"
            , "i2[31:0]"
            , "i1[31:0]"
            , "i0[31:0]"
            , "nq[31:0]"
            , "vdd", "vss", NULL
            );

so she makes model_nor4_32 with N = 32, drive = 1, flags F_BEHAV|F_PLACE, and then GENLIB_LOINS wires her up with all the [31:0] buses and the vdd/vss and a NULL at the end to close it out. chef's kiss πŸ˜­πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie, they're the lore:


sign-off time πŸ’œ this lil masterpiece came out of ASIM/LIP6, dated 30 July 2004 β€” yeah she's vintage but she still slays. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from