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     // TBD: Discuss if we need this debug statement. It confuses the user
00023     `uvm_info("OUT_OF_BOUNDS", $sformatf("Not possible to increment position of queue %s: at end of queue",
00024                                          this.get_queue().get_name()), UVM_MEDIUM)
00025     return 0;
00026   end
00027 endfunction : next
00028 
00029 
00030 function bit cl_syoscb_queue_iterator_std::previous();
00031   if(this.position != 0) begin
00032     this.position--;
00033     return 1;
00034   end else begin
00035     `uvm_info("OUT_OF_BOUNDS", $sformatf("Not possible to decrement position of queue %s: at end of queue",
00036                                          this.get_queue().get_name()), UVM_MEDIUM)
00037     return 0;
00038   end
00039 endfunction : previous
00040 
00041 
00042 function bit cl_syoscb_queue_iterator_std::first();
00043   // Std queue uses an SV queue for its items, first item is always 0
00044   this.position = 0;
00045   return 1;
00046 endfunction : first
00047 
00048 
00049 function bit cl_syoscb_queue_iterator_std::last();
00050   this.position = this.get_queue().get_size()-1;
00051   return 1;
00052 endfunction : last
00053 
00054 
00055 function int unsigned cl_syoscb_queue_iterator_std::get_idx();
00056   return this.position;
00057 endfunction : get_idx
00058 
00059 
00060 function uvm_sequence_item cl_syoscb_queue_iterator_std::get_item();
00061   return this.get_queue().get_item(this.position);
00062 endfunction : get_item
00063 
00064 
00065 function bit cl_syoscb_queue_iterator_std::is_done();
00066   if(this.position == this.get_queue().get_size()) begin
00067     return 1;
00068   end else begin
00069     return 0;
00070   end
00071 endfunction : is_done
00072 
00073 
00074 
00075 function bit cl_syoscb_queue_iterator_std::set_queue(cl_syoscb_queue owner);
00076   if(owner == null) begin
00077     // An iterator should always have an associated queue
00078     `uvm_error("QUEUE_ERROR", $sformatf("Unable to associate queue with iterator "));
00079     return 0;
00080   end else begin
00081     this.owner = owner;
00082     return 1;
00083   end
00084 endfunction : set_queue
 All Classes Namespaces Files Functions Variables

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.0.1
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
Mon Nov 24 09:24:22 2014
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV