Hex start address in $readmemh?

P

pallav

Guest
Hi,

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.
 
On Sat, 28 Mar 2009 22:14:05 -0700 (PDT), pallav
<pallavgupta@gmail.com> wrote:

Hi,

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

DSPIA INC.
ASIC/FPGA Design Services
http://www.dspia.com
 

Welcome to EDABoard.com

Sponsor

Back
Top