verismith-1.1.0: Random verilog generation and simulator testing.
Safe HaskellNone
LanguageHaskell2010

Verismith.Verilog2005.Utils

Synopsis

Documentation

regroup :: (x -> y) -> (x -> y -> Maybe y) -> NonEmpty x -> NonEmpty y Source #

Groups xs into ys by converting a single x and merging previous xs to the result

addAttributed :: (x -> y -> Maybe y) -> Attributed x -> Attributed y -> Maybe (Attributed y) Source #

Merges `Attributed x`s if we can merge xs

genexprnumber :: Natural -> GenExpr i r a Source #

Makes a Verilog2005 expression out of a number

constifyIdent :: HierIdent -> Maybe Identifier Source #

converts HierIdent into Identifier

trConstifyGenExpr :: (si -> Maybe di) -> (Maybe DimRange -> Maybe r) -> GenExpr si (Maybe DimRange) a -> Maybe (GenExpr di r a) Source #

converts `GenExpr si (MaybeDimRange) a` into `GenExpr i r a`

constifyExpr :: Expr -> Maybe CExpr Source #

converts Expr to CExpr

constifyLV :: VarLValue -> Maybe NetLValue Source #

converts variable lvalue into net lvalue

expr2netlv :: Expr -> Maybe NetLValue Source #

converts expression into net lvalue

netlv2expr :: NetLValue -> Expr Source #

the other way

toStatement :: FunctionStatement -> Statement Source #

Converts Function statements to statements

fromMybStmt :: MybStmt -> AttrStmt Source #

Converts MybStmt to AttrStmt

toMGIBlockDecl :: BD NonEmpty t -> NonEmpty (BD Identity t) Source #

Converts ModGenSingleItem's BlockDecl into ModGenBlockedItem's BlockDecl

fromMGIBlockDecl1 :: BD Identity t -> BD NonEmpty t Source #

Converts one ModGenBlockedItem's BlockDecl into ModGenSingleItem's BlockDecl

fromMGIBlockDecl_add :: BD Identity t -> BD NonEmpty t -> Maybe (BD NonEmpty t) Source #

Merges one ModGenBlockedItem's BlockDecl with one ModGenSingleItem's BlockDecl

toStdBlockDecl :: BD NonEmpty t -> NonEmpty (Identified (BlockDecl Identity t)) Source #

Converts ModGenSingleItem like BlockDecl into StdBlockDecl BlockDecl