| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
CLaSH.Netlist.BlackBox
Description
Functions to create BlackBox Contexts and fill in BlackBox templates
- mkBlackBoxContext :: Id -> [Term] -> NetlistMonad (BlackBoxContext, [Declaration])
- prepareBlackBox :: Text -> Text -> BlackBoxContext -> NetlistMonad BlackBoxTemplate
- mkArgument :: Term -> NetlistMonad ((SyncExpr, HWType, Bool), [Declaration])
- mkPrimitive :: Bool -> Bool -> Text -> [Either Term Type] -> Type -> NetlistMonad (Expr, [Declaration])
- mkFunInput :: Id -> Term -> NetlistMonad ((Either BlackBoxTemplate Declaration, BlackBoxContext), [Declaration])
- instantiateSym :: BlackBoxTemplate -> NetlistMonad BlackBoxTemplate
Documentation
Arguments
| :: Id | Identifier binding the primitive/blackbox application |
| -> [Term] | Arguments of the primitive/blackbox application |
| -> NetlistMonad (BlackBoxContext, [Declaration]) |
Generate the context for a BlackBox instantiation.
prepareBlackBox :: Text -> Text -> BlackBoxContext -> NetlistMonad BlackBoxTemplate Source
mkArgument :: Term -> NetlistMonad ((SyncExpr, HWType, Bool), [Declaration]) Source
Arguments
| :: Bool | Put BlackBox expression in parenthesis |
| -> Bool | Treat BlackBox expression as declaration |
| -> Text | |
| -> [Either Term Type] | |
| -> Type | |
| -> NetlistMonad (Expr, [Declaration]) |
Arguments
| :: Id | Identifier binding the encompassing primitive/blackbox application |
| -> Term | The function argument term |
| -> NetlistMonad ((Either BlackBoxTemplate Declaration, BlackBoxContext), [Declaration]) |
Create an template instantiation text and a partial blackbox content for an argument term, given that the term is a function. Errors if the term is not a function
instantiateSym :: BlackBoxTemplate -> NetlistMonad BlackBoxTemplate Source
Instantiate symbols references with a new symbol and increment symbol counter