forsyde-shallow-3.3.1.0: ForSyDe's Haskell-embedded Domain Specific Language.

Copyright(c) Ingo Sander KTH/ICT/ES ForSyDe-Group
LicenseBSD-style (see the file LICENSE)
Maintainerforsyde-dev@ict.kth.se
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

ForSyDe.Shallow.SDFLib

Contents

Description

SDFLib.hs, yet to be completed.

Synopsis

Combinational Process Constructors

Combinational process constructors are used for processes that do not have a state.

mapSDF :: Int -> Int -> ([a] -> [b]) -> Signal a -> Signal b Source #

The process constructor mapSDF takes the number of consumed (c) and produced (p) tokens and a function f that operates on a list, and results in an SDF-process that takes an input signal and results in an output signal

zipWithSDF :: (Int, Int) -> Int -> ([a] -> [b] -> [c]) -> Signal a -> Signal b -> Signal c Source #

The process constructor zipWithSDF takes a tuple (c1, c2) denoting the number of consumed tokens and an integer p denoting the number of produced tokens and a function f that operates on two lists, and results in an SDF-process that takes two input signals and results in an output signal

zipWith3SDF :: (Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d]) -> Signal a -> Signal b -> Signal c -> Signal d Source #

The process constructor zipWith3SDF takes a tuple (c1, c2, c3) denoting the number of consumed tokens and an integer p denoting the number of produced tokens and a function f that operates on three lists, and results in an SDF-process that takes three input signals and results in an output signal

zipWith4SDF :: (Int, Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d] -> [e]) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e Source #

The process constructor zipWith4SDF takes a tuple (c1, c2, c3, c4) denoting the number of consumed tokens and an integer p denoting the number of produced tokens and a function f that operates on three lists, and results in an SDF-process that takes three input signals and results in an output signal

Sequential Process Constructors

Sequential process constructors are used for processes that have a state. One of the input parameters is the initial state.

delaySDF :: a -> Signal a -> Signal a Source #

The process constructor delaySDF delays the signal one event cycle by introducing an initial value at the beginning of the output signal. Note, that this implies that there is one event (the first) at the output signal that has no corresponding event at the input signal. One could argue that input and output signals are not fully synchronized, even though all input events are synchronous with a corresponding output event. However, this is necessary to initialize feed-back loops.

delaynSDF :: [a] -> Signal a -> Signal a Source #

The process constructor delaynSDF delays the signal n event cycles by introducing n initial values at the beginning of the output signal.

Processes

Processes to unzip a signal of tupels into a tuple of signals

unzipSDF :: (Int, Int) -> Signal ([a], [b]) -> (Signal a, Signal b) Source #

unzip3SDF :: (Int, Int, Int) -> Signal ([a], [b], [c]) -> (Signal a, Signal b, Signal c) Source #

unzip4SDF :: (Int, Int, Int, Int) -> Signal ([a], [b], [c], [d]) -> (Signal a, Signal b, Signal c, Signal d) Source #

Actors

Based on the process constructors in the SDF-MoC, the SDF-library provides SDF-actors with single or multiple inputs

actor11SDF :: Int -> Int -> ([a] -> [b]) -> Signal a -> Signal b Source #

The process constructor actor11SDF constructs an SDF actor with one input and one output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor12SDF :: Int -> (Int, Int) -> ([a] -> [([b], [c])]) -> Signal a -> (Signal b, Signal c) Source #

The process constructor actor12SDF constructs an SDF actor with one input and two output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor13SDF :: Int -> (Int, Int, Int) -> ([a] -> [([b], [c], [d])]) -> Signal a -> (Signal b, Signal c, Signal d) Source #

The process constructor actor13SDF constructs an SDF actor with one input and three output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor14SDF :: Int -> (Int, Int, Int, Int) -> ([a] -> [([b], [c], [d], [e])]) -> Signal a -> (Signal b, Signal c, Signal d, Signal e) Source #

The process constructor actor14SDF constructs an SDF actor with one input and four output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor21SDF :: (Int, Int) -> Int -> ([a] -> [b] -> [c]) -> Signal a -> Signal b -> Signal c Source #

The process constructor actor21SDF constructs an SDF actor with two input and one output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor22SDF :: (Int, Int) -> (Int, Int) -> ([a] -> [b] -> [([c], [d])]) -> Signal a -> Signal b -> (Signal c, Signal d) Source #

The process constructor actor22SDF constructs an SDF actor with two input and two output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor23SDF :: (Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [([c], [d], [e])]) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e) Source #

The process constructor actor23SDF constructs an SDF actor with two input and three output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor24SDF :: (Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [([c], [d], [e], [f])]) -> Signal a -> Signal b -> (Signal c, Signal d, Signal e, Signal f) Source #

The process constructor actor24SDF constructs an SDF actor with two input and four output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor31SDF :: (Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d]) -> Signal a -> Signal b -> Signal c -> Signal d Source #

The process constructor actor31SDF constructs an SDF actor with three input and one output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor32SDF :: (Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> [([d], [e])]) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e) Source #

The process constructor actor32SDF constructs an SDF actor with three input and two output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor33SDF :: (Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> [([d], [e], [f])]) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f) Source #

The process constructor actor33SDF constructs an SDF actor with three input and three output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor34SDF :: (Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> [([d], [e], [f], [g])]) -> Signal a -> Signal b -> Signal c -> (Signal d, Signal e, Signal f, Signal g) Source #

The process constructor actor34SDF constructs an SDF actor with three input and four output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor41SDF :: (Int, Int, Int, Int) -> Int -> ([a] -> [b] -> [c] -> [d] -> [e]) -> Signal a -> Signal b -> Signal c -> Signal d -> Signal e Source #

The process constructor actor41SDF constructs an SDF actor with four input and one output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor42SDF :: (Int, Int, Int, Int) -> (Int, Int) -> ([a] -> [b] -> [c] -> [d] -> [([e], [f])]) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f) Source #

The process constructor actor42SDF constructs an SDF actor with four input and two output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor43SDF :: (Int, Int, Int, Int) -> (Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> [([e], [f], [g])]) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g) Source #

The process constructor actor43SDF constructs an SDF actor with four input and three output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.

actor44SDF :: (Int, Int, Int, Int) -> (Int, Int, Int, Int) -> ([a] -> [b] -> [c] -> [d] -> [([e], [f], [g], [h])]) -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal e, Signal f, Signal g, Signal h) Source #

The process constructor actor14SDF constructs an SDF actor with four input and four output signals. For each input or output signal, the process constructor takes the number of consumed and produced tokens and the function of the actor as arguments.