rohd
rohd copied to clipboard
Simulator optimization: don't simulate signals that don't matter (optionally)
Motivation
Much of the time, only signals that are actively being listened to or outputs of a module are the only things that matter for an accurate functional simulation. This isn't always the case, though. It would be nice to optionally be able to set the simulation to only propagate values updates to signals that do "matter".
Desired solution
One possible solution:
- At
build
time of a Module, optionally accept a flag to enable the feature for that module and all submodules - Initialize all signals to not propagate values
- Trace from all outputs of the top level module and only re-enable propagation for all those signals that impact the output.
- Any time a signal is listened to (e.g.
changed
orglitch
), re-enable that signal and all (recursively) drivers of that signal - Any time a
value
is accessed on a disabled signal, flag an error that the value may be incorrect due to this optimization
For some designs, this might not help much, but for others it may represent a significant speed-up in simulation time.
Alternatives considered
No response
Additional details
No response