UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer imukhopadhyay
Observer
2,398 Views
Registered: ‎12-16-2011

How to use dat / txt file in testbench...

I'm a new and clumsy VHDL user but wish to accept a data file outside VHDL and then read it and test it under testbench.

 

Could someone point me to a useable example of this sort of thing?

Any pointers?

thanks,
Indraneel

0 Kudos
1 Reply
Teacher rcingham
Teacher
2,397 Views
Registered: ‎09-09-2010

Re: How to use dat / txt file in testbench...

You need to use the standard 'textio' package (and possibly the 'std_logic_textio' package) to open and read the file.

Enter "vhdl textio tutorial" into any good Internet search engine for useful information on how to use them...

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos