FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-28-2009, 06:30 AM
Muzaffer Kal
Guest
 
Posts: n/a
Default 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
Reply With Quote
  #2 (permalink)  
Old 03-29-2009, 06:14 AM
pallav
Guest
 
Posts: n/a
Default 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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XST and Verilog $readmemh johnp FPGA 1 04-12-2007 06:03 PM
Generate ACE File: *.elf does not contain start address Peter Kampmann FPGA 1 01-08-2007 04:05 PM
Reading Large Files Using $readmemh Ganesh Verilog 2 04-04-2006 07:51 PM
Trouble with $readmemh in ModelSim Chris Carlen FPGA 8 07-02-2004 01:25 AM
Trouble with $readmemh in ModelSim Chris Carlen Verilog 9 07-02-2004 01:25 AM


All times are GMT +1. The time now is 11:37 AM.


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