Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17054 Discussions

Dual ported ram in modelsim

Altera_Forum
Honored Contributor II
1,102 Views

I have problems accessing dual ported ram in Modelsim. 

 

My ram looks like this: 

 

component ram_megafunction is 

port 

address_a : IN STD_LOGIC_VECTOR (7 DOWNTO 0); 

address_b : IN STD_LOGIC_VECTOR (7 DOWNTO 0); 

clock : IN STD_LOGIC ; 

data_a : IN STD_LOGIC_VECTOR (31 DOWNTO 0); 

data_b : IN STD_LOGIC_VECTOR (31 DOWNTO 0); 

rden_a : IN STD_LOGIC := '0'; 

rden_b : IN STD_LOGIC := '0'; 

wren_a : IN STD_LOGIC := '0'; 

wren_b : IN STD_LOGIC := '0'; 

q_a : OUT STD_LOGIC_VECTOR (31 DOWNTO 0); 

q_b : OUT STD_LOGIC_VECTOR (31 DOWNTO 0) 

); 

end component; 

 

when i write the following: 

 

data_in <= "10101010101010101010101010101010"; 

 

the resulting data_out is "X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0"; 

 

What i am doing wrong? 

 

(Sorry for my bad english)
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
389 Views

It seems that you have multiple drivers on some signals. Forcing a signal to 0 and 1 at the same time will give an X. 

You can check a few things: 

- do you have only one connection on data_a and data_b? 

- are you trying to write two different values from each port at the same address? 

- do you have only one connection to data_out?
0 Kudos
Altera_Forum
Honored Contributor II
389 Views

Ok, thank you, i have found the problem. 

data_out was driven twice.
0 Kudos
Reply