pk_syoscb.sv

Go to the documentation of this file.
00001 `ifndef __PK_SYOSCB_SV__
00002 `define __PK_SYOSCB_SV__
00003 
00004 /// @mainpage
00005 /// User and implementationd documentation for the UVM scoreboard
00006 ///
00007 /// This documentation provides the following additional documentation, besides
00008 /// the normal source code documentation:
00009 ///
00010 ///   -# Getting started: \ref pGettingStarted
00011 ///   -# How to integrate the UVM scoreboard: \ref pIntegration
00012 ///
00013 /// It is assumed that the reader is familiar with the UVM scoreboard arcitechture
00014 /// described in: TBD: Added ref to paper!
00015 ///
00016 /// @page pGettingStarted Getting started
00017 /// This software package also provides some simple examples beside the source code for the UVM scoreboard. Before starting to integerate the UVM scoreboard into your own code then it might be beneficial to look at the provided examples. An example testbench is placed in the <b>tb</b> directory and the tests are in the <b>tb/test</b> directory.
00018 ///
00019 /// To run the examples you need to select a Vendor since the examples can be run with all of the threee major SystemVerilog simulator vendors: Mentor Graphics, Cadence and Synopsys. See <b>README.txt</b> for a description of how to select the vendor.
00020 ///
00021 /// Once the vendor has been selected then the available Make targets for that vendor can be listed by typing: "make". Typically, you run the simulation with: <b>make sim</b>.
00022 ///
00023 /// @page pIntegration How to integrate the UVM scoreboard
00024 /// The UVM scorebaord is easily integrated into your existing testbench environment.
00025 ///
00026 /// @section sCompile Compiling the UVM scoreboard
00027 /// To get the UVM scoreboard compiled you need to add <b>src/pk_syoscb.sv</b> to your list of files that are compliled when compiling your testbench. How this is done is highly dependent on the verification environment since some environemnts compile everything into different libraries and some do not etc.
00028 ///
00029 /// @section sAcccess Accessing the UVM scoreboard from your own code
00030 /// Once the UVM scoreboard is compiled with the veritication environment then it is accessible either by explicit scoping:
00031 ///
00032 /// @code
00033 ///   class myclass;
00034 ///     pk_syoscb::cl_syoscb my_new_scb;
00035 ///     ...
00036 /// @endcode
00037 ///
00038 /// or by importing the complte package into your scope:
00039 ///
00040 /// @code
00041 ///   import pk_syoscb::*;
00042 ///
00043 ///   class myclass;
00044 ///     cl_syoscb my_new_scb;
00045 ///     ...
00046 /// @endcode
00047 ///
00048 /// @section sInstantiation Instantiating the UVM scoreboard
00049 /// The UVM scoreboard itself needs to be instantiated along with the configuration object. The simplest way to to this is to add the UVM scoreboard and the configuration object to the UVM environment - note that the configuration object is passed to the scoreboard via the config_db:
00050 ///
00051 /// @code
00052 ///   import pk_syoscb::*;
00053 ///
00054 ///   class cl_scbtest_env extends uvm_env;
00055 ///
00056 ///     cl_syoscb     syoscb;   
00057 ///     cl_syoscb_cfg syoscb_cfg;
00058 ///    
00059 ///     `uvm_component_utils_begin(cl_scbtest_env)
00060 ///       `uvm_field_object(syoscb,     UVM_ALL_ON)
00061 ///       `uvm_field_object(syoscb_cfg, UVM_ALL_ON)
00062 ///     `uvm_component_utils_end
00063 ///    
00064 ///     ... 
00065 ///
00066 ///   endclass: cl_scbtest_env
00067 ///
00068 ///   function void cl_scbtest_env::build_phase(uvm_phase phase);
00069 ///     super.build_phase(phase);
00070 ///   
00071 ///     // Create the scoreboard configuration object
00072 ///     this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg");
00073 ///
00074 ///     // Pass the scoreboard configuration object to the config_db
00075 ///     uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg);
00076 ///
00077 ///     // Create the scoreaboard
00078 ///     this.syoscb = cl_syoscb::type_id::create("syoscb", this);
00079 ///   
00080 ///     ...
00081 ///               
00082 ///   endfunction: build_phase
00083 /// @endcode
00084 ///
00085 /// @section sConfiguration Configuring the UVM scoreboard
00086 /// The UVM scoreboard ocnfiguration object needs to be configured after it has been created. The following example shows how two queues Q1 and Q2 wit Q1 as the primary queue. Futhermore one producer P1 is added to both queues:
00087 ///
00088 /// @code
00089 ///   function void cl_scbtest_env::build_phase(uvm_phase phase);
00090 ///     super.build_phase(phase);
00091 ///   
00092 ///     // Create the scoreboard configuration object
00093 ///     this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg");
00094 ///
00095 ///     // Configure the scoreboard
00096 ///     this.syoscb_cfg.set_queues({"Q1", "Q2"});
00097 ///     void'(this.syoscb_cfg.set_primary_queue("Q1")); 
00098 ///     void'(this.syoscb_cfg.set_producer("P1", {"Q1", "Q2"})); 
00099 ///
00100 ///     // Pass the scoreboard configuration object to the config_db
00101 ///     uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg);
00102 ///
00103 ///     // Create the scoreaboard
00104 ///     this.syoscb = cl_syoscb::type_id::create("syoscb", this);
00105 ///               
00106 ///     ...
00107 ///
00108 ///   endfunction: build_phase
00109 /// @endcode
00110 ///
00111 /// @section sFactory Factory overwrites
00112 /// Finally, the wanted queue and compare algorithm implementation needs to be selected. This is done by facotry overwrites since they can be changed test etc.
00113 ///
00114 /// <B>NOTE: This MUST be done before creating the scoreboard!</B>
00115 ///
00116 /// The following queue implemenations are available:
00117 ///
00118 ///   -# Standard SV squeue (cl_syoscb_queue_std)
00119 ///
00120 /// and the following compare alorithms are available:
00121 ///
00122 ///  -# Out-of-Order (cl_syoscb_compare_ooo)
00123 ///
00124 /// The following example shows how they are configured:
00125 ///
00126 /// @code
00127 ///   cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(),              
00128 ///                                              cl_syoscb_queue_std::get_type(),
00129 ///                                              "*");
00130 ///
00131 ///   factory.set_type_override_by_type(cl_syoscb_compare_base::get_type(),
00132 ///                                     cl_syoscb_compare_ooo::get_type(),
00133 ///                                     "*");
00134 /// @endcode
00135 ///
00136 /// The full build phase, including the factory overwrites, of cl_scbtest_env is shown here for completeness:
00137 ///
00138 /// @code
00139 ///   function void cl_scbtest_env::build_phase(uvm_phase phase);
00140 ///     super.build_phase(phase);
00141 ///
00142 ///     // USe the standard SV queue implementation as scoreboard queue
00143 ///     cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(),              
00144 ///                                                cl_syoscb_queue_std::get_type(),
00145 ///                                                "*");
00146 ///
00147 ///     // Set the compare strategy to be OOO
00148 ///     factory.set_type_override_by_type(cl_syoscb_compare_base::get_type(),
00149 ///                                       cl_syoscb_compare_ooo::get_type(),
00150 ///                                       "*");
00151 ///
00152 ///     // Create the scoreboard configuration object
00153 ///     this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg");
00154 ///
00155 ///     // Configure the scoreboard
00156 ///     this.syoscb_cfg.set_queues({"Q1", "Q2"});
00157 ///     void'(this.syoscb_cfg.set_primary_queue("Q1")); 
00158 ///     void'(this.syoscb_cfg.set_producer("P1", {"Q1", "Q2"})); 
00159 ///
00160 ///     // Pass the scoreboard configuration object to the config_db
00161 ///     uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg);
00162 ///
00163 ///     // Create the scoreaboard
00164 ///     this.syoscb = cl_syoscb::type_id::create("syoscb", this);
00165 ///               
00166 ///     ...
00167 ///
00168 ///   endfunction: build_phase
00169 /// @endcode
00170 package pk_syoscb;
00171 
00172   ////////////////////////////////////////////////////////////////////////////
00173   // Imported packages
00174   ////////////////////////////////////////////////////////////////////////////
00175 
00176   import uvm_pkg::*;
00177   `include "uvm_macros.svh"
00178 
00179   ////////////////////////////////////////////////////////////////////////////
00180   // Type definitions
00181   ////////////////////////////////////////////////////////////////////////////
00182 
00183   typedef class cl_syoscb;
00184   typedef class cl_syoscb_queue;
00185 
00186   ////////////////////////////////////////////////////////////////////////////
00187   // Package source files
00188   ////////////////////////////////////////////////////////////////////////////
00189 
00190   `include "cl_syoscb_item.svh"
00191   `include "cl_syoscb_queue_iterator_base.svh"
00192   `include "cl_syoscb_queue_iterator_std.svh"
00193   `include "cl_syoscb_queue.svh"
00194   `include "cl_syoscb_queue_std.svh"
00195   `include "cl_syoscb_cfg_pl.svh"
00196   `include "cl_syoscb_cfg.svh"
00197   `include "cl_syoscb_compare_base.svh"
00198   `include "cl_syoscb_compare.svh"
00199   `include "cl_syoscb_compare_ooo.svh"
00200   `include "cl_syoscb_report_catcher.svh"
00201   `include "cl_syoscb.svh"
00202 
00203 
00204 endpackage : pk_syoscb
00205 
00206 `endif //  __PK_SYOSCB_SV__
 All Classes Namespaces Files Functions Variables

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.0.2
Copyright 2014 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
Wed Feb 25 04:01:40 2015
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV