Re: $readmemh()
On 16 June, 12:26, Andreas Ehliar <ehliar-nos...@isy.liu.se> wrote:
> On 2009-06-16, gabor <ga...@alacron.com> 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
When i try to initialize using $readmemh-> It only returns a warning
saying that the memory is tied to zero as it was partially
initialized.
reg mem [0:47];
initial $readmemb("ScDataIn.txt", mem);
The file contains 48 binary numbers.
Am i missing something ?
|