aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Report.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-05-07 21:20:19 +0100
committerYann Herklotz <git@ymhg.org>2019-05-07 21:20:19 +0100
commit08f2731b97abb6d502422a701276d38e316021ab (patch)
tree837406112c445fabb63e83e468698b3ef3065049 /src/VeriFuzz/Report.hs
parentdb5c1a788e86d52b75ac237270bf2cabcbd296e6 (diff)
downloadverismith-08f2731b97abb6d502422a701276d38e316021ab.tar.gz
verismith-08f2731b97abb6d502422a701276d38e316021ab.zip
Add configuration options for all simulators
Diffstat (limited to 'src/VeriFuzz/Report.hs')
-rw-r--r--src/VeriFuzz/Report.hs26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/VeriFuzz/Report.hs b/src/VeriFuzz/Report.hs
index 15f695d..c65df5a 100644
--- a/src/VeriFuzz/Report.hs
+++ b/src/VeriFuzz/Report.hs
@@ -32,7 +32,9 @@ where
import Control.Lens
import Data.ByteString (ByteString)
+import Data.Maybe (fromMaybe)
import Prelude hiding (FilePath)
+import Shelly (fromText)
import VeriFuzz.Config
import VeriFuzz.Result
import VeriFuzz.Sim.Icarus
@@ -158,9 +160,25 @@ descriptionToSim s =
error $ "Could not find implementation for simulator '" <> show s <> "'"
descriptionToSynth :: SynthDescription -> SynthTool
-descriptionToSynth (SynthDescription "yosys" ) = defaultYosysSynth
-descriptionToSynth (SynthDescription "vivado" ) = defaultVivadoSynth
-descriptionToSynth (SynthDescription "xst" ) = defaultXSTSynth
-descriptionToSynth (SynthDescription "quartus") = defaultQuartusSynth
+descriptionToSynth s@(SynthDescription "yosys" _ _ _ _ _ _ _ _ _ _ _ _) =
+ YosysSynth
+ . Yosys (fromText <$> synthYosysBin s) (fromMaybe (yosysDesc defaultYosys) $ synthYosysDesc s)
+ . maybe (yosysOutput defaultYosys) fromText
+ $ synthYosysOutput s
+descriptionToSynth s@(SynthDescription "vivado" _ _ _ _ _ _ _ _ _ _ _ _) =
+ VivadoSynth
+ . Vivado (fromText <$> synthVivadoBin s) (fromMaybe (vivadoDesc defaultVivado) $ synthVivadoDesc s)
+ . maybe (vivadoOutput defaultVivado) fromText
+ $ synthVivadoOutput s
+descriptionToSynth s@(SynthDescription "xst" _ _ _ _ _ _ _ _ _ _ _ _) =
+ XSTSynth
+ . XST (fromText <$> synthXstBin s) (fromMaybe (xstDesc defaultXST) $ synthXstDesc s)
+ . maybe (xstOutput defaultXST) fromText
+ $ synthXstOutput s
+descriptionToSynth s@(SynthDescription "quartus" _ _ _ _ _ _ _ _ _ _ _ _) =
+ QuartusSynth
+ . Quartus (fromText <$> synthQuartusBin s) (fromMaybe (quartusDesc defaultQuartus) $ synthQuartusDesc s)
+ . maybe (quartusOutput defaultQuartus) fromText
+ $ synthQuartusOutput s
descriptionToSynth s =
error $ "Could not find implementation for synthesiser '" <> show s <> "'"