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

Clear RAM 2-port

Altera_Forum
Honored Contributor II
1,851 Views

Hi, 

I created a RAM 2-port, port A for writing only, port B for reading only. 

Before I write a new data into port A in RAM 2-port, I want to clear/reset all data and address in Port B first? how can I do that ? 

Thanks in advance 

Hung
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
755 Views

It's not clear what you mean with "clear/reset all data and address in Port B". Apparently not clearing the RAM content, which would need a sequential program anyway. The data appearing at port B will be updated according to the specified RAM behaviour. What do you want to achieve besides the default behavior?

0 Kudos
Altera_Forum
Honored Contributor II
755 Views

Because I configure Port A and Port B with different size. Port A is 1-bit data, 13-word address. Port B is 32-bit data, 256-word address for M9K. when I write new data in Port A, then access data from Port B it may be duplicated with the previous data. Therefore, before writing new data to port A, I want to reset RAM 2-port to the initial status when we just turn on the board.

0 Kudos
Altera_Forum
Honored Contributor II
755 Views

you will have to write all 256 addresses from port B to clear it. You cannot "reset" a ram.

0 Kudos
Altera_Forum
Honored Contributor II
755 Views

I think it's impossible !

0 Kudos
Altera_Forum
Honored Contributor II
755 Views

Well you don't need to. Just don't read until write finished i.e.check last address of write then read

0 Kudos
Reply