DPGEN_OR2(3)

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

πŸ’– DPGEN_OR2 β€” the OR2 Macro-Generator πŸ’–

ok so bestie, you're in the DPGEN_OR2(3) page of the Alliance - genlib User's Manual and honestly? iconic. this is the macro-generator that spits out a two-input OR gate with N bits and a drive strength, and we're gonna walk through it together 🫢


✨ NAME ✨

DPGEN_OR2 β€” OR2 Macro-Generator. that's it, that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

#include  <genlib.h>

void GENLIB_MACRO (DPGEN_OR2, char *modelname, long flags, long N, long
drive);

like yes, that's the whole call. #include <genlib.h> first, obviously, then the macro. no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this thing generates an N bits two inputs OR with an output power of drive, and it's named modelname. literally what it says on the tin, periodt ✨

valid drive values are 2 or 4. that's the whole list. don't try anything else, bestie, fr fr πŸ’€

πŸ”₯ TERMINAL NAMES πŸ”₯

these are the pins, in order, and you're gonna want to remember them:

  1. i1 : input. yes it's the first input. we love a numbered-but-backwards moment πŸ™ˆ
  2. i0 : input. the second one listed. iykyk πŸ’œ
  3. q : output. she's the main character πŸ‘‘
  4. vdd : power. the juice ⚑
  5. vss : ground. the chill one 🌈

πŸ’« BEHAVIOR πŸ’«

the actual logic, in all her glory:

q <= i0 or i1

that's it. that's the whole function. q gets i0 or i1. slay πŸŽ€


🌟 EXAMPLE 🌟

here's how you'd actually use her β€” two calls, back to back, no notes:

GENLIB_MACRO(DPGEN_OR2, "model_or2_32"
                       , F_BEHAV|F_PLACE
                       , 32
                       , 2
                       );

GENLIB_LOINS( "model_or2_32"
            , "instance1_or2_32"
            , "i1[31:0]"
            , "i0[31:0]"
            ,  "q[31:0]"
            , "vdd", "vss", NULL
            );

first you generate the macro β€” "model_or2_32", flags F_BEHAV|F_PLACE, N = 32, drive = 2 β€” then you GENLIB_LOINS an instance of it named "instance1_or2_32", wiring up "i1[31:0]", "i0[31:0]", "q[31:0]", "vdd", "vss", and a NULL to close it out. chef's kiss πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

go read these next, bestie, they're the friends of this page:


lowkey important reminder: valid drive is only 2 or 4. anything else is not the move. πŸ™ˆ

and that's the whole page!! this lil manual page came from ASIM/LIP6, dated 30 July 2004, and she's been serving ever since πŸ’…πŸ’– bye bestie, go build some OR gates πŸ¦‹βœ¨

πŸ“¦ where this page comes from