Skip to content

Commit

Permalink
Revert "liteeth: clean up CSR collection code"
Browse files Browse the repository at this point in the history
This reverts commit 0130cd6.
sbourdeauducq committed Aug 20, 2017
1 parent 0130cd6 commit bbcf121
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misoc/cores/liteeth_mini/mac/__init__.py
Original file line number Diff line number Diff line change
@@ -6,14 +6,15 @@
from misoc.cores.liteeth_mini.mac.wishbone import LiteEthMACWishboneInterface


class LiteEthMAC(Module):
class LiteEthMAC(Module, AutoCSR):
def __init__(self, phy, dw,
interface="wishbone",
endianness="big",
with_preamble_crc=True,
nrxslots=2,
ntxslots=2):
self.submodules.core = LiteEthMACCore(phy, dw, endianness, with_preamble_crc)
self.csrs = []
if interface == "wishbone":
self.submodules.interface = LiteEthMACWishboneInterface(dw, nrxslots, ntxslots)
self.comb += [
@@ -24,3 +25,6 @@ def __init__(self, phy, dw,
self.csrs = self.interface.get_csrs() + self.core.get_csrs()
else:
raise NotImplementedError

def get_csrs(self):
return self.csrs

0 comments on commit bbcf121

Please sign in to comment.