X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FVHDL%2FConstants.hs;h=22bf14aabaac4e047905c5b8d7cf916fc9cc6768;hb=f3951a1376fc7d7f8addbe9e9fed071320502100;hp=e9c4a4a2d6efc87c73f897db8910691606972727;hpb=ec4378a8a765c5a064b5cbed347b40c353c778a0;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 e9c4a4a..22bf14a 100644 --- "a/c\316\273ash/CLasH/VHDL/Constants.hs" +++ "b/c\316\273ash/CLasH/VHDL/Constants.hs" @@ -1,5 +1,6 @@ -module Constants where - +module CLasH.VHDL.Constants where + +-- VHDL Imports import qualified Language.VHDL.AST as AST -------------- @@ -16,6 +17,8 @@ resetId, clockId :: AST.VHDLId resetId = AST.unsafeVHDLBasicId resetStr clockId = AST.unsafeVHDLBasicId clockStr +integerId :: AST.VHDLId +integerId = AST.unsafeVHDLBasicId "integer" -- | \"types\" identifier typesId :: AST.VHDLId @@ -123,6 +126,9 @@ initId = "init" tailId :: String tailId = "tail" +-- | minimum ftp function identifier +minimumId :: String +minimumId = "minimum" -- | take function identifier takeId :: String @@ -224,6 +230,40 @@ hwandId = "hwand" lengthTId :: String lengthTId = "lengthT" +fstId :: String +fstId = "fst" + +sndId :: String +sndId = "snd" + +splitId :: String +splitId = "split" + +-- Equality Operations +equalityId :: String +equalityId = "==" + +inEqualityId :: String +inEqualityId = "/=" + +gtId :: String +gtId = ">" + +ltId :: String +ltId = "<" + +gteqId :: String +gteqId = ">=" + +lteqId :: String +lteqId = "<=" + +boolOrId :: String +boolOrId = "||" + +boolAndId :: String +boolAndId = "&&" + -- Numeric Operations -- | plus operation identifier @@ -261,6 +301,39 @@ toUnsignedId = "to_unsigned" resizeId :: String resizeId = "resize" +resizeWordId :: String +resizeWordId = "resizeWord" + +resizeIntId :: String +resizeIntId = "resizeInt" + +smallIntegerId :: String +smallIntegerId = "smallInteger" + +sizedIntId :: String +sizedIntId = "SizedInt" + +tfvecId :: String +tfvecId = "TFVec" + +blockRAMId :: String +blockRAMId = "blockRAM" + +-- | output file identifier (from std.textio) +showIdString :: String +showIdString = "show" + +showId :: AST.VHDLId +showId = AST.unsafeVHDLExtId showIdString + +-- | write function identifier (from std.textio) +writeId :: AST.VHDLId +writeId = AST.unsafeVHDLBasicId "write" + +-- | output file identifier (from std.textio) +outputId :: AST.VHDLId +outputId = AST.unsafeVHDLBasicId "output" + ------------------ -- VHDL type marks ------------------ @@ -296,3 +369,11 @@ signedTM = AST.unsafeVHDLBasicId "signed" -- | unsigned TypeMark unsignedTM :: AST.TypeMark unsignedTM = AST.unsafeVHDLBasicId "unsigned" + +-- | string TypeMark +stringTM :: AST.TypeMark +stringTM = AST.unsafeVHDLBasicId "string" + +-- | tup VHDLName suffix +tupVHDLSuffix :: AST.VHDLId -> AST.Suffix +tupVHDLSuffix id = AST.SSimple id \ No newline at end of file