| Copyright | (C) 2012-2016 University of Twente 2016-2017 Myrtle Software Ltd 2017 Google Inc. 2021-2024 QBayLogic B.V. 2022 Google Inc. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Clash.Netlist.BlackBox
Description
Functions to create BlackBox Contexts and fill in BlackBox templates
Synopsis
- mkBlackBoxContext :: HasCallStack => Text -> DeclarationType -> [Id] -> [Either Term Type] -> NetlistMonad (BlackBoxContext, [Declaration])
- extractPrimWarnOrFail :: HasCallStack => Text -> NetlistMonad CompiledPrimitive
- mkPrimitive :: Bool -> Bool -> DeclarationType -> NetlistId -> PrimInfo -> [Either Term Type] -> [Declaration] -> NetlistMonad (Expr, [Declaration])
- prepareBlackBox :: Text -> BlackBox -> BlackBoxContext -> NetlistMonad (BlackBox, [Declaration])
- isLiteral :: Term -> Bool
Documentation
Arguments
| :: HasCallStack | |
| => Text | Blackbox function name |
| -> DeclarationType | Are we concurrent or sequential? |
| -> [Id] | Identifiers binding the primitive/blackbox application |
| -> [Either Term Type] | Arguments of the primitive/blackbox application |
| -> NetlistMonad (BlackBoxContext, [Declaration]) |
Generate the context for a BlackBox instantiation.
extractPrimWarnOrFail Source #
Arguments
| :: HasCallStack | |
| => Text | Name of primitive |
| -> NetlistMonad CompiledPrimitive |
Extract a compiled primitive from a guarded primitive. Emit a warning if the guard wants to, or fail entirely.
Arguments
| :: Bool | Put BlackBox expression in parenthesis |
| -> Bool | Treat BlackBox expression as declaration |
| -> DeclarationType | Are we concurrent or sequential? |
| -> NetlistId | Id to assign the result to |
| -> PrimInfo | Primitive info |
| -> [Either Term Type] | Arguments |
| -> [Declaration] | Tick declarations |
| -> NetlistMonad (Expr, [Declaration]) |
prepareBlackBox :: Text -> BlackBox -> BlackBoxContext -> NetlistMonad (BlackBox, [Declaration]) Source #