Thread: $readmemh()
View Single Post
  #9 (permalink)  
Old 06-16-2009, 01:26 PM
Andreas Ehliar
Guest
 
Posts: n/a
Default Re: $readmemh()

On 2009-06-16, gabor <[email protected]> wrote:
> XST is a little more restrictive than simulators. The $readmemh
> needs to be in an initial block in the same module where the
> memory array is declared. Other than that, it should match
> the simulation for generating initialized memories or ROMs.


In the past I've had problems when initiating part of a memory with
initial statements. For example, the following example didn't work
because the entire memory was not initialized:

reg [7:0] foo[15:0];

initial begin
foo[0] = 9;
foo[1] = 5;
end


In this case XST gave an error in the synthesis log file if I remember
correctly. I'm just guessing here, but perhaps the original poster is
having the same problems even though you are using $readmemh instead of
plain variable assignments to initialize your memory?

/Andreas
Reply With Quote