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

Contents

Description

Definition of the circuit graph.

Synopsis

Circuit

data Gate Source #

The types for all the gates.

Constructors

And 
Or 
Xor 
Instances
Bounded Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Enum Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Methods

succ :: Gate -> Gate #

pred :: Gate -> Gate #

toEnum :: Int -> Gate #

fromEnum :: Gate -> Int #

enumFrom :: Gate -> [Gate] #

enumFromThen :: Gate -> Gate -> [Gate] #

enumFromTo :: Gate -> Gate -> [Gate] #

enumFromThenTo :: Gate -> Gate -> Gate -> [Gate] #

Eq Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Methods

(==) :: Gate -> Gate -> Bool #

(/=) :: Gate -> Gate -> Bool #

Ord Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Methods

compare :: Gate -> Gate -> Ordering #

(<) :: Gate -> Gate -> Bool #

(<=) :: Gate -> Gate -> Bool #

(>) :: Gate -> Gate -> Bool #

(>=) :: Gate -> Gate -> Bool #

max :: Gate -> Gate -> Gate #

min :: Gate -> Gate -> Gate #

Show Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Methods

showsPrec :: Int -> Gate -> ShowS #

show :: Gate -> String #

showList :: [Gate] -> ShowS #

Random Gate Source # 
Instance details

Defined in Verismith.Circuit.Base

Methods

randomR :: RandomGen g => (Gate, Gate) -> g -> (Gate, g) #

random :: RandomGen g => g -> (Gate, g) #

randomRs :: RandomGen g => (Gate, Gate) -> g -> [Gate] #

randoms :: RandomGen g => g -> [Gate] #

randomRIO :: (Gate, Gate) -> IO Gate #

randomIO :: IO Gate #

newtype Circuit Source #

Newtype for the Circuit which implements a Graph from fgl.

Constructors

Circuit 

Fields

newtype CNode Source #

Newtype for a node in the circuit, which is an 'LNode Gate'.

Constructors

CNode 

Fields

newtype CEdge Source #

Newtype for a named edge which is empty, as it does not need a label.

Constructors

CEdge 

Fields

rDups :: (Eq a, Eq b) => Gr a b -> Gr a b Source #

Remove duplicates.

rDupsCirc :: Circuit -> Circuit Source #

Remove duplicates.

randomDAG Source #

Arguments

:: Gen Circuit

The generated graph. It uses Arbitrary to generate random instances of each node

Gen instance for a random acyclic DAG.

genRandomDAG :: IO Circuit Source #

Generate a random acyclic DAG with an IO instance.