Safe Haskell | None |
---|---|
Language | Haskell2010 |
Verismith.Verilog2005.Utils
Synopsis
- makeIdent :: ByteString -> Identifier
- regroup :: (x -> y) -> (x -> y -> Maybe y) -> NonEmpty x -> NonEmpty y
- addAttributed :: (x -> y -> Maybe y) -> Attributed x -> Attributed y -> Maybe (Attributed y)
- genexprnumber :: Natural -> GenExpr i r a
- constifyIdent :: HierIdent -> Maybe Identifier
- constifyMaybeRange :: Maybe DimRange -> Maybe (Maybe CRangeExpr)
- trConstifyGenExpr :: (si -> Maybe di) -> (Maybe DimRange -> Maybe r) -> GenExpr si (Maybe DimRange) a -> Maybe (GenExpr di r a)
- constifyExpr :: Expr -> Maybe CExpr
- constifyLV :: VarLValue -> Maybe NetLValue
- expr2netlv :: Expr -> Maybe NetLValue
- netlv2expr :: NetLValue -> Expr
- toStatement :: FunctionStatement -> Statement
- fromStatement :: Statement -> Maybe FunctionStatement
- fromMybStmt :: MybStmt -> AttrStmt
- toMGIBlockDecl :: BD NonEmpty t -> NonEmpty (BD Identity t)
- fromMGIBlockDecl1 :: BD Identity t -> BD NonEmpty t
- fromMGIBlockDecl_add :: BD Identity t -> BD NonEmpty t -> Maybe (BD NonEmpty t)
- toStdBlockDecl :: BD NonEmpty t -> NonEmpty (Identified (BlockDecl Identity t))
- toSpecBlockedItem :: SpecifySingleItem -> NonEmpty SpecifyBlockedItem
- fromSpecBlockedItem :: [SpecifyBlockedItem] -> [SpecifySingleItem]
- toMGBlockedItem :: ModGenSingleItem -> NonEmpty ModGenBlockedItem
- fromMGBlockedItem1 :: ModGenBlockedItem -> ModGenSingleItem
- fromMGBlockedItem_add :: ModGenBlockedItem -> ModGenSingleItem -> Maybe ModGenSingleItem
- fromMGBlockedItem :: [Attributed ModGenBlockedItem] -> [Attributed ModGenSingleItem]
Documentation
makeIdent :: ByteString -> Identifier Source #
regroup :: (x -> y) -> (x -> y -> Maybe y) -> NonEmpty x -> NonEmpty y Source #
Groups x
s into y
s by converting a single x
and merging previous x
s to the result
addAttributed :: (x -> y -> Maybe y) -> Attributed x -> Attributed y -> Maybe (Attributed y) Source #
Merges `Attributed x`s if we can merge x
s
genexprnumber :: Natural -> GenExpr i r a Source #
Makes a Verilog2005 expression out of a number
constifyIdent :: HierIdent -> Maybe Identifier Source #
converts HierIdent into Identifier
constifyMaybeRange :: Maybe DimRange -> Maybe (Maybe CRangeExpr) Source #
converts Expr's DimRange
into CExpr's CRangeExpr
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`
netlv2expr :: NetLValue -> Expr Source #
the other way
toStatement :: FunctionStatement -> Statement Source #
Converts Function statements to statements
fromStatement :: Statement -> Maybe FunctionStatement Source #
the other way
fromMybStmt :: MybStmt -> AttrStmt Source #
Converts MybStmt to AttrStmt
fromMGIBlockDecl1 :: BD Identity t -> BD NonEmpty t Source #
toStdBlockDecl :: BD NonEmpty t -> NonEmpty (Identified (BlockDecl Identity t)) Source #
toSpecBlockedItem :: SpecifySingleItem -> NonEmpty SpecifyBlockedItem Source #
Converts SpecifySingleItem
into SpecifyBlockedItem
s
fromSpecBlockedItem :: [SpecifyBlockedItem] -> [SpecifySingleItem] Source #
Converts SpecifyBlockedItem
s into SpecifySingleItem
s
toMGBlockedItem :: ModGenSingleItem -> NonEmpty ModGenBlockedItem Source #
Converts ModGenSingleItem
into ModGenBlockedItem
s
fromMGBlockedItem :: [Attributed ModGenBlockedItem] -> [Attributed ModGenSingleItem] Source #
Converts ModGenBlockedItem
s into ModGenSingleItem
s