how 33-bit BRAM?

May 22, 2007 3 Replies

Hi



I need to implement 33-bit data BRAM. Obviously, following BRAM will not work. Does anyone suggest how to implement 33-bit data, if possible? Thank you in advance.



component RAMB16_S36_S36 port (DOA : out STD_LOGIC_VECTOR (datawidth-1 downto 0); DOB : out STD_LOGIC_VECTOR (datawidth-1 downto 0); DOPA : out STD_LOGIC_VECTOR (3 downto 0); DOPB : out STD_LOGIC_VECTOR (3 downto 0); ADDRA : in STD_LOGIC_VECTOR (8 downto 0); ADDRB : in STD_LOGIC_VECTOR (8 downto 0); CLKA : in STD_ULOGIC; CLKB : in STD_ULOGIC; DIA : in STD_LOGIC_VECTOR (datawidth-1 downto 0); DIB : in STD_LOGIC_VECTOR (datawidth-1 downto 0); DIPA : in STD_LOGIC_VECTOR (3 downto 0); DIPB : in STD_LOGIC_VECTOR (3 downto 0); ENA : in STD_ULOGIC; ENB : in STD_ULOGIC; SSRA : in STD_ULOGIC; SSRB : in STD_ULOGIC; WEA : in STD_ULOGIC; WEB : in STD_ULOGIC);



Keep the RAMB16_S36_S36 definitions as they started (no datawidth-1, please) out so your primitive doesn't generate errors when it tries to get reconciled with the code.

Instead, just use the 32 data bits and 1 of the 4 parity bits. Ta da!

33-bit memory.

or you just take any next sized primitive (or 2 in parallel) and pad the rest with zeros.

Depends on how deep you need the memory to be. Size the memory primitives to match your depth requirement, then instance as many as are needed for your data width. If, for example, you need 512 or less words, then a single 512x36 BRAM does the trick. If you need 16K depth, then you need to use 33 1x16K BRAMs.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required