| <html><head><title>TLM Implementation Port Declaration Macros</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="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="TLM_Implementation_Port_Declaration_Macros" href="../../../../src/macros/tlm_defines.svh">TLM Implementation Port Declaration Macros</a></h1><div class=CBody><p>The TLM implemenation declaration macros provide a way for an implementer to provide multiple implemenation ports of the same implementation interface. When an implementation port is defined using the built-in set of imps, there must be exactly one implementation of the interface.</p><p>For example, if a component needs to provide a put implemenation then it would have an implementation port defined like:</p><blockquote><pre>class mycomp extends ovm_component; |
| ovm_put_imp#(data_type, mycomp) put_imp; |
| ... |
| virtual task put (data_type t); |
| ... |
| endtask |
| endclass</pre></blockquote><p>There are times, however, when you need more than one implementation for for an interface. This set of declarations allow you to easily create a new implemenation class to allow for multiple implementations. Although the new implemenation class is a different class, it can be bound to the same types of exports and ports as the original class. Extending the put example above, lets say that mycomp needs to provide two put implementation ports. In that case, you would do something like:</p><blockquote><pre>//Define two new put interfaces which are compatible with ovm_put_ports |
| //and ovm_put_exports. |
| |
| `ovm_put_imp_decl(_1) |
| `ovm_put_imp_decl(_2) |
| |
| class my_put_imp#(type T=int) extends ovm_component; |
| ovm_put_imp_1#(T) put_imp1; |
| ovm_put_imp_2#(T) put_imp2; |
| ... |
| function void put_1 (input T t); |
| //puts comming into put_imp1 |
| ... |
| endfunction |
| function void put_2(input T t); |
| //puts comming into put_imp2 |
| ... |
| endfunction |
| endclass</pre></blockquote><p>The important thing to note is that each `ovm_<interface>_imp_decl creates a new class of type ovm_<interface>_imp<suffix>, where suffix is the input argument to the macro. For this reason, you will typically want to put these macros in a seperate package to avoid collisions and to allow sharing of the definitions.</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="SMain"><td colspan=2 class=SEntry><a href="#TLM_Implementation_Port_Declaration_Macros" >TLM Implementation Port Declaration Macros</a></td></tr> |
| <tr class=SMain><td colspan=2 class=SWideDescription>The TLM implemenation declaration macros provide a way for an implementer to provide multiple implemenation ports of the same implementation interface. </td></tr> |
| <!-- index=1 --> |
| |
| <tr class="SGroup SIndent1"><td class=SEntry><a href="#Macros" >Macros</a></td><td class=SDescription></td></tr> |
| <!-- index=2 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_blocking_put_imp_decl" >`ovm_blocking_put_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_put_impSFX for providing blocking put implementations. </td></tr> |
| <!-- index=3 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_nonblocking_put_imp_decl" >`ovm_nonblocking_put_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_put_impSFX for providing non-blocking put implementations. </td></tr> |
| <!-- index=4 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_put_imp_decl" >`ovm_put_imp_decl</a></td><td class=SDescription>Define the class ovm_put_impSFX for providing both blocking and non-blocking put implementations. </td></tr> |
| <!-- index=5 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_blocking_get_imp_decl" >`ovm_blocking_get_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_get_impSFX for providing blocking get implementations. </td></tr> |
| <!-- index=6 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_nonblocking_get_imp_decl" >`ovm_nonblocking_get_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_get_impSFX for providing non-blocking get implementations. </td></tr> |
| <!-- index=7 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_get_imp_decl" >`ovm_get_imp_decl</a></td><td class=SDescription>Define the class ovm_get_impSFX for providing both blocking and non-blocking get implementations. </td></tr> |
| <!-- index=8 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_blocking_peek_imp_decl" >`ovm_blocking_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_peek_impSFX for providing blocking peek implementations. </td></tr> |
| <!-- index=9 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_nonblocking_peek_imp_decl" >`ovm_nonblocking_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_peek_impSFX for providing non-blocking peek implementations. </td></tr> |
| <!-- index=10 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_peek_imp_decl" >`ovm_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_peek_impSFX for providing both blocking and non-blocking peek implementations. </td></tr> |
| <!-- index=11 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_blocking_get_peek_imp_decl" >`ovm_blocking_get_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_get_peek_impSFX for providing the blocking get_peek implemenation.</td></tr> |
| <!-- index=12 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_nonblocking_get_peek_imp_decl" >`ovm_nonblocking_get_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_get_peek_impSFX for providing non-blocking get_peek implemenation.</td></tr> |
| <!-- index=13 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_get_peek_imp_decl" >`ovm_get_peek_imp_decl</a></td><td class=SDescription>Define the class ovm_get_peek_impSFX for providing both blocking and non-blocking get_peek implementations. </td></tr> |
| <!-- index=14 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_blocking_master_imp_decl" >`ovm_blocking_master_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_master_impSFX for providing the blocking master implemenation.</td></tr> |
| <!-- index=15 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_nonblocking_master_imp_decl" >`ovm_nonblocking_master_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_master_impSFX for providing the non-blocking master implemenation.</td></tr> |
| <!-- index=16 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_master_imp_decl" >`ovm_master_imp_decl</a></td><td class=SDescription>Define the class ovm_master_impSFX for providing both blocking and non-blocking master implementations. </td></tr> |
| <!-- index=17 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_blocking_slave_imp_decl" >`ovm_blocking_slave_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_slave_impSFX for providing the blocking slave implemenation.</td></tr> |
| <!-- index=18 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_nonblocking_slave_imp_decl" >`ovm_nonblocking_slave_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_slave_impSFX for providing the non-blocking slave implemenation.</td></tr> |
| <!-- index=19 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_slave_imp_decl" >`ovm_slave_imp_decl</a></td><td class=SDescription>Define the class ovm_slave_impSFX for providing both blocking and non-blocking slave implementations. </td></tr> |
| <!-- index=20 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_blocking_transport_imp_decl" >`ovm_blocking_transport_imp_decl</a></td><td class=SDescription>Define the class ovm_blocking_transport_impSFX for providing the blocking transport implemenation.</td></tr> |
| <!-- index=21 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_nonblocking_transport_imp_decl" >`ovm_nonblocking_transport_imp_decl</a></td><td class=SDescription>Define the class ovm_nonblocking_transport_impSFX for providing the non-blocking transport implemenation.</td></tr> |
| <!-- index=22 --> |
| |
| <tr class="SMacro SIndent2"><td class=SEntry><a href="#`ovm_transport_imp_decl" >`ovm_transport_imp_decl</a></td><td class=SDescription>Define the class ovm_transport_impSFX for providing both blocking and non-blocking transport implementations. </td></tr> |
| <!-- index=23 --> |
| |
| <tr class="SMacro SIndent2 SMarked"><td class=SEntry><a href="#`ovm_analysis_imp_decl" >`ovm_analysis_imp_decl</a></td><td class=SDescription>Define the class ovm_analysis_impSFX for providing an analysis implementation. </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="Macros" href="../../../../src/macros/tlm_defines.svh">Macros</a></h3></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=2 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_put_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_put_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_put_impSFX for providing blocking put implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=3 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_put_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_put_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_put_impSFX for providing non-blocking put implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=4 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_put_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_put_imp_decl</a></h3><div class=CBody><p>Define the class ovm_put_impSFX for providing both blocking and non-blocking put implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=5 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_get_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_get_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_get_impSFX for providing blocking get implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=6 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_get_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_get_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_get_impSFX for providing non-blocking get implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=7 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_get_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_get_imp_decl</a></h3><div class=CBody><p>Define the class ovm_get_impSFX for providing both blocking and non-blocking get implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=8 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_peek_impSFX for providing blocking peek implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=9 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_peek_impSFX for providing non-blocking peek implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=10 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_peek_impSFX for providing both blocking and non-blocking peek implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=11 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_get_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_get_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_get_peek_impSFX for providing the blocking get_peek implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=12 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_get_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_get_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_get_peek_impSFX for providing non-blocking get_peek implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=13 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_get_peek_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_get_peek_imp_decl</a></h3><div class=CBody><p>Define the class ovm_get_peek_impSFX for providing both blocking and non-blocking get_peek implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=14 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_master_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_master_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_master_impSFX for providing the blocking master implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=15 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_master_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_master_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_master_impSFX for providing the non-blocking master implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=16 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_master_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_master_imp_decl</a></h3><div class=CBody><p>Define the class ovm_master_impSFX for providing both blocking and non-blocking master implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=17 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_slave_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_slave_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_slave_impSFX for providing the blocking slave implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=18 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_slave_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_slave_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_slave_impSFX for providing the non-blocking slave implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=19 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_slave_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_slave_imp_decl</a></h3><div class=CBody><p>Define the class ovm_slave_impSFX for providing both blocking and non-blocking slave implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=20 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_blocking_transport_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_blocking_transport_imp_decl</a></h3><div class=CBody><p>Define the class ovm_blocking_transport_impSFX for providing the blocking transport implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=21 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_nonblocking_transport_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_nonblocking_transport_imp_decl</a></h3><div class=CBody><p>Define the class ovm_nonblocking_transport_impSFX for providing the non-blocking transport implemenation.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=22 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_transport_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_transport_imp_decl</a></h3><div class=CBody><p>Define the class ovm_transport_impSFX for providing both blocking and non-blocking transport implementations. <i>SFX</i> is the suffix for the new class type.</p></div></div></div> |
| |
| |
| |
| |
| <!--CONTENT index=23 --> |
| <div class="CMacro"><div class=CTopic><h3 class=CTitle><a name="`ovm_analysis_imp_decl" href="../../../../src/macros/tlm_defines.svh">`ovm_analysis_imp_decl</a></h3><div class=CBody><p>Define the class ovm_analysis_impSFX for providing an analysis implementation. <i>SFX</i> is the suffix for the new class type. The analysis implemenation is the write function. The `ovm_analysis_imp_decl allows for a scoreboard (or other analysis component) to support input from many places. For example:</p><blockquote><pre>`ovm_analysis_imp_decl(_ingress) |
| `ovm_analysis_imp_port(_egress) |
| |
| class myscoreboard extends ovm_component; |
| ovm_analysis_imp_ingress#(mydata, myscoreboard) ingress; |
| ovm_analysis_imp_egress#(mydata, myscoreboard) egress; |
| mydata ingress_list[$]; |
| ... |
| |
| function new(string name, ovm_component parent); |
| super.new(name,parent); |
| ingress = new("ingress", this); |
| egress = new("egress", this); |
| endfunction |
| |
| function void write_ingress(mydata t); |
| ingress_list.push_back(t); |
| endfunction |
| |
| function void write_egress(mydata t); |
| find_match_in_ingress_list(t); |
| endfunction |
| |
| function void find_match_in_ingress_list(mydata t); |
| //implement scoreboarding for this particular dut |
| ... |
| endfunction |
| endclass</pre></blockquote></div></div></div> |
| |
| </div><!--Content--> |
| |
| |
| |
| <!--START_ND_TOOLTIPS--> |
| <!--END_ND_TOOLTIPS--> |
| |
| <script language=JavaScript><!-- |
| if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |