diff --git a/migen/sim.py b/migen/sim.py index 37882d6ab..c6ddea55b 100644 --- a/migen/sim.py +++ b/migen/sim.py @@ -110,6 +110,7 @@ class Evaluator: raise NotImplementedError def assign(self, signal, value): + assert not signal.variable value = value & (2**signal.nbits - 1) if signal.signed and (value & 2**(signal.nbits - 1)): value -= 2**signal.nbits