bank/csrgen: allow specifying existing CSR interface

This commit is contained in:
Sebastien Bourdeauducq 2012-04-06 14:59:09 +02:00
parent 2a4e49e381
commit b9c533be51
1 changed files with 4 additions and 2 deletions

View File

@ -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 = []