Skip to content

Commit

Permalink
Revert "fhdl: translate the % operator too."
Browse files Browse the repository at this point in the history
This reverts commit e152de3.

Revert "sim: add support for %."

This reverts commit b7b92d4.
whitequark committed Oct 21, 2016
1 parent b7b92d4 commit d49805e
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 1 addition & 5 deletions migen/fhdl/structure.py
Original file line number Diff line number Diff line change
@@ -55,10 +55,6 @@ def __mul__(self, other):
return _Operator("*", [self, other])
def __rmul__(self, other):
return _Operator("*", [other, self])
def __mod__(self, other):
return _Operator("%", [self, other])
def __rmod__(self, other):
return _Operator("%", [other, self])
def __lshift__(self, other):
return _Operator("<<<", [self, other])
def __rlshift__(self, other):
@@ -529,7 +525,7 @@ def __init__(self, test, cases):
for k, v in cases.items():
if isinstance(k, (bool, int)):
k = Constant(k)
if (not isinstance(k, Constant)
if (not isinstance(k, Constant)
and not (isinstance(k, str) and k == "default")):
raise TypeError("Case object is not a Migen constant")
if not isinstance(v, _collections.Iterable):
9 changes: 4 additions & 5 deletions migen/sim/core.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ def __init__(self, description):
else:
high = False
self.clocks[k] = ClockState(high, half_period, half_period - phase)

def tick(self):
rising = set()
falling = set()
@@ -62,15 +62,14 @@ def tick(self):
"+": operator.add,
"-": operator.sub,
"*": operator.mul,
"%": operator.mod,


">>>": operator.rshift,
"<<<": operator.lshift,

"&": operator.and_,
"^": operator.xor,
"|": operator.or_,

"<": operator.lt,
"<=": operator.le,
"==": operator.eq,

0 comments on commit d49805e

Please sign in to comment.