From 9d13f612c17f3e26785af6f787146057a9cb3160 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 11 Oct 2023 09:09:02 +0200 Subject: [PATCH] core/arp: Fix missing set of response.mac_address in UPDATE_TABLE and reset update_count at the end of CLEAR state. Fixes #147. --- liteeth/core/arp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liteeth/core/arp.py b/liteeth/core/arp.py index 0a9f60d..31fbcfe 100644 --- a/liteeth/core/arp.py +++ b/liteeth/core/arp.py @@ -217,6 +217,7 @@ class LiteEthARPCache(LiteXModule): mem_wr_port_valid.eq(0), NextValue(update_count, update_count + 1), If(update_count == (entries - 1), + NextValue(update_count, 0), NextState("IDLE") ) ) @@ -320,6 +321,7 @@ class LiteEthARPTable(LiteXModule): cache.update.mac_address.eq(sink.mac_address), If(cache.update.ready, NextValue(request_pending, 0), + NextValue(response.mac_address, sink.mac_address), NextState("PRESENT_RESPONSE") ) ).Else(