liteeth/core/arp: fix table timer (wait_timer adaptation issue)

This commit is contained in:
Florent Kermarrec 2015-06-23 00:25:26 +02:00
parent a3c0e5c4d9
commit 5c939b85ef
1 changed files with 2 additions and 3 deletions

View File

@ -195,18 +195,17 @@ class LiteEthARPTable(Module):
update.eq(1), update.eq(1),
NextState("CHECK_TABLE") NextState("CHECK_TABLE")
) )
self.sync += [ self.sync += \
If(update, If(update,
cached_valid.eq(1), cached_valid.eq(1),
cached_ip_address.eq(sink.ip_address), cached_ip_address.eq(sink.ip_address),
cached_mac_address.eq(sink.mac_address), cached_mac_address.eq(sink.mac_address),
).Else( ).Else(
cached_timer.wait.eq(1),
If(cached_timer.done, If(cached_timer.done,
cached_valid.eq(0) cached_valid.eq(0)
) )
) )
] self.comb += cached_timer.wait.eq(~update)
found = Signal() found = Signal()
fsm.act("CHECK_TABLE", fsm.act("CHECK_TABLE",
If(cached_valid, If(cached_valid,