⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sb_callbacks.sv

📁 VMM 文档加源码, synopsys公司很好的验证资料
💻 SV
字号:
// // -------------------------------------------------------------//    Copyright 2004-2008 Synopsys, Inc.//    All Rights Reserved Worldwide// //    Licensed under the Apache License, Version 2.0 (the//    "License"); you may not use this file except in//    compliance with the License.  You may obtain a copy of//    the License at// //        http://www.apache.org/licenses/LICENSE-2.0// //    Unless required by applicable law or agreed to in//    writing, software distributed under the License is//    distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR//    CONDITIONS OF ANY KIND, either express or implied.  See//    the License for the specific language governing//    permissions and limitations under the License.// -------------------------------------------------------------// //// Description : Scoreboard Integration/Callbacks////               This class is DUT specific, and connects the scoreboard//               to the Testbench.//-----------------------------------------------------------------------------// Scoreback Connection via APB Master Callback Class//-----------------------------------------------------------------------------typedef class fifo_master;typedef class dut_sb;    class fifo_master_sb_callbacks extends fifo_master_callbacks;  dut_sb sb;      // Constructor  function new(dut_sb sb);    this.sb = sb;  endfunction: new      // Callbacks before a transaction is started  virtual task master_pre_tx(fifo_master    xactor,                             ref fifo_trans trans,                             ref bit        drop);   // Empty  endtask  // Callback after a transaction is completed  virtual task master_post_tx(fifo_master xactor,                              fifo_trans  trans);    // Lab6 - call the scoreboard task from_master() and pass trans    sb.from_master(trans);                                               //LAB6  endtaskendclass: fifo_master_sb_callbacks//-----------------------------------------------------------------------------// APB Monitor Callback Class//-----------------------------------------------------------------------------typedef class fifo_monitor;  class fifo_monitor_sb_callbacks extends fifo_monitor_callbacks;  dut_sb sb;       // Constructor  function new(dut_sb sb);    this.sb = sb;  endfunction: new  // Callbacks before a transaction is started  virtual task monitor_pre_rx(fifo_monitor    xactor,                              ref fifo_trans trans);  endtask  // Callback after a transaction is completed  virtual task monitor_post_rx(fifo_monitor xactor,                               fifo_trans  trans);      this.sb.from_monitor(trans);  endtaskendclass: fifo_monitor_sb_callbacks

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -