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

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

versione iniziale opensparc

Line 
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T1 Processor File: fpu_add_exp_dp.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//      Add pipeline exponent datapath.
24//
25///////////////////////////////////////////////////////////////////////////////
26
27
28module fpu_add_exp_dp (
29        inq_in1,
30        inq_in2,
31        inq_op,
32        inq_op_7,
33        a1stg_step,
34        a1stg_faddsubd,
35        a1stg_faddsubs,
36        a1stg_fsdtoix,
37        a6stg_step,
38        a1stg_fstod,
39        a1stg_fdtos,
40        a1stg_fstoi,
41        a1stg_fstox,
42        a1stg_fdtoi,
43        a1stg_fdtox,
44        a2stg_fsdtoix_fdtos,
45        a2stg_faddsubop,
46        a2stg_fitos,
47        a2stg_fitod,
48        a2stg_fxtos,
49        a2stg_fxtod,
50        a3stg_exp_7ff,
51        a3stg_exp_ff,
52        a3stg_exp_add,
53        a3stg_inc_exp_inv,
54        a3stg_same_exp_inv,
55        a3stg_dec_exp_inv,
56        a3stg_faddsubop,
57        a3stg_fdtos_inv,
58        a4stg_fixtos_fxtod_inv,
59        a4stg_shl_cnt,
60        a4stg_denorm_inv,
61        a4stg_rndadd_cout,
62        add_exp_out_expinc,
63        add_exp_out_exp,
64        add_exp_out_exp1,
65        a4stg_in_of,
66        add_exp_out_expadd,
67        a4stg_dblop,
68        a4stg_to_0_inv,
69        fadd_clken_l,
70        rclk,
71       
72        a1stg_expadd3_11,
73        a1stg_expadd1_11_0,
74        a1stg_expadd4_inv,
75        a1stg_expadd2_5_0,
76        a2stg_exp,
77        a2stg_expadd,
78        a3stg_exp_10_0,
79        a4stg_exp_11_0,
80        add_exp_out,
81
82        se,
83        si,
84        so
85);
86
87
88input [62:52]   inq_in1;                // request operand 1 to op pipes
89input [62:52]   inq_in2;                // request operand 2 to op pipes
90input [1:0]     inq_op;                 // request opcode[1:0]
91input           inq_op_7;               // request opcode[7]
92input           a1stg_step;             // add pipe load
93input           a1stg_faddsubd;         // add/subtract double- add 1 stg
94input           a1stg_faddsubs;         // add/subtract single- add 1 stg
95input           a1stg_fsdtoix;          // float to integer convert- add 1 stg
96input           a6stg_step;             // advance the add pipe
97input           a1stg_fstod;            // fstod- add 1 stage
98input           a1stg_fdtos;            // fdtos- add 1 stage
99input           a1stg_fstoi;            // fstoi- add 1 stage
100input           a1stg_fstox;            // fstox- add 1 stage
101input           a1stg_fdtoi;            // fdtoi- add 1 stage
102input           a1stg_fdtox;            // fdtox- add 1 stage
103input           a2stg_fsdtoix_fdtos;    // float to integer convert- add 2 stg
104input           a2stg_faddsubop;        // float add or subtract- add 2 stage
105input           a2stg_fitos;            // fitos- add 2 stage
106input           a2stg_fitod;            // fitod- add 2 stage
107input           a2stg_fxtos;            // fxtos- add 2 stage
108input           a2stg_fxtod;            // fxtod- add 2 stage
109input           a3stg_exp_7ff;          // select line to a3stg_exp
110input           a3stg_exp_ff;           // select line to a3stg_exp
111input           a3stg_exp_add;          // select line to a3stg_exp
112input           a3stg_inc_exp_inv;      // increment the exponent- add 3 stg
113input           a3stg_same_exp_inv;     // keep the exponent- add 3 stg
114input           a3stg_dec_exp_inv;      // decrement the exponent- add 3 stg
115input           a3stg_faddsubop;        // add/subtract- add 3 stage
116input           a3stg_fdtos_inv;        // double to single convert- add 3 stg
117input           a4stg_fixtos_fxtod_inv; // int to single/double cvt- add 4 stg
118input [5:0]     a4stg_shl_cnt;          // postnorm shift left count- add 4 stg
119input           a4stg_denorm_inv;       // 0 the exponent
120input           a4stg_rndadd_cout;      // fraction rounding adder carry out
121input           add_exp_out_expinc;     // select line to add_exp_out
122input           add_exp_out_exp;        // select line to add_exp_out
123input           add_exp_out_exp1;       // select line to add_exp_out
124input           a4stg_in_of;            // add overflow- select exp out
125input           add_exp_out_expadd;     // select line to add_exp_out
126input           a4stg_dblop;            // double precision operation- add 4 stg
127input           a4stg_to_0_inv;         // result to infinity on overflow
128input           fadd_clken_l;           // add pipe clk enable - asserted low
129input           rclk;           // global clock
130
131output          a1stg_expadd3_11;       // exponent adder 3 output- add 1 stage
132output [11:0]   a1stg_expadd1_11_0;     // exponent adder 1 output- add 1 stage
133output [10:0]   a1stg_expadd4_inv;      // exponent adder 4 output- add 1 stage
134output [5:0]    a1stg_expadd2_5_0;      // exponent adder 2 output- add 1 stage
135output [11:0]   a2stg_exp;              // exponent- add 2 stage
136output [12:0]   a2stg_expadd;           // exponent adder- add 2 stage
137output [10:0]   a3stg_exp_10_0;         // exponent adder- add 3 stage
138output [11:0]   a4stg_exp_11_0;         // exponent adder- add 4 stage
139output [10:0]   add_exp_out;            // add exponent output
140
141input           se;                     // scan_enable
142input           si;                     // scan in
143output          so;                     // scan out
144
145
146wire [62:52]    a1stg_in1;
147wire [62:52]    a1stg_in1a;
148wire [62:52]    a1stg_in2;
149wire [62:52]    a1stg_in2a;
150wire [12:0]     a1stg_dp_sngop;
151wire [12:0]     a1stg_dp_sngopa;
152wire [12:0]     a1stg_dp_dblop;
153wire [12:0]     a1stg_dp_dblopa;
154wire [9:7]      a1stg_op_7;
155wire            a1stg_op_7_0;
156wire [10:0]     a1stg_expadd3_in1;
157wire [10:0]     a1stg_expadd3_in2_in;
158wire [10:0]     a1stg_expadd3_in2;
159wire [12:0]     a1stg_expadd3;
160wire            a1stg_expadd3_11;
161wire [12:0]     a1stg_expadd1_in1;
162wire [12:0]     a1stg_expadd1_in2;
163wire [12:0]     a1stg_expadd1;
164wire [11:0]     a1stg_expadd1_11_0;
165wire [12:0]     a1stg_expadd4_in1;
166wire [12:0]     a1stg_expadd4_in2;
167wire [12:0]     a1stg_expadd4;
168wire [10:0]     a1stg_expadd4_inv;
169wire [12:0]     a1stg_expadd2_in1;
170wire [12:0]     a1stg_expadd2;
171wire [5:0]      a1stg_expadd2_5_0;
172wire [12:0]     a2stg_exp_in;
173wire [11:0]     a2stg_exp;
174wire [12:0]     a2stg_expa;
175wire [12:0]     a2stg_expadd_in2_in;
176wire [12:0]     a2stg_expadd_in2;
177wire [12:0]     a2stg_expadd;
178wire [12:0]     a3stg_exp_in;
179wire [12:0]     a3stg_exp;
180wire [10:0]     a3stg_exp_10_0;
181wire [12:0]     a3stg_exp_plus1;
182wire [12:0]     a3stg_exp_minus1;
183wire [12:0]     a4stg_exp_pre1_in;
184wire [12:0]     a4stg_exp_pre1;
185wire [12:0]     a4stg_exp_pre3_in;
186wire [12:0]     a4stg_exp_pre3;
187wire [12:0]     a4stg_exp_pre2_in;
188wire [12:0]     a4stg_exp_pre2;
189wire [12:0]     a4stg_exp_pre4_in;
190wire [12:0]     a4stg_exp_pre4;
191wire [12:0]     a4stg_exp;
192wire [11:0]     a4stg_exp_11_0;
193wire [12:0]     a4stg_exp2;
194wire [12:0]     a4stg_expinc;
195wire [12:0]     a4stg_expadd_in2;
196wire [12:0]     a4stg_expadd;
197wire [12:0]     a4stg_expshl;
198wire [10:0]     add_exp_out_in1;
199wire [10:0]     add_exp_out1;
200wire [10:0]     add_exp_out_in2;
201wire [10:0]     add_exp_out2;
202wire [10:0]     add_exp_out_in3;
203wire [10:0]     add_exp_out3;
204wire [10:0]     add_exp_out4;
205wire [10:0]     add_exp_out;
206
207
208// 6/23/03: Removed tm_l input port. Using locally generated se_l instead for cken_buf
209wire se_l;
210
211assign se_l = ~se;
212
213clken_buf  ckbuf_add_exp_dp (
214  .clk(clk),
215  .rclk(rclk),
216  .enb_l(fadd_clken_l),
217  .tmb_l(se_l)
218  );
219
220///////////////////////////////////////////////////////////////////////////////
221//
222//      Add exponent inputs.
223//
224//      Add input stage.
225//
226///////////////////////////////////////////////////////////////////////////////
227
228dffe_s #(11) i_a1stg_in1 (
229        .din    (inq_in1[62:52]),
230        .en     (a1stg_step),
231        .clk    (clk),
232 
233        .q      (a1stg_in1[62:52]),
234
235        .se     (se),
236        .si     (),
237        .so     ()
238);
239
240dffe_s #(11) i_a1stg_in1a (
241        .din    (inq_in1[62:52]),
242        .en     (a1stg_step),
243        .clk    (clk),
244
245        .q      (a1stg_in1a[62:52]),
246
247        .se     (se),
248        .si     (),
249        .so     ()
250);
251
252dffe_s #(11) i_a1stg_in2 (
253        .din    (inq_in2[62:52]),
254        .en     (a1stg_step),
255        .clk    (clk),
256
257        .q      (a1stg_in2[62:52]),
258
259        .se     (se),
260        .si     (),
261        .so     ()
262);
263
264dffe_s #(11) i_a1stg_in2a (
265        .din    (inq_in2[62:52]),
266        .en     (a1stg_step),
267        .clk    (clk),
268 
269        .q      (a1stg_in2a[62:52]),
270 
271        .se     (se),
272        .si     (),
273        .so     ()
274);
275
276dffe_s #(13) i_a1stg_dp_sngop (
277        .din    ({13{inq_op[0]}}),
278        .en     (a1stg_step),
279        .clk    (clk),
280
281        .q      (a1stg_dp_sngop[12:0]),
282
283        .se     (se),
284        .si     (),
285        .so     ()
286);
287
288dffe_s #(13) i_a1stg_dp_sngopa (
289        .din    ({13{inq_op[0]}}),
290        .en     (a1stg_step),
291        .clk    (clk),
292 
293        .q      (a1stg_dp_sngopa[12:0]),
294 
295        .se     (se),
296        .si     (),
297        .so     ()
298);
299
300dffe_s #(13) i_a1stg_dp_dblop (
301        .din    ({13{inq_op[1]}}),
302        .en     (a1stg_step),
303        .clk    (clk),
304
305        .q      (a1stg_dp_dblop[12:0]),
306
307        .se     (se),
308        .si     (),
309        .so     ()
310);
311
312dffe_s #(13) i_a1stg_dp_dblopa (
313        .din    ({13{inq_op[1]}}),
314        .en     (a1stg_step),
315        .clk    (clk),
316
317        .q      (a1stg_dp_dblopa[12:0]),
318
319        .se     (se),
320        .si     (),
321        .so     ()
322);
323
324dffe_s #(4) i_a1stg_op_7 (
325        .din    ({4{inq_op_7}}),
326        .en     (a1stg_step),
327        .clk    (clk),
328
329        .q      ({a1stg_op_7[9:7], a1stg_op_7_0}),
330
331        .se     (se),
332        .si     (),
333        .so     ()
334);
335
336dffe_s #(11) i_a1stg_expadd3_in1 (
337        .din    (inq_in1[62:52]),
338        .en     (a1stg_step),
339        .clk    (clk),
340
341        .q      (a1stg_expadd3_in1[10:0]),
342
343        .se     (se),
344        .si     (),
345        .so     ()
346);
347
348assign a1stg_expadd3_in2_in[10:0]= (~(inq_in2[62:52] 
349                & {8'hff, {3{inq_op[1]}}}));
350
351dffe_s #(11) i_a1stg_expadd3_in2 (
352        .din    (a1stg_expadd3_in2_in[10:0]),
353        .en     (a1stg_step),
354        .clk    (clk),
355
356        .q      (a1stg_expadd3_in2[10:0]),
357
358        .se     (se),
359        .si     (),
360        .so     ()
361);
362
363
364///////////////////////////////////////////////////////////////////////////////
365//
366//      Add pipe exponent comparison.
367//
368//      Add stage 1.
369//
370///////////////////////////////////////////////////////////////////////////////
371
372assign a1stg_expadd3[12:0]= ({2'b00, a1stg_expadd3_in1[10:0]}
373                        + {2'b11, a1stg_expadd3_in2[10:0]}
374                        + 13'h0001);
375assign a1stg_expadd3_11 = a1stg_expadd3[11];
376
377
378assign a1stg_expadd1_in1[12:0]= (a1stg_dp_dblopa
379                            & {2'b0, a1stg_in1[62:52]})
380                | (a1stg_dp_sngopa
381                            & {5'b0, a1stg_in1[62:55]})
382                | {3'b0, a1stg_op_7[9:7], 6'b0, a1stg_op_7_0};
383
384assign a1stg_expadd1_in2[12:0]= (~((a1stg_dp_dblop
385                            & {2'b0, a1stg_in2[62:52]})
386                | (a1stg_dp_sngop
387                            & {5'b0, a1stg_in2[62:55]})));
388
389assign a1stg_expadd1[12:0]= (a1stg_expadd1_in1[12:0]
390                        + a1stg_expadd1_in2[12:0]
391                        + 13'h0001);
392assign a1stg_expadd1_11_0[11:0] = a1stg_expadd1[11:0];
393
394assign a1stg_expadd4_in1[12:0]= (a1stg_dp_dblopa
395                            & {2'b0, a1stg_in2a[62:52]})
396                | (a1stg_dp_sngopa
397                            & {5'b0, a1stg_in2a[62:55]});
398
399assign a1stg_expadd4_in2[12:0]= (~((a1stg_dp_dblop
400                            & {2'b0, a1stg_in1a[62:52]})
401                | (a1stg_dp_sngop
402                            & {5'b0, a1stg_in1a[62:55]})));
403
404assign a1stg_expadd4[12:0]= (a1stg_expadd4_in1[12:0]
405                        + a1stg_expadd4_in2[12:0]
406                        + 13'h0001);
407assign a1stg_expadd4_inv[10:0]= (~a1stg_expadd4[10:0]);
408
409assign a1stg_expadd2_in1[12:0]= (a1stg_dp_dblopa
410                            & {2'b0, a1stg_in2a[62:52]})
411                | (a1stg_dp_sngopa
412                            & {5'b0, a1stg_in2a[62:55]});
413
414assign a1stg_expadd2[12:0]= (a1stg_expadd2_in1[12:0]
415                        + 13'h0001);
416assign a1stg_expadd2_5_0[5:0] = a1stg_expadd2[5:0];
417
418assign a2stg_exp_in[12:0]= ({13{(a1stg_faddsubd && (!a1stg_expadd1[12]))}}
419                            & {2'b0, a1stg_in1a[62:52]})
420                | ({13{(a1stg_faddsubs && (!a1stg_expadd1[12]))}}
421                            & {5'b0, a1stg_in1a[62:55]})
422                | ({13{(a1stg_faddsubd && a1stg_expadd1[12])}}
423                            & {2'b0, a1stg_in2[62:52]})
424                | ({13{a1stg_fdtos}}
425                            & {2'b0, a1stg_in2[62:52]})
426                | ({13{(a1stg_faddsubs && a1stg_expadd1[12])}}
427                            & {5'b0, a1stg_in2[62:55]})
428                | ({13{a1stg_fstod}}
429                            & {5'b0, a1stg_in2[62:55]})
430                | ({13{a1stg_fsdtoix}}
431                            & a1stg_expadd2[12:0]);
432
433dffe_s #(12) i_a2stg_exp (
434        .din    (a2stg_exp_in[11:0]),
435        .en     (a6stg_step),
436        .clk    (clk),
437 
438        .q      (a2stg_exp[11:0]),
439
440        .se     (se),
441        .si     (),
442        .so     ()
443);
444
445dffe_s #(13) i_a2stg_expa (
446        .din    (a2stg_exp_in[12:0]),
447        .en     (a6stg_step),
448        .clk    (clk),
449
450        .q      (a2stg_expa[12:0]),
451
452        .se     (se),
453        .si     (),
454        .so     ()
455);
456
457
458///////////////////////////////////////////////////////////////////////////////
459//
460//      Add pipe exponent adjustment.
461//
462//      Add stage 1.
463//
464///////////////////////////////////////////////////////////////////////////////
465
466assign a2stg_expadd_in2_in[12:0]= ({13{a1stg_fstod}}
467                            & 13'h0380)
468                | ({13{a1stg_fdtos}}
469                            & (~13'h0380))
470                | ({13{a1stg_fstoi}}
471                            & (~13'h009f))
472                | ({13{a1stg_fstox}}
473                            & (~13'h00bf))
474                | ({13{a1stg_fdtoi}}
475                            & (~13'h041f))
476                | ({13{a1stg_fdtox}}
477                            & (~13'h043f));
478
479dffe_s #(13) i_a2stg_expadd2_in2 (
480        .din    (a2stg_expadd_in2_in[12:0]),
481        .en     (a6stg_step),
482        .clk    (clk),
483 
484        .q      (a2stg_expadd_in2[12:0]),
485 
486        .se     (se),
487        .si     (),
488        .so     ()
489);
490
491
492///////////////////////////////////////////////////////////////////////////////
493//
494//      Add pipe exponent adjustment.
495//
496//      Add stage 2.
497//
498///////////////////////////////////////////////////////////////////////////////
499
500assign a2stg_expadd[12:0]= (a2stg_expa[12:0]
501                        + a2stg_expadd_in2[12:0]
502                        + {12'b0, a2stg_fsdtoix_fdtos});
503
504assign a3stg_exp_in[12:0]= ({13{a2stg_faddsubop}}
505                            & a2stg_expa[12:0])
506                | ({13{a2stg_fitos}}
507                            & 13'h009e)
508                | ({13{a2stg_fitod}}
509                            & 13'h041e)
510                | ({13{a2stg_fxtos}}
511                            & 13'h00be)
512                | ({13{a2stg_fxtod}}
513                            & 13'h043e)
514                | ({13{a3stg_exp_7ff}}
515                            & 13'h07ff)
516                | ({13{a3stg_exp_ff}}
517                            & 13'h00ff)
518                | ({13{a3stg_exp_add}}
519                            & (a2stg_expadd[12:0] & {13{(!a2stg_expadd[11])}}));
520
521dffe_s #(13) i_a3stg_exp (
522        .din    (a3stg_exp_in[12:0]),
523        .en     (a6stg_step),
524        .clk    (clk),
525 
526        .q      (a3stg_exp[12:0]),
527 
528        .se     (se),
529        .si     (),
530        .so     ()
531);
532
533assign a3stg_exp_10_0[10:0] = a3stg_exp[10:0];
534
535
536
537///////////////////////////////////////////////////////////////////////////////
538//
539//      Add pipe exponent increment/decrement adjustment.
540//
541//      Add stage 3.
542//
543///////////////////////////////////////////////////////////////////////////////
544
545assign a3stg_exp_plus1[12:0]= a3stg_exp[12:0] + 13'h0001;
546
547assign a3stg_exp_minus1[12:0]= a3stg_exp[12:0] - 13'h0001;
548
549assign a4stg_exp_pre1_in[12:0]= ({13{(a3stg_faddsubop && a6stg_step
550                                        && (!a3stg_inc_exp_inv))}}
551                            & a3stg_exp_plus1[12:0]);
552
553dff_s #(13) i_a4stg_exp_pre1 (
554        .din    (a4stg_exp_pre1_in[12:0]),
555        .clk    (clk),
556
557        .q      (a4stg_exp_pre1[12:0]),
558
559        .se     (se),
560        .si     (),
561        .so     ()
562);
563
564assign a4stg_exp_pre3_in[12:0]= ({13{(a3stg_faddsubop && a6stg_step
565                                        && (!a3stg_dec_exp_inv))}}
566                            & a3stg_exp_minus1[12:0]);
567
568dff_s #(13) i_a4stg_exp_pre3 (
569        .din    (a4stg_exp_pre3_in[12:0]),
570        .clk    (clk),
571
572        .q      (a4stg_exp_pre3[12:0]),
573
574        .se     (se),
575        .si     (),
576        .so     ()
577);
578
579assign a4stg_exp_pre2_in[12:0]= ({13{((!a3stg_fdtos_inv) && a6stg_step)}}
580                            & a3stg_exp[12:0])
581                | ({13{((!a4stg_fixtos_fxtod_inv) && a6stg_step)}}
582                            & a4stg_expshl[12:0])
583                | ({13{(!a6stg_step)}}
584                            & a4stg_exp[12:0]);
585
586dff_s #(13) i_a4stg_exp_pre2 (
587        .din    (a4stg_exp_pre2_in[12:0]),
588        .clk    (clk),
589
590        .q      (a4stg_exp_pre2[12:0]),
591
592        .se     (se),
593        .si     (),
594        .so     ()
595);
596
597assign a4stg_exp_pre4_in[12:0]= ({13{(a3stg_faddsubop && a6stg_step
598                                        && (!a3stg_same_exp_inv))}}
599                            & a3stg_exp[12:0]);
600
601dff_s #(13) i_a4stg_exp_pre4 (
602        .din    (a4stg_exp_pre4_in[12:0]),
603        .clk    (clk),
604
605        .q      (a4stg_exp_pre4[12:0]),
606
607        .se     (se),
608        .si     (),
609        .so     ()
610);
611
612dffe_s #(13) i_a4stg_exp2 (
613        .din    (a3stg_exp[12:0]),
614        .en     (a6stg_step),
615        .clk    (clk),
616
617        .q      (a4stg_exp2[12:0]),
618
619        .se     (se),
620        .si     (),
621        .so     ()
622);
623
624
625///////////////////////////////////////////////////////////////////////////////
626//
627//      Add pipe exponent rounding increment.
628//
629//      Add stage 4.
630//
631///////////////////////////////////////////////////////////////////////////////
632
633assign a4stg_exp[12:0]= (a4stg_exp_pre1[12:0]
634                | a4stg_exp_pre2[12:0]
635                | a4stg_exp_pre3[12:0]
636                | a4stg_exp_pre4[12:0]);
637
638assign a4stg_exp_11_0[11:0] = a4stg_exp[11:0];
639
640assign a4stg_expinc[12:0]= a4stg_exp[12:0] + 13'h0001;
641
642
643///////////////////////////////////////////////////////////////////////////////
644//
645//      Add pipe exponent adjustment for post normalization left shift.
646//
647//      Add stage 4.
648//
649///////////////////////////////////////////////////////////////////////////////
650
651assign a4stg_expadd_in2[12:0]= (~{7'b0, a4stg_shl_cnt[5:0]});
652
653assign a4stg_expadd[12:0]= (a4stg_exp2[12:0]
654                        + a4stg_expadd_in2[12:0]
655                        + 13'h0001);
656
657
658///////////////////////////////////////////////////////////////////////////////
659//
660//      Add pipe exponent output.
661//
662//      Add stage 4.
663//
664///////////////////////////////////////////////////////////////////////////////
665
666assign a4stg_expshl[12:0]= (a4stg_expadd[12:0] & {13{a4stg_denorm_inv}});
667
668assign add_exp_out_in1[10:0]= (~(({11{add_exp_out_exp1}}
669                            & a4stg_exp[10:0])
670                | ({11{a4stg_in_of}}
671                            & {{3{a4stg_dblop}}, 7'h7f, a4stg_to_0_inv})
672                | ({11{add_exp_out_expadd}}
673                            & a4stg_expshl[10:0])));
674
675dffe_s #(11) i_add_exp_out1 (
676        .din    (add_exp_out_in1[10:0]),
677        .en     (a6stg_step),
678        .clk    (clk),
679
680        .q      (add_exp_out1[10:0]),
681
682        .se     (se),
683        .si     (),
684        .so     ()
685);
686
687assign add_exp_out_in2[10:0]= (~({11{(add_exp_out_expinc
688                                        && a4stg_rndadd_cout)}}
689                            & a4stg_expinc[10:0]));
690
691dffe_s #(11) i_add_exp_out2 (
692        .din    (add_exp_out_in2[10:0]),
693        .en     (a6stg_step),
694        .clk    (clk),
695
696        .q      (add_exp_out2[10:0]),
697
698        .se     (se),
699        .si     (),
700        .so     ()
701);
702
703assign add_exp_out_in3[10:0]= (~({11{add_exp_out_exp}}
704                            & a4stg_exp[10:0]));
705
706dffe_s #(11) i_add_exp_out3 (
707        .din    (add_exp_out_in3[10:0]),
708        .en     (a6stg_step),
709        .clk    (clk),
710
711        .q      (add_exp_out3[10:0]),
712
713        .se     (se),
714        .si     (),
715        .so     ()
716);
717
718dffe_s #(11) i_add_exp_out4 (
719        .din    ({11{a4stg_rndadd_cout}}),
720        .en     (a6stg_step),
721        .clk    (clk),
722
723        .q      (add_exp_out4[10:0]),
724
725        .se     (se),
726        .si     (),
727        .so     ()
728);
729
730assign add_exp_out[10:0]= (~(add_exp_out1[10:0]
731                & add_exp_out2[10:0]
732                & (add_exp_out3[10:0] | add_exp_out4[10:0])));
733
734
735endmodule
736
737
Note: See TracBrowser for help on using the repository browser.