source: XOpenSparcT1/trunk/T1-FPU/fpu_in2_gt_in1_3to1.v @ 6

Revision 6, 2.2 KB checked in by pntsvt00, 14 years ago (diff)

versione iniziale opensparc

Line 
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T1 Processor File: fpu_in2_gt_in1_3to1.v
4// Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
5// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6//
7// The above named program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public
9// License version 2 as published by the Free Software Foundation.
10//
11// The above named program is distributed in the hope that it will be
12// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public
17// License along with this work; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19//
20// ========== Copyright Header End ============================================
21///////////////////////////////////////////////////////////////////////////////
22//
23//      Reduce three fpu_in2_gt_in1_*b results to one set of results.
24//
25///////////////////////////////////////////////////////////////////////////////
26
27module fpu_in2_gt_in1_3to1 (
28        din2_neq_din1_hi,
29        din2_gt_din1_hi,
30        din2_neq_din1_mid,
31        din2_gt_din1_mid,
32        din2_neq_din1_lo,
33        din2_gt_din1_lo,
34
35        din2_neq_din1,
36        din2_gt_din1
37);
38
39
40input           din2_neq_din1_hi;       // input 2 != input 1- high 3 bits
41input           din2_gt_din1_hi;        // input 2 > input 1- high 3 bits
42input           din2_neq_din1_mid;      // input 2 != input 1- middle 3 bits
43input           din2_gt_din1_mid;       // input 2 > input 1- middle 3 bits
44input           din2_neq_din1_lo;       // input 2 != input 1- low 3 bits
45input           din2_gt_din1_lo;        // input 2 > input 1- low 3 bits
46
47output          din2_neq_din1;          // input 2 doesn't equal input 1
48output          din2_gt_din1;           // input 2 is greater than input 1
49
50
51wire            din2_neq_din1;
52wire            din2_gt_din1;
53
54
55assign din2_neq_din1= din2_neq_din1_hi || din2_neq_din1_mid || din2_neq_din1_lo;
56
57assign din2_gt_din1= (din2_neq_din1_hi && din2_gt_din1_hi)
58                || ((!din2_neq_din1_hi) && din2_neq_din1_mid
59                        && din2_gt_din1_mid)
60                || ((!din2_neq_din1_hi) && (!din2_neq_din1_mid)
61                        && din2_gt_din1_lo);
62
63
64endmodule
65
66
Note: See TracBrowser for help on using the repository browser.