Merge pull request #64 from mczerski/different_rx_tx_slots

allow for different nrxslots and ntxslots
This commit is contained in:
enjoy-digital 2021-03-19 08:56:39 +01:00 committed by GitHub
commit adf63f3fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ class LiteEthMACWishboneInterface(Module, AutoCSR):
wb_slaves = []
decoderoffset = log2_int(sram_depth, need_pow2=False)
decoderbits = log2_int(len(wb_sram_ifs))
rx_decoderbits = log2_int(len(wb_rx_sram_ifs))
tx_decoderbits = log2_int(len(wb_tx_sram_ifs))
decoderbits = max(rx_decoderbits, tx_decoderbits)+1
for n, wb_sram_if in enumerate(wb_sram_ifs):
def slave_filter(a, v=n):
return a[decoderoffset:decoderoffset+decoderbits] == v