Copyright | (C) 2012-2016 University of Twente 2016-2017 Myrtle Software Ltd 2017 Google Inc. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Functions to create BlackBox Contexts and fill in BlackBox templates
Synopsis
- mkBlackBoxContext :: Id -> [Term] -> NetlistMonad (BlackBoxContext, [Declaration])
- prepareBlackBox :: Text -> BlackBoxTemplate -> BlackBoxContext -> NetlistMonad (BlackBoxTemplate, [Declaration])
- mkArgument :: Identifier -> Term -> NetlistMonad ((Expr, HWType, Bool), [Declaration])
- mkPrimitive :: Bool -> Bool -> Either Identifier Id -> Text -> [Either Term Type] -> Type -> NetlistMonad (Expr, [Declaration])
- mkFunInput :: Id -> Term -> NetlistMonad ((Either BlackBoxTemplate (Identifier, [Declaration]), WireOrReg, [BlackBoxTemplate], [BlackBoxTemplate], Maybe ((Text, Text), BlackBoxTemplate), BlackBoxContext), [Declaration])
- instantiateCompName :: BlackBoxTemplate -> NetlistMonad BlackBoxTemplate
- collectFilePaths :: BlackBoxContext -> 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.
prepareBlackBox :: Text -> BlackBoxTemplate -> BlackBoxContext -> NetlistMonad (BlackBoxTemplate, [Declaration]) Source #
:: Identifier | LHS of the original let-binder |
-> Term | |
-> NetlistMonad ((Expr, HWType, Bool), [Declaration]) |
:: Bool | Put BlackBox expression in parenthesis |
-> Bool | Treat BlackBox expression as declaration |
-> Either Identifier Id | Id to assign the result to |
-> Text | |
-> [Either Term Type] | |
-> Type | |
-> NetlistMonad (Expr, [Declaration]) |
:: Id | Identifier binding the encompassing primitive/blackbox application |
-> Term | The function argument term |
-> NetlistMonad ((Either BlackBoxTemplate (Identifier, [Declaration]), WireOrReg, [BlackBoxTemplate], [BlackBoxTemplate], Maybe ((Text, Text), 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