copilot-0.22: A stream DSL for writing embedded C.Source codeContentsIndex
Language.Copilot.Interface
Description
Used by the end-user to easily give its arguments to dispatch.
Synopsis
data Options
baseOpts :: Options
test :: Int -> Options -> IO ()
interpret :: Streams -> Int -> Options -> IO ()
compile :: Streams -> Name -> Options -> IO ()
verify :: FilePath -> IO ()
interface :: Options -> IO ()
help :: IO ()
setS :: DistributedStreams -> Options -> Options
setE :: Vars -> Options -> Options
setC :: String -> Options -> Options
setO :: Name -> Options -> Options
setP :: Period -> Options -> Options
setI :: Options -> Options
setPP :: (String, String) -> Options -> Options
setN :: Int -> Options -> Options
setV :: Verbose -> Options -> Options
setR :: Int -> Options -> Options
setDir :: String -> Options -> Options
setGCC :: String -> Options -> Options
setTriggers :: [(Var, String)] -> Options -> Options
module Language.Copilot.Dispatch
Documentation
data Options
baseOpts :: Options
test :: Int -> Options -> IO ()
interpret :: Streams -> Int -> Options -> IO ()
compile :: Streams -> Name -> Options -> IO ()
verify :: FilePath -> IO ()
interface :: Options -> IO ()
The main function
help :: IO ()
setS :: DistributedStreams -> Options -> Options
setE :: Vars -> Options -> Options

Sets the environment for simulation by giving a mapping of external variables to lists of values. E.g.,

 setE (emptySM {w32Map = fromList [("ext", [0,1..])]}) ...

sets the external variable names ext to take the natural numbers, up to the limit of Word32.

setC :: String -> Options -> Options

Sets the options for the compiler, e.g.,

 setC "-O2" ...

Sets gcc options.

setO :: Name -> Options -> Options
setP :: Period -> Options -> Options

Manually set the period for the program. Otherwise, the minimum required period is computed automatically. E.g.,

setP 100 ... sets the period to be 100. The period must be at least 1.

setI :: Options -> Options
setPP :: (String, String) -> Options -> Options
Sets the code to precede and follow the copilot specification If nothing, then code appropriate for communication with the interpreter is generated
setN :: Int -> Options -> Options

Sets the number of iterations of the program to simulation:

setN 50 simulations the program for 50 steps.

setV :: Verbose -> Options -> Options
Set the verbosity level.
setR :: Int -> Options -> Options
setDir :: String -> Options -> Options
Sets the directory into which the output of compiled programs should be placed. If the directory does not exist, it will be created.
setGCC :: String -> Options -> Options
Sets the compiler to use, given as a path to the executable. The default is "gcc".
setTriggers :: [(Var, String)] -> Options -> Options
Give C function triggers for Copilot Boolean streams. The tiggers fire if the stream becoms true.
module Language.Copilot.Dispatch
Produced by Haddock version 2.6.1