SyoSil ApS UVM Scoreboard
1.0.3.0
|
Test containing a series of unit tests to ensure that all iterators conform to spec. More...
Public Member Functions | |
task | check_next () |
Checks whether the cl_syoscb_queue_iterator_base::next method correctly moves through the queue When called, the idx should increment and it should return 1'b1. More... | |
task | check_prev () |
Checks whether the cl_syoscb_queue_iterator_base::previous method correctly moves through the queue. More... | |
task | check_first () |
Checks whether the cl_syoscb_queue_iterator_base::first method correctly moves through the queue. More... | |
task | check_last () |
Checks whether the cl_syoscb_queue_iterator_base::last method correctly moves through the queue. More... | |
task | check_set_queue () |
Checks whether the cl_syoscb_queue_iterator_base::set_queue method correctly sets the queue associated with an iterator. More... | |
task | check_names () |
Checks whether cl_syoscb_queue_base::get_iterator and cl_syoscb_queue_base::create_iterator correctly create and retrieve named iterators. More... | |
task | check_flush () |
When a queue is flushed, all associated iterators should be reset such that has_next/has_previous both return 0. | |
Test containing a series of unit tests to ensure that all iterators conform to spec.
Definition at line 2 of file cl_scb_test_iterator_unit_tests.svh.
task cl_scb_test_iterator_unit_tests::check_first | ( | ) |
Checks whether the cl_syoscb_queue_iterator_base::first method correctly moves through the queue.
When called, the idx should become 0 and it should return 1'b1. It should then also point to the first item in the queue. When called while already pointing to the first element of the queue, behavior should be the same. When called on an empty queue, should return 1'b0.
Definition at line 143 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), cl_syoscb_queue_base::delete_iterator(), cl_syoscb_queue_iterator_base::first(), cl_syoscb_queue_iterator_base::next(), and cl_syoscb_queue_iterator_base::previous_index().
task cl_scb_test_iterator_unit_tests::check_last | ( | ) |
Checks whether the cl_syoscb_queue_iterator_base::last method correctly moves through the queue.
When called, the idx should become queue.size()-1 and it should return 1'b1. It should then also point to the final item in the queue. When called while already pointing to the final element of the queue, behavior should be the same. When called on an empty queue, should return 1'b0.
Definition at line 190 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), cl_syoscb_queue_base::delete_iterator(), cl_syoscb_queue_base::get_size(), cl_syoscb_queue_iterator_base::last(), and cl_syoscb_queue_iterator_base::next_index().
task cl_scb_test_iterator_unit_tests::check_names | ( | ) |
Checks whether cl_syoscb_queue_base::get_iterator and cl_syoscb_queue_base::create_iterator correctly create and retrieve named iterators.
It should not be possible to create two iterators with the same name, and it should not be possible to retrieve an iterator if the name does not match any iterators.
Definition at line 292 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), and cl_syoscb_queue_base::delete_iterator().
task cl_scb_test_iterator_unit_tests::check_next | ( | ) |
Checks whether the cl_syoscb_queue_iterator_base::next method correctly moves through the queue When called, the idx should increment and it should return 1'b1.
It should then also point to the next item in the queue. When called while already pointing to the last element of the queue, it should generate an out-of-bounds message and return 1'b0
Definition at line 55 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), cl_syoscb_queue_base::delete_iterator(), cl_syoscb_queue_base::get_size(), cl_syoscb_queue_iterator_base::has_next(), cl_syoscb_queue_iterator_base::next_index(), and cl_syoscb_queue_iterator_base::previous_index().
task cl_scb_test_iterator_unit_tests::check_prev | ( | ) |
Checks whether the cl_syoscb_queue_iterator_base::previous method correctly moves through the queue.
When called, the idx should decrement and it should return 1'b1. It should then also point to the previous item in the queue. When called while already pointing to the first element of the queue, it should generate an out-of-bounds message and return 1'b0. When called on an empty queue, it should return 1'b0.
Definition at line 96 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), cl_syoscb_queue_base::delete_iterator(), cl_syoscb_queue_iterator_base::has_next(), cl_syoscb_queue_iterator_base::has_previous(), cl_syoscb_queue_iterator_base::next(), cl_syoscb_queue_iterator_base::next_index(), and cl_syoscb_queue_iterator_base::previous_index().
task cl_scb_test_iterator_unit_tests::check_set_queue | ( | ) |
Checks whether the cl_syoscb_queue_iterator_base::set_queue method correctly sets the queue associated with an iterator.
When called with null as argument, should return 1'b0. When called and the iterator already has an owner associated, should raise a UVM_ERROR When called and the new owner is not of the right queue type, should raise a UVM_ERROR When called and the iterator does not have an owner associated, should return 1'b1 and set the queue as owner.
Definition at line 226 of file cl_scb_test_iterator_unit_tests.svh.
References cl_syoscb_queue_base::create_iterator(), cl_syoscb_queue_base::delete_iterator(), cl_syoscb_queue_iterator_std::set_queue(), cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >::set_queue(), and cl_syoscb_queue_iterator_base::set_queue().
![]() |
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 Version: 1.8.14 Generated with IDV SV Filter Version: 2.6.3 Fri Sep 2 2022 14:40:50 |