Skip to content

Commit 0545d49

Browse files
committedJul 6, 2015
liteeth/core: add with_icmp parameter
1 parent e011f93 commit 0545d49

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

Diff for: ‎misoclib/com/liteeth/core/__init__.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88

99
class LiteEthIPCore(Module, AutoCSR):
10-
def __init__(self, phy, mac_address, ip_address, clk_freq):
10+
def __init__(self, phy, mac_address, ip_address, clk_freq, with_icmp=True):
1111
self.submodules.mac = LiteEthMAC(phy, 8, interface="crossbar", with_preamble_crc=True)
1212
self.submodules.arp = LiteEthARP(self.mac, mac_address, ip_address, clk_freq)
1313
self.submodules.ip = LiteEthIP(self.mac, mac_address, ip_address, self.arp.table)
14-
self.submodules.icmp = LiteEthICMP(self.ip, ip_address)
14+
if with_icmp:
15+
self.submodules.icmp = LiteEthICMP(self.ip, ip_address)
1516

1617

1718
class LiteEthUDPIPCore(LiteEthIPCore):
18-
def __init__(self, phy, mac_address, ip_address, clk_freq):
19-
LiteEthIPCore.__init__(self, phy, mac_address, ip_address, clk_freq)
19+
def __init__(self, phy, mac_address, ip_address, clk_freq, with_icmp=True):
20+
LiteEthIPCore.__init__(self, phy, mac_address, ip_address, clk_freq, with_icmp)
2021
self.submodules.udp = LiteEthUDP(self.ip, ip_address)

0 commit comments

Comments
 (0)
Please sign in to comment.