Thread: $readmemh()
View Single Post
  #10 (permalink)  
Old 06-16-2009, 04:28 PM
gabor
Guest
 
Posts: n/a
Default Re: $readmemh()

On Jun 11, 6:53*pm, Muzaffer Kal <k...@dspia.com> wrote:
> On Thu, 11 Jun 2009 13:11:00 -0700 (PDT), Kausi
>
> <kauser.jo...@gmail.com> wrote:
> >I did check out the XST document. I guess that would be a good enough
> >guide to know if the code would be synthesizable.. And surprisingly it
> >does mention the use of $readmemh.. I tried to create a ROM model and
> >initialized it using a .mem file... It does not throw any error in the
> >synthesis report.. But somehow it doesn't initialize it correctly
> >either.

>
> Did you follow the instructions and the samples in the XST user guide
> carefully? Also does you simulation load the memory correctly ? Make
> sure that you can simulate, then XST should be able to use the same
> file.
> --
> Muzaffer Kal
>
> DSPIA INC.
> ASIC/FPGA Design Services
>
> http://www.dspia.com


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.
Reply With Quote