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

Revision 6, 6.6 KB checked in by pntsvt00, 13 years ago (diff)

versione iniziale opensparc

Line 
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T1 Processor File: fpu_out.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//      FPU result output.
24//
25///////////////////////////////////////////////////////////////////////////////
26
27
28module fpu_out (
29        d8stg_fdiv_in,
30        m6stg_fmul_in,
31        a6stg_fadd_in,
32        div_id_out_in,
33        m6stg_id_in,
34        add_id_out_in,
35        div_exc_out,
36        d8stg_fdivd,
37        d8stg_fdivs,
38        div_sign_out,
39        div_exp_out,
40        div_frac_out,
41        mul_exc_out,
42        m6stg_fmul_dbl_dst,
43        m6stg_fmuls,
44        mul_sign_out,
45        mul_exp_out,
46        mul_frac_out,
47        add_exc_out,
48        a6stg_fcmpop,
49        add_cc_out,
50        add_fcc_out,
51        a6stg_dbl_dst,
52        a6stg_sng_dst,
53        a6stg_long_dst,
54        a6stg_int_dst,
55        add_sign_out,
56        add_exp_out,
57        add_frac_out,
58        arst_l,
59        grst_l,
60        rclk,
61       
62        fp_cpx_req_cq,
63        add_dest_rdy,
64        mul_dest_rdy,
65        div_dest_rdy,
66        fp_cpx_data_ca,
67
68        se,
69        si,
70        so
71);
72
73
74input           d8stg_fdiv_in;          // div pipe output request next cycle
75input           m6stg_fmul_in;          // mul pipe output request next cycle
76input           a6stg_fadd_in;          // add pipe output request next cycle
77input [9:0]     div_id_out_in;          // div pipe output ID next cycle
78input [9:0]     m6stg_id_in;            // mul pipe output ID next cycle
79input [9:0]     add_id_out_in;          // add pipe output ID next cycle
80input [4:0]     div_exc_out;            // divide pipe result- exception flags
81input           d8stg_fdivd;            // divide double- divide stage 8
82input           d8stg_fdivs;            // divide single- divide stage 8
83input           div_sign_out;           // divide sign output
84input [10:0]    div_exp_out;            // divide exponent output
85input [51:0]    div_frac_out;           // divide fraction output
86input [4:0]     mul_exc_out;            // multiply pipe result- exception flags
87input           m6stg_fmul_dbl_dst;     // double precision multiply result
88input           m6stg_fmuls;            // fmuls- multiply 6 stage
89input           mul_sign_out;           // multiply sign output
90input [10:0]    mul_exp_out;            // multiply exponent output
91input [51:0]    mul_frac_out;           // multiply fraction output
92input [4:0]     add_exc_out;            // add pipe result- exception flags
93input           a6stg_fcmpop;           // compare- add 6 stage
94input [1:0]     add_cc_out;             // add pipe result- condition
95input [1:0]     add_fcc_out;            // add pipe input fcc passed through
96input           a6stg_dbl_dst;          // float double result- add 6 stage
97input           a6stg_sng_dst;          // float single result- add 6 stage
98input           a6stg_long_dst;         // 64bit integer result- add 6 stage
99input           a6stg_int_dst;          // 32bit integer result- add 6 stage
100input           add_sign_out;           // add sign output
101input [10:0]    add_exp_out;            // add exponent output
102input [63:0]    add_frac_out;           // add fraction output
103input           arst_l;                 // global async. reset- asserted low
104input           grst_l;                 // global sync. reset- asserted low
105input           rclk;                   // global clock
106
107output [7:0]    fp_cpx_req_cq;          // FPU result request to CPX
108output          add_dest_rdy;           // add pipe result request this cycle
109output          mul_dest_rdy;           // mul pipe result request this cycle
110output          div_dest_rdy;           // div pipe result request this cycle
111output [144:0]  fp_cpx_data_ca;         // FPU result to CPX
112
113input           se;                     // scan_enable
114input           si;                     // scan in
115output          so;                     // scan out
116
117
118///////////////////////////////////////////////////////////////////////////////
119//
120//      Outputs of fpu_out_ctl.
121//
122///////////////////////////////////////////////////////////////////////////////
123
124wire [7:0]      fp_cpx_req_cq;          // FPU result request to CPX
125wire [1:0]      req_thread;             // thread ID of result req this cycle
126wire [2:0]      dest_rdy;               // pipe with result request this cycle
127wire            add_dest_rdy;           // add pipe result request this cycle
128wire            mul_dest_rdy;           // mul pipe result request this cycle
129wire            div_dest_rdy;           // div pipe result request this cycle
130
131
132///////////////////////////////////////////////////////////////////////////////
133//
134//      Outputs of fpu_out_dp.
135//
136///////////////////////////////////////////////////////////////////////////////
137
138wire [144:0]    fp_cpx_data_ca;         // FPU result to CPX
139
140
141///////////////////////////////////////////////////////////////////////////////
142//
143//      Instantiations.
144//
145///////////////////////////////////////////////////////////////////////////////
146
147fpu_out_ctl fpu_out_ctl (
148        .d8stg_fdiv_in                  (d8stg_fdiv_in),
149        .m6stg_fmul_in                  (m6stg_fmul_in),
150        .a6stg_fadd_in                  (a6stg_fadd_in),
151        .div_id_out_in                  (div_id_out_in[9:0]),
152        .m6stg_id_in                    (m6stg_id_in[9:0]),
153        .add_id_out_in                  (add_id_out_in[9:0]),
154        .arst_l                         (arst_l),
155        .grst_l                         (grst_l),
156        .rclk                   (rclk),
157
158        .fp_cpx_req_cq                  (fp_cpx_req_cq[7:0]),
159        .req_thread                     (req_thread[1:0]),
160        .dest_rdy                       (dest_rdy[2:0]),
161        .add_dest_rdy                   (add_dest_rdy),
162        .mul_dest_rdy                   (mul_dest_rdy),
163        .div_dest_rdy                   (div_dest_rdy),
164
165        .se                             (se),
166        .si                             (si),
167        .so                             (scan_out_fpu_out_ctl)
168);
169
170
171fpu_out_dp fpu_out_dp (
172        .dest_rdy                       (dest_rdy[2:0]),
173        .req_thread                     (req_thread[1:0]),
174        .div_exc_out                    (div_exc_out[4:0]),
175        .d8stg_fdivd                    (d8stg_fdivd),
176        .d8stg_fdivs                    (d8stg_fdivs),
177        .div_sign_out                   (div_sign_out),
178        .div_exp_out                    (div_exp_out[10:0]),
179        .div_frac_out                   (div_frac_out[51:0]),
180        .mul_exc_out                    (mul_exc_out[4:0]),
181        .m6stg_fmul_dbl_dst             (m6stg_fmul_dbl_dst),
182        .m6stg_fmuls                    (m6stg_fmuls),
183        .mul_sign_out                   (mul_sign_out),
184        .mul_exp_out                    (mul_exp_out[10:0]),
185        .mul_frac_out                   (mul_frac_out[51:0]),
186        .add_exc_out                    (add_exc_out[4:0]),
187        .a6stg_fcmpop                   (a6stg_fcmpop),
188        .add_cc_out                     (add_cc_out[1:0]),
189        .add_fcc_out                    (add_fcc_out[1:0]),
190        .a6stg_dbl_dst                  (a6stg_dbl_dst),
191        .a6stg_sng_dst                  (a6stg_sng_dst),
192        .a6stg_long_dst                 (a6stg_long_dst),
193        .a6stg_int_dst                  (a6stg_int_dst),
194        .add_sign_out                   (add_sign_out),
195        .add_exp_out                    (add_exp_out[10:0]),
196        .add_frac_out                   (add_frac_out[63:0]),
197        .rclk                   (rclk),
198
199        .fp_cpx_data_ca                 (fp_cpx_data_ca[144:0]),
200
201        .se                             (se),
202        .si                             (scan_out_fpu_out_ctl),
203        .so                             (so)
204);
205
206
207endmodule
208
209
Note: See TracBrowser for help on using the repository browser.