Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHow to reset a ram?
Hi, in my vhdl design I got a ram signal R then I try to test it against A with "if A > R then..." but R starts with a 'X' value so the test is not working. What could I do to solve that problem? ...
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- If you do that, you're likely to break the design on the FPGA. Basically, fix your testbench so that something is written to the ram before you start, or give the ram an initial startup value via a .mif file. Or you could infer the ram and set the initial contents with a function. --- Quote End --- I don't see how a proper design would break as such.You read from ram what you have written to it. If you read before write then your approach is wrong. If you pass ramoutput to accumulate then start after the x.