X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FVHDL%2FConstants.hs;h=b9cbb0b1853b0949ebac5be513f1418151f5ddcb;hb=0dcd1ce078cbae64bc2b968b4c8233c9b94727dc;hp=9c372ecd711519d91ec05feafedd61133e798448;hpb=cba006ca253e6fcb39c0a82022e9704672997d3a;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/VHDL/Constants.hs" "b/c\316\273ash/CLasH/VHDL/Constants.hs" index 9c372ec..b9cbb0b 100644 --- "a/c\316\273ash/CLasH/VHDL/Constants.hs" +++ "b/c\316\273ash/CLasH/VHDL/Constants.hs" @@ -1,7 +1,22 @@ module CLasH.VHDL.Constants where - + +-- VHDL Imports import qualified Language.VHDL.AST as AST +-- | A list of all builtin functions. Partly duplicates the name table +-- in VHDL.Generate, but we can't use that map everywhere due to +-- circular dependencie. +builtinIds = [ exId, replaceId, headId, lastId, tailId, initId, takeId, dropId + , selId, plusgtId, ltplusId, plusplusId, mapId, zipWithId, foldlId + , foldrId, zipId, unzipId, shiftlId, shiftrId, rotlId, rotrId + , concatId, reverseId, iteratenId, iterateId, generatenId, generateId + , emptyId, singletonId, copynId, copyId, lengthTId, nullId + , hwxorId, hwandId, hworId, hwnotId, equalityId, inEqualityId, ltId + , lteqId, gtId, gteqId, boolOrId, boolAndId, plusId, timesId + , negateId, minusId, fromSizedWordId, fromIntegerId, resizeWordId + , resizeIntId, sizedIntId, smallIntegerId, fstId, sndId, blockRAMId + , splitId, minimumId + ] -------------- -- Identifiers -------------- @@ -235,6 +250,9 @@ fstId = "fst" sndId :: String sndId = "snd" +splitId :: String +splitId = "split" + -- Equality Operations equalityId :: String equalityId = "==" @@ -242,6 +260,18 @@ equalityId = "==" inEqualityId :: String inEqualityId = "/=" +gtId :: String +gtId = ">" + +ltId :: String +ltId = "<" + +gteqId :: String +gteqId = ">=" + +lteqId :: String +lteqId = "<=" + boolOrId :: String boolOrId = "||" @@ -285,6 +315,12 @@ toUnsignedId = "to_unsigned" resizeId :: String resizeId = "resize" +resizeWordId :: String +resizeWordId = "resizeWord" + +resizeIntId :: String +resizeIntId = "resizeInt" + smallIntegerId :: String smallIntegerId = "smallInteger" @@ -294,6 +330,9 @@ sizedIntId = "SizedInt" tfvecId :: String tfvecId = "TFVec" +blockRAMId :: String +blockRAMId = "blockRAM" + -- | output file identifier (from std.textio) showIdString :: String showIdString = "show" @@ -351,4 +390,4 @@ stringTM = AST.unsafeVHDLBasicId "string" -- | tup VHDLName suffix tupVHDLSuffix :: AST.VHDLId -> AST.Suffix -tupVHDLSuffix id = AST.SSimple id \ No newline at end of file +tupVHDLSuffix id = AST.SSimple id