cl_syoscb_queue_iterator_base.svh

Go to the documentation of this file.
00001 class cl_syoscb_queue_iterator_base extends uvm_object;
00002   `uvm_object_utils(cl_syoscb_queue_iterator_base)
00003 
00004   // The owner of this iterator
00005   cl_syoscb_queue owner;
00006 
00007   int unsigned position = 0;
00008 
00009   // Base 'next' function. Moves iterator to next item in queue
00010   virtual function bit next();
00011     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::next() *MUST* be overwritten"));
00012      return(1'b0);
00013   endfunction
00014 
00015   // Base 'previous' function. Moves iterator to previous item in queue
00016   virtual function bit previous();
00017     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::previous() *MUST* be overwritten"));
00018      return(1'b0);
00019   endfunction
00020 
00021   // Base 'first' function. Moves iterator to first item in queue
00022   virtual function bit first();
00023     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::first() *MUST* be overwritten"));
00024      return(1'b0);
00025   endfunction
00026 
00027   // Base 'last' function. Moves iterator to last item in queue
00028   virtual function bit last();
00029     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::last() *MUST* be overwritten"));
00030      return(1'b0);
00031   endfunction
00032 
00033   // Base 'get_idx' function. Returns current iterator position
00034   virtual function int unsigned get_idx();
00035     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::get_idx() *MUST* be overwritten"));
00036      return(0);
00037   endfunction
00038 
00039   // Base 'get_item' function. Returns item at current iterator position
00040   virtual function uvm_sequence_item get_item();
00041     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::get_item() *MUST* be overwritten"));
00042     return(null);
00043   endfunction
00044 
00045   // Base 'is_done' function. Returns 1 if iterator is at the end of the queue,
00046   // otherwise 0
00047   virtual function bit is_done();
00048     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::is_done() *MUST* be overwritten"));
00049      return(1'b0);
00050   endfunction
00051 
00052   // Returns the queue that this iterator is associated with
00053   extern protected function cl_syoscb_queue get_queue();
00054 
00055   // Sets  the queue that this iterator is associated with
00056   virtual function bit set_queue(cl_syoscb_queue owner);
00057     `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_iterator_base::set_queue() *MUST* be overwritten"));
00058      return(1'b0);
00059   endfunction
00060 endclass : cl_syoscb_queue_iterator_base
00061 
00062 function cl_syoscb_queue cl_syoscb_queue_iterator_base::get_queue();
00063   if(this.owner == null) begin
00064     // An iterator should always have an associated queue
00065     `uvm_error("QUEUE_ERROR", $sformatf("Unable to find queue associated with iterator %s", this.get_name()));
00066     return null;
00067   end else begin
00068     return this.owner;
00069   end
00070 endfunction : get_queue
 All Classes Namespaces Files Functions Variables

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.0.2
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
Wed Feb 25 04:01:40 2015
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV