class WritePort(Elaboratable):
- def __init__(self, memory, *, domain="sync", priority=0, granularity=None):
+ def __init__(self, memory, *, domain="sync", granularity=None):
if granularity is None:
granularity = memory.width
if not isinstance(granularity, int) or granularity < 0:
self.memory = memory
self.domain = domain
- self.priority = priority
self.granularity = granularity
self.addr = Signal.range(memory.depth,
p_WIDTH=self.data.width,
p_CLK_ENABLE=1,
p_CLK_POLARITY=1,
- p_PRIORITY=self.priority,
+ p_PRIORITY=0,
i_CLK=ClockSignal(self.domain),
i_EN=Cat(Repl(en_bit, self.granularity) for en_bit in self.en),
i_ADDR=self.addr,
wrport = mem.write_port()
self.assertEqual(wrport.memory, mem)
self.assertEqual(wrport.domain, "sync")
- self.assertEqual(wrport.priority, 0)
self.assertEqual(wrport.granularity, 8)
self.assertEqual(len(wrport.addr), 2)
self.assertEqual(len(wrport.data), 8)
wrport = mem.write_port(granularity=2)
self.assertEqual(wrport.memory, mem)
self.assertEqual(wrport.domain, "sync")
- self.assertEqual(wrport.priority, 0)
self.assertEqual(wrport.granularity, 2)
self.assertEqual(len(wrport.addr), 2)
self.assertEqual(len(wrport.data), 8)