|
7 | 7 |
|
8 | 8 |
|
9 | 9 | 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): |
11 | 11 | self.submodules.mac = LiteEthMAC(phy, 8, interface="crossbar", with_preamble_crc=True)
|
12 | 12 | self.submodules.arp = LiteEthARP(self.mac, mac_address, ip_address, clk_freq)
|
13 | 13 | 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) |
15 | 16 |
|
16 | 17 |
|
17 | 18 | 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) |
20 | 21 | self.submodules.udp = LiteEthUDP(self.ip, ip_address)
|
0 commit comments