Merge pull request #1486 from alanvgreen/terms

litex/soc: update API to avoid unfortunate terms
This commit is contained in:
enjoy-digital 2022-11-03 21:25:48 +01:00 committed by GitHub
commit b8e007540c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -408,6 +408,9 @@ class SoCBusHandler(LiteXModule):
colorer(name, color="underline"),
colorer("added", color="green")))
def add_controller(self, name=None, controller=None):
self.add_master(self, name=name, master=controller)
def add_slave(self, name=None, slave=None, region=None):
no_name = name is None
no_region = region is None
@ -440,6 +443,9 @@ class SoCBusHandler(LiteXModule):
colorer(name, color="underline"),
colorer("added", color="green")))
def add_peripheral(self, name=None, peripheral=None, region=None):
self.add_slave(self, name=name, slave=peripheral, region=region)
def get_address_width(self, standard):
standard_from = self.standard
standard_to = standard

View File

@ -149,7 +149,12 @@ class InterconnectPointToPoint(Module):
class Arbiter(Module):
def __init__(self, masters, target):
def __init__(self, masters=None, target=None, controllers=None):
assert target is not None
assert (masters is not None) or (controllers is not None)
if controllers is not None:
masters = controllers
self.submodules.rr = roundrobin.RoundRobin(len(masters))
# mux master->slave signals