# APB Dual Timer VIP

**URL:** <https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988>\
**Category:** UVM\
**Tags:** UVM, APB\
**Created:** [January 5, 2020, 2:24pm UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988 "2020-01-05T14:24:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdzaheer92](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@mdzaheer92](https://verificationacademy.com/forums/u/mdzaheer92)\
**Post date:** [January 5, 2020, 2:24pm UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/1 "2020-01-05T14:24:13Z")

</div>

Hi,

Anyone suggest me how to write a test case for free running, periodic and oneshot mode with automatic interrupt generation after reaches 0

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 5, 2020, 6:25pm UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/2 "2020-01-05T18:25:27Z")

</div>

_In reply to [mdzaheer92](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988):_

Could you please elaborate. The APB spec does not know the term ‘Äoneshot mode’.

---

<div class="post-metadata">

**Author:** ![mdzaheer92](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@mdzaheer92](https://verificationacademy.com/forums/u/mdzaheer92)\
**Post date:** [January 6, 2020, 4:57am UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/3 "2020-01-06T04:57:01Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/2):_

Hi, i have been developing APB Dual Input timer VIP, i’m facing issue while writing test cases with the help of APB im doing register configuration,but till what time i need to wait to get interrupt high, how to code this.  
EX.periodic mode- load some random 32 bit value and the timer do down count and when it reaches 0 interrupt is high, need to clear interrupt after it

---

<div class="post-metadata">

**Author:** ![mdzaheer92](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/47e85d/32.png) [@mdzaheer92](https://verificationacademy.com/forums/u/mdzaheer92)\
**Post date:** [January 11, 2020, 6:24pm UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/4 "2020-01-11T18:24:52Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/3):_

hi,

I am looking solution for apb timer vip, how to write test case with interrupt generation for periodic/oneshot and free running modes

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 14, 2020, 6:54pm UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/5 "2020-01-14T18:54:07Z")

</div>

_In reply to [mdzaheer92](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/4):_

The solution is to write SV assertions (SVA) which reflect exactly this timing. SVA provides constructs also to model behavior which has no fixed timing like an interrupt has. You are expecting the interrupt in a timimng range of a certain length.

---

<div class="post-metadata">

**Author:** ![mr.kry](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@mr.kry](https://verificationacademy.com/forums/u/mr.kry)\
**Post date:** [May 5, 2020, 10:58am UTC](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/6 "2020-05-05T10:58:04Z")

</div>

_In reply to [mdzaheer92](https://verificationacademy.com/forums/t/apb-dual-timer-vip/36988/5):_

Hi, have you written the test cases, I am also facing the same issue
