Section: Research Program
A declarative design language
Signal [32] , [45] , [39] is a declarative design language using the polychronous model of computation. A process is an infinite loop that consists of the synchronous composition of simultaneous equations over signals named . The restriction of a signal name to a process is noted .
Equations denote processes that define timing relations between input and output signals. There are four primitive combinators in Signal:
-
delay , initially defines the signal by the value and then by the previous value of the signal . The signal and its delayed copy are synchronous: they share the same set of tags . Initially, at , the signal takes the declared value and then, at tag , the value of at tag .
-
sampling , defines by when is true (and both and are present); is present with the value at only if is present with at and if is present at with the value true. When this is the case, one needs to schedule the calculation of and before , as depicted by .
-
merge , defines by when is present and by otherwise. If is absent and present with at then holds . If is present (at or ) then holds its value whether is present (at ) or not (at ).
The structuring element of a Signal specification is a process. A process accepts input signals originating from possibly different clock domains to produce output signals when needed. This allows, for instance, to specify a counter where the inputs tick and reset and the output value have independent clocks. The body of counter consists of one equation that defines the output signal value . Upon the event reset , it sets the count to 0. Otherwise, upon a tick event, it increments the count by referring to the previous value of value and adding 1 to it. Otherwise, if the count is solicited in the context of the counter process (meaning that its clock is active), the counter just returns the previous count without having to obtain a value from the tick and reset signals.
process counter = (? event tick, reset; ! integer value;)
(| value := (0 when reset)
default ((value$ init 0 + 1) when tick)
default (value$ init 0)
|);
A Signal process is a structuring element akin to a hierarchical block diagram. A process may structurally contain sub-processes. A process is a generic structuring element that can be specialized to the timing context of its call. For instance, the definition of a synchronized counter starting from the previous specification consists of its refinement with synchronization. The input tick and reset clocks expected by the process counter are sampled from the boolean input signals tick and reset by using the when tick and when reset †expressions. The count is then synchronized to the inputs by the equation reset ^= tick ^= value .
process synccounter = (? boolean tick, reset; ! integer value;)
(| value := counter (when tick, when reset)
| reset ^= tick ^= value
|);