SyoSil ApS UVM Scoreboard  1.0.3.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
cl_syoscb_queue_std Class Reference

Standard implementation of a queue. More...

+ Inheritance diagram for cl_syoscb_queue_std:
+ Collaboration diagram for cl_syoscb_queue_std:

Public Member Functions

virtual bit add_item (string producer, uvm_sequence_item item)
 Queue API: See cl_syoscb_queue_base::add_item for more details
 
virtual bit delete_item (cl_syoscb_proxy_item_base proxy_item)
 Queue API: See cl_syoscb_queue_base::delete_item for more details
 
virtual cl_syoscb_item get_item (cl_syoscb_proxy_item_base proxy_item)
 Queue API: See cl_syoscb_queue_base::get_item for more details
 
virtual int unsigned get_size ()
 Queue API: See cl_syoscb_queue_base::get_size for more details
 
virtual bit empty ()
 Queue API: See cl_syoscb_queue_base::empty for more details
 
virtual bit insert_item (string producer, uvm_sequence_item item, int unsigned idx)
 Queue API: See cl_syoscb_queue_base::insert_item for more details
 
virtual cl_syoscb_queue_iterator_base create_iterator (string name="")
 Queue API: See cl_syoscb_queue_base::create_iterator for more details
 
virtual bit delete_iterator (cl_syoscb_queue_iterator_base iterator)
 Queue API: See cl_syoscb_queue_base::delete_iterator for more details
 
virtual cl_syoscb_queue_locator_base get_locator ()
 Queue API: See cl_syoscb_queue_base::get_locator for more details
 
virtual bit add_item (string producer, uvm_sequence_item item)
 Queue API: Adds a uvm_sequence_item to this queue. More...
 
virtual bit delete_item (cl_syoscb_proxy_item_base proxy_item)
 Queue API: Deletes the item indicated by the proxy item from the queue. More...
 
virtual cl_syoscb_item get_item (cl_syoscb_proxy_item_base proxy_item)
 Queue API: Gets the item pointed to by the proxy item from the queue. More...
 
virtual int unsigned get_size ()
 Queue API: Returns the current size of the queue. More...
 
virtual bit empty ()
 Queue API: Returns whether or not the queue is empty. More...
 
virtual bit insert_item (string producer, uvm_sequence_item item, int unsigned idx)
 Queue API: Inserts a uvm_sequence_item at index idx. More...
 
virtual cl_syoscb_queue_iterator_base create_iterator (string name="")
 Queue API: Creates an iterator for this queue. More...
 
virtual bit delete_iterator (cl_syoscb_queue_iterator_base iterator)
 Queue API: Deletes an iterator from this queue. More...
 
virtual cl_syoscb_queue_locator_base get_locator ()
 Queue API: Creates a locator for this queue. More...
 
- Public Member Functions inherited from cl_syoscb_queue_base
void build_phase (uvm_phase phase)
 UVM Build Phase. Gets the scoreboard configuration for this SCB.
 
void check_phase (uvm_phase phase)
 UVM check phase. More...
 
virtual void dump (uvm_printer printer=null, int fd=UVM_STDOUT)
 Queue API: Loop over all the items in the shadow queue and dump them. More...
 
virtual void flush_queue ()
 Queue API: Deletes all elements from the queue. More...
 
virtual cl_syoscb_queue_iterator_base get_iterator (string name)
 Queue API: Gets the iterator from this queue with a given name. More...
 
virtual bit exists_cnt_producer (string producer)
 Queue API: Check if a given producer exists in the producer counter for this queue More...
 
virtual int unsigned get_cnt_producer (string producer)
 Queue API: Get the producer count for a given producer. More...
 
virtual int unsigned get_cnt_add_item ()
 Queue API: Returns the number of items that have been inserted in this queue
 
virtual int unsigned get_max_items ()
 Queue API: Returns the maximum number of elements that have been in the queue.
 
virtual int unsigned get_cnt_flushed_item ()
 Queue API: Returns the total number of elements flushed from this queue.
 
virtual int unsigned get_cnt_matched_item ()
 Queue API: Returns the total number of elements matched in this queue
 
virtual cl_syoscb_item get_last_inserted_item ()
 Queue API: Gets the last inserted item in the queue
 
virtual string get_failed_checks ()
 Queue API: Gets a string containing all queue checks that this queue have failed. More...
 
virtual string create_queue_report (int unsigned offset, int unsigned first_column_width)
 Queue API: Returns a string with overall queues statistics. More...
 

Protected Member Functions

virtual void do_flush_queue ()
 See cl_syoscb_queue_base::do_flush_queue for more details.
 
virtual void do_flush_queue ()
 Performs the actual element deletion from the queue when called by flush_queue.
 
- Protected Member Functions inherited from cl_syoscb_queue_base
virtual cl_syoscb_item pre_add_item (string producer, uvm_sequence_item item)
 Perform some basic bookkeeping that is the same for all sequence items before insertion. More...
 
virtual void post_add_item (cl_syoscb_item item)
 Perform some basic bookkeping that is the same for all sequence items after insertion. More...
 
virtual void incr_cnt_producer (string producer)
 Increment the producer counter for a given producer. More...
 
virtual void decr_cnt_producer (string producer)
 Decrement the producer counter for a given producer. More...
 
virtual void dump_orphans_to_file ()
 Dumps orphans remaining in the queue into a logfile. More...
 
virtual void dump_orphans_to_stdout ()
 Prints orphans remaining in the queue to stdout. More...
 
virtual string create_producer_stats (int unsigned offset, int unsigned first_column_width)
 Returns a table with statistics for all producers in this queue. More...
 
virtual string get_dump_extension (t_dump_type dump_type)
 Gets the file extension to be used for a dump file. More...
 
virtual void print_orphan_xml_header (int fd)
 Prints the header for an XML orphan dump. More...
 
virtual void print_orphan_xml_footer (int fd)
 Prints the footer for an XML orphan dump. More...
 

Private Attributes

cl_syoscb_item items [$]
 Simple queue implementation with a SV queue.
 

Additional Inherited Members

- Public Attributes inherited from cl_syoscb_queue_base
cl_syoscb_item shadow_items [$]
 Shadow queue tracking all items inserted into the queue, used for scoreboard dumps.
 
- Protected Attributes inherited from cl_syoscb_queue_base
cl_syoscb_cfg cfg
 Handle to the configuration.
 
cl_syoscb_queue_iterator_base iterators [cl_syoscb_queue_iterator_base]
 List of iterators registered with this queue.
 
semaphore iter_sem
 Semaphore guarding exclusive access to the queue when multiple iterators are in play.
 
int unsigned cnt_producer [string]
 Associative array counting the number of items by a given producer that currently exist in the queue.
 
int unsigned cnt_add_item = 0
 Number of items that have been inserted into this queue.
 
int unsigned max_items = 0
 Maximum number of items that have been in this queue so far.
 
cl_syoscb_item last_inserted_item
 The most recently inserted item in this queue.
 
int num_iters_created = 0
 The number of iterators that have been created for this queue so far.
 

Detailed Description

Standard implementation of a queue.

Uses a normal SystemVerilog queue as implementation. The class implements the queue API as defined by the queue base class.

Definition at line 4 of file cl_syoscb_queue_std.svh.

Member Function Documentation

◆ add_item()

virtual bit cl_syoscb_queue_std::add_item ( string  producer,
uvm_sequence_item  item 
)
virtual

Queue API: Adds a uvm_sequence_item to this queue.

The basic job of the add_item method is:

  1. Create the new cl_syoscb_item and give it a unique name
  2. Set the producer and other metadata of the scoreboard item
  3. Wrap the uvm_sequence_item inside the scoreboard item
  4. Insert the item into the queue and shadow queue
  5. Update the producer counter and insert counter
    Parameters
    producerThe producer of the sequence item
    itemThe item that should be add to the queue
    Returns
    1 if the item was successfully added, 0 otherwise
    Note
    Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.

◆ create_iterator()

virtual cl_syoscb_queue_iterator_base cl_syoscb_queue_std::create_iterator ( string  name = "")
virtual

Queue API: Creates an iterator for this queue.

Iterators are by default named "[name]_iter[X]", where [name] is the name of the queue, and [X] is the number of iterators that have previusly been created for this queue

Parameters
nameA name to be used for the iterator. If an iterator with this name already exists, prints a UVM_DEBUG message
Returns
An iterator over this queue, or null if a queue with the requested name already exists

Reimplemented from cl_syoscb_queue_base.

◆ delete_item()

virtual bit cl_syoscb_queue_std::delete_item ( cl_syoscb_proxy_item_base  proxy_item)
virtual

Queue API: Deletes the item indicated by the proxy item from the queue.

The basic job of the delete_item method is:

  1. Delete the element
  2. Notify any iterators, moving them as necessary
  3. Update the producer counter for the deleted item's producer
    Parameters
    proxy_itemA proxy item indicating which scoreboard item to delete from the queue
    Returns
    if the item was successfully deleted, 0 otherwise
    Note
    Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.

◆ delete_iterator()

virtual bit cl_syoscb_queue_std::delete_iterator ( cl_syoscb_queue_iterator_base  iterator)
virtual

Queue API: Deletes an iterator from this queue.

Parameters
iteratorThe iterator to delete
Returns
1 if the iterator was successfully deleted, 0 otherwise

Reimplemented from cl_syoscb_queue_base.

◆ empty()

virtual bit cl_syoscb_queue_std::empty ( )
virtual

Queue API: Returns whether or not the queue is empty.

Returns
1 if the queue is empty, 0 otherwise
Note
Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.

◆ get_item()

virtual cl_syoscb_item cl_syoscb_queue_std::get_item ( cl_syoscb_proxy_item_base  proxy_item)
virtual

Queue API: Gets the item pointed to by the proxy item from the queue.

If the proxy item does not specify a valid item in the queue, print a UVM_INFO/DEBUG message

Parameters
proxy_itemA proxy item indicating which scoreboard item to delete from the queue
Returns
The scoreboard item indicated by the proxy item, null if the proxy item did not point to a valid item
Note
Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.

◆ get_locator()

virtual cl_syoscb_queue_locator_base cl_syoscb_queue_std::get_locator ( )
virtual

Queue API: Creates a locator for this queue.

Returns
A locator over this queue

Reimplemented from cl_syoscb_queue_base.

◆ get_size()

virtual int unsigned cl_syoscb_queue_std::get_size ( )
virtual

Queue API: Returns the current size of the queue.

Returns
Number of items currently in the queue
Note
Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.

◆ insert_item()

virtual bit cl_syoscb_queue_std::insert_item ( string  producer,
uvm_sequence_item  item,
int unsigned  idx 
)
virtual

Queue API: Inserts a uvm_sequence_item at index idx.

The method works in the same manner as add_item, by doing the following:

  1. Insert the a new item as the add_item() method
  2. Notify any iterators
    Parameters
    producerThe producer of the sequence item
    itemThe item that should be add to the queue
    idxThe index at which the item should be inserted
    Returns
    1 if the item was successfully inserted, 0 otherwise
    Note
    Abstract method. Must be implemented in a subclass

Reimplemented from cl_syoscb_queue_base.


The documentation for this class was generated from the following files:

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