View Single Post
  #1 (permalink)  
Old 03-28-2009, 06:30 AM
Muzaffer Kal
Posts: n/a
Default Re: Hex start address in $readmemh?

On Sat, 28 Mar 2009 22:14:05 -0700 (PDT), pallav
<[email protected]> wrote:

>I declare some memory as follows: reg[31:0] DRAM[8191:0];
>I want to initialize it with some data from a file using $readmemh.
>However, how does one specify the start address in hexadecimal format?
>Currently, I have,
> $readmemh("../tests/mult.bin", DRAM, 100);
>But 100 is decimal. I would like to start at 0x100. I've tried h'100
>and 100h but I'm getting syntax errors. Thanks.

Try 'h100.
Muzaffer Kal

ASIC/FPGA Design Services
Reply With Quote