liteeth/core/arp: fix table timer (wait_timer adaptation issue)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jun 2015 22:25:26 +0000 (00:25 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jun 2015 22:25:26 +0000 (00:25 +0200)
misoclib/com/liteeth/core/arp/__init__.py

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