OpenCores
URL https://opencores.org/ocsvn/aoocs/aoocs/trunk

Subversion Repositories aoocs

[/] [aoocs/] [trunk/] [doc/] [doxygen/] [html/] [ocs__input_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_input.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&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Design&#160;Unit&#160;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&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>ocs_input.v</h1>  </div>
</div>
<div class="contents">
<a href="ocs__input_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&#39;&#39; 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 user input implementation with WISHBONE 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_input.v</span>
<a name="l00030"></a>00030 <span class="keyword"></span>
<a name="l00031"></a>00031 <span class="keyword">List of user input 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">     [DSKDATR &amp; *008  ER  P       Disk data early read (dummy address)          not implemented]</span>
<a name="l00035"></a>00035 <span class="keyword">    JOY0DAT     *00A  R   D       Joystick-mouse 0 data (vert,horiz)            read implemented here</span>
<a name="l00036"></a>00036 <span class="keyword">    </span>
<a name="l00037"></a>00037 <span class="keyword">    JOY1DAT     *00C  R   D       Joystick-mouse 1 data (vert,horiz)            read implemented here</span>
<a name="l00038"></a>00038 <span class="keyword">     [CLXDAT    *00E  R   D       Collision data register (read and clear)      read implemented here]</span>
<a name="l00039"></a>00039 <span class="keyword">    </span>
<a name="l00040"></a>00040 <span class="keyword">    JOYTEST     *036  W   D       Write to all four joystick-mouse counters at once</span>
<a name="l00041"></a>00041 <span class="keyword"></span>
<a name="l00042"></a>00042 <span class="keyword">Not implemented:</span>
<a name="l00043"></a>00043 <span class="keyword">     [ADKCONR   *010  R   P       Audio, disk control register read             read not implemented here]</span>
<a name="l00044"></a>00044 <span class="keyword">    POT0DAT     *012  R   P( E )  Pot counter pair 0 data (vert,horiz)          read not implemented here</span>
<a name="l00045"></a>00045 <span class="keyword">    </span>
<a name="l00046"></a>00046 <span class="keyword">    POT1DAT     *014  R   P( E )  Pot counter pair 1 data (vert,horiz)          </span>
<a name="l00047"></a>00047 <span class="keyword">    POTGOR      *016  R   P       Pot port data read (formerly POTINP)</span>
<a name="l00048"></a>00048 <span class="keyword">    POTGO       *034  W   P       Pot port data write and start</span>
<a name="l00049"></a>00049 <span class="keyword">\endverbatim</span>
<a name="l00050"></a>00050 <span class="keyword">*/</span>
<a name="l00051"></a><a class="code" href="classocs__input.html">00051</a> <span class="vhdlkeyword">module</span> <a class="code" href="classocs__input.html">ocs_input</a>(
<a name="l00052"></a>00052     <span class="keyword">//% \name Clock and reset
</span>
<a name="l00053"></a>00053     <span class="keyword">//% @{</span>
<a name="l00054"></a><a class="code" href="classocs__input.html#a4097ecb98b3486fbfb7e2b2354299e38">00054</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a4097ecb98b3486fbfb7e2b2354299e38">CLK_I</a>,
<a name="l00055"></a><a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">00055</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">reset_n</a>,
<a name="l00056"></a>00056     <span class="keyword">//% @}</span>
<a name="l00057"></a>00057     
<a name="l00058"></a>00058     <span class="keyword">//% \name On-Screen-Display management interface
</span>
<a name="l00059"></a>00059     <span class="keyword">//% @{</span>
<a name="l00060"></a><a class="code" href="classocs__input.html#aa93b8e862d09f357d3051b77f7729a5b">00060</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#aa93b8e862d09f357d3051b77f7729a5b">on_screen_display</a>,
<a name="l00061"></a><a class="code" href="classocs__input.html#ad0086d7ef7043c9684dce50476516b07">00061</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#ad0086d7ef7043c9684dce50476516b07">enable_joystick_1</a>,
<a name="l00062"></a>00062     <span class="keyword">//% @}</span>
<a name="l00063"></a>00063     
<a name="l00064"></a>00064     <span class="keyword">//% \name WISHBONE slave
</span>
<a name="l00065"></a>00065     <span class="keyword">//% @{</span>
<a name="l00066"></a><a class="code" href="classocs__input.html#a63add4610448cadee61e25e90f8ad230">00066</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a63add4610448cadee61e25e90f8ad230">CYC_I</a>,
<a name="l00067"></a><a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">00067</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">STB_I</a>,
<a name="l00068"></a><a class="code" href="classocs__input.html#a0f5def2e35084feb5c4c865cb035a69b">00068</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a0f5def2e35084feb5c4c865cb035a69b">WE_I</a>,
<a name="l00069"></a><a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">00069</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">2</span>]         <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>,
<a name="l00070"></a><a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">00070</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>]         <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>,
<a name="l00071"></a><a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">00071</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]        <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>,
<a name="l00072"></a><a class="code" href="classocs__input.html#a6000765cc199349aaad0e03fe0180b28">00072</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__input.html#a6000765cc199349aaad0e03fe0180b28">DAT_O</a>,
<a name="l00073"></a><a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">00073</a>     <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span>          <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a>,
<a name="l00074"></a>00074     <span class="keyword">//% @}</span>
<a name="l00075"></a>00075     
<a name="l00076"></a>00076     <span class="keyword">//% \name Not aligned register access on a 32-bit WISHBONE bus
</span>
<a name="l00077"></a>00077     <span class="keyword">//% @{</span>
<a name="l00078"></a>00078         <span class="keyword">// CLXDAT read implemented here</span>
<a name="l00079"></a><a class="code" href="classocs__input.html#a8699f751f090e01f2d03e95bdf4e957f">00079</a>     <span class="vhdlkeyword">output</span>              <a class="code" href="classocs__input.html#a8699f751f090e01f2d03e95bdf4e957f">na_clx_dat_read</a>,
<a name="l00080"></a><a class="code" href="classocs__input.html#a9766cf787373f3fdefea5eae308f9822">00080</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>]        <a class="code" href="classocs__input.html#a9766cf787373f3fdefea5eae308f9822">na_clx_dat</a>,
<a name="l00081"></a>00081         <span class="keyword">// POT0DAT read not implemented here</span>
<a name="l00082"></a><a class="code" href="classocs__input.html#a1de5afd46d7f97d4a56bc3e5ce199a89">00082</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a1de5afd46d7f97d4a56bc3e5ce199a89">na_pot0dat_read</a>,
<a name="l00083"></a><a class="code" href="classocs__input.html#a61718b31aa58d788924985eac70334a4">00083</a>     <span class="vhdlkeyword">output</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>]       <a class="code" href="classocs__input.html#a61718b31aa58d788924985eac70334a4">na_pot0dat</a>,
<a name="l00084"></a>00084     <span class="keyword">//% @}</span>
<a name="l00085"></a>00085     
<a name="l00086"></a>00086     <span class="keyword">//% \name User input CIA interface
</span>
<a name="l00087"></a>00087     <span class="keyword">//% @{</span>
<a name="l00088"></a>00088     <span class="keyword">// keyboard output</span>
<a name="l00089"></a><a class="code" href="classocs__input.html#a0fa9f11b067c96f7175ded9a8c5f158e">00089</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a0fa9f11b067c96f7175ded9a8c5f158e">sp_from_cia</a>,
<a name="l00090"></a><a class="code" href="classocs__input.html#aa168bfc6e82811a06fad37852e44ba33">00090</a>     <span class="vhdlkeyword">output</span>              <a class="code" href="classocs__input.html#aa168bfc6e82811a06fad37852e44ba33">sp_to_cia</a>,
<a name="l00091"></a><a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">00091</a>     <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span>          <a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a>,
<a name="l00092"></a>00092     
<a name="l00093"></a>00093     <span class="keyword">// CIA-A fire buttons</span>
<a name="l00094"></a><a class="code" href="classocs__input.html#a57aaae6a32563490c2a7e22aa86935c2">00094</a>     <span class="vhdlkeyword">output</span> <span class="vhdlkeyword">reg</span>          <a class="code" href="classocs__input.html#a57aaae6a32563490c2a7e22aa86935c2">ciaa_fire_0_n</a>,
<a name="l00095"></a><a class="code" href="classocs__input.html#a6f401ee89b8343868c96a03e9df59ec4">00095</a>     <span class="vhdlkeyword">output</span>              <a class="code" href="classocs__input.html#a6f401ee89b8343868c96a03e9df59ec4">ciaa_fire_1_n</a>,
<a name="l00096"></a>00096     <span class="keyword">//% @}</span>
<a name="l00097"></a>00097     
<a name="l00098"></a>00098     <span class="keyword">//% \name drv_keyboard interface
</span>
<a name="l00099"></a>00099     <span class="keyword">//% @{</span>
<a name="l00100"></a><a class="code" href="classocs__input.html#afdc7af614b83ee930342c25bda91a4b3">00100</a>     <span class="vhdlkeyword">output</span>              <a class="code" href="classocs__input.html#afdc7af614b83ee930342c25bda91a4b3">keyboard_ready</a>,
<a name="l00101"></a><a class="code" href="classocs__input.html#a77547e436c339e958e169ccee8c1dc69">00101</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a77547e436c339e958e169ccee8c1dc69">keyboard_event</a>,
<a name="l00102"></a><a class="code" href="classocs__input.html#a19f8bd6a94b8097c719d800565e606d8">00102</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>]         <a class="code" href="classocs__input.html#a19f8bd6a94b8097c719d800565e606d8">keyboard_scancode</a>,
<a name="l00103"></a>00103     
<a name="l00104"></a>00104     <span class="keyword">// joystick on port 1</span>
<a name="l00105"></a><a class="code" href="classocs__input.html#acdbaf74eac667d96f9513f12e3b3b8f2">00105</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#acdbaf74eac667d96f9513f12e3b3b8f2">joystick_1_up</a>,
<a name="l00106"></a><a class="code" href="classocs__input.html#aa7dd38a5809543d625453b6fe34ff975">00106</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#aa7dd38a5809543d625453b6fe34ff975">joystick_1_down</a>,
<a name="l00107"></a><a class="code" href="classocs__input.html#af59aaf36ae35866073aaf1ad6cf3d0ab">00107</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#af59aaf36ae35866073aaf1ad6cf3d0ab">joystick_1_left</a>,
<a name="l00108"></a><a class="code" href="classocs__input.html#aecf900811a4bd3b33eb68f2bc1f0fa4b">00108</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#aecf900811a4bd3b33eb68f2bc1f0fa4b">joystick_1_right</a>,
<a name="l00109"></a><a class="code" href="classocs__input.html#a7181fb20f607314bb1adb7b2e87f8ffb">00109</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a7181fb20f607314bb1adb7b2e87f8ffb">joystick_1_fire</a>,
<a name="l00110"></a>00110     <span class="keyword">//% @}</span>
<a name="l00111"></a>00111     
<a name="l00112"></a>00112     <span class="keyword">//% \name drv_mouse interface
</span>
<a name="l00113"></a>00113     <span class="keyword">//% @{</span>
<a name="l00114"></a><a class="code" href="classocs__input.html#a6c1420349b39d1da8dd088cd5d011f1a">00114</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#a6c1420349b39d1da8dd088cd5d011f1a">mouse_moved</a>,
<a name="l00115"></a><a class="code" href="classocs__input.html#a33f252f3d12c92f30fedb23105116f57">00115</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>]         <a class="code" href="classocs__input.html#a33f252f3d12c92f30fedb23105116f57">mouse_y_move</a>,
<a name="l00116"></a><a class="code" href="classocs__input.html#ae7856c7d789112c571ab5a911182f772">00116</a>     <span class="vhdlkeyword">input</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>]         <a class="code" href="classocs__input.html#ae7856c7d789112c571ab5a911182f772">mouse_x_move</a>,
<a name="l00117"></a><a class="code" href="classocs__input.html#ad1a969d2559b895471a9622ebbe72bac">00117</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#ad1a969d2559b895471a9622ebbe72bac">mouse_left_button</a>,
<a name="l00118"></a><a class="code" href="classocs__input.html#ab940629f6aca8ebb676f9109161ac567">00118</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#ab940629f6aca8ebb676f9109161ac567">mouse_right_button</a>,
<a name="l00119"></a><a class="code" href="classocs__input.html#aadba9a1aceecda48b561adfd42983f4c">00119</a>     <span class="vhdlkeyword">input</span>               <a class="code" href="classocs__input.html#aadba9a1aceecda48b561adfd42983f4c">mouse_middle_button</a>
<a name="l00120"></a>00120     <span class="keyword">//% @}</span>
<a name="l00121"></a>00121 );
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="keyword">//-------------------- keyboard start</span>
<a name="l00124"></a>00124 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#aa168bfc6e82811a06fad37852e44ba33">sp_to_cia</a> = ~<a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a>[<span class="vhdllogic">7</span>];
<a name="l00125"></a>00125 
<a name="l00126"></a>00126 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#afdc7af614b83ee930342c25bda91a4b3">keyboard_ready</a> = (<a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> == <span class="vhdllogic">16&#39;d0</span>);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00129"></a><a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">00129</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a>;
<a name="l00130"></a><a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">00130</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a>;
<a name="l00131"></a><a class="code" href="classocs__input.html#a0cc6604e25d987cd33dbc16ea249080c">00131</a> <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classocs__input.html#a4097ecb98b3486fbfb7e2b2354299e38">CLK_I</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">reset_n</a>) <span class="vhdlkeyword">begin</span>
<a name="l00132"></a>00132     <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">reset_n</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
<a name="l00133"></a>00133         <a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a>  &lt;= <span class="vhdllogic">1&#39;b1</span>;
<a name="l00134"></a>00134         <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <span class="vhdllogic">16&#39;d0</span>;
<a name="l00135"></a>00135         <a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a>    &lt;= <span class="vhdllogic">8&#39;hFF</span>;
<a name="l00136"></a>00136     <span class="vhdlkeyword">end</span>
<a name="l00137"></a>00137     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a77547e436c339e958e169ccee8c1dc69">keyboard_event</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#aa93b8e862d09f357d3051b77f7729a5b">on_screen_display</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
<a name="l00138"></a>00138         <a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a> &lt;= <a class="code" href="classocs__input.html#a19f8bd6a94b8097c719d800565e606d8">keyboard_scancode</a>;
<a name="l00139"></a>00139         <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> + <span class="vhdllogic">16&#39;d1</span>;
<a name="l00140"></a>00140         <a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
<a name="l00141"></a>00141     <span class="vhdlkeyword">end</span>
<a name="l00142"></a>00142     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &gt;= <span class="vhdllogic">16&#39;d1</span> &amp;&amp; <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <span class="vhdllogic">16&#39;d15</span>) <span class="vhdlkeyword">begin</span>
<a name="l00143"></a>00143         <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> + <span class="vhdllogic">16&#39;d1</span>;
<a name="l00144"></a>00144         <a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a> &lt;= ~<a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a>;
<a name="l00145"></a>00145         <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#ae43882f1c230365641bd96aa4478967a">cnt_to_cia</a> == <span class="vhdllogic">1&#39;b1</span>) <a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a> &lt;= { <a class="code" href="classocs__input.html#a73080e1cc32872450bc2ea70235e2099">sp_shift</a>[<span class="vhdllogic">6</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">1&#39;b0</span> };
<a name="l00146"></a>00146     <span class="vhdlkeyword">end</span>
<a name="l00147"></a>00147     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> == <span class="vhdllogic">16&#39;d16</span> &amp;&amp; <a class="code" href="classocs__input.html#a0fa9f11b067c96f7175ded9a8c5f158e">sp_from_cia</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
<a name="l00148"></a>00148         <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> + <span class="vhdllogic">16&#39;d1</span>;
<a name="l00149"></a>00149     <span class="vhdlkeyword">end</span>
<a name="l00150"></a>00150     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> == <span class="vhdllogic">16&#39;d17</span> &amp;&amp; <a class="code" href="classocs__input.html#a0fa9f11b067c96f7175ded9a8c5f158e">sp_from_cia</a> == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
<a name="l00151"></a>00151         <a class="code" href="classocs__input.html#ac65746b5ef6a9ce4782ebf1eca626b30">cnt_counter</a> &lt;= <span class="vhdllogic">16&#39;d0</span>;
<a name="l00152"></a>00152     <span class="vhdlkeyword">end</span>
<a name="l00153"></a>00153 <span class="keyword">/*  synchronization</span>
<a name="l00154"></a>00154 <span class="keyword">    else if(cnt_counter == 16&#39;d65535 &amp;&amp; sp_from_cia == 1&#39;b1) begin</span>
<a name="l00155"></a>00155 <span class="keyword">        cnt_to_cia &lt;= ~cnt_to_cia;</span>
<a name="l00156"></a>00156 <span class="keyword">        cnt_counter &lt;= 16&#39;d16;</span>
<a name="l00157"></a>00157 <span class="keyword">    end</span>
<a name="l00158"></a>00158 <span class="keyword">    else if(cnt_counter &gt;= 16&#39;d16 &amp;&amp; sp_from_cia == 1&#39;b1) begin</span>
<a name="l00159"></a>00159 <span class="keyword">        cnt_counter &lt;= cnt_counter + 16&#39;d1;</span>
<a name="l00160"></a>00160 <span class="keyword">    end</span>
<a name="l00161"></a>00161 <span class="keyword">    else sp_from_cia == 1&#39;b0 -&gt; sp_from_cia == 1&#39;b0 begin</span>
<a name="l00162"></a>00162 <span class="keyword">        cnt_counter &lt;= 16&#39;d0;</span>
<a name="l00163"></a>00163 <span class="keyword">    end</span>
<a name="l00164"></a>00164 <span class="keyword">*/</span>
<a name="l00165"></a>00165 <span class="vhdlkeyword">end</span>
<a name="l00166"></a>00166 <span class="keyword">//-------------------- keyboard end</span>
<a name="l00167"></a>00167 
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a61718b31aa58d788924985eac70334a4">na_pot0dat</a> = <span class="vhdllogic">16&#39;d0</span>;
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a8699f751f090e01f2d03e95bdf4e957f">na_clx_dat_read</a> =
<a name="l00172"></a>00172     (<a class="code" href="classocs__input.html#a63add4610448cadee61e25e90f8ad230">CYC_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">STB_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a> == <span class="vhdllogic">1&#39;b0</span> &amp;&amp; <a class="code" href="classocs__input.html#a0f5def2e35084feb5c4c865cb035a69b">WE_I</a> == <span class="vhdllogic">1&#39;b0</span> &amp;&amp; { <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h018</span> &amp;&amp; <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>[<span class="vhdllogic">1</span>:<span class="vhdllogic">0</span>] != <span class="vhdllogic">2&#39;b00</span>);
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">00174</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>;
<a name="l00175"></a><a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">00175</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>;
<a name="l00176"></a><a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">00176</a> <span class="vhdlkeyword">reg</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">joy1dat</a>;
<a name="l00177"></a><a class="code" href="classocs__input.html#a7e32f39227c244a369b6a4d758fe5bea">00177</a> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__input.html#a7e32f39227c244a369b6a4d758fe5bea">right_button_n</a>;
<a name="l00178"></a><a class="code" href="classocs__input.html#ac2df99f917f50e1213002937aba64059">00178</a> <span class="vhdlkeyword">reg</span> <a class="code" href="classocs__input.html#ac2df99f917f50e1213002937aba64059">middle_button_n</a>;
<a name="l00179"></a>00179 
<a name="l00180"></a><a class="code" href="classocs__input.html#a000c86f2ec73eb492223357b22bea156">00180</a> <span class="vhdlkeyword">wire</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#a000c86f2ec73eb492223357b22bea156">joy1dat_final</a>;
<a name="l00181"></a>00181 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a000c86f2ec73eb492223357b22bea156">joy1dat_final</a> =
<a name="l00182"></a>00182     (<a class="code" href="classocs__input.html#ad0086d7ef7043c9684dce50476516b07">enable_joystick_1</a> == <span class="vhdllogic">1&#39;b1</span>)?
<a name="l00183"></a>00183     {   <span class="vhdllogic">6&#39;b0</span>,                               <span class="keyword">//15-10</span>
<a name="l00184"></a>00184         <a class="code" href="classocs__input.html#af59aaf36ae35866073aaf1ad6cf3d0ab">joystick_1_left</a>,                    <span class="keyword">//9</span>
<a name="l00185"></a>00185         <a class="code" href="classocs__input.html#acdbaf74eac667d96f9513f12e3b3b8f2">joystick_1_up</a> ^ <a class="code" href="classocs__input.html#af59aaf36ae35866073aaf1ad6cf3d0ab">joystick_1_left</a>,    <span class="keyword">//8</span>
<a name="l00186"></a>00186         <span class="vhdllogic">6&#39;b0</span>,                               <span class="keyword">//7-2</span>
<a name="l00187"></a>00187         <a class="code" href="classocs__input.html#aecf900811a4bd3b33eb68f2bc1f0fa4b">joystick_1_right</a>,                   <span class="keyword">//1</span>
<a name="l00188"></a>00188         <a class="code" href="classocs__input.html#aa7dd38a5809543d625453b6fe34ff975">joystick_1_down</a> ^ <a class="code" href="classocs__input.html#aecf900811a4bd3b33eb68f2bc1f0fa4b">joystick_1_right</a>  <span class="keyword">//0</span>
<a name="l00189"></a>00189     } :
<a name="l00190"></a>00190     <a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">joy1dat</a>;
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a6f401ee89b8343868c96a03e9df59ec4">ciaa_fire_1_n</a> = (<a class="code" href="classocs__input.html#ad0086d7ef7043c9684dce50476516b07">enable_joystick_1</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a7181fb20f607314bb1adb7b2e87f8ffb">joystick_1_fire</a> == <span class="vhdllogic">1&#39;b1</span>)? <span class="vhdllogic">1&#39;b0</span> : <span class="vhdllogic">1&#39;b1</span>;
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="classocs__input.html#a615e9602b96fba12455352bb5d52c47f">00194</a> <span class="vhdlkeyword">wire</span> [<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#a615e9602b96fba12455352bb5d52c47f">potgo_final</a>;
<a name="l00195"></a>00195 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a615e9602b96fba12455352bb5d52c47f">potgo_final</a> = { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>[<span class="vhdllogic">14</span>], <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>[<span class="vhdllogic">12</span>], <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classocs__input.html#a7e32f39227c244a369b6a4d758fe5bea">right_button_n</a>, <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classocs__input.html#ac2df99f917f50e1213002937aba64059">middle_button_n</a>, <span class="vhdllogic">7&#39;b0</span>, <span class="vhdllogic">1&#39;b0</span> };
<a name="l00196"></a>00196 
<a name="l00197"></a><a class="code" href="classocs__input.html#af2631e25f91cae19f22e01fd94526097">00197</a> <span class="vhdlkeyword">wire</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#af2631e25f91cae19f22e01fd94526097">joy0dat_y</a>;
<a name="l00198"></a>00198 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#af2631e25f91cae19f22e01fd94526097">joy0dat_y</a> = { <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">15</span>], <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] } - <a class="code" href="classocs__input.html#a33f252f3d12c92f30fedb23105116f57">mouse_y_move</a>;
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="classocs__input.html#a2f80bbdba33918a9aa046e3de136de61">00200</a> <span class="vhdlkeyword">wire</span> [<span class="vhdllogic">8</span>:<span class="vhdllogic">0</span>] <a class="code" href="classocs__input.html#a2f80bbdba33918a9aa046e3de136de61">joy0dat_x</a>;
<a name="l00201"></a>00201 <span class="vhdlkeyword">assign</span> <a class="code" href="classocs__input.html#a2f80bbdba33918a9aa046e3de136de61">joy0dat_x</a> = { <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">7</span>], <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] } + <a class="code" href="classocs__input.html#ae7856c7d789112c571ab5a911182f772">mouse_x_move</a>;
<a name="l00202"></a>00202 
<a name="l00203"></a><a class="code" href="classocs__input.html#a720996df667095a781e30edeb045aae3">00203</a> <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classocs__input.html#a4097ecb98b3486fbfb7e2b2354299e38">CLK_I</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">reset_n</a>) <span class="vhdlkeyword">begin</span>
<a name="l00204"></a>00204     <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a19d0cfb3cf1132c9faae0217a1af82a9">reset_n</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
<a name="l00205"></a>00205         <a class="code" href="classocs__input.html#a6000765cc199349aaad0e03fe0180b28">DAT_O</a>           &lt;= <span class="vhdllogic">32&#39;d0</span>;
<a name="l00206"></a>00206         <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a>           &lt;= <span class="vhdllogic">1&#39;b0</span>;
<a name="l00207"></a>00207         
<a name="l00208"></a>00208         <a class="code" href="classocs__input.html#a57aaae6a32563490c2a7e22aa86935c2">ciaa_fire_0_n</a>   &lt;= <span class="vhdllogic">1&#39;b1</span>;
<a name="l00209"></a>00209         
<a name="l00210"></a>00210         <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>           &lt;= <span class="vhdllogic">16&#39;d0</span>;
<a name="l00211"></a>00211         <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>         &lt;= <span class="vhdllogic">16&#39;d0</span>;
<a name="l00212"></a>00212         <a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">joy1dat</a>         &lt;= <span class="vhdllogic">16&#39;d0</span>;
<a name="l00213"></a>00213         
<a name="l00214"></a>00214         <a class="code" href="classocs__input.html#a7e32f39227c244a369b6a4d758fe5bea">right_button_n</a>  &lt;= <span class="vhdllogic">1&#39;b1</span>;
<a name="l00215"></a>00215         <a class="code" href="classocs__input.html#ac2df99f917f50e1213002937aba64059">middle_button_n</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
<a name="l00216"></a>00216     <span class="vhdlkeyword">end</span>
<a name="l00217"></a>00217     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
<a name="l00218"></a>00218         <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a63add4610448cadee61e25e90f8ad230">CYC_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">STB_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a> == <span class="vhdllogic">1&#39;b0</span>) <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
<a name="l00219"></a>00219         <span class="vhdlkeyword">else</span>                                                <a class="code" href="classocs__input.html#af910719de637b73f108aa9b5802fb752">ACK_O</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
<a name="l00220"></a>00220         
<a name="l00221"></a>00221         <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a6c1420349b39d1da8dd088cd5d011f1a">mouse_moved</a> == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
<a name="l00222"></a>00222             <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] &lt;= <a class="code" href="classocs__input.html#af2631e25f91cae19f22e01fd94526097">joy0dat_y</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
<a name="l00223"></a>00223             <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classocs__input.html#a2f80bbdba33918a9aa046e3de136de61">joy0dat_x</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
<a name="l00224"></a>00224             
<a name="l00225"></a>00225             <a class="code" href="classocs__input.html#a57aaae6a32563490c2a7e22aa86935c2">ciaa_fire_0_n</a>   &lt;= ~<a class="code" href="classocs__input.html#ad1a969d2559b895471a9622ebbe72bac">mouse_left_button</a>;
<a name="l00226"></a>00226             <a class="code" href="classocs__input.html#a7e32f39227c244a369b6a4d758fe5bea">right_button_n</a>  &lt;= ~<a class="code" href="classocs__input.html#ab940629f6aca8ebb676f9109161ac567">mouse_right_button</a>;
<a name="l00227"></a>00227             <a class="code" href="classocs__input.html#ac2df99f917f50e1213002937aba64059">middle_button_n</a> &lt;= ~<a class="code" href="classocs__input.html#aadba9a1aceecda48b561adfd42983f4c">mouse_middle_button</a>;
<a name="l00228"></a>00228         <span class="vhdlkeyword">end</span>
<a name="l00229"></a>00229         
<a name="l00230"></a>00230         <span class="vhdlkeyword">if</span>(<a class="code" href="classocs__input.html#a63add4610448cadee61e25e90f8ad230">CYC_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">STB_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0f5def2e35084feb5c4c865cb035a69b">WE_I</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
<a name="l00231"></a>00231             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h008</span>)                       <a class="code" href="classocs__input.html#a6000765cc199349aaad0e03fe0180b28">DAT_O</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]     &lt;= { <span class="vhdllogic">16&#39;d0</span> <span class="keyword">/*DSKDATR**/</span>, <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a> };
<a name="l00232"></a>00232             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h00C</span>)                       <a class="code" href="classocs__input.html#a6000765cc199349aaad0e03fe0180b28">DAT_O</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]     &lt;= { <a class="code" href="classocs__input.html#a000c86f2ec73eb492223357b22bea156">joy1dat_final</a>, <a class="code" href="classocs__input.html#a9766cf787373f3fdefea5eae308f9822">na_clx_dat</a> };
<a name="l00233"></a>00233             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h014</span>)                       <a class="code" href="classocs__input.html#a6000765cc199349aaad0e03fe0180b28">DAT_O</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>]     &lt;= { <span class="vhdllogic">16&#39;d0</span> <span class="keyword">/*POT1DAT**/</span>, <a class="code" href="classocs__input.html#a615e9602b96fba12455352bb5d52c47f">potgo_final</a> };
<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__input.html#a63add4610448cadee61e25e90f8ad230">CYC_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0195704c730e8409598612d24b132638">STB_I</a> == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classocs__input.html#a0f5def2e35084feb5c4c865cb035a69b">WE_I</a> == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
<a name="l00236"></a>00236             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h034</span> &amp;&amp; <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>[<span class="vhdllogic">3</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] &lt;= <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>];
<a name="l00237"></a>00237             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h034</span> &amp;&amp; <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classocs__input.html#a07f63851f6195cf877d80837996eae8a">potgo</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>]  &lt;= <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>];
<a name="l00238"></a>00238             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h034</span> &amp;&amp; <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)   { <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>], <a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">joy1dat</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] } &lt;= { <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>], <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] };
<a name="l00239"></a>00239             <span class="vhdlkeyword">if</span>({ <a class="code" href="classocs__input.html#adadf762e792187ce934c130d857406dd">ADR_I</a>, <span class="vhdllogic">2&#39;b0</span> } == <span class="vhdllogic">9&#39;h034</span> &amp;&amp; <a class="code" href="classocs__input.html#a4a73b8f2dadbf0d6fd507e8cac3e60be">SEL_I</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)   { <a class="code" href="classocs__input.html#aa73ed28d5c045ca4237b59bb5d81e1ba">joy0dat</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>], <a class="code" href="classocs__input.html#ae161410b2c480aa12521d289ea73e072">joy1dat</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] } &lt;= { <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>], <a class="code" href="classocs__input.html#a5c942679add23334af2d790a3bd5c40b">DAT_I</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] };
<a name="l00240"></a>00240         <span class="vhdlkeyword">end</span>
<a name="l00241"></a>00241     <span class="vhdlkeyword">end</span>
<a name="l00242"></a>00242 <span class="vhdlkeyword">end</span>
<a name="l00243"></a>00243 
<a name="l00244"></a>00244 <span class="vhdlkeyword">endmodule</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Dec 20 2010 21:20:19 for aoOCS by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.