URL
https://opencores.org/ocsvn/aoocs/aoocs/trunk
Subversion Repositories aoocs
[/] [aoocs/] [trunk/] [doc/] [doxygen/] [html/] [ocs__copper_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: ocs_copper.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>ocs_copper.v</h1> </div> </div> <div class="contents"> <a href="ocs__copper_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 OCS copper implementation with WISHBONE master and slave interface.</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 ocs_copper.v</span> <a name="l00030"></a>00030 <span class="keyword"></span> <a name="l00031"></a>00031 <span class="keyword">List of copper registers:</span> <a name="l00032"></a>00032 <span class="keyword">\verbatim</span> <a name="l00033"></a>00033 <span class="keyword">Implemented:</span> <a name="l00034"></a>00034 <span class="keyword"> COPCON *02E W A( E ) Coprocessor control register (CDANG)</span> <a name="l00035"></a>00035 <span class="keyword"> COP1LCH + 080 W A( E ) Coprocessor first location register (high 3 bits, high 5 bits if ECS)</span> <a name="l00036"></a>00036 <span class="keyword"> COP1LCL + 082 W A Coprocessor first location register (low 15 bits)</span> <a name="l00037"></a>00037 <span class="keyword"> COP2LCH + 084 W A( E ) Coprocessor second location register (high 3 bits, high 5 bits if ECS)</span> <a name="l00038"></a>00038 <span class="keyword"> COP2LCL + 086 W A Coprocessor second location register (low 15 bits)</span> <a name="l00039"></a>00039 <span class="keyword"> COPJMP1 088 S A Coprocessor restart at first location</span> <a name="l00040"></a>00040 <span class="keyword"> COPJMP2 08A S A Coprocessor restart at second location</span> <a name="l00041"></a>00041 <span class="keyword">Not implemented:</span> <a name="l00042"></a>00042 <span class="keyword"> COPINS 08C W A Coprocessor instruction fetch identify</span> <a name="l00043"></a>00043 <span class="keyword">\endverbatim</span> <a name="l00044"></a>00044 <span class="keyword"></span> <a name="l00045"></a>00045 <span class="keyword">\note</span> <a name="l00046"></a>00046 <span class="keyword"> \li \c COPINS is not implemented.</span> <a name="l00047"></a>00047 <span class="keyword">*/</span> <a name="l00048"></a><a class="code" href="classocs__copper.html">00048</a> <span class="vhdlkeyword">module</span> <a class="code" href="classocs__copper.html">ocs_copper</a>( <a name="l00049"></a>00049 <span class="keyword">//% \name Clock and reset </span> <a name="l00050"></a>00050 <span class="keyword">//% @{</span> <a name="l00051"></a><a class="code" href="classocs__copper.html#a82fd4ac5630c895b109e33a282f9cbd2">00051</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#a82fd4ac5630c895b109e33a282f9cbd2">CLK_I</a>, <a name="l00052"></a><a class="code" href="classocs__copper.html#ae2c520f937da7b1076bd843a31cfc53d">00052</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#ae2c520f937da7b1076bd843a31cfc53d">reset_n</a>, <a name="l00053"></a>00053 <span class="keyword">//% @}</span> <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="keyword">//% \name WISHBONE master </span> <a name="l00056"></a>00056 <span class="keyword">//% @{</span> <a name="l00057"></a><a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">00057</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a>, <a name="l00058"></a><a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">00058</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a>, <a name="l00059"></a><a class="code" href="classocs__copper.html#af45abc6ae754f036f66c174088887a2b">00059</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__copper.html#af45abc6ae754f036f66c174088887a2b">WE_O</a>, <a name="l00060"></a><a class="code" href="classocs__copper.html#a00e544d56acd59935a7876bdd2cb0429">00060</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">2</span>] <a class="code" href="classocs__copper.html#a00e544d56acd59935a7876bdd2cb0429">ADR_O</a>, <a name="l00061"></a><a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">00061</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a>, <a name="l00062"></a><a class="code" href="classocs__copper.html#a41eb4fdc95078bcf7a18b1d231a28c1b">00062</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a41eb4fdc95078bcf7a18b1d231a28c1b">master_DAT_O</a>, <a name="l00063"></a><a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">00063</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">master_DAT_I</a>, <a name="l00064"></a><a class="code" href="classocs__copper.html#af61fe6a1e9bf5deab08e267b455e65b3">00064</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#af61fe6a1e9bf5deab08e267b455e65b3">ACK_I</a>, <a name="l00065"></a>00065 <span class="keyword">//% @}</span> <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keyword">//% \name WISHBONE slave </span> <a name="l00068"></a>00068 <span class="keyword">//% @{</span> <a name="l00069"></a><a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">00069</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">CYC_I</a>, <a name="l00070"></a><a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">00070</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">STB_I</a>, <a name="l00071"></a><a class="code" href="classocs__copper.html#a4cb2e185e0c269b55741788d9533b9af">00071</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#a4cb2e185e0c269b55741788d9533b9af">WE_I</a>, <a name="l00072"></a><a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">00072</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">2</span>] <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <a name="l00073"></a><a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">00073</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>, <a name="l00074"></a><a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">00074</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>, <a name="l00075"></a><a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">00075</a> <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a>, <a name="l00076"></a>00076 <span class="keyword">//% @}</span> <a name="l00077"></a>00077 <a name="l00078"></a>00078 <span class="keyword">//% \name Internal OCS ports </span> <a name="l00079"></a>00079 <span class="keyword">//% @{</span> <a name="l00080"></a><a class="code" href="classocs__copper.html#ac73c8de3f8f571b4692ceab1a55e34b9">00080</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#ac73c8de3f8f571b4692ceab1a55e34b9">line_start</a>, <a name="l00081"></a><a class="code" href="classocs__copper.html#a0f9c068c85bb45a8b948f0ebc543ba4e">00081</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a0f9c068c85bb45a8b948f0ebc543ba4e">line_number</a>, <a name="l00082"></a><a class="code" href="classocs__copper.html#aa7eee66ab3dda2dd876ecccff5854ccd">00082</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#aa7eee66ab3dda2dd876ecccff5854ccd">column_number</a>, <a name="l00083"></a>00083 <a name="l00084"></a><a class="code" href="classocs__copper.html#a7423d159485f7ab0f268af5011bf4615">00084</a> <span class="vhdlkeyword">input</span> [<span class="vhdllogic">10</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a7423d159485f7ab0f268af5011bf4615">dma_con</a>, <a name="l00085"></a><a class="code" href="classocs__copper.html#a572e22831e46352306cda7c9de0f43db">00085</a> <span class="vhdlkeyword">input</span> <a class="code" href="classocs__copper.html#a572e22831e46352306cda7c9de0f43db">blitter_busy</a> <a name="l00086"></a>00086 <span class="keyword">//% @}</span> <a name="l00087"></a>00087 ); <a name="l00088"></a>00088 <a name="l00089"></a><a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">00089</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>; <a name="l00090"></a><a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">00090</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>; <a name="l00091"></a><a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">00091</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>; <a name="l00092"></a>00092 <a name="l00093"></a><a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">00093</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a>; <a name="l00094"></a><a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">00094</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a>; <a name="l00095"></a><a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">00095</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>; <a name="l00096"></a><a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">00096</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">47</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>; <a name="l00097"></a><a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">00097</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a>; <a name="l00098"></a>00098 <a name="l00099"></a><a class="code" href="classocs__copper.html#a5792a88618c54463f9e5ae64d8ccd87b">00099</a> <span class="vhdlkeyword">parameter</span> [<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] <a name="l00100"></a>00100 <a class="code" href="classocs__copper.html#a3adc455784e591e0e2dbd011ca881507">S_IDLE</a> = <span class="vhdllogic">2'd0</span>, <a name="l00101"></a>00101 <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a> = <span class="vhdllogic">2'd1</span>, <a name="l00102"></a>00102 <a class="code" href="classocs__copper.html#a5792a88618c54463f9e5ae64d8ccd87b">S_SAVE</a> = <span class="vhdllogic">2'd2</span>; <a name="l00103"></a>00103 <a name="l00104"></a>00104 <span class="keyword">// MOVE: >= 0x20($80-$FF) always, >= 0x10 && < 0x20 CDANG, < 0x10($00-$3E) never</span> <a name="l00105"></a>00105 <span class="keyword">// WAIT: pos >= params; PAL max(226,312)</span> <a name="l00106"></a>00106 <span class="keyword">// horiz [7:1] bits, DDF, 0x0-0xE2, resolution 4 lowres, 8 hires, horiz blanking 0x0F-0x35, lowres 0x04-0x47 not used</span> <a name="l00107"></a>00107 <span class="keyword">// vert [7:0] bits, </span> <a name="l00108"></a>00108 <span class="keyword">// SKIP: pos >= params then skip next instruction</span> <a name="l00109"></a>00109 <span class="keyword">//</span> <a name="l00110"></a>00110 <span class="keyword">// enable bits: if 0 -> always true, vert[7] not masked, always checked</span> <a name="l00111"></a>00111 <a name="l00112"></a><a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">00112</a> <span class="vhdlkeyword">wire</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>; <a name="l00113"></a>00113 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a> = { <span class="vhdllogic">8'd0</span>, <span class="vhdllogic">12'hDFF</span>, <span class="vhdllogic">3'b0</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">40</span>:<span class="vhdllogic">32</span>] }; <a name="l00114"></a>00114 <a name="l00115"></a><a class="code" href="classocs__copper.html#a1b1abd273a0a2e3b77d66e6ece8ec0a6">00115</a> <span class="vhdlkeyword">wire</span> <a class="code" href="classocs__copper.html#a1b1abd273a0a2e3b77d66e6ece8ec0a6">beam_compare</a>; <a name="l00116"></a>00116 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__copper.html#a1b1abd273a0a2e3b77d66e6ece8ec0a6">beam_compare</a> = <a name="l00117"></a>00117 (<a class="code" href="classocs__copper.html#a0f9c068c85bb45a8b948f0ebc543ba4e">line_number</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] & { <span class="vhdllogic">1'b1</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">24</span>] }) > (<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">47</span>:<span class="vhdllogic">40</span>] & { <span class="vhdllogic">1'b1</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">24</span>] }) || <a name="l00118"></a>00118 ( (<a class="code" href="classocs__copper.html#a0f9c068c85bb45a8b948f0ebc543ba4e">line_number</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] & { <span class="vhdllogic">1'b1</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">24</span>] }) == (<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">47</span>:<span class="vhdllogic">40</span>] & { <span class="vhdllogic">1'b1</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">24</span>] }) && <a name="l00119"></a>00119 (<a class="code" href="classocs__copper.html#aa7eee66ab3dda2dd876ecccff5854ccd">column_number</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] & { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">17</span>], <span class="vhdllogic">2'b0</span> }) >= ({ <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">39</span>:<span class="vhdllogic">33</span>], <span class="vhdllogic">2'b0</span> } & { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">17</span>], <span class="vhdllogic">2'b0</span> }) <a name="l00120"></a>00120 ); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <a name="l00123"></a><a class="code" href="classocs__copper.html#adc0902817527e4a343373251e2b06361">00123</a> <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classocs__copper.html#a82fd4ac5630c895b109e33a282f9cbd2">CLK_I</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classocs__copper.html#ae2c520f937da7b1076bd843a31cfc53d">reset_n</a>) <span class="vhdlkeyword">begin</span> <a name="l00124"></a>00124 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#ae2c520f937da7b1076bd843a31cfc53d">reset_n</a> == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00125"></a>00125 <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00126"></a>00126 <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00127"></a>00127 <a class="code" href="classocs__copper.html#af45abc6ae754f036f66c174088887a2b">WE_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00128"></a>00128 <a class="code" href="classocs__copper.html#a00e544d56acd59935a7876bdd2cb0429">ADR_O</a> <= <span class="vhdllogic">30'd0</span>; <a name="l00129"></a>00129 <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a> <= <span class="vhdllogic">4'b0000</span>; <a name="l00130"></a>00130 <a class="code" href="classocs__copper.html#a41eb4fdc95078bcf7a18b1d231a28c1b">master_DAT_O</a> <= <span class="vhdllogic">32'd0</span>; <a name="l00131"></a>00131 <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00132"></a>00132 <a name="l00133"></a>00133 <a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a> <= <span class="vhdllogic">16'd0</span>; <a name="l00134"></a>00134 <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a> <= <span class="vhdllogic">32'd0</span>; <a name="l00135"></a>00135 <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a> <= <span class="vhdllogic">32'd0</span>; <a name="l00136"></a>00136 <a name="l00137"></a>00137 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b11</span>; <a name="l00138"></a>00138 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#a3adc455784e591e0e2dbd011ca881507">S_IDLE</a>; <a name="l00139"></a>00139 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <span class="vhdllogic">32'd0</span>; <a name="l00140"></a>00140 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a> <= <span class="vhdllogic">48'd0</span>; <a name="l00141"></a>00141 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <span class="vhdllogic">2'd0</span>; <a name="l00142"></a>00142 <span class="vhdlkeyword">end</span> <a name="l00143"></a>00143 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00144"></a>00144 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">STB_I</a> == <span class="vhdllogic">1'b1</span> <span class="keyword">/*&& WE_I == 1'b1**/</span> && <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> == <span class="vhdllogic">1'b0</span>) <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00145"></a>00145 <span class="vhdlkeyword">else</span> <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keyword">// JMP1</span> <a name="l00148"></a>00148 <span class="vhdlkeyword">if</span>( (<a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">STB_I</a> == <span class="vhdllogic">1'b1</span> <span class="keyword">/*&& WE_I == 1'b1**/</span> && { <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h088</span> && <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">2</span>] != <span class="vhdllogic">2'b00</span> && <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> == <span class="vhdllogic">1'b0</span>) || <a name="l00149"></a>00149 (<a class="code" href="classocs__copper.html#ac73c8de3f8f571b4692ceab1a55e34b9">line_start</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a0f9c068c85bb45a8b948f0ebc543ba4e">line_number</a> == <span class="vhdllogic">9'd0</span>) ) <span class="keyword">//PAL:25, NTSC: 20</span> <a name="l00150"></a>00150 <span class="vhdlkeyword">begin</span> <a name="l00151"></a>00151 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b01</span>; <a name="l00152"></a>00152 <span class="vhdlkeyword">end</span> <a name="l00153"></a>00153 <span class="keyword">// JMP2</span> <a name="l00154"></a>00154 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">STB_I</a> == <span class="vhdllogic">1'b1</span> <span class="keyword">/*&& WE_I == 1'b1**/</span> && { <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h088</span> && <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a>[<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] != <span class="vhdllogic">2'b00</span> && <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00155"></a>00155 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b10</span>; <a name="l00156"></a>00156 <span class="vhdlkeyword">end</span> <a name="l00157"></a>00157 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> == <a class="code" href="classocs__copper.html#a5792a88618c54463f9e5ae64d8ccd87b">S_SAVE</a> && <a name="l00158"></a>00158 ((<a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <= <span class="vhdllogic">9'h03E</span>) || (<a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b0</span> && <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <= <span class="vhdllogic">9'h07E</span>))) <a name="l00159"></a>00159 <span class="vhdlkeyword">begin</span> <a name="l00160"></a>00160 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b11</span>; <a name="l00161"></a>00161 <span class="vhdlkeyword">end</span> <a name="l00162"></a>00162 <a name="l00163"></a>00163 <span class="keyword">// 02C: VHPOSW(not used), COPCON,</span> <a name="l00164"></a>00164 <span class="keyword">// 080: COP1LCH, COP1LCL,</span> <a name="l00165"></a>00165 <span class="keyword">// 084: COP2LCH, COP2LCL,</span> <a name="l00166"></a>00166 <span class="keyword">// 088: COPJMP1, COPJMP2,</span> <a name="l00167"></a>00167 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a2903fa0ee8d1fda5dc8a4a773f1076f9">CYC_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a38ec4a43d791ee0d93fc46eb71788805">STB_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#a4cb2e185e0c269b55741788d9533b9af">WE_I</a> == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#aad62e540990d52428ef467ace3048e86">ACK_O</a> == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00168"></a>00168 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h02C</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>]; <a name="l00169"></a>00169 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h02C</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>]; <a name="l00170"></a>00170 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h02C</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1'b1</span>) ; <a name="l00171"></a>00171 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h02C</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">3</span>] == <span class="vhdllogic">1'b1</span>) ; <a name="l00172"></a>00172 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h080</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>]; <a name="l00173"></a>00173 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h080</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>]; <a name="l00174"></a>00174 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h080</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>]; <a name="l00175"></a>00175 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h080</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">3</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>]; <a name="l00176"></a>00176 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h084</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>]; <a name="l00177"></a>00177 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h084</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>]; <a name="l00178"></a>00178 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h084</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>]; <a name="l00179"></a>00179 <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__copper.html#acc5e81817b871fb239a4ec14e08ac7d0">ADR_I</a>, <span class="vhdllogic">2'b0</span> } == <span class="vhdllogic">9'h084</span> && <a class="code" href="classocs__copper.html#a963a31afacbb0042063888ac7188b225">SEL_I</a>[<span class="vhdllogic">3</span>] == <span class="vhdllogic">1'b1</span>) <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>] <= <a class="code" href="classocs__copper.html#a679436efd8225e90d2b3ed5afc9090b5">slave_DAT_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>]; <a name="l00180"></a>00180 <span class="vhdlkeyword">end</span> <a name="l00181"></a>00181 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> == <a class="code" href="classocs__copper.html#a3adc455784e591e0e2dbd011ca881507">S_IDLE</a>) <span class="vhdlkeyword">begin</span> <a name="l00182"></a>00182 <span class="keyword">// DMAEN, COPEN</span> <a name="l00183"></a>00183 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a7423d159485f7ab0f268af5011bf4615">dma_con</a>[<span class="vhdllogic">9</span>] == <span class="vhdllogic">1'b0</span> || <a class="code" href="classocs__copper.html#a7423d159485f7ab0f268af5011bf4615">dma_con</a>[<span class="vhdllogic">7</span>] == <span class="vhdllogic">1'b0</span> ) <span class="vhdlkeyword">begin</span> <a name="l00184"></a>00184 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b11</span>; <a name="l00185"></a>00185 <span class="vhdlkeyword">end</span> <a name="l00186"></a>00186 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> == <span class="vhdllogic">2'b11</span>) <span class="vhdlkeyword">begin</span> <a name="l00187"></a>00187 <span class="keyword">// no operation</span> <a name="l00188"></a>00188 <span class="vhdlkeyword">end</span> <a name="l00189"></a>00189 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> == <span class="vhdllogic">2'b01</span>) <span class="vhdlkeyword">begin</span> <a name="l00190"></a>00190 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b00</span>; <a name="l00191"></a>00191 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#acb562608b8abbae30575a4ffba497454">cop1_loc</a>; <a name="l00192"></a>00192 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <span class="vhdllogic">2'd0</span>; <a name="l00193"></a>00193 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>; <a name="l00194"></a>00194 <span class="vhdlkeyword">end</span> <a name="l00195"></a>00195 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> == <span class="vhdllogic">2'b10</span>) <span class="vhdlkeyword">begin</span> <a name="l00196"></a>00196 <a class="code" href="classocs__copper.html#a9c3a72d193d99fdfca268e776e4d3bba">jump_strobe</a> <= <span class="vhdllogic">2'b00</span>; <a name="l00197"></a>00197 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a94694b78b131bfce37fb0683304c2516">cop2_loc</a>; <a name="l00198"></a>00198 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <span class="vhdllogic">2'd0</span>; <a name="l00199"></a>00199 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>; <a name="l00200"></a>00200 <span class="vhdlkeyword">end</span> <a name="l00201"></a>00201 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> < <span class="vhdllogic">2'd2</span>) <span class="vhdlkeyword">begin</span> <a name="l00202"></a>00202 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>; <a name="l00203"></a>00203 <span class="vhdlkeyword">end</span> <a name="l00204"></a>00204 <span class="keyword">// MOVE</span> <a name="l00205"></a>00205 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">32</span>] == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00206"></a>00206 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#a5792a88618c54463f9e5ae64d8ccd87b">S_SAVE</a>; <a name="l00207"></a>00207 <span class="vhdlkeyword">end</span> <a name="l00208"></a>00208 <span class="keyword">// WAIT</span> <a name="l00209"></a>00209 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">32</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">16</span>] == <span class="vhdllogic">1'b0</span> && (<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>] == <span class="vhdllogic">1'b1</span> || <a class="code" href="classocs__copper.html#a572e22831e46352306cda7c9de0f43db">blitter_busy</a> == <span class="vhdllogic">1'b0</span>) && <a class="code" href="classocs__copper.html#a1b1abd273a0a2e3b77d66e6ece8ec0a6">beam_compare</a> == <span class="vhdllogic">1'b1</span>) <span class="vhdlkeyword">begin</span> <a name="l00210"></a>00210 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> - <span class="vhdllogic">2'd2</span>; <a name="l00211"></a>00211 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a> <= { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">32'd0</span> }; <a name="l00212"></a>00212 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>; <a name="l00213"></a>00213 <span class="vhdlkeyword">end</span> <a name="l00214"></a>00214 <span class="keyword">// SKIP</span> <a name="l00215"></a>00215 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">32</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">16</span>] == <span class="vhdllogic">1'b1</span> && (<a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>] == <span class="vhdllogic">1'b1</span> || <a class="code" href="classocs__copper.html#a572e22831e46352306cda7c9de0f43db">blitter_busy</a> == <span class="vhdllogic">1'b0</span>) && <a class="code" href="classocs__copper.html#a1b1abd273a0a2e3b77d66e6ece8ec0a6">beam_compare</a> == <span class="vhdllogic">1'b1</span>) <span class="vhdlkeyword">begin</span> <a name="l00216"></a>00216 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> == <span class="vhdllogic">2'd2</span>) <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd4</span>; <a name="l00217"></a>00217 <span class="vhdlkeyword">else</span> <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd2</span>; <a name="l00218"></a>00218 <a name="l00219"></a>00219 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <span class="vhdllogic">2'd0</span>; <a name="l00220"></a>00220 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a> <= { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">32'd0</span> }; <a name="l00221"></a>00221 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>; <a name="l00222"></a>00222 <span class="vhdlkeyword">end</span> <a name="l00223"></a>00223 <a name="l00224"></a>00224 <span class="vhdlkeyword">end</span> <a name="l00225"></a>00225 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> == <a class="code" href="classocs__copper.html#afbf83fe2da469bd406c206e118c29a67">S_LOAD</a>) <span class="vhdlkeyword">begin</span> <a name="l00226"></a>00226 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af61fe6a1e9bf5deab08e267b455e65b3">ACK_I</a> == <span class="vhdllogic">1'b1</span>) <span class="vhdlkeyword">begin</span> <a name="l00227"></a>00227 <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00228"></a>00228 <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00229"></a>00229 <a name="l00230"></a>00230 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b0</span> && <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> == <span class="vhdllogic">2'd0</span>) <span class="vhdlkeyword">begin</span> <a name="l00231"></a>00231 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd4</span>; <a name="l00232"></a>00232 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> + <span class="vhdllogic">2'd2</span>; <a name="l00233"></a>00233 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">47</span>:<span class="vhdllogic">16</span>] <= <a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">master_DAT_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]; <a name="l00234"></a>00234 <span class="vhdlkeyword">end</span> <a name="l00235"></a>00235 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b0</span> && <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> == <span class="vhdllogic">2'd1</span>) <span class="vhdlkeyword">begin</span> <a name="l00236"></a>00236 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd4</span>; <a name="l00237"></a>00237 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> + <span class="vhdllogic">2'd2</span>; <a name="l00238"></a>00238 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] <= <a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">master_DAT_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]; <a name="l00239"></a>00239 <span class="vhdlkeyword">end</span> <a name="l00240"></a>00240 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> == <span class="vhdllogic">2'd0</span>) <span class="vhdlkeyword">begin</span> <a name="l00241"></a>00241 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd2</span>; <a name="l00242"></a>00242 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> + <span class="vhdllogic">2'd1</span>; <a name="l00243"></a>00243 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">47</span>:<span class="vhdllogic">32</span>] <= <a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">master_DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>]; <a name="l00244"></a>00244 <span class="vhdlkeyword">end</span> <a name="l00245"></a>00245 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> == <span class="vhdllogic">2'd1</span>) <span class="vhdlkeyword">begin</span> <a name="l00246"></a>00246 <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a> + <span class="vhdllogic">32'd2</span>; <a name="l00247"></a>00247 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> + <span class="vhdllogic">2'd1</span>; <a name="l00248"></a>00248 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">16</span>] <= <a class="code" href="classocs__copper.html#a5e67c9c0545fc100fc254519132a22dc">master_DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>]; <a name="l00249"></a>00249 <span class="vhdlkeyword">end</span> <a name="l00250"></a>00250 <a name="l00251"></a>00251 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#a3adc455784e591e0e2dbd011ca881507">S_IDLE</a>; <a name="l00252"></a>00252 <span class="vhdlkeyword">end</span> <a name="l00253"></a>00253 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00254"></a>00254 <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00255"></a>00255 <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00256"></a>00256 <a class="code" href="classocs__copper.html#af45abc6ae754f036f66c174088887a2b">WE_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00257"></a>00257 <a class="code" href="classocs__copper.html#a00e544d56acd59935a7876bdd2cb0429">ADR_O</a> <= <a class="code" href="classocs__copper.html#a54aa4b8ec122701677b89f09b8dfdb73">pc</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">2</span>]; <a name="l00258"></a>00258 <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a> <= <span class="vhdllogic">4'b1111</span>; <a name="l00259"></a>00259 <span class="vhdlkeyword">end</span> <a name="l00260"></a>00260 <span class="vhdlkeyword">end</span> <a name="l00261"></a>00261 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> == <a class="code" href="classocs__copper.html#a5792a88618c54463f9e5ae64d8ccd87b">S_SAVE</a>) <span class="vhdlkeyword">begin</span> <a name="l00262"></a>00262 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af61fe6a1e9bf5deab08e267b455e65b3">ACK_I</a> == <span class="vhdllogic">1'b1</span> || (<a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b1</span> && <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <= <span class="vhdllogic">9'h03E</span>) || (<a class="code" href="classocs__copper.html#a94a8475be3fb6ee8cec49094c8d9fdc3">cop_con</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b0</span> && <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <= <span class="vhdllogic">9'h07E</span>)) <a name="l00263"></a>00263 <span class="vhdlkeyword">begin</span> <a name="l00264"></a>00264 <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00265"></a>00265 <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a> <= <span class="vhdllogic">1'b0</span>; <a name="l00266"></a>00266 <a name="l00267"></a>00267 <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> <= <a class="code" href="classocs__copper.html#ad285559de3483b1cd7b25e610ef50670">avail</a> - <span class="vhdllogic">2'd2</span>; <a name="l00268"></a>00268 <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a> <= { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">32'd0</span> }; <a name="l00269"></a>00269 <a name="l00270"></a>00270 <a class="code" href="classocs__copper.html#aac3b482f924f50e73426a1671a43649b">state</a> <= <a class="code" href="classocs__copper.html#a3adc455784e591e0e2dbd011ca881507">S_IDLE</a>; <a name="l00271"></a>00271 <span class="vhdlkeyword">end</span> <a name="l00272"></a>00272 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00273"></a>00273 <a class="code" href="classocs__copper.html#a5d72bc1d374db1adca4708656e872543">CYC_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00274"></a>00274 <a class="code" href="classocs__copper.html#a5d5566ebb609dd3b36958a4581403cdf">STB_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00275"></a>00275 <a class="code" href="classocs__copper.html#af45abc6ae754f036f66c174088887a2b">WE_O</a> <= <span class="vhdllogic">1'b1</span>; <a name="l00276"></a>00276 <a class="code" href="classocs__copper.html#a00e544d56acd59935a7876bdd2cb0429">ADR_O</a> <= <a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">2</span>]; <a name="l00277"></a>00277 <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__copper.html#af9864afce551adcba58bed42407b9c88">move_address</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1'b0</span>) <span class="vhdlkeyword">begin</span> <a name="l00278"></a>00278 <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a> <= <span class="vhdllogic">4'b1100</span>; <a name="l00279"></a>00279 <a class="code" href="classocs__copper.html#a41eb4fdc95078bcf7a18b1d231a28c1b">master_DAT_O</a> <= { <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">16</span>], <span class="vhdllogic">16'd0</span> }; <a name="l00280"></a>00280 <span class="vhdlkeyword">end</span> <a name="l00281"></a>00281 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span> <a name="l00282"></a>00282 <a class="code" href="classocs__copper.html#ae80e8994c104f7523445b8447a448d61">SEL_O</a> <= <span class="vhdllogic">4'b0011</span>; <a name="l00283"></a>00283 <a class="code" href="classocs__copper.html#a41eb4fdc95078bcf7a18b1d231a28c1b">master_DAT_O</a> <= { <span class="vhdllogic">16'd0</span>, <a class="code" href="classocs__copper.html#af2af2325e813710574a3f52de141a721">ir</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">16</span>] }; <a name="l00284"></a>00284 <span class="vhdlkeyword">end</span> <a name="l00285"></a>00285 <span class="vhdlkeyword">end</span> <a name="l00286"></a>00286 <span class="vhdlkeyword">end</span> <a name="l00287"></a>00287 <span class="vhdlkeyword">end</span> <a name="l00288"></a>00288 <span class="vhdlkeyword">end</span> <a name="l00289"></a>00289 <a name="l00290"></a>00290 <span class="vhdlkeyword">endmodule</span> <a name="l00291"></a>00291 </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>