Open mczyz-antmicro opened 8 months ago
I presume fatal is expected to terminate the simulation/evaluation?
The fatal/error/info levels also matches the Google C++ logging library levels (and others I presume). Numeric verbosity levels in trace statements could correspond to VLOGging.
@grebe added verbosity levels to trace statements in the IR. These should be surfaced in the DSLX. That could be the initial step.
A follow on could add fatal/error/info functionality.
Yes, fatal should terminate evaluation
NB That the IR already supports verbosity levels in trace_fmt! but this isn't exposed to DSLX. Having support for this would be nice.
$fatal
,$error
,$warning
,$info
(c.f. IEEE Standard for SystemVerilog 1800-2017 Chapter 20.10 Severity tasks) and I feel that creating corresponding functions, e.g.$fatal
->fatal!
would be intuitive and improve output readability. Here is an example, where code is significantly reduced:I believe that this functionality is already implemented in the IR.
I also think that DSLX needs verbosity levels for the
trace
and/ortrace_fmt!
function. The implementation could define functions, which derive from existingtrace_fmt!()
function:trace_fmt_log!()
,trace_fmt_warn!()
,trace_fmt_err!()
. This feature is useful for DSLX module development - if I run multiple tests, the output quickly becomes cluttered. The function prototypes could also use a global enum for the verbosity level, i.e.trace_fmt!(DSLX_WARN, "Warning message")
.I wish I could set a hierarchy level of traces, e.g. if I am debugging state of the top-level proc, then I would like to suppress output from 2nd level and following children of the top-level, but use traces from all 1st level children. This feature could work like a filter, e.g.
--set_trace_enable_level = 1
or by selecting proc names:--set_trace_enable_name proc_name_*
Related issues
Issues related to this one: