# SPI test cases

**URL:** <https://verificationacademy.com/forums/t/spi-test-cases/42024>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [July 28, 2023, 6:19am UTC](https://verificationacademy.com/forums/t/spi-test-cases/42024 "2023-07-28T06:19:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Husni\_Mahdi](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/h/ea666f/32.png) [@Husni\_Mahdi](https://verificationacademy.com/forums/u/Husni_Mahdi)\
**Post date:** [July 28, 2023, 6:19am UTC](https://verificationacademy.com/forums/t/spi-test-cases/42024/1 "2023-07-28T06:19:41Z")

</div>

Hello everyone,

Concerning SPI transfer tests (interrupt/slave select/…etc) during the time SPI transfer happens do we need to constantly read the CTRL reg until GO\_BUSY == BUSY?? Or should the APB be kept idle??

If auto slave select and Interrupt enable both are 'h0 the SPI transfer takes, apb\_idle\_cycles = (div\_reg\_value+1)_(2_CTRL[6:0]+1) clock cycles. This can be passed from the sequence as keeping apb idle for. And afterwards read ctrl to check if GO\_BUSY == BUSY. This approach is not as flexible as the checking GO\_BUSY. But, I presume, the module when under use won’t be constantly read during transfer.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [July 28, 2023, 1:06pm UTC](https://verificationacademy.com/forums/t/spi-test-cases/42024/2 "2023-07-28T13:06:36Z")

</div>

_In reply to [Husni Mahdi](https://verificationacademy.com/forums/t/spi-test-cases/42024):_

This would depend on the design of your SPI IP core. You should refer to the IP documentation for additional information on how to use the core.
