AnsweredAssumed Answered

Problem in running textio example

Question asked by joniengr081 on Jul 11, 2018

Hi, I an struggling to run textio example in the testbench. I added the textio package as shown below.  

 

USE IEEE.STD_LOGIC_TEXTIO.ALL;

USE STD.TEXTIO.ALL;

 

In the testbench I add the following process which should print time and the value of two integers in a file "output_file".

 

  process

   variable wrbuf   : line;

   file output_file : TEXT open WRITE_MODE is "STD_OUTPUT";

  begin

        write(wrbuf, string'("Time: ")); write(wrbuf, now);

        write(wrbuf, string'("; lfsr_1: ")); write(wrbuf, conv_integer(1));

        write(wrbuf, string'("; lfsr_2: ")); write(wrbuf, conv_integer(2));

        writeline(output_file, wrbuf);

  wait;

  end process;

 

There is no error in simulation. It print the following in the transcript of Questa but where to find the file "output_file" ? Or how to save the transcript of Questa in a file ? 

 

# Time: 0 ns; lfsr_1: 1; lfsr_2: 2

Outcomes