Forum Discussion
Altera_Forum
Honored Contributor
10 years agoUsing textio, there is a default file called OUTPUT that allows you to write to the simulator console.
you can do it one of two ways. 1. Like normal textio, write to a line then write the line to the console:
variable l : line;
write(l, string'("This is some debug text"));
writeline(OUTPUT, l);
or write drictly to output. Heres a nice little wrapper procedure for you.
procedure echo (arg : in string := "") is
begin
std.textio.write(std.textio.output, arg);
end procedure echo;
--echos to console with a newline at the end
procedure echol(arg : in string := "") is
begin
std.textio.write(std.textio.output, arg & LF);
end procedure echol;