Let mkCompInsSm look up the actual VHDL entity id.
[matthijs/master-project/cλash.git] / VHDLTypes.hs
1 --
2 -- Some types used by the VHDL module.
3 --
4 module VHDLTypes where
5
6 import qualified ForSyDe.Backend.VHDL.AST as AST
7
8 import FlattenTypes
9
10 type VHDLSignalMap = SignalMap (AST.VHDLId, AST.TypeMark)
11
12 -- A description of a VHDL entity. Contains both the entity itself as well as
13 -- info on how to map a haskell value (argument / result) on to the entity's
14 -- ports.
15 data Entity = Entity {
16   ent_id     :: AST.VHDLId,           -- The id of the entity
17   ent_args   :: [VHDLSignalMap],      -- A mapping of each function argument to port names
18   ent_res    :: VHDLSignalMap,        -- A mapping of the function result to port names
19   ent_decl   :: Maybe AST.EntityDec   -- The actual entity declaration. Can be empty for builtin functions.
20 }