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
hi, I have used print statement many times, but never understood how it works or what the code actually means. Can somebody explain a little in detail?
This code is provided in one of the Xilinx testbench file
I can see two functions write and writeline (for which I could not see the declaration, may be is it in textio lib?)
Anyway what is the difference and what is the data type "line" mean here an why is print time set to false
Your help is appreciated!....
Thanks...
This code is provided in one of the Xilinx testbench file
Code:
package rapidio_lib is
--=======================================
-- Printl
-- OPERATION: print a string to the display
--=======================================
procedure printf(
S : string;
PRINT_TIME : boolean := FALSE
) is
variable screen : line;
begin
if (PRINT_TIME) then
write(screen, NOW);
end if;
write(screen, S);
writeline(output, screen);
end procedure;
I can see two functions write and writeline (for which I could not see the declaration, may be is it in textio lib?)
Anyway what is the difference and what is the data type "line" mean here an why is print time set to false
Your help is appreciated!....
Thanks...