[6] | 1 | // ========== Copyright Header Begin ========================================== |
---|
| 2 | // |
---|
| 3 | // OpenSPARC T1 Processor File: fpu_denorm_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_denorm_3b results to one set of results. |
---|
| 24 | // |
---|
| 25 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 26 | |
---|
| 27 | module fpu_denorm_3to1 ( |
---|
| 28 | din2_din1_nz_hi, |
---|
| 29 | din2_din1_denorm_hi, |
---|
| 30 | din2_din1_nz_mid, |
---|
| 31 | din2_din1_denorm_mid, |
---|
| 32 | din2_din1_nz_lo, |
---|
| 33 | din2_din1_denorm_lo, |
---|
| 34 | |
---|
| 35 | din2_din1_nz, |
---|
| 36 | din2_din1_denorm |
---|
| 37 | ); |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | input din2_din1_nz_hi; // input 1 and input 2 != 0- high 3 bits |
---|
| 41 | input din2_din1_denorm_hi; // input 1 == denorm- high 3 bits |
---|
| 42 | input din2_din1_nz_mid; // input 1 and input 2 != 0- mid 3 bits |
---|
| 43 | input din2_din1_denorm_mid; // input 1 == denorm- mid 3 bits |
---|
| 44 | input din2_din1_nz_lo; // input 1 and input 2 != 0- low 3 bits |
---|
| 45 | input din2_din1_denorm_lo; // input 1 == denorm- low 3 bits |
---|
| 46 | |
---|
| 47 | output din2_din1_nz; // input 1 and input 2 != 0 |
---|
| 48 | output din2_din1_denorm; // input 1 == denorm |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | wire din2_din1_nz; |
---|
| 52 | wire din2_din1_denorm; |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | assign din2_din1_nz= din2_din1_nz_hi || din2_din1_nz_mid |
---|
| 56 | || din2_din1_nz_lo; |
---|
| 57 | |
---|
| 58 | assign din2_din1_denorm= (din2_din1_nz_hi && din2_din1_denorm_hi) |
---|
| 59 | || ((!din2_din1_nz_hi) && din2_din1_nz_mid |
---|
| 60 | && din2_din1_denorm_mid) |
---|
| 61 | || ((!din2_din1_nz_hi) && (!din2_din1_nz_mid) |
---|
| 62 | && din2_din1_denorm_lo); |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | endmodule |
---|
| 66 | |
---|
| 67 | |
---|