Continue to Site

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 display text in vhdl?

Status
Not open for further replies.

sandy.vb

Newbie level 5
Joined
Mar 3, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,339
hi all

just like we have the $display command in verilog, i wanted to know if there is something in vhdl also which can serve the same purpose. I'm aware of the 'report' statement, however the problem with the 'report' statement is that it can't be used outside of the process statement. I'm specifically looking for something that we can use outside of the process statement.

thanks in advance.
sandesh
 

Pretty sure we can only use '$display' inside always/initial/task/function, etc...

You can use 'report' in other places, like procedures, functions, etc.

Where else would you want to use $display or 'report'?
 

You can use the report
report "End of file " & ControlFile_g & " Pseudo random Transactions" severity Note;

But you can also use the textio
Example (from old code)
use Work.Image_pkg.all; // Useful package
// see https://web.archive.org/web/20070204123448/members.aol.com/vhdlcohen/vhdl/Models.html

file LogFile_f : text open write_mode is "uartsim.log"; -- simulation log file
file ErrFile_f : text open write_mode is "uarterr.log"; -- error log file
variable L_v : Line;

Write(L_v, Image(now) & "Uart_client detected error in XMT Err bit. ");
Write(L_v, "Observed PIR = " & Image(ServerData.Data(5 downto 0)) &
"Resetting XMT side");
Lfault_v := new String'(L_v.all); -- make copy
Writeline(output, L_v); -- write to output
Writeline(ErrFile_f, Lfault_v);
--------------------------------------------------------------------------
Ben Cohen (831) 345-1759
https://www.systemverilog.us/ ben@systemverilog.us
* SystemVerilog Assertions Handbook, 2nd Edition, 2010 ISBN 878-0-9705394-8-7
* A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
* Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
* Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
* Component Design by Example, 2001 ISBN 0-9705394-0-1
* VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
* VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115
--------------------------------------------------------------------------
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top