Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilties to verify blackbox contexts against templates and rendering filled in templates
- verifyBlackBoxContext :: BlackBoxContext -> BlackBoxTemplate -> Bool
- extractLiterals :: BlackBoxContext -> [Expr]
- setSym :: Int -> BlackBoxTemplate -> (BlackBoxTemplate, Int)
- setClocks :: (MonadWriter [(Identifier, HWType)] m, Applicative m) => BlackBoxContext -> BlackBoxTemplate -> m BlackBoxTemplate
- clkSyncId :: SyncExpr -> (Identifier, Int)
- renderBlackBox :: Backend backend => BlackBoxTemplate -> BlackBoxContext -> State backend Text
- renderElem :: Backend backend => BlackBoxContext -> Element -> State backend Text
- parseFail :: Text -> BlackBoxTemplate
- syncIdToSyncExpr :: (Text, HWType) -> (SyncExpr, HWType, Bool)
- lineToIdentifier :: Backend backend => BlackBoxContext -> BlackBoxTemplate -> State backend Text
- lineToType :: BlackBoxContext -> BlackBoxTemplate -> HWType
- renderTag :: Backend backend => BlackBoxContext -> Element -> State backend Text
Documentation
:: BlackBoxContext | Blackbox to verify |
-> BlackBoxTemplate | Template to check against |
-> Bool |
Determine if the number of normalliteralfunction inputs of a blackbox context at least matches the number of argument that is expected by the template.
extractLiterals :: BlackBoxContext -> [Expr] Source
setSym :: Int -> BlackBoxTemplate -> (BlackBoxTemplate, Int) Source
Update all the symbol references in a template, and increment the symbol counter for every newly encountered symbol.
setClocks :: (MonadWriter [(Identifier, HWType)] m, Applicative m) => BlackBoxContext -> BlackBoxTemplate -> m BlackBoxTemplate Source
clkSyncId :: SyncExpr -> (Identifier, Int) Source
Get the name of the clock of an identifier
:: Backend backend | |
=> BlackBoxTemplate | Blackbox template |
-> BlackBoxContext | Context used to fill in the hole |
-> State backend Text |
Render a blackbox given a certain context. Returns a filled out template
and a list of hidden
inputs that must be added to the encompassing component.
renderElem :: Backend backend => BlackBoxContext -> Element -> State backend Text Source
Render a single template element
parseFail :: Text -> BlackBoxTemplate Source
lineToIdentifier :: Backend backend => BlackBoxContext -> BlackBoxTemplate -> State backend Text Source
Fill out the template corresponding to an output/input assignment of a component instantiation, and turn it into a single identifier so it can be used for a new blackbox context.