Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - read hex file in VHDL using modelsim

 
Thread Tools Search this Thread
Old 09-03-2005, 02:31 AM   #1
Default read hex file in VHDL using modelsim


Hi ,

I have a difficulty when I wants to read out hex format file in
vhdl. what's the best way to do? (I am using modelsim). An example of
my file is like this:

AB412266
BB329EF1
133F

Thanks!

Carson



Carson
  Reply With Quote
Old 09-03-2005, 05:37 PM   #2
Ajeetha
 
Posts: n/a
Default Re: read hex file in VHDL using modelsim
Hi,
Try using hread procedure (I believe it is part of
ieee.std_logic_textio for slv data type). Refer to VHDL FAQ for basic
example:
http://www.vhdl.org/comp.lang.vhdl/

4.2.12 How to Use Package Textio for Accessing Text Files

HTH
Ajeetha
www.noveldv.com



Ajeetha
  Reply With Quote
Old 09-04-2005, 10:17 AM   #3
vizziee@gmail.com
 
Posts: n/a
Default Re: read hex file in VHDL using modelsim

> (I am using modelsim)

In my opinion, that should not make a difference. ModelSim is only a
simulator and compiler software. The language constructs you use are
native to VHDL and will work on any simulator. Probably the only thing
you should check is which VHDL version your ModelSim supports.



vizziee@gmail.com
  Reply With Quote
Old 09-06-2005, 05:12 PM   #4
Beanut
 
Posts: n/a
Default Re: read hex file in VHDL using modelsim
I would expect simulators to handle data based on their own formats
which could make each one different. I know that modelsim will read
std_logic from a binary file if it is coded x"03" for a '1' and x"02"
for a '0'. If that same file were read as a bit_vector the x"03"
would be x"03", not '1'. I doubt that x"03" is a standard for all
simulators trying to ready a binary file of stand logic data. Correct
me if this assumption is wrong please.



Beanut
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL file IO (using file as variable) veevee1 VHDL 0 03-07-2007 11:56 AM
SONY DVD RW DW-G120A SOMETIMES FAILS...... atlantic965 DVD Video 0 06-18-2006 10:36 PM
problems backing up dvds Lawrence Traub DVD Video 11 09-27-2005 07:34 PM
Re: Ripping DVDs. Please answer the attached question. - Question.txt Stan Brown DVD Video 19 02-09-2005 11:19 PM
Burn process failed - help! Log file posted for help troubleshooting Michael Mason DVD Video 1 08-16-2004 09:24 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46