at_latch32.v 1.89 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: at_latch32.v,v 1.1 2002/03/28 00:26:12 berndt Exp $

////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:      at_latch32
// description: Latches for attribute buffers.
//
// designer:    Phil Gossett
// date:        9/5/94
//
////////////////////////////////////////////////////////////////////////

module at_latch32 (clk, g, i, z);

input clk;
input [1:0] g;
input [31:0] i;

output [31:0] z;

wire [7:0] d_0, d_1, d_2, d_3;
wire [7:0] q_0, q_1, q_2, q_3;
wire e_0, e_1, e_2, e_3;
wire [1:0] gn;

assign {d_3, d_2, d_1, d_0} = i;
assign z = {q_3, q_2, q_1, q_0};

in01d2 in_0(.i(g[0]), .zn(gn[0]));
in01d2 in_1(.i(g[1]), .zn(gn[1]));

nr02d2 nr_0(.a1(clk), .a2(gn[0]), .zn(e_0));
nr02d2 nr_1(.a1(clk), .a2(gn[0]), .zn(e_1));
nr02d2 nr_2(.a1(clk), .a2(gn[1]), .zn(e_2));
nr02d2 nr_3(.a1(clk), .a2(gn[1]), .zn(e_3));

at_latch_h #(8) l_0(.e(e_0), .d(d_0), .q(q_0));
at_latch_h #(8) l_1(.e(e_1), .d(d_1), .q(q_1));
at_latch_h #(8) l_2(.e(e_2), .d(d_2), .q(q_2));
at_latch_h #(8) l_3(.e(e_3), .d(d_3), .q(q_3));

endmodule // at_latch32