Sep '15
gp_ifb
Imported from Blogger
Nice series.
I like your e - view, and the way you’re trying to recreate the capabilities you miss.
I use a lot of macro generated types, where the basic covergroup with coverpoint per item are defined. when I want to add a specific cross I inherit the types, add my cross, and sure, factory override it!
your post got me thinking to add cross coverage to already defined covergroup using the existing coverpoints,
Another possibility to use dynamic “Policy” (dynamic is called algorithm pattern, I think) is to put the object in a configuration object. which is also done in build phase. Not that I’m against overrides, I would have done the override straight from the top, without going into the build. Objects/Components are heavy with factory infrastructure that propagates the override into your object, your super.build() is searching this list anyway. So why not use it? declare that override from the test, without touching your build phase.
1 reply
Sep '15
▶ gp_ifb
TudorTimi
Verification Gentleman
Looking back at the last example I notice that it isn’t really that good. In a normal use case, you’d have the coverage collector already created in the base (generic) environment. Somewhere in the testbench we’d need to replace the policy object. That could be done anywhere: in the build of the test, of the testbench env, etc. Like you point out, the policy could also be a part of the config class and the testbench would override it when it’s configuring the CPU env.
Jul '16
I think your blog suggestions could soon be collected in a series such as
“effective SystemVerilog” and
“more effective SystemVerilog”
like Scott Meyers did for C++, Tudor!
Keep the great work!
thx
Alex Ogheri
Nov '17
sid_ifb
Imported from Blogger
How can I delete entries of sampled coverage if a reset is encountered in the middle of simulation and you want to discard previously sampled data and resample?
1 reply
Nov '17
▶ sid_ifb
TudorTimi
Verification Gentleman
I’d also love to be able to do this, to make transition coverage truly useful, but I don’t know any way of doing this and I’m afraid it’s not possible.
Mar '23
Hi Tudor,
I have seen many case about implemented the coverage with uvm_subscriber class.
BTW, I have seen also implemented coverage in the interface.
Could you let me know what is the difference? and benefit for interface?
1 reply
Sep '23
▶ Carter_Lee
TudorTimi
Verification Gentleman
Generally, I’d expect coverage in classes to be more controllable/extensible than coverage in interfaces, because it’s easier to access other info related to TB configuration.