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"
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