Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to print an integer in VHDL

Status
Not open for further replies.

raghava

Member level 2
Joined
Jul 31, 2008
Messages
51
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,870
HI all,

How to print an integer in VHDL.

I am using following syntax.

report "Number of cycles taken = " & count_cycle;


Its giving error.

Can anybody correct it.

Regards

Added after 1 minutes:

Here count_cycle is variable.
 

dmk

Full Member level 3
Joined
Nov 14, 2005
Messages
187
Helped
44
Reputation
88
Reaction score
7
Trophy points
1,298
Location
Bg
Activity points
2,210
I am afraid the message you type can be text only.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
49,153
Helped
14,388
Reputation
29,040
Reaction score
13,142
Trophy points
1,393
Location
Bochum, Germany
Activity points
283,291
You're apparently refering to VHDL simulation. You should be able to find respective string conversion routines in textio package.

P.S.: I see, that report uses a generic STRING type argument, while textio.write uses the derived LINE type. It's not clear to me,
if they can be made compatible. Otherwise I would consult the simulator's user guide for suggestions.
 

raghava

Member level 2
Joined
Jul 31, 2008
Messages
51
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,870
HI Fvm,

Thanks for your answer.

In verilog we have $display("%d", 6);

In the same way how should I print in VHDL.
Here I have to print some variable which is stored with some integer value.


Regards
 

raghava

Member level 2
Joined
Jul 31, 2008
Messages
51
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,870
HI Amar Ali and Frankliner,

Thanks for your answers. I am in desperate to know the syntax as I am in urgency.

Thanks for your answers.


Regards

Added after 3 hours 28 minutes:

HI all,

This syntax is working.

report "Number of cycles taken = " & integer'image(count_cycle);


even write() is also working.


Regards,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top