DPGEN_RF1D(3)
π DPGEN_RF1D π
okay bestie, so this page is straight out of the Alliance genlib User's Manual, and yes it's section 3 of the manual β the library-function girlies. pull up a chair, we're building register files π
β¨ NAME β¨
DPGEN_RF1D, DPGEN_RF1DR0 β Register File with Decoder Macro-Generator π¦
like. it generates a register file. with a decoder. it's giving macro energy and we're obsessed π
πΈ SYNOPSIS πΈ
#include <genlib.h>
void GENLIB_MACRO (DPGEN_RF1D, char *modelname, long flags, long N);
void GENLIB_MACRO (DPGEN_RF1DR0, char *modelname, long flags, long N);
π DESCRIPTION π
So what it does is generate a register file of regNumber words of N bits, with a decoder, and it's named modelname. cute, right? π
And listen, the DPGEN_RF1DR0 variant differs from the DPGEN_RF1D in one specific way: the register of address zero is stuck to zero. You can write into it, bestie, but it will not change the value. And when you read it, it will always return zero. that's just the deal. periodt. π
How it works, bestie: π
datain0anddatain1: the two write busses. Only one of them is actually used to write the register word, and which one is selected by theselsignal.sel: when it's set to'0',datain0is used to write the register word. otherwise it'll bedatain1.adr,adw: the width (Y) of those signals is computed fromregNumber, like: Y = log2(regNumber). math girlie behavior fr fr β¨wenandren: write enable and read enable, which allow reading and writing when they're set to'1'.
π TERMINAL NAMES π
ck: clock signal (input, 1 bit).sel: select the write bus (input, 1 bit).wen: write enable (input, 1 bit).ren: read enable (input, 1 bit).adr: the read address (input, Y bits).adw: the write address (input, Y bits).datain0: first write bus (input, N bits).datain1: second write bus (input, N bits).dataout: read bus (output, N bits).vdd: power.vss: ground.
π₯ EXAMPLE π₯
here's the vibe, no cap:
GENLIB_MACRO(DPGEN_RF1D, "model_rf1dx8_32"
, F_BEHAV|F_PLACE
, 32 /* Words size. */
, 8 /* Number of words. */
);
GENLIB_LOINS( "model_rf1dx8_32"
, "instance1_rf1d_32"
, "ck"
, "sel"
, "wen"
, "ren"
, "adr[2:0]"
, "adw[2:0]"
, "datain0[31:0]"
, "datain1[31:0]"
, "dataout[31:0]"
, "vdd", "vss", NULL
);
π SEE ALSO π
okay that's the whole page bestie, you ate that π this was the ASIM/LIP6 version, dated 30 July 2004 β iconic, historic, and yes she's still slaying π«Άβ¨πΈ
π¦ 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