URL
https://opencores.org/ocsvn/aoocs/aoocs/trunk
Subversion Repositories aoocs
[/] [aoocs/] [trunk/] [doc/] [doxygen/] [html/] [bus__terminator_8v_source.html] - Rev 2
Compare with Previous | Blame | View Log
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>aoOCS: bus_terminator.v Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Design Unit List</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>bus_terminator.v</h1> </div> </div> <div class="contents"> <a href="bus__terminator_8v.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="keyword">/*</span> <a name="l00002"></a>00002 <span class="keyword"> Copyright 2010, Aleksander Osman, alfik@poczta.fm. All rights reserved.</span> <a name="l00003"></a>00003 <span class="keyword"> </span> <a name="l00004"></a>00004 <span class="keyword"> Redistribution and use in source and binary forms, with or without modification, are</span> <a name="l00005"></a>00005 <span class="keyword"> permitted provided that the following conditions are met:</span> <a name="l00006"></a>00006 <span class="keyword"> </span> <a name="l00007"></a>00007 <span class="keyword"> 1. Redistributions of source code must retain the above copyright notice, this list of</span> <a name="l00008"></a>00008 <span class="keyword"> conditions and the following disclaimer.</span> <a name="l00009"></a>00009 <span class="keyword"> </span> <a name="l00010"></a>00010 <span class="keyword"> 2. Redistributions in binary form must reproduce the above copyright notice, this list</span> <a name="l00011"></a>00011 <span class="keyword"> of conditions and the following disclaimer in the documentation and/or other materials</span> <a name="l00012"></a>00012 <span class="keyword"> provided with the distribution.</span> <a name="l00013"></a>00013 <span class="keyword"> </span> <a name="l00014"></a>00014 <span class="keyword"> THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED</span> <a name="l00015"></a>00015 <span class="keyword"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span> <a name="l00016"></a>00016 <span class="keyword"> FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR</span> <a name="l00017"></a>00017 <span class="keyword"> CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span> <a name="l00018"></a>00018 <span class="keyword"> CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR</span> <a name="l00019"></a>00019 <span class="keyword"> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span> <a name="l00020"></a>00020 <span class="keyword"> ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</span> <a name="l00021"></a>00021 <span class="keyword"> NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</span> <a name="l00022"></a>00022 <span class="keyword"> ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span> <a name="l00023"></a>00023 <span class="keyword"> */</span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="keyword">/*! \file</span> <a name="l00026"></a>00026 <span class="keyword"> \brief Terminator for not handled WISHBONE bus cycles.</span> <a name="l00027"></a>00027 <span class="keyword"> */</span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="keyword">/*! \brief \copybrief bus_terminator.v</span> <a name="l00030"></a>00030 <span class="keyword">*/</span> <a name="l00031"></a><a class="code" href="classbus__terminator.html">00031</a> <span class="vhdlkeyword">module</span> <a class="code" href="classbus__terminator.html">bus_terminator</a>( <a name="l00032"></a>00032 <span class="keyword">//% \name Clock and reset </span> <a name="l00033"></a>00033 <span class="keyword">//% @{</span> <a name="l00034"></a><a class="code" href="classbus__terminator.html#a504389b095a9baf2f88945340e64c4ab">00034</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#a504389b095a9baf2f88945340e64c4ab">CLK_I</a>, <a name="l00035"></a><a class="code" href="classbus__terminator.html#a0e510f9c4f5e9af32ea1636b00cfb952">00035</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#a0e510f9c4f5e9af32ea1636b00cfb952">reset_n</a>, <a name="l00036"></a>00036 <span class="keyword">//% @}</span> <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keyword">//% \name WISHBONE slave </span> <a name="l00039"></a>00039 <span class="keyword">//% @{</span> <a name="l00040"></a><a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">00040</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">2</span>] <a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <a name="l00041"></a><a class="code" href="classbus__terminator.html#a596ac126fa1168b2d59936d3c9778deb">00041</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#a596ac126fa1168b2d59936d3c9778deb">CYC_I</a>, <a name="l00042"></a><a class="code" href="classbus__terminator.html#a31e187f84a3ea1a4e4cd377141a3f19e">00042</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#a31e187f84a3ea1a4e4cd377141a3f19e">WE_I</a>, <a name="l00043"></a><a class="code" href="classbus__terminator.html#ae3ce51f791c566e098e7d558290e7366">00043</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#ae3ce51f791c566e098e7d558290e7366">STB_I</a>, <a name="l00044"></a><a class="code" href="classbus__terminator.html#a994f936ec3b678f3e4bff3cfa2256390">00044</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] <a class="code" href="classbus__terminator.html#a994f936ec3b678f3e4bff3cfa2256390">SEL_I</a>, <a name="l00045"></a><a class="code" href="classbus__terminator.html#a00620d44f29f18431e1b9e2a889f72a9">00045</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classbus__terminator.html#a00620d44f29f18431e1b9e2a889f72a9">slave_DAT_I</a>, <a name="l00046"></a><a class="code" href="classbus__terminator.html#a398652206e0fb61250ca64834cc4c825">00046</a> <span class="vhdlkeyword">output</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classbus__terminator.html#a398652206e0fb61250ca64834cc4c825">slave_DAT_O</a>, <a name="l00047"></a><a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">00047</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">ACK_O</a>, <a name="l00048"></a><a class="code" href="classbus__terminator.html#af69c7a0cbf74d76a0736a758ee74c7f1">00048</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classbus__terminator.html#af69c7a0cbf74d76a0736a758ee74c7f1">RTY_O</a>, <a name="l00049"></a><a class="code" href="classbus__terminator.html#a9b755e92f028d4f9a9534124fbc73913">00049</a> <span class="vhdlkeyword">output</span> <a class="code" href="classbus__terminator.html#a9b755e92f028d4f9a9534124fbc73913">ERR_O</a>, <a name="l00050"></a>00050 <span class="keyword">//% @}</span> <a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="keyword">//% \name ao68000 interrupt cycle indicator </span> <a name="l00053"></a>00053 <span class="keyword">//% @{</span> <a name="l00054"></a><a class="code" href="classbus__terminator.html#ab33b4e390a6cca8ffc2af080d219b48a">00054</a> <span class="vhdlkeyword">input</span> <a class="code" href="classbus__terminator.html#ab33b4e390a6cca8ffc2af080d219b48a">cpu_space_cycle</a> <a name="l00055"></a>00055 <span class="keyword">//% @}</span> <a name="l00056"></a>00056 ); <a name="l00057"></a>00057 <a name="l00058"></a>00058 <span class="vhdlkeyword">assign</span> <a class="code" href="classbus__terminator.html#a9b755e92f028d4f9a9534124fbc73913">ERR_O</a> = <span class="vhdllogic">1'b0</span>; <a name="l00059"></a>00059 <span class="vhdlkeyword">assign</span> <a class="code" href="classbus__terminator.html#a398652206e0fb61250ca64834cc4c825">slave_DAT_O</a> = <span class="vhdllogic">32'd0</span>; <a name="l00060"></a>00060 <a name="l00061"></a><a class="code" href="classbus__terminator.html#aefdadc25d9b399769ec9b68788ce1aab">00061</a> <span class="vhdlkeyword">wire</span> <a class="code" href="classbus__terminator.html#aefdadc25d9b399769ec9b68788ce1aab">accepted_addresses</a> = <a name="l00062"></a>00062 ({<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} >= <span class="vhdllogic">32'h00F00000</span> && {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} <= <span class="vhdllogic">32'h00F7FFFC</span>) || <a name="l00063"></a>00063 ({<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} >= <span class="vhdllogic">32'h00E80000</span> && {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} <= <span class="vhdllogic">32'h00EFFFFC</span>) || <a name="l00064"></a>00064 <span class="keyword">// Lotus2</span> <a name="l00065"></a>00065 ({<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} >= <span class="vhdllogic">32'h00200000</span> && {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} <= <span class="vhdllogic">32'h009FFFFF</span>) || <a name="l00066"></a>00066 <span class="keyword">// Pinball Dreams</span> <a name="l00067"></a>00067 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'h00DFF11C</span> || <a name="l00068"></a>00068 <a name="l00069"></a>00069 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'h00DFF1FC</span> || <a name="l00070"></a>00070 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'h00DFF0FC</span> || <a name="l00071"></a>00071 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'h00DC003C</span> || <a name="l00072"></a>00072 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'h00D8003C</span> || <a name="l00073"></a>00073 {<a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>, <span class="vhdllogic">2'b00</span>} == <span class="vhdllogic">32'hFFFFFFFC</span>; <a name="l00074"></a>00074 <a name="l00075"></a><a class="code" href="classbus__terminator.html#a0c661acb3f7be5a11a46134c7fb9d7b2">00075</a> <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classbus__terminator.html#a504389b095a9baf2f88945340e64c4ab">CLK_I</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classbus__terminator.html#a0e510f9c4f5e9af32ea1636b00cfb952">reset_n</a>) <span class="vhdlkeyword">begin</span> <a name="l00076"></a>00076 <span class="vhdlkeyword">if</span>(<a class="code" href="classbus__terminator.html#a0e510f9c4f5e9af32ea1636b00cfb952">reset_n</a> == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00077"></a>00077 <a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">ACK_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00078"></a>00078 <a class="code" href="classbus__terminator.html#af69c7a0cbf74d76a0736a758ee74c7f1">RTY_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00079"></a>00079 <span class="vhdlkeyword">end</span> <a name="l00080"></a>00080 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00081"></a>00081 <span class="vhdlkeyword">if</span>( <a class="code" href="classbus__terminator.html#ab33b4e390a6cca8ffc2af080d219b48a">cpu_space_cycle</a> == <span class="vhdllogic">1'b0</span> && <a name="l00082"></a>00082 <a class="code" href="classbus__terminator.html#aefdadc25d9b399769ec9b68788ce1aab">accepted_addresses</a> == <span class="vhdllogic">1'b1</span> && <a name="l00083"></a>00083 <a class="code" href="classbus__terminator.html#a596ac126fa1168b2d59936d3c9778deb">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classbus__terminator.html#ae3ce51f791c566e098e7d558290e7366">STB_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">ACK_O</a> == <span class="vhdllogic">1'b0</span>) <a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">ACK_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00084"></a>00084 <span class="vhdlkeyword">else</span> <a class="code" href="classbus__terminator.html#aa6bce0ee76b21cf32566499eb19c2861">ACK_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00085"></a>00085 <a name="l00086"></a>00086 <span class="vhdlkeyword">if</span>( <a class="code" href="classbus__terminator.html#ab33b4e390a6cca8ffc2af080d219b48a">cpu_space_cycle</a> == <span class="vhdllogic">1'b1</span> && <a name="l00087"></a>00087 <a class="code" href="classbus__terminator.html#ae78ac8eb886aa627384f63905a5e29e5">ADR_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">5</span>] == <span class="vhdllogic">27'b111_1111_1111_1111_1111_1111_1111</span> && <a name="l00088"></a>00088 <a class="code" href="classbus__terminator.html#a596ac126fa1168b2d59936d3c9778deb">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classbus__terminator.html#ae3ce51f791c566e098e7d558290e7366">STB_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classbus__terminator.html#a31e187f84a3ea1a4e4cd377141a3f19e">WE_I</a> == <span class="vhdllogic">1'b0</span>) <a name="l00089"></a>00089 <span class="vhdlkeyword">begin</span> <a name="l00090"></a>00090 <a class="code" href="classbus__terminator.html#af69c7a0cbf74d76a0736a758ee74c7f1">RTY_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00091"></a>00091 <span class="vhdlkeyword">end</span> <a name="l00092"></a>00092 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00093"></a>00093 <a class="code" href="classbus__terminator.html#af69c7a0cbf74d76a0736a758ee74c7f1">RTY_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00094"></a>00094 <span class="vhdlkeyword">end</span> <a name="l00095"></a>00095 <span class="vhdlkeyword">end</span> <a name="l00096"></a>00096 <span class="vhdlkeyword">end</span> <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="vhdlkeyword">endmodule</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Mon Dec 20 2010 21:20:18 for aoOCS by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>