Modelsim and hex format file

J

john

Guest
Hello,

I am using Modelsim 5.8e to do simulation on my code for the first
time. MyVHDL code reads a RAM contents. I can not simualte the RAM data
using simulator so I looked into the Modelsim and found that I can read
the hex format file or numbers using
use work.io_utils.all;
use std.text.io.all;

I managed to compile the code but do not have any clue to make it work
and those numbers in the data file during the simulation.
Can anybody adivce me any sample code or something. I read the manual.

John
 
john wrote:

Can anybody adivce me any sample code or something. I read the manual.
I don't understand the question,
but here is binary file example using modelsim:
http://home.comcast.net/~mike_treseler/char_file.vhd

-- Mike Treseler
 
Here's how I read in a binary memory file in model sim:
http://groups.google.com/group/comp.lang.vhdl/browse_frm/thread/cad904d2f759962f/1a1e03335cbf514a?q=read+binary&rnum=3#1a1e03335cbf514a

Its not as smart as Mike's, but it works perfect.

Enjoy!

john wrote:
Hello,

I am using Modelsim 5.8e to do simulation on my code for the first
time. MyVHDL code reads a RAM contents. I can not simualte the RAM data
using simulator so I looked into the Modelsim and found that I can read
the hex format file or numbers using
use work.io_utils.all;
use std.text.io.all;

I managed to compile the code but do not have any clue to make it work
and those numbers in the data file during the simulation.
Can anybody adivce me any sample code or something. I read the manual.

John
 
Hello Beanut,

Thanks for ur reply! Do you have the same file structure as mike
mentioned in his propposed code. Because I have the same structure.
John
 

Welcome to EDABoard.com

Sponsor

Back
Top