migen/bank/description: add reset parameter to CSRStatus
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 31 May 2014 10:03:19 +0000 (12:03 +0200)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Sun, 15 Jun 2014 21:54:38 +0000 (23:54 +0200)
migen/bank/description.py

index 8632dd2c13d1af45d6788009d725082ae2660918..7bb3b95a929f0f43998578481b0fcec7f071551d 100644 (file)
@@ -33,9 +33,9 @@ class _CompoundCSR(_CSRBase, Module):
                raise NotImplementedError
 
 class CSRStatus(_CompoundCSR):
-       def __init__(self, size=1, name=None):
+       def __init__(self, size=1, reset=0, name=None):
                _CompoundCSR.__init__(self, size, name)
-               self.status = Signal(self.size)
+               self.status = Signal(self.size, reset=reset)
 
        def do_finalize(self, busword):
                nwords = (self.size + busword - 1)//busword