clash-lib-0.5: CAES Language for Synchronous Hardware - As a Library

Safe HaskellNone



Module that connects all the parts of the CLaSH compiler library



generateHDL Source


:: Backend backend 
=> BindingMap

Set of functions

-> Maybe backend 
-> PrimMap

Primitive / BlackBox Definitions

-> HashMap TyConName TyCon

TyCon cache

-> (HashMap TyConName TyCon -> Type -> Maybe (Either String HWType))

Hardcoded Type -> HWType translator

-> (HashMap TyConName TyCon -> Term -> Term)

Hardcoded evaluator (delta-reduction)

-> DebugLevel

Debug information level for the normalization process

-> IO () 

Create a set of target HDL files for a set of functions

createHDL :: Backend backend => backend -> [Component] -> [(String, Doc)] Source

Pretty print Components to HDL Documents

prepareDir :: String -> IO () Source

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.

writeHDL :: Backend backend => backend -> FilePath -> (String, Doc) -> IO () Source

Writes a HDL file to the given directory