ruby: slicc: allow mathematical operations on Ticks
authorNilay Vaish <nilay@cs.wisc.edu>
Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)
src/mem/slicc/ast/OperatorExprAST.py

index b1614b6a00c65daf02e5a69bc3cacb82277ff5fb..7752e9c07acbc921f326f121be88997dce9c184d 100644 (file)
@@ -67,6 +67,7 @@ class InfixOperatorExprAST(ExprAST):
             elif self.op in ("+", "-", "*", "/"):
                 expected_types = [("int", "int", "int"),
                                   ("Cycles", "Cycles", "Cycles"),
+                                  ("Tick", "Tick", "Tick"),
                                   ("Cycles", "int", "Cycles"),
                                   ("Scalar", "int", "Scalar"),
                                   ("int", "bool", "int"),