/******************************************************************************/
/* */
/* Copyright (c) 1999 Sun Microsystems, Inc. All rights reserved. */
/* */
/* The contents of this file are subject to the current version of the Sun */
/* Community Source License, microSPARCII ("the License"). You may not use */
/* this file except in compliance with the License. You may obtain a copy */
/* of the License by searching for "Sun Community Source License" on the */
/* World Wide Web at http://www.sun.com. See the License for the rights, */
/* obligations, and limitations governing use of the contents of this file. */
/* */
/* Sun Microsystems, Inc. has intellectual property rights relating to the */
/* technology embodied in these files. In particular, and without limitation, */
/* these intellectual property rights may include one or more U.S. patents, */
/* foreign patents, or pending applications. */
/* */
/* Sun, Sun Microsystems, the Sun logo, all Sun-based trademarks and logos, */
/* Solaris, Java and all Java-based trademarks and logos are trademarks or */
/* registered trademarks of Sun Microsystems, Inc. in the United States and */
/* other countries. microSPARC is a trademark or registered trademark of */
/* SPARC International, Inc. All SPARC trademarks are used under license and */
/* are trademarks or registered trademarks of SPARC International, Inc. in */
/* the United States and other countries. Products bearing SPARC trademarks */
/* are based upon an architecture developed by Sun Microsystems, Inc. */
/* */
/******************************************************************************/
/***************************************************************************
****************************************************************************
***
*** Program File: @(#)select.v
***
****************************************************************************
****************************************************************************/
// @(#)select.v 1.1 4/9/92
//
// **************************************************************
// select -- logic to select correct mantissa based on the signs.
// **************************************************************
module select (
frac_ovf,
select,
sign_0d,
sign_1d,
sign_0s,
sign_1s,
c54_n,
c54_v,
c54,
double_precision
);
output frac_ovf
; // fraction overflow (mantissa >= 2.0)
output [1:0] select
;
input sign_0d
, sign_1d
;
input sign_0s
, sign_1s
;
input c54_n
, c54_v
, c54
;
input double_precision
;
// product_overflow is overflow before rounding
wire product_overflow
= (double_precision) ? (sign_0d | (sign_1d & c54)) :
(sign_0s | (sign_1s & c54)) ;
wire [1:0] select ;
// select[1] is overflow after rounding
assign select[1] = (double_precision) ? (sign_0d | (sign_1d & c54_n)) :
(sign_0s | (sign_1s & c54_n)) ;
assign select[0] = (~select[1] & c54_n) | (select[1] & c54_v) ;
assign frac_ovf = product_overflow | select[1] ;
endmodule
| This page: |
Created: | Thu Aug 19 12:02:32 1999 |
| From: |
../../../sparc_v8/ssparc/fpu/fp_fpm/rtl/select.v
|