OpenCores
URL https://opencores.org/ocsvn/lpffir/lpffir/trunk

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [tools/] [uvm_syoscb/] [tb/] [test/] [cl_scbtest_test_ooo_heavy.svh] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 vladimirar
//----------------------------------------------------------------------
2
//   Copyright 2014-2015 SyoSil ApS
3
//   All Rights Reserved Worldwide
4
//
5
//   Licensed under the Apache License, Version 2.0 (the
6
//   "License"); you may not use this file except in
7
//   compliance with the License.  You may obtain a copy of
8
//   the License at
9
//
10
//       http://www.apache.org/licenses/LICENSE-2.0
11
//
12
//   Unless required by applicable law or agreed to in
13
//   writing, software distributed under the License is
14
//   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
15
//   CONDITIONS OF ANY KIND, either express or implied.  See
16
//   the License for the specific language governing
17
//   permissions and limitations under the License.
18
//----------------------------------------------------------------------
19
// *NOTES*:
20
// Heavy OOO compare test using the function based API
21
// A 100 insertions returns after a little while, but 1000
22
// puts the CPU to sleep.
23
 
24
class cl_scbtest_test_ooo_heavy extends cl_scbtest_test_base;
25
  //-------------------------------------
26
  // UVM Macros
27
  //-------------------------------------
28
  `uvm_component_utils(cl_scbtest_test_ooo_heavy)
29
 
30
  //-------------------------------------
31
  // Constructor
32
  //-------------------------------------
33
  extern function new(string name = "cl_scbtest_test_ooo_heavy", uvm_component parent = null);
34
 
35
  //-------------------------------------
36
  // UVM Phase methods
37
  //-------------------------------------
38
  extern function void build_phase(uvm_phase phase);
39
  extern task run_phase(uvm_phase phase);
40
endclass: cl_scbtest_test_ooo_heavy
41
 
42
function cl_scbtest_test_ooo_heavy::new(string name = "cl_scbtest_test_ooo_heavy", uvm_component parent = null);
43
  super.new(name, parent);
44
endfunction : new
45
 
46
function void cl_scbtest_test_ooo_heavy::build_phase(uvm_phase phase);
47
        cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(),
48
                                             cl_syoscb_queue_std::get_type(),
49
                                                        "*");
50
 
51
        this.set_type_override_by_type(cl_syoscb_compare_base::get_type(),
52
                                 cl_syoscb_compare_ooo::get_type(),
53
                                 "*");
54
        super.build_phase(phase);
55
endfunction: build_phase
56
 
57
 
58
 
59
task cl_scbtest_test_ooo_heavy::run_phase(uvm_phase phase);
60
  super.run_phase(phase);
61
  for (int i=0; i<1000; i++) begin
62
    begin
63
      cl_scbtest_seq_item item1;
64
      item1 = cl_scbtest_seq_item::type_id::create("item1");
65
      item1.int_a = i;
66
      scbtest_env.syoscb[0].add_item("Q1", "P1", item1);
67
    end
68
    begin
69
      cl_scbtest_seq_item item1;
70
      item1 = cl_scbtest_seq_item::type_id::create("item1");
71
      item1.int_a = i+'h80000000;
72
      scbtest_env.syoscb[0].add_item("Q2", "P1", item1);
73
    end
74
  end
75
endtask: run_phase

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.