DPGEN_NOR4(3)
π 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:
i3: input.i2: input.i1: input.i0: input.nq: output.vdd: power.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
- nixos 26.05: alliance 5.1.1-unstable-2025-02-24
- nixpkgs unstable: alliance 5.1.1-unstable-2025-02-24
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms