Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tools:chp2prs [2025/10/14 02:47] – [External Constants] karthi | tools:chp2prs [2025/11/04 03:06] (current) – [External Constants] karthi | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| i.e. a (possibly empty) semi-colon separated list of initializations to a subset of variables used in the CHP, followed by an infinite repetition of an arbitrary CHP program P. The values '' | i.e. a (possibly empty) semi-colon separated list of initializations to a subset of variables used in the CHP, followed by an infinite repetition of an arbitrary CHP program P. The values '' | ||
| + | |||
| + | ===== Synthesis Commands ===== | ||
| + | The standard synthesis steps to produce a bundled-data circuit looks like this: | ||
| + | < | ||
| + | synth2 -F decomp -p proc -o mid.act in.act | ||
| + | synth2 -F ring -ref=1 -C bd -p decomp_proc -o out.act mid.act | ||
| + | </ | ||
| + | You can then simulate at PRS-level with: | ||
| + | < | ||
| + | actsim -ref=2 out.act ring_decomp_proc | ||
| + | </ | ||
| + | |||
| + | Note that user-defined channel-types are not allowed for synthesis. Only the built-in '' | ||
| + | If your CHP has no nested loops or multiple-channel accesses (more about this below), then you can (optionally) skip the first step and directly do: | ||
| + | < | ||
| + | synth2 -F ring -C bd -p proc -o out.act in.act | ||
| + | </ | ||
| + | and simulate at PRS-level with: | ||
| + | < | ||
| + | actsim -ref=1 out.act ring_proc | ||
| + | </ | ||
| + | |||
| + | This two-step process will soon be integrated into one command (TODO). To know more about what the '' | ||
| ===== Program Structure ===== | ===== Program Structure ===== | ||
| Line 74: | Line 97: | ||
| < | < | ||
| - | [ c -> y: | + | [ c -> y: |
| []else -> y:=0 | []else -> y:=0 | ||
| ] | ] | ||
| Line 164: | Line 187: | ||
| Maelstrom allows Booleans as input ports to any process to facilitate chip-level configuration bits. These booleans are assumed to be constant for the entire runtime of the circuit, i.e. these are set to a certain value before or during chip reset and never changed after that. Hence, these Booleans are also not latched, the values on the wires are used directly as if they are logical constants, such as '' | Maelstrom allows Booleans as input ports to any process to facilitate chip-level configuration bits. These booleans are assumed to be constant for the entire runtime of the circuit, i.e. these are set to a certain value before or during chip reset and never changed after that. Hence, these Booleans are also not latched, the values on the wires are used directly as if they are logical constants, such as '' | ||
| - | These are useful for global configuration. For example, consider a neuromorphic core where all the state-update | + | These are useful for global configuration. For example, consider a neuromorphic core where the state-update |
| < | < | ||
| - | defproc neuron ( ... , bool model_select | + | defproc neuron ( ... ; bool model[2] |
| { | { | ||
| ... | ... | ||
| chp | chp | ||
| { | { | ||
| - | *[ | + | *[ |
| ... | ... | ||
| - | [ | + | [ ~model[0] & ~model[1] |
| - | []~model_select | + | []~model[0] & model[1] -> state := aif(state) |
| + | [] model[0] & ~model[1] -> state := hodg_hux(state) | ||
| + | [] model[0] & model[1] | ||
| ]; | ]; | ||
| ... | ... | ||
| Line 181: | Line 206: | ||
| } | } | ||
| } | } | ||
| - | |||
| </ | </ | ||