DPGEN_FIFO(3)

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

πŸ’– DPGEN_FIFO πŸ’– β€” bestie, we're making a FIFO today

okay so first things first, the vibe: this is a page from the Alliance - genlib User's Manual, and it's all about DPGEN_FIFO(3) β€” the FIFO Macro-Generator. no cap, it's literally a generator that generates FIFOs. main character energy fr fr. πŸŽ€


✨ NAME ✨

DPGEN_FIFO β€” FIFO Macro-Generator 🌈


✨ SYNOPSIS ✨

#include  <genlib.h>

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

✨ DESCRIPTION ✨

so basically, Generate a FIFO of regNumber words of N bits named modelname. πŸ¦‹ that's the whole job bestie, she's a FIFO factory.

How it works : πŸ‘‘ (this part matters, don't skip it)

  • datain0 and datain1 : the two write busses. Only one of them is actually used to write the FIFO, and which one gets picked is decided by the sel signal. like, you brought two outfits but you're only wearing one, and sel is the mirror selfie that decides. πŸ’…
  • sel : when it's set to '0' then datain0 is what writes the register word, otherwise it'll be datain1. okay so '0' = datain0, not-'0' = datain1, got it? 🫢
  • r, rok : set r when a word is requested, and rok tells you that a word has effectively been popped (that's rok == not empty, periodt). 😭
  • w, wok : set w when a word is pushed, and wok tells you the word has effectively been pushed (wok == not full, iykyk). πŸ”₯

🌸 TERMINAL NAMES 🌸

here's the whole cast list, in order, no skips, every single one gets her moment:

  1. ck : clock signal (input, 1 bit). ⏰
  2. reset : reset signal (input, 1 bit).
  3. r : read requested (input, 1 bits).
  4. w : write requested (input, 1 bits).
  5. rok : read acknowledge (output, 1 bits).
  6. wok : write acknowledge (output, 1 bits).
  7. sel : select the write bus (input, 1 bit).
  8. datain0 : first write bus (input, N bits).
  9. datain1 : second write bus (input, N bits).
  10. dataout : read bus (output, N bits).
  11. vdd : power. ⚑
  12. vss : ground. 🌍

✨ EXAMPLE ✨

not me showing you exactly how it's done πŸ‘‡ and yes, keep the comments, they're doing the Lord's work:

GENLIB_MACRO(DPGEN_RF1, "model_fifox8_32"
                      , F_BEHAV|F_PLACE
                      , 32  /* Words size.      */
                      , 8   /* Number of words. */
                      );

GENLIB_LOINS( "model_fifox8_32"
            , "instance1_fifo1_32"
            , "ck"
            , "r"
            , "w"
            , "rok"
            , "wok"
            , "sel"
            , "datain0[31:0]"
            , "datain1[31:0]"
            , "dataout[31:0]"
            , "vdd", "vss", NULL
            );

✨ SEE ALSO ✨

go read these next, bestie, they're the sequel:


πŸ’€ heads up, diva: in the EXAMPLE block above the macro is invoked as DPGEN_RF1, not DPGEN_FIFO β€” that's what the page says, so that's what I'm giving you. copied character for character, I don't make the rules. πŸ™ˆ

and that's the whole page, we ate. πŸ“ this was brought to you by ASIM/LIP6, dated 30 July 2004 β€” yes she's a vintage queen and she still serves. πŸ’œ bye bestie, go generate some FIFOs 🧚✨