yuanpin318的个人空间 https://blog.eetop.cn/13812 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

UVM scoreboard

已有 1276 次阅读| 2018-8-28 23:15 |个人分类:UVM|系统分类:芯片设计

UVM提供了base class

two derived comparator:
“uvm_in_order_build_in_comparator”: comparing streams of built-in types
“uvm_in_order_class_comparator”: comparing streams of class objects

“uvm_algorithmic_comparator": Compares two streams of data objects of different types, BEFORE and AFTER

 基本代码:
class xcoreboard extends uvm_scoreboard;
    typedef uvm_in_order_class_comparator#(packet) cmpr_t;
    cmpr_t cmpr;
    uvm_analysis_export#(packet) before_export;
    uvm_analysis_export#(packet) after_export;
    
    virtual function viod build_phase(uvm_phase phase);
          super.build_phase(phase);
          cmpr = cmpr_t::type_id::create("cmpr", this);
          before_export = new("before_export", this);
          after_export = new("after_export", this);
    endfunction: build_phase

    virtual function void connect_phase (uvm_hase phase);
        before_export.connect(cmpr.before_export);
        after_export.connect(cmpr.after_export);
     endfunction: connect_phase
endclass

class iMonitor extends uvm_monitor;
    ...
    uvm_analysis_port#(packet) analysis_port;
    ..

    virtual task main_phase(uvm_phase phase);
        ...
        tr = packet::type_id::create("tr");
        ...
        analysis_port.write(tr);
    endfunction: main_phase

点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 11

    粉丝
  • 2

    好友
  • 18

    获赞
  • 7

    评论
  • 3607

    访问数
关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-19 21:03 , Processed in 0.014674 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部