The arguments block-name, clock-name, and reset-name are symbols. clock-name names the signal on which all the registered signals in block-name change to their next values. The default value of clock-name is block-name-clock.
reset-name names the signal which disables all the registered signals in block-name. Until reset-name deasserts, all the registered signals have their initial values. The default value of reset-name is block-name-reset-.
If reset-name is a list with first element ‘synchronous’, then the reset state is unspecified if no clock is present during reset; and the second element of reset-name otherwise.
Subsequent SIMSYNCH definitions until the next
synch:register-block
will pertain to the block block-name.
Registers the symbol tag as a component of the string device-type. The optional signature argument associates data with tag for use when compiling to firmware, hardware, or microcode.
define-synchronous-system
collects all the signals defined in block-name and defines block-name-sim
to a procedure of one argument, the number of cycles to simulate.When the returned procedure, block-name
-sim
, is called, it sets the queued count for block block-name to the argument if it is larger than that already queued. block-name-sim
then callssimulate!
, which runs a cycle of each non-reset block with queued cycles.
define-synchronous-system
also defmacros block-name to an accessor for all registered signals in block-name:— Macro: <block-name> registered-signal
Returns the value of identifier registered-signal in block <block-name> if that block is running;
eval
of registered-signal's initial-value-expression if <block-name> is reset.The block-name macro provides signal connections between blocks. In addition, the block-name macro provides easy access to simulation state from interactive sessions.
When the simulation is run from an interactive Scheme session, inputting any character will stop the simulation with a breakpoint which can be resumed by
(bk)
.
synch:register-ptag
and synch:register-block
store the
documentation strings specified before them by ‘#;’ or calls
to comment
.