Pages

Tuesday 17 December 2013

Dear Readers

One of our friends had a small confusion in build Phase of a UVM component.


Question:-   In some components the sub components  are initialized by “new()” function, sometimes the sub components  are initialized using “create()” method  inside build method.
So how to understand in what scenario this different ways is followed.


Victor Lyuboslavsky of edaplayground.com has explained it  nicely as below ,due credit goes to Victor

  
Using create() method does two things:

- register the component in the UVM hierarchy. create() must be used for structural components such as uvm_env, uvm_scoreboard, uvm_driver, etc.
- allow the code at a higher level (like at uvm_test) to override the type of component returned. It is a use of the Factory design pattern (https://en.wikipedia.org/wiki/Factory_design_pattern )

So, in short, only use new() if the component is not part of the UVM hierarchy (like a sequence item) AND you will never need to override that component with something else (like another subclass).


Hope you find this useful. All due credit to Victor Lyuboslavsky  ,thanks a lot Victor

-Happy Reading
Hash

Disclaimer : This is JUST a small place where i keep updating of small things i know of.
Am NO expert in UVM and  i learn from all possible resources  available and post it here for my OWN understanding.Due credit  goes to the resources/authors 

Wednesday 11 December 2013

Dear Readers

 Is it possible to covert all Errors into either Warnings/Info in UVM ?
 If Yes,lets try to covert all UVM_ERRORS to either Warnings/Info with a small example

Yes , it is possible per UVM1.1 Class reference guide _Final_06062011.pdf ,page no 62 


set_report_severity_override
function void set_report_severity_override(uvm_severity cur_severity,uvm_severity new_severity )

set_report_severity_id_override
function void set_report_severity_id_override(uvm_severity cur_severity,string id,uvm_severity new_severity )

These methods provide the ability to upgrade or downgrade a message in terms of severity given severity and id. An upgrade or downgrade for a specific id takes precedence over an upgrade or downgrade associated with a severity

Sample code coming up  EOB 12/15.

  -Happy Reading
Hash
Dear Readers



 ModelSim is JUST added  to EDA Playground, which supports SystemVerilog & UVM [everything except SV coverage, SV assertions & randomize() method] and  now we  can run UVM code on EDA Playground. 

Take a look at simple UVM TB @ http://www.edaplayground.com/s/example/546

Hope you find this useful

-Happy Reading
Hash