DPGEN_INV(3)
π DPGEN_INV β the Inverter Macro-Generator, bestie edition β¨
okay so this is a page from the Alliance - genlib User's Manual (yes, that genlib, the one you already know and love) and today we're talking about DPGEN_INV, the Inverter Macro-Generator. she's small, she's powerful, she flips bits. let's get into it π¦
β¨ NAME β¨
DPGEN_INV β the Inverter Macro-Generator. that's it, that's the whole name, iconic behavior honestly π
π SYNOPSIS π
#include <genlib.h>
void GENLIB_MACRO (DPGEN_INV, char *modelname, long flags, long N, long
drive);
like yes bestie, that's the exact call, don't change a single character or the compiler will simply end you π
π DESCRIPTION π
So basically: this macro-generator makes you a N bits inverter, and the output power is drive, and the whole thing is named modelname. periodt.
The valid values for drive are literally only: 1, 2, 3 or 4. that's the whole menu, no substitutions, no "but what about 5", no. just those four. π«Ά
πΈ TERMINAL NAMES πΈ
here's who's who on this little chip, in order:
i0: the input. she receives. πnq: the output. she serves (inverted, naturally).vdd: power. the life source, the main character energy β‘vss: ground. the humble queen holding it all down.
π§ BEHAVIOR π§
the whole vibe, mathematically:
nq <= not(i0)
that's it. in goes a thing, out comes the opposite of that thing. slay. π₯
π EXAMPLE π
here's how you'd actually use her, look:
GENLIB_MACRO(DPGEN_INV, "model_inv_32"
, F_BEHAV|F_PLACE
, 32
, 1
);
GENLIB_LOINS( "model_inv_32"
, "instance1_inv_32"
, "i0[31:0]"
, "nq[31:0]"
, "vdd", "vss", NULL
);
a 32-bit inverter, drive of 1, flags F_BEHAV|F_PLACE, named model_inv_32, then instantiated as instance1_inv_32 with i0[31:0] going in and nq[31:0] coming out, powered by vdd and grounded by vss, and yes the NULL at the end is required, don't forget her π
π SEE ALSO π
go read those too, they're the supporting cast and they ate π
and that's the page fr fr π this masterpiece came to you from ASIM/LIP6, dated 30 July 2004, and it lives in the DPGEN_INV(3) section of the manual. stan an old-school macro-generator, no cap. bye bestie, go build something cute πΈπ¦β¨
π¦ 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