verismith-0.4.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

Contents

Description

 
Synopsis

Documentation

Types

data SourceInfo Source #

Constructors

SourceInfo 

Fields

Instances
Eq SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Data SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceInfo -> c SourceInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceInfo #

toConstr :: SourceInfo -> Constr #

dataTypeOf :: SourceInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceInfo) #

gmapT :: (forall b. Data b => b -> b) -> SourceInfo -> SourceInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceInfo -> m SourceInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceInfo -> m SourceInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceInfo -> m SourceInfo #

Ord SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Show SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Generic SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Associated Types

type Rep SourceInfo :: Type -> Type #

NFData SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

Methods

rnf :: SourceInfo -> () #

Source SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.CodeGen

Mutate SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.Mutate

type Rep SourceInfo Source # 
Instance details

Defined in Verismith.Verilog.AST

type Rep SourceInfo = D1 (MetaData "SourceInfo" "Verismith.Verilog.AST" "verismith-0.4.0.0-inplace" False) (C1 (MetaCons "SourceInfo" PrefixI True) (S1 (MetaSel (Just "_infoTop") SourceUnpack SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_infoSrc") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Verilog)))

Run functions

runEquivalence Source #

Arguments

:: Maybe Seed 
-> Gen Verilog

Generator for the Verilog file.

-> Text

Name of the folder on each thread.

-> Text

Name of the general folder being used.

-> Bool

Keep flag.

-> Int

Used to track the recursion.

-> IO () 

Run a fuzz run and check if all of the simulators passed by checking if the generated Verilog files are equivalent.

runSimulation :: IO () Source #

Run a simulation on a random DAG or a random module.

draw :: IO () Source #

Draw a randomly generated DAG to a dot file and compile it to a png so it can be seen.

Verilog generation functions

procedural :: Text -> Config -> Gen Verilog Source #

Procedural generation method for random Verilog. Uses internal Reader and State to keep track of the current Verilog code structure.

proceduralIO :: Text -> Config -> IO Verilog Source #

Samples the Gen directly to generate random Verilog using the Text as the name of the main module and the configuration Config to influence the generation.

proceduralSrc :: Text -> Config -> Gen SourceInfo Source #

Given a Text and a Config will generate a SourceInfo which has the top module set to the right name.

proceduralSrcIO :: Text -> Config -> IO SourceInfo Source #

Sampled and wrapped into a SourceInfo with the given top module name.

Extra modules