00001 /// Base class for all comapre algorithms 00002 class cl_syoscb_compare_base extends uvm_object; 00003 //------------------------------------- 00004 // Non randomizable variables 00005 //------------------------------------- 00006 /// Handle to the configuration 00007 protected cl_syoscb_cfg cfg; 00008 00009 //------------------------------------- 00010 // UVM Macros 00011 //------------------------------------- 00012 `uvm_object_utils_begin(cl_syoscb_compare_base) 00013 `uvm_field_object(cfg, UVM_DEFAULT) 00014 `uvm_object_utils_end 00015 00016 //------------------------------------- 00017 // Constructor 00018 //------------------------------------- 00019 extern function new(string name = "cl_syoscb_compare_base"); 00020 00021 //------------------------------------- 00022 // Compare API 00023 //------------------------------------- 00024 extern virtual function void compare(); 00025 extern virtual function void compare_do(); 00026 extern function void set_cfg(cl_syoscb_cfg cfg); 00027 extern function cl_syoscb_cfg get_cfg(); 00028 extern function string get_primary_queue_name(); 00029 endclass: cl_syoscb_compare_base 00030 00031 function cl_syoscb_compare_base::new(string name = "cl_syoscb_compare_base"); 00032 super.new(name); 00033 endfunction: new 00034 00035 /// <b>Compare API</b>: This method is the compare algorithms public compare method. It is called when the 00036 /// compare algorithm is asked to do a compare. Typically, this method is used to check state variables etc. to compte if the compare shall be done or not. If so then do_compare() is called. 00037 /// 00038 /// <b>NOTE:</b> This method must be implemted. 00039 function void cl_syoscb_compare_base::compare(); 00040 `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_compare_base::compare() *MUST* be overwritten")); 00041 endfunction 00042 00043 /// <b>Compare API</b>: Does the actual compare. 00044 /// <b>NOTE:</b> This method must be implemted. 00045 function void cl_syoscb_compare_base::compare_do(); 00046 `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_compare_base::compare_do() *MUST* be overwritten")); 00047 endfunction 00048 00049 /// <b>Compare API</b>: Passes the configuration object on to the compare algorithm for faster access. 00050 function void cl_syoscb_compare_base::set_cfg(cl_syoscb_cfg cfg); 00051 this.cfg = cfg; 00052 endfunction: set_cfg 00053 00054 /// <b>Compare API</b>: Returns the configuration object 00055 function cl_syoscb_cfg cl_syoscb_compare_base::get_cfg(); 00056 return(this.cfg); 00057 endfunction: get_cfg 00058 00059 /// <b>Compare API</b>: Gets the primary queue. Convinience method. 00060 function string cl_syoscb_compare_base::get_primary_queue_name(); 00061 cl_syoscb_cfg ch = this.get_cfg(); 00062 00063 return(ch.get_primary_queue()); 00064 endfunction: get_primary_queue_name
|
Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.2.3 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 Version: 1.6.1 IDV SV Filter Version: 2.6.2 Mon Sep 28 02:57:58 2015 |