Site Search

Intel: Using the $fdisplay system task to output messages to a file during simulation. Is there a way to write to a file and at the same time print the same message to the console?

<Message>
$fdisplay(CPU_Log, "Hello CPU"); //This will only output to a file

Category: Simulation
Tools: ModelSim®
device:-


It can be realized with the following description.

integer logfile, broadcast;
[…]
logfile = $fopen("foo.log");
broadcast = 1 | logfile;
$fdisplay(broadcast, "Hello CPU");

In this description, in the console
Hello CPU
and at the same time in the foo.log file
Hello CPU
will be written out.

Experienced FAE
Free consultation is available.

From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.