From 110d1392882cff9618997acad85af78017688c86 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 9 May 2019 14:36:28 +0100 Subject: Add NFData to force evaluation of config file --- src/VeriFuzz/Sim/Icarus.hs | 4 ++++ src/VeriFuzz/Sim/Quartus.hs | 4 ++++ src/VeriFuzz/Sim/Vivado.hs | 4 ++++ src/VeriFuzz/Sim/XST.hs | 4 ++++ src/VeriFuzz/Sim/Yosys.hs | 4 ++++ 5 files changed, 20 insertions(+) (limited to 'src/VeriFuzz/Sim') diff --git a/src/VeriFuzz/Sim/Icarus.hs b/src/VeriFuzz/Sim/Icarus.hs index 062a087..423d51b 100644 --- a/src/VeriFuzz/Sim/Icarus.hs +++ b/src/VeriFuzz/Sim/Icarus.hs @@ -16,6 +16,7 @@ module VeriFuzz.Sim.Icarus ) where +import Control.DeepSeq (NFData, rnf, rwhnf) import Control.Lens import Crypto.Hash (Digest, hash) import Crypto.Hash.Algorithms (SHA256) @@ -57,6 +58,9 @@ instance Simulator Icarus where runSim = runSimIcarus runSimWithFile = runSimIcarusWithFile +instance NFData Icarus where + rnf = rwhnf + defaultIcarus :: Icarus defaultIcarus = Icarus "iverilog" "vvp" diff --git a/src/VeriFuzz/Sim/Quartus.hs b/src/VeriFuzz/Sim/Quartus.hs index 88bb6c9..c93603e 100644 --- a/src/VeriFuzz/Sim/Quartus.hs +++ b/src/VeriFuzz/Sim/Quartus.hs @@ -16,6 +16,7 @@ module VeriFuzz.Sim.Quartus ) where +import Control.DeepSeq (NFData, rnf, rwhnf) import Data.Text (Text, unpack) import Prelude hiding (FilePath) import Shelly @@ -41,6 +42,9 @@ instance Synthesiser Quartus where synthOutput = quartusOutput setSynthOutput (Quartus a b _) = Quartus a b +instance NFData Quartus where + rnf = rwhnf + defaultQuartus :: Quartus defaultQuartus = Quartus Nothing "quartus" "syn_quartus.v" diff --git a/src/VeriFuzz/Sim/Vivado.hs b/src/VeriFuzz/Sim/Vivado.hs index c17334e..ee67a78 100644 --- a/src/VeriFuzz/Sim/Vivado.hs +++ b/src/VeriFuzz/Sim/Vivado.hs @@ -16,6 +16,7 @@ module VeriFuzz.Sim.Vivado ) where +import Control.DeepSeq (NFData, rnf, rwhnf) import Data.Text (Text, unpack) import Prelude hiding (FilePath) import Shelly @@ -42,6 +43,9 @@ instance Synthesiser Vivado where synthOutput = vivadoOutput setSynthOutput (Vivado a b _) = Vivado a b +instance NFData Vivado where + rnf = rwhnf + defaultVivado :: Vivado defaultVivado = Vivado Nothing "vivado" "syn_vivado.v" diff --git a/src/VeriFuzz/Sim/XST.hs b/src/VeriFuzz/Sim/XST.hs index e1e8243..11be094 100644 --- a/src/VeriFuzz/Sim/XST.hs +++ b/src/VeriFuzz/Sim/XST.hs @@ -18,6 +18,7 @@ module VeriFuzz.Sim.XST ) where +import Control.DeepSeq (NFData, rnf, rwhnf) import Data.Text (Text, unpack) import Prelude hiding (FilePath) import Shelly @@ -45,6 +46,9 @@ instance Synthesiser XST where synthOutput = xstOutput setSynthOutput (XST a b _) = XST a b +instance NFData XST where + rnf = rwhnf + defaultXST :: XST defaultXST = XST Nothing "xst" "syn_xst.v" diff --git a/src/VeriFuzz/Sim/Yosys.hs b/src/VeriFuzz/Sim/Yosys.hs index b7fae6b..c432afe 100644 --- a/src/VeriFuzz/Sim/Yosys.hs +++ b/src/VeriFuzz/Sim/Yosys.hs @@ -20,6 +20,7 @@ module VeriFuzz.Sim.Yosys ) where +import Control.DeepSeq (NFData, rnf, rwhnf) import Control.Lens import Data.Text (Text, unpack) import Prelude hiding (FilePath) @@ -49,6 +50,9 @@ instance Synthesiser Yosys where synthOutput = yosysOutput setSynthOutput (Yosys a b _) = Yosys a b +instance NFData Yosys where + rnf = rwhnf + defaultYosys :: Yosys defaultYosys = Yosys Nothing "yosys" "syn_yosys.v" -- cgit