Forum Discussion
Clear RAM 2-port
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 Hung5 Replies
- Altera_Forum
Honored Contributor
Well you don't need to. Just don't read until write finished i.e.check last address of write then read
- Altera_Forum
Honored Contributor
I think it's impossible !
- Altera_Forum
Honored Contributor
you will have to write all 256 addresses from port B to clear it. You cannot "reset" a ram.
- Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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?