[Moved]: can I read and write the same address of a 2-port SRAM?

Status
Not open for further replies.

zhangljz

Member level 5
Joined
Oct 19, 2013
Messages
81
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
648
Hello,

I have a 2-port SRAM, the operation is that the read and write operation are simultaneous. But read operation is in sequence, like from 000 to fff, but write operation is random.

The problem is that they may read and write a single address at the same time. Will this result in wrong operation? For example the read data is crap, neither 'old', nor 'new', or the written data is crap.


Thank you.
 

Re: can I read and write the same address of a 2-port SRAM?

Hi,

Read datasheet of Sram. Here you should find the information.

In case of an FPGA there should be an option to set how it works.
In one case you get the previous value, in another case you get the newer value. Maybe an error flag or a busy_flag are other options.

In either case you should somehow synchronize read and write. Often this is made with different blocks in sram. One block is written, while the other is being read. Only then data integrity is safe.

Klaus
 

Re: can I read and write the same address of a 2-port SRAM?

Write data will be always correct, as long as you don't have conflicting write accesses from both ports.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…