FPGA Groups

FPGA Groups (http://www.fpgacentral.com/group/index.php)
-   Verilog (http://www.fpgacentral.com/group/forumdisplay.php?f=12)
-   -   Hex start address in $readmemh? (http://www.fpgacentral.com/group/showthread.php?t=88939)

Muzaffer Kal 03-28-2009 06:30 AM

Re: Hex start address in $readmemh?
 
On Sat, 28 Mar 2009 22:14:05 -0700 (PDT), pallav
<[email protected]> 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

pallav 03-29-2009 06:14 AM

Hex start address in $readmemh?
 
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.


All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved