X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FTranslator.hs;h=fb02355b96156383a2112742b841bc50aa53ed57;hb=63fcf1474e5b94cbfcee702edf6a334601329dfe;hp=20dab4f7c77de618a2faebc2e97dc392ea17d02a;hpb=fcadaad2e47e5f6cba4b9f7d4341477b8fe74158;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Translator.hs" "b/c\316\273ash/CLasH/Translator.hs" index 20dab4f..fb02355 100644 --- "a/c\316\273ash/CLasH/Translator.hs" +++ "b/c\316\273ash/CLasH/Translator.hs" @@ -31,6 +31,7 @@ import CLasH.Translator.Annotations import CLasH.Utils.Core.CoreTools import CLasH.Utils.GhcTools import CLasH.VHDL +import CLasH.VHDL.Testbench -- | Turn Haskell to VHDL, Usings Strings to indicate the Top Entity, Initial -- State and Test Inputs. @@ -104,8 +105,8 @@ moduleToVHDL env cores topbinds' init test stateful = do let all_bindings = concat (map (\x -> CoreSyn.flattenBinds (HscTypes.cm_binds x)) cores) -- Store the bindings we loaded tsBindings %= Map.fromList all_bindings - --let testexprs = case testInput of [] -> [] ; [x] -> reduceCoreListToHsList x - createDesignFiles topbinds + test_binds <- Monad.zipWithM (createTestbench Nothing) testInput topbinds + createDesignFiles (topbinds ++ test_binds) mapM (putStr . render . Ppr.ppr . snd) vhdl return vhdl