DPGEN_OR4(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

✨ DPGEN_OR4 ✨

okay bestie, welcome to the Alliance - genlib User's Manual page for DPGEN_OR4, aka the OR4 Macro-Generator πŸ’… this is manual section 3, so it's a library function, not a command β€” iykyk πŸŽ€


🌸 NAME 🌸

DPGEN_OR4 β€” the OR4 Macro-Generator πŸ¦‹


✨ SYNOPSIS ✨

#include  <genlib.h>

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

like yes that's the whole vibe, she's a macro generator, she takes five args, no biggie πŸ’–


πŸ’œ DESCRIPTION πŸ’œ

okay so what she does is: she generates a N bits four inputs OR with an output power of drive, named modelname. literally that's it, that's the gig πŸ‘‘

valid drive values are: 2 or 4. that's the whole list, don't get creative πŸ™ˆ


πŸŽ€ TERMINAL NAMES πŸŽ€

here's the roster, the main character lineup, in order:

  1. i3 β€” input. πŸ’–
  2. i2 β€” input. ✨
  3. i1 β€” input. 🌸
  4. i0 β€” input. πŸ¦‹
  5. q β€” output. πŸ‘‘
  6. vdd β€” power. ⚑
  7. vss β€” ground. 🌈

πŸ”₯ BEHAVIOR πŸ”₯

the whole entire personality, in one line:

q <= i0 or i1 or i2 or i3

not me being obsessed with how simple that is 😭 four ins, one out, OR gate energy, periodt πŸ’…


🌟 EXAMPLE 🌟

here's how you actually call her, copy-paste vibes:

GENLIB_MACRO(DPGEN_OR4, "model_or4_32"
                        , F_BEHAV|F_PLACE
                        , 32
                        , 2
                        );

GENLIB_LOINS( "model_or4_32"
            , "instance1_or4_32"
            , "i3[31:0]"
            , "i2[31:0]"
            , "i1[31:0]"
            , "i0[31:0]"
            ,  "q[31:0]"
            , "vdd", "vss", NULL
            );

so she made a 32-bit wide model called model_or4_32 with drive of 2, and then GENLIB_LOINS wires up an instance of it named instance1_or4_32 with all those [31:0] buses slotted in. slay 🫢


πŸ‘€ SEE ALSO πŸ‘€

go read those too bestie, they're the supporting cast πŸ’œ


and that's the page!! brought to you by ASIM/LIP6, dated 30 July 2004 β€” yes she's an elder but she still ate, no cap πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’