sudp_rf.v 10.6 KB
/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1994, Silicon Graphics, Inc.               *
 *                                                                        *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright  law.  They  may not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *                                                                        *
 *************************************************************************/

// $Id: sudp_rf.v,v 1.1.1.1 2002/05/17 06:14:58 blythe Exp $

////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:      sudp_rf
// description: Register file for scalar unit, std cell version.
//
// designer:    Phil Gossett
// date:        4/9/95
//
////////////////////////////////////////////////////////////////////////

module sudp_rf (clk, d, a, b, wen, w, ra, rb);

input clk;
input [31:0] d;
output [31:0] a;
output [31:0] b;
input wen;
input [4:0] w;
input [4:0] ra;
input [4:0] rb;

wire [31:0] bufd;

lanfnh lat0  (.en(clk), .d(d[0]),  .q(bufd[0]));
lanfnh lat1  (.en(clk), .d(d[1]),  .q(bufd[1]));
lanfnh lat2  (.en(clk), .d(d[2]),  .q(bufd[2]));
lanfnh lat3  (.en(clk), .d(d[3]),  .q(bufd[3]));
lanfnh lat4  (.en(clk), .d(d[4]),  .q(bufd[4]));
lanfnh lat5  (.en(clk), .d(d[5]),  .q(bufd[5]));
lanfnh lat6  (.en(clk), .d(d[6]),  .q(bufd[6]));
lanfnh lat7  (.en(clk), .d(d[7]),  .q(bufd[7]));
lanfnh lat8  (.en(clk), .d(d[8]),  .q(bufd[8]));
lanfnh lat9  (.en(clk), .d(d[9]),  .q(bufd[9]));
lanfnh lat10 (.en(clk), .d(d[10]), .q(bufd[10]));
lanfnh lat11 (.en(clk), .d(d[11]), .q(bufd[11]));
lanfnh lat12 (.en(clk), .d(d[12]), .q(bufd[12]));
lanfnh lat13 (.en(clk), .d(d[13]), .q(bufd[13]));
lanfnh lat14 (.en(clk), .d(d[14]), .q(bufd[14]));
lanfnh lat15 (.en(clk), .d(d[15]), .q(bufd[15]));
lanfnh lat16 (.en(clk), .d(d[16]), .q(bufd[16]));
lanfnh lat17 (.en(clk), .d(d[17]), .q(bufd[17]));
lanfnh lat18 (.en(clk), .d(d[18]), .q(bufd[18]));
lanfnh lat19 (.en(clk), .d(d[19]), .q(bufd[19]));
lanfnh lat20 (.en(clk), .d(d[20]), .q(bufd[20]));
lanfnh lat21 (.en(clk), .d(d[21]), .q(bufd[21]));
lanfnh lat22 (.en(clk), .d(d[22]), .q(bufd[22]));
lanfnh lat23 (.en(clk), .d(d[23]), .q(bufd[23]));
lanfnh lat24 (.en(clk), .d(d[24]), .q(bufd[24]));
lanfnh lat25 (.en(clk), .d(d[25]), .q(bufd[25]));
lanfnh lat26 (.en(clk), .d(d[26]), .q(bufd[26]));
lanfnh lat27 (.en(clk), .d(d[27]), .q(bufd[27]));
lanfnh lat28 (.en(clk), .d(d[28]), .q(bufd[28]));
lanfnh lat29 (.en(clk), .d(d[29]), .q(bufd[29]));
lanfnh lat30 (.en(clk), .d(d[30]), .q(bufd[30]));
lanfnh lat31 (.en(clk), .d(d[31]), .q(bufd[31]));

wire [31:0] bufb;

ni01d5 nib0  (.i(bufd[0]),  .z(bufb[0]));
ni01d5 nib1  (.i(bufd[1]),  .z(bufb[1]));
ni01d5 nib2  (.i(bufd[2]),  .z(bufb[2]));
ni01d5 nib3  (.i(bufd[3]),  .z(bufb[3]));
ni01d5 nib4  (.i(bufd[4]),  .z(bufb[4]));
ni01d5 nib5  (.i(bufd[5]),  .z(bufb[5]));
ni01d5 nib6  (.i(bufd[6]),  .z(bufb[6]));
ni01d5 nib7  (.i(bufd[7]),  .z(bufb[7]));
ni01d5 nib8  (.i(bufd[8]),  .z(bufb[8]));
ni01d5 nib9  (.i(bufd[9]),  .z(bufb[9]));
ni01d5 nib10 (.i(bufd[10]), .z(bufb[10]));
ni01d5 nib11 (.i(bufd[11]), .z(bufb[11]));
ni01d5 nib12 (.i(bufd[12]), .z(bufb[12]));
ni01d5 nib13 (.i(bufd[13]), .z(bufb[13]));
ni01d5 nib14 (.i(bufd[14]), .z(bufb[14]));
ni01d5 nib15 (.i(bufd[15]), .z(bufb[15]));
ni01d5 nib16 (.i(bufd[16]), .z(bufb[16]));
ni01d5 nib17 (.i(bufd[17]), .z(bufb[17]));
ni01d5 nib18 (.i(bufd[18]), .z(bufb[18]));
ni01d5 nib19 (.i(bufd[19]), .z(bufb[19]));
ni01d5 nib20 (.i(bufd[20]), .z(bufb[20]));
ni01d5 nib21 (.i(bufd[21]), .z(bufb[21]));
ni01d5 nib22 (.i(bufd[22]), .z(bufb[22]));
ni01d5 nib23 (.i(bufd[23]), .z(bufb[23]));
ni01d5 nib24 (.i(bufd[24]), .z(bufb[24]));
ni01d5 nib25 (.i(bufd[25]), .z(bufb[25]));
ni01d5 nib26 (.i(bufd[26]), .z(bufb[26]));
ni01d5 nib27 (.i(bufd[27]), .z(bufb[27]));
ni01d5 nib28 (.i(bufd[28]), .z(bufb[28]));
ni01d5 nib29 (.i(bufd[29]), .z(bufb[29]));
ni01d5 nib30 (.i(bufd[30]), .z(bufb[30]));
ni01d5 nib31 (.i(bufd[31]), .z(bufb[31]));

wire [1:0] ppgn;
wire [7:0] pgn;
wire [31:0] gn;
wire [1:0] wb;

ni01d5 nigb0  (.i(w[0]),  .z(wb[0]));
ni01d5 nigb1  (.i(w[1]),  .z(wb[1]));
fn01d2 deppgn0 (.a1(w[4]), .b1(wen), .zn(ppgn[0]));
nd02d2 deppgn1 (.a1(w[4]), .a2(wen), .zn(ppgn[1]));
de24d2 depgn0 (.en(ppgn[0]), .a1(w[3]), .a0(w[2]),
		.z0n(pgn[0]), .z1n(pgn[1]), .z2n(pgn[2]), .z3n(pgn[3]));
de24d2 depgn1 (.en(ppgn[1]), .a1(w[3]), .a0(w[2]),
		.z0n(pgn[4]), .z1n(pgn[5]), .z2n(pgn[6]), .z3n(pgn[7]));
de24d2 degn0 (.en(pgn[0]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[0]),  .z1n(gn[1]),  .z2n(gn[2]),  .z3n(gn[3]));
de24d2 degn1 (.en(pgn[1]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[4]),  .z1n(gn[5]),  .z2n(gn[6]),  .z3n(gn[7]));
de24d2 degn2 (.en(pgn[2]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[8]),  .z1n(gn[9]),  .z2n(gn[10]), .z3n(gn[11]));
de24d2 degn3 (.en(pgn[3]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[12]), .z1n(gn[13]), .z2n(gn[14]), .z3n(gn[15]));
de24d2 degn4 (.en(pgn[4]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[16]), .z1n(gn[17]), .z2n(gn[18]), .z3n(gn[19]));
de24d2 degn5 (.en(pgn[5]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[20]), .z1n(gn[21]), .z2n(gn[22]), .z3n(gn[23]));
de24d2 degn6 (.en(pgn[6]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[24]), .z1n(gn[25]), .z2n(gn[26]), .z3n(gn[27]));
de24d2 degn7 (.en(pgn[7]), .a1(wb[1]), .a0(wb[0]),
		.z0n(gn[28]), .z1n(gn[29]), .z2n(gn[30]), .z3n(gn[31]));

wire [31:0] m0b;
wire [31:0] m1b;
wire [31:0] m2b;
wire [31:0] m3b;
wire [31:0] m4b;
wire [31:0] m5b;
wire [31:0] m6b;
wire [31:0] m7b;
wire [31:0] m8b;
wire [31:0] m9b;
wire [31:0] m10b;
wire [31:0] m11b;
wire [31:0] m12b;
wire [31:0] m13b;
wire [31:0] m14b;
wire [31:0] m15b;
wire [31:0] m16b;
wire [31:0] m17b;
wire [31:0] m18b;
wire [31:0] m19b;
wire [31:0] m20b;
wire [31:0] m21b;
wire [31:0] m22b;
wire [31:0] m23b;
wire [31:0] m24b;
wire [31:0] m25b;
wire [31:0] m26b;
wire [31:0] m27b;
wire [31:0] m28b;
wire [31:0] m29b;
wire [31:0] m30b;
wire [31:0] m31b;

//sudp_latg mem0  (.clk(clk), .gn(gn[0]),  .i(bufb[31:0]), .z(m0b[31:0]));
assign m0b[31:0] = 32'h0; 
sudp_latg mem1  (.clk(clk), .gn(gn[1]),  .i(bufb[31:0]), .z(m1b[31:0]));
sudp_latg mem2  (.clk(clk), .gn(gn[2]),  .i(bufb[31:0]), .z(m2b[31:0]));
sudp_latg mem3  (.clk(clk), .gn(gn[3]),  .i(bufb[31:0]), .z(m3b[31:0]));
sudp_latg mem4  (.clk(clk), .gn(gn[4]),  .i(bufb[31:0]), .z(m4b[31:0]));
sudp_latg mem5  (.clk(clk), .gn(gn[5]),  .i(bufb[31:0]), .z(m5b[31:0]));
sudp_latg mem6  (.clk(clk), .gn(gn[6]),  .i(bufb[31:0]), .z(m6b[31:0]));
sudp_latg mem7  (.clk(clk), .gn(gn[7]),  .i(bufb[31:0]), .z(m7b[31:0]));
sudp_latg mem8  (.clk(clk), .gn(gn[8]),  .i(bufb[31:0]), .z(m8b[31:0]));
sudp_latg mem9  (.clk(clk), .gn(gn[9]),  .i(bufb[31:0]), .z(m9b[31:0]));
sudp_latg mem10 (.clk(clk), .gn(gn[10]), .i(bufb[31:0]), .z(m10b[31:0]));
sudp_latg mem11 (.clk(clk), .gn(gn[11]), .i(bufb[31:0]), .z(m11b[31:0]));
sudp_latg mem12 (.clk(clk), .gn(gn[12]), .i(bufb[31:0]), .z(m12b[31:0]));
sudp_latg mem13 (.clk(clk), .gn(gn[13]), .i(bufb[31:0]), .z(m13b[31:0]));
sudp_latg mem14 (.clk(clk), .gn(gn[14]), .i(bufb[31:0]), .z(m14b[31:0]));
sudp_latg mem15 (.clk(clk), .gn(gn[15]), .i(bufb[31:0]), .z(m15b[31:0]));
sudp_latg mem16 (.clk(clk), .gn(gn[16]), .i(bufb[31:0]), .z(m16b[31:0]));
sudp_latg mem17 (.clk(clk), .gn(gn[17]), .i(bufb[31:0]), .z(m17b[31:0]));
sudp_latg mem18 (.clk(clk), .gn(gn[18]), .i(bufb[31:0]), .z(m18b[31:0]));
sudp_latg mem19 (.clk(clk), .gn(gn[19]), .i(bufb[31:0]), .z(m19b[31:0]));
sudp_latg mem20 (.clk(clk), .gn(gn[20]), .i(bufb[31:0]), .z(m20b[31:0]));
sudp_latg mem21 (.clk(clk), .gn(gn[21]), .i(bufb[31:0]), .z(m21b[31:0]));
sudp_latg mem22 (.clk(clk), .gn(gn[22]), .i(bufb[31:0]), .z(m22b[31:0]));
sudp_latg mem23 (.clk(clk), .gn(gn[23]), .i(bufb[31:0]), .z(m23b[31:0]));
sudp_latg mem24 (.clk(clk), .gn(gn[24]), .i(bufb[31:0]), .z(m24b[31:0]));
sudp_latg mem25 (.clk(clk), .gn(gn[25]), .i(bufb[31:0]), .z(m25b[31:0]));
sudp_latg mem26 (.clk(clk), .gn(gn[26]), .i(bufb[31:0]), .z(m26b[31:0]));
sudp_latg mem27 (.clk(clk), .gn(gn[27]), .i(bufb[31:0]), .z(m27b[31:0]));
sudp_latg mem28 (.clk(clk), .gn(gn[28]), .i(bufb[31:0]), .z(m28b[31:0]));
sudp_latg mem29 (.clk(clk), .gn(gn[29]), .i(bufb[31:0]), .z(m29b[31:0]));
sudp_latg mem30 (.clk(clk), .gn(gn[30]), .i(bufb[31:0]), .z(m30b[31:0]));
sudp_latg mem31 (.clk(clk), .gn(gn[31]), .i(bufb[31:0]), .z(m31b[31:0]));

wire [4:0] rab;
wire [4:0] rbb;
wire [31:0] ppa0b;
wire [31:0] ppa1b;
wire [31:0] ppa2b;
wire [31:0] ppa3b;
wire [31:0] pa0b;
wire [31:0] pa1b;
wire [31:0] ppb0b;
wire [31:0] ppb1b;
wire [31:0] ppb2b;
wire [31:0] ppb3b;
wire [31:0] pb0b;
wire [31:0] pb1b;

ni01d5 nirab0 (.i(ra[0]),  .z(rab[0]));
ni01d5 nirab1 (.i(ra[1]),  .z(rab[1]));
ni01d5 nirab2 (.i(ra[2]),  .z(rab[2]));
ni01d5 nirab3 (.i(ra[3]),  .z(rab[3]));
ni01d5 nirab4 (.i(ra[4]),  .z(rab[4]));
ni01d5 nirbb0 (.i(rb[0]),  .z(rbb[0]));
ni01d5 nirbb1 (.i(rb[1]),  .z(rbb[1]));
ni01d5 nirbb2 (.i(rb[2]),  .z(rbb[2]));
ni01d5 nirbb3 (.i(rb[3]),  .z(rbb[3]));
ni01d5 nirbb4 (.i(rb[4]),  .z(rbb[4]));
sudp_mx81 mxppa0 (.s(rab[2:0]),
		.i0(m0b),  .i1(m1b),  .i2(m2b),  .i3(m3b),
		.i4(m4b),  .i5(m5b),  .i6(m6b),  .i7(m7b),  .z(ppa0b));
sudp_mx81 mxppa1 (.s(rab[2:0]),
		.i0(m8b),  .i1(m9b),  .i2(m10b), .i3(m11b),
		.i4(m12b), .i5(m13b), .i6(m14b), .i7(m15b), .z(ppa1b));
sudp_mx81 mxppa2 (.s(rab[2:0]),
		.i0(m16b), .i1(m17b), .i2(m18b), .i3(m19b),
		.i4(m20b), .i5(m21b), .i6(m22b), .i7(m23b), .z(ppa2b));
sudp_mx81 mxppa3 (.s(rab[2:0]),
		.i0(m24b), .i1(m25b), .i2(m26b), .i3(m27b),
		.i4(m28b), .i5(m29b), .i6(m30b), .i7(m31b), .z(ppa3b));
sudp_mx21 mxpa0  (.s(rab[3]), .i0(ppa0b), .i1(ppa1b), .z(pa0b));
sudp_mx21 mxpa1  (.s(rab[3]), .i0(ppa2b), .i1(ppa3b), .z(pa1b));
sudp_mx21 mxa0   (.s(rab[4]), .i0(pa0b),  .i1(pa1b),  .z(a));
sudp_mx81 mxppb0 (.s(rbb[2:0]),
		.i0(m0b),  .i1(m1b),  .i2(m2b),  .i3(m3b),
		.i4(m4b),  .i5(m5b),  .i6(m6b),  .i7(m7b),  .z(ppb0b));
sudp_mx81 mxppb1 (.s(rbb[2:0]),
		.i0(m8b),  .i1(m9b),  .i2(m10b), .i3(m11b),
		.i4(m12b), .i5(m13b), .i6(m14b), .i7(m15b), .z(ppb1b));
sudp_mx81 mxppb2 (.s(rbb[2:0]),
		.i0(m16b), .i1(m17b), .i2(m18b), .i3(m19b),
		.i4(m20b), .i5(m21b), .i6(m22b), .i7(m23b), .z(ppb2b));
sudp_mx81 mxppb3 (.s(rbb[2:0]),
		.i0(m24b), .i1(m25b), .i2(m26b), .i3(m27b),
		.i4(m28b), .i5(m29b), .i6(m30b), .i7(m31b), .z(ppb3b));
sudp_mx21 mxpb0  (.s(rbb[3]), .i0(ppb0b), .i1(ppb1b), .z(pb0b));
sudp_mx21 mxpb1  (.s(rbb[3]), .i0(ppb2b), .i1(ppb3b), .z(pb1b));
sudp_mx21 mxb0   (.s(rbb[4]), .i0(pb0b),  .i1(pb1b),  .z(b));

endmodule // sudp_rf