rohd icon indicating copy to clipboard operation
rohd copied to clipboard

Add optional source annotation in generated outputs

Open mkorbel1 opened this issue 10 months ago • 0 comments
trafficstars

Motivation

Information about the original Dart source code that generates some output (e.g. SystemVerilog) could theoretically be extracted during construction and annotated in the result, for example using StackTrace. This type of information could be valuable for debug and mapping of generated outputs back to their original ROHD representation.

Desired solution

Add a way to annotate generated outputs with the original source code line in Dart.

Alternatives considered

No response

Additional details

The StackTrace functionality in Dart should be helpful here, but it might be tricky to figure out which lines in a trace are useful/relevant and which trace is most relevant to a generated line of verilog, since many pieces of code may contribute.

mkorbel1 avatar Jan 15 '25 20:01 mkorbel1