The-OpenROAD-Project / OpenROAD-flow-scripts

OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
https://theopenroadproject.org/
Other
342 stars 290 forks source link

synthesis: improve error messages #2375

Closed oharboe closed 1 month ago

oharboe commented 1 month ago

YOSYS_FLAGS=-v 3 will silence error messages, such as the below.

However, without this option, synthesis will give an enormous amount of output.

Fortunately, the most common error messages, like unknown top module, is shown during canonicalization and not specifying -v 3 doesn't increase the logging noise noticably during the canonicalization stage.

To test:

  1. modify gcd.v to rename "gcd" module to "gcdxxx"
  2. Run "make synth"

Now it fails with a helpful error message

[deleted]

  1. Executing HIERARCHY pass (managing design hierarchy). ERROR: Module `gcd' not found! ERROR: TCL interpreter returned an error: Yosys command produced an error Command exited with non-zero status 1
maliberty commented 1 month ago

@povik Is this the best solution? No value for -v seems to recover this message.

povik commented 1 month ago

There are two kinds of errors in Yosys: recoverable, which will throw you back to the prompt in an interactive session, and non-recoverable, which will exit the process. The first appear to be silenced under -v 3, which I don't think we want. I will write a patch.

maliberty commented 1 month ago

@oharboe can you wait for the next yosys update cycle or do you need this as a stop-gap?

oharboe commented 1 month ago

It is easily reverted, isnt it? This way I can forget all about it :-)

povik commented 1 month ago

The patch is up