From 0545d492949ee519d464bfbee8caf7421220e2cb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 6 Jul 2015 21:23:19 +0200 Subject: [PATCH] liteeth/core: add with_icmp parameter --- misoclib/com/liteeth/core/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misoclib/com/liteeth/core/__init__.py b/misoclib/com/liteeth/core/__init__.py index d099485f..176e6b1f 100644 --- a/misoclib/com/liteeth/core/__init__.py +++ b/misoclib/com/liteeth/core/__init__.py @@ -7,14 +7,15 @@ from misoclib.com.liteeth.core.icmp import LiteEthICMP 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) -- 2.30.2