Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20639 Discussions

use 2 srams at the same time

Altera_Forum
Honored Contributor II
946 Views

hi: 

 

I have writen some fixed data (1.2.3...) into a sram,then I want to read the data from it and write the data into the other sram at the same time.I write the code as below: 

 

begin 

SR1_wr_n<=1; 

SR1_addr<=SR2_addr+1; 

SR2_wr_n<=0; 

SR2_addr<=SRAM_addr+1; 

end 

 

assign SR2_DQ = (~SR2_wr_n)? SR1_DQ;16'bzzzz; 

 

then I look at the signaltapII waveform: 

I am sure I have write sram 1 correctly,but when I read the data from it,the data at adress1 should be 1,2,3...but it is 0422h,0423h,0424h... 

I am not sure if the method I used the two srams is right,that is ,reading one sram and write the other sram at the same time?? 

 

I give the attachment~ 

 

thanks very much!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
234 Views

Please first try writing and reading only one sram properly. Make the display type according to your requirement, like HEX, Decimal, binary etc...

0 Kudos
Altera_Forum
Honored Contributor II
234 Views

thanks for you answer!!~ 

I have find the reason,that is ,I have mistake the adress of SRAM
0 Kudos
Reply