From b9c533be51a7f4a95670ce2a9a89573736e2b7ff Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 6 Apr 2012 14:59:09 +0200 Subject: [PATCH] bank/csrgen: allow specifying existing CSR interface --- migen/bank/csrgen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 = [] -- 2.30.2