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.

What is the chief difference in using REPORT\WRITE function in VHDL?

Status
Not open for further replies.

xtcx

Advanced Member level 1
Joined
Dec 22, 2007
Messages
493
Helped
65
Reputation
130
Reaction score
58
Trophy points
1,308
Location
Bangalore, India
Activity points
5,003
I hope my doubt is so basic, but still have this confusion. Where "Report" shall be used and where "write" function shall be used in VHDL simulation?.

I see almost both doing same print screen, except report tells you the sim time....

Thanks
 

report always reports to the sim console. and can control simulation (with failures or errors etc)
write writes to any file.
 
  • Like
Reactions: xtcx

    xtcx

    Points: 2
    Helpful Answer Positive Rating
Yes, agreed. But controlling simulation is based on Assert and severity statements rite, why report comes into picture?. Write fn can also be used to print screen right?.
 

Assert doesnt have to be used to control the simulation. You can halt simulation via event starvation (eg. stopping the clock). Asserts should be used to make sure stuff works properly. Also report doesnt have to be used with an assert. It can be used on its own:

Code:
if something_happened then
  report "Something happened" severity note;
end if;

the write function has no severity levels, and can only write to files. Luckily, textio defines two files INPUT and OUTPUT that read/write to the simulator command line. You can also read/write to text files to create logs.
 
  • Like
Reactions: xtcx

    xtcx

    Points: 2
    Helpful Answer Positive Rating
Thanks, I esp found in Xilinx TB for Serial RAPID IO, the write function used exclusively as a procedure and called in many placed for printing on simulator screen. I too have used report to print on simulator screens and write fn to write to a file till date but this is the 1st time I'm seeing "Write" fn used for screen printing....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top