atom-0.0.4: A DSL for embedded hard realtime applications.

Language.Atom.Elaboration

Contents

Synopsis

Atom monad and container.

data Atom a Source

The Atom monad holds variable and rule declarations.

Instances

data AtomDB Source

Constructors

AtomDB 

Fields

atomId :: Int
 
atomName :: Name
 
atomNames :: [Name]
 
atomEnable :: UE
 
atomSubs :: [AtomDB]
 
atomPeriod :: Int
 
atomAssigns :: [(UV, UE)]
 
atomActions :: [([String] -> String, [UE])]
 

Instances

data Global Source

Constructors

Global 

Fields

gId :: Int
 
gProbes :: [(String, Type, E Word64)]
 
gInit8 :: [Const]
 
gInit16 :: [Const]
 
gInit32 :: [Const]
 
gInit64 :: [Const]
 
gPeriod :: Int
 

data Rule Source

Constructors

Rule 

Fields

ruleId :: Int
 
ruleName :: Name
 
ruleEnable :: UE
 
ruleAssigns :: [(UV, UE)]
 
ruleActions :: [([String] -> String, [UE])]
 
rulePeriod :: Int
 

Instances

Type Aliases and Utilities

type UID = IntSource

type Name = StringSource

A name.

type Path = [Name]Source

A heirarchical name.

elaborate :: Name -> Atom () -> IO (Maybe ([Rule], ([Const], [Const], [Const], [Const])))Source

A Relation is used for relative performance constraints between Actions. data Relation = Higher UID | Lower UID deriving (Show, Eq)

Given a top level name and design, elabortes design and returns a design database.

var :: Expr a => Name -> a -> Atom (V a)Source

Generic local variable declaration.

var' :: Name -> Type -> Atom (V a)Source

Generic external variable declaration.

array :: Expr a => Name -> [a] -> Atom (A a)Source

Generic array declaration.