OpenCores
URL https://opencores.org/ocsvn/sparc64soc/sparc64soc/trunk

Subversion Repositories sparc64soc

[/] [sparc64soc/] [trunk/] [T1-CPU/] [exu/] [sparc_exu_aluzcmp64.v] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dmitryr
// ========== Copyright Header Begin ==========================================
2
// 
3
// OpenSPARC T1 Processor File: sparc_exu_aluzcmp64.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
//
24
//  Module Name: sparc_exu_aluzcmp64
25
//      Description: This block determines if the input 'source' is zero.
26
//              It provides to outputs.  zero64 is high if all 64 bits
27
//              are zero, while zero32 is high if the lower 32 bits are
28
//              zero.  It uses 2 32 bit or gates and then NORs them.
29
*/
30
 
31
module sparc_exu_aluzcmp64
32
  (
33
   in,
34
   zero64,
35
   zero32
36
   );
37
 
38
   input [63:0] in;         // input operand
39
 
40
   output zero64;               // true if input is zero
41
   output zero32;               // true if lower 32 bits are zero
42
 
43
   wire   low_nonzero;                                  // low 32 is nonzero
44
   wire   high_nonzero;         // high 32 is nonzero
45
 
46
   // evaluate each half of the input
47
   sparc_exu_aluor32 lowcmp(.in(in[31:0]), .out(low_nonzero));
48
   sparc_exu_aluor32 highcmp(.in(in[63:32]), .out(high_nonzero));
49
 
50
   assign zero32 = ~low_nonzero;
51
   assign zero64 = ~(low_nonzero | high_nonzero);
52
 
53
endmodule // sparc_exu_aluzcmp64
54
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.