Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions to create BlackBox Contexts and fill in BlackBox templates
- mkBlackBoxContext :: Id -> [Term] -> NetlistMonad (BlackBoxContext, [Declaration])
- mkBlackBox :: Text -> BlackBoxContext -> NetlistMonad Text
- mkInput :: (Term, Bool) -> MaybeT NetlistMonad ((SyncIdentifier, HWType), [Declaration])
- mkPrimitive :: Bool -> Text -> [Either Term Type] -> Type -> NetlistMonad ((Expr, HWType), [Declaration])
- mkLitInput :: Term -> MaybeT NetlistMonad ((Identifier, HWType), [Declaration])
- mkFunInput :: Id -> Term -> MaybeT NetlistMonad ((BlackBoxTemplate, BlackBoxContext), [Declaration])
- instantiateSym :: BlackBoxTemplate -> NetlistMonad BlackBoxTemplate
Documentation
:: Id | Identifier binding the primitive/blackbox application |
-> [Term] | Arguments of the primitive/blackbox application |
-> NetlistMonad (BlackBoxContext, [Declaration]) |
Generate the context for a BlackBox instantiation.
:: Text | Template to instantiate |
-> BlackBoxContext | Context to instantiate template with |
-> NetlistMonad Text |
Instantiate a BlackBox template according to the given context
mkInput :: (Term, Bool) -> MaybeT NetlistMonad ((SyncIdentifier, HWType), [Declaration]) Source
Create an template instantiation text for an argument term
mkPrimitive :: Bool -> Text -> [Either Term Type] -> Type -> NetlistMonad ((Expr, HWType), [Declaration]) Source
:: Term | The literal argument term |
-> MaybeT NetlistMonad ((Identifier, HWType), [Declaration]) |
Create an template instantiation text for an argument term, given that
the term is a literal. Returns Nothing
if the term is not a literal.
:: Id | Identifier binding the encompassing primitive/blackbox application |
-> Term | The function argument term |
-> MaybeT NetlistMonad ((BlackBoxTemplate, 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