fhdl: check we pass BV to signals
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 17 Feb 2012 22:50:54 +0000 (23:50 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 17 Feb 2012 22:50:54 +0000 (23:50 +0100)
migen/fhdl/structure.py

index fac607cd06778b4e3b7189d3f4df7623131420d8..0ca04b13c29e16b3a0eae4baad814ad9de81e2d5 100644 (file)
@@ -138,6 +138,7 @@ def _cst(x):
 
 class Signal(Value):
        def __init__(self, bv=BV(), name=None, variable=False, reset=0, name_override=None):
+               assert(isinstance(bv, BV))
                self.bv = bv
                self.variable = variable
                self.reset = Constant(reset, bv)