Skip to content

Commit

Permalink
core/arp: Fix missing set of response.mac_address in UPDATE_TABLE and…
Browse files Browse the repository at this point in the history
… reset update_count at the end of CLEAR state.

Fixes #147.
  • Loading branch information
enjoy-digital committed Oct 11, 2023
1 parent e784bf8 commit 9d13f61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions liteeth/core/arp.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def __init__(self, entries, clk_freq):
mem_wr_port_valid.eq(0),
NextValue(update_count, update_count + 1),
If(update_count == (entries - 1),
NextValue(update_count, 0),
NextState("IDLE")
)
)
Expand Down Expand Up @@ -320,6 +321,7 @@ def __init__(self, clk_freq, entries=1, max_requests=8):
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(
Expand Down

0 comments on commit 9d13f61

Please sign in to comment.