mac/sram: Minor cleanup by directly using port instead of ports[n] in the loop.

This commit is contained in:
Florent Kermarrec 2023-10-10 14:55:26 +02:00
parent 8b2bd00a95
commit 79600f954a
1 changed files with 2 additions and 2 deletions

View File

@ -289,8 +289,8 @@ class LiteEthMACSRAMReader(Module, AutoCSR):
# Connect Memory ports. # Connect Memory ports.
cases = {} cases = {}
for n, port in enumerate(ports): for n, port in enumerate(ports):
self.comb += ports[n].re.eq(read) self.comb += port.re.eq(read)
self.comb += ports[n].adr.eq(length[int(math.log2(dw//8)):]) self.comb += port.adr.eq(length[int(math.log2(dw//8)):])
cases[n] = [rd_data.eq(port.dat_r)] cases[n] = [rd_data.eq(port.dat_r)]
self.comb += Case(rd_slot, cases) self.comb += Case(rd_slot, cases)