Copyright | (C) 2012-2016 University of Twente 2016-2017 Myrtle Software Ltd 2017 QBayLogic Google Inc. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Clash.Driver
Description
Module that connects all the parts of the Clash compiler library
Synopsis
- generateHDL :: forall backend. Backend backend => BindingMap -> Maybe backend -> PrimMap Text -> HashMap TyConOccName TyCon -> IntMap TyConName -> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType)) -> PrimEvaluator -> [(TmName, Type, Maybe TopEntity, Maybe TmName)] -> ClashOpts -> (UTCTime, UTCTime) -> IO ()
- parsePrimitive :: Primitive Text -> Primitive BlackBoxTemplate
- createHDL :: Backend backend => backend -> String -> [(SrcSpan, Component)] -> Component -> (String, Either Manifest Manifest) -> ([(String, Doc)], Manifest)
- prepareDir :: Bool -> String -> String -> IO ()
- writeHDL :: FilePath -> (String, Doc) -> IO ()
- copyDataFiles :: [FilePath] -> FilePath -> [(String, FilePath)] -> IO ()
- callGraphBindings :: BindingMap -> TmOccName -> [Term]
- normalizeEntity :: BindingMap -> PrimMap BlackBoxTemplate -> HashMap TyConOccName TyCon -> IntMap TyConName -> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType)) -> PrimEvaluator -> [TmOccName] -> ClashOpts -> Supply -> TmOccName -> BindingMap
Documentation
Arguments
:: Backend backend | |
=> BindingMap | Set of functions |
-> Maybe backend | |
-> PrimMap Text | Primitive / BlackBox Definitions |
-> HashMap TyConOccName TyCon | TyCon cache |
-> IntMap TyConName | Tuple TyCon cache |
-> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType)) | |
-> PrimEvaluator | Hardcoded evaluator (delta-reduction) |
-> [(TmName, Type, Maybe TopEntity, Maybe TmName)] | topEntity bndr + (maybe) TopEntity annotation + (maybe) testBench bndr |
-> ClashOpts | Debug information level for the normalization process |
-> (UTCTime, UTCTime) | |
-> IO () |
Create a set of target HDL files for a set of functions
Arguments
:: Backend backend | |
=> backend | Backend |
-> String | Module hierarchy root |
-> [(SrcSpan, Component)] | List of components |
-> Component | Top component |
-> (String, Either Manifest Manifest) | Name of the manifest file
+ Either:
* Left manifest: Only write/update the hashes of the |
-> ([(String, Doc)], Manifest) | The pretty-printed HDL documents + The update manifest file |
Pretty print Components to HDL Documents
Arguments
:: Bool | Remove existing HDL files |
-> String | File extension of the HDL files. |
-> String | |
-> IO () |
Prepares the directory for writing HDL files. This means creating the dir if it does not exist and removing all existing .hdl files from it.
Arguments
:: BindingMap | All bindings |
-> TmOccName | Root of the call graph |
-> [Term] |
Get all the terms corresponding to a call graph
Arguments
:: BindingMap | All bindings |
-> PrimMap BlackBoxTemplate | BlackBox HDL templates |
-> HashMap TyConOccName TyCon | TyCon cache |
-> IntMap TyConName | Tuple TyCon cache |
-> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType)) | |
-> PrimEvaluator | Hardcoded evaluator (delta-reduction) |
-> [TmOccName] | TopEntities |
-> ClashOpts | Debug information level for the normalization process |
-> Supply | Unique supply |
-> TmOccName | root of the hierarchy |
-> BindingMap |
Normalize a complete hierarchy