Cache clock edge event objects

This commit is contained in:
Alex Forencich
2021-12-03 19:06:43 -08:00
parent 3325568406
commit 2af7852006
12 changed files with 68 additions and 41 deletions

View File

@@ -264,8 +264,10 @@ class GmiiSource(Reset):
ifg_cnt = 0
self.active = False
clock_edge_event = RisingEdge(self.clock)
while True:
await RisingEdge(self.clock)
await clock_edge_event
if self.enable is None or self.enable.value:
if ifg_cnt > 0:
@@ -428,8 +430,10 @@ class GmiiSink(Reset):
frame = None
self.active = False
clock_edge_event = RisingEdge(self.clock)
while True:
await RisingEdge(self.clock)
await clock_edge_event
if self.enable is None or self.enable.value:
d_val = self.data.value.integer