clash-lib-1.4.5: Clash: a functional hardware description language - 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

Contents

Description

Generate Verilog for assorted Netlist datatypes

Synopsis

Documentation

data VerilogState Source #

State for the VerilogM monad:

Instances

Instances details
HasIdentifierSet VerilogState Source # 
Instance details

Defined in Clash.Backend.Verilog

Backend VerilogState Source # 
Instance details

Defined in Clash.Backend.Verilog

Methods

initBackend :: Int -> HdlSyn -> Bool -> PreserveCase -> Maybe (Maybe Int) -> AggressiveXOptBB -> 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 :: ModName -> SrcSpan -> IdentifierSet -> Component -> Mon (State VerilogState) ((String, Doc), [(String, Doc)]) Source #

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

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

hdlHWTypeKind :: HWType -> State VerilogState HWKind 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 #

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

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

getSrcSpan :: State VerilogState SrcSpan Source #

blockDecl :: Identifier -> [Declaration] -> Mon (State VerilogState) Doc 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 #

ifThenElseExpr :: VerilogState -> Bool Source #

aggressiveXOptBB :: State VerilogState AggressiveXOptBB 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 #

noEmptyInit :: (Monad m, Semigroup (m Doc)) => m Doc -> m Doc Source #

split ranges

data Range Source #

Range slice, can be contiguous, or split into multiple sub-ranges

Constructors

Contiguous Int Int 
Split [(Int, Int, Provenance)] 

continueWithRange Source #

Arguments

:: [(Int, Int)]

Starts and ends

-> HWType

Type of the projection

-> Range

Range selected so far

-> (Range, HWType) 

Select a sub-range from a range