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

Reply

VHDL - reading the stimuls from input file

 
Thread Tools Search this Thread
Old 09-25-2003, 02:09 PM   #1
Default reading the stimuls from input file


Hello

I want to use a text file to supply signals to the two input ports in
my program. the type of input ports is std_logic_vector(14 downto 0)

the content of the file is follow

QOUT=00000011011101 IOUT=00000101001110
QOUT=00000000000000 IOUT=00000000011000
QOUT=11111101101100 IOUT=00000101110100
QOUT=00000000000000 IOUT=00000000000000
QOUT=00000010010100 IOUT=00000101110100
QOUT=00000000000000 IOUT=00000000001110
QOUT=11111110111001 IOUT=00000110001001

QOUT is the first signal IOUT is the second

the problem that I don't now how to share this string into two
separate parts

how canI use the textio package functions to realize this problem?

Thanks


my24101974@yahoo.com
  Reply With Quote
Old 09-25-2003, 04:45 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: reading the stimuls from input file
wrote:

> how canI use the textio package functions to realize this problem?


Consider declaring constant vector arrays in your testbench
with the same data.

Then you don't need textio and you get syntax checking for free.

-- Mike Treseler





Mike Treseler
  Reply With Quote
Old 09-25-2003, 04:55 PM   #3
VhdlCohen
 
Posts: n/a
Default Re: reading the stimuls from input file
>I want to use a text file to supply signals to the two input ports in
>my program. the type of input ports is std_logic_vector(14 downto 0)
>
>the content of the file is follow
>
>QOUT=00000011011101 IOUT=00000101001110
>QOUT=00000000000000 IOUT=00000000011000
>QOUT=11111101101100 IOUT=00000101110100
>QOUT=00000000000000 IOUT=00000000000000
>QOUT=00000010010100 IOUT=00000101110100
>QOUT=00000000000000 IOUT=00000000001110
>QOUT=11111110111001 IOUT=00000110001001
>
>QOUT is the first signal IOUT is the second
>
>the problem that I don't now how to share this string into two
>separate parts
>
>how canI use the textio package functions to realize this problem?
>


1. define a variable V_string5 of type string(1 to 4), and V_string6 (string(1
to6)
2. Following a readline into L, do a read with v to consume the 1st 5
characters (QOUT=)
Read(L, V_string5)
3. do a read of 1st vector into a length 14 (Vqout_std14)
READ(L, Vqout_std14)
4. Read(L, V_string6) to consume " IOUT="
5. do a read of 1st vector into a length 14 (Viout_std14)
READ(L, Viout_std14)
You may want to write a procedure that does all of that, and returns the 2
variables.

----------------------------------------------------------------------------
Ben Cohen Publisher, Trainer, Consultant (310) 721-4830
http://www.vhdlcohen.com/
Author of following textbooks:
* Using PSL/SUGAR with Verilog and VHDL
Guide to Property Specification Language for ABV, 2003 isbn 0-9705394-4-4
* Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn
0-9705394-2-8
* Component Design by Example ", 2001 isbn 0-9705394-0-1
* VHDL Coding Styles and Methodologies, 2nd Edition, 1999 isbn 0-7923-8474-1
* VHDL Answers to Frequently Asked Questions, 2nd Edition, isbn 0-7923-8115
------------------------------------------------------------------------------



VhdlCohen
  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
Error: Physical sythesis tool PALAC is not supported by Formal Verification tool Conf bbiandov Software 0 12-22-2008 05:25 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