OpenCores
URL https://opencores.org/ocsvn/lpffir/lpffir/trunk

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [tools/] [uvm_syoscb/] [docs/] [html/] [cl__syoscb__queue__iterator__std_8svh_source.html] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 vladimirar
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6
<title>SyoSil ApS UVM Scoreboard: cl_syoscb_queue_iterator_std.svh Source File</title>
7
<link href="tabs.css" rel="stylesheet" type="text/css"/>
8
<link href="search/search.css" rel="stylesheet" type="text/css"/>
9
<script type="text/javaScript" src="search/search.js"></script>
10
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
11
</head>
12
<body onload='searchBox.OnSelectItem(0);'>
13
<!-- Generated by Doxygen 1.6.1 -->
14
<script type="text/javascript"><!--
15
var searchBox = new SearchBox("searchBox", "search",false,'Search');
16
--></script>
17
<script type="text/javascript">
18
<!--
19
function changeDisplayState (e){
20
  var num=this.id.replace(/[^[0-9]/g,'');
21
  var button=this.firstChild;
22
  var sectionDiv=document.getElementById('dynsection'+num);
23
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
24
    sectionDiv.style.display='block';
25
    button.src='open.gif';
26
  }else{
27
    sectionDiv.style.display='none';
28
    button.src='closed.gif';
29
  }
30
}
31
function initDynSections(){
32
  var divs=document.getElementsByTagName('div');
33
  var sectionCounter=1;
34
  for(var i=0;i<divs.length-1;i++){
35
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
36
      var header=divs[i];
37
      var section=divs[i+1];
38
      var button=header.firstChild;
39
      if (button!='IMG'){
40
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
41
        button=document.createElement('img');
42
        divs[i].insertBefore(button,divs[i].firstChild);
43
      }
44
      header.style.cursor='pointer';
45
      header.onclick=changeDisplayState;
46
      header.id='dynheader'+sectionCounter;
47
      button.src='closed.gif';
48
      section.id='dynsection'+sectionCounter;
49
      section.style.display='none';
50
      section.style.marginLeft='14px';
51
      sectionCounter++;
52
    }
53
  }
54
}
55
window.onload = initDynSections;
56
-->
57
</script>
58
<div class="navigation" id="top">
59
  <div class="tabs">
60
    <ul>
61
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
62
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
63
      <li><a href="annotated.html"><span>Classes</span></a></li>
64
      <li class="current"><a href="files.html"><span>Files</span></a></li>
65
      <li><a href="dirs.html"><span>Directories</span></a></li>
66
      <li>
67
        <div id="MSearchBox" class="MSearchBoxInactive">
68
        <img id="MSearchSelect" src="search/search.png"
69
             onmouseover="return searchBox.OnSearchSelectShow()"
70
             onmouseout="return searchBox.OnSearchSelectHide()"
71
             alt=""/>
72
        <input type="text" id="MSearchField" value="Search" accesskey="S"
73
             onfocus="searchBox.OnSearchFieldFocus(true)"
74
             onblur="searchBox.OnSearchFieldFocus(false)"
75
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
76
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
77
        </div>
78
      </li>
79
    </ul>
80
  </div>
81
  <div class="tabs">
82
    <ul>
83
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
84
    </ul>
85
  </div>
86
  <div class="navpath"><a class="el" href="dir_562324e130495ce1321e3e3f14c8d761.html">src</a>
87
  </div>
88
</div>
89
<div class="contents">
90
<h1>cl_syoscb_queue_iterator_std.svh</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/// Queue iterator class defining the iterator API used for iterating std queues.</span>
91
<a name="l00002"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html">00002</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classcl__syoscb__queue__iterator__std.html" title="Queue iterator class defining the iterator API used for iterating std queues.">cl_syoscb_queue_iterator_std</a> <span class="keyword">extends</span> <a class="code" href="classcl__syoscb__queue__iterator__base.html" title="Queue iterator base class defining the iterator API used for iterating queues.">cl_syoscb_queue_iterator_base</a>;
92
<a name="l00003"></a>00003   <span class="comment">//-------------------------------------</span>
93
<a name="l00004"></a>00004   <span class="comment">// UVM Macros</span>
94
<a name="l00005"></a>00005   <span class="comment">//-------------------------------------</span>
95
<a name="l00006"></a>00006   `uvm_object_utils(cl_syoscb_queue_iterator_std)
96
<a name="l00007"></a>00007
97
<a name="l00008"></a>00008   function new(string name = &quot;cl_syoscb_queue_iterator_std&quot;);
98
<a name="l00009"></a>00009     super.new(name);
99
<a name="l00010"></a>00010   endfunction: new
100
<a name="l00011"></a>00011
101
<a name="l00012"></a>00012   <span class="comment">//-------------------------------------</span>
102
<a name="l00013"></a>00013   <span class="comment">// Iterator API</span>
103
<a name="l00014"></a>00014   <span class="comment">//-------------------------------------</span>
104
<a name="l00015"></a>00015   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__base.html#a70293656ff0720b611c94eda8cfe0ce5" title="Iterator API: Moves the iterator to the next item in the queue.">next</a>();
105
<a name="l00016"></a>00016   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html#a1d541f020eec023d6ef261af533c5cfe" title="Iterator API: See cl_syoscb_queue_iterator_base for details">previous</a>();
106
<a name="l00017"></a>00017   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html#a58ca395f3020e094a9b467ceb77f8824" title="Iterator API: See cl_syoscb_queue_iterator_base for details">first</a>();
107
<a name="l00018"></a>00018   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html#af407a396c06a4da3934f64e25641a5a8" title="Iterator API: Moves the iterator to the last item in the queue.">last</a>();
108
<a name="l00019"></a>00019   extern <span class="keyword">virtual</span> function int unsigned <a class="code" href="classcl__syoscb__queue__iterator__std.html#a7ea9b4bab944e55369f9eb92caf2c468" title="Iterator API: See cl_syoscb_queue_iterator_base for details">get_idx</a>();
109
<a name="l00020"></a>00020   extern <span class="keyword">virtual</span> function <a class="code" href="classcl__syoscb__item.html" title="The UVM scoreboard item.">cl_syoscb_item</a> <a class="code" href="classcl__syoscb__queue__iterator__std.html#ab3965dd048dceb3907c12bdcb2828890" title="Iterator API: See cl_syoscb_queue_iterator_base for details">get_item</a>();
110
<a name="l00021"></a>00021   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html#a80774408e410cafb645abf56eea28580" title="Iterator API: See cl_syoscb_queue_iterator_base for details">is_done</a>();
111
<a name="l00022"></a>00022   extern <span class="keyword">virtual</span> function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html#a5602156978b849fdf81d8fed97cc0907" title="Iterator API: See cl_syoscb_queue_iterator_base for details">set_queue</a>(cl_syoscb_queue owner);
112
<a name="l00023"></a>00023 endclass: <a class="code" href="classcl__syoscb__queue__iterator__std.html" title="Queue iterator class defining the iterator API used for iterating std queues.">cl_syoscb_queue_iterator_std</a>
113
<a name="l00024"></a>00024 <span class="comment"></span>
114
<a name="l00025"></a>00025 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
115
<a name="l00026"></a>00026 <span class="comment"></span>function bit <a class="code" href="classcl__syoscb__queue__iterator__std.html" title="Queue iterator class defining the iterator API used for iterating std queues.">cl_syoscb_queue_iterator_std</a>::<a class="code" href="classcl__syoscb__queue__iterator__base.html#a70293656ff0720b611c94eda8cfe0ce5" title="Iterator API: Moves the iterator to the next item in the queue.">next</a>();
116
<a name="l00027"></a>00027   <a class="code" href="classcl__syoscb__queue.html" title="Class which base concet of a queue.">cl_syoscb_queue</a> qh = this.<a class="code" href="classcl__syoscb__queue__iterator__base.html#a2e37464d479306e3998012cb7c75a9b1" title="Iterator API: Returns releated queue">get_queue</a>();
117
<a name="l00028"></a>00028
118
<a name="l00029"></a>00029   if(this.position &lt; qh.get_size()) begin
119
<a name="l00030"></a>00030     this.position++;
120
<a name="l00031"></a>00031     return 1;
121
<a name="l00032"></a>00032   end else begin
122
<a name="l00033"></a>00033     <span class="comment">// Debug print when unable to advance to the next element (When at the end of the queue)</span>
123
<a name="l00034"></a>00034     `uvm_info(&quot;OUT_OF_BOUNDS&quot;, $sformatf(&quot;[%s]: Not possible to increment position of queue %s: at end of queue&quot;,
124
<a name="l00035"></a>00035                                          this.cfg.get_scb_name(), qh.get_name()), UVM_DEBUG);
125
<a name="l00036"></a>00036     return 0;
126
<a name="l00037"></a>00037   end
127
<a name="l00038"></a>00038 endfunction: next
128
<a name="l00039"></a>00039 <span class="comment"></span>
129
<a name="l00040"></a>00040 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
130
<a name="l00041"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#a1d541f020eec023d6ef261af533c5cfe">00041</a> <span class="comment"></span>function bit cl_syoscb_queue_iterator_std::previous();
131
<a name="l00042"></a>00042   if(this.position != 0) begin
132
<a name="l00043"></a>00043     this.position--;
133
<a name="l00044"></a>00044     return 1;
134
<a name="l00045"></a>00045   end else begin
135
<a name="l00046"></a>00046     cl_syoscb_queue qh = this.get_queue();
136
<a name="l00047"></a>00047
137
<a name="l00048"></a>00048     <span class="comment">// Debug print when unable to advance to the previous element (When at the beginning of the queue)</span>
138
<a name="l00049"></a>00049     `uvm_info(&quot;OUT_OF_BOUNDS&quot;, $sformatf(&quot;[%s]: Not possible to decrement position of queue %s: at end of queue&quot;,
139
<a name="l00050"></a>00050                                          this.cfg.get_scb_name(), qh.get_name()), UVM_DEBUG);
140
<a name="l00051"></a>00051     return 0;
141
<a name="l00052"></a>00052   end
142
<a name="l00053"></a>00053 endfunction: previous
143
<a name="l00054"></a>00054 <span class="comment"></span>
144
<a name="l00055"></a>00055 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
145
<a name="l00056"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#a58ca395f3020e094a9b467ceb77f8824">00056</a> <span class="comment"></span>function bit cl_syoscb_queue_iterator_std::first();
146
<a name="l00057"></a>00057   <span class="comment">// Std queue uses an SV queue for its items, first item is always 0</span>
147
<a name="l00058"></a>00058   this.position = 0;
148
<a name="l00059"></a>00059   return 1;
149
<a name="l00060"></a>00060 endfunction: first
150
<a name="l00061"></a>00061
151
<a name="l00062"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#af407a396c06a4da3934f64e25641a5a8">00062</a> function bit cl_syoscb_queue_iterator_std::last();
152
<a name="l00063"></a>00063   cl_syoscb_queue qh = this.get_queue();
153
<a name="l00064"></a>00064
154
<a name="l00065"></a>00065   this.position = qh.get_size()-1;
155
<a name="l00066"></a>00066   return 1;
156
<a name="l00067"></a>00067 endfunction: last
157
<a name="l00068"></a>00068 <span class="comment"></span>
158
<a name="l00069"></a>00069 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
159
<a name="l00070"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#a7ea9b4bab944e55369f9eb92caf2c468">00070</a> <span class="comment"></span>function int unsigned cl_syoscb_queue_iterator_std::get_idx();
160
<a name="l00071"></a>00071   return this.position;
161
<a name="l00072"></a>00072 endfunction: get_idx
162
<a name="l00073"></a>00073 <span class="comment"></span>
163
<a name="l00074"></a>00074 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
164
<a name="l00075"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#ab3965dd048dceb3907c12bdcb2828890">00075</a> <span class="comment"></span>function cl_syoscb_item cl_syoscb_queue_iterator_std::get_item();
165
<a name="l00076"></a>00076   cl_syoscb_queue qh = this.get_queue();
166
<a name="l00077"></a>00077
167
<a name="l00078"></a>00078   return qh.get_item(this.position);
168
<a name="l00079"></a>00079 endfunction: get_item
169
<a name="l00080"></a>00080 <span class="comment"></span>
170
<a name="l00081"></a>00081 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
171
<a name="l00082"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#a80774408e410cafb645abf56eea28580">00082</a> <span class="comment"></span>function bit cl_syoscb_queue_iterator_std::is_done();
172
<a name="l00083"></a>00083   cl_syoscb_queue qh = this.get_queue();
173
<a name="l00084"></a>00084
174
<a name="l00085"></a>00085   if(this.position == qh.get_size()) begin
175
<a name="l00086"></a>00086     return 1;
176
<a name="l00087"></a>00087   end else begin
177
<a name="l00088"></a>00088     return 0;
178
<a name="l00089"></a>00089   end
179
<a name="l00090"></a>00090 endfunction: is_done
180
<a name="l00091"></a>00091 <span class="comment"></span>
181
<a name="l00092"></a>00092 <span class="comment">/// &lt;b&gt;Iterator API:&lt;/b&gt; See cl_syoscb_queue_iterator_base for details</span>
182
<a name="l00093"></a><a class="code" href="classcl__syoscb__queue__iterator__std.html#a5602156978b849fdf81d8fed97cc0907">00093</a> <span class="comment"></span>function bit cl_syoscb_queue_iterator_std::set_queue(cl_syoscb_queue owner);
183
<a name="l00094"></a>00094   if(owner == null) begin
184
<a name="l00095"></a>00095     <span class="comment">// An iterator should always have an associated queue</span>
185
<a name="l00096"></a>00096     `uvm_error(&quot;QUEUE_ERROR&quot;, $sformatf(&quot;Unable to associate queue with iterator &quot;));
186
<a name="l00097"></a>00097     return 0;
187
<a name="l00098"></a>00098   end else begin
188
<a name="l00099"></a>00099     this.owner = owner;
189
<a name="l00100"></a>00100     this.cfg = owner.get_cfg();
190
<a name="l00101"></a>00101     return 1;
191
<a name="l00102"></a>00102   end
192
<a name="l00103"></a>00103 endfunction: set_queue
193
</pre></div></div>
194
<!--- window showing the filter options -->
195
<div id="MSearchSelectWindow"
196
     onmouseover="return searchBox.OnSearchSelectShow()"
197
     onmouseout="return searchBox.OnSearchSelectHide()"
198
     onkeydown="return searchBox.OnSearchSelectKey(event)">
199
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Variables</a></div>
200
 
201
<!-- iframe showing the search results (closed by default) -->
202
<div id="MSearchResultsWindow">
203
<iframe src="" frameborder="0"
204
        name="MSearchResults" id="MSearchResults">
205
</iframe>
206
</div>
207
 
208
<!--*************************************************************************-->
209
<!-- $Id: idv_dox_footer.html 136 2010-05-31 19:13:27Z seanoboyle $          -->
210
<!--*************************************************************************-->
211
<!--   This program is free software: you can redistribute it and/or modify  -->
212
<!--   it under the terms of the GNU General Public License as published by  -->
213
<!--   the Free Software Foundation, either version 3 of the License, or     -->
214
<!--   (at your option) any later version.                                   -->
215
<!--                                                                         -->
216
<!--   This program is distributed in the hope that it will be useful,       -->
217
<!--   but WITHOUT ANY WARRANTY; without even the implied warranty of        -->
218
<!--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         -->
219
<!--   GNU General Public License for more details.                          -->
220
<!--                                                                         -->
221
<!--   You should have received a copy of the GNU General Public License     -->
222
<!--   along with this program.  If not, see http://www.gnu.org/licenses/.   -->
223
<!--                                                                         -->
224
<!--*************************************************************************-->
225
<!-- Title:        IDV Doxygen Footer File                                   -->
226
<!-- Description:  This file is a doxygen footer with the IDV logo and a     -->
227
<!--               and a reference to the GNU FDL License.                   -->
228
<!--                                                                         -->
229
<!-- Original Author: Sean O'Boyle                                           -->
230
<!-- Contact:         seanoboyle@intelligentdv.com                           -->
231
<!-- Company:         Intelligent Design Verification                        -->
232
<!-- Company URL:     http://intelligentdv.com                               -->
233
<!--                                                                         -->
234
<!-- Download the most recent version here:                                  -->
235
<!--                  http://intelligentdv.com/downloads                     -->
236
<!--                                                                         -->
237
<!-- File Bugs Here:  http://bugs.intelligentdv.com                          -->
238
<!--        Project:  DoxygenFilterSV                                        -->
239
<!--                                                                         -->
240
<!-- File: idv_dox_header.xml                                                -->
241
<!-- $LastChangedBy: seanoboyle $                                            -->
242
<!-- $LastChangedDate: 2010-05-31 12:13:27 -0700 (Mon, 31 May 2010) $        -->
243
<!-- $LastChangedRevision: 136 $                                             -->
244
<!--                                                                         -->
245
<!--*************************************************************************-->
246
 
247
<br>
248
<table border="1" width = "100%">
249
  <tr>
250
    <td width = "20%">
251
     <img src="syosil.jpg">
252
    </td>
253
    <td width = "60%">
254
       <address style="text-align: center;">
255
       Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.2.5<br>
256
       <br>
257
       Copyright 2014-2015 SyoSil ApS<br>
258
       All Rights Reserved Worldwide<br>
259
       <br>
260
      Licensed under the Apache License, Version 2.0 (the "License"); you may not
261
      use this file except in compliance with the License.  You may obtain a copy of
262
      the License at<br>
263
      <br>
264
       <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br>
265
      <br>
266
      Unless required by applicable law or agreed to in writing, software distributed under the License is
267
      distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
268
      implied. See the License for the specific language governing permissions and limitations under
269
      the License.
270
      </address>
271
    </td>
272
    <td width = "20%">
273
      <address style="text-align: right;"><small>
274
      <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a><br>
275
      <a href="http://www.doxygen.org/index.html">Doxygen</a> Version: 1.6.1<br>
276
      <a href="http://www.intelligentdv.com/index.html">IDV SV Filter</a> Version: 2.6.2<br>
277
      Sat Nov 28 05:41:54 2015</small></address>
278
   </td>
279
  </tr>
280
</table>
281
<address style="text-align: left;"><small>
282
Find a documentation bug?  Report bugs to: <a href="http://bugs.intelligentdv.com/">bugs.intelligentdv.com</a> Project: DoxygenFilterSV
283
</small></address>
284
</body>
285
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.