How many phases UVM has explain each :-
How virtual sequence and virtual sequencer works ?
What is new,create ,build ?
How TLM works ?
- We call
run_test(if you don’t remember, see the line 17 of thetopmodule in Tasting), which in turn calls therun_testtask of theuvm_rootclass. - The
uvm_rootcalls them_run_phasestask of theuvm_phaseclass. - For each phase, the
execute_phasetask is called. - If the phase is a top-down or bottom-up phase,
exec_funcis called for each component. - For example, the
exec_funccalls thebuild_phasefunction of each component. - If the phase is a task phase,
exec_taskis called for each component. - For example, the
exec_taskcalls themain_phasetask of each component. - The
uvm_phasechecks if any objections are raised by the components. Thephase_doneis theuvm_objectionobject that theuvm_phasekeeps track of the number of objections with. When we calledphase.raise_objection()from inside therun_phaseof thejelly_bean_testclass (see the line 27 of thejelly_bean_testclass in Tasting),phase_done.raise_objection()is called in theuvm_phaseunder the hood. - If no objection is raised, all the processes started by the
exec_taskare killed. In other words, unless an objection is raised, the phase is immediately killed! - The steps 3 to 9 repeat until all phases are executed.
Why Final_phase is toptodown();
The final_phase() exists in UVM only for arrangements which run multiple loops around run..extract..check..report phases in a loop and then jump back to run() for the next iteration of multiple concatenated tests. Support for this is only partially defined or implemented in UVM today and is unlikely to be widely used in the industry (I would not recommend it for any use model that I am aware of).
However if this technique is used, there is a need for a final_phase() which is guaranteed to be the last phase before simulation exits, unlike report_phase() which may loop back. Why top-down? If one used this looped multiple test arrangement, final_phase() would be used for any cleanup required outside the loop, and hence it is top down, to ensure control from the topmost level of your test environment of that multiple test loop
However if this technique is used, there is a need for a final_phase() which is guaranteed to be the last phase before simulation exits, unlike report_phase() which may loop back. Why top-down? If one used this looped multiple test arrangement, final_phase() would be used for any cleanup required outside the loop, and hence it is top down, to ensure control from the topmost level of your test environment of that multiple test loop
Why build phase and connect phase is top to down and bottom to up ?
The
build_phase has to be top-down because the parent component creates the child components (not the other way around). It also allows the parent component to configure the child components. On the other hand, the connect_phase, for example, is bottom-up. It allows the parent component to verify that the child components are connected properly.
http://cluelogic.com/2014/08/uvm-tutorial-for-candy-lovers-phasing/
How objection mechanism works
How virtual sequence and virtual sequencer works ?
What is new,create ,build ?
- The
newfunction creates an object ofjelly_bean_agent. It also creates the handles foruvm_analysis_port,jelly_bean_sequencer,jelly_bean_driver, andjelly_bean_monitor. However, these handles arenullbecause we have not created the objects for them yet. - The
build_phasefunction creates the components mentioned above. We callednewto create an object ofuvm_analysis_port. However, we calledcreateto create the other components in case we want to override the component type later. - The
createfunction asks the UVM factory to create an object. The UVM factory knows which component to create even if the component type is overridden. The factory (or to be precise,uvm_component_registry) will callnewon behalf of you.
How TLM works ?

No comments:
Post a Comment