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

Subversion Repositories ao68000

[/] [ao68000/] [trunk/] [doc/] [doxygen/] [html/] [classalu.html] - Blame information for rev 15

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 alfik
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>ao68000: alu Module Reference</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
8
</head>
9
<body>
10
<!-- Generated by Doxygen 1.7.2 -->
11
<div class="navigation" id="top">
12
  <div class="tabs">
13
    <ul class="tablist">
14
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
15
      <li><a href="modules.html"><span>Modules</span></a></li>
16
      <li class="current"><a href="annotated.html"><span>Design&#160;Unit&#160;List</span></a></li>
17
      <li><a href="files.html"><span>Files</span></a></li>
18
    </ul>
19
  </div>
20
  <div class="tabs2">
21
    <ul class="tablist">
22
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
23
      <li><a href="hierarchy.html"><span>Design&#160;Unit&#160;Hierarchy</span></a></li>
24
      <li><a href="functions.html"><span>Design&#160;Unit&#160;Members</span></a></li>
25
    </ul>
26
  </div>
27
</div>
28
<div class="header">
29
  <div class="summary">
30
<a href="#Inputs">Inputs</a> &#124;
31
<a href="#Outputs">Outputs</a> &#124;
32
<a href="#Signals">Signals</a> &#124;
33
<a href="#Module Instances">Module Instances</a> &#124;
34
<a href="#Defines">Defines</a> &#124;
35
<a href="#Always Constructs">Always Constructs</a>  </div>
36
  <div class="headertitle">
37
<h1>alu Module Reference</h1>  </div>
38
</div>
39
<div class="contents">
40
<!-- doxytag: class="alu" -->
41
<p>Arithmetic and Logic Unit.
42
<a href="#_details">More...</a></p>
43
<!-- startSectionHeader --><div class="dynheader">
44
Inheritance diagram for alu:<!-- endSectionHeader --></div>
45
<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
46
 <div class="center">
47
  <img src="classalu.png" usemap="#alu_map" alt=""/>
48
  <map id="alu_map" name="alu_map">
49
<area href="classao68000.html" alt="ao68000" shape="rect" coords="0,56,61,80"/>
50
</map>
51
 </div><!-- endSectionContent --></div>
52
 
53
<p><a href="classalu-members.html">List of all members.</a></p>
54
<table class="memberdecls">
55
<tr><td colspan="2"><h2><a name="Always Constructs"></a>
56
Always Constructs</h2></td></tr>
57 13 alfik
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a833db0d5eda614d712b846b259c0f4d3">ALWAYS_30</a>&#160;</td><td class="memItemRight" valign="bottom"><b> ( <b><b><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a></b> <span class="vhdlchar"> </span></b> , <b><b><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a></b> <span class="vhdlchar"> </span></b> )</b></td></tr>
58
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a04b10dc82e8a06c3856bfd16a7e18d06">ALWAYS_31</a>&#160;</td><td class="memItemRight" valign="bottom"><b> ( <b><b><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a></b> <span class="vhdlchar"> </span></b> , <b><b><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a></b> <span class="vhdlchar"> </span></b> )</b></td></tr>
59 12 alfik
<tr><td colspan="2"><h2><a name="Defines"></a>
60
Defines</h2></td></tr>
61 13 alfik
 <tr><td class="memTemplParams" colspan="2"><b><a class="el" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">Sm</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">(</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?operand2</span><span class="vhdlchar">[</span><span class="vhdldigit">7</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">1</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?operand2</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><b><a class="el" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">]</span><span class="vhdlchar">)</span><span class="vhdlchar"> </span></b></b></td></tr>
62
<tr><td class="memTemplParams" colspan="2"><b><a class="el" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">Dm</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">(</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?operand1</span><span class="vhdlchar">[</span><span class="vhdldigit">7</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">1</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?operand1</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><b><a class="el" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">]</span><span class="vhdlchar">)</span><span class="vhdlchar"> </span></b></b></td></tr>
63
<tr><td class="memTemplParams" colspan="2"><b><a class="el" href="classalu.html#a942f3773659fb9e9e38101743237144a">Rm</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">(</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?result</span><span class="vhdlchar">[</span><span class="vhdldigit">7</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">1</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?result</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">]</span><span class="vhdlchar">:</span><b><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">]</span><span class="vhdlchar">)</span><span class="vhdlchar"> </span></b></b></td></tr>
64
<tr><td class="memTemplParams" colspan="2"><b><a class="el" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">Z</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">(</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">7</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">8'b0</span><span class="vhdlchar">)</span><span class="vhdlchar">:</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">1</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">1'b1</span><span class="vhdlchar">)</span><span class="vhdlchar">?</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">16'b0</span><span class="vhdlchar">)</span><span class="vhdlchar">:</span><span class="vhdlchar">(</span><b><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a></b> <span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar">=</span><span class="vhdlchar">=</span><span class="vhdldigit">32'b0</span><span class="vhdlchar">)</span><span class="vhdlchar">)</span><span class="vhdlchar"> </span></b></b></td></tr>
65 12 alfik
<tr><td colspan="2"><h2><a name="Inputs"></a>
66
Inputs</h2></td></tr>
67 13 alfik
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a> &#160;</td><td class="memItemRight" valign="bottom"></td></tr>
68
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a> &#160;</td><td class="memItemRight" valign="bottom"></td></tr>
69
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a379cf0ab5b30f07c291e327fc5bb194f">address</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
70
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
71
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">2</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
72
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
73
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
74
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#aaec5e2b3f347a2651f6456b7d0dafe16">interrupt_mask</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">2</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
75
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#acd09435ce38c12172a01a2b3725577dc">alu_control</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlchar">[</span><span class="vhdldigit">4</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
76 12 alfik
<tr><td colspan="2"><h2><a name="Outputs"></a>
77
Outputs</h2></td></tr>
78 13 alfik
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
79
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b>  </td></tr>
80
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &#160;</td><td class="memItemRight" valign="bottom"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar"> </span></b>  </td></tr>
81
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classalu.html#ab6a8e15c686ee360ddad15cd4d995ea9">alu_mult_div_ready</a> &#160;</td><td class="memItemRight" valign="bottom"></td></tr>
82 12 alfik
<tr><td colspan="2"><h2><a name="Module Instances"></a>
83
Module Instances</h2></td></tr>
84 13 alfik
 <tr><td class="memItemLeft" align="right" valign="top"><b><a class="el" href="classalu.html#a6447478386a93e0306b7cb09937c23c3">lpm_mult::muls</a>  </b>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
85 12 alfik
<tr><td colspan="2"><h2><a name="Signals"></a>
86
Signals</h2></td></tr>
87 13 alfik
 <tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#abbf525422eca0279b697f742b90237e0">mult_div_sign</a> </td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">4</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> </td></tr>
89
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">16</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a> </td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#a0c2a64b2f5dd32b2159ca0f29de360aa">dividend</a> </td></tr>
91
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a> </td></tr>
92
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar">[</span><span class="vhdldigit">32</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#a07af2646e5b543c5be95dddb22fd4ea6">div_diff</a> </td></tr>
93
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#a8d11b113e74362e74035541da1b0a02e">div_overflow</a> </td></tr>
94
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#af65ee78a38f09889c3b8c9efc759f559">div_quotient</a> </td></tr>
95
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#ad32bb10563baa2d2d78c2a23e8f2219e">div_remainder</a> </td></tr>
96
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">wire</span><span class="vhdlchar">[</span><span class="vhdldigit">33</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#aff5530027f36561324e060e703004b6b">mult_result</a> </td></tr>
97
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">2</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#ab6caa4c83db93eebe29133a1ce68435e">interrupt_mask_copy</a> </td></tr>
98
<tr><td class="memItemLeft" align="right" valign="top"><b><span class="vhdlkeyword">reg</span><span class="vhdlchar"> </span></b> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a> </td></tr>
99 12 alfik
</table>
100
<hr/><a name="_details"></a><h2>Detailed Description</h2>
101
<p>Arithmetic and Logic Unit. </p>
102
<p>The alu module is responsible for performing all of the arithmetic and logic operations of the <a class="el" href="classao68000.html" title="ao68000 top level module.">ao68000</a> processor. It operates on two 32-bit registers: operand1 and operand2 from the registers module. The output is saved into a result 32-bit register. This register is located in the alu module.</p>
103
<p>The alu module also contains the status register (SR) with the condition code register. The microcode decides what operation the alu performs. </p>
104
 
105 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02558">2558</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
106 12 alfik
<hr/><h2>Member Function Documentation</h2>
107
<a class="anchor" id="a833db0d5eda614d712b846b259c0f4d3"></a><!-- doxytag: member="alu::ALWAYS_30" ref="a833db0d5eda614d712b846b259c0f4d3" args="clock, reset_n" -->
108
<div class="memitem">
109
<div class="memproto">
110
      <table class="memname">
111
        <tr>
112
          <td class="memname"><b><span class="vhdlchar"> </span></b>ALWAYS_30          <td></td>
113 13 alfik
          <td class="paramtype">(<span class="keywordtype"></span> <b><b><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a></b> <span class="vhdlchar"> </span></b>  <em><span class="vhdlkeyword"></span></em> , </td>
114 12 alfik
        </tr>
115
        <tr>
116
          <td class="paramkey"></td>
117
          <td></td>
118 13 alfik
          <td class="paramtype"><span class="keywordtype"></span> <b><b><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a></b> <span class="vhdlchar"> </span></b>  <em><span class="vhdlkeyword"></span></em> ) </td>
119 12 alfik
        </tr>
120
<code> [Always Construct]</code></td>
121
        </tr>
122
      </table>
123
</div>
124
<div class="memdoc">
125
 
126 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02619">2619</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
127 12 alfik
<div class="fragment"><pre class="fragment">
128 14 alfik
<a name="l02619"></a>02619 <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a>) <span class="vhdlkeyword">begin</span>
129
<a name="l02620"></a>02620     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
130
<a name="l02621"></a>02621         <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> &lt;= <span class="vhdllogic">5&#39;d0</span>;
131
<a name="l02622"></a>02622     <span class="vhdlkeyword">end</span>
132
<a name="l02623"></a>02623     <span class="keyword">// Cycle #0 : load the registers</span>
133
<a name="l02624"></a>02624     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#acd09435ce38c12172a01a2b3725577dc">alu_control</a> == <a class="code" href="ao68000_8v.html#aed07d190bb88f0cce7768028698020f9">`ALU_MULS_MULU_DIVS_DIVU</a><span class="vhdlchar"></span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> &amp;&amp; <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> == <span class="vhdllogic">5&#39;d0</span>) <span class="vhdlkeyword">begin</span>
134
<a name="l02625"></a>02625         <span class="keyword">// 17 cycles to finish + wait state</span>
135
<a name="l02626"></a>02626         <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a>   &lt;= <span class="vhdllogic">5&#39;d18</span>;
136
<a name="l02627"></a>02627         <span class="keyword">// Clear the quotient</span>
137
<a name="l02628"></a>02628         <a class="code" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a>    &lt;= <span class="vhdllogic">17&#39;d0</span>;
138
<a name="l02629"></a>02629
139
<a name="l02630"></a>02630         <span class="keyword">// Unsigned divide or positive numerator</span>
140
<a name="l02631"></a>02631         <span class="vhdlkeyword">if</span> ((!<a class="code" href="classalu.html#abbf525422eca0279b697f742b90237e0">mult_div_sign</a>) || (!<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>]))    <a class="code" href="classalu.html#a0c2a64b2f5dd32b2159ca0f29de360aa">dividend</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
141
<a name="l02632"></a>02632         <span class="keyword">// Negative numerator</span>
142
<a name="l02633"></a>02633         <span class="vhdlkeyword">else</span>                                        <a class="code" href="classalu.html#a0c2a64b2f5dd32b2159ca0f29de360aa">dividend</a> &lt;= -<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
143
<a name="l02634"></a>02634
144
<a name="l02635"></a>02635         <span class="keyword">// Unsigned divide or positive denominator</span>
145
<a name="l02636"></a>02636         <span class="vhdlkeyword">if</span> ((!<a class="code" href="classalu.html#abbf525422eca0279b697f742b90237e0">mult_div_sign</a>) || (!<a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>]))    <a class="code" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a> &lt;= {<a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>],<span class="vhdllogic">16&#39;d0</span>};
146
<a name="l02637"></a>02637         <span class="keyword">// Negative denominator</span>
147
<a name="l02638"></a>02638         <span class="vhdlkeyword">else</span>                                        <a class="code" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a> &lt;= {-<a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>],<span class="vhdllogic">16&#39;d0</span>};
148
<a name="l02639"></a>02639     <span class="vhdlkeyword">end</span>
149
<a name="l02640"></a>02640     <span class="keyword">// Cycles #1-17 : division calculation</span>
150
<a name="l02641"></a>02641     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> &gt; <span class="vhdllogic">5&#39;d1</span>) <span class="vhdlkeyword">begin</span>
151
<a name="l02642"></a>02642         <span class="keyword">// Check difference&#39;s sign</span>
152
<a name="l02643"></a>02643         <span class="vhdlkeyword">if</span> (!<a class="code" href="classalu.html#a07af2646e5b543c5be95dddb22fd4ea6">div_diff</a>[<span class="vhdllogic">32</span>]) <span class="vhdlkeyword">begin</span>
153
<a name="l02644"></a>02644           <span class="keyword">// Difference is positive : shift a one</span>
154
<a name="l02645"></a>02645           <a class="code" href="classalu.html#a0c2a64b2f5dd32b2159ca0f29de360aa">dividend</a> &lt;= <a class="code" href="classalu.html#a07af2646e5b543c5be95dddb22fd4ea6">div_diff</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
155
<a name="l02646"></a>02646           <a class="code" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a> &lt;= {<a class="code" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">1&#39;b1</span>};
156
<a name="l02647"></a>02647         <span class="vhdlkeyword">end</span>
157
<a name="l02648"></a>02648         <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
158
<a name="l02649"></a>02649           <span class="keyword">// Difference is negative : shift a zero</span>
159
<a name="l02650"></a>02650           <a class="code" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a> &lt;= {<a class="code" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">1&#39;b0</span>};
160
<a name="l02651"></a>02651         <span class="vhdlkeyword">end</span>
161
<a name="l02652"></a>02652         <span class="keyword">// Shift right divider</span>
162
<a name="l02653"></a>02653         <a class="code" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a> &lt;= {<span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">1</span>]};
163
<a name="l02654"></a>02654         <span class="keyword">// Count one bit</span>
164
<a name="l02655"></a>02655         <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> &lt;= <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> - <span class="vhdllogic">5&#39;d1</span>;
165
<a name="l02656"></a>02656     <span class="vhdlkeyword">end</span>
166
<a name="l02657"></a>02657     <span class="keyword">// result read</span>
167
<a name="l02658"></a>02658     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#acd09435ce38c12172a01a2b3725577dc">alu_control</a> == <a class="code" href="ao68000_8v.html#aed07d190bb88f0cce7768028698020f9">`ALU_MULS_MULU_DIVS_DIVU</a><span class="vhdlchar"></span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> &amp;&amp; <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> == <span class="vhdllogic">5&#39;d1</span>) <span class="vhdlkeyword">begin</span>
168
<a name="l02659"></a>02659         <span class="keyword">// goto idle</span>
169
<a name="l02660"></a>02660         <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> &lt;= <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> - <span class="vhdllogic">5&#39;d1</span>;
170
<a name="l02661"></a>02661     <span class="vhdlkeyword">end</span>
171
<a name="l02662"></a>02662 <span class="vhdlkeyword">end</span>
172 13 alfik
</pre></div>
173
</div>
174
</div>
175
<a class="anchor" id="a04b10dc82e8a06c3856bfd16a7e18d06"></a><!-- doxytag: member="alu::ALWAYS_31" ref="a04b10dc82e8a06c3856bfd16a7e18d06" args="clock, reset_n" -->
176
<div class="memitem">
177
<div class="memproto">
178
      <table class="memname">
179
        <tr>
180
          <td class="memname"><b><span class="vhdlchar"> </span></b>ALWAYS_31          <td></td>
181
          <td class="paramtype">(<span class="keywordtype"></span> <b><b><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a></b> <span class="vhdlchar"> </span></b>  <em><span class="vhdlkeyword"></span></em> , </td>
182
        </tr>
183
        <tr>
184
          <td class="paramkey"></td>
185
          <td></td>
186
          <td class="paramtype"><span class="keywordtype"></span> <b><b><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a></b> <span class="vhdlchar"> </span></b>  <em><span class="vhdlkeyword"></span></em> ) </td>
187
        </tr>
188
<code> [Always Construct]</code></td>
189
        </tr>
190
      </table>
191
</div>
192
<div class="memdoc">
193
 
194 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02700">2700</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
195 13 alfik
<div class="fragment"><pre class="fragment">
196 14 alfik
<a name="l02700"></a>02700 <span class="vhdlkeyword">always</span> @(<span class="vhdlkeyword">posedge</span> <a class="code" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a> <span class="vhdlkeyword">or</span> <span class="vhdlkeyword">negedge</span> <a class="code" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a>) <span class="vhdlkeyword">begin</span>
197
<a name="l02701"></a>02701     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a> == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
198
<a name="l02702"></a>02702         <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &lt;= { <span class="vhdllogic">1&#39;b0</span>, <span class="vhdllogic">1&#39;b0</span>, <span class="vhdllogic">1&#39;b1</span>, <span class="vhdllogic">2&#39;b0</span>, <span class="vhdllogic">3&#39;b111</span>, <span class="vhdllogic">8&#39;b0</span> };
199
<a name="l02703"></a>02703         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <span class="vhdllogic">32&#39;d0</span>;
200
<a name="l02704"></a>02704         <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
201
<a name="l02705"></a>02705         <a class="code" href="classalu.html#ab6caa4c83db93eebe29133a1ce68435e">interrupt_mask_copy</a> &lt;= <span class="vhdllogic">3&#39;b0</span>;
202
<a name="l02706"></a>02706         <a class="code" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
203
<a name="l02707"></a>02707     <span class="vhdlkeyword">end</span>
204
<a name="l02708"></a>02708     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
205
<a name="l02709"></a>02709         <span class="vhdlkeyword">case</span>(<a class="code" href="classalu.html#acd09435ce38c12172a01a2b3725577dc">alu_control</a>)
206
<a name="l02710"></a>02710             <a class="code" href="ao68000_8v.html#a687e6310453b4cedb64aa6e66b058c18">`ALU_SR_SET_INTERRUPT</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
207
<a name="l02711"></a>02711                 <a class="code" href="classalu.html#ab6caa4c83db93eebe29133a1ce68435e">interrupt_mask_copy</a> &lt;= <a class="code" href="classalu.html#aaec5e2b3f347a2651f6456b7d0dafe16">interrupt_mask</a>[<span class="vhdllogic">2</span>:<span class="vhdllogic">0</span>];
208
<a name="l02712"></a>02712                 <a class="code" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
209
<a name="l02713"></a>02713             <span class="vhdlkeyword">end</span>
210
<a name="l02714"></a>02714
211
<a name="l02715"></a>02715             <a class="code" href="ao68000_8v.html#ac9fc44b8d3bbcd6c742f1ba074fc668d">`ALU_SR_SET_TRAP</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
212
<a name="l02716"></a>02716                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a> == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
213
<a name="l02717"></a>02717                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &lt;= { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">14</span>], <span class="vhdllogic">1&#39;b1</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">12</span>:<span class="vhdllogic">11</span>], <a class="code" href="classalu.html#ab6caa4c83db93eebe29133a1ce68435e">interrupt_mask_copy</a>[<span class="vhdllogic">2</span>:<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] };
214
<a name="l02718"></a>02718                 <span class="vhdlkeyword">end</span>
215
<a name="l02719"></a>02719                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
216
<a name="l02720"></a>02720                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &lt;= { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">14</span>], <span class="vhdllogic">1&#39;b1</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">12</span>:<span class="vhdllogic">0</span>] };
217
<a name="l02721"></a>02721                 <span class="vhdlkeyword">end</span>
218
<a name="l02722"></a>02722                 <a class="code" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
219
<a name="l02723"></a>02723             <span class="vhdlkeyword">end</span>
220
<a name="l02724"></a>02724
221
<a name="l02725"></a>02725             <a class="code" href="ao68000_8v.html#a59147ff996e0ba496f1f06d7a06decae">`ALU_MOVEP_M2R_1</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
222
<a name="l02726"></a>02726                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
223
<a name="l02727"></a>02727                 <span class="vhdlkeyword">else</span>                <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
224
<a name="l02728"></a>02728                 <span class="keyword">//CCR: no change</span>
225
<a name="l02729"></a>02729             <span class="vhdlkeyword">end</span>
226
<a name="l02730"></a>02730             <a class="code" href="ao68000_8v.html#a3b1155f3496b0fc984e5418e09586bf5">`ALU_MOVEP_M2R_2</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
227
<a name="l02731"></a>02731                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
228
<a name="l02732"></a>02732                 <span class="vhdlkeyword">else</span>                <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
229
<a name="l02733"></a>02733                 <span class="keyword">//CCR: no change</span>
230
<a name="l02734"></a>02734             <span class="vhdlkeyword">end</span>
231
<a name="l02735"></a>02735             <a class="code" href="ao68000_8v.html#a5458c8548afc8f7517bdc582c9946b2f">`ALU_MOVEP_M2R_3</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
232
<a name="l02736"></a>02736                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
233
<a name="l02737"></a>02737                 <span class="keyword">//CCR: no change</span>
234
<a name="l02738"></a>02738             <span class="vhdlkeyword">end</span>
235
<a name="l02739"></a>02739             <a class="code" href="ao68000_8v.html#a8ec0074ca9c5cfec15aa93b92353e09b">`ALU_MOVEP_M2R_4</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
236
<a name="l02740"></a>02740                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
237
<a name="l02741"></a>02741                 <span class="keyword">//CCR: no change</span>
238
<a name="l02742"></a>02742             <span class="vhdlkeyword">end</span>
239
<a name="l02743"></a>02743
240
<a name="l02744"></a>02744
241
<a name="l02745"></a>02745             <a class="code" href="ao68000_8v.html#aab7548aba43c6c12259a2a154ce2982b">`ALU_MOVEP_R2M_1</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
242
<a name="l02746"></a>02746                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">24</span>];
243
<a name="l02747"></a>02747                 <span class="vhdlkeyword">else</span>                <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>];
244
<a name="l02748"></a>02748                 <span class="keyword">// CCR: no change</span>
245
<a name="l02749"></a>02749             <span class="vhdlkeyword">end</span>
246
<a name="l02750"></a>02750             <a class="code" href="ao68000_8v.html#a9918f4663f481092da549f3cb008721d">`ALU_MOVEP_R2M_2</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
247
<a name="l02751"></a>02751                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">6</span>] == <span class="vhdllogic">1&#39;b1</span>)   <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">23</span>:<span class="vhdllogic">16</span>];
248
<a name="l02752"></a>02752                 <span class="vhdlkeyword">else</span>                <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
249
<a name="l02753"></a>02753                 <span class="keyword">// CCR: no change</span>
250
<a name="l02754"></a>02754             <span class="vhdlkeyword">end</span>
251
<a name="l02755"></a>02755             <a class="code" href="ao68000_8v.html#aee5fc91f58c97ffa4d252e127c9e4226">`ALU_MOVEP_R2M_3</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
252
<a name="l02756"></a>02756                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>];
253
<a name="l02757"></a>02757                 <span class="keyword">// CCR: no change</span>
254
<a name="l02758"></a>02758             <span class="vhdlkeyword">end</span>
255
<a name="l02759"></a>02759             <a class="code" href="ao68000_8v.html#a0bc85184fda7b9fcbf00afa29be91d42">`ALU_MOVEP_R2M_4</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
256
<a name="l02760"></a>02760                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
257
<a name="l02761"></a>02761                 <span class="keyword">// CCR: no change</span>
258
<a name="l02762"></a>02762             <span class="vhdlkeyword">end</span>
259
<a name="l02763"></a>02763
260
<a name="l02764"></a>02764
261
<a name="l02765"></a>02765
262
<a name="l02766"></a>02766             <a class="code" href="ao68000_8v.html#a6a119b7268e4e0a78e0307ba0c693ccb">`ALU_SIGN_EXTEND</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
263
<a name="l02767"></a>02767                 <span class="keyword">// move operand1 with sign-extension to result</span>
264
<a name="l02768"></a>02768                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
265
<a name="l02769"></a>02769                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= { {<span class="vhdllogic">16</span>{<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>]}}, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] };
266
<a name="l02770"></a>02770                 <span class="vhdlkeyword">end</span>
267
<a name="l02771"></a>02771                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
268
<a name="l02772"></a>02772                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
269
<a name="l02773"></a>02773                 <span class="vhdlkeyword">end</span>
270
<a name="l02774"></a>02774                 <span class="keyword">// CCR: no change</span>
271
<a name="l02775"></a>02775             <span class="vhdlkeyword">end</span>
272
<a name="l02776"></a>02776
273
<a name="l02777"></a>02777             <a class="code" href="ao68000_8v.html#ae497ab0b3e0550245c333bdb426d4236">`ALU_ARITHMETIC_LOGIC</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
274
<a name="l02778"></a>02778
275
<a name="l02779"></a>02779                 <span class="keyword">// OR,OR to mem,OR to Dn</span>
276
<a name="l02780"></a>02780                 <span class="vhdlkeyword">if</span>(         (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b000</span>) ||
277
<a name="l02781"></a>02781                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span>)
278
<a name="l02782"></a>02782                 )             <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] | <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
279
<a name="l02783"></a>02783                 <span class="keyword">// AND,AND to mem,AND to Dn</span>
280
<a name="l02784"></a>02784                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b001</span>) ||
281
<a name="l02785"></a>02785                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1100</span>)
282
<a name="l02786"></a>02786                 )             <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] &amp; <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
283
<a name="l02787"></a>02787                 <span class="keyword">// EORI,EOR</span>
284
<a name="l02788"></a>02788                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b101</span>) ||
285
<a name="l02789"></a>02789                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> &amp;&amp; (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b101</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b110</span>) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">5</span>:<span class="vhdllogic">3</span>] != <span class="vhdllogic">3&#39;b001</span>)
286
<a name="l02790"></a>02790                 )            <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] ^ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
287
<a name="l02791"></a>02791                 <span class="keyword">// ADD,ADD to mem,ADD to Dn,ADDQ</span>
288
<a name="l02792"></a>02792                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b011</span>) ||
289
<a name="l02793"></a>02793                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1101</span>) ||
290
<a name="l02794"></a>02794                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>)
291
<a name="l02795"></a>02795                 )             <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
292
<a name="l02796"></a>02796                 <span class="keyword">// SUBI,CMPI,CMPM,SUB to mem,SUB to Dn,CMP,SUBQ</span>
293
<a name="l02797"></a>02797                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b010</span>) ||
294
<a name="l02798"></a>02798                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b110</span>) ||
295
<a name="l02799"></a>02799                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> &amp;&amp; (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b101</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b110</span>) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">5</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">3&#39;b001</span>)     ||
296
<a name="l02800"></a>02800                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1001</span>) ||
297
<a name="l02801"></a>02801                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> &amp;&amp; (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b000</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b001</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b010</span>)) ||
298
<a name="l02802"></a>02802                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>)
299
<a name="l02803"></a>02803                 )            <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
300
<a name="l02804"></a>02804
301
<a name="l02805"></a>02805                 <span class="keyword">// Z</span>
302
<a name="l02806"></a>02806                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
303
<a name="l02807"></a>02807                 <span class="keyword">// N</span>
304
<a name="l02808"></a>02808                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
305
<a name="l02809"></a>02809
306
<a name="l02810"></a>02810                 <span class="keyword">// CMPI,CMPM,CMP</span>
307
<a name="l02811"></a>02811                 <span class="vhdlkeyword">if</span>( (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b110</span>) ||
308
<a name="l02812"></a>02812                     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> &amp;&amp; (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b101</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b110</span>) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">5</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">3&#39;b001</span>) ||
309
<a name="l02813"></a>02813                     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> &amp;&amp; (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b000</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b001</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">3&#39;b010</span>))
310
<a name="l02814"></a>02814                 ) <span class="vhdlkeyword">begin</span>
311
<a name="l02815"></a>02815                     <span class="keyword">// C,V</span>
312
<a name="l02816"></a>02816                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
313
<a name="l02817"></a>02817                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
314
<a name="l02818"></a>02818                     <span class="keyword">// X not affected</span>
315
<a name="l02819"></a>02819                 <span class="vhdlkeyword">end</span>
316
<a name="l02820"></a>02820                 <span class="keyword">// ADDI,ADD to mem,ADD to Dn,ADDQ</span>
317
<a name="l02821"></a>02821                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b011</span>) ||
318
<a name="l02822"></a>02822                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1101</span>) ||
319
<a name="l02823"></a>02823                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>)
320
<a name="l02824"></a>02824                 ) <span class="vhdlkeyword">begin</span>
321
<a name="l02825"></a>02825                     <span class="keyword">// C,X,V</span>
322
<a name="l02826"></a>02826                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
323
<a name="l02827"></a>02827                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>); <span class="keyword">//=ccr[0];</span>
324
<a name="l02828"></a>02828                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
325
<a name="l02829"></a>02829                 <span class="vhdlkeyword">end</span>
326
<a name="l02830"></a>02830                 <span class="keyword">// SUBI,SUB to mem,SUB to Dn,SUBQ</span>
327
<a name="l02831"></a>02831                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0000</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">3&#39;b010</span>) ||
328
<a name="l02832"></a>02832                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1001</span>) ||
329
<a name="l02833"></a>02833                             (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>)
330
<a name="l02834"></a>02834                 ) <span class="vhdlkeyword">begin</span>
331
<a name="l02835"></a>02835                     <span class="keyword">// C,X,V</span>
332
<a name="l02836"></a>02836                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
333
<a name="l02837"></a>02837                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>); <span class="keyword">//=ccr[0];</span>
334
<a name="l02838"></a>02838                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
335
<a name="l02839"></a>02839                 <span class="vhdlkeyword">end</span>
336
<a name="l02840"></a>02840                 <span class="keyword">// ANDI,EORI,ORI,EOR,OR to mem,AND to mem,OR to Dn,AND to Dn</span>
337
<a name="l02841"></a>02841                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
338
<a name="l02842"></a>02842                     <span class="keyword">// C,V</span>
339
<a name="l02843"></a>02843                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
340
<a name="l02844"></a>02844                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
341
<a name="l02845"></a>02845                     <span class="keyword">// X not affected</span>
342
<a name="l02846"></a>02846                 <span class="vhdlkeyword">end</span>
343
<a name="l02847"></a>02847             <span class="vhdlkeyword">end</span>
344
<a name="l02848"></a>02848
345
<a name="l02849"></a>02849             <a class="code" href="ao68000_8v.html#a3e54001e73374bd4f7cfda3de55bd944">`ALU_ABCD_SBCD_ADDX_SUBX</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span> <span class="keyword">// 259 LE</span>
346
<a name="l02850"></a>02850                 <span class="keyword">// ABCD</span>
347
<a name="l02851"></a>02851                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b100</span> ) <span class="vhdlkeyword">begin</span>
348
<a name="l02852"></a>02852                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] = {<span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>]} + {<span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>]} + {<span class="vhdllogic">4&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>]};
349
<a name="l02853"></a>02853                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = {<span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]} + {<span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]};
350
<a name="l02854"></a>02854
351
<a name="l02855"></a>02855                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">23</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] + {<span class="vhdllogic">7&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>]};
352
<a name="l02856"></a>02856
353
<a name="l02857"></a>02857                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &gt; <span class="vhdllogic">6&#39;d9</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] + <span class="vhdllogic">6&#39;d6</span>) : <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>];
354
<a name="l02858"></a>02858                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &gt; <span class="vhdllogic">6&#39;h1F</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] + <span class="vhdllogic">6&#39;d2</span>) :
355
<a name="l02859"></a>02859                                     (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &gt; <span class="vhdllogic">6&#39;h0F</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] + <span class="vhdllogic">6&#39;d1</span>) :
356
<a name="l02860"></a>02860                                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>];
357
<a name="l02861"></a>02861                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &gt; <span class="vhdllogic">6&#39;d9</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] + <span class="vhdllogic">6&#39;d6</span>) : <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>];
358
<a name="l02862"></a>02862
359
<a name="l02863"></a>02863                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">17</span>:<span class="vhdllogic">14</span>];
360
<a name="l02864"></a>02864                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>];
361
<a name="l02865"></a>02865
362
<a name="l02866"></a>02866                     <span class="keyword">// C</span>
363
<a name="l02867"></a>02867                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &gt; <span class="vhdllogic">6&#39;d9</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
364
<a name="l02868"></a>02868                     <span class="keyword">// X = C</span>
365
<a name="l02869"></a>02869                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &gt; <span class="vhdllogic">6&#39;d9</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
366
<a name="l02870"></a>02870
367
<a name="l02871"></a>02871                     <span class="keyword">// V</span>
368
<a name="l02872"></a>02872                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">30</span>] == <span class="vhdllogic">1&#39;b0</span> &amp;&amp; <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>] == <span class="vhdllogic">1&#39;b1</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
369
<a name="l02873"></a>02873                 <span class="vhdlkeyword">end</span>
370
<a name="l02874"></a>02874                 <span class="keyword">// SBCD</span>
371
<a name="l02875"></a>02875                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b000</span> ) <span class="vhdlkeyword">begin</span>
372
<a name="l02876"></a>02876
373
<a name="l02877"></a>02877                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] = <span class="vhdllogic">6&#39;d32</span> + {<span class="vhdllogic">2&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>]} - {<span class="vhdllogic">2&#39;b0</span>, <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>]} - {<span class="vhdllogic">5&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>]};
374
<a name="l02878"></a>02878                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = <span class="vhdllogic">6&#39;d32</span> + {<span class="vhdllogic">2&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]} - {<span class="vhdllogic">2&#39;b0</span>, <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]};
375
<a name="l02879"></a>02879
376
<a name="l02880"></a>02880                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">23</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] - {<span class="vhdllogic">7&#39;b0</span>, <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>]};
377
<a name="l02881"></a>02881
378
<a name="l02882"></a>02882                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &lt; <span class="vhdllogic">6&#39;d32</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] - <span class="vhdllogic">6&#39;d6</span>) : <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>];
379
<a name="l02883"></a>02883                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &lt; <span class="vhdllogic">6&#39;d16</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] - <span class="vhdllogic">6&#39;d2</span>) :
380
<a name="l02884"></a>02884                                     (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">13</span>:<span class="vhdllogic">8</span>] &lt; <span class="vhdllogic">6&#39;d32</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] - <span class="vhdllogic">6&#39;d1</span>) :
381
<a name="l02885"></a>02885                                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>];
382
<a name="l02886"></a>02886                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] = (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &lt; <span class="vhdllogic">6&#39;d32</span> &amp;&amp; <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>] == <span class="vhdllogic">1&#39;b1</span>) ? (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] - <span class="vhdllogic">6&#39;d6</span>) : <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>];
383
<a name="l02887"></a>02887
384
<a name="l02888"></a>02888                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">17</span>:<span class="vhdllogic">14</span>];
385
<a name="l02889"></a>02889                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>];
386
<a name="l02890"></a>02890
387
<a name="l02891"></a>02891                     <span class="keyword">// C</span>
388
<a name="l02892"></a>02892                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &lt; <span class="vhdllogic">6&#39;d32</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
389
<a name="l02893"></a>02893                     <span class="keyword">// X = C</span>
390
<a name="l02894"></a>02894                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">19</span>:<span class="vhdllogic">14</span>] &lt; <span class="vhdllogic">6&#39;d32</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
391
<a name="l02895"></a>02895
392
<a name="l02896"></a>02896                     <span class="keyword">// V</span>
393
<a name="l02897"></a>02897                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">30</span>] == <span class="vhdllogic">1&#39;b1</span> &amp;&amp; <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>] == <span class="vhdllogic">1&#39;b0</span>) ? <span class="vhdllogic">1&#39;b1</span> : <span class="vhdllogic">1&#39;b0</span>;
394
<a name="l02898"></a>02898                 <span class="vhdlkeyword">end</span>
395
<a name="l02899"></a>02899                 <span class="keyword">// ADDX</span>
396
<a name="l02900"></a>02900                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b101</span> ) <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>];
397
<a name="l02901"></a>02901                 <span class="keyword">// SUBX</span>
398
<a name="l02902"></a>02902                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b001</span> ) <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>];
399
<a name="l02903"></a>02903
400
<a name="l02904"></a>02904                 <span class="keyword">// Z</span>
401
<a name="l02905"></a>02905                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &amp; <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
402
<a name="l02906"></a>02906                 <span class="keyword">// N</span>
403
<a name="l02907"></a>02907                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
404
<a name="l02908"></a>02908
405
<a name="l02909"></a>02909                 <span class="keyword">// ADDX</span>
406
<a name="l02910"></a>02910                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b101</span> ) <span class="vhdlkeyword">begin</span>
407
<a name="l02911"></a>02911                     <span class="keyword">// C,X,V</span>
408
<a name="l02912"></a>02912                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
409
<a name="l02913"></a>02913                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>); <span class="keyword">//=ccr[0];</span>
410
<a name="l02914"></a>02914                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
411
<a name="l02915"></a>02915                 <span class="vhdlkeyword">end</span>
412
<a name="l02916"></a>02916                 <span class="keyword">// SUBX</span>
413
<a name="l02917"></a>02917                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">14</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">3&#39;b001</span> ) <span class="vhdlkeyword">begin</span>
414
<a name="l02918"></a>02918                     <span class="keyword">// C,X,V</span>
415
<a name="l02919"></a>02919                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
416
<a name="l02920"></a>02920                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>); <span class="keyword">//=ccr[0];</span>
417
<a name="l02921"></a>02921                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
418
<a name="l02922"></a>02922                 <span class="vhdlkeyword">end</span>
419
<a name="l02923"></a>02923             <span class="vhdlkeyword">end</span>
420
<a name="l02924"></a>02924
421
<a name="l02925"></a>02925             <a class="code" href="ao68000_8v.html#ac444f659b2726fd335e839dfadabbfe3">`ALU_ASL_LSL_ROL_ROXL_ASR_LSR_ROR_ROXR_prepare</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
422
<a name="l02926"></a>02926
423
<a name="l02927"></a>02927                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>];
424
<a name="l02928"></a>02928                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>];
425
<a name="l02929"></a>02929                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
426
<a name="l02930"></a>02930
427
<a name="l02931"></a>02931                 <span class="keyword">// X for ASL</span>
428
<a name="l02932"></a>02932                 <span class="keyword">//if(operand2[5:0] &gt; 6&#39;b0 &amp;&amp; ir[8] == 1&#39;b1 &amp;&amp; ((ir[7:6] == 2&#39;b11 &amp;&amp; ir[10:9] == 2&#39;b00) || (ir[7:6] != 2&#39;b11 &amp;&amp; ir[4:3] == 2&#39;b00)) ) begin</span>
429
<a name="l02933"></a>02933                     <span class="keyword">// X set to Dm</span>
430
<a name="l02934"></a>02934                 <span class="keyword">//    sr[4] &lt;= `Dm;</span>
431
<a name="l02935"></a>02935                 <span class="keyword">//end</span>
432
<a name="l02936"></a>02936                 <span class="keyword">// else X not affected</span>
433
<a name="l02937"></a>02937
434
<a name="l02938"></a>02938                 <span class="keyword">// V cleared</span>
435
<a name="l02939"></a>02939                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
436
<a name="l02940"></a>02940                 <span class="keyword">// C for ROXL,ROXR: set to X</span>
437
<a name="l02941"></a>02941                 <span class="vhdlkeyword">if</span>( (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b10</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b10</span>) ) <span class="vhdlkeyword">begin</span>
438
<a name="l02942"></a>02942                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>];
439
<a name="l02943"></a>02943                 <span class="vhdlkeyword">end</span>
440
<a name="l02944"></a>02944                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
441
<a name="l02945"></a>02945                     <span class="keyword">// C cleared</span>
442
<a name="l02946"></a>02946                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
443
<a name="l02947"></a>02947                 <span class="vhdlkeyword">end</span>
444
<a name="l02948"></a>02948
445
<a name="l02949"></a>02949                 <span class="keyword">// N set</span>
446
<a name="l02950"></a>02950                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
447
<a name="l02951"></a>02951                 <span class="keyword">// Z set</span>
448
<a name="l02952"></a>02952                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
449
<a name="l02953"></a>02953             <span class="vhdlkeyword">end</span>
450
<a name="l02954"></a>02954
451
<a name="l02955"></a>02955             <a class="code" href="ao68000_8v.html#ac946f278d039868214c441c11fcf2587">`ALU_ASL_LSL_ROL_ROXL_ASR_LSR_ROR_ROXR</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
452
<a name="l02956"></a>02956
453
<a name="l02957"></a>02957                 <span class="keyword">// ASL</span>
454
<a name="l02958"></a>02958                 <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b00</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b00</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
455
<a name="l02959"></a>02959                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">1&#39;b0</span>};
456
<a name="l02960"></a>02960
457
<a name="l02961"></a>02961                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b0</span>)? (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> != <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) : <span class="vhdllogic">1&#39;b1</span>; <span class="keyword">// V</span>
458
<a name="l02962"></a>02962                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// C</span>
459
<a name="l02963"></a>02963                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// X</span>
460
<a name="l02964"></a>02964                 <span class="vhdlkeyword">end</span>
461
<a name="l02965"></a>02965                 <span class="keyword">// LSL</span>
462
<a name="l02966"></a>02966                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b01</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b01</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
463
<a name="l02967"></a>02967                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">0</span>], <span class="vhdllogic">1&#39;b0</span>};
464
<a name="l02968"></a>02968
465
<a name="l02969"></a>02969                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
466
<a name="l02970"></a>02970                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// C</span>
467
<a name="l02971"></a>02971                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// X</span>
468
<a name="l02972"></a>02972                 <span class="vhdlkeyword">end</span>
469
<a name="l02973"></a>02973                 <span class="keyword">// ROL</span>
470
<a name="l02974"></a>02974                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b11</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b11</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
471
<a name="l02975"></a>02975                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>};
472
<a name="l02976"></a>02976
473
<a name="l02977"></a>02977                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
474
<a name="l02978"></a>02978                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// C</span>
475
<a name="l02979"></a>02979                                             <span class="keyword">// X not affected</span>
476 13 alfik
<a name="l02980"></a>02980                 <span class="vhdlkeyword">end</span>
477 14 alfik
<a name="l02981"></a>02981                 <span class="keyword">// ROXL</span>
478
<a name="l02982"></a>02982                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b10</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b10</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
479
<a name="l02983"></a>02983                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">30</span>:<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>]};
480
<a name="l02984"></a>02984
481
<a name="l02985"></a>02985                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
482
<a name="l02986"></a>02986                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// C</span>
483
<a name="l02987"></a>02987                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>;           <span class="keyword">// X</span>
484
<a name="l02988"></a>02988                 <span class="vhdlkeyword">end</span>
485
<a name="l02989"></a>02989                 <span class="keyword">// ASR</span>
486
<a name="l02990"></a>02990                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b00</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b00</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
487
<a name="l02991"></a>02991                     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">1</span>] };
488
<a name="l02992"></a>02992                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">1</span>] };
489
<a name="l02993"></a>02993                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">1</span>] };
490
<a name="l02994"></a>02994
491
<a name="l02995"></a>02995                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
492
<a name="l02996"></a>02996                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// C</span>
493
<a name="l02997"></a>02997                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// X</span>
494
<a name="l02998"></a>02998                 <span class="vhdlkeyword">end</span>
495
<a name="l02999"></a>02999                 <span class="keyword">// LSR</span>
496
<a name="l03000"></a>03000                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b01</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b01</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
497
<a name="l03001"></a>03001                     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] = { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">1</span>] };
498
<a name="l03002"></a>03002                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">1</span>] };
499
<a name="l03003"></a>03003                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = { <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">1</span>] };
500
<a name="l03004"></a>03004
501
<a name="l03005"></a>03005                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
502
<a name="l03006"></a>03006                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// C</span>
503
<a name="l03007"></a>03007                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// X</span>
504
<a name="l03008"></a>03008                 <span class="vhdlkeyword">end</span>
505
<a name="l03009"></a>03009                 <span class="keyword">// ROR</span>
506
<a name="l03010"></a>03010                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b11</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b11</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
507
<a name="l03011"></a>03011                     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">1</span>] };
508
<a name="l03012"></a>03012                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">1</span>] };
509
<a name="l03013"></a>03013                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">1</span>] };
510
<a name="l03014"></a>03014
511
<a name="l03015"></a>03015                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
512
<a name="l03016"></a>03016                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// C</span>
513
<a name="l03017"></a>03017                     <span class="keyword">// X not affected</span>
514
<a name="l03018"></a>03018                 <span class="vhdlkeyword">end</span>
515
<a name="l03019"></a>03019                 <span class="keyword">// ROXR</span>
516
<a name="l03020"></a>03020                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">9</span>] == <span class="vhdllogic">2&#39;b10</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] != <span class="vhdllogic">2&#39;b11</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">2&#39;b10</span>)) &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
517
<a name="l03021"></a>03021                     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">0</span>] == <span class="vhdllogic">1&#39;b1</span>)         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">1</span>]};
518
<a name="l03022"></a>03022                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">1</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">1</span>]};
519
<a name="l03023"></a>03023                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a>[<span class="vhdllogic">2</span>] == <span class="vhdllogic">1&#39;b1</span>)    <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = {<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">1</span>]};
520
<a name="l03024"></a>03024
521
<a name="l03025"></a>03025                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;          <span class="keyword">// V</span>
522
<a name="l03026"></a>03026                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// C</span>
523
<a name="l03027"></a>03027                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">0</span>];   <span class="keyword">// X</span>
524
<a name="l03028"></a>03028                 <span class="vhdlkeyword">end</span>
525
<a name="l03029"></a>03029
526
<a name="l03030"></a>03030                 <span class="keyword">// N set</span>
527
<a name="l03031"></a>03031                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
528
<a name="l03032"></a>03032                 <span class="keyword">// Z set</span>
529
<a name="l03033"></a>03033                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
530
<a name="l03034"></a>03034             <span class="vhdlkeyword">end</span>
531
<a name="l03035"></a>03035
532
<a name="l03036"></a>03036             <a class="code" href="ao68000_8v.html#a268aa82704bd8f1c1548dfc69a12a951">`ALU_MOVE</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
533
<a name="l03037"></a>03037                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
534
<a name="l03038"></a>03038
535
<a name="l03039"></a>03039                 <span class="keyword">// X not affected</span>
536
<a name="l03040"></a>03040                 <span class="keyword">// C cleared</span>
537
<a name="l03041"></a>03041                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
538
<a name="l03042"></a>03042                 <span class="keyword">// V cleared</span>
539
<a name="l03043"></a>03043                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
540 13 alfik
<a name="l03044"></a>03044
541 14 alfik
<a name="l03045"></a>03045                 <span class="keyword">// N set</span>
542
<a name="l03046"></a>03046                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
543
<a name="l03047"></a>03047                 <span class="keyword">// Z set</span>
544
<a name="l03048"></a>03048                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
545
<a name="l03049"></a>03049             <span class="vhdlkeyword">end</span>
546
<a name="l03050"></a>03050
547
<a name="l03051"></a>03051             <a class="code" href="ao68000_8v.html#a30a87601d2ca38286bb0d486d59f6a07">`ALU_ADDA_SUBA_CMPA_ADDQ_SUBQ</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
548
<a name="l03052"></a>03052                 <span class="keyword">// ADDA: 1101</span>
549
<a name="l03053"></a>03053                 <span class="keyword">// CMPA: 1011</span>
550
<a name="l03054"></a>03054                 <span class="keyword">// SUBA: 1001</span>
551
<a name="l03055"></a>03055                 <span class="keyword">// ADDQ,SUBQ: 0101 xxx0,1</span>
552
<a name="l03056"></a>03056                 <span class="keyword">// operation requires that operand2 was sign extended</span>
553
<a name="l03057"></a>03057
554
<a name="l03058"></a>03058                 <span class="keyword">// ADDA,ADDQ</span>
555
<a name="l03059"></a>03059                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1101</span> || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b0</span>) )
556
<a name="l03060"></a>03060                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
557
<a name="l03061"></a>03061                 <span class="keyword">// SUBA,CMPA,SUBQ</span>
558
<a name="l03062"></a>03062                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1001</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b0101</span> &amp;&amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">8</span>] == <span class="vhdllogic">1&#39;b1</span>) )
559
<a name="l03063"></a>03063                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
560
<a name="l03064"></a>03064
561
<a name="l03065"></a>03065                 <span class="keyword">// for CMPA</span>
562
<a name="l03066"></a>03066                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1011</span> ) <span class="vhdlkeyword">begin</span>
563
<a name="l03067"></a>03067                     <span class="keyword">// Z</span>
564
<a name="l03068"></a>03068                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
565
<a name="l03069"></a>03069                     <span class="keyword">// N</span>
566
<a name="l03070"></a>03070                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
567
<a name="l03071"></a>03071
568
<a name="l03072"></a>03072                     <span class="keyword">// C,V</span>
569
<a name="l03073"></a>03073                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
570
<a name="l03074"></a>03074                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= (~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>);
571
<a name="l03075"></a>03075                     <span class="keyword">// X not affected</span>
572
<a name="l03076"></a>03076                 <span class="vhdlkeyword">end</span>
573
<a name="l03077"></a>03077                 <span class="keyword">// for ADDA,SUBA,ADDQ,SUBQ: ccr not affected</span>
574
<a name="l03078"></a>03078             <span class="vhdlkeyword">end</span>
575
<a name="l03079"></a>03079
576
<a name="l03080"></a>03080             <a class="code" href="ao68000_8v.html#af0a4db089a5eb288abf9453ca2d79c26">`ALU_CHK</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
577
<a name="l03081"></a>03081                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>];
578
<a name="l03082"></a>03082
579
<a name="l03083"></a>03083                 <span class="keyword">// undocumented behavior: Z flag, see 68knotes.txt</span>
580
<a name="l03084"></a>03084                 <span class="keyword">//sr[2] &lt;= (operand1[15:0] == 16&#39;b0) ? 1&#39;b1 : 1&#39;b0;</span>
581
<a name="l03085"></a>03085                 <span class="keyword">// undocumented behavior: C,V flags, see 68knotes.txt</span>
582
<a name="l03086"></a>03086                 <span class="keyword">//sr[0] &lt;= 1&#39;b0;</span>
583
<a name="l03087"></a>03087                 <span class="keyword">//sr[1] &lt;= 1&#39;b0;</span>
584
<a name="l03088"></a>03088
585
<a name="l03089"></a>03089                 <span class="keyword">// C,X,V</span>
586
<a name="l03090"></a>03090                 <span class="keyword">//    sr[0] &lt;= (`Sm &amp; ~`Dm) | (`Rm &amp; ~`Dm) | (`Sm &amp; `Rm);</span>
587
<a name="l03091"></a>03091                 <span class="keyword">//    sr[4] &lt;= (`Sm &amp; ~`Dm) | (`Rm &amp; ~`Dm) | (`Sm &amp; `Rm); //=ccr[0];</span>
588
<a name="l03092"></a>03092                 <span class="keyword">//    sr[1] &lt;= (~`Sm &amp; `Dm &amp; ~`Rm) | (`Sm &amp; ~`Dm &amp; `Rm);</span>
589
<a name="l03093"></a>03093                 <span class="keyword">// +: 0-1,    0-0=0, 1-1=0</span>
590
<a name="l03094"></a>03094                 <span class="keyword">// -: 0-0=1,  1-0,   1-1=1</span>
591
<a name="l03095"></a>03095                 <span class="keyword">// operand1 - operand2 &gt; 0</span>
592
<a name="l03096"></a>03096                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] != <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] &amp;&amp; ((~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span>) | (~<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>) | (<a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">`Sm</a><span class="vhdlchar"></span> &amp; ~<a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>)) == <span class="vhdllogic">1&#39;b1</span> ) <span class="vhdlkeyword">begin</span>
593
<a name="l03097"></a>03097                     <span class="keyword">// clear N</span>
594
<a name="l03098"></a>03098                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
595
<a name="l03099"></a>03099                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
596
<a name="l03100"></a>03100                 <span class="vhdlkeyword">end</span>
597
<a name="l03101"></a>03101                 <span class="keyword">// operand1 &lt; 0</span>
598
<a name="l03102"></a>03102                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>] == <span class="vhdllogic">1&#39;b1</span> ) <span class="vhdlkeyword">begin</span>
599
<a name="l03103"></a>03103                     <span class="keyword">// set N</span>
600
<a name="l03104"></a>03104                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <span class="vhdllogic">1&#39;b1</span>;
601
<a name="l03105"></a>03105                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
602
<a name="l03106"></a>03106                 <span class="vhdlkeyword">end</span>
603
<a name="l03107"></a>03107                 <span class="keyword">// no trap</span>
604
<a name="l03108"></a>03108                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
605
<a name="l03109"></a>03109                     <span class="keyword">// N undefined: not affected</span>
606
<a name="l03110"></a>03110                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
607
<a name="l03111"></a>03111                 <span class="vhdlkeyword">end</span>
608
<a name="l03112"></a>03112
609
<a name="l03113"></a>03113                 <span class="keyword">// X not affected</span>
610
<a name="l03114"></a>03114             <span class="vhdlkeyword">end</span>
611
<a name="l03115"></a>03115
612
<a name="l03116"></a>03116             <a class="code" href="ao68000_8v.html#aed07d190bb88f0cce7768028698020f9">`ALU_MULS_MULU_DIVS_DIVU</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
613
<a name="l03117"></a>03117
614
<a name="l03118"></a>03118                 <span class="keyword">// division by 0</span>
615
<a name="l03119"></a>03119                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> &amp;&amp; <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0</span>) <span class="vhdlkeyword">begin</span>
616
<a name="l03120"></a>03120                     <span class="keyword">// X not affected</span>
617
<a name="l03121"></a>03121                     <span class="keyword">// C cleared</span>
618
<a name="l03122"></a>03122                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
619
<a name="l03123"></a>03123                     <span class="keyword">// V,Z,N undefined: cleared</span>
620
<a name="l03124"></a>03124                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
621
<a name="l03125"></a>03125                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
622
<a name="l03126"></a>03126                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
623
<a name="l03127"></a>03127
624
<a name="l03128"></a>03128                     <span class="keyword">// set trap</span>
625
<a name="l03129"></a>03129                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
626
<a name="l03130"></a>03130                 <span class="vhdlkeyword">end</span>
627
<a name="l03131"></a>03131                 <span class="keyword">// division in idle state</span>
628
<a name="l03132"></a>03132                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> &amp;&amp; <a class="code" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a> == <span class="vhdllogic">5&#39;d0</span>) <span class="vhdlkeyword">begin</span>
629
<a name="l03133"></a>03133                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
630
<a name="l03134"></a>03134                 <span class="vhdlkeyword">end</span>
631
<a name="l03135"></a>03135                 <span class="keyword">// division overflow: divu, divs</span>
632
<a name="l03136"></a>03136                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> &amp;&amp; <a class="code" href="classalu.html#a8d11b113e74362e74035541da1b0a02e">div_overflow</a> == <span class="vhdllogic">1&#39;b1</span>) <span class="vhdlkeyword">begin</span>
633
<a name="l03137"></a>03137                     <span class="keyword">// X not affected</span>
634
<a name="l03138"></a>03138                     <span class="keyword">// C cleared</span>
635
<a name="l03139"></a>03139                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
636
<a name="l03140"></a>03140                     <span class="keyword">// V set</span>
637
<a name="l03141"></a>03141                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b1</span>;
638
<a name="l03142"></a>03142                     <span class="keyword">// Z,N undefined: cleared and set</span>
639
<a name="l03143"></a>03143                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
640
<a name="l03144"></a>03144                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <span class="vhdllogic">1&#39;b1</span>;
641 13 alfik
<a name="l03145"></a>03145
642 14 alfik
<a name="l03146"></a>03146                     <span class="keyword">// set trap</span>
643
<a name="l03147"></a>03147                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b1</span>;
644
<a name="l03148"></a>03148                 <span class="vhdlkeyword">end</span>
645
<a name="l03149"></a>03149                 <span class="keyword">// division</span>
646
<a name="l03150"></a>03150                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1000</span> ) <span class="vhdlkeyword">begin</span>
647
<a name="l03151"></a>03151                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] &lt;= {<a class="code" href="classalu.html#ad32bb10563baa2d2d78c2a23e8f2219e">div_remainder</a>, <a class="code" href="classalu.html#af65ee78a38f09889c3b8c9efc759f559">div_quotient</a>};
648
<a name="l03152"></a>03152
649
<a name="l03153"></a>03153                     <span class="keyword">// X not affected</span>
650
<a name="l03154"></a>03154                     <span class="keyword">// C cleared</span>
651
<a name="l03155"></a>03155                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
652
<a name="l03156"></a>03156                     <span class="keyword">// V cleared</span>
653
<a name="l03157"></a>03157                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
654
<a name="l03158"></a>03158                     <span class="keyword">// Z</span>
655
<a name="l03159"></a>03159                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= (<a class="code" href="classalu.html#af65ee78a38f09889c3b8c9efc759f559">div_quotient</a> == <span class="vhdllogic">16&#39;b0</span>);
656
<a name="l03160"></a>03160                     <span class="keyword">// N</span>
657
<a name="l03161"></a>03161                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= (<a class="code" href="classalu.html#af65ee78a38f09889c3b8c9efc759f559">div_quotient</a>[<span class="vhdllogic">15</span>] == <span class="vhdllogic">1&#39;b1</span>);
658
<a name="l03162"></a>03162
659
<a name="l03163"></a>03163                     <span class="keyword">// set trap</span>
660
<a name="l03164"></a>03164                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
661
<a name="l03165"></a>03165                 <span class="vhdlkeyword">end</span>
662
<a name="l03166"></a>03166                 <span class="keyword">// multiplication</span>
663
<a name="l03167"></a>03167                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">12</span>] == <span class="vhdllogic">4&#39;b1100</span> ) <span class="vhdlkeyword">begin</span>
664
<a name="l03168"></a>03168                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#aff5530027f36561324e060e703004b6b">mult_result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
665
<a name="l03169"></a>03169
666
<a name="l03170"></a>03170                     <span class="keyword">// X not affected</span>
667
<a name="l03171"></a>03171                     <span class="keyword">// C cleared</span>
668
<a name="l03172"></a>03172                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
669
<a name="l03173"></a>03173                     <span class="keyword">// V cleared</span>
670
<a name="l03174"></a>03174                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
671
<a name="l03175"></a>03175                     <span class="keyword">// Z</span>
672
<a name="l03176"></a>03176                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= (<a class="code" href="classalu.html#aff5530027f36561324e060e703004b6b">mult_result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">32&#39;b0</span>);
673
<a name="l03177"></a>03177                     <span class="keyword">// N</span>
674
<a name="l03178"></a>03178                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= (<a class="code" href="classalu.html#aff5530027f36561324e060e703004b6b">mult_result</a>[<span class="vhdllogic">31</span>] == <span class="vhdllogic">1&#39;b1</span>);
675
<a name="l03179"></a>03179
676
<a name="l03180"></a>03180                     <span class="keyword">// set trap</span>
677
<a name="l03181"></a>03181                     <a class="code" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a> &lt;= <span class="vhdllogic">1&#39;b0</span>;
678
<a name="l03182"></a>03182                 <span class="vhdlkeyword">end</span>
679
<a name="l03183"></a>03183             <span class="vhdlkeyword">end</span>
680
<a name="l03184"></a>03184
681
<a name="l03185"></a>03185
682
<a name="l03186"></a>03186             <a class="code" href="ao68000_8v.html#a14b85ce3e5b4ede3b2c4e89f420c8c3c">`ALU_BCHG_BCLR_BSET_BTST</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span> <span class="keyword">// 97 LE</span>
683
<a name="l03187"></a>03187                 <span class="keyword">// byte</span>
684
<a name="l03188"></a>03188                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">5</span>:<span class="vhdllogic">3</span>] != <span class="vhdllogic">3&#39;b000</span> ) <span class="vhdlkeyword">begin</span>
685
<a name="l03189"></a>03189                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= ~(<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">2</span>:<span class="vhdllogic">0</span>] ]);
686
<a name="l03190"></a>03190                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
687
<a name="l03191"></a>03191                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">2</span>:<span class="vhdllogic">0</span>] ] = (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b01</span>) ? ~(<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">2</span>:<span class="vhdllogic">0</span>] ]) : (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b10</span>) ? <span class="vhdllogic">1&#39;b0</span> : <span class="vhdllogic">1&#39;b1</span>;
688
<a name="l03192"></a>03192                 <span class="vhdlkeyword">end</span>
689
<a name="l03193"></a>03193                 <span class="keyword">// long</span>
690
<a name="l03194"></a>03194                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">5</span>:<span class="vhdllogic">3</span>] == <span class="vhdllogic">3&#39;b000</span> ) <span class="vhdlkeyword">begin</span>
691
<a name="l03195"></a>03195                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= ~(<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">0</span>] ]);
692
<a name="l03196"></a>03196                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
693
<a name="l03197"></a>03197                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">0</span>] ] = (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b01</span>) ? ~(<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[ <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">0</span>] ]) : (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">2&#39;b10</span>) ? <span class="vhdllogic">1&#39;b0</span> : <span class="vhdllogic">1&#39;b1</span>;
694
<a name="l03198"></a>03198                 <span class="vhdlkeyword">end</span>
695
<a name="l03199"></a>03199
696
<a name="l03200"></a>03200                 <span class="keyword">// C,V,N,X not affected</span>
697
<a name="l03201"></a>03201             <span class="vhdlkeyword">end</span>
698
<a name="l03202"></a>03202
699
<a name="l03203"></a>03203             <a class="code" href="ao68000_8v.html#ac7de3ab6c8eec4381bde5e4f61b45761">`ALU_TAS</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
700
<a name="l03204"></a>03204                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] &lt;= { <span class="vhdllogic">1&#39;b1</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">6</span>:<span class="vhdllogic">0</span>] };
701
<a name="l03205"></a>03205
702
<a name="l03206"></a>03206                 <span class="keyword">// X not affected</span>
703
<a name="l03207"></a>03207                 <span class="keyword">// C cleared</span>
704
<a name="l03208"></a>03208                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
705
<a name="l03209"></a>03209                 <span class="keyword">// V cleared</span>
706
<a name="l03210"></a>03210                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
707
<a name="l03211"></a>03211
708
<a name="l03212"></a>03212                 <span class="keyword">// N set</span>
709
<a name="l03213"></a>03213                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>] == <span class="vhdllogic">1&#39;b1</span>);
710
<a name="l03214"></a>03214                 <span class="keyword">// Z set</span>
711
<a name="l03215"></a>03215                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">8&#39;b0</span>);
712
<a name="l03216"></a>03216             <span class="vhdlkeyword">end</span>
713
<a name="l03217"></a>03217
714
<a name="l03218"></a>03218
715
<a name="l03219"></a>03219             <a class="code" href="ao68000_8v.html#a07c7e53af3f4995a167966ba18c2728f">`ALU_NEGX_CLR_NEG_NOT_NBCD_SWAP_EXT</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
716
<a name="l03220"></a>03220                 <span class="keyword">// NEGX / CLR / NEG / NOT</span>
717
<a name="l03221"></a>03221                 <span class="vhdlkeyword">if</span> ((<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0000</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0010</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0100</span>) || (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0110</span>))
718
<a name="l03222"></a>03222                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = <span class="vhdllogic">32&#39;b0</span> - (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] &amp; {<span class="vhdllogic">32</span>{<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>] | ~<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">9</span>]}}) - ((<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &amp; ~<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>] &amp; ~<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">9</span>]) | (<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">10</span>] &amp; <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">9</span>]));
719
<a name="l03223"></a>03223                 <span class="keyword">// NBCD</span>
720
<a name="l03224"></a>03224                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">6&#39;b1000_00</span> ) <span class="vhdlkeyword">begin</span>
721
<a name="l03225"></a>03225
722
<a name="l03226"></a>03226                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <span class="vhdllogic">5&#39;d25</span> - <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>];
723
<a name="l03227"></a>03227                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] = (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] &gt; <span class="vhdllogic">4&#39;d9</span>) ? (<span class="vhdllogic">5&#39;d24</span> - <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]) : (<span class="vhdllogic">5&#39;d25</span> - <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>]);
724
<a name="l03228"></a>03228
725
<a name="l03229"></a>03229                     <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] == <span class="vhdllogic">1&#39;b0</span> &amp;&amp; <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">4&#39;d9</span> &amp;&amp; <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] == <span class="vhdllogic">4&#39;d9</span>) <span class="vhdlkeyword">begin</span>
726
<a name="l03230"></a>03230                         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <span class="vhdllogic">4&#39;d0</span>;
727
<a name="l03231"></a>03231                         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] = <span class="vhdllogic">4&#39;d0</span>;
728
<a name="l03232"></a>03232                     <span class="vhdlkeyword">end</span>
729
<a name="l03233"></a>03233                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] == <span class="vhdllogic">1&#39;b0</span> &amp;&amp; (<a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">4&#39;d9</span> || <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">4&#39;d15</span>)) <span class="vhdlkeyword">begin</span>
730
<a name="l03234"></a>03234                         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <span class="vhdllogic">4&#39;d0</span>;
731
<a name="l03235"></a>03235                         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">4</span>] + <span class="vhdllogic">4&#39;d1</span>;
732
<a name="l03236"></a>03236                     <span class="vhdlkeyword">end</span>
733
<a name="l03237"></a>03237                     <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] == <span class="vhdllogic">1&#39;b0</span>) <span class="vhdlkeyword">begin</span>
734
<a name="l03238"></a>03238                         <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] = <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] + <span class="vhdllogic">4&#39;d1</span>;
735
<a name="l03239"></a>03239                     <span class="vhdlkeyword">end</span>
736
<a name="l03240"></a>03240
737
<a name="l03241"></a>03241                     <span class="keyword">//V undefined: unchanged</span>
738
<a name="l03242"></a>03242                     <span class="keyword">//Z</span>
739
<a name="l03243"></a>03243                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &amp; <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
740
<a name="l03244"></a>03244                     <span class="keyword">//C,X</span>
741
<a name="l03245"></a>03245                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">8&#39;d0</span> &amp;&amp; <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] == <span class="vhdllogic">1&#39;b0</span>) ? <span class="vhdllogic">1&#39;b0</span> : <span class="vhdllogic">1&#39;b1</span>;
742
<a name="l03246"></a>03246                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= (<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">8&#39;d0</span> &amp;&amp; <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] == <span class="vhdllogic">1&#39;b0</span>) ? <span class="vhdllogic">1&#39;b0</span> : <span class="vhdllogic">1&#39;b1</span>; <span class="keyword">//=C</span>
743
<a name="l03247"></a>03247                 <span class="vhdlkeyword">end</span>
744
<a name="l03248"></a>03248                 <span class="keyword">// SWAP</span>
745
<a name="l03249"></a>03249                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">6&#39;b1000_01</span> ) <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>], <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">16</span>] };
746
<a name="l03250"></a>03250                 <span class="keyword">// EXT byte to word</span>
747
<a name="l03251"></a>03251                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">6&#39;b1000_10</span> ) <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = { <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">16</span>], {<span class="vhdllogic">8</span>{<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>]}}, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">7</span>:<span class="vhdllogic">0</span>] };
748
<a name="l03252"></a>03252                 <span class="keyword">// EXT word to long</span>
749
<a name="l03253"></a>03253                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">6&#39;b1000_11</span> ) <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> = { {<span class="vhdllogic">16</span>{<a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>]}}, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] };
750
<a name="l03254"></a>03254
751
<a name="l03255"></a>03255                 <span class="keyword">// N set if negative else clear</span>
752
<a name="l03256"></a>03256                 <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">3</span>] &lt;= <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
753 13 alfik
<a name="l03257"></a>03257
754 14 alfik
<a name="l03258"></a>03258                 <span class="keyword">// CLR,NOT,SWAP,EXT</span>
755
<a name="l03259"></a>03259                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0010</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0110</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">6</span>] == <span class="vhdllogic">6&#39;b1000_01</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">7</span>] == <span class="vhdllogic">5&#39;b1000_1</span> ) <span class="vhdlkeyword">begin</span>
756
<a name="l03260"></a>03260                     <span class="keyword">// X not affected</span>
757
<a name="l03261"></a>03261                     <span class="keyword">// C,V cleared</span>
758
<a name="l03262"></a>03262                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
759
<a name="l03263"></a>03263                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <span class="vhdllogic">1&#39;b0</span>;
760
<a name="l03264"></a>03264                     <span class="keyword">// Z set</span>
761
<a name="l03265"></a>03265                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
762
<a name="l03266"></a>03266                 <span class="vhdlkeyword">end</span>
763
<a name="l03267"></a>03267                 <span class="keyword">// NEGX</span>
764
<a name="l03268"></a>03268                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0000</span> ) <span class="vhdlkeyword">begin</span>
765
<a name="l03269"></a>03269                     <span class="keyword">// C set if borrow</span>
766
<a name="l03270"></a>03270                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> | <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
767
<a name="l03271"></a>03271                     <span class="keyword">// X=C</span>
768
<a name="l03272"></a>03272                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> | <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
769
<a name="l03273"></a>03273                     <span class="keyword">// V set if overflow</span>
770
<a name="l03274"></a>03274                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
771
<a name="l03275"></a>03275                     <span class="keyword">// Z cleared if nonzero else unchanged</span>
772
<a name="l03276"></a>03276                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &amp; <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
773 13 alfik
<a name="l03277"></a>03277                 <span class="vhdlkeyword">end</span>
774 14 alfik
<a name="l03278"></a>03278                 <span class="keyword">// NEG</span>
775
<a name="l03279"></a>03279                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">11</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">4&#39;b0100</span> ) <span class="vhdlkeyword">begin</span>
776
<a name="l03280"></a>03280                     <span class="keyword">// C clear if zero else set</span>
777
<a name="l03281"></a>03281                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">0</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> | <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
778
<a name="l03282"></a>03282                     <span class="keyword">// X=C</span>
779
<a name="l03283"></a>03283                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">4</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> | <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
780
<a name="l03284"></a>03284                     <span class="keyword">// V set if overflow</span>
781
<a name="l03285"></a>03285                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">1</span>] &lt;= <a class="code" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">`Dm</a><span class="vhdlchar"></span> &amp; <a class="code" href="classalu.html#a942f3773659fb9e9e38101743237144a">`Rm</a><span class="vhdlchar"></span>;
782
<a name="l03286"></a>03286                     <span class="keyword">// Z set if zero else clear</span>
783
<a name="l03287"></a>03287                     <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">2</span>] &lt;= <a class="code" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">`Z</a><span class="vhdlchar"></span>;
784
<a name="l03288"></a>03288                 <span class="vhdlkeyword">end</span>
785
<a name="l03289"></a>03289             <span class="vhdlkeyword">end</span>
786
<a name="l03290"></a>03290
787 13 alfik
<a name="l03291"></a>03291
788 14 alfik
<a name="l03292"></a>03292             <a class="code" href="ao68000_8v.html#a32c0e163ff437b07e40593ab59e42fe3">`ALU_SIMPLE_LONG_ADD</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
789
<a name="l03293"></a>03293                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] + <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
790
<a name="l03294"></a>03294
791
<a name="l03295"></a>03295                 <span class="keyword">// CCR not affected</span>
792
<a name="l03296"></a>03296             <span class="vhdlkeyword">end</span>
793 13 alfik
<a name="l03297"></a>03297
794 14 alfik
<a name="l03298"></a>03298             <a class="code" href="ao68000_8v.html#aea6fee15f3d775b1a8d262490203c713">`ALU_SIMPLE_LONG_SUB</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
795
<a name="l03299"></a>03299                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>] - <a class="code" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a>[<span class="vhdllogic">31</span>:<span class="vhdllogic">0</span>];
796
<a name="l03300"></a>03300
797
<a name="l03301"></a>03301                 <span class="keyword">// CCR not affected</span>
798
<a name="l03302"></a>03302             <span class="vhdlkeyword">end</span>
799
<a name="l03303"></a>03303
800
<a name="l03304"></a>03304             <a class="code" href="ao68000_8v.html#a5083d98f4b785fe7af85ba1114f678ff">`ALU_MOVE_TO_CCR_SR_RTE_RTR_STOP_LOGIC_TO_CCR_SR</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
801
<a name="l03305"></a>03305
802
<a name="l03306"></a>03306                 <span class="keyword">// MOVE TO SR,RTE,STOP,ORI to SR,ANDI to SR,EORI to SR</span>
803
<a name="l03307"></a>03307                 <span class="vhdlkeyword">if</span>( <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">8&#39;b0100_0110</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0100_1110_0111_0011</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0100_1110_0111_0010</span> ||
804
<a name="l03308"></a>03308                     <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_000_0_01_111100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_001_0_01_111100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_101_0_01_111100</span>
805
<a name="l03309"></a>03309                 )         <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &lt;= { <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">15</span>], <span class="vhdllogic">1&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">13</span>], <span class="vhdllogic">2&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">10</span>:<span class="vhdllogic">8</span>], <span class="vhdllogic">3&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">0</span>] };
806
<a name="l03310"></a>03310                 <span class="keyword">// MOVE TO CCR,RTR,ORI to CCR,ANDI to CCR,EORI to CCR</span>
807
<a name="l03311"></a>03311                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">if</span>(     <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>] == <span class="vhdllogic">8&#39;b0100_0100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0100_1110_0111_0111</span> ||
808
<a name="l03312"></a>03312                             <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_000_0_00_111100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_001_0_00_111100</span> || <a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">16&#39;b0000_101_0_00_111100</span>
809
<a name="l03313"></a>03313                 )        <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a> &lt;= { <a class="code" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a>[<span class="vhdllogic">15</span>:<span class="vhdllogic">8</span>], <span class="vhdllogic">3&#39;b0</span>, <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>[<span class="vhdllogic">4</span>:<span class="vhdllogic">0</span>] };
810
<a name="l03314"></a>03314             <span class="vhdlkeyword">end</span>
811
<a name="l03315"></a>03315
812
<a name="l03316"></a>03316             <a class="code" href="ao68000_8v.html#ab6d6f774c41848f9c33c7b393620be2d">`ALU_SIMPLE_MOVE</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
813
<a name="l03317"></a>03317                 <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
814
<a name="l03318"></a>03318
815
<a name="l03319"></a>03319                 <span class="keyword">// CCR not affected</span>
816
<a name="l03320"></a>03320             <span class="vhdlkeyword">end</span>
817
<a name="l03321"></a>03321
818
<a name="l03322"></a>03322             <a class="code" href="ao68000_8v.html#ac439a8b79bd4b213f0f33172bd5e5a73">`ALU_LINK_MOVE</a><span class="vhdlchar"></span>: <span class="vhdlkeyword">begin</span>
819
<a name="l03323"></a>03323                 <span class="vhdlkeyword">if</span>(<a class="code" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a>[<span class="vhdllogic">3</span>:<span class="vhdllogic">0</span>] == <span class="vhdllogic">3&#39;b111</span>) <span class="vhdlkeyword">begin</span>
820
<a name="l03324"></a>03324                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a> - <span class="vhdllogic">32&#39;d4</span>;
821
<a name="l03325"></a>03325                 <span class="vhdlkeyword">end</span>
822
<a name="l03326"></a>03326                 <span class="vhdlkeyword">else</span> <span class="vhdlkeyword">begin</span>
823
<a name="l03327"></a>03327                     <a class="code" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a> &lt;= <a class="code" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a>;
824
<a name="l03328"></a>03328                 <span class="vhdlkeyword">end</span>
825
<a name="l03329"></a>03329
826
<a name="l03330"></a>03330                 <span class="keyword">// CCR not affected</span>
827
<a name="l03331"></a>03331             <span class="vhdlkeyword">end</span>
828
<a name="l03332"></a>03332
829
<a name="l03333"></a>03333         <span class="vhdlkeyword">endcase</span>
830
<a name="l03334"></a>03334     <span class="vhdlkeyword">end</span>
831
<a name="l03335"></a>03335 <span class="vhdlkeyword">end</span>
832 12 alfik
</pre></div>
833
</div>
834
</div>
835
<hr/><h2>Member Data Documentation</h2>
836 13 alfik
<a class="anchor" id="aaa60d149641cba8468ad7791eb5999ab"></a><!-- doxytag: member="alu::clock" ref="aaa60d149641cba8468ad7791eb5999ab" args="" -->
837 12 alfik
<div class="memitem">
838
<div class="memproto">
839
      <table class="memname">
840
        <tr>
841 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#aaa60d149641cba8468ad7791eb5999ab">clock</a></span> <b><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
842 12 alfik
        </tr>
843
      </table>
844
</div>
845
<div class="memdoc">
846
 
847 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02559">2559</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
848 12 alfik
 
849
</div>
850
</div>
851 13 alfik
<a class="anchor" id="a5e83fb99cb897f45ca128fa1594c5967"></a><!-- doxytag: member="alu::reset_n" ref="a5e83fb99cb897f45ca128fa1594c5967" args="" -->
852 12 alfik
<div class="memitem">
853
<div class="memproto">
854
      <table class="memname">
855
        <tr>
856 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a5e83fb99cb897f45ca128fa1594c5967">reset_n</a></span> <b><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
857 12 alfik
        </tr>
858
      </table>
859
</div>
860
<div class="memdoc">
861
 
862 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02560">2560</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
863 12 alfik
 
864
</div>
865
</div>
866 13 alfik
<a class="anchor" id="a379cf0ab5b30f07c291e327fc5bb194f"></a><!-- doxytag: member="alu::address" ref="a379cf0ab5b30f07c291e327fc5bb194f" args="" -->
867 12 alfik
<div class="memitem">
868
<div class="memproto">
869
      <table class="memname">
870
        <tr>
871 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a379cf0ab5b30f07c291e327fc5bb194f">address</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
872 12 alfik
        </tr>
873
      </table>
874
</div>
875
<div class="memdoc">
876
 
877 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02563">2563</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
878 12 alfik
 
879
</div>
880
</div>
881 13 alfik
<a class="anchor" id="aff1294ddc1983f4e66996a118dc19d01"></a><!-- doxytag: member="alu::ir" ref="aff1294ddc1983f4e66996a118dc19d01" args="" -->
882 12 alfik
<div class="memitem">
883
<div class="memproto">
884
      <table class="memname">
885
        <tr>
886 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#aff1294ddc1983f4e66996a118dc19d01">ir</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
887 12 alfik
        </tr>
888
      </table>
889
</div>
890
<div class="memdoc">
891
 
892 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02565">2565</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
893 12 alfik
 
894
</div>
895
</div>
896 13 alfik
<a class="anchor" id="ab689dbfef609d2f29a3bfd8eea9ac4c9"></a><!-- doxytag: member="alu::size" ref="ab689dbfef609d2f29a3bfd8eea9ac4c9" args="" -->
897 12 alfik
<div class="memitem">
898
<div class="memproto">
899
      <table class="memname">
900
        <tr>
901 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ab689dbfef609d2f29a3bfd8eea9ac4c9">size</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">2</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
902 12 alfik
        </tr>
903
      </table>
904
</div>
905
<div class="memdoc">
906
 
907 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02567">2567</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
908 12 alfik
 
909
</div>
910
</div>
911 13 alfik
<a class="anchor" id="a321dfa4a70bd231091e44e3972b71b6d"></a><!-- doxytag: member="alu::operand1" ref="a321dfa4a70bd231091e44e3972b71b6d" args="" -->
912 12 alfik
<div class="memitem">
913
<div class="memproto">
914
      <table class="memname">
915
        <tr>
916 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a321dfa4a70bd231091e44e3972b71b6d">operand1</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
917 12 alfik
        </tr>
918
      </table>
919
</div>
920
<div class="memdoc">
921
 
922 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02569">2569</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
923 12 alfik
 
924
</div>
925
</div>
926 13 alfik
<a class="anchor" id="abea2bb54b9dba60806dcf2fccc896748"></a><!-- doxytag: member="alu::operand2" ref="abea2bb54b9dba60806dcf2fccc896748" args="" -->
927 12 alfik
<div class="memitem">
928
<div class="memproto">
929
      <table class="memname">
930
        <tr>
931 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#abea2bb54b9dba60806dcf2fccc896748">operand2</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
932 12 alfik
        </tr>
933
      </table>
934
</div>
935
<div class="memdoc">
936
 
937 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02570">2570</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
938 12 alfik
 
939
</div>
940
</div>
941 13 alfik
<a class="anchor" id="aaec5e2b3f347a2651f6456b7d0dafe16"></a><!-- doxytag: member="alu::interrupt_mask" ref="aaec5e2b3f347a2651f6456b7d0dafe16" args="" -->
942 12 alfik
<div class="memitem">
943
<div class="memproto">
944
      <table class="memname">
945
        <tr>
946 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#aaec5e2b3f347a2651f6456b7d0dafe16">interrupt_mask</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">2</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
947 12 alfik
        </tr>
948
      </table>
949
</div>
950
<div class="memdoc">
951
 
952 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02572">2572</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
953 12 alfik
 
954
</div>
955
</div>
956 13 alfik
<a class="anchor" id="acd09435ce38c12172a01a2b3725577dc"></a><!-- doxytag: member="alu::alu_control" ref="acd09435ce38c12172a01a2b3725577dc" args="" -->
957 12 alfik
<div class="memitem">
958
<div class="memproto">
959
      <table class="memname">
960
        <tr>
961 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#acd09435ce38c12172a01a2b3725577dc">alu_control</a></span> <b><span class="vhdlchar">[</span><span class="vhdldigit">4</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Input]</code></td>
962 12 alfik
        </tr>
963
      </table>
964
</div>
965
<div class="memdoc">
966
 
967 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02573">2573</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
968 12 alfik
 
969
</div>
970
</div>
971 13 alfik
<a class="anchor" id="a82a5493611ab7e8e59a11376b01bf617"></a><!-- doxytag: member="alu::sr" ref="a82a5493611ab7e8e59a11376b01bf617" args="" -->
972 12 alfik
<div class="memitem">
973
<div class="memproto">
974
      <table class="memname">
975
        <tr>
976 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a82a5493611ab7e8e59a11376b01bf617">sr</a></span> <b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">15</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Output]</code></td>
977 12 alfik
        </tr>
978
      </table>
979
</div>
980
<div class="memdoc">
981
 
982 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02575">2575</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
983 12 alfik
 
984
</div>
985
</div>
986 13 alfik
<a class="anchor" id="aa956d8f0509c2338b20188ff77b3c219"></a><!-- doxytag: member="alu::result" ref="aa956d8f0509c2338b20188ff77b3c219" args="" -->
987 12 alfik
<div class="memitem">
988
<div class="memproto">
989
      <table class="memname">
990
        <tr>
991 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#aa956d8f0509c2338b20188ff77b3c219">result</a></span> <b><span class="vhdlkeyword">reg</span><span class="vhdlchar">[</span><span class="vhdldigit">31</span><span class="vhdlchar">:</span><span class="vhdldigit">0</span><span class="vhdlchar">]</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Output]</code></td>
992 12 alfik
        </tr>
993
      </table>
994
</div>
995
<div class="memdoc">
996
 
997 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02576">2576</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
998 12 alfik
 
999
</div>
1000
</div>
1001 13 alfik
<a class="anchor" id="a41770492859599997a003e2681e7d955"></a><!-- doxytag: member="alu::alu_signal" ref="a41770492859599997a003e2681e7d955" args="" -->
1002 12 alfik
<div class="memitem">
1003
<div class="memproto">
1004
      <table class="memname">
1005
        <tr>
1006 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a41770492859599997a003e2681e7d955">alu_signal</a></span> <b><span class="vhdlkeyword">reg</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Output]</code></td>
1007 12 alfik
        </tr>
1008
      </table>
1009
</div>
1010
<div class="memdoc">
1011
 
1012 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02578">2578</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1013 12 alfik
 
1014
</div>
1015
</div>
1016 13 alfik
<a class="anchor" id="ab6a8e15c686ee360ddad15cd4d995ea9"></a><!-- doxytag: member="alu::alu_mult_div_ready" ref="ab6a8e15c686ee360ddad15cd4d995ea9" args="" -->
1017 12 alfik
<div class="memitem">
1018
<div class="memproto">
1019
      <table class="memname">
1020
        <tr>
1021 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ab6a8e15c686ee360ddad15cd4d995ea9">alu_mult_div_ready</a></span> <b><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Output]</code></td>
1022 12 alfik
        </tr>
1023
      </table>
1024
</div>
1025
<div class="memdoc">
1026
 
1027 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02579">2579</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1028 12 alfik
 
1029
</div>
1030
</div>
1031 13 alfik
<a class="anchor" id="abbf525422eca0279b697f742b90237e0"></a><!-- doxytag: member="alu::mult_div_sign" ref="abbf525422eca0279b697f742b90237e0" args="wire" -->
1032 12 alfik
<div class="memitem">
1033
<div class="memproto">
1034
      <table class="memname">
1035
        <tr>
1036 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#abbf525422eca0279b697f742b90237e0">mult_div_sign</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire]</code></td>
1037 12 alfik
        </tr>
1038
      </table>
1039
</div>
1040
<div class="memdoc">
1041
 
1042 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02590">2590</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1043 12 alfik
 
1044
</div>
1045
</div>
1046 13 alfik
<a class="anchor" id="a01e7473ea866a8cc46912bc69b59f8b0"></a><!-- doxytag: member="alu::div_count" ref="a01e7473ea866a8cc46912bc69b59f8b0" args="reg[4:0]" -->
1047 12 alfik
<div class="memitem">
1048
<div class="memproto">
1049
      <table class="memname">
1050
        <tr>
1051 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a01e7473ea866a8cc46912bc69b59f8b0">div_count</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg[4:0]]</code></td>
1052 12 alfik
        </tr>
1053
      </table>
1054
</div>
1055
<div class="memdoc">
1056
 
1057 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02593">2593</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1058 12 alfik
 
1059
</div>
1060
</div>
1061 13 alfik
<a class="anchor" id="ab225284f49794091a5a28e73b8b13e14"></a><!-- doxytag: member="alu::quotient" ref="ab225284f49794091a5a28e73b8b13e14" args="reg[16:0]" -->
1062 12 alfik
<div class="memitem">
1063
<div class="memproto">
1064
      <table class="memname">
1065
        <tr>
1066 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ab225284f49794091a5a28e73b8b13e14">quotient</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg[16:0]]</code></td>
1067 12 alfik
        </tr>
1068
      </table>
1069
</div>
1070
<div class="memdoc">
1071
 
1072 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02594">2594</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1073 12 alfik
 
1074
</div>
1075
</div>
1076 13 alfik
<a class="anchor" id="a0c2a64b2f5dd32b2159ca0f29de360aa"></a><!-- doxytag: member="alu::dividend" ref="a0c2a64b2f5dd32b2159ca0f29de360aa" args="reg[31:0]" -->
1077 12 alfik
<div class="memitem">
1078
<div class="memproto">
1079
      <table class="memname">
1080
        <tr>
1081 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a0c2a64b2f5dd32b2159ca0f29de360aa">dividend</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg[31:0]]</code></td>
1082 12 alfik
        </tr>
1083
      </table>
1084
</div>
1085
<div class="memdoc">
1086
 
1087 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02595">2595</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1088 12 alfik
 
1089
</div>
1090
</div>
1091 13 alfik
<a class="anchor" id="a9c2364593889150d7f5679fc33b0f1fa"></a><!-- doxytag: member="alu::divider" ref="a9c2364593889150d7f5679fc33b0f1fa" args="reg[31:0]" -->
1092 12 alfik
<div class="memitem">
1093
<div class="memproto">
1094
      <table class="memname">
1095
        <tr>
1096 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a9c2364593889150d7f5679fc33b0f1fa">divider</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg[31:0]]</code></td>
1097 12 alfik
        </tr>
1098
      </table>
1099
</div>
1100
<div class="memdoc">
1101
 
1102 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02595">2595</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1103 12 alfik
 
1104
</div>
1105
</div>
1106 13 alfik
<a class="anchor" id="a07af2646e5b543c5be95dddb22fd4ea6"></a><!-- doxytag: member="alu::div_diff" ref="a07af2646e5b543c5be95dddb22fd4ea6" args="wire[32:0]" -->
1107 12 alfik
<div class="memitem">
1108
<div class="memproto">
1109
      <table class="memname">
1110
        <tr>
1111 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a07af2646e5b543c5be95dddb22fd4ea6">div_diff</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire[32:0]]</code></td>
1112 12 alfik
        </tr>
1113
      </table>
1114
</div>
1115
<div class="memdoc">
1116
 
1117 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02598">2598</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1118 12 alfik
 
1119
</div>
1120
</div>
1121 13 alfik
<a class="anchor" id="a8d11b113e74362e74035541da1b0a02e"></a><!-- doxytag: member="alu::div_overflow" ref="a8d11b113e74362e74035541da1b0a02e" args="wire" -->
1122 12 alfik
<div class="memitem">
1123
<div class="memproto">
1124
      <table class="memname">
1125
        <tr>
1126 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a8d11b113e74362e74035541da1b0a02e">div_overflow</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire]</code></td>
1127 12 alfik
        </tr>
1128
      </table>
1129
</div>
1130
<div class="memdoc">
1131
 
1132 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02601">2601</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1133 12 alfik
 
1134
</div>
1135
</div>
1136 13 alfik
<a class="anchor" id="af65ee78a38f09889c3b8c9efc759f559"></a><!-- doxytag: member="alu::div_quotient" ref="af65ee78a38f09889c3b8c9efc759f559" args="wire[15:0]" -->
1137 12 alfik
<div class="memitem">
1138
<div class="memproto">
1139
      <table class="memname">
1140
        <tr>
1141 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#af65ee78a38f09889c3b8c9efc759f559">div_quotient</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire[15:0]]</code></td>
1142 12 alfik
        </tr>
1143
      </table>
1144
</div>
1145
<div class="memdoc">
1146
 
1147 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02607">2607</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1148 12 alfik
 
1149
</div>
1150
</div>
1151 13 alfik
<a class="anchor" id="ad32bb10563baa2d2d78c2a23e8f2219e"></a><!-- doxytag: member="alu::div_remainder" ref="ad32bb10563baa2d2d78c2a23e8f2219e" args="wire[15:0]" -->
1152 12 alfik
<div class="memitem">
1153
<div class="memproto">
1154
      <table class="memname">
1155
        <tr>
1156 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ad32bb10563baa2d2d78c2a23e8f2219e">div_remainder</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire[15:0]]</code></td>
1157 12 alfik
        </tr>
1158
      </table>
1159
</div>
1160
<div class="memdoc">
1161
 
1162 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02613">2613</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1163 12 alfik
 
1164
</div>
1165
</div>
1166 13 alfik
<a class="anchor" id="aff5530027f36561324e060e703004b6b"></a><!-- doxytag: member="alu::mult_result" ref="aff5530027f36561324e060e703004b6b" args="wire[33:0]" -->
1167 12 alfik
<div class="memitem">
1168
<div class="memproto">
1169
      <table class="memname">
1170
        <tr>
1171 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#aff5530027f36561324e060e703004b6b">mult_result</a></span> <b><span class="vhdlchar"> </span></b> <code> [wire[33:0]]</code></td>
1172 12 alfik
        </tr>
1173
      </table>
1174
</div>
1175
<div class="memdoc">
1176
 
1177 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02666">2666</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1178 12 alfik
 
1179
</div>
1180
</div>
1181 13 alfik
<a class="anchor" id="ab6caa4c83db93eebe29133a1ce68435e"></a><!-- doxytag: member="alu::interrupt_mask_copy" ref="ab6caa4c83db93eebe29133a1ce68435e" args="reg[2:0]" -->
1182 12 alfik
<div class="memitem">
1183
<div class="memproto">
1184
      <table class="memname">
1185
        <tr>
1186 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ab6caa4c83db93eebe29133a1ce68435e">interrupt_mask_copy</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg[2:0]]</code></td>
1187 12 alfik
        </tr>
1188
      </table>
1189
</div>
1190
<div class="memdoc">
1191
 
1192 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02697">2697</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1193 12 alfik
 
1194
</div>
1195
</div>
1196 13 alfik
<a class="anchor" id="afbfdb3d9663bb0dbde8f5ad7af046b27"></a><!-- doxytag: member="alu::was_interrupt" ref="afbfdb3d9663bb0dbde8f5ad7af046b27" args="reg" -->
1197 12 alfik
<div class="memitem">
1198
<div class="memproto">
1199
      <table class="memname">
1200
        <tr>
1201 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#afbfdb3d9663bb0dbde8f5ad7af046b27">was_interrupt</a></span> <b><span class="vhdlchar"> </span></b> <code> [reg]</code></td>
1202 12 alfik
        </tr>
1203
      </table>
1204
</div>
1205
<div class="memdoc">
1206
 
1207 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02698">2698</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1208 12 alfik
 
1209
</div>
1210
</div>
1211 13 alfik
<a class="anchor" id="a09fdad5ef76ddc7865c6e3a9cfc09123"></a><!-- doxytag: member="alu::Dm" ref="a09fdad5ef76ddc7865c6e3a9cfc09123" args="((size[0]==1'b1)?operand1[7]:(size[1]==1'b1)?operand1[15]:operand1[31])" -->
1212 12 alfik
<div class="memitem">
1213
<div class="memproto">
1214
      <table class="memname">
1215
        <tr>
1216 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a09fdad5ef76ddc7865c6e3a9cfc09123">Dm</a></span> <b><span class="vhdlchar"> </span></b><code> [Define]</code></td>
1217 12 alfik
        </tr>
1218
      </table>
1219
</div>
1220
<div class="memdoc">
1221
 
1222 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02689">2689</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1223 12 alfik
 
1224
</div>
1225
</div>
1226 13 alfik
<a class="anchor" id="a6447478386a93e0306b7cb09937c23c3"></a><!-- doxytag: member="alu::lpm_mult" ref="a6447478386a93e0306b7cb09937c23c3" args="" -->
1227 12 alfik
<div class="memitem">
1228
<div class="memproto">
1229
      <table class="memname">
1230
        <tr>
1231 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a6447478386a93e0306b7cb09937c23c3">lpm_mult</a></span> <b><span class="vhdlchar">muls</span><span class="vhdlchar"> </span></b> <b><span class="vhdlchar"> </span></b> <code> [Module Instance]</code></td>
1232 12 alfik
        </tr>
1233
      </table>
1234
</div>
1235
<div class="memdoc">
1236
 
1237 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02668">2668</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1238 12 alfik
 
1239
</div>
1240
</div>
1241 13 alfik
<a class="anchor" id="a942f3773659fb9e9e38101743237144a"></a><!-- doxytag: member="alu::Rm" ref="a942f3773659fb9e9e38101743237144a" args="((size[0]==1'b1)?result[7]:(size[1]==1'b1)?result[15]:result[31])" -->
1242 12 alfik
<div class="memitem">
1243
<div class="memproto">
1244
      <table class="memname">
1245
        <tr>
1246 13 alfik
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a942f3773659fb9e9e38101743237144a">Rm</a></span> <b><span class="vhdlchar"> </span></b><code> [Define]</code></td>
1247 12 alfik
        </tr>
1248
      </table>
1249
</div>
1250
<div class="memdoc">
1251
 
1252 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02691">2691</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1253 12 alfik
 
1254
</div>
1255
</div>
1256 13 alfik
<a class="anchor" id="a52a04e7012270413af6cecfc29ce720a"></a><!-- doxytag: member="alu::Sm" ref="a52a04e7012270413af6cecfc29ce720a" args="((size[0]==1'b1)?operand2[7]:(size[1]==1'b1)?operand2[15]:operand2[31])" -->
1257
<div class="memitem">
1258
<div class="memproto">
1259
      <table class="memname">
1260
        <tr>
1261
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#a52a04e7012270413af6cecfc29ce720a">Sm</a></span> <b><span class="vhdlchar"> </span></b><code> [Define]</code></td>
1262
        </tr>
1263
      </table>
1264
</div>
1265
<div class="memdoc">
1266
 
1267 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02687">2687</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1268 13 alfik
 
1269
</div>
1270
</div>
1271
<a class="anchor" id="ac5469ea2de38c1332c5a56b6b6242d55"></a><!-- doxytag: member="alu::Z" ref="ac5469ea2de38c1332c5a56b6b6242d55" args="((size[0]==1'b1)?(result[7:0]==8'b0):(size[1]==1'b1)?(result[15:0]==16'b0):(result[31:0]==32'b0))" -->
1272
<div class="memitem">
1273
<div class="memproto">
1274
      <table class="memname">
1275
        <tr>
1276
          <td class="memname"><span class="stringliteral"><a class="el" href="classalu.html#ac5469ea2de38c1332c5a56b6b6242d55">Z</a></span> <b><span class="vhdlchar"> </span></b><code> [Define]</code></td>
1277
        </tr>
1278
      </table>
1279
</div>
1280
<div class="memdoc">
1281
 
1282 14 alfik
<p>Definition at line <a class="el" href="ao68000_8v_source.html#l02693">2693</a> of file <a class="el" href="ao68000_8v_source.html">ao68000.v</a>.</p>
1283 13 alfik
 
1284
</div>
1285
</div>
1286 12 alfik
<hr/>The documentation for this class was generated from the following file:<ul>
1287
<li><a class="el" href="ao68000_8v_source.html">ao68000.v</a></li>
1288
</ul>
1289
</div>
1290 15 alfik
<hr class="footer"/><address class="footer"><small>Generated on Sat Jan 15 2011 17:55:18 for ao68000 by&#160;
1291 12 alfik
<a href="http://www.doxygen.org/index.html">
1292
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
1293
</body>
1294
</html>

powered by: WebSVN 2.1.0

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