Active-HDL: all writes to STDOUT are prefixed with "KERNEL:"

B

Brian Davis

Does anyone know how to turn off the "KERNEL:" prefixing that occurs in Active-HDL ( using 9.2 Lattice Edition ) when one writes to STDOUT ?

The closest thing I've found in the documentation is 'printdisplaytasksource', which just makes the prefixed message even more verbose.

I have an existing testbench which writes log messages to STDOUT for later parsing; having this extra "KERNEL:" string prefixed to every write breaks the parser.

i.e., the following VHDL:

write (l, String'("Hello world!"));
writeline (output, l);

Produces:
KERNEL: Hello world!

Instead of the expected:
Hello world!

-Brian
 
H

HT-Lab

Does anyone know how to turn off the "KERNEL:" prefixing that occurs in Active-HDL ( using 9.2 Lattice Edition ) when one writes to STDOUT ?

The closest thing I've found in the documentation is 'printdisplaytasksource', which just makes the prefixed message even more verbose.

I have an existing testbench which writes log messages to STDOUT for later parsing; having this extra "KERNEL:" string prefixed to every write breaks the parser.

i.e., the following VHDL:

write (l, String'("Hello world!"));
writeline (output, l);

Produces:
KERNEL: Hello world!

Instead of the expected:
Hello world!

-Brian

I suspect there must be something as it is quite a basic requirement
(lots of testbenches write log files which are filtered/analysed later on).

On Modelsim you can find the option on the main transcript menu (or use
set PrefMain(LinePrefix) {# } in your script) which shows you how
popular it is.

If there is no option in Aldec then I guess you have to resort to a bit
of good old text filtering.

Good luck,
Hans
www.ht-lab.com
 
B

Brian Davis

Hans said:
On Modelsim you can find the option on the main
transcript menu (or use set PrefMain(LinePrefix) {# }
There is a similar control in Active-HDL, $messageprefix (default = #)
But that controls an additional prefix that shows up only in the GUI console transcript window:

# KERNEL: Hello world!
If there is no option in Aldec then I guess you have
to resort to a bit of good old text filtering.
Yes, I've been using an s/^KERNEL:// preprocessing filter as a workaround.

But it seems rather silly to need this...
I suspect there must be something as it is quite a basic
requirement (lots of testbenches write log files which
are filtered/analysed later on).
I have not been able to find a vsim command line option to disable this.

However, I did finally find a way to turn it off from the GUI:

Turning off Active-HDL message prefix (affects both GUI and command line):
- fire up the Active-HDL GUI
- Tools=>Preferences=>Environment=>Console=>uncheck "Show Message Prefix"

Turning off additional GUI message prefix:
$set messageprefix ""

----------------------
Other notes:

I'm trying to implement a simulator-agnostic testsuite which parses the output logs from a bunch of simulator runs.

Ideally, I would like to turn off this prefix from the command line script that runs the testsuite, without needing user intervention in the GUI.

So far Aldec is the only simulator I've found that corrupts writes to STDOUT.

Also of note, Aldec writes both simulator and program messages both to STDOUT. Other simulators I've checked write their various messages to STDERR, while the VHDL write_line()s go to STDOUT; this lets you redirect the two independently.

Writes to a file are un-corrupted, but I would need to some add file plumbing to my testbench & design.

Somewhat amusingly, opening a (Windows) file named CON: allows writes to STDOUT without the prefix:

file_open(log_file,"CON:",WRITE_MODE);

write (l, String'("Hello world!"));
writeline (log_file, l);

Produces:
Hello world!

-Brian
 
B

Brian Davis

A correction to my earlier post:
However, I did finally find a way to turn it off from the GUI:

Turning off Active-HDL message prefix (affects both GUI and command line):
- fire up the Active-HDL GUI
- Tools=>Preferences=>Environment=>Console=>uncheck "Show Message Prefix"
It turns out that "Show Message Prefix" option works only in the GUI, and does not affect the command line vsim simulator. (When I tested earlier, I must have mistakenly run the test code that was patched for file IO to STDOUT)

I'll stick with the filter workaround for now, and see whether I can open an Aldec support account (when using a free Lattice license) to ask Aldec about this.

-Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top