OSVVM / OSVVM-Scripts

OSVVM project simulation scripts. Scripts are tedious. These scripts simplify the steps to compile your project for simulation
Other
8 stars 13 forks source link

Lots of HTML text snippets are printed to the CI console #22

Closed Paebbels closed 1 year ago

Paebbels commented 2 years ago

OSVVM-Scripts writes lots of HTML tags to the CI console.

Tags:

Example log:
image

JimLewis commented 2 years ago

When generating HTML log files, this happens in any simulator. What goes into the console matches what goes in the log file. I have tried to minimize it, however, the value of the html log files far exceeds this annoying side effect.

With an html based log files, I can actually browse a 140K line log file, find the test I want and expand into it. With search it is faster. Browsing a text based log file is futile. Going further, by dropping a reference tag, the detailed test reports are able to quickly find the simulation results for a test in seconds by clicking a link.

WRT GHDL though, unfortunately the HTML reports are not working yet. In your LocalScriptDefaults.tcl, you can turn it off for GHDL if you like.

Paebbels commented 2 years ago

I suspect messages printed to console are puts in TCL that were not directed to the opened file handler.

It's not about the HTML reporting, which is great. It's a bug in TCL were write operations have the wrong target.

Paebbels commented 2 years ago

It's caused by EchoOsvvmCmd in OsvvmProjectScripts.tcl.
The outputs of puts are not directed to a file, but to STDOUT.

Moreover it looks like else is missing in between } {

  if {[info exists CompoundCommand] || ($TranscriptExtension eq "log")} {
    puts "${CmdInfoToPrint}"
  } elseif {[info exists FirstEchoCmd]} {
    puts "</details><details>"
    puts "<summary>${CmdInfoToPrint}</summary>"

#    puts "</details><details><summary>${CmdInfoToPrint}</summary>"
  } {
    puts "<pre><details>"
    puts "<summary>${CmdInfoToPrint}</summary>"
#    puts "<pre><details><summary>${CmdInfoToPrint}</summary>"
    set FirstEchoCmd TRUE
  }
JimLewis commented 2 years ago

In the current implementation, the tools own transcript capability is used to generate the reports, so this is unavoidable.

However, the current implementation is problematic in GHDL, VCS, and Xcelium to name a few. We will use this in the future when we replace the current scheme.

JimLewis commented 2 years ago

I am looking at this now. I have a prototype that will work for some simulators. I was hoping it was general, however, for QuestaSim/ModelSim, it appears their console output goes out via a channel that is not available to TCL for redirection. Maybe there is a work around for this. I will have to look. It is taking a crazy amount of time though.

With the prototype, I should be able to do a better job for the likes of GHDL and for any tool that uses stdout.

RivieraPRO also has some interesting issues with the stdout redirect. It seems to be doing block IO and when that gets redirected, it corrupts the stream of output for some reason. Really odd.

If anyone who is good at TCL wants to help, I am interested in help on this.

JimLewis commented 1 year ago

An update to address this has been pushed to Dev. Log files are now always created as a plain text format. HTML and other files are generated after a simulation completes.