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

📄 config.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.// -------------------------------------------------------------// class wb_cfg;   typedef enum {BYTE, WORD, DWORD, QWORD} sizes_e;   rand sizes_e port_size;   rand sizes_e granularity;   typedef enum {CLASSIC, REGISTERED} cycle_types_e;   rand cycle_types_e cycles;   rand integer max_n_wss;   constraint wb_cfg_valid {      granularity <= port_size;      max_n_wss >= 0;   }   constraint reasonable_max_n_wss {      max_n_wss == 10;   }   constraint supported {      port_size   == DWORD;      granularity == BYTE;       cycles      == CLASSIC;   }   constraint tc1;   constraint tc2;   constraint tc3;   task display(string prefix = "");      $write("%s\n", this.psdisplay(prefix));   endtask: display   virtual function string psdisplay(string prefix = "");      $sformat(psdisplay, "%0s%0s %0s size, %0s granularity. Max WSS=%0d",               prefix, this.cycles.name(), this.port_size.name(), this.granularity.name(),               this.max_n_wss);   endfunction: psdisplayendclass: wb_cfgclass wb_slave_cfg extends wb_cfg;   rand bit [63:0] min_addr;   rand bit [63:0] max_addr;   constraint wb_slave_cfg_valid {      max_addr >= min_addr;   }   virtual function string psdisplay(string prefix = "");      $sformat(psdisplay, "%0s at [%h:%h]",               super.psdisplay(prefix), this.min_addr, this.max_addr);   endfunction: psdisplayendclass: wb_slave_cfg

⌨️ 快捷键说明

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