DPGEN_NOR2(3)

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

πŸ’– DPGEN_NOR2(3) β€” the NOR2 Macro-Generator, bestie edition πŸ’–

okay so real quick before we dive in: this page lives in the Alliance - genlib User's Manual (section 3, the library-call girlies πŸŽ€), and it's all about DPGEN_NOR2. yes that's the whole name. no notes. let's go ✨


🌸 NAME 🌸

DPGEN_NOR2 β€” the NOR2 Macro-Generator. she generates macros. that's the job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include  <genlib.h>

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

like yes she's a macro-generator, but the way you actually call her is through GENLIB_MACRO, and the first argument is literally DPGEN_NOR2 itself. iconic self-referential behaviour, honestly 🫢


✨ DESCRIPTION ✨

So what she does: she generates a N-bit wide thing made of two inputs, and it's a NOR. the output power level is drive, and the whole thing gets named modelname.

and the valid values for drive?? just 1 or 4. that's it. don't try anything cute with a 2 or a 3, bestie, she will not play πŸ’€

πŸ”Œ TERMINAL NAMES πŸ”Œ

these are the pins, in order, no cap:

  1. i1 β€” input. πŸ“₯
  2. i0 β€” input. πŸ“₯
  3. nq β€” output. πŸ“€
  4. vdd β€” power. ⚑
  5. vss β€” ground. 🌍

🧠 BEHAVIOR 🧠

the whole vibe in one line:

nq <= not(i0 or i1)

so nq is NOT of (i0 OR i1). that's the tea. β˜•


🌈 EXAMPLE 🌈

here's how a real one looks, copy-paste energy, keep it exact bestie:

GENLIB_MACRO(DPGEN_NOR2, "model_nor2_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       , 1
                       );

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

see how GENLIB_MACRO builds the model and then GENLIB_LOINS instantiates it? 32 bits, drive of 1, flags F_BEHAV|F_PLACE, and all the terminals wired up. slay. πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

if you want more of this energy:

iykyk πŸ’œ


and that's the page!! brought to you by ASIM/LIP6, dated 30 July 2004 β€” yeah she's an elder millennial but she still eats πŸ’…βœ¨

πŸ“¦ where this page comes from