X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Translator.hs;h=ddd09fc340da9a401a24e1399c797de60c238234;hb=f39903a05a540e2438805792ac39a89dac1c8e99;hp=cf2fb966876c5ffd612d00360dfe772a4adf2110;hpb=0082f01a853476cdcec0e73bacf8c0d4508dbec0;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Translator.hs b/Translator.hs index cf2fb96..ddd09fc 100644 --- a/Translator.hs +++ b/Translator.hs @@ -42,10 +42,14 @@ import VHDLTypes import qualified VHDL main = do + makeVHDL "Alu.hs" "salu" + +makeVHDL :: String -> String -> IO () +makeVHDL filename name = do -- Load the module - core <- loadModule "Adders.hs" + core <- loadModule filename -- Translate to VHDL - vhdl <- moduleToVHDL core ["shifter"] + vhdl <- moduleToVHDL core [name] -- Write VHDL to file writeVHDL vhdl "../vhdl/vhdl/output.vhdl"