From 82f77180d5cdb62f95ffea7c98bf1da383c3ea2d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 7 Dec 2011 22:21:10 +0100 Subject: [PATCH] fhdl: cleanup value bv --- migen/fhdl/structure.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 5f70b3338..16fa1ee81 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -19,9 +19,6 @@ class BV: return r class Value: - def __init__(self, bv): - self.bv = bv - def __add__(self, other): return Operator("+", [self, other]) def __radd__(self, other): @@ -98,10 +95,7 @@ class Cat(Value): class Constant(Value): def __init__(self, n, bv=None): - if bv == None: - Value.__init__(self, BV(BitsFor(n))) - else: - Value.__init__(self, bv) + self.bv = bv or BV(BitsFor(n)) self.n = n def _cst(x): @@ -112,7 +106,6 @@ def _cst(x): class Signal(Value): def __init__(self, bv=BV(), name="anonymous", variable=False, reset=0): - Value.__init__(self, bv) self.bv = bv self.variable = variable self.name = name