X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Translator.hs;h=1a753c2d52b592af9dbc50811bf90b5330f35702;hb=6b3da07384004751bc64ef88429f452dfe1cee45;hp=c16406be3aef2781484251c56a21d3e5fb394f54;hpb=5b7046a2981a1e65483527cab15314dd140e0002;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Translator.hs b/Translator.hs index c16406b..1a753c2 100644 --- a/Translator.hs +++ b/Translator.hs @@ -42,10 +42,14 @@ import VHDLTypes import qualified VHDL main = do + makeVHDL "Alu.hs" "register_bank" + +makeVHDL :: String -> String -> IO () +makeVHDL filename name = do -- Load the module - core <- loadModule "Adders.hs" + core <- loadModule filename -- Translate to VHDL - vhdl <- moduleToVHDL core ["dff"] + vhdl <- moduleToVHDL core [name] -- Write VHDL to file writeVHDL vhdl "../vhdl/vhdl/output.vhdl" @@ -56,6 +60,7 @@ listBind filename name = do let binds = findBinds core [name] putStr "\n" putStr $ prettyShow binds + putStr $ showSDoc $ ppr binds putStr "\n\n" -- | Translate the binds with the given names from the given core module to