DPGEN_ROM2(3)
π DPGEN_ROM2 π
okay so bestie, welcome to the DPGEN_ROM2(3) page from the Alliance - genlib User's Manual β yes she's a library function page, she's fancy, she's in section 3, she lives in genlib.h land, and she's about to make you a whole ROM. no cap. π
β¨ NAME β¨
DPGEN_ROM2 β the 2 words ROM Macro-Generator. that's it, that's her whole job description, and she ate. π
πΈ SYNOPSIS πΈ
#include <genlib.h>
void GENLIB_MACRO (DPGEN_ROM2, char *modelname, long flags, long N, char
*constVal0, char *constVal1);
like, that's the whole entrance. copy it exactly, don't freestyle the signature, i'm begging. π
π¦ DESCRIPTION π¦
Generate a N bits 2 words optimized ROM named modelname.
that's the vibe. you hand her a name and a size, she hands you a ROM. main character energy fr fr. β¨
π§ TERMINAL NAMES π§
the terminals, in order, so you know who's who at the party:
sel0: address of the value (input, 1 bits).q: the selected word (output, N bit).vdd: power.vss: ground.
lowkey iconic lineup ngl β one address bit in, N bits of word out, plus the power rails doing their lil thing. π«Ά
π BEHAVIOR π
here's the whole personality, in glorious code:
q <= WITH sel0 SELECT
contsVal0 WHEN B"0",
constVal1 WHEN B"1";
(and yes, that spelling up there is exactly how the original wrote it β i'm not touching it, i don't make the rules, i just relay them faithfully. π)
π₯ EXAMPLE π₯
okay so here's what it actually looks like when you use her. study the strings, they're literally strings, i cannot stress this enough:
GENLIB_MACRO(DPGEN_ROM2, "model_rom2_set1_4"
, F_BEHAV|F_PLACE
, 4
, "0b1010" /* A string! */
, "0b1100" /* A string! */
);
GENLIB_LOINS( "model_rom2_set1_4"
, "instance1_rom2_4"
, "sel0"
, "q[31:0]"
, "vdd", "vss", NULL
);
see those /* A string! */ comments? the manpage is screaming at you that those are strings. listen to her. "0b1010" in quotes, not a number, a string, periodt. π
π SEE ALSO π
go read these next, they're the besties:
and that's the whole page, bestie β no details left behind, every flag, terminal, code snippet and warning preserved with love. π
signing off from ASIM/LIP6, dated 30 July 2004, on the DPGEN_ROM2(3) tip β mwah, go build something cute. πβ¨π¦
π¦ 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