Line 148... |
Line 148... |
|
|
wire [9:0] v_shr;
|
wire [9:0] v_shr;
|
wire [9:0] v_shl;
|
wire [9:0] v_shl;
|
|
|
assign v_shr = (s_exp_10b[9] | !(|s_exp_10b)) ?
|
assign v_shr = (s_exp_10b[9] | !(|s_exp_10b)) ?
|
(10'd1 - s_exp_10b) - s_qutdn : 0;
|
(10'd1 - s_exp_10b) - {9'd0,s_qutdn} : 0;
|
|
|
assign v_shl = (s_exp_10b[9] | !(|s_exp_10b)) ?
|
assign v_shl = (s_exp_10b[9] | !(|s_exp_10b)) ?
|
0 :
|
0 :
|
s_exp_10b[8] ?
|
s_exp_10b[8] ?
|
0 : {9'd0,s_qutdn};
|
0 : {9'd0,s_qutdn};
|
Line 181... |
Line 181... |
|
|
assign s_expo2 = s_fraco1[26] ? s_expo1 : s_expo1 - 9'd1;
|
assign s_expo2 = s_fraco1[26] ? s_expo1 : s_expo1 - 9'd1;
|
|
|
//s_r_zeros <= count_r_zeros(s_qutnt_i);
|
//s_r_zeros <= count_r_zeros(s_qutnt_i);
|
always @(s_qutnt_i)
|
always @(s_qutnt_i)
|
casex(s_qutnt_i) // synopsys full_case parallel_case
|
casez(s_qutnt_i) // synopsys full_case parallel_case
|
27'b??????????????????????????1: s_r_zeros <= 0;
|
27'b??????????????????????????1: s_r_zeros = 0;
|
27'b?????????????????????????10: s_r_zeros <= 1;
|
27'b?????????????????????????10: s_r_zeros = 1;
|
27'b????????????????????????100: s_r_zeros <= 2;
|
27'b????????????????????????100: s_r_zeros = 2;
|
27'b???????????????????????1000: s_r_zeros <= 3;
|
27'b???????????????????????1000: s_r_zeros = 3;
|
27'b??????????????????????10000: s_r_zeros <= 4;
|
27'b??????????????????????10000: s_r_zeros = 4;
|
27'b?????????????????????100000: s_r_zeros <= 5;
|
27'b?????????????????????100000: s_r_zeros = 5;
|
27'b????????????????????1000000: s_r_zeros <= 6;
|
27'b????????????????????1000000: s_r_zeros = 6;
|
27'b???????????????????10000000: s_r_zeros <= 7;
|
27'b???????????????????10000000: s_r_zeros = 7;
|
27'b??????????????????100000000: s_r_zeros <= 8;
|
27'b??????????????????100000000: s_r_zeros = 8;
|
27'b?????????????????1000000000: s_r_zeros <= 9;
|
27'b?????????????????1000000000: s_r_zeros = 9;
|
27'b????????????????10000000000: s_r_zeros <= 10;
|
27'b????????????????10000000000: s_r_zeros = 10;
|
27'b???????????????100000000000: s_r_zeros <= 11;
|
27'b???????????????100000000000: s_r_zeros = 11;
|
27'b??????????????1000000000000: s_r_zeros <= 12;
|
27'b??????????????1000000000000: s_r_zeros = 12;
|
27'b?????????????10000000000000: s_r_zeros <= 13;
|
27'b?????????????10000000000000: s_r_zeros = 13;
|
27'b????????????100000000000000: s_r_zeros <= 14;
|
27'b????????????100000000000000: s_r_zeros = 14;
|
27'b???????????1000000000000000: s_r_zeros <= 15;
|
27'b???????????1000000000000000: s_r_zeros = 15;
|
27'b??????????10000000000000000: s_r_zeros <= 16;
|
27'b??????????10000000000000000: s_r_zeros = 16;
|
27'b?????????100000000000000000: s_r_zeros <= 17;
|
27'b?????????100000000000000000: s_r_zeros = 17;
|
27'b????????1000000000000000000: s_r_zeros <= 18;
|
27'b????????1000000000000000000: s_r_zeros = 18;
|
27'b???????10000000000000000000: s_r_zeros <= 19;
|
27'b???????10000000000000000000: s_r_zeros = 19;
|
27'b??????100000000000000000000: s_r_zeros <= 20;
|
27'b??????100000000000000000000: s_r_zeros = 20;
|
27'b?????1000000000000000000000: s_r_zeros <= 21;
|
27'b?????1000000000000000000000: s_r_zeros = 21;
|
27'b????10000000000000000000000: s_r_zeros <= 22;
|
27'b????10000000000000000000000: s_r_zeros = 22;
|
27'b???100000000000000000000000: s_r_zeros <= 23;
|
27'b???100000000000000000000000: s_r_zeros = 23;
|
27'b??1000000000000000000000000: s_r_zeros <= 24;
|
27'b??1000000000000000000000000: s_r_zeros = 24;
|
27'b?10000000000000000000000000: s_r_zeros <= 25;
|
27'b?10000000000000000000000000: s_r_zeros = 25;
|
27'b100000000000000000000000000: s_r_zeros <= 26;
|
27'b100000000000000000000000000: s_r_zeros = 26;
|
27'b000000000000000000000000000: s_r_zeros <= 27;
|
27'b000000000000000000000000000: s_r_zeros = 27;
|
endcase // casex (s_qutnt_i)
|
endcase // casex (s_qutnt_i)
|
|
|
assign s_lost = (s_shr1+{5'd0,s_shr2}) > s_r_zeros;
|
assign s_lost = (s_shr1+{5'd0,s_shr2}) > s_r_zeros;
|
|
|
// ***Stage 3***
|
// ***Stage 3***
|