DPGEN_FIFO(3)
π 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)
datain0anddatain1: the two write busses. Only one of them is actually used to write the FIFO, and which one gets picked is decided by theselsignal. like, you brought two outfits but you're only wearing one, andselis the mirror selfie that decides. πsel: when it's set to'0'thendatain0is what writes the register word, otherwise it'll bedatain1. okay so'0'= datain0, not-'0'= datain1, got it? π«Άr,rok: setrwhen a word is requested, androktells you that a word has effectively been popped (that'srok == not empty, periodt). πw,wok: setwwhen a word is pushed, andwoktells 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:
ck: clock signal (input, 1 bit). β°reset: reset signal (input, 1 bit).r: read requested (input, 1 bits).w: write requested (input, 1 bits).rok: read acknowledge (output, 1 bits).wok: write acknowledge (output, 1 bits).sel: select the write bus (input, 1 bit).datain0: first write bus (input,Nbits).datain1: second write bus (input,Nbits).dataout: read bus (output,Nbits).vdd: power. β‘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 theEXAMPLEblock above the macro is invoked asDPGEN_RF1, notDPGEN_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 π§β¨
π¦ 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