blob: 076eaa28050652f118b3717d54ec0827281e802a [file]
<html><head><title>sqr_if_base #(REQ,RSP)</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version Development Release 01-12-2008 (1.35 base) -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<!--TOP - START OF CONTENT-->
<div id=Content>
<!--CONTENT index=0 -->
<div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="sqr_if_base#(REQ,RSP)" href="../../../../src/tlm/sqr_ifs.svh">sqr_if_base #(REQ,RSP)</a></h1><div class=CBody><p>This class defines an interface for sequence drivers to communicate with sequencers.&nbsp; The driver requires the interface via a port, and the sequencer implements it and provides it via an export.</p>
<!--START_ND_SUMMARY index=0-->
<div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable>
<!-- index=0 -->
<tr class="SClass"><td colspan=2 class=SEntry><a href="#sqr_if_base#(REQ,RSP)" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">sqr_if_base #(REQ,RSP)</a></td></tr>
<tr class=SMain><td colspan=2 class=SWideDescription>This class defines an interface for sequence drivers to communicate with sequencers. </td></tr>
<tr class="SPrototype SIndent1">
<td colspan=2 class="SEntry SIndent1">Class Declaration</td><tr><tr class="SPrototype SIndent1"><td colspan=2 class=SDescription><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual class sqr_if_base #(</td><td class=PType nowrap>type&nbsp;</td><td class=PParameter nowrap>T1</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>ovm_object,</td></tr><tr><td></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>T2</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>T1</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></td></tr>
<!-- index=1 -->
<tr class="SGroup SIndent1"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).Methods" >Methods</a></td><td class=SDescription></td></tr>
<!-- index=2 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).get_next_item" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">get_next_item</a></td><td class=SDescription>Retrieves the next available item from a sequence. </td></tr>
<!-- index=3 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).try_next_item" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">try_next_item</a></td><td class=SDescription>Retrieves the next available item from a sequence if one is available. </td></tr>
<!-- index=4 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).item_done" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">item_done</a></td><td class=SDescription>Indicates that the request is completed to the sequencer. </td></tr>
<!-- index=5 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).wait_for_sequences" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">wait_for_sequences</a></td><td class=SDescription>Waits for a sequence to have a new item available. </td></tr>
<!-- index=6 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).has_do_available" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">has_do_available</a></td><td class=SDescription>Indicates whether a sequence item is available for immediate processing. </td></tr>
<!-- index=7 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).get" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">get</a></td><td class=SDescription>Retrieves the next available item from a sequence. </td></tr>
<!-- index=8 -->
<tr class="SMethod SIndent2"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).peek" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">peek</a></td><td class=SDescription>Returns the current request item if one is in the sequencer fifo. </td></tr>
<!-- index=9 -->
<tr class="SMethod SIndent2 SMarked"><td class=SEntry><a href="#sqr_if_base#(REQ,RSP).put" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">put</a></td><td class=SDescription>Sends a response back to the sequence that issued the request. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<!--CONTENT index=1 -->
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).Methods" href="../../../../src/tlm/sqr_ifs.svh">Methods</a></h3></div></div>
<!--CONTENT index=2 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).get_next_item" href="../../../../src/tlm/sqr_ifs.svh">get_next_item</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task get_next_item(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Retrieves the next available item from a sequence.&nbsp; The call will block until an item is available.&nbsp; The following steps occur on this call:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1</td><td class=CDLDescription>Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode.&nbsp; If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.</td></tr><tr><td class=CDLEntry>2</td><td class=CDLDescription>The chosen sequence will return from wait_for_grant</td></tr><tr><td class=CDLEntry>3</td><td class=CDLDescription>The chosen sequence pre_do is called</td></tr><tr><td class=CDLEntry>4</td><td class=CDLDescription>The chosen sequence item is randomized</td></tr><tr><td class=CDLEntry>5</td><td class=CDLDescription>The chosen sequence post_do is called</td></tr><tr><td class=CDLEntry>6</td><td class=CDLDescription>Return with a reference to the item</td></tr></table><p>Once get_next_item is called, item_done must be called to indicate the completion of the request to the sequencer.&nbsp; This will remove the request item from the sequencer fifo.</p></div></div></div>
<!--CONTENT index=3 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).try_next_item" href="../../../../src/tlm/sqr_ifs.svh">try_next_item</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task try_next_item(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Retrieves the next available item from a sequence if one is available.&nbsp; Otherwise, the function returns immediately with request set to null.&nbsp; The following steps occur on this call:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1</td><td class=CDLDescription>Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode.&nbsp; If no sequence is available, return null.</td></tr><tr><td class=CDLEntry>2</td><td class=CDLDescription>The chosen sequence will return from wait_for_grant</td></tr><tr><td class=CDLEntry>3</td><td class=CDLDescription>The chosen sequence pre_do is called</td></tr><tr><td class=CDLEntry>4</td><td class=CDLDescription>The chosen sequence item is randomized</td></tr><tr><td class=CDLEntry>5</td><td class=CDLDescription>The chosen sequence post_do is called</td></tr><tr><td class=CDLEntry>6</td><td class=CDLDescription>Return with a reference to the item</td></tr></table><p>Once try_next_item is called, item_done must be called to indicate the completion of the request to the sequencer.&nbsp; This will remove the request item from the sequencer fifo.</p></div></div></div>
<!--CONTENT index=4 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).item_done" href="../../../../src/tlm/sqr_ifs.svh">item_done</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function void item_done(</td><td class=PTypePrefix nowrap>input&nbsp;</td><td class=PType nowrap>T2&nbsp;</td><td class=PParameter nowrap>t</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Indicates that the request is completed to the sequencer.&nbsp; Any wait_for_item_done calls made by a sequence for this item will return.</p><p>The current item is removed from the sequencer fifo.</p><p>If a response item is provided, then it will be sent back to the requesting sequence.&nbsp; The response item must have it&rsquo;s sequence ID and transaction ID set correctly, using the set_id_info method:</p><blockquote><pre>rsp.set_id_info(req);</pre></blockquote><p>Before item_done is called, any calls to peek will retrieve the current item that was obtained by get_next_item.&nbsp; After item_done is called, peek will cause the sequencer to arbitrate for a new item.</p></div></div></div>
<!--CONTENT index=5 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).wait_for_sequences" href="../../../../src/tlm/sqr_ifs.svh">wait_for_sequences</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual task wait_for_sequences()</td></tr></table></blockquote><div class=CBody><p>Waits for a sequence to have a new item available.&nbsp; The default implementation in the sequencer delays pound_zero_count delta cycles.&nbsp; (This variable is defined in ovm_sequencer_base.)&nbsp; User-derived sequencers may override its wait_for_sequences implementation to perform some other application-specific implementation.</p></div></div></div>
<!--CONTENT index=6 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).has_do_available" href="../../../../src/tlm/sqr_ifs.svh">has_do_available</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function bit has_do_available()</td></tr></table></blockquote><div class=CBody><p>Indicates whether a sequence item is available for immediate processing.&nbsp; Implementations should return 1 if an item is available, 0 otherwise.</p></div></div></div>
<!--CONTENT index=7 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).get" href="../../../../src/tlm/sqr_ifs.svh">get</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task get(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Retrieves the next available item from a sequence.&nbsp; The call blocks until an item is available.&nbsp; The following steps occur on this call:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1</td><td class=CDLDescription>Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode.&nbsp; If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.</td></tr><tr><td class=CDLEntry>2</td><td class=CDLDescription>The chosen sequence will return from wait_for_grant</td></tr><tr><td class=CDLEntry>3</td><td class=CDLDescription>The chosen sequence &lt;pre_do&gt; is called</td></tr><tr><td class=CDLEntry>4</td><td class=CDLDescription>The chosen sequence item is randomized</td></tr><tr><td class=CDLEntry>5</td><td class=CDLDescription>The chosen sequence post_do is called</td></tr><tr><td class=CDLEntry>6</td><td class=CDLDescription>Indicate item_done to the sequencer</td></tr><tr><td class=CDLEntry>7</td><td class=CDLDescription>Return with a reference to the item</td></tr></table><p>When get is called, item_done may not be called.&nbsp; A new item can be obtained by calling get again, or a response may be sent using either put, or rsp_port.write.</p></div></div></div>
<!--CONTENT index=8 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).peek" href="../../../../src/tlm/sqr_ifs.svh">peek</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task peek(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Returns the current request item if one is in the sequencer fifo.&nbsp; If no item is in the fifo, then the call will block until the sequencer has a new request.&nbsp; The following steps will occur if the sequencer fifo is empty:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1</td><td class=CDLDescription>Arbitrate among requesting, unlocked, relevant sequences - choose the highest priority sequence based on the current sequencer arbitration mode.&nbsp; If no sequence is available, wait for a requesting unlocked relevant sequence, then re-arbitrate.</td></tr><tr><td class=CDLEntry>2</td><td class=CDLDescription>The chosen sequence will return from wait_for_grant</td></tr><tr><td class=CDLEntry>3</td><td class=CDLDescription>The chosen sequence pre_do is called</td></tr><tr><td class=CDLEntry>4</td><td class=CDLDescription>The chosen sequence item is randomized</td></tr><tr><td class=CDLEntry>5</td><td class=CDLDescription>The chosen sequence post_do is called</td></tr></table><p>Once a request item has been retrieved and is in the sequencer fifo, subsequent calls to peek will return the same item.&nbsp; The item will stay in the fifo until either get or item_done is called.</p></div></div></div>
<!--CONTENT index=9 -->
<div class="CMethod"><div class=CTopic><h3 class=CTitle><a name="sqr_if_base#(REQ,RSP).put" href="../../../../src/tlm/sqr_ifs.svh">put</a></h3><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task put(</td><td class=PTypePrefix nowrap>input&nbsp;</td><td class=PType nowrap>T2&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><div class=CBody><p>Sends a response back to the sequence that issued the request.&nbsp; Before the response is put, it must have it&rsquo;s sequence ID and transaction ID set to match the request.&nbsp; This can be done using the set_id_info call:</p><p>rsp.set_id_info(req);</p><p>This task will not block.&nbsp; The response will be put into the sequence response_queue or it will be sent to the sequence response handler.</p></div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual class sqr_if_base #(</td><td class=PType nowrap>type&nbsp;</td><td class=PParameter nowrap>T1</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>ovm_object,</td></tr><tr><td></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>T2</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>T1</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This class defines an interface for sequence drivers to communicate with sequencers. </div></div><div class=CToolTip id="tt2"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task get_next_item(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Retrieves the next available item from a sequence. </div></div><div class=CToolTip id="tt3"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task try_next_item(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Retrieves the next available item from a sequence if one is available. </div></div><div class=CToolTip id="tt4"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual function void item_done(</td><td class=PTypePrefix nowrap>input&nbsp;</td><td class=PType nowrap>T2&nbsp;</td><td class=PParameter nowrap>t</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Indicates that the request is completed to the sequencer. </div></div><div class=CToolTip id="tt5"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual task wait_for_sequences()</td></tr></table></blockquote>Waits for a sequence to have a new item available. </div></div><div class=CToolTip id="tt6"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>virtual function bit has_do_available()</td></tr></table></blockquote>Indicates whether a sequence item is available for immediate processing. </div></div><div class=CToolTip id="tt7"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task get(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Retrieves the next available item from a sequence. </div></div><div class=CToolTip id="tt8"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task peek(</td><td class=PTypePrefix nowrap>output&nbsp;</td><td class=PType nowrap>T1&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns the current request item if one is in the sequencer fifo. </div></div><div class=CToolTip id="tt9"><div class=CMethod><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>virtual task put(</td><td class=PTypePrefix nowrap>input&nbsp;</td><td class=PType nowrap>T2&nbsp;</td><td class=PParameter nowrap>t</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sends a response back to the sequence that issued the request. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>