pulp-platform / riscv-dbg

RISC-V Debug Support for our PULP RISC-V Cores
Other
218 stars 72 forks source link

Change `unique case inside` to `unique case` #150

Closed andreaskurth closed 1 year ago

andreaskurth commented 1 year ago

VCS cannot handle a range in case inside constructs when X propagation instrumentation is enabled. To avoid problems with this incompatibility, this commit converts ranges to unique if clauses with two non-strict inequality operators joined by a logical AND, moves them to the default section, and removes inside from unique case. The resulting code is equivalent for synthesis purposes.

Tested with block-level DV in OpenTitan (see lowRISC/opentitan#17310).

andreaskurth commented 1 year ago

Unfortunately unique if is not supported by VCS Xprop instrumentation either. Without unique, the if .. else .. chains would encode a priority, which is semantically different from the previous code. This would (or at least could) lead to different and potentially worse synthesis results.

After feedback by @bluewww, I agree it would be unreasonable to accept potentially worse synthesis results to accommodate a limitation of one specific feature of one simulator. I'm thus closing this PR. A separate PR to disable Xprop instrumentation with attributes for the affected processes will follow.