From 1031ccd329d56508969e875baabbb7f50242bbe7 Mon Sep 17 00:00:00 2001 From: M0stafaRady Date: Thu, 10 Oct 2024 17:07:17 +0300 Subject: [PATCH] Read fifo status 2 times only in AHB mode --- verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py b/verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py index 6401f35..66c9f68 100644 --- a/verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py +++ b/verify/uvm-python/spi_seq_lib/spi_send_MISO_seq.py @@ -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 @@ -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)