DPGEN_INV(3)

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

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

  1. i0 : the input. she receives. πŸ’…
  2. nq : the output. she serves (inverted, naturally).
  3. vdd : power. the life source, the main character energy ⚑
  4. 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