Guest
Hi,
I want to write some values checked in my testbench into a text file
AND to the Modelsim Message window.
Here is some piece of code
library ieee;
library std;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use std.textio.all;
use ieee.std_logic_textio.all;
....
AUTOCHECKREADDATA: PROCESS(t_Rst_n, t_GmiiClk)
VARIABLE ln : line;
FILE TextFile : text IS OUT "text.txt";
BEGIN
IF t_Rst_n='0' THEN
...
ELSIF rising_edge(t_GmiiClk) THEN
IF t_data2check_valid='1' THEN
IF ((t_data2check_int=0) AND (t_64b_read_out=0)) THEN
write(ln, "Value " & image(t_data2check_int) );
--writeline(OUTPUT, ln); -- Write to Modelsim Message
Window
writeline(TextFile, ln); -- Write to text file
...
How can I write the values to the Modelsim message window AS WELL AS to
the text file ?
Thank you for your help.
P.S.
I get the following warning when compiling my testbench including "
FILE TextFile : text IS OUT "text.txt";"
Rgds
André
I want to write some values checked in my testbench into a text file
AND to the Modelsim Message window.
Here is some piece of code
library ieee;
library std;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use std.textio.all;
use ieee.std_logic_textio.all;
....
AUTOCHECKREADDATA: PROCESS(t_Rst_n, t_GmiiClk)
VARIABLE ln : line;
FILE TextFile : text IS OUT "text.txt";
BEGIN
IF t_Rst_n='0' THEN
...
ELSIF rising_edge(t_GmiiClk) THEN
IF t_data2check_valid='1' THEN
IF ((t_data2check_int=0) AND (t_64b_read_out=0)) THEN
write(ln, "Value " & image(t_data2check_int) );
--writeline(OUTPUT, ln); -- Write to Modelsim Message
Window
writeline(TextFile, ln); -- Write to text file
...
How can I write the values to the Modelsim message window AS WELL AS to
the text file ?
Thank you for your help.
P.S.
I get the following warning when compiling my testbench including "
FILE TextFile : text IS OUT "text.txt";"
Using 1076-1987 syntax for file declaration.
How do I have to declare the TextFile to be 1076-1993 compliant ?
Rgds
André