📄 xbus_demo_sve.sv
字号:
// $Id: //dvt/vtech/dev/main/ovm/examples/xbus/examples/xbus_demo_sve.sv#5 $//----------------------------------------------------------------------// Copyright 2007-2008 Mentor Graphics Corporation// Copyright 2007-2008 Cadence Design Systems, 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.//----------------------------------------------------------------------`ifndef XBUS_DEMO_SVE_SV`define XBUS_DEMO_SVE_SV`include "xbus_demo_scoreboard.sv"`include "xbus_master_seq_lib.sv"`include "xbus_example_master_seq_lib.sv"`include "xbus_slave_seq_lib.sv"//------------------------------------------------------------------------------//// CLASS: xbus_demo_sve////------------------------------------------------------------------------------class xbus_demo_sve extends ovm_env; // Provide implementations of virtual methods such as get_type_name and create `ovm_component_utils(xbus_demo_sve) // xbus environment xbus_env xbus0; // Scoreboard to check the memory operation of the slave. xbus_demo_scoreboard scoreboard0; // new function new (string name, ovm_component parent=null); super.new(name, parent); endfunction : new // build virtual function void build(); super.build(); set_config_int("xbus0", "num_masters", 1); set_config_int("xbus0", "num_slaves", 1); $cast(xbus0, create_component("xbus_env", "xbus0")); xbus0.build(); $cast(scoreboard0, create_component("xbus_demo_scoreboard", "scoreboard0")); scoreboard0.build(); // Connect slave0 monitor to scoreboard xbus0.slaves[0].monitor.item_collected_port.connect( scoreboard0.item_collected_imp); // Assign interface for xbus0 xbus0.assign_vi(xbus_tb_top.xi0); // Set up slave address map for xbus0 xbus0.set_slave_address_map("slaves[0]", 0, 16'hffff); endfunction : build task run; begin end endtaskendclass : xbus_demo_sve`endif // XBUS_DEMO_SVE_SV
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -