uvm_scoreboard——得分

本文详细介绍了UVM Scoreboard的概念及其实现方法。Scoreboard作为验证平台的重要组成部分,通过接收来自UVM代理的输入和输出交易,利用参考模型来验证被测设备(DUT)的功能正确性。文章还提供了定义Scoreboard的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  scoreboard 是验证平台很重要的一部分,因为,验证就是给激励,然后,检查结果。而scoreboard 就是肩负这检查结果的重任。测试用例能不能过,全由scoreboard说了算。

  A scoreboard is a verification component that contains checkers and verifies the functionality of a design. It usually receives transactions carrying inputs and outputs of the DUT from a UVM agent via TLM Analysis Ports, which then runs the input packets through some kind of a reference model that would mimic the behavior of DUT to produce expected data. The final task is to compare expected results with the actual output data from DUT. The reference model is also called a predictor.

To define a scoreboard:

  • Create a custom class inherited from uvm_scoreboard
  • Add the TLM export necessary to communicate with different monitors
  • Define the action to be taken when the export is called
//------------------------------------------------------------------------------
//
// CLASS: uvm_scoreboard
//
// The uvm_scoreboard virtual class should be used as the base class for 
// user-defined scoreboards.
//
// Deriving from uvm_scoreboard will allow you to distinguish scoreboards from
// other component types inheriting directly from uvm_component. Such 
// scoreboards will automatically inherit and benefit from features that may be
// added to uvm_scoreboard in the future.
//------------------------------------------------------------------------------

virtual class uvm_scoreboard extends uvm_component;

  // Function: new
  //
  // Creates and initializes an instance of this class using the normal
  // constructor arguments for <uvm_component>: ~name~ is the name of the
  // instance, and ~parent~ is the handle to the hierarchical parent, if any.

  function new (string name, uvm_component parent);
    super.new(name, parent);
  endfunction

  const static string type_name = "uvm_scoreboard";

  virtual function string get_type_name ();
    return type_name;
  endfunction

endclass

 

参考文献:

1 Scoreboard. http://www.chipverify.com/uvm/scoreboard.

转载于:https://www.cnblogs.com/dpc525/p/7992837.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值