UVMLint your testbench - findings
As verification engineers – we believe strongly in Trust-but-Verify mindset. So, as part of our #UVMLint value finding, we decided to run it on official examples shipped along with Accellera/IEEE UVM libraries. One of the most referred examples from UVM library is APB UVC/agent code:
Usually, the intention of such examples is to serve as “golden reference” for users to model their verification environments. However, no lint checks were done (at least officially/publicly) on such examples shipped with UVM so far – partly due to non-availability of such UVMLint solutions, partly due to lack of commonly agreed rules etc. So with the opensource PySlint was built by AsFigo during 2023, goal was to fill this void and democratize UVMLint to the wider user base. Fast forward – Feb 2024, we ran UVMLint on these examples and below is what we found:
While we ran a subset of rules on this small VIP/UVC, we are
thrilled by the findings from UVMLint. The official APB example in UVM library
shows 5 violations. Let’s focus on them in their order of importance as
perceived by our team of DV experts – your order could vary!
Reusability of UVC/Agents:
A typical UVC agent, by default being an active agent
(UVM_ACTIVE) looks as follows:
It has driver-sequencer driving stimulus to the DUT interface. As part of vertical reuse, any UVC should be built with reuse in mind and lend itself (with ZERO changes to the UVC) to be configured as PASSIVE. In case of a passive agent, driver-sequencer is “masked out” while monitor, subscriber(s) are still alive-and-kicking. So the same agent when configured as UVM_PASSIVE should behave as:
Of course this is UVM reuse 101 – why are we writing about
it in 2024, while UVM has been around since early 2010?
Hold your breath – our UVMLint has flagged a serious Reuse
related violation on the official UVM
library shipped example APB UVC:
Too good to be true isn’t? Prompt the UVMLint for more, and
you get:
We couldn’t believe it, so we opened uvm-1.2/examples/integrated/apb/apb_agent.sv
file and found:
Now, how many users got inspired by this template and wrote their UVC-s like this – well, use #UVMLint to see for yourself!
It requires couple of reviews and at least few hours to catch
this. With UVMLint – you can be done in few minutes.
Would like to have yours to be #UVMLint checked? Submit your request for a free health check.
For those
who got results tag and share for community benefit!
Enjoy #UVMLint
Comments
Post a Comment