[6] | 1 | // ========== Copyright Header Begin ========================================== |
---|
| 2 | // |
---|
| 3 | // OpenSPARC T1 Processor File: sparc_exu_alu_16eql.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 | // Module Name: sparc_exu_alu_16eql |
---|
| 24 | // Description: Takes a 17 bit input and generates an active low output |
---|
| 25 | // signifying that all 17 bits have the same value. |
---|
| 26 | */ |
---|
| 27 | module sparc_exu_alu_16eql (/*AUTOARG*/ |
---|
| 28 | // Outputs |
---|
| 29 | equal, |
---|
| 30 | // Inputs |
---|
| 31 | in |
---|
| 32 | ) ; |
---|
| 33 | input [16:0] in; |
---|
| 34 | |
---|
| 35 | output equal; |
---|
| 36 | |
---|
| 37 | wire [15:0] inxor; |
---|
| 38 | wire [7:0] nor1; |
---|
| 39 | wire [1:0] nand2; |
---|
| 40 | |
---|
| 41 | assign inxor[0] = in[15] ^ in[14]; |
---|
| 42 | assign inxor[1] = in[14] ^ in[13]; |
---|
| 43 | assign inxor[2] = in[13] ^ in[12]; |
---|
| 44 | assign inxor[3] = in[12] ^ in[11]; |
---|
| 45 | assign inxor[4] = in[11] ^ in[10]; |
---|
| 46 | assign inxor[5] = in[10] ^ in[9]; |
---|
| 47 | assign inxor[6] = in[9] ^ in[8]; |
---|
| 48 | assign inxor[7] = in[8] ^ in[7]; |
---|
| 49 | assign inxor[8] = in[7] ^ in[6]; |
---|
| 50 | assign inxor[9] = in[6] ^ in[5]; |
---|
| 51 | assign inxor[10] = in[5] ^ in[4]; |
---|
| 52 | assign inxor[11] = in[4] ^ in[3]; |
---|
| 53 | assign inxor[12] = in[3] ^ in[2]; |
---|
| 54 | assign inxor[13] = in[2] ^ in[1]; |
---|
| 55 | assign inxor[14] = in[1] ^ in[0]; |
---|
| 56 | assign inxor[15] = in[16] ^ in[15]; |
---|
| 57 | |
---|
| 58 | assign nor1[0] = ~(inxor[15] | inxor[14]); |
---|
| 59 | assign nor1[1] = ~(inxor[1] | inxor[0]); |
---|
| 60 | assign nor1[2] = ~(inxor[3] | inxor[2]); |
---|
| 61 | assign nor1[3] = ~(inxor[5] | inxor[4]); |
---|
| 62 | assign nor1[4] = ~(inxor[7] | inxor[6]); |
---|
| 63 | assign nor1[5] = ~(inxor[9] | inxor[8]); |
---|
| 64 | assign nor1[6] = ~(inxor[11] | inxor[10]); |
---|
| 65 | assign nor1[7] = ~(inxor[13] | inxor[12]); |
---|
| 66 | |
---|
| 67 | assign nand2[0] = ~(nor1[1] & nor1[2] & nor1[3] & nor1[4]); |
---|
| 68 | assign nand2[1] = ~(nor1[5] & nor1[6] & nor1[7] & nor1[0]); |
---|
| 69 | |
---|
| 70 | assign equal = ~(nand2[1] | nand2[0]); |
---|
| 71 | |
---|
| 72 | endmodule // sparc_exu_div_32eql |
---|