HierarchyFilesModulesSignalsTasksFunctionsHelp

/******************************************************************************/ 
/*                                                                            */ 
/* 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:  @(#)icceval.v
***
****************************************************************************
****************************************************************************/
//------------------------------------------------------------------------------

[Up: Mdecode icceval][Up: Mdecode icceval_fold]
module Micceval(bicc_taken,
	d_cond, ccm, alu_cc_next, load_cc,
	eopc_hidiv3, det_divovf, ccN_noninv, ccZ_noninv
	);

/*
 * For SUNERGY Puma: d_cond used to be condm, but was changed since
 * we need to decide if a branch is taken in the D cycle of the branch.
 * condm is in the E-cycle.
 */

output	bicc_taken;		// Integer CC's + COND evaluate TRUE in D
input [3:0] d_cond;		// master latched COND field of BICC in D
input [3:0] ccm;		// master latched condition codes
input [3:0] alu_cc_next;	// CC's direct from ALU
input load_cc;			// control to select ALU's CC.
input eopc_hidiv3;		// hidiv 3 in E
input det_divovf;		// ovf detected in IDIV
input ccN_noninv;		// non-inverted ccN (alu_cc_next[3]) from Mexec
input ccZ_noninv;		// non-inverted ccZ (alu_cc_next[2]) from Mexec

	wire [1:0] alu_cc_lo;

	assign alu_cc_lo[1] =
		  alu_cc_next[1] & ~eopc_hidiv3
		| eopc_hidiv3 & det_divovf;

	assign alu_cc_lo[0] =
		  alu_cc_next[0] & ~eopc_hidiv3;

// note that the control logic receives alu_cc_next[3:2] inverted.
//  we must reinvert here. ======> this is old note
// 9-15-96 : to speed up path, bring in non-inverted signals from Mexec.
// wire alu_cc_next_act3 = ~alu_cc_next[3];
// wire alu_cc_next_act2 = ~alu_cc_next[2]; 

	wire Nm =
		// synopsys translate_off
		(load_cc===1'bx) ? 'bx :
		// synopsys translate_on
		load_cc ? ccN_noninv : ccm[3];
	wire Zm =
		// synopsys translate_off
		(load_cc===1'bx) ? 'bx :
		// synopsys translate_on
		load_cc ? ccZ_noninv : ccm[2];
	wire Vm =
		// synopsys translate_off
		(load_cc===1'bx) ? 'bx :
		// synopsys translate_on
		load_cc ? alu_cc_lo[1] : ccm[1];
	wire Cm =
		// synopsys translate_off
		(load_cc===1'bx) ? 'bx :
		// synopsys translate_on
		load_cc ? alu_cc_lo[0] : ccm[0];

	reg bicc_taken;

	always @ (d_cond or Nm or Zm or Vm or Cm) begin
		
		case (d_cond[2:0])	/* synopsys parallel_case */

			3'b000:	// BN
				bicc_taken = 0;

			3'b001:	// BE
				bicc_taken = Zm;

			3'b010:	// BLE
				bicc_taken = Zm | (Nm ^ Vm);

			3'b011: // BL
				bicc_taken =  Nm ^ Vm;

			3'b100:	// BLEU
				bicc_taken = Cm | Zm;

			3'b101:	// BCS, GEU
				bicc_taken =  Cm;

			3'b110:	// BNEG
				bicc_taken =  Nm;

			3'b111:	// BVS
				bicc_taken = Vm;

/* synopsys translate_off */
			default:
				bicc_taken = 'bx;
/* synopsys translate_on */
		endcase

		if(d_cond[3])
			bicc_taken = ~bicc_taken;
	end

endmodule
HierarchyFilesModulesSignalsTasksFunctionsHelp

This page: Created:Thu Aug 19 12:00:10 1999
From: ../../../sparc_v8/ssparc/iu/Mdecode/rtl/icceval.v

Verilog converted to html by v2html 5.0 (written by Costas Calamvokis).Help