aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Fuzz.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-05-07 19:40:32 +0100
committerYann Herklotz <git@ymhg.org>2019-05-07 19:40:32 +0100
commitdb5c1a788e86d52b75ac237270bf2cabcbd296e6 (patch)
tree4b8695f821d93e45cba71fd1eab5e7f0ffb75df4 /src/VeriFuzz/Fuzz.hs
parent634315880f01c65d916d53db12f92b49517fab9f (diff)
downloadverismith-db5c1a788e86d52b75ac237270bf2cabcbd296e6.tar.gz
verismith-db5c1a788e86d52b75ac237270bf2cabcbd296e6.zip
Add description field to Yosys
Diffstat (limited to 'src/VeriFuzz/Fuzz.hs')
-rw-r--r--src/VeriFuzz/Fuzz.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/VeriFuzz/Fuzz.hs b/src/VeriFuzz/Fuzz.hs
index c1bbfe4..7390aee 100644
--- a/src/VeriFuzz/Fuzz.hs
+++ b/src/VeriFuzz/Fuzz.hs
@@ -138,15 +138,14 @@ pop f a = do
equivalence :: (MonadBaseControl IO m, MonadSh m) => SourceInfo -> Fuzz m ()
equivalence src = do
- yos <- lift $ asks yosysInstance
synth <- passedSynthesis
let synthComb =
nubBy tupEq . filter (uncurry (/=)) $ combinations synth synth
- results <- liftSh $ mapM (uncurry $ equiv yos) synthComb
+ results <- liftSh $ mapM (uncurry equiv) synthComb
liftSh $ inspect results
where
tupEq (a, b) (a', b') = (a == a' && b == b') || (a == b' && b == a')
- equiv yos a b = runResultT $ do
+ equiv a b = runResultT $ do
make dir
pop dir $ do
liftSh $ do
@@ -155,7 +154,7 @@ equivalence src = do
cp (fromText ".." </> fromText (toText b) </> synthOutput b)
$ synthOutput b
writefile "rtl.v" $ genSource src
- runEquiv yos a (Just b) src
+ runEquiv a (Just b) src
where dir = fromText $ "equiv_" <> toText a <> "_" <> toText b
fuzz :: MonadFuzz m => Gen SourceInfo -> Config -> Fuzz m FuzzReport