Skip to content

Commit

Permalink
liteeth/core: add with_icmp parameter
Browse files Browse the repository at this point in the history
enjoy-digital committed Jul 6, 2015
1 parent e011f93 commit 0545d49
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions misoclib/com/liteeth/core/__init__.py
Original file line number Diff line number Diff line change
@@ -7,14 +7,15 @@


class LiteEthIPCore(Module, AutoCSR):
def __init__(self, phy, mac_address, ip_address, clk_freq):
def __init__(self, phy, mac_address, ip_address, clk_freq, with_icmp=True):
self.submodules.mac = LiteEthMAC(phy, 8, interface="crossbar", with_preamble_crc=True)
self.submodules.arp = LiteEthARP(self.mac, mac_address, ip_address, clk_freq)
self.submodules.ip = LiteEthIP(self.mac, mac_address, ip_address, self.arp.table)
self.submodules.icmp = LiteEthICMP(self.ip, ip_address)
if with_icmp:
self.submodules.icmp = LiteEthICMP(self.ip, ip_address)


class LiteEthUDPIPCore(LiteEthIPCore):
def __init__(self, phy, mac_address, ip_address, clk_freq):
LiteEthIPCore.__init__(self, phy, mac_address, ip_address, clk_freq)
def __init__(self, phy, mac_address, ip_address, clk_freq, with_icmp=True):
LiteEthIPCore.__init__(self, phy, mac_address, ip_address, clk_freq, with_icmp)
self.submodules.udp = LiteEthUDP(self.ip, ip_address)

0 comments on commit 0545d49

Please sign in to comment.