Safe Haskell | None |
---|
Create Netlists out of normalized CoreHW Terms
- genNetlist :: Maybe VHDLState -> HashMap TmName (Type, Term) -> PrimMap -> (Type -> Maybe (Either String HWType)) -> Maybe Int -> TmName -> IO ([Component], VHDLState)
- runNetlistMonad :: Maybe VHDLState -> HashMap TmName (Type, Term) -> PrimMap -> (Type -> Maybe (Either String HWType)) -> NetlistMonad a -> IO (a, NetlistState)
- genComponent :: TmName -> Maybe Int -> NetlistMonad Component
- genComponentT :: TmName -> Term -> Maybe Int -> NetlistMonad Component
- mkDeclarations :: Id -> Term -> NetlistMonad [Declaration]
- mkFunApp :: Id -> TmName -> [Term] -> NetlistMonad [Declaration]
- mkExpr :: Type -> Term -> NetlistMonad (Expr, [Declaration])
- mkDcApplication :: HWType -> DataCon -> [Term] -> NetlistMonad (Expr, [Declaration])
Documentation
:: Maybe VHDLState | State for the |
-> HashMap TmName (Type, Term) | Global binders |
-> PrimMap | Primitive definitions |
-> (Type -> Maybe (Either String HWType)) | Hardcoded Type -> HWType translator |
-> Maybe Int | Symbol count |
-> TmName | Name of the |
-> IO ([Component], VHDLState) |
Generate a hierarchical netlist out of a set of global binders with
topEntity
at the top.
:: Maybe VHDLState | State for the |
-> HashMap TmName (Type, Term) | Global binders |
-> PrimMap | Primitive Definitions |
-> (Type -> Maybe (Either String HWType)) | Hardcode Type -> HWType translator |
-> NetlistMonad a | Action to run |
-> IO (a, NetlistState) |
Run a NetlistMonad action in a given environment
:: TmName | Name of the function |
-> Maybe Int | Starting value of the unique counter |
-> NetlistMonad Component |
Generate a component for a given function (caching)
:: TmName | Name of the function |
-> Term | Corresponding term |
-> Maybe Int | Starting value of the unique counter |
-> NetlistMonad Component |
Generate a component for a given function
:: Id | LHS of the let-binder |
-> Term | RHS of the let-binder |
-> NetlistMonad [Declaration] |
Generate a list of Declarations for a let-binder
:: Id | LHS of the let-binder |
-> TmName | Name of the applied function |
-> [Term] | Function arguments |
-> NetlistMonad [Declaration] |
Generate a list of Declarations for a let-binder where the RHS is a function application
:: Type | Type of the LHS of the let-binder |
-> Term | Term to convert to an expression |
-> NetlistMonad (Expr, [Declaration]) | Returned expression and a list of generate BlackBox declarations |
Generate an expression for a term occurring on the RHS of a let-binder
:: HWType | HWType of the LHS of the let-binder |
-> DataCon | Applied DataCon |
-> [Term] | DataCon Arguments |
-> NetlistMonad (Expr, [Declaration]) | Returned expression and a list of generate BlackBox declarations |
Generate an expression for a DataCon application occurring on the RHS of a let-binder