DPGEN_AND3(3)
π DPGEN_AND3(3) β the AND3 macro-generator, bestie edition π
okay so real quick: this page lives in the Alliance - genlib User's Manual and it's literally the glow-up guide for DPGEN_AND3. let's get into it π«Ά
β¨ NAME β¨
DPGEN_AND3 β the AND3 Macro-Generator. yes bestie, she generates macros. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <genlib.h>
void GENLIB_MACRO (DPGEN_AND3, char *modelname, long flags, long N, long
drive);
π DESCRIPTION π
okay so what she does is: she generates an N bits three inputs AND with an output power of drive, and you name the whole thing modelname. that's it, that's the job, and she ate. π
Valid drive are : 2 or 4. like, those are the only two options, no cap. don't try to be creative here.
π TERMINAL NAMES π
here's the roster of terminals, in order, main character lineup fr fr:
i2: input.i1: input.i0: input.q: output.vdd: power.vss: ground.
three inputs, one output, power, ground. iconic little squad. π¦
π§ BEHAVIOR π§
the whole personality, in one line:
q <= not(i0 and i1 and i2)
so yeah, she's an AND of i0, i1 and i2 β and then she flips it. NAND energy honestly. not me exposing the logic like this π
π₯ EXAMPLE π₯
here's how you actually call her, copy-paste blessed:
GENLIB_MACRO(DPGEN_AND3, "model_and3_32"
, F_BEHAV|F_PLACE
, 32
, 2
);
GENLIB_LOINS( "model_and3_32"
, "instance1_and3_32"
, "i2[31:0]"
, "i1[31:0]"
, "i0[31:0]"
, "q[31:0]"
, "vdd", "vss", NULL
);
32 bits, drive of 2, flags F_BEHAV|F_PLACE, and then the GENLIB_LOINS call wires up the instance with all those 32-bit buses. periodt. π
π SEE ALSO π
go read these next, iykyk:
and that's the page, bestie. this was brought to you by ASIM/LIP6, dated 30 July 2004 β yeah she's an elder but she still slays. mwah πβ¨
π¦ 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