From 7053c6117f39d39852b3259c677691b5df6e7c04 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 17 Apr 2019 19:20:56 +0100 Subject: Use new fuzzing technique instead of the old function --- app/Main.hs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'app') 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 -- cgit