/******************************************************************************/
/* */
/* 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. */
/* */
/******************************************************************************/
// @(#)roundingmodelogic.v 1.1 4/7/92
//
module RoundModeLogic
(Phi,
OprRoundMode,
LoadOprs,
notAbortWB,
CMPDecoded, CMPEDecoded,
RomSetRModeMinus,
RModeMinus,
U_RoundingMode);
input Phi
;
input [1:0] OprRoundMode
;
input LoadOprs
,
notAbortWB
,
CMPDecoded
, CMPEDecoded
,
RomSetRModeMinus
;
output RModeMinus
;
output [1:0] U_RoundingMode
;
/* *************************************** */
/* Rounding Mode Latch */
/* *************************************** */
/* In addition to being the rounding mode this latch is also used in
the compares to signal between the two different types Invalid/Vailid
on unordered. This is TACKY but saves a lot of code
Additional inputs CMPE and CMP distinguish between the two types
It isnt a big problem because RMode is part of the instruction not
ME_ROM and so no timing problems will occur */
wire [1:0] notModifiedRMode
, notRoundingMode
, RoundingMode
;
ME_INVA cmpbits (CMPDecoded, notCMPDecoded
);
ME_AND2 rmcmp1 (OprRoundMode[1], notCMPDecoded, CMPRMode1
);
ME_AND2_B fgf (RomSetRModeMinus, notAbortWB, RModeFromMinus
);
ME_NOR3 rmcmpe1 (CMPRMode1, CMPEDecoded, RModeFromMinus, notModifiedRMode[1]);
ME_NOR3 rmcmpe0 (OprRoundMode[0], CMPEDecoded, RModeFromMinus, notModifiedRMode[0]);
/* RoundingMode is latched from status register at the begining of
a new instruction. It is transient therefore. */
ME_OR2_B fgfo (RModeFromMinus, LoadOprs, RMLatchEnable
);
ME_NMUX2B rm0m (RMLatchEnable, notRoundingMode[0], notModifiedRMode[0], U_RoundingMode[0]);
ME_FD1 rm0f (Phi, U_RoundingMode[0], RoundingMode[0], notRoundingMode[0]);
ME_NMUX2B rm1m (RMLatchEnable, notRoundingMode[1], notModifiedRMode[1], U_RoundingMode[1]);
ME_FD1 rm1f (Phi, U_RoundingMode[1], RoundingMode[1], notRoundingMode[1]);
ME_AND2 rmc (RoundingMode[0], RoundingMode[1], RModeMinus);
endmodule
This page: |
Created: | Thu Aug 19 12:03:30 1999 |
| From: |
../../../sparc_v8/ssparc/fpu/fp_ctl/rtl/roundingmodelogic.v
|