diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-05-11 18:29:06 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-05-11 18:29:06 +0100 |
commit | 805f67c07cc15d784078b00a84f4055f84016cec (patch) | |
tree | 15c93eb5102e3813515d41204deb3f86f78f1994 /src/Verismith/Tool/Icarus.hs | |
parent | 54bb059ab6955f58f4a4b95cdd080775a56bc793 (diff) | |
download | verismith-805f67c07cc15d784078b00a84f4055f84016cec.tar.gz verismith-805f67c07cc15d784078b00a84f4055f84016cec.zip |
Fix types with annotations
Diffstat (limited to 'src/Verismith/Tool/Icarus.hs')
-rw-r--r-- | src/Verismith/Tool/Icarus.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Verismith/Tool/Icarus.hs b/src/Verismith/Tool/Icarus.hs index 0fb2146..4b91652 100644 --- a/src/Verismith/Tool/Icarus.hs +++ b/src/Verismith/Tool/Icarus.hs @@ -103,7 +103,7 @@ mask = T.replace "x" "0" callback :: ByteString -> Text -> ByteString callback b t = b <> convert (mask t) -runSimIcarus :: Icarus -> (SourceInfo ann) -> [ByteString] -> ResultSh ByteString +runSimIcarus :: Show ann => Icarus -> (SourceInfo ann) -> [ByteString] -> ResultSh ByteString runSimIcarus sim rinfo bss = do let tb = ModDecl "main" @@ -159,7 +159,8 @@ counterTestBench (CounterEg _ states) m = tbModule filtered m where filtered = convert . fold . fmap snd . filter ((/= "clk") . fst) <$> states -runSimIc' :: (Synthesiser b) => ([ByteString] -> (ModDecl ann) -> (Verilog ann)) +runSimIc' :: (Synthesiser b, Show ann) + => ([ByteString] -> (ModDecl ann) -> (Verilog ann)) -> FilePath -> Icarus -> b @@ -194,7 +195,7 @@ runSimIc' fun datadir sim1 synth1 srcInfo bss bs = do tbname = fromText $ toText synth1 <> "_testbench.v" exename = toText synth1 <> "_main" -runSimIc :: (Synthesiser b) +runSimIc :: (Synthesiser b, Show ann) => FilePath -- ^ Data directory. -> Icarus -- ^ Icarus simulator. -> b -- ^ Synthesis tool to be tested. @@ -206,6 +207,6 @@ runSimIc :: (Synthesiser b) -> ResultSh ByteString runSimIc = runSimIc' tbModule -runSimIcEC :: (Synthesiser b) => FilePath -> Icarus -> b +runSimIcEC :: (Synthesiser b, Show ann) => FilePath -> Icarus -> b -> (SourceInfo ann) -> CounterEg -> Maybe ByteString -> ResultSh ByteString runSimIcEC a b c d e = runSimIc' (const $ counterTestBench e) a b c d [] |