Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Re: Writing Hex values to file in VHDL?

Reply
Thread Tools

Re: Writing Hex values to file in VHDL?

 
 
he
Guest
Posts: n/a
 
      03-23-2010
Pete Fraser schrieb:
> I'm trying to dump eight hex values per line
> into a file, and can't work out how to do it.
>
> for index in 0 to 127 loop
> for sample_sel in 0 to 7 loop
> sample_val := integer(scale * sin(phase(sample_sel)));
> write ( sample_line, sample_val, RIGHT, 10);
> phase(sample_sel) := phase(sample_sel) + phase_inc(sample_sel);
> end loop;
> writeline ( ip_dat, sample_line );
> end loop;
>
> does what I want, but with decimal values.
>
> If I change to:
> hwrite ( sample_line, sample_val, RIGHT, 10);
> or:
> write ( sample_line, to_hstring(sample_val), RIGHT, 10);
> it doesn't compile.
>
> Any thoughts?
>
> Thanks
>
> Pete
>
>
>
>


which textio-library are you using? if i remember correctly,
hread/hwrite can only be used with ieee.std_logic_textio.all;

hth
he
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Writing Hex values to file in VHDL? Magne Munkejord VHDL 1 03-23-2010 12:43 PM
Re: Writing Hex values to file in VHDL? Tricky VHDL 0 03-23-2010 09:28 AM
Re: Writing Hex values to file in VHDL? backhus VHDL 0 03-23-2010 06:37 AM
Hex Color Codes - Hex 6 <=> Hex 3 lucanos@gmail.com HTML 10 08-18-2005 11:21 PM
hex(-5) => Futurewarning: ugh, can't we have a better hex than '-'[:n<0]+hex(abs(n)) ?? Bengt Richter Python 6 08-19-2003 07:33 AM



Advertisments