pc2 / sus-compiler

A new Hardware Design Language that keeps you in the driver's seat
GNU General Public License v3.0
70 stars 4 forks source link

Acrions, triggers, and queries #14

Open VonTum opened 1 month ago

VonTum commented 1 month ago

This ties together with Conditional Bindings

Basically, actions, triggers and queries form a natural way to "act" or "respond to" events that submodules create. The natural implementation is adding an extra "invisible" condition wire, that is "1" when the action needs to be triggered (and thereby the associated data is valid).

Actions are triggered by the parent module. They tell the submodule to do something Triggers are signals sent by a submodule. They tell the parent module to do something Queries are initiated by the parent module, they're basically an action, that is fallible. So the response from the submodule is conditional.

image