Many rules in the Dfg Peephole pass check if a node has more than one
sinks. Redundant variables that will ultimately be removed can prevent
these from matching. Remove such variables during the Peeophole pass
itself to enable more matches.
When randc enum variables have user constraints, they go through the
SMT solver path which treats them as unconstrained bitvectors. This
adds implicit enum membership constraints so the solver only produces
valid enum member values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When enum variables (rand or randc) are referenced in user constraints,
the constraint solver declares them as unconstrained bitvectors, which
can produce values outside the valid enum range. Add implicit membership
constraints to restrict solver output to valid enum members
(IEEE 1800-2017 §18.4.2).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This is an attempt to generate an identical trace file scope hierarchy
both with and without -fno-inline. Primarily because it's needed for
testing in upcoming patch, but also improves consitency prior to #7001
Add a new Dfg pass 'pushDownSel'. This will try to move selects through
a tree of concatenations in order to eliminate temporary nodes holding
intermediate concatenation results. This can get rid of a lot of
variables when packed arrays are assigned in parts (e.g. bit-wise).
We use special C++ types for ports, e.g. SystemC types in --sc mode, and native C arrays for unpacked arrays in --cc mode. These types are not substitutable for internal types, e.g. VlUnpacked, however all the runtime primitives expect internal types.
I think the intention was to use these special IO types only for top level ports, but the current implementation also uses them for the ports of all non-inlined modules. This means the output C++ will not compile if such a port is passed to a runtime primitive (e.g. array 'sort' as in the new test) or DPI import.
Changed to use the special IO types only on the top level ports.
Note these are likely still broken if attempting to invoke on a top level port (we might be saved by wrapTop, but later optimizations might eliminate the intermediary)