# GPIO\_CHECK\_STABLE is not ignoring changes on bits I define as don't care. Bug?

**URL:** <https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475>\
**Category:** VVC\
**Tags:** gpio\
**Created:** [January 30, 2025, 9:01pm UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475 "2025-01-30T21:01:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfragoza1](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gfragoza1](https://forum.uvvm.org/u/gfragoza1)\
**Post date:** [January 30, 2025, 9:01pm UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/1 "2025-01-30T21:01:04Z")

</div>

I have 5 signals of an SLV hooked up to a GPIO VVC. They are outputs of the DUT. I just want to make sure that the MSB has remained stable ‘0’ for the previous 5 ms. Here is a snippet of my code:  
wait for 5 ms;  
gpio\_check\_stable(GPIO\_VVCT, 1, “0----”, 5 ms, “Make sure no IRQ\_OUT occurs”, ERROR);  
await\_completion(GPIO\_VVCT, 1, 100 \* C\_CLK\_PERIOD);

The Questa simulator shows an error

# UVVM: =================================================================================================================================================

# UVVM: \*\*\* ERROR #1 \*\*\*

# UVVM: 5168790 ns GPIO\_VVC,1

# UVVM: gpio\_check\_stable(x"0X", 5000000 ns) =\> Failed. Switched from x01 to x03 500 ns ago. Expected stable for 5000000 ns

Why is is monitoring changes on the don’t care bits?

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [February 2, 2025, 12:46pm UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/2 "2025-02-02T12:46:40Z")

</div>

Hi,  
We will need to investigate this issue. Thanks for reporting.

Regards,  
Marius

---

<div class="post-metadata">

**Author:** ![gfragoza1](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gfragoza1](https://forum.uvvm.org/u/gfragoza1)\
**Post date:** [February 17, 2025, 4:37pm UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/3 "2025-02-17T16:37:56Z")

</div>

Hi Marius, Has any progress been made on this? Were you able to recreate it? Thanks Gary

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [February 20, 2025, 8:11am UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/4 "2025-02-20T08:11:10Z")

</div>

Hi Gary,  
I don’t think this issue has been addressed yet, but I’ve increased its priority to high. I’ll keep you updated on how it progresses.

Br,  
Marius

---

<div class="post-metadata">

**Author:** ![Juon9](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/juon9/32/151_2.png) [@Juon9](https://forum.uvvm.org/u/Juon9)\
**Post date:** [February 28, 2025, 8:14am UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/5 "2025-02-28T08:14:19Z")

</div>

Hi,

We have looked into the issue. As you stated, we also observed that _gpio\_check\_stable_ does not ignore changes in the don’t-care bits of an SLV. The _gpio\_check\_stable()_ procedure calls the _check\_stable()_ procedure and it uses the _last\_event_ attribute to store the time since the last event on a signal. Since _last\_event_ is applied to the entire SLV (_slv’last\_event_), it records the time of the last event on any bit within the vector. This is why _gpio\_check\_stable_ does not ignore don’t-care bits and alerts an error.

However, we do not see an easy way to retrieve _last\_event_ on a single element of an SLV. We attempted to do so using a for-loop with indexing, (_i.e., slv(i)'last\_event_), but encountered a compile error stating:

```auto
error: prefix of 'last_event attribute must be a static name

```

The only way this works is if the vector length is fixed before compilation and the index is known at elaboration time, e.g., _slv(0)'last\_event, slv(1)'last\_event_, etc. If you know any workaround for this limitation, please let us know.

You may use the std\_logic overload variant of _check\_stable()_, which is defined in _methods\_pkg.vhd_ to check the stability of a single bit. However, we are unsure if this would be sufficient for your application.

Therefore, we concluded that it is not possible to ignore changes in don’t-care bits in an SLV using the _gpio\_check\_stable / check\_stable_ procedure. Nevertheless, we noticed that some comments in the implementation might be misleading, and the GPIO documentation does not clearly specify on using don’t-care bits in an SLV. To address this, we will update the documentation and implementation comments for clarity.

If you have any further questions, please let us know.

Best regards,  
Jusong / The UVVM Team

---

<div class="post-metadata">

**Author:** ![gfragoza1](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gfragoza1](https://forum.uvvm.org/u/gfragoza1)\
**Post date:** [March 17, 2025, 6:35pm UTC](https://forum.uvvm.org/t/gpio-check-stable-is-not-ignoring-changes-on-bits-i-define-as-dont-care-bug/475/6 "2025-03-17T18:35:35Z")

</div>

Thanks so much for the detailed explanation. check\_stable does work fine with what I’m trying to do. Cheers, Gary
