From 94082601ca31c079065c494cc24020471e0d3e31 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 2 Feb 2019 22:13:57 +0000 Subject: Try to add logging --- src/VeriFuzz/XST.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/VeriFuzz/XST.hs') diff --git a/src/VeriFuzz/XST.hs b/src/VeriFuzz/XST.hs index 3d745fe..b72d975 100644 --- a/src/VeriFuzz/XST.hs +++ b/src/VeriFuzz/XST.hs @@ -39,16 +39,18 @@ defaultXst = runSynthXst :: Xst -> ModDecl -> FilePath -> Sh () runSynthXst sim m outf = do + dir <- pwd writefile xstFile $ xstSynthConfig m writefile prjFile [st|verilog work "rtl.v"|] writefile "rtl.v" $ genSource m - echoP "Run xst" - noPrint $ timeout_ (xstPath sim) ["-ifn", toTextIgnore xstFile] - echoP "Run netgen" - noPrint $ run_ (netgenPath sim) + echoP "XST: run" + _ <- logger dir "xst" $ timeout (xstPath sim) ["-ifn", toTextIgnore xstFile] + echoP "XST: netgen" + _ <- logger dir "netgen" $ run (netgenPath sim) ["-w", "-ofmt", "verilog", toTextIgnore $ modFile <.> "ngc", toTextIgnore outf] - echoP "Clean synthesized file" + echoP "XST: clean" noPrint $ run_ "sed" ["-i", "/^`ifndef/,/^`endif/ d; s/ *Timestamp: .*//;", toTextIgnore outf] + echoP "XST: done" where modFile = fromText $ modName m xstFile = modFile <.> "xst" -- cgit