X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash-nolibdir%2FCLasH%2FTranslator.hs;h=45c0ccaa961ced60c6c9df31a9f61b3d8b773ee6;hb=da5bb0c8cfdc783b2801cef3bc8d875d3f5b6f53;hp=77c1fe3f3dc65b2c351b95e8bbcaab6c23576806;hpb=20bfd1175196d07cb1da80813d6eb958560e62bd;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash-nolibdir/CLasH/Translator.hs" "b/c\316\273ash-nolibdir/CLasH/Translator.hs" index 77c1fe3..45c0cca 100644 --- "a/c\316\273ash-nolibdir/CLasH/Translator.hs" +++ "b/c\316\273ash-nolibdir/CLasH/Translator.hs" @@ -1,24 +1,27 @@ module CLasH.Translator where import qualified GHC.Paths -import qualified "clash" CLasH.Translator as Original (makeVHDL, makeVHDLAnn, listBindings, listBind) +import qualified "clash" CLasH.Translator as Original (makeVHDLStrings, makeVHDLAnnotations) -makeVHDL :: String -> String -> Bool -> IO () -makeVHDL filename name stateful = do +-- | Turn Haskell to VHDL, Usings Strings to indicate the Top Entity, Initial +-- State and Test Inputs. +makeVHDLStrings :: + -> [FilePath] -- ^ The FileNames + -> String -- ^ The TopEntity + -> String -- ^ The InitState + -> String -- ^ The TestInput + -> Bool -- ^ Is it stateful? (in case InitState is empty) + -> IO () +makeVHDLStrings filenames topentity initstate testinput stateful = do let libdir = GHC.Paths.libdir - Original.makeVHDL libdir filename name stateful + Original.makeVHDLStrings libdir filenames topentity initstate testinput stateful -makeVHDLAnn :: String -> IO () -makeVHDLAnn filename = do +-- | Turn Haskell to VHDL, Using the Annotations for Top Entity, Initial State +-- and Test Inputs found in the Files. +makeVHDLAnnotations :: + -> [FilePath] -- ^ The FileNames + -> Bool -- ^ Is it stateful? (in case InitState is not specified) + -> IO () +makeVHDLAnnotations libdir filenames stateful = do let libdir = GHC.Paths.libdir - Original.makeVHDLAnn libdir filename - -listBindings :: String -> IO [()] -listBindings filename = do - let libdir = GHC.Paths.libdir - Original.listBindings libdir filename - -listBind :: String -> String -> IO () -listBind filename name = do - let libdir = GHC.Paths.libdir - Original.listBind libdir filename name + Original.makeVHDLAnnotations libdir filenames stateful