Copyright | (C) 2015, University of Twente |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
- data TopEntity = TopEntity {}
- data ClockSource = ClockSource {}
- data ClockPath = ClockPath {}
- data Clock = Clk {}
- generateTopEnt :: String -> IO (Maybe TopEntity)
- mkTopWrapper :: PrimMap -> Maybe TopEntity -> Component -> Component
- extraIn :: Maybe TopEntity -> [(Identifier, HWType)]
- extraOut :: Maybe TopEntity -> [(Identifier, HWType)]
- mkInput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier)))
- mkVectorChain :: Int -> HWType -> [Identifier] -> Expr
- mkOutput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier)))
- mkClocks :: PrimMap -> [(Identifier, HWType)] -> Maybe TopEntity -> [Declaration]
- mkClock :: ClockSource -> ([Declaration], (Identifier, [Clock], Bool))
- clockPorts :: ClockPath -> ([(Identifier, Expr)], [Clock])
- mkResets :: PrimMap -> [(Identifier, HWType)] -> [(Identifier, [Clock], Bool)] -> [Declaration]
- genSyncReset :: PrimMap -> Identifier -> Identifier -> Clock -> NetlistMonad [Declaration]
- unsafeRunNetlist :: NetlistMonad a -> a
Documentation
TopEntity specifications, fields are self-explanatory
A clock path
A clock
generateTopEnt :: String -> IO (Maybe TopEntity) Source
Create a TopEntity
data type from the JSON encoded .topentity
file.
Create a wrapper around a component, potentially initiating clock sources
extraOut :: Maybe TopEntity -> [(Identifier, HWType)] Source
Create extra output ports for the wrapper
mkInput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier))) Source
Generate input port mappings
mkVectorChain :: Int -> HWType -> [Identifier] -> Expr Source
Create a Vector chain for a list of Identifier
s
mkOutput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier))) Source
Generate output port mappings
mkClocks :: PrimMap -> [(Identifier, HWType)] -> Maybe TopEntity -> [Declaration] Source
Create clock generators
mkClock :: ClockSource -> ([Declaration], (Identifier, [Clock], Bool)) Source
Create a single clock generator
clockPorts :: ClockPath -> ([(Identifier, Expr)], [Clock]) Source
Create a single clock path
mkResets :: PrimMap -> [(Identifier, HWType)] -> [(Identifier, [Clock], Bool)] -> [Declaration] Source
Generate resets
genSyncReset :: PrimMap -> Identifier -> Identifier -> Clock -> NetlistMonad [Declaration] Source
Generate a reset synchroniser that synchronously de-asserts an asynchronous reset signal
unsafeRunNetlist :: NetlistMonad a -> a Source
The NetListMonad
is an transformer stack with IO
at the bottom.
So we must use unsafePerformIO
.