DPGEN_NBUSE(3)

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

πŸ’… 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:

  1. cmd : select (1 bit). the lil decision maker πŸ’…
  2. i0 : input (N bits). the input, she's broad πŸ’–
  3. nq : output (N bits). and yes bestie, it's complemented ✨
  4. vdd : power. give her energy ⚑
  5. 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