cl_syoscb_compare.svh

00001 /// Class which act as the root of the compare algorithm. It instantiates the chosen compare
00002 /// algorithm.
00003 class cl_syoscb_compare extends uvm_component;
00004   //-------------------------------------
00005   // Non randomizable variables
00006   //-------------------------------------
00007   /// Handle to the configuration
00008   local cl_syoscb_cfg cfg;
00009 
00010   /// Handle to the actual compare algorithm to be used
00011   local cl_syoscb_compare_base compare_algo;
00012 
00013   //-------------------------------------
00014   // UVM Macros
00015   //-------------------------------------
00016   `uvm_component_utils_begin(cl_syoscb_compare)
00017     `uvm_field_object(cfg,          UVM_DEFAULT)
00018     `uvm_field_object(compare_algo, UVM_DEFAULT)
00019   `uvm_component_utils_end
00020 
00021   //-------------------------------------
00022   // Constructor
00023   //-------------------------------------
00024   extern function new(string name, uvm_component parent);
00025 
00026   //-------------------------------------
00027   // UVM Phase methods
00028   //-------------------------------------
00029   extern function void build_phase(uvm_phase phase);
00030 
00031   //-------------------------------------
00032   // Class methods
00033   //-------------------------------------
00034  extern function void compare();
00035 endclass : cl_syoscb_compare
00036 
00037 function cl_syoscb_compare::new(string name, uvm_component parent);
00038   super.new(name, parent);
00039 endfunction : new
00040 
00041 /// Gets the global scoreboard configuration and creates the compare algorithm, e.g. out-of-order.
00042 function void cl_syoscb_compare::build_phase(uvm_phase phase);
00043   if (!uvm_config_db #(cl_syoscb_cfg)::get(this, "", "cfg", this.cfg)) begin
00044     `uvm_fatal("CFG_ERROR", "Configuration object not passed.")
00045   end
00046 
00047   this.compare_algo = cl_syoscb_compare_base::type_id::create("compare_algo");
00048   this.compare_algo.set_cfg(this.cfg);
00049 endfunction
00050 
00051 /// Invokes the compare algorithms compare method. 
00052 function void cl_syoscb_compare::compare();
00053   this.compare_algo.compare();
00054 endfunction : compare
 All Classes Functions Variables

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.2.1

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.
doxygen
Doxygen Version: 1.6.1
IDV SV Filter Version: 2.6.2
Thu Jun 4 23:02:22 2015
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV