SyoSil ApS UVM Scoreboard  1.0.3.0
compares.md
1 @page pCompareImplementationNotes Compare implementation notes
2 
3 \section sIncludedCompare Available comparison algorithms
4 
5 The compare procedure consists of finding the same element in all queues in the scoreboard. One queue is selected as the <b>primary queue</b>, and an attempt is then made to find the first element from the primary queue in all other queues.
6 Whenever a match is found, these elements are removed from the queues.
7 
8 The compare mechanism is triggered whenever an element is inserted into a queue, leading to all queues being non-empty (if one or more queues are empty after insertion, there cannot be a match and no comparison is performed). The figure below shows an OOO-compare being performed after an item is inserted into Q3.
9 
10 \image html compare.png width=60%
11 \image latex compare.pdf
12 
13 The compare can be disabled after the first UVM_ERROR if the cl_syoscb_cfg.disable_compare_after_error
14 configuration knob is set to 1'b1.
15 
16 A UVM_ERROR is obtained on a number of occasions:
17 * When using In Order-based comparisons, a UVM_ERROR is issued if the first item in any of the secondary queues does not
18  match the first item in the primary queue.
19 * When using Out of Order comparison, a UVM_ERROR is only issued if a queue's size reaches the limit set in cl_syoscb_cfg.max_queue_size.
20  Compare errors are not issued, as the OOO comparison, by definition, cannot know whether a matching item may arrive at a later point
21  in time.
22 * Independently of compare strategy, a UVM_ERROR may be issued if one or more of the queues are non-empty at the end of simulation.
23  This depends on the value of cl_syoscb_cfg.orphans_as_errors
24 
25 The table below outlines the differences between the available comparison strategies.
26 
27 <table>
28  <tr>
29  <th>Compare method</th>
30  <th>Description</th>
31  </tr>
32  <tr>
33  <td>cl_syoscb_compare_ooo</td>
34  <td>Elements do not have to be in the same order.<br>
35  Standard queue: In order to find a match it has to loop through all queue items. <br>
36  MD5 queue: In order to find a match it only has to check if the hash value is in the associative array. </td>
37  </tr>
38  <tr>
39  <td>cl_syoscb_compare_io</td>
40  <td>Elements have to be in the same order. </td>
41  </tr>
42  <tr>
43  <td>cl_syoscb_compare_io_2hp</td>
44  <td>Only two queues in scoreboard. Elements have to be in the same order. </td>
45  </tr>
46  <tr>
47  <td>cl_syoscb_compare_iop</td>
48  <td>Elements from the same producer have to be in the same order. </td>
49  </tr>
50 </table>
51 
52 @section sImplementingCompare Implementing custom compare algorithms
53 
54 If you require a custom comparison behaviour which is not covered by the included compare algorithms,
55 a new algorithm can be implemented by extending cl_syoscb_compare_base and implementing the necessary
56 methods labeled with <b>Compare Strategy API</b>.
57 
58 Included below is a flowchart of the general compare flow. This can be used as a starting point when implementing
59 new compare algorithms.
60 
61 \image html compare_flowchart.drawio.png width=50%
62 \image latex compare_flowchart.pdf

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:40:27
Find a documentation bug? Report bugs to: scoreboard@syosil.com