aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-04-17 19:20:56 +0100
committerYann Herklotz <git@ymhg.org>2019-04-17 19:20:56 +0100
commit7053c6117f39d39852b3259c677691b5df6e7c04 (patch)
tree8baa488ca37b6f29da6311e2645c328d87c29d91 /app
parent43ae318ed36dcf4098a8740029bf6b4bf92e4960 (diff)
downloadverismith-7053c6117f39d39852b3259c677691b5df6e7c04.tar.gz
verismith-7053c6117f39d39852b3259c677691b5df6e7c04.zip
Use new fuzzing technique instead of the old function
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs23
1 files changed, 7 insertions, 16 deletions
diff --git a/app/Main.hs b/app/Main.hs
index af6e568..bec9e67 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -1,7 +1,6 @@
module Main where
import Control.Concurrent
-import Control.Monad (when)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
@@ -198,22 +197,14 @@ getConfig :: Maybe FilePath -> IO V.Config
getConfig = maybe (return V.defaultConfig) V.parseConfigFile
handleOpts :: Opts -> IO ()
-handleOpts (Fuzz out configF force keep) = do
- num <- getNumCapabilities
+handleOpts (Fuzz _ configF _ _) = do
config <- getConfig configF
- S.shellyFailDir $ do
- when force . S.rm_rf $ S.fromText out
- S.mkdir_p $ S.fromText out
- vars <-
- sequence
- $ (\x -> myForkIO $ V.runEquivalence (V.procedural "top" config)
- ("test_" <> T.pack (show x))
- out
- keep
- 0
- )
- <$> [1 .. num]
- sequence_ $ takeMVar <$> vars
+ _ <- V.runFuzz
+ [V.defaultYosysSynth, V.defaultVivadoSynth, V.defaultQuartusSynth]
+ []
+ V.defaultYosys
+ (V.fuzz (V.proceduralSrc "top" config))
+ return ()
handleOpts (Generate f c) = do
config <- getConfig c
source <- V.proceduralIO "top" config