e95a0c6eac6af1bbd8fe948fc8e769079f82d2e4
[matthijs/master-project/cλash.git] / cλash / CLasH / VHDL / VHDLTypes.hs
1 --
2 -- Some types used by the VHDL module.
3 --
4 {-# LANGUAGE TemplateHaskell #-}
5 module CLasH.VHDL.VHDLTypes where
6
7 -- Standard imports
8 import qualified Control.Monad.Trans.State as State
9 import qualified Data.Map as Map
10 import Data.Accessor
11 import qualified Data.Accessor.Template
12
13 -- GHC API imports
14 import qualified HscTypes
15
16 -- ForSyDe imports
17 import qualified Language.VHDL.AST as AST
18
19 -- Local imports
20
21 -- A description of a port of an entity
22 type Port = (AST.VHDLId, AST.TypeMark)
23
24 -- A description of a VHDL entity. Contains both the entity itself as well as
25 -- info on how to map a haskell value (argument / result) on to the entity's
26 -- ports.
27 data Entity = Entity { 
28   ent_id     :: AST.VHDLId, -- ^ The id of the entity
29   ent_args   :: [Port], -- ^ A port for each non-empty function argument
30   ent_res    :: Maybe Port, -- ^ The output port
31   ent_dec    :: AST.EntityDec -- ^ The complete entity declaration
32 } deriving (Show);
33
34 type Architecture = AST.ArchBody
35
36 -- vim: set ts=8 sw=2 sts=2 expandtab: