cl_syoscb_queue_iterator_std.svh

Go to the documentation of this file.
00001 class cl_syoscb_queue_iterator_std extends cl_syoscb_queue_iterator_base;
00002 
00003   `uvm_object_utils(cl_syoscb_queue_iterator_std);
00004 
00005   extern virtual function bit next();
00006   extern virtual function bit previous();
00007   extern virtual function bit first();
00008   extern virtual function bit last();
00009   extern virtual function int unsigned get_idx();
00010   extern virtual function uvm_sequence_item get_item();
00011   extern virtual function bit is_done();
00012   extern virtual function bit set_queue(cl_syoscb_queue owner);
00013 
00014 endclass : cl_syoscb_queue_iterator_std
00015 
00016 
00017 function bit cl_syoscb_queue_iterator_std::next();
00018   if(this.position < this.get_queue().get_size()) begin
00019     this.position++;
00020     return 1;
00021   end else begin
00022     `uvm_info("OUT_OF_BOUNDS", $sformatf("Not possible to increment position of queue %s: at end of queue",
00023                                          this.get_queue().get_name()), UVM_MEDIUM)
00024     return 0;
00025   end
00026 endfunction : next
00027 
00028 
00029 function bit cl_syoscb_queue_iterator_std::previous();
00030   if(this.position != 0) begin
00031     this.position--;
00032     return 1;
00033   end else begin
00034     `uvm_info("OUT_OF_BOUNDS", $sformatf("Not possible to decrement position of queue %s: at end of queue",
00035                                          this.get_queue().get_name()), UVM_MEDIUM)
00036     return 0;
00037   end
00038 endfunction : previous
00039 
00040 
00041 function bit cl_syoscb_queue_iterator_std::first();
00042   // Std queue uses an SV queue for its items, first item is always 0
00043   this.position = 0;
00044   return 1;
00045 endfunction : first
00046 
00047 
00048 function bit cl_syoscb_queue_iterator_std::last();
00049   this.position = this.get_queue().get_size()-1;
00050   return 1;
00051 endfunction : last
00052 
00053 
00054 function int unsigned cl_syoscb_queue_iterator_std::get_idx();
00055   return this.position;
00056 endfunction : get_idx
00057 
00058 
00059 function uvm_sequence_item cl_syoscb_queue_iterator_std::get_item();
00060   return this.get_queue().get_item(this.position);
00061 endfunction : get_item
00062 
00063 
00064 function bit cl_syoscb_queue_iterator_std::is_done();
00065   if(this.position == this.get_queue().get_size()) begin
00066     return 1;
00067   end else begin
00068     return 0;
00069   end
00070 endfunction : is_done
00071 
00072 
00073 
00074 function bit cl_syoscb_queue_iterator_std::set_queue(cl_syoscb_queue owner);
00075   if(owner == null) begin
00076     // An iterator should always have an associated queue
00077     `uvm_error("QUEUE_ERROR", $sformatf("Unable to associate queue with iterator "));
00078     return 0;
00079   end else begin
00080     this.owner = owner;
00081     return 1;
00082   end
00083 endfunction : set_queue
 All Classes Namespaces Files Functions Variables

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.0.0
Copyright 2014 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.6.1
IDV SV Filter Version: 2.6.2
Thu Oct 30 05:34:49 2014
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV