www.pudn.com > x86.rar > Convert80To32.v, change:2007-12-05,size:670b


//  This module converts Double-Extended precision value 
//  into 32-bit Single Precision value 
 
 
module Convert80To32(ConvertOut, ConvertIn); 
 
input [79:0] ConvertIn; 
output [31:0] ConvertOut; 
 
wire [15:0] cla16_Out,OP_OUT; 
wire [16:1] cout; 
 
reg  [15:0]  cla16_In1,cla16_In2,OP_IN; 
reg          cIn16_In; 
 
assign ConvertOut = { ConvertIn[79], cla16_Out[7:0], ConvertIn[62:40] } ; 
 
twosComp16 TC16(OP_OUT, OP_IN); 
cla16Bit cla16Ins( cla16_Out, cout , cla16_In1, cla16_In2, cIn16_In); 
 
always @(ConvertIn or OP_OUT) 
begin 
	cla16_In1 = { 1'd0, ConvertIn[78:64]}; 
	OP_IN     = 16'd16256; 
	cla16_In2 = OP_OUT; 
	cIn16_In  = 1'b0; 
end 
 
endmodule