Happy Diwali & Prosperous New Year!


Diwali is the biggest and the brightest festivals celebrated by families around the world. Deepavali (actual name of Diwali) means "a row of lights." This auspicious day is also known as the "festival of lights. There is a saying “A Happiness can be found from darkest of dark if one knows how to switch on the light”! 

The evil need not necessarily come in the form of demons, it can come as depression, desperation, and frustration which can cause more damage. Diwali is a reminder to slay all that is negative to our life. 

There is so much happening during this whole week, people start preparing for Diwali, shops (e-shops J) are full of sales and there is light all over. People celebrate Diwali with many other things like firecrackers, visiting friends and family places and having lots of sweets! Well, I miss those days celebrating Diwali with lots of firecrackers and lights on streets with friends. A lot of regulation here, but still we manage to celebrate with some of the crackers in our patio J One of these years, I am going to take a vacation to celebrate Diwali back hometown to renew my Diwali spirit. On Diwali days, people use to do colorful rangoli at their house.

Diwali is one of the biggest and brightest festivals in India and we do celebrate it with full of enthusiasm and happiness. I would like to celebrate this Diwali by expressing thanks to all my friends, family members, near and dear ones! You all are awesome and I am lucky to have you all in my life. 

Diwali is the last day of Gujarati Year, Today, Vikram Samvat 2075 begins. So wishing you all a Happy New Gujarati Year. May this new year come with lots of happiness in your life.

May This Diwali be as bright as ever and brings joy, health, and wealth to you and your family. May this Diwali bring you the utmost in peace and prosperity. We wish you all a Happy Diwali and a prosperous new year!

Happy Diwali & Happy New Year!
ASIC With Ankit

System Verilog UVM Callbacks: Development and Usage

What is callback? If you know System Verilog, Easily explainable example is post_randomize() method which allows users to execute logic after an object has been randomized.
Callbacks are pre-defined hooks that allow users to influence a verification environment from outside the environment.

The UVM callbacks allow reusable environments to define our own hooks for our application needs. The main advantage of a callback is the ability to combine multiple extensions that are created by multiple teams into a single testbench.

How to Define Callbacks?

First thing, verification engineer to decide is to an interface to make available. Let’s take an example. Say for example you want to add a callback to modify a data packages after it is randomized. This can be implemented as below:


Second thing, we need to do is to register the callback type with the type that will use the callback. This registration enables UVM to do type checking when a user tries to add a callback to a specific object.


If you miss the registration, UVM issues a warning that the callback type was not registered with the object type.

Now, let’s understand how you insert the callback.
We will now insert a call to the callback functions in the code, UVM provides a utility macro to make the process very easy.


How to use Callback?

Now we have callback class defined and can be used as necessary in the testbench to modify the generated data before its driven on DUT. Now, let’s see how we use it in the test bench.


Once this is done, you need to attach the callback to a specific instance from your test case and then run a test. With this implementation when you run your simulation, this callbacks will update/modify randomized packets before driver drives it to the DUT signals.

This type of mechanism is useful in many places such as for error injection, data corruption, missed transaction etc…

Happy Reading,