DPGEN_OR2(3)
π 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:
i1: input. yes it's the first input. we love a numbered-but-backwards moment πi0: input. the second one listed. iykyk πq: output. she's the main character πvdd: power. the juice β‘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: validdriveis only2or4. 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
- fedora 43: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 43: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms