FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2005, 09:54 PM
Carson
Guest
 
Posts: n/a
Default How to print std_logic_vector variable into hex string in VHDL

Hi,

How to print std_logic_vector variable into hex string in VHDL?

Thanks,

Carson

Reply With Quote
  #2 (permalink)  
Old 08-31-2005, 11:06 PM
Niv
Guest
 
Posts: n/a
Default Re: How to print std_logic_vector variable into hex string in VHDL


> How to print std_logic_vector variable into hex string in VHDL?
>


Forgotten the exact syntax & textbook not to hand, but something like:

use std.textio

and then use:

HWRITE (myline, signame);
WRITELINE (myfile, myline);
where signame is your std_log_vec.

Niv.


Reply With Quote
  #3 (permalink)  
Old 09-01-2005, 12:51 AM
Mike Treseler
Guest
 
Posts: n/a
Default Re: How to print std_logic_vector variable into hex string in VHDL

Carson wrote:

> How to print std_logic_vector variable into hex string in VHDL?


Here's one way:
http://home.comcast.net/~mike_treseler/print_vec.vhd

-- Mike Treseler
Reply With Quote
  #4 (permalink)  
Old 09-01-2005, 01:20 AM
Carson
Guest
 
Posts: n/a
Default Re: How to print std_logic_vector variable into hex string in VHDL

Thanks,

Is there any command like "report integer'image(myvalue)"; so that it
will print out hex?

Reply With Quote
  #5 (permalink)  
Old 09-01-2005, 04:59 AM
David Bishop
Guest
 
Posts: n/a
Default Re: How to print std_logic_vector variable into hex string in VHDL

Mike Treseler wrote:
> Carson wrote:
>
>> How to print std_logic_vector variable into hex string in VHDL?

>
>
> Here's one way:
> http://home.comcast.net/~mike_treseler/print_vec.vhd


Here's another:

http://www.eda.org/vhdl-200x/vhdl-20..._additions.vhd

The function is called "to_hstring", it works like this:

report "The string was " & to_hstring (slvec)

There is also a "to_string" and "to_ostring" function in this package,
which containts all of the additions we plan to make to std_logic_1164
in VHDL-2006.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
to view vhdl variable with gtkwave [email protected] FPGA 3 03-19-2008 10:20 AM
pass value from system verilog to VHDL (std_logic_vector) sundar Verilog 2 11-27-2007 10:53 AM
VHDL Variable Length Input file. ted FPGA 1 12-06-2006 09:50 PM
VHDL variable setup and propogations Matt FPGA 1 07-02-2003 09:55 AM


All times are GMT +1. The time now is 03:44 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved