首页 > 其他 > 详细

uvm_scoreboard

时间:2019-03-13 11:59:43      阅读:256      评论:0      收藏:0      [点我收藏+]

http://www.eetop.cn/blog/index.php?uid/13812/action/viewspace/itemid/6826765/php/1

 
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

uvm_scoreboard

原文:https://www.cnblogs.com/littleMa/p/10521597.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!