T
Tobias Möglich
Guest
Hello
I'm using the core generator from Xilinx for installing a true dual port
RAM
But I wonder how I can handle it in the VHDL code ???
Could someone give me an advice??
This is what Iknow already:
Of course I put a component in the archticture (as I did it in the
example
below)
architecture Behavioral of dpram is
component dpram
port
(
addra: IN std_logic_VECTOR(8 downto 0);
addrb: IN std_logic_VECTOR(7 downto 0);
clka: IN std_logic;
clkb: IN std_logic;
dina: IN std_logic_VECTOR(7 downto 0);
dinb: INOUT std_logic_VECTOR(15 downto 0);
douta: OUT std_logic_VECTOR(7 downto 0);
doutb: OUT std_logic_VECTOR(15 downto 0);
ena: IN std_logic;
enb: IN std_logic;
wea: IN std_logic;
web: IN std_logic
);
end component;
begin
-- Verwendung des cores (instantiation of the core)
dpram_block_1 : dpram -- dpram ist der component_name; dpram_block_1 ist
die Instanz
port map
(
addra => addra,
addrb => addrb,
clka => clka,
clkb => clkb,
dina => dina,
dinb => dinb,
douta => douta,
doutb => doutb,
ena => ena,
enb => enb,
wea => wea,
web => web
);
But how can I say where to store the values in the RAM ???
There must be something possible as described below:
But if I would use this code, I would not know where in the RAM the
values
are stored.
WRITE : process(clkb) -- Daten schreiben ins RAM (data -> ram)
begin
if rising_edge(clkb) then
if (cs_DSP = '0' and IORW_DSP = '1') then
-- Polarität prüfen
-- ram(conv_integer(addrb)) <= data_b;
-- von dinb in den Speicher (hoffentlich blockRAM !!)
dinb <= data_b;-- after 5 ns;
-- von dinb in den Speicher (hoffentlich blockRAM !!)
else dinb <= (others=>'Z'); --after 3 ns;
end if;
end if;
end process;
Do you have any example code??
It would be nice if you could send it to me just to get ahead.
MfG, Tobias Möglich.
I'm using the core generator from Xilinx for installing a true dual port
RAM
But I wonder how I can handle it in the VHDL code ???
Could someone give me an advice??
This is what Iknow already:
Of course I put a component in the archticture (as I did it in the
example
below)
architecture Behavioral of dpram is
component dpram
port
(
addra: IN std_logic_VECTOR(8 downto 0);
addrb: IN std_logic_VECTOR(7 downto 0);
clka: IN std_logic;
clkb: IN std_logic;
dina: IN std_logic_VECTOR(7 downto 0);
dinb: INOUT std_logic_VECTOR(15 downto 0);
douta: OUT std_logic_VECTOR(7 downto 0);
doutb: OUT std_logic_VECTOR(15 downto 0);
ena: IN std_logic;
enb: IN std_logic;
wea: IN std_logic;
web: IN std_logic
);
end component;
begin
-- Verwendung des cores (instantiation of the core)
dpram_block_1 : dpram -- dpram ist der component_name; dpram_block_1 ist
die Instanz
port map
(
addra => addra,
addrb => addrb,
clka => clka,
clkb => clkb,
dina => dina,
dinb => dinb,
douta => douta,
doutb => doutb,
ena => ena,
enb => enb,
wea => wea,
web => web
);
But how can I say where to store the values in the RAM ???
There must be something possible as described below:
But if I would use this code, I would not know where in the RAM the
values
are stored.
WRITE : process(clkb) -- Daten schreiben ins RAM (data -> ram)
begin
if rising_edge(clkb) then
if (cs_DSP = '0' and IORW_DSP = '1') then
-- Polarität prüfen
-- ram(conv_integer(addrb)) <= data_b;
-- von dinb in den Speicher (hoffentlich blockRAM !!)
dinb <= data_b;-- after 5 ns;
-- von dinb in den Speicher (hoffentlich blockRAM !!)
else dinb <= (others=>'Z'); --after 3 ns;
end if;
end if;
end process;
Do you have any example code??
It would be nice if you could send it to me just to get ahead.
MfG, Tobias Möglich.