• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

SOC/IP验证工程师

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

UVM中各个类的参数要求

1.uvm_object和uvm_compoent类
1.1 派生自uvm_object的类
除了派生自uvm_component类之外的类,几乎所有的类都派生自uvm_object。
uvm_transaction、uvm_sequence_item、uvm_sequence
1.2 派生自uvm_component的类
uvm_sequencer、uvm_driver、uvm_monitor、uvm_agent、uvm_scoreboard、uvm_env、uvm_test、uvm_root
reference_model可以直接派生自uvm_component。
但是uvm_sequencer类不是uvm树的结点。
uvm_component有两个特性是uvm_object特性所没有的,一是通过在new的时候指定parent参数来形成一种树形的组织关系,二是有phase的自动执行的特点。
所有的UVM树的结点都是由uvm_component组成的,只有基于uvm_component派生的类才可能称为uvm树的结点。

  1. 具有参数的类
class case0_sequence extends uvm_sequence #(my_transaction);
class my_driver extends uvm_driver#(my_transaction);
class my_sequencer extends uvm_sequencer #(my_transaction);
  1. 派生在uvm_component的create
sqr = my_sequencer::type_id::create("sqr", this);
drv = my_driver::type_id::create("drv", this);
mon = my_monitor::type_id::create("mon", this);
i_agt = my_agent::type_id::create("i_agt", this);
o_agt = my_agent::type_id::create("o_agt", this);
mdl = my_model::type_id::create("mdl", this);
scb = my_scoreboard::type_id::create("scb", this);
env  =  my_env::type_id::create("env", this); 

4.各种组件new的不同

class my_transaction extends uvm_sequence_item;
   function new(string name = "my_transaction");
      super.new();
   endfunction
endclass

class case0_sequence extends uvm_sequence #(my_transaction);
  function  new(string name= "case0_sequence");
    super.new(name);
  endfunction
endclass

其他
class chnl_driver extends uvm_driver #(chnl_trans);
  function new (string name = "chnl_driver", uvm_component parent);
    super.new(name, parent);
  endfunction
endclass

posted on 2022-08-05 23:04  SOC验证工程师  阅读(464)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3