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

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-25-2003, 10:01 AM
Rajesh Bawankule
Posts: n/a
Default Re: Loading data into memory from a file

The correct syntax is
reg [Data_Width-1:0] my_memory[0:whatever];

memory width and depth numbers have different orders.
When you specify depth the first one is the lower number and then
the higher.

Hope this helps.
Rajesh Bawankule
(Verilog FAQ: http://www.parmita.com/verilogfaq/ )

"John Vinyard" <[email protected]> wrote in message news:<[email protected]>...
> I have a memory model in verilog made with an array of registers. I'm
> trying to load data into it from a file in simulation, specifically using
> MTI's Modelsim 5.7 SE. Trial and error with the $readmemh command is not
> working. Any help you could give would be greatly appreciated.
> reg [Data_Width-1:0] memory[65535:0];
> Right now, I would settle for some way to execute a script from a file,
> something like:
> memory[0] = 36'hfeedfacea;
> memory[1]...
> Thanks in advance!
> - John

Reply With Quote


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
Re: Loading data into memory from a file Steven Sharp Verilog 0 07-24-2003 10:49 PM
Re: Loading data into memory from a file Jim Wu Verilog 0 07-24-2003 09:39 PM
Re: Loading data into memory from a file Kevin Neilson Verilog 0 07-24-2003 09:12 PM

All times are GMT +1. The time now is 12:52 PM.

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