| 1 |
9 |
root |
<!--# include virtual="/ssi/ssi_start.shtml" -->
|
| 2 |
|
|
<link REL="stylesheet" TYPE="text/css" HREF="/people/tantos/styles.css">
|
| 3 |
|
|
|
| 4 |
|
|
<h1>WisboneTK</h1>
|
| 5 |
|
|
<h2>Test package</h2>
|
| 6 |
|
|
<h3>Description</h3>
|
| 7 |
|
|
The WishboneTK test package contains some procedures that can become useful when it comes to testing. These facilities might
|
| 8 |
|
|
not sythetize and that's not their purpose. The procedures contained in this package can read, write and check various values
|
| 9 |
|
|
to/from Wishbone slave devices. The procedures handle all handshaking required between master and slave devices. Currently
|
| 10 |
|
|
the following procedures are available:
|
| 11 |
|
|
<ul>
|
| 12 |
|
|
<li><a href="#wr_chk_val">wr_chk_val</a></li>
|
| 13 |
|
|
<li><a href="#wr_val">wr_val</a></li>
|
| 14 |
|
|
<li><a href="#rd_val">rd_val</a></li>
|
| 15 |
|
|
<li><a href="#chk_val">chk_val</a></li>
|
| 16 |
|
|
</ul>
|
| 17 |
|
|
|
| 18 |
|
|
<a name="wr_chk_val"></a><h3>wr_chk_val</h3>
|
| 19 |
|
|
The procedure issues a write cycle using the wires passed to the function to the address and with the data specified.
|
| 20 |
|
|
Than it issues a read cycle to the same address and compares the value with the data specified. It the two values are
|
| 21 |
|
|
not the same an assert (severity ERROR) is generated.
|
| 22 |
|
|
<p>
|
| 23 |
|
|
The procedure cannot handle ganularity other than the width of the bus. It also cannot hadle ERR and RTY handshake signals.
|
| 24 |
|
|
Later versions probably will add this functionality.
|
| 25 |
|
|
<h4>Paramters</h4>
|
| 26 |
|
|
<table border>
|
| 27 |
|
|
<tr><th>Name</th><th>Direction</th><th>Specification</th></tr>
|
| 28 |
|
|
<tr><td>CLK_I</td><td>IN </td><td>Wishbone clock signal</td></tr>
|
| 29 |
|
|
<tr><td>ADR_I</td><td>OUT</td><td>Wishbone address bus</td></tr>
|
| 30 |
|
|
<tr><td>DAT_O</td><td>IN </td><td>Wishbone data bus slave->master direction</td></tr>
|
| 31 |
|
|
<tr><td>DAT_I</td><td>OUT</td><td>Wishbone data bus master->slave direction</td></tr>
|
| 32 |
|
|
<tr><td>WE_I </td><td>OUT</td><td>Wishbone write enable signal</td></tr>
|
| 33 |
|
|
<tr><td>CYC_I</td><td>OUT</td><td>Wishbone active bus-cycle signal</td></tr>
|
| 34 |
|
|
<tr><td>STB_I</td><td>OUT</td><td>Wishbone strobe signal</td></tr>
|
| 35 |
|
|
<tr><td>ACK_O</td><td>IN </td><td>Wishbone acknowledge signal</td></tr>
|
| 36 |
|
|
<tr><td>ADDR </td><td>IN </td><td>Address to write to / read from</td></tr>
|
| 37 |
|
|
<tr><td>DATA </td><td>IN </td><td>Data to be written / checked against</td></tr>
|
| 38 |
|
|
</table>
|
| 39 |
|
|
|
| 40 |
|
|
<a name="wr_val"></a><h3>wr_val</h3>
|
| 41 |
|
|
The procedure issues a write cycle using the wires passed to the function to the address and with the data specified.
|
| 42 |
|
|
<p>
|
| 43 |
|
|
The procedure cannot handle ganularity other than the width of the bus. It also cannot hadle ERR and RTY handshake signals.
|
| 44 |
|
|
Later versions probably will add this functionality.
|
| 45 |
|
|
<h4>Paramters</h4>
|
| 46 |
|
|
<table border>
|
| 47 |
|
|
<tr><th>Name</th><th>Direction</th><th>Specification</th></tr>
|
| 48 |
|
|
<tr><td>CLK_I</td><td>IN </td><td>Wishbone clock signal</td></tr>
|
| 49 |
|
|
<tr><td>ADR_I</td><td>OUT</td><td>Wishbone address bus</td></tr>
|
| 50 |
|
|
<tr><td>DAT_O</td><td>IN </td><td>Wishbone data bus slave->master direction</td></tr>
|
| 51 |
|
|
<tr><td>DAT_I</td><td>OUT</td><td>Wishbone data bus master->slave direction</td></tr>
|
| 52 |
|
|
<tr><td>WE_I </td><td>OUT</td><td>Wishbone write enable signal</td></tr>
|
| 53 |
|
|
<tr><td>CYC_I</td><td>OUT</td><td>Wishbone active bus-cycle signal</td></tr>
|
| 54 |
|
|
<tr><td>STB_I</td><td>OUT</td><td>Wishbone strobe signal</td></tr>
|
| 55 |
|
|
<tr><td>ACK_O</td><td>IN </td><td>Wishbone acknowledge signal</td></tr>
|
| 56 |
|
|
<tr><td>ADDR </td><td>IN </td><td>Address to write to</td></tr>
|
| 57 |
|
|
<tr><td>DATA </td><td>IN </td><td>Data to be written</td></tr>
|
| 58 |
|
|
</table>
|
| 59 |
|
|
|
| 60 |
|
|
<a name="rd_val"></a><h3>rd_val</h3>
|
| 61 |
|
|
The procedure issues a read cycle to the address specified. It copies the value read from the Wishbone bus to the
|
| 62 |
|
|
data paramter.
|
| 63 |
|
|
<p>
|
| 64 |
|
|
The procedure cannot handle ganularity other than the width of the bus. It also cannot hadle ERR and RTY handshake signals.
|
| 65 |
|
|
Later versions probably will add this functionality.
|
| 66 |
|
|
<h4>Paramters</h4>
|
| 67 |
|
|
<table border>
|
| 68 |
|
|
<tr><th>Name</th><th>Direction</th><th>Specification</th></tr>
|
| 69 |
|
|
<tr><td>CLK_I</td><td>IN </td><td>Wishbone clock signal</td></tr>
|
| 70 |
|
|
<tr><td>ADR_I</td><td>OUT</td><td>Wishbone address bus</td></tr>
|
| 71 |
|
|
<tr><td>DAT_O</td><td>IN </td><td>Wishbone data bus slave->master direction</td></tr>
|
| 72 |
|
|
<tr><td>DAT_I</td><td>OUT</td><td>Wishbone data bus master->slave direction</td></tr>
|
| 73 |
|
|
<tr><td>WE_I </td><td>OUT</td><td>Wishbone write enable signal</td></tr>
|
| 74 |
|
|
<tr><td>CYC_I</td><td>OUT</td><td>Wishbone active bus-cycle signal</td></tr>
|
| 75 |
|
|
<tr><td>STB_I</td><td>OUT</td><td>Wishbone strobe signal</td></tr>
|
| 76 |
|
|
<tr><td>ACK_O</td><td>IN </td><td>Wishbone acknowledge signal</td></tr>
|
| 77 |
|
|
<tr><td>ADDR </td><td>IN </td><td>Address to read from</td></tr>
|
| 78 |
|
|
<tr><td>DATA </td><td>OUT</td><td>Returns data read from the Wishbone bus</td></tr>
|
| 79 |
|
|
</table>
|
| 80 |
|
|
|
| 81 |
|
|
<a name="chk_val"></a><h3>chk_val</h3>
|
| 82 |
|
|
The procedure issues a read cycle to the address specified and compares the value read from the bus with the data specified.
|
| 83 |
|
|
It the two values are not the same an assert (severity ERROR) is generated.
|
| 84 |
|
|
<p>
|
| 85 |
|
|
The procedure cannot handle ganularity other than the width of the bus. It also cannot hadle ERR and RTY handshake signals.
|
| 86 |
|
|
Later versions probably will add this functionality.
|
| 87 |
|
|
<h4>Paramters</h4>
|
| 88 |
|
|
<table border>
|
| 89 |
|
|
<tr><th>Name</th><th>Direction</th><th>Specification</th></tr>
|
| 90 |
|
|
<tr><td>CLK_I</td><td>IN </td><td>Wishbone clock signal</td></tr>
|
| 91 |
|
|
<tr><td>ADR_I</td><td>OUT</td><td>Wishbone address bus</td></tr>
|
| 92 |
|
|
<tr><td>DAT_O</td><td>IN </td><td>Wishbone data bus slave->master direction</td></tr>
|
| 93 |
|
|
<tr><td>DAT_I</td><td>OUT</td><td>Wishbone data bus master->slave direction</td></tr>
|
| 94 |
|
|
<tr><td>WE_I </td><td>OUT</td><td>Wishbone write enable signal</td></tr>
|
| 95 |
|
|
<tr><td>CYC_I</td><td>OUT</td><td>Wishbone active bus-cycle signal</td></tr>
|
| 96 |
|
|
<tr><td>STB_I</td><td>OUT</td><td>Wishbone strobe signal</td></tr>
|
| 97 |
|
|
<tr><td>ACK_O</td><td>IN </td><td>Wishbone acknowledge signal</td></tr>
|
| 98 |
|
|
<tr><td>ADDR </td><td>IN </td><td>Address to read from</td></tr>
|
| 99 |
|
|
<tr><td>DATA </td><td>IN </td><td>Data to be checked against</td></tr>
|
| 100 |
|
|
</table>
|
| 101 |
|
|
|
| 102 |
|
|
<!--
|
| 103 |
|
|
<h2>Other resources</h2>
|
| 104 |
|
|
You can check the <a href="xxx">Wishbone master and slave devices</a>. These cores written in Verilog are also
|
| 105 |
|
|
well-suited for test-benches.
|
| 106 |
|
|
-->
|
| 107 |
|
|
|
| 108 |
|
|
<h2>Author & Maintainer</h2>
|
| 109 |
|
|
<p>
|
| 110 |
|
|
<a href="/people/tantos">Andras Tantos</a>
|
| 111 |
|
|
<!--# include virtual="/ssi/ssi_end.shtml" -->
|