Simulator optimization: don't simulate signals that don't matter (optionally)
- Dominant language
- Dart
- Stars
- 489
- Forks
- 88
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 10
Description
### 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` or `glitch`), 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_
Contributor guide
Assessment
This issue has not been assessed yet.