SyoSil ApS UVM Scoreboard  1.0.3.0
All Classes Functions Variables Typedefs Pages
Queue implementation notes

The queues are used to store the items that needs to be compared. It is possible to select the maximum number of items you can store before obtaining an error by modifying the value of cl_syoscb_cfg.max_queue_size.

The scoreboard provides two different queue topologies. Standard queues, which are based on SV queues, and hash queues, which use an associative array to store items. In the following figure it is possible to see the format of the two different types of queues.

queues.png

The hash queue shows that multiple sequence items may be associated with the same hash value. This is a rare occurrence, and should almost never happen. In the cases where it does happen, the scoreboard tracks all items with matching hash values, ensuring that no sequence items are lost in case of a hash collision.

The two types of queues are further described in the table below:

Queue type Description
cl_syoscb_queue_std SystemVerilog queue. New items are added at the end of the queue.
cl_syoscb_queue_hash Associative array. Items are stored as key-value pairs, using the hash values of the packed item (using object.pack()) as the key. The value is a SV queue storing all items with that hash value. The queue is used to handle the very rare cases where two seq. items have the same hash value.

Hash queues do not by themselves preserve insertion order. To do so, such that hash queues can be iterated in the same order as standard queues, the configuration knob cl_syoscb_cfg.ordered_next must be enabled.

The advantage of using hash queue can be seen when using OOO comparisons. To check if an element is in a queue or not, all that is required is to check if the hash value is in the associative array. This operation runs in O(1) time. Using the SystemVerilog queue, checking if an item is present runs in O(n) time, where n is the number of items in the queue.

In the following graph, the time needed to finish the comparison using out of order compare is shown for the standard queue vs. the MD5 hash queue. It is obvious that hash queues are much better suited for large queues when using OOO comparisons than standard queues.

benchmark.png

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