core/arp: Fix missing set of response.mac_address in UPDATE_TABLE and reset update_count at the end of CLEAR state.

Fixes #147.
This commit is contained in:
Florent Kermarrec 2023-10-11 09:09:02 +02:00
parent e784bf8fd3
commit 9d13f612c1
1 changed files with 2 additions and 0 deletions

View File

@ -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(