# Slave sequence & driver cookbook example

**URL:** <https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274>\
**Category:** UVM\
**Tags:** UVM, Cookbook-SequencesSlave, APB3-Slave-Agent-UVM-Simulation\
**Created:** [July 6, 2021, 12:00am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274 "2021-07-06T00:00:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![peegu](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/8c91f0/32.png) [@peegu](https://verificationacademy.com/forums/u/peegu)\
**Post date:** [July 6, 2021, 12:00am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/1 "2021-07-06T00:00:14Z")

</div>

In the APB3 slave agent website, there is code that is available to download. I have downloaded the code and looked it over.  
Question: Is there a website that has this code simulated? Meaning, the code is compiled and run through a simulator like modelsim?  
Please do let me know know since I’d like to follow the code/signals while it is running.

Website of shared code (It is the single sequence that is tar.gz)  
[https://verificationacademy.com/cookbook/sequences/slave](https://verificationacademy.com/cookbook/sequences/slave)

Example Download Link  
Complete APB3 Slave Agent   
Download-tarball.png Download a complete working example related to this page content  
(tarball: uvm\_slave\_agent.tgz)

Thanks in advance !!!

---

<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:** [July 6, 2021, 9:17am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/2 "2021-07-06T09:17:28Z")

</div>

_In reply to [peegu](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274):_  
What’s your problem?  
This is UVM-1.2 code. Setup your simulator properly and it works perfectly.

---

<div class="post-metadata">

**Author:** ![peegu](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/8c91f0/32.png) [@peegu](https://verificationacademy.com/forums/u/peegu)\
**Post date:** [July 6, 2021, 10:15pm UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/3 "2021-07-06T22:15:26Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/2):_

Could you share a snapshot a waveform with the interface signals?  
There seems to be files that are not relevant. Are the 2 files below being used?  
apb\_if.sv  
ef\_apb\_slave\_agent\_config.svh

I believe I have compiled it correctly, but when I run it…nothing is happening.

Thanks in advance !!!

---

<div class="post-metadata">

**Author:** ![rag123](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rag123](https://verificationacademy.com/forums/u/rag123)\
**Post date:** [July 7, 2021, 2:31am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/4 "2021-07-07T02:31:15Z")

</div>

Did you give the test name while running? Can you post the code or minimal example?

---

<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:** [July 7, 2021, 7:19am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/5 "2021-07-07T07:19:02Z")

</div>

_In reply to [peegu](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/4):_

A lot is happening. But you do not see the waves and the testbench is very quiet. I believe this is your problem.  
You do not see the waves because this coding approach is not using the SV interface. Instead it uses the BFM as interface. You can put in to the driver and the monitor more uvm\_infos to indicate what is happening.  
It’s up to you to judge this approach. I do my UVM environments differently using the virtual interface instead of the BFM.

---

<div class="post-metadata">

**Author:** ![peegu](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/8c91f0/32.png) [@peegu](https://verificationacademy.com/forums/u/peegu)\
**Post date:** [July 8, 2021, 12:15am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/6 "2021-07-08T00:15:48Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/5):_

I finally got to see the waveform signals. What timescale are you using?  
-timescale=1ns/1ns is this correct?

Also, the apb\_listener is giving an error because the transfers do not equal 60.  
I do see a repeat(60 in apb\_slave\_sequence.svh and I added a count there. It seems to be sending 60 transfers, but the apb\_listener is not recognizing all 60. Do you know what triggers the “transfers” count in apb\_listener?

Thanks in advance !!!

---

<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:** [July 8, 2021, 6:48am UTC](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/7 "2021-07-08T06:48:55Z")

</div>

_In reply to [peegu](https://verificationacademy.com/forums/t/slave-sequence-driver-cookbook-example/39274/6):_

The timescale does not matter as all modules/interfaces have the same one. Because it is not defined the simulator settings are used instead.  
I do not see an error and the listener is observing all 60 transactions. Its write method is called by the monitor\_bfm.  
And I see all (60) transactions for req and rsp.  
To summarize: this is a good example as a UVM testbench should NOT be, totally quiet, reporting only number you could somply fake. And it does not follow the basic rule: asap - as simple as possible.  
The listener is not needed.  
And I do not like bfm approach. In my eyes it makes the code more complicated.  
I did not change the code, I was only inserting report commands to visualize the testbench execution.  
I could share my could with you if you respond on my email  
[christoph@christoph-suehnel.de](mailto:christoph@christoph-suehnel.de)
