Go to the first, previous, next, last section, table of contents.


Blocks and Chips

Function: synch:register-block block-name
Function: synch:register-block block-name clock-name
Function: synch:register-block block-name clock-name reset-name
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-.

Subsequent SIMSYNCH definitions until the next synch:register-block will pertain to the block block-name.

Function: synch:register-ptag tag device-type
Function: synch:register-ptag tag device-type signature
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.

Macro: define-synchronous-system block-name ... body
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 calls simulate!, 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).


Go to the first, previous, next, last section, table of contents.