Skip to content

Commit

Permalink
Read fifo status 2 times only in AHB mode
Browse files Browse the repository at this point in the history
  • Loading branch information
M0stafaRady committed Oct 10, 2024
1 parent bcd9ea7 commit 1031ccd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from uvm.macros import uvm_component_utils, uvm_fatal, uvm_info
import random
from spi_seq_lib.spi_base_seq import spi_base_seq

import cocotb

class spi_send_MISO_seq(spi_base_seq):
# use this sequence write or read from register by the bus interface
Expand All @@ -35,7 +35,8 @@ async def body(self):
)
for _ in range(self.num_data):
await self.wait_rx_fifo_not_empty()
await self.wait_rx_fifo_not_empty()# to make sure it's empty
if cocotb.plusargs["BUS_TYPE"] == "AHB": # since apb is so fast
await self.wait_rx_fifo_not_empty()# to make sure it's empty
if random.random() < 0.7: # 20% probability of reading
await self.send_req(is_write=False, reg="RXDATA")
uvm_info(self.tag, f"interation number {_}", UVM_MEDIUM)
Expand Down

0 comments on commit 1031ccd

Please sign in to comment.