其他分享
首页 > 其他分享> > [UVM]UVM RAL Adapter

[UVM]UVM RAL Adapter

作者:互联网

                                    UVM RAL Adapter

 

       With the UVM Register model, we do design register access, i.e WRITE to the design register or READ from the design register by calling RAL methods. Finally, these transactions have to be placed to design bus, this will be done by RAL component Adapter.

       The RAL adapter acts as a converter between the RAL model and Interface. It converts transactions of RAL methods to Interface/Bus transactions.

一、UVM RAL reg2bus

二、UVM RAL bus2reg

class tb_env extends uvm_env;
  reg_model                     regmodel;
  uvm_reg_predictor#(ahb_trans) ahb2reg_predictor;
  reg2ahb_adapter               reg_adapter;
  ahb_agent                     ahb;
 
  virtual function void build_phase(uvm_phase phase);
    ahb2reg_predictor = new(“ahb2reg_predictor”, this);
  endfunction
 
  virtual function void connect_phase(uvm_phase phase);
    if (regmodel.get_parent() == null) begin
      reg_adapter = reg2ahb_adapter::type_id::create(“reg_adapter”,,get_full_name());
      ...
      ahb2reg_predictor.map     = regmodel.AHB;
      ahb2reg_predictor.adapter = reg_adapter;
      ahb.monitor.ap.connect(ahb2reg_predictor.bus_in);
    end
    ...
  endfunction
  ...
endclass

 

标签:RAL,transactions,adapter,reg,UVM,phase,Adapter,predictor
来源: https://blog.csdn.net/gsjthxy/article/details/105298783