# Wait\_on\_bfm\_sync\_start()... why?

**URL:** <https://forum.uvvm.org/t/wait-on-bfm-sync-start-why/452>\
**Category:** General questions\
**Created:** [June 30, 2024, 7:22pm UTC](https://forum.uvvm.org/t/wait-on-bfm-sync-start-why/452 "2024-06-30T19:22:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gastone](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Gastone](https://forum.uvvm.org/u/Gastone)\
**Post date:** [June 30, 2024, 7:22pm UTC](https://forum.uvvm.org/t/wait-on-bfm-sync-start-why/452/1 "2024-06-30T19:22:31Z")

</div>

Hello!

Probably a stupid question. As far as I know In a synchronous project Output change\Input sampled on rising edge (or falling edge) of clock cycle. So, every BFM write\read procedure should be star whit a signal delayed-assignment (operator \<=)\acquisition (operator :=) and terminate with “wait until rising\_edge(clk)”. Buti in ANY bitvis\_vip implementation VVC I see the following structure:

```auto
wait_on_bfm_sync_start(..);
...
wait_until_bfm_sync_start();
...
wait_on_bfm-sync_exit()

```

Due to wait\_on\_bfm\_sync\_start new data will be imposed on the falling\_edge of clock cycle. Of course it works fine in simulation but this is not what happen in the real world.

My question is: what is the correct usage of wait\_on\_bfm\_sync\_start()\wait\_on\_bfm\_exit()?

I suspect they are relevant only in conjunction with SYNC\_WITH\_SETUP\_AND\_HOLD parameter.

Regards

---

<div class="post-metadata">

**Author:** ![UVVM\_Team](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/uvvm_team/32/102_2.png) [@UVVM\_Team](https://forum.uvvm.org/u/UVVM_Team)\
**Post date:** [July 11, 2024, 3:10pm UTC](https://forum.uvvm.org/t/wait-on-bfm-sync-start-why/452/2 "2024-07-11T15:10:34Z")

</div>

Hi, You syncronize the accesses in one out of two ways: [t\_alert\_level — UVVM documentation](https://uvvm.github.io/types_pkg.html#t-bfm-sync)

- Default: Using falling edges - making sure you have enought setup and hold time.  
In the real world you get new data somewhere between the previous and the next rising edge. The falling edge is thus something in the middle, that also allows you to see the accesses more clearly in the wave view.
- You can also choose to synchronize using setup and hold, but that required you to set up the relevanrt timing parameters in the BFM for that.

Regards  
The UVVM team
