DPGEN_NBUSE(3)
π DPGEN_NBUSE β Tristate Macro-Generator π
okay bestie, welcome to the genlib manual page for DPGEN_NBUSE, from the Alliance crew's genlib User's Manual. sit down, grab a boba, we're building macros π§β¨
β¨ SYNOPSIS β¨
#include <genlib.h>
void GENLIB_MACRO (DPGEN_NBUSE, char *modelname, long flags, long N);
that's it, that's the whole vibe. one function call and you're iconic π«Ά
πΈ DESCRIPTION πΈ
so like, this macro-generator literally makes you a N bits two inputs tristate with a complemented output and names it modelname. the way it just... generates a whole tristate for you? main character energy fr fr π
π TERMINAL NAMES π
here's the lineup, the whole squad, no gatekeeping:
cmd: select (1 bit). the lil decision maker πi0: input (N bits). the input, she's broad πnq: output (N bits). and yes bestie, it's complemented β¨vdd: power. give her energy β‘vss: ground. keep it grounded, queen π±
π₯ BEHAVIOR π₯
lowkey the actual behavior is giving this:
nts:BLOCK(cmd = '1') BEGIN
nq <= GUARDED not(i0);
END
so when cmd is '1', the output goes and does a GUARDED not(i0). periodt. no cap. π¦
π EXAMPLE π
here's a whole example, study it bestie, it's giving tutorial:
GENLIB_MACRO(DPGEN_NBUSE, "model_nbuse_32"
, F_BEHAV|F_PLACE
, 32
);
GENLIB_LOINS( "model_nbuse_32"
, "instance1_nbuse_32"
, "cmd"
, "i0[31:0]"
, "nq[31:0]"
, "vdd", "vss", NULL
);
32 bits?? we love a generous queen π and look at F_BEHAV|F_PLACE doing her lil duet β¨
π SEE ALSO π
go read those too, iykyk π
reminder bestie: this page lives in the Alliance - genlib User's Manual, and it was written by ASIM/LIP6 on 30 July 2004. so old, so vintage, so iconic π shoutout to the OGs fr fr πβ¨π¦
π¦ 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