clash-lib-0.9999: CAES Language for Synchronous Hardware - As a Library
Copyright(C) 2015-2016 University of Twente
2017-2018 Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Backend.Verilog

Description

Generate Verilog for assorted Netlist datatypes

Synopsis

Documentation

data VerilogState Source #

State for the VerilogM monad:

Instances

Instances details
Backend VerilogState Source # 
Instance details

Defined in Clash.Backend.Verilog

Methods

initBackend :: Int -> HdlSyn -> Bool -> Maybe (Maybe Int) -> VerilogState Source #

hdlKind :: VerilogState -> HDL Source #

primDirs :: VerilogState -> IO [FilePath] Source #

name :: VerilogState -> String Source #

extension :: VerilogState -> String Source #

extractTypes :: VerilogState -> HashSet HWType Source #

genHDL :: Identifier -> SrcSpan -> HashMap Identifier Word -> Component -> Mon (State VerilogState) ((String, Doc), [(String, Doc)]) Source #

mkTyPackage :: Identifier -> [HWType] -> Mon (State VerilogState) [(String, Doc)] Source #

hdlType :: Usage -> HWType -> Mon (State VerilogState) Doc Source #

hdlTypeErrValue :: HWType -> Mon (State VerilogState) Doc Source #

hdlTypeMark :: HWType -> Mon (State VerilogState) Doc Source #

hdlRecSel :: HWType -> Int -> Mon (State VerilogState) Doc Source #

hdlSig :: Text -> HWType -> Mon (State VerilogState) Doc Source #

genStmt :: Bool -> State VerilogState Doc Source #

inst :: Declaration -> Mon (State VerilogState) (Maybe Doc) Source #

expr :: Bool -> Expr -> Mon (State VerilogState) Doc Source #

iwWidth :: State VerilogState Int Source #

toBV :: HWType -> Text -> Mon (State VerilogState) Doc Source #

fromBV :: HWType -> Text -> Mon (State VerilogState) Doc Source #

hdlSyn :: State VerilogState HdlSyn Source #

mkIdentifier :: State VerilogState (IdType -> Identifier -> Identifier) Source #

extendIdentifier :: State VerilogState (IdType -> Identifier -> Identifier -> Identifier) Source #

setModName :: ModName -> VerilogState -> VerilogState Source #

setSrcSpan :: SrcSpan -> State VerilogState () Source #

getSrcSpan :: State VerilogState SrcSpan Source #

blockDecl :: Text -> [Declaration] -> Mon (State VerilogState) Doc Source #

unextend :: State VerilogState (Identifier -> Identifier) Source #

addIncludes :: [(String, Doc)] -> State VerilogState () Source #

addLibraries :: [Text] -> State VerilogState () Source #

addImports :: [Text] -> State VerilogState () Source #

addAndSetData :: FilePath -> State VerilogState String Source #

getDataFiles :: State VerilogState [(String, FilePath)] Source #

addMemoryDataFile :: (String, String) -> State VerilogState () Source #

getMemoryDataFiles :: State VerilogState [(String, String)] Source #

seenIdentifiers :: Lens' VerilogState (HashMap Identifier Word) Source #

ifThenElseExpr :: VerilogState -> Bool Source #

include :: Monad m => [Text] -> Mon m Doc Source #

uselibs :: Monad m => [Text] -> Mon m Doc Source #

bits :: Lens' s (Maybe (Maybe Int)) -> [Bit] -> Mon (State s) Doc Source #