From: Florent Kermarrec Date: Thu, 29 Jan 2015 00:10:40 +0000 (+0100) Subject: simplify MAC dispatch (use onehot mode if Dispatcher) X-Git-Tag: 24jan2021_ls180~2604^2~111 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb9ec51de8cf3967b0b3c299f045bf037907a33b;p=litex.git simplify MAC dispatch (use onehot mode if Dispatcher) --- diff --git a/liteeth/__init__.py b/liteeth/__init__.py index a67e5b38..85adb3ac 100644 --- a/liteeth/__init__.py +++ b/liteeth/__init__.py @@ -11,16 +11,12 @@ class LiteEthIPStack(Module, AutoCSR): self.submodules.ip = ip = LiteEthMACIP() # MAC dispatch - self.submodules.unknown_sink = unknown_sink = Sink(eth_mac_description(8)) - self.comb += unknown_sink.ack.eq(1) - self.submodules.mac_dispatcher = mac_dispatcher = Dispatcher(mac.source, [arp.sink, ip.sink, unknown_sink]) + self.submodules.mac_dispatcher = mac_dispatcher = Dispatcher(mac.source, [arp.sink, ip.sink], one_hot=True) self.comb += [ If(mac.source.eth_type == ethernet_type_arp, - mac_dispatcher.sel.eq(0) - ).Elif(mac.source.eth_type == ethernet_type_ip, mac_dispatcher.sel.eq(1) - ).Else( - mac_dispatcher.sel.eq(2) # connect to unknown sink that always acknowledge data + ).Elif(mac.source.eth_type == ethernet_type_ip, + mac_dispatcher.sel.eq(2) ) ] # MAC arbitrate