Jump to content

qinhailiang

Members
  • Content Count

    61
  • Joined

  • Last visited

About qinhailiang

  • Rank
    Advanced Member
  1. Hi, all When i read the uvm source code, I had a puzzle as follow: Why are the twelve runtime phases added into m_uvm_schedule phase instead of being added directly m_uvm_domain domain in file uvm_domain.svh? static function void add_uvm_phases(uvm_phase schedule); schedule.add(uvm_pre_reset_phase::get()); schedule.add(uvm_reset_phase::get()); schedule.add(uvm_post_reset_phase::get()); schedule.add(uvm_pre_configure_phase::get()); schedule.add(uvm_configure_phase::get()); schedule.add(uvm_post_configure_phase::get()); schedule.add(uvm_pre_ma
  2. Hi, all Thanks for your valuable informaiton. It is very useful to understand the cast operation. Thank you again. BR QIN
  3. Hi, Alan I modified the code as you said above, it worked well. Thank you for your value information. BR QIN
  4. Hi, Zhuang Thank you for your value information. I also want to know what the assignment of P1 with P2 does? BR
  5. Hi, Zhuang I modified the source code as you said as follow: class BasePacket; int A = 1; int C = 2; function void printA; $display("BasePacket::A is %d", A); endfunction : printA virtual function void printC; $display("BasePacket::C is %d", C); endfunction : printC endclass : BasePacket class My_Packet extends BasePacket; int A = 3; int C = 4; function void printA; $display("My_Packet::A is %d", A); endfunction: printA virtual function void printC; $display("My_Packet::C is %d", C); endfunction : printC endclass : My_Packet BaseP
  6. Hi, all //Case One class BasePacket; int A; endclass : BasePacket class My_Packet extends BasePacket; int C; endclass : My_Packet class BaseTest; BasePacket PB[string]; virtual function void Create_PKT(string s); PB = new(); endfunction : Create_PKT virtual function void Configure_PKT(string s); PB.A = 1; endfunction : Configure_PKT virtual function void printP(string s); $display("BaseTest::PB[%s].A is %d", s, PB.A); endfunction : printP endclass : BaseTest class My_Test extends BaseTest; virtual function void Create_PKT(string s); My_Packet MP =
  7. Hi, all I has an example as follow: class BasePacket; int A = 1; int C = 2; function void printA; $display("BasePacket::A is %d", A); endfunction : printA virtual function void printC; $display("BasePacket::C is %d", C); endfunction : printC endclass : BasePacket class My_Packet extends BasePacket; int A = 3; int C = 4; function void printA; $display("My_Packet::A is %d", A); endfunction: printA virtual function void printC; $display("My_Packet::C is %d", C); endfunction : printC endclass : My_Packet BasePacket P1 = new; M
  8. when the m_pool.add(obj, q) is called by the function add(T obj, uvm_callback cb, uvm_apprepend ordering=UVM_APPEND) in the class uvm_callbacks #(type T=uvm_object, type CB=uvm_callback), if q (i.e the entry you said) is null, the q will be newed, i.e the q (the entry) is not null.
  9. Hi, all There is a piece of code in the function m_add_tw_cbs of the uvm_typed_callbacks#(type T=uvm_object) of the file uvm_callback.sv as follow: if(m_t_inst.m_pool.first(obj)) begin do begin if($cast(me,obj)) begin q = m_t_inst.m_pool.get(obj); if(q==null) begin q=new; m_t_inst.m_pool.add(obj,q); end if(m_cb_find(q,cb) == -1) begin if(ordering == UVM_APPEND) q.push_back(cb); else q.push_front(cb); end end end while(m_t
  10. Hi, all We have one monitor and one driver as follow: class monitor extends uvm_monitor; `uvm_component_utils(monitor) function new(string name, uvm_component parent); super.new(name, parent); endfunction virtual task post_shutdown_phase(uvm_phase phase); #50ns; `uvm_info(get_type_name(), "Monitor is printing at post_shutdown_phase executing...", UVM_LOW ) endtask: post_shutdown_phase virtual function void phase_ready_to_end(uvm_phase phase); if(phase.get_name == "post_shutdown") `uvm_info(get_type_name(), "Monitor is printing
  11. Hi, all Why is not the 12 realtime phases directly wrapped by m_uvm_domain but also the m_uvm_schedule is inserted between m_uvm_domain and the 12 realtime phases? Thank you in advanced! BR QIN
×
×
  • Create New...