SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_io_std_simple_real.svh
1 /// Simple IO compare test on real values using the function based API
2 class cl_scb_test_io_std_simple_real extends cl_scb_test_single_scb;
3  //-------------------------------------
4  // UVM Macros
5  //-------------------------------------
6  `uvm_component_utils(cl_scb_test_io_std_simple_real)
7 
8  //-------------------------------------
9  // Constructor
10  //-------------------------------------
11  extern function new(string name = "cl_scb_test_io_std_simple_real", uvm_component parent = null);
12 
13  //-------------------------------------
14  // UVM Phase methods
15  //-------------------------------------
16  extern task run_phase(uvm_phase phase);
18 
19 function cl_scb_test_io_std_simple_real::new(string name = "cl_scb_test_io_std_simple_real",
20  uvm_component parent = null);
21  super.new(name, parent);
22 endfunction: new
23 
24 task cl_scb_test_io_std_simple_real::run_phase(uvm_phase phase);
25  real reals[10];
26 
27  phase.raise_objection(this);
28  super.run_phase(phase);
29 
30  //Generate 10 random real variables in range (0;100) for testing purposes
31  for(int i=0; i<10; i++) begin
32  int u = $urandom_range(100000000, 1000000);
33  reals[i] = real'(u)/1000000;
34  end
35 
36 
37  fork
38  for(int i=0; i<10; i++) begin
39  cl_tb_seq_item_real item;
40  item = cl_tb_seq_item_real::type_id::create("item");
41  item.int_a = i;
42  item.b = reals[i];
43  scb_env.syoscb[0].add_item("Q1", "P1", item);
44  end
45 
46  for(int i=0; i<10; i++) begin
47  cl_tb_seq_item_real item;
48  item = cl_tb_seq_item_real::type_id::create("item");
49  item.int_a = i;
50  item.b = reals[i];
51  scb_env.syoscb[0].add_item("Q2", "P1", item);
52  end
53  join
54 
55  phase.drop_objection(this);
56 endtask: run_phase
Simple IO compare test on real values using the function based API.

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 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.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:37:24
Find a documentation bug? Report bugs to: scoreboard@syosil.com