lib.memory: Memory.{r,w}_ports.{read,write}_ports.

The abbreviated form was initially added to match `lib.fifo`, but it
looks very out of place on `lib.memory`, and we may be moving away from
such heavy use of abbreviations anyway.

While technically a breaking change, these attributes have very narrow
usefulness and so this change qualifies as "minor".
This commit is contained in:
Catherine 2024-03-22 21:19:27 +00:00
parent 2333c5f0af
commit 6ce82848d9
3 changed files with 10 additions and 12 deletions

View file

@ -207,18 +207,16 @@ class Memory(wiring.Component):
return WritePort(signature, memory=self, domain=domain,
src_loc_at=1 + src_loc_at)
# TODO: rename to read_ports
@property
def r_ports(self):
def read_ports(self):
"""All read ports defined so far.
This property is provided for the :py:`platform.get_memory()` override.
"""
return tuple(self._read_ports)
# TODO: rename to write_ports
@property
def w_ports(self):
def write_ports(self):
"""All write ports defined so far.
This property is provided for the :py:`platform.get_memory()` override.