![]() |
|
|
|||||||
![]() |
VHDL - How do I read binary file data in a test bench? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Say I have a binary file containing compressed video.
I want to present the dut in my test bench with a byte from the file at the dut's standard_logic_vector input, every clock period. What's the cleanest way to do this? Can I use a binary file, or do I need to convert it to: "xxxxxxxx" "xxxxxxxx" "xxxxxxxx" with one 8-bit slv per line. Is this simulator specific (I'll be using Modelim PE). Thanks Pete Fraser |
|
|
|
|
#2 |
|
Posts: n/a
|
|
|
|
|
#3 |
|
Posts: n/a
|
"mike_treseler" <tres@fl_ke.com> wrote in message
news: lkaboutprogramming.com... > http://groups.google.com/groups?q=vhdl+sim+char_file > Thanks Mike. Exactly the start I needed. Pete Fraser |
|
|
|
#4 |
|
Posts: n/a
|
"mike_treseler" <tres@fl_ke.com> wrote in message news: lkaboutprogramming.com... > http://groups.google.com/groups?q=vhdl+sim+char_file > > -- Mike Treseler That worked nicely, but I can't work out how to convert from character to std_logic_vector. test_sig <= conv_std_logic_vector(my_char_v, doesn't work. The FAQ suggests it's possible, and gives some hints, but I still don't get it. Thanks Pete Pete Fraser |
|
|
|
#5 |
|
Posts: n/a
|
Pete Fraser wrote:
> That worked nicely, but I can't work out how to > convert from character to std_logic_vector. function char2std(arg:character) return std_logic_vector is begin return std_logic_vector(to_unsigned(character'pos(arg), end char2std; -- Mike Treseler Mike Treseler |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java read xml file | java_newbie | General Help Related Topics | 1 | 06-04-2009 02:30 AM |
| how to set clock in xilinx test bench | shyams82 | Software | 0 | 09-24-2008 05:51 PM |
| A+ Test is unfair | Scott Davies | A+ Certification | 25 | 02-16-2004 03:18 PM |
| Pioneer A05 Problems | Bill Stock | DVD Video | 8 | 11-28-2003 05:03 AM |
| Re: A+ Test Info (June) | RussS | A+ Certification | 0 | 08-04-2003 01:16 AM |