D
digichip1
Hi!
Some time ago I've learned, that I can instantiate Xilinx Block-RAM in
dual-ported mode using shared variables and two separate processes
accessing those variables. Example:
-------------------------
architecture rtl of intarnalRAM is
type rft is array((2**ADDR_BITS)-1 downto 0) of
std_logic_vector(WORD_SIZE-1 downto 0);
shared variable RAM: rft;
begin
RAM_PORT_A: process (clk)
begin
if (rising_edge(clk)) then
if (wr = '1') then
RAM(conv_integer(addr_y)) := input_y;
else
data_y <= RAM(conv_integer(addr_y));
end if;
end if;
end process;
RAM_PORT_B: process (clk)
begin
if (rising_edge(clk)) then
if (wr_x = '1') then
RAM(conv_integer(addr_x)) := input_x;
else
data_x <= RAM(conv_integer(addr_x));
end if;
end if;
end process;
end rtl;
--------------------------------------
When synthesizing it with Xilinx WEBpack, I've noticed, that report
shows
separate (although the same) memory aspect ratio for each port.
So I have two questions:
1. how to write a *generic* VHDL so, that it's clear (to any
synthesizer/
simulator), that I'm expressing a RAM with two ports of different
aspect
ratio each?
2) how to write VHDL for Xilinx Spartan devices, to get their BlockRAM
instantiated with ports A/B having different aspect ratio? Say: portA=
8its x 256words, portB= 16bits x 128words ... into the same RAM array?
I write the above as separate questions, since I take into account,
that
one or the other may not have a valid answer.... although I hope, that
both have
Thenx
-R
Some time ago I've learned, that I can instantiate Xilinx Block-RAM in
dual-ported mode using shared variables and two separate processes
accessing those variables. Example:
-------------------------
architecture rtl of intarnalRAM is
type rft is array((2**ADDR_BITS)-1 downto 0) of
std_logic_vector(WORD_SIZE-1 downto 0);
shared variable RAM: rft;
begin
RAM_PORT_A: process (clk)
begin
if (rising_edge(clk)) then
if (wr = '1') then
RAM(conv_integer(addr_y)) := input_y;
else
data_y <= RAM(conv_integer(addr_y));
end if;
end if;
end process;
RAM_PORT_B: process (clk)
begin
if (rising_edge(clk)) then
if (wr_x = '1') then
RAM(conv_integer(addr_x)) := input_x;
else
data_x <= RAM(conv_integer(addr_x));
end if;
end if;
end process;
end rtl;
--------------------------------------
When synthesizing it with Xilinx WEBpack, I've noticed, that report
shows
separate (although the same) memory aspect ratio for each port.
So I have two questions:
1. how to write a *generic* VHDL so, that it's clear (to any
synthesizer/
simulator), that I'm expressing a RAM with two ports of different
aspect
ratio each?
2) how to write VHDL for Xilinx Spartan devices, to get their BlockRAM
instantiated with ports A/B having different aspect ratio? Say: portA=
8its x 256words, portB= 16bits x 128words ... into the same RAM array?
I write the above as separate questions, since I take into account,
that
one or the other may not have a valid answer.... although I hope, that
both have
Thenx
-R