Skip to content

Commit

Permalink
Changed monitor sample to prepone region of correct clock edge
Browse files Browse the repository at this point in the history
  • Loading branch information
gtaylormb committed Sep 21, 2021
1 parent a3e22f7 commit 2aa3a1f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/cocotb_bus/monitors/avalon.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ async def _monitor_recv(self):

# Avoid spurious object creation by recycling
clkedge = RisingEdge(self.clock)
rdonly = ReadOnly()

def valid():
if hasattr(self.bus, "ready"):
Expand All @@ -59,7 +58,6 @@ def valid():
# NB could await on valid here more efficiently?
while True:
await clkedge
await rdonly
if valid():
vec = self.bus.data.value
vec.big_endian = self.config["firstSymbolInHighOrderBits"]
Expand Down Expand Up @@ -130,7 +128,6 @@ async def _monitor_recv(self):

# Avoid spurious object creation by recycling
clkedge = RisingEdge(self.clock)
rdonly = ReadOnly()
pkt = b""
in_pkt = False
invalid_cyclecount = 0
Expand All @@ -143,7 +140,6 @@ def valid():

while True:
await clkedge
await rdonly

if self.in_reset:
continue
Expand Down

0 comments on commit 2aa3a1f

Please sign in to comment.