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


//This module converts double-extended precision value 
//into 64-bit double precision value 
 
 
 
module Convert80To64(ConvertOut, ConvertIn); 
 
input [79:0] ConvertIn; 
output [63: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[10:0], ConvertIn[62:15],4'b0 } ; 
 
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'd15360; 
	cla16_In2 = OP_OUT; 
	cIn16_In  = 1'b0; 
end 
endmodule