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

📄 if.sv

📁 VMM 文档加源码, synopsys公司很好的验证资料
💻 SV
字号:
//// Template for VMM-compliant interface//// <IF>        Name of physical bus//`ifndef IF__SV`define IF__SV`include "vmm.sv"// ToDo: One clock per clock domain  interface IF(input bit ck1,             input bit ck2);   // ToDo: Define default setup & hold times   parameter setup_time = 5/*ns*/;   parameter hold_time  = 3/*ns*/;   // ToDo: Define synchronous and asynchronous signals as wires   wire [15:0] sync_txd;   wire [15:0] sync_rxd;   wire [15:0] sync_dat;   wire        async_en;   wire        async_rdy;   // ToDo: Define one clocking block per clock domain   //       with synchronous signal direction from a   //       master perspective   clocking mck1 @(posedge ck1);      default input #setup_time output #hold_time;      output sync_txd;      inout  sync_dat;   endclocking: mck1   clocking mck2 @(posedge ck2);      default input #setup_time output #hold_time;      input sync_rxd;   endclocking: mck2   // ToDo: Define one clocking block per clock domain   //       with synchronous signal direction from a   //       slave perspective   clocking sck1 @(posedge ck1);      default input #setup_time output #hold_time;      input sync_txd;      inout sync_dat;   endclocking: sck1   clocking sck2 @(posedge ck2);      default input #setup_time output #hold_time;      output sync_rxd;   endclocking: sck2   // ToDo: Define one clocking block per clock domain   //       with synchronous signal direction from a   //       monitor perspective   clocking pck1 @(posedge ck1);      default input #setup_time output #hold_time;      input sync_txd;      input sync_dat;   endclocking: pck1   clocking pck2 @(posedge ck2);      default input #setup_time output #hold_time;      input sync_rxd;   endclocking: pck2   // ToDo: Define a modport for each master, slave and   //       monitor, with appropriate asynchronous signal   //       directions and clocking blocks   modport master(clocking mck1,                  clocking mck2,                  output async_en,                  input  async_rdy);   modport slave(clocking sck1,                 clocking sck2,                 input  async_en,                 output async_rdy);   modport passive(clocking pck1,                   clocking pck2,                   input async_en,                   input async_rdy);endinterface: IF`endif

⌨️ 快捷键说明

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