Skip to content

simulation: Replace the current timer-based system for Component Updates with a notification-based system that only updates components when an input changes #109

Description

@d-khalid

What to change

  • The current system for updating the outputs of components. It uses a dispatcher timer that updates every component and wire every after X amount of time. It is to be replaced with a different approach, each component updates (runs its ComputeOutput() ) if there is a change in the value held by one of its inputs.

Why does it need to change

  • The current approach wastes compute on recomputing outputs on the exact same set of inputs. It also creates timing issues with clocks, for example there can be cases where the circuit updates happen only on the low part of a clock pulse, creating unintended behaviour making the clock act as a constant low signal

Contributing

If you want to get this issue assigned to you. Just comment I want to work on this issue. You will be assigned to the issue instantly via GitHub-actions bot.

Also please use IDE-integrated LLMs responsibly. LLMs output low quality code (redundant, not clean, not scalable and so on) and such PRs will be turned down without warning.

Metadata

Metadata

Assignees

Labels

backendlogical, difficult workchangechange in existing feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions