URL
https://opencores.org/ocsvn/lpffir/lpffir/trunk
Subversion Repositories lpffir
[/] [lpffir/] [trunk/] [uvm/] [tools/] [uvm_syoscb/] [tb/] [test/] [cl_scbtest_test_io_simple.svh] - Rev 4
Compare with Previous | Blame | View Log
//----------------------------------------------------------------------// Copyright 2014-2015 SyoSil ApS// 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.//----------------------------------------------------------------------// *NOTES*:// Simple IO compare test using the function based APIclass cl_scbtest_test_io_simple extends cl_scbtest_test_base;//-------------------------------------// UVM Macros//-------------------------------------`uvm_component_utils(cl_scbtest_test_io_simple)//-------------------------------------// Constructor//-------------------------------------extern function new(string name = "cl_scbtest_test_io_simple", uvm_component parent = null);//-------------------------------------// UVM Phase methods//-------------------------------------extern function void build_phase(uvm_phase phase);extern task run_phase(uvm_phase phase);endclass : cl_scbtest_test_io_simplefunction cl_scbtest_test_io_simple::new(string name = "cl_scbtest_test_io_simple", uvm_component parent = null);super.new(name, parent);endfunction : newfunction void cl_scbtest_test_io_simple::build_phase(uvm_phase phase);cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(),cl_syoscb_queue_std::get_type(),"*");this.set_type_override_by_type(cl_syoscb_compare_base::get_type(),cl_syoscb_compare_io::get_type(),"*");super.build_phase(phase);endfunction: build_phasetask cl_scbtest_test_io_simple::run_phase(uvm_phase phase);super.run_phase(phase);forkfor(int unsigned i=0; i<10; i++) begincl_scbtest_seq_item item1;item1 = cl_scbtest_seq_item::type_id::create("item1");item1.int_a = i;scbtest_env.syoscb[0].add_item("Q1", "P1", item1);endfor(int unsigned i=0; i<10; i++) begincl_scbtest_seq_item item1;item1 = cl_scbtest_seq_item::type_id::create("item1");item1.int_a = i;scbtest_env.syoscb[0].add_item("Q2", "P1", item1);endjoinendtask: run_phase
