From: Sebastien Bourdeauducq Date: Fri, 6 Apr 2012 12:59:09 +0000 (+0200) Subject: bank/csrgen: allow specifying existing CSR interface X-Git-Tag: 24jan2021_ls180~2099^2~952 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9c533be51a7f4a95670ce2a9a89573736e2b7ff;p=litex.git bank/csrgen: allow specifying existing CSR interface --- diff --git a/migen/bank/csrgen.py b/migen/bank/csrgen.py index 5f5437f3..f8db136a 100644 --- a/migen/bank/csrgen.py +++ b/migen/bank/csrgen.py @@ -3,10 +3,12 @@ from migen.bus.csr import * from migen.bank.description import * class Bank: - def __init__(self, description, address=0): + def __init__(self, description, address=0, interface=None): self.description = description self.address = address - self.interface = Interface() + if interface is None: + interface = Interface() + self.interface = interface def get_fragment(self): comb = []