Line 341... |
Line 341... |
vtdl #(1) dso6(.clk(clk), .ce(ce), .a(4'd5), .d(so4), .q(so));
|
vtdl #(1) dso6(.clk(clk), .ce(ce), .a(4'd5), .d(so4), .q(so));
|
vtdl #(.WID(EMSB+1)) dxo6(.clk(clk), .ce(ce), .a(4'd1), .d(xo8), .q(xo));
|
vtdl #(.WID(EMSB+1)) dxo6(.clk(clk), .ce(ce), .a(4'd1), .d(xo8), .q(xo));
|
|
|
always @(posedge clk)
|
always @(posedge clk)
|
if (ce)
|
if (ce)
|
casez({xinf9,anbInf9,aNan9,bNan9})
|
casez({anbInf9,aNan9,bNan9,xinf9})
|
4'b1???: mo <= 1'd0; // exponent hit infinity -> force mantissa to zero
|
4'b1???: mo <= {1'b0,op9,{FMSB-1{1'b0}},op9,{FMSB{1'b0}}}; // inf +/- inf - generate QNaN on subtract, inf on add
|
4'b01??: mo <= {1'b0,op9,{FMSB-1{1'b0}},op9,{FMSB{1'b0}}}; // inf +/- inf - generate QNaN on subtract, inf on add
|
4'b01??: mo <= {1'b0,fracta9[FMSB+1:0],{FMSB{1'b0}}};
|
4'b001?: mo <= {1'b0,fracta9[FMSB+1:0],{FMSB{1'b0}}};
|
4'b001?: mo <= {1'b0,fractb9[FMSB+1:0],{FMSB{1'b0}}};
|
4'b0001: mo <= {1'b0,fractb9[FMSB+1:0],{FMSB{1'b0}}};
|
4'b0001: mo <= 1'd0; // exponent hit infinity -> force mantissa to zero
|
default: mo <= {mab9,{FMSB-1{1'b0}}}; // mab has an extra lead bit and two trailing bits
|
default: mo <= {mab9,{FMSB-1{1'b0}}}; // mab has an extra lead bit and two trailing bits
|
endcase
|
endcase
|
|
|
endmodule
|
endmodule
|
|
|