SyoSil ApS UVM Scoreboard  1.0.3.0
api.md
1 @page pAPI API Descriptions
2 
3 The scoreboard presents several APIs that user-facing code can leverage. These APIs have been grouped based on their functionality, and are described in further detail in the sections below.
4 
5 In general, all methods which are labeled with <b>API</b> are OK to call from user code. The only exception to this rule is methods labeled with <b>Compare Strategy API</b>.
6 These methods should not be called from outside of a compare strategy, but they are labeled as a separate API to simplify custom compare strategy implementations. See also \ref sCompareStrategyAPI and the included figure of the comparison flowchart.
7 
8 In the sections below, a brief overview of the APIs is presented.
9 Selected methods from each API are listed here, but more exist. Follow the links to view each class' full list of methods.
10 All methods labeled with <b>API</b> are part of the user-facing API, and have more in-depth explanations of their functionality, parameters and return values. On the class reference pages, all internal methods are also described in detail to aid in further extensions, but should not be called outside of the given class.
11 
12 @section sConfigAPI Configuration API
13 
14 The configuration API is accessible in cl_syoscb_cfg and cl_syoscbs_cfg.
15 The methods of the configuration API are used to configure scoreboards and scoreboard wrappers.
16 These methods are generally called in the UVM \c build_phase, setting configuration values before starting simulation.
17 
18 <b> Classes implementing this API </b>
19 -# cl_syoscb_cfg
20 -# cl_syoscbs_cfg
21 
22 <b> Selected methods </b>
23 
24 See \ref pExampleConf for an overview of all configuration knobs in cl_syoscb_cfg. cl_syoscbs_cfg itself does not contain many config knobs, but includes methods for easily modifying all wrapped configuration objects.
25 
26 @section sCompareAPI Compare API
27 
28 The compare API is used to start and control comparisons. The compare API is relatively small, whereas the \ref sCompareStrategyAPI contains the majority of the functions used to implement comparisons.
29 The class cl_syoscb_compare inherits from \c uvm_component and is used to instantiate the desired compare strategy which inherits from cl_syoscb_compare_base.
30 
31 <b> Classes implementing this API </b>
32 -# cl_syoscb_compare
33 -# cl_syoscb_compare_base
34 -# cl_syoscb_compare_io
35 -# cl_syoscb_compare_iop
36 -# cl_syoscb_compare_io_2hp
37 -# cl_syoscb_compare_ooo
38 
39 <b> Selected methods </b>
40 
41 <table>
42  <tr>
43  <th>Name</th>
44  <th>Description</th>
45  </tr>
46  <tr>
47  <td>cl_syoscb_compare_base#compare_trigger</td>
48  <td>Initiates a comparison when an item has been inserted. If cl_syoscb_compare_base.disable_compare is set, the comparison is not performed </td>
49  </tr>
50  <tr>
51  <td>cl_syoscb_compare_base#compare_main</td>
52  <td>Initiates a comparison, bypassing the check of \c disable_compare </td>
53  </tr>
54  <tr>
55  <td>cl_syoscb_compare_base#compare_control</td>
56  <td>Disable or enable comparisons by calling this method</td>
57  </tr>
58 </table>
59 
60 @section sQueueAPI Queue API
61 The queue API is primarily used to insert items in queues. When an item has been added to the scoreboard via either the function-based API or a TLM connection, the scoreboard adds the item to a queue through the queue API. If other types of queues than the std. queues and hash queues are desired, these should also implement this API.
62 
63 <b>Classes implementing this API </b>
64 -# cl_syoscb_queue_base
65 -# cl_syoscb_queue_std
66 -# cl_syoscb_queue_hash
67 -# cl_syoscb_queue_hash_md5
68 
69 <b> Selected methods </b>
70 <table>
71  <tr>
72  <th>Name</th>
73  <th>Description</th>
74  </tr>
75  <tr>
76  <td>cl_syoscb_queue_base#add_item</td>
77  <td>Adds an item to the queue, placing it at the end of the queue. </td>
78  </tr>
79  <tr>
80  <td>cl_syoscb_queue_base#insert_item</td>
81  <td>Inserts an item at a specified index instead of placing it at the end of the queue. </td>
82  </tr>
83  <tr>
84  <td>cl_syoscb_queue_base#flush_queue</td>
85  <td>Flushes the queue, removing all items that previously occupied the queue</td>
86  </tr>
87  <tr>
88  <td>cl_syoscb_queue_base#create_iterator</td>
89  <td>Creates an iterator over this queue. See \ref sIteratorAPI for information on how iterators are used to traverse queues.
90  </tr>
91  <tr>
92  <td>cl_syoscb_queue_base#get_item </td>
93  <td> Takes a proxy item as input, and uses this proxy item to return a specific item from the queue </td>
94  </tr>
95 </table>
96 
97 
98 @section sHashAPI Hash API
99 The hash API is used by hash algorithms to hash sequence items for use in hash queues.
100 
101 <b>Classes implementing this API </b>
102 
103 -# cl_syoscb_hash_base
104 -# cl_syoscb_hash_md5
105 
106 <b> Selected methods </b>
107 
108 <table>
109  <tr>
110  <th>Name</th>
111  <th>Description</th>
112  </tr>
113  <tr>
114  <td>cl_syoscb_hash_base#hash</td>
115  <td>Hashes a cl_syoscb_item using the specified hash algorithm, returning the bitstream representing that hash </td>
116  </tr>
117  <tr>
118  <td>cl_syoscb_hash_base#hash_str</td>
119  <td>Hashes a string using the specified hash algorithm </td>
120  </tr>
121  <tr>
122  <td>cl_syoscb_hash_base#do_hash</td>
123  <td>The underlying method which implements hashing of a bitstream. Can be used to hash items which are not strings or objects that extend cl_syoscb_item</td>
124  </tr>
125 </table>
126 
127 @section sItemAPI Item API
128 
129 The SyoSCB leverages multiple types of wrapper items to manage separation of concerns. The item API encompasses three different items' APIs, all of which are used to wrap sequence items when stored inside the scoreboard.
130 
131 
132 <b>Classes implementing this API </b>
133 
134 -# cl_syoscb_item
135  - Wraps a \c uvm_sequence_item generated by the DUT or a reference model with additional metadata used for comparisons.
136 -# cl_syoscb_hash_item
137  - Used in hash queues to ensure that hash collisions, although unlikely, do not overwrite items in the underlying datastructure.
138 -# cl_syoscb_proxy_item_base
139  - cl_syoscb_proxy_item_std
140  - cl_syoscb_proxy_item_hash
141  - Used with iterators and locators to separate the underlying queue's implementation and the act of iterating over it.
142 
143 <b> Selected methods </b>
144 
145 <table>
146  <tr>
147  <th>Name</th>
148  <th>Description</th>
149  </tr>
150  <tr>
151  <td>cl_syoscb_item#get_item</td>
152  <td>Gets the \c uvm_sequence_item wrapped by this scoreboard item </td>
153  </tr>
154  <tr>
155  <td>cl_syoscb_hash_item#get_item</td>
156  <td>Gets the first of possibly multiple items that have the same hash </td>
157  </tr>
158  <tr>
159  <td>cl_syoscb_proxy_item_base#get_item</td>
160  <td>Gets the item which this proxy item represents. The proxy item contains a handle to the queue, and the queue knows how to parse proxy items (see \ref sQueueAPI)</td>
161  </tr>
162 </table>
163 
164 @section sIteratorAPI Iterator API
165 
166 Iterators are used to iterate over queues in an implementation-agnostic manner. To iterate over all items in a queue,
167 a loop of the following kind may be used:
168 
169 @code
170 if(iter.first()) begin //Reset the iterator, returns false if the queue is empty
171  while(!iter.is_done()) begin
172  //do something
173  void'(iter.next());
174  end
175 end
176 @endcode
177 
178 <b>Classes implementing this API</b>
179 -# cl_syoscb_queue_iterator_base
180 -# cl_syoscb_queue_iterator_std
181 -# cl_syoscb_queue_iterator_hash
182 -# cl_syoscb_queue_iterator_hash_md5
183 
184 <b> Selected methods </b>
185 
186 <table>
187  <tr>
188  <th>Name</th>
189  <th>Description</th>
190  </tr>
191  <tr>
192  <td>cl_syoscb_queue_iterator_base#next</td>
193  <td>Moves the iterator one item forward</td>
194  </tr>
195  <tr>
196  <td>cl_syoscb_queue_iterator_base#get_item_proxy</td>
197  <td>Gets a cl_syoscb_proxy_item_base representing the item that the iterator currently points to </td>
198  </tr>
199  <tr>
200  <td>cl_syoscb_queue_iterator_base#is_done</td>
201  <td>Checks whether the iterator has reached the end of the queue. </td>
202  </tr>
203 </table>
204 
205 @section sLocatorAPI Locator API
206 
207 Locators are used to find a specific item in a queue in an implementation-agnostic manner. Locators are primarily used for the OOO compare algorithm, where the item being searched for may exist anywhere in the queue.
208 
209 
210 <b>Classes implementing this API</b>
211 -# cl_syoscb_queue_locator_base
212 -# cl_syoscb_queue_locator_std
213 -# cl_syoscb_queue_locator_hash
214 -# cl_syoscb_queue_locator_hash_md5
215 
216 <b> Selected methods </b>
217 
218 <table>
219  <tr>
220  <th>Name</th>
221  <th>Description</th>
222  </tr>
223  <tr>
224  <td>cl_syoscb_queue_locator_base#search</td>
225  <td>Searches the underlying queue for an item which matches the argument.</td>
226  </tr>
227  <tr>
228  <td>cl_syoscb_queue_locator_base#get_queue</td>
229  <td>Gets a handle to the queue that this locator is operating on </td>
230  </tr>
231  <tr>
232  <td>cl_syoscb_queue_locator_base#set_queue</td>
233  <td>Sets the queue over which a locator should operate </td>
234  </tr>
235 </table>
236 
237 @section sScoreboardAPI Scoreboard API
238 
239 The scoreboard API is used to insert items, either through the function-based API or through a TLM-based connection. Once inserted, the scoreboard contains a number of functions that can be used to generate statistics or dump items to log files.
240 
241 <b>Classes implementing this API</b>
242 -# cl_syoscb
243 
244 <b> Selected methods </b>
245 
246 <table>
247  <tr>
248  <th>Name</th>
249  <th>Description</th>
250  </tr>
251  <tr>
252  <td>cl_syoscb#add_item</td>
253  <td>Adds an item to the scoreboard through the function based API. The item is inserted in a specific queue based on the arguments passed to the function. </td>
254  </tr>
255  <tr>
256  <td>cl_syoscb#get_subscriber</td>
257  <td>Gets a handle to a cl_syoscb_subscriber for a given queue/producer combination.
258  Items written to this subscriber are added to the specified queue, tagged with the specified producer. </td>
259  </tr>
260  <tr>
261  <td>cl_syoscb#add_item_mutexed</td>
262  <td>Adds an item to the scoreboard, but acquires a mutex before doing so, ensuring that at most one insertion is ever taking place at once. Can only be used if cl_syoscb_cfg#mutexed_add_item_enable is set.</td>
263  </tr>
264  <tr>
265  <td>cl_syoscb#flush_queues</td>
266  <td>Flushes one or all queues of the scoreboard </td>
267  </tr>
268 </table>
269 
270 @section sWrapperAPI Scoreboard Wrapper API
271 
272 The scoreboard wrapper API is primarily used to easily manage and configure multiple identical scoreboards inside of a wrapper. The API is similar to the one presented for scoreboards, but may affect all scoreboards at the same time.
273 
274 The wrapper API does not support adding items directly via the function based API.
275 Instead, filter transforms are connected to agents as described in \ref sMultipleSCBintances, or a handle to specific scoreboard may be extracted.
276 
277 <b>Classes implementing this API</b>
278 -# cl_syoscbs_base
279 -# cl_syoscbs
280 
281 <b> Selected methods </b>
282 
283 <table>
284  <tr>
285  <th>Name</th>
286  <th>Description</th>
287  </tr>
288  <tr>
289  <td>cl_syoscbs#get_scb</td>
290  <td>Gets a handle to the scoreboard with index <i>i</i>. </td>
291  </tr>
292  <tr>
293  <td>cl_syoscbs#get_filter_trfm_base</td>
294  <td>Gets a filter transform component used to transform inputs to a specific queue from a specific producer. </td>
295  </tr>
296  <tr>
297  <td>cl_syoscb#flush_queues_all</td>
298  <td>Flushes all queues in all scoreboards at the same time</td>
299  </tr>
300 </table>
301 
302 
303 @section sCompareStrategyAPI Compare Strategy API
304 
305 The compare strategy API shall be used as a baseline in case custom comparisons must be implemented.
306 By leveraging the compare strategy API, custom compare strategies should be interoperable with the compare strategies shipped with the SyoSil UVM Scoreboard.
307 
308 <b> Classes implementing this API </b>
309 -# cl_syoscb_compare_base
310 -# cl_syoscb_compare_io
311 -# cl_syoscb_compare_iop
312 -# cl_syoscb_compare_io_2hp
313 -# cl_syoscb_compare_ooo
314 
315 <b> Selected methods </b>
316 <table>
317  <tr>
318  <th>Name</th>
319  <th>Description</th>
320  </tr>
321  <tr>
322  <td>cl_syoscb_compare_base#primary_loop_do</td>
323  <td>A loop over the primary queue, selecting the item which should be found in all secondary queues</td>
324  </tr>
325  <tr>
326  <td>cl_syoscb_compare_base#secondary_loop_do</td>
327  <td>A loop over all secondary queues, attempting to find the same item as was selected from the primary queue. The manner of looping and which items are considered is defined by the compare strategy</td>
328  </tr>
329  <tr>
330  <td>cl_syoscb_compare_base#compare_do_greed</td>
331  <td>Initiates a comparison at the desired greed level. The scoreboard supports greedy comparisons (perform comparisons until a match is no longer found), or non-greedy comparisons (only perform 1 comparison whenever triggered, no matter if the comparison was successful or not)</td>
332  </tr>
333 </table>

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