From 1460f069f6fc709541bc32b103ea1540951d5195 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 26 Nov 2012 19:36:43 +0100 Subject: [PATCH] fhdl/structure: remove deprecated MemoryPort --- migen/fhdl/structure.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 791d47f5..16dd435f 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -308,8 +308,7 @@ class Instance(HUID): (READ_FIRST, WRITE_FIRST, NO_CHANGE) = range(3) -# NOTE: Direct use of MemoryPort is deprecated. Use Memory.get_port() instead. -class MemoryPort: +class _MemoryPort: def __init__(self, adr, dat_r, we=None, dat_w=None, async_read=False, re=None, we_granularity=0, mode=WRITE_FIRST, clock_domain="sys"): @@ -323,13 +322,12 @@ class MemoryPort: self.mode = mode self.clock_domain = clock_domain -# NOTE: ports parameter will be removed class Memory(HUID): - def __init__(self, width, depth, *ports, init=None): + def __init__(self, width, depth, init=None): super().__init__() self.width = width self.depth = depth - self.ports = list(ports) + self.ports = [] self.init = init def get_port(self, write_capable=False, async_read=False, @@ -352,7 +350,7 @@ class Memory(HUID): re = Signal() else: re = None - mp = MemoryPort(adr, dat_r, we, dat_w, + mp = _MemoryPort(adr, dat_r, we, dat_w, async_read, re, we_granularity, mode, clock_domain) self.ports.append(mp) -- 2.30.2