www.pudn.com > SHA1.zip > adder_8.v, change:2001-02-09,size:1732b


module adder_8 (x, y, c_0, 	c_7, s); 
 
	input c_0; 
	input [7:0] x, y; 
	output c_7; 
	output [7:0] s; 
 
	wire [6:0] c; 
	wire wire_0, wire_1, wire_2, wire_3, wire_4, wire_5, wire_6, wire_7, wire_8; 
	wire wire_9, wire_10, wire_11, wire_12, wire_13, wire_14, wire_15, wire_16, wire_17; 
	wire wire_18, wire_19, wire_20, wire_21, wire_22, wire_23; 
 
	assign s[0] = c_0 ^ x[0] ^ y[0]; 
	assign wire_0 = x[0] & y[0]; 
	assign wire_1 = x[0] ^ y[0]; 
	assign wire_2 = wire_1 & c_0; 
	assign c[0] = wire_0 ^ wire_2; 
 
	assign s[1] = c[0] ^ x[1] ^ y[1]; 
	assign wire_3 = x[1] & y[1]; 
	assign wire_4 = x[1] ^ y[1]; 
	assign wire_5 = wire_4 & c[0]; 
	assign c[1] = wire_3 ^ wire_5; 
 
	assign s[2] = c[1] ^ x[2] ^ y[2]; 
	assign wire_6 = x[2] & y[2]; 
	assign wire_7 = x[2] ^ y[2]; 
	assign wire_8 = wire_7 & c[1]; 
	assign c[2] = wire_6 ^ wire_8; 
 
	assign s[3] = c[2] ^ x[3] ^ y[3]; 
	assign wire_9 = x[3] & y[3]; 
	assign wire_10 = x[3] ^ y[3]; 
	assign wire_11 = wire_10 & c[2]; 
	assign c[3] = wire_9 ^ wire_11; 
 
	assign s[4] = c[3] ^ x[4] ^ y[4]; 
	assign wire_12 = x[4] & y[4]; 
	assign wire_13 = x[4] ^ y[4]; 
	assign wire_14 = wire_13 & c[3]; 
	assign c[4] = wire_12 ^ wire_14; 
 
	assign s[5] = c[4] ^ x[5] ^ y[5]; 
	assign wire_15 = x[5] & y[5]; 
	assign wire_16 = x[5] ^ y[5]; 
	assign wire_17 = wire_16 & c[4]; 
	assign c[5] = wire_15 ^ wire_17; 
 
	assign s[6] = c[5] ^ x[6] ^ y[6]; 
	assign wire_18 = x[6] & y[6]; 
	assign wire_19 = x[6] ^ y[6]; 
	assign wire_20 = wire_19 & c[5]; 
	assign c[6] = wire_18 ^ wire_20; 
 
	assign s[7] = c[6] ^ x[7] ^ y[7]; 
	assign wire_21 = x[7] & y[7]; 
	assign wire_22 = x[7] ^ y[7]; 
	assign wire_23 = wire_22 & c[6]; 
	assign c_7 = wire_21 ^ wire_23; 
 
endmodule