verismith-0.5.0.0: Random verilog generation and simulator testing.

Copyright(c) 2018-2019 Yann Herklotz
LicenseBSD-3
Maintaineryann [at] yannherklotz [dot] com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Verismith.Circuit.Internal

Description

Internal helpers for generation.

Synopsis

Documentation

fromNode :: Int -> Text Source #

Convert an integer into a label.

>>> fromNode 5
"w5"

filterGr :: Graph gr => gr n e -> (Node -> Bool) -> [Node] Source #

General function which runs filter over a graph.

only :: Graph gr => gr n e -> (gr n e -> Node -> Int) -> (gr n e -> Node -> Int) -> Node -> Bool Source #

Takes two functions that return an Int, and compares there results to 0 and not 0 respectively. This result is returned.

inputs :: Graph gr => gr n e -> [Node] Source #

Returns all the input nodes to a graph, which means nodes that do not have an input themselves.

outputs :: Graph gr => gr n e -> [Node] Source #

Returns all the output nodes to a graph, similar to the inputs function.