diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-10-29 11:53:43 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-10-29 11:54:23 +0000 |
commit | 01c2ab3f6a58d416528efce3057e2cf2f1604489 (patch) | |
tree | e8716b6b2b2bd438df3680e0c927134ee8ae5c83 /src/Verismith/Tool/Template.hs | |
parent | 633522fc459439e6dff58509c7706ef831199fee (diff) | |
download | verismith-01c2ab3f6a58d416528efce3057e2cf2f1604489.tar.gz verismith-01c2ab3f6a58d416528efce3057e2cf2f1604489.zip |
Add data-file installation path
This removes the need to recursively copy the data directory which will also
save on space.
Diffstat (limited to 'src/Verismith/Tool/Template.hs')
-rw-r--r-- | src/Verismith/Tool/Template.hs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Verismith/Tool/Template.hs b/src/Verismith/Tool/Template.hs index c0cbfe1..d02daf8 100644 --- a/src/Verismith/Tool/Template.hs +++ b/src/Verismith/Tool/Template.hs @@ -89,8 +89,8 @@ write_verilog -force #{outf} |] -- brittany-disable-next-binding -sbyConfig :: (Synthesiser a, Synthesiser b) => a -> b -> SourceInfo -> Text -sbyConfig sim1 sim2 (SourceInfo top _) = [st|[options] +sbyConfig :: (Synthesiser a, Synthesiser b) => FilePath -> a -> b -> SourceInfo -> Text +sbyConfig datadir sim1 sim2 (SourceInfo top _) = [st|[options] multiclock on mode prove @@ -115,19 +115,21 @@ top.v depList = T.intercalate "\n" $ toTextIgnore - . (fromText "data" </>) + . (datadir </> fromText "data" </>) . fromText <$> deps readL = T.intercalate "\n" $ mappend "read -formal " <$> deps -icarusTestbench :: (Synthesiser a) => Verilog -> a -> Text -icarusTestbench t synth1 = [st| -`include "data/cells_cmos.v" -`include "data/cells_cyclone_v.v" -`include "data/cells_verific.v" -`include "data/cells_xilinx_7.v" -`include "data/cells_yosys.v" +icarusTestbench :: (Synthesiser a) => FilePath -> Verilog -> a -> Text +icarusTestbench datadir t synth1 = [st| +`include "#{ddir}/data/cells_cmos.v" +`include "#{ddir}/data/cells_cyclone_v.v" +`include "#{ddir}/data/cells_verific.v" +`include "#{ddir}/data/cells_xilinx_7.v" +`include "#{ddir}/data/cells_yosys.v" `include "#{toTextIgnore $ synthOutput synth1}" #{genSource t} |] + where + ddir = toTextIgnore datadir |