From: Christiaan Baaij Date: Tue, 8 Sep 2009 11:28:17 +0000 (+0200) Subject: Add some gt,lt,gteq and lteq boolean operators X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=4f5949f4e4451111010d1a4f67206f07b41f77a5;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add some gt,lt,gteq and lteq boolean operators --- diff --git "a/c\316\273ash/CLasH/VHDL/Constants.hs" "b/c\316\273ash/CLasH/VHDL/Constants.hs" index 71c1c21..03688eb 100644 --- "a/c\316\273ash/CLasH/VHDL/Constants.hs" +++ "b/c\316\273ash/CLasH/VHDL/Constants.hs" @@ -242,6 +242,18 @@ equalityId = "==" inEqualityId :: String inEqualityId = "/=" +gtId :: String +gtId = ">" + +ltId :: String +ltId = "<" + +gteqId :: String +gteqId = ">=" + +lteqId :: String +lteqId = "<=" + boolOrId :: String boolOrId = "||" diff --git "a/c\316\273ash/CLasH/VHDL/Generate.hs" "b/c\316\273ash/CLasH/VHDL/Generate.hs" index ecaad62..1e6f28f 100644 --- "a/c\316\273ash/CLasH/VHDL/Generate.hs" +++ "b/c\316\273ash/CLasH/VHDL/Generate.hs" @@ -1446,6 +1446,10 @@ globalNameTable = Map.fromList , (hwnotId , (1, genOperator1 AST.Not ) ) , (equalityId , (2, genOperator2 (AST.:=:) ) ) , (inEqualityId , (2, genOperator2 (AST.:/=:) ) ) + , (ltId , (2, genOperator2 (AST.:<:) ) ) + , (lteqId , (2, genOperator2 (AST.:<=:) ) ) + , (gtId , (2, genOperator2 (AST.:>:) ) ) + , (gteqId , (2, genOperator2 (AST.:>=:) ) ) , (boolOrId , (2, genOperator2 AST.Or ) ) , (boolAndId , (2, genOperator2 AST.And ) ) , (plusId , (2, genOperator2 (AST.:+:) ) )