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

Safe HaskellNone
LanguageHaskell2010

CLaSH.Backend

Documentation

class Backend state where Source

Methods

initBackend :: state Source

Initial state for state monad

primDir :: state -> IO FilePath Source

Location for the primitive definitions

name :: state -> String Source

Name of backend, used for directory to put output files in. Should be | constant function / ignore argument.

extension :: state -> String Source

File extension for target langauge

extractTypes :: state -> HashSet HWType Source

Get the set of types out of state

genHDL :: Component -> State state (String, Doc) Source

Generate HDL for a Netlist component

mkTyPackage :: [HWType] -> State state Doc Source

Generate a HDL package containing type definitions for the given HWTypes

hdlType :: HWType -> State state Doc Source

Convert a Netlist HWType to a target HDL type

hdlTypeErrValue :: HWType -> State state Doc Source

Convert a Netlist HWType to an HDL error value for that type

hdlTypeMark :: HWType -> State state Doc Source

Convert a Netlist HWType to the root of a target HDL type

hdlSig :: Text -> HWType -> State state Doc Source

Create a signal declaration from an identifier (Text) and Netlist HWType

inst :: Declaration -> State state (Maybe Doc) Source

Turn a Netlist Declaration to a HDL concurrent block

expr :: Bool -> Expr -> State state Doc Source

Turn a Netlist expression into a HDL expression