Can anyone tell me about how to make user defined phases, how to decide its hierarchy and how to call it?
Thanks,
Deepak
Can anyone tell me about how to make user defined phases, how to decide its hierarchy and how to call it?
Thanks,
Deepak
hi deepak, go through the class reference document, which is usage of uvm_phase class.
In reply to kbkdec15:
We do not recommend user defined phases. It is very difficult to integrate them with other components that do no use your set of phases. Combinations of sequences is a much more structured approach.
Hi kbkdec15,
Thanks for your reply. I have gone through class references and develop my custom phase. It is compiling and executing in the order that i want but the problem is when the “exec_func” function which is defined in my “uvm_PRESET_phase” class, calls by the “uvm_topdown_phase” class, it keeps on calling for 52 time on the same instance of time (i think with delta delay difference) and then switch to next phase defined in the domain.
Code is as follows-
class PRESET_comp extends uvm_component;
function new(string name, uvm_component parent = null);
super.new(name, parent);
endfunction
function void PRESET_phase(uvm_phase phase);
$display("MY COMPONENT");
endfunction
endclass :PRESET_comp
class uvm_PRESET_phase extends uvm_topdown_phase;
fifo_comp my_comp;
virtual function void exec_func(uvm_component comp, uvm_phase phase);
comp.phase_started(phase);
endfunction :exec_func
local static uvm_PRESET_phase temp;
static const string type_name = "uvm_PRESET_phase";
static function uvm_PRESET_phase get();
if(temp == null)
temp = new();
return temp;
endfunction :get
protected function new(string name = "PRESET");
super.new(name);
uvm_report_info(get_full_name(), "Start of Build NEW", UVM_LOW);
endfunction :new
endclass :uvm_PRESET_phase
so can you tell me why is this happening?
Thanks,
Deepak
In reply to dave_59:
Hi Dave,
Thanks for your reply.
please tell me how can i achieve the functionality of user defined phases by using combinations of sequences?
And can you elaborate more on why user defined phases are not recommended?
Thanks,
Deepak
In reply to deepak2407:
The easiest way to get the functionality you might be looking for is to use a hierarchy of sequences. There are many other ways of using sequences to get similar functionality of phases. I’d point you to the DVCon.org archive, but it seems to be down at the moment. Check back there later.
The biggest reason not to use the user-defined phases is that a lot of it just doesn’t work and is extremely difficult to debug if you don’t understand the UVM source code. The UVM committee has been struggling for the last two years to address the problem, but it is still unresolved. See the following example of the issues they are facing.
0003439: Make sequences phase aware.
0003593: Do not make sequences phase aware
0003767: no thread management for sequences upon phase transitions
In reply to dave_59:
Thanks Dave