/******************************************************************************/
/* */
/* 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. */
/* */
/******************************************************************************/
// @(#)store_aligner.v 1.2 11/12/92
// Store aligner, Input data comes from alu/constant(ldst's)/fpu.
// Output goes to the D$/Writebuffer
// Includes IU data, FPU data, and LDSTB data.
module store_aligner
(
iu_dout, // Final Output bus
wb_dout, // Final Output bus
little_endian,
iu_store_data,
fp_dout_e, // FP output 64b
select_FP_DOUT, // Select FP output
sel_ldstb_1, // Select ldst output
select_IU_DOUT // Select IU output
);
output [63:0] iu_dout
;
output [63:0] wb_dout
;
input little_endian
;
input [31:0] iu_store_data
;
input [63:0] fp_dout_e
;
input select_FP_DOUT
; // used to select FP data for stores
input sel_ldstb_1
;
input select_IU_DOUT
; // used to select IU data for stores
// All 1's for ldst's
wire [31:0] all1s
= 32'hffffffff;
// Select for DOUT_even, 32bits
// CMUX3D(dout_select_even, 32, DOUT_even,
// iu_store_data, select_IU_DOUT, all1s, sel_ldstb_1,
// fp_dout_e[63:32], select_FP_DOUT)
// Select for DOUT_even, 32bits
wire [31:0] DOUT_even
=
(select_IU_DOUT) ? iu_store_data[31:0] : (
(select_FP_DOUT) ? fp_dout_e[63:32] : (
(sel_ldstb_1) ? all1s[31:0] : (
'bx )));
// Select for DOUT_odd, 32bits
// CMUX3D(dout_select_odd, 32, DOUT_odd,
// iu_store_data, select_IU_DOUT, all1s, sel_ldstb_1,
// fp_dout_e[31:0], select_FP_DOUT)
wire [31:0] DOUT_odd
=
(select_IU_DOUT) ? iu_store_data[31:0] : (
(select_FP_DOUT) ? fp_dout_e[31:0] : (
(sel_ldstb_1) ? all1s[31:0] : (
'bx )));
function [63:0] swapit;
input swap;
input [63:0] din;
begin
if (swap)
swapit = {din[7:0],din[15:8],din[23:16],din[31:24],
din[39:32],din[47:40],din[55:48],din[63:56]};
else
swapit = din;
end
endfunction
wire [63:0] iu_dout = swapit(little_endian, {DOUT_even,DOUT_odd});
wire [63:0] wb_dout = {DOUT_even,DOUT_odd};
endmodule
This page: |
Created: | Thu Aug 19 12:03:36 1999 |
| From: |
../../../sparc_v8/ssparc/cc/rl_dc_cntl/rtl/store_aligner.v
|