URL
https://opencores.org/ocsvn/double_fpu/double_fpu/trunk
Subversion Repositories double_fpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 9 to Rev 10
- ↔ Reverse comparison
Rev 9 → Rev 10
/branches/avendor/fpu_div.v
72,7 → 72,7
wire [10:0] expon_b = opb[62:52]; |
wire a_is_norm = |expon_a; |
wire b_is_norm = |expon_b; |
wire a_is_zero = !(opa[62:0]); |
wire a_is_zero = !(|opa[62:0]); |
wire [11:0] exponent_a = { 1'b0, expon_a}; |
wire [11:0] exponent_b = { 1'b0, expon_b}; |
reg [51:0] dividend_a; |
92,7 → 92,6
reg remainder_msb; |
reg count_nonzero_reg; |
reg count_nonzero_reg_2; |
wire count_preset = (count_index == preset); |
reg [11:0] expon_term; |
reg expon_uf_1; |
reg [11:0] expon_uf_term_1; |
296,117 → 295,117
|
always @(dividend_a) |
casex(dividend_a) |
52'b1???????????????????????????????????????????????????: dividend_shift = 0; |
52'b01??????????????????????????????????????????????????: dividend_shift = 1; |
52'b001?????????????????????????????????????????????????: dividend_shift = 2; |
52'b0001????????????????????????????????????????????????: dividend_shift = 3; |
52'b00001???????????????????????????????????????????????: dividend_shift = 4; |
52'b000001??????????????????????????????????????????????: dividend_shift = 5; |
52'b0000001?????????????????????????????????????????????: dividend_shift = 6; |
52'b00000001????????????????????????????????????????????: dividend_shift = 7; |
52'b000000001???????????????????????????????????????????: dividend_shift = 8; |
52'b0000000001??????????????????????????????????????????: dividend_shift = 9; |
52'b00000000001?????????????????????????????????????????: dividend_shift = 10; |
52'b000000000001????????????????????????????????????????: dividend_shift = 11; |
52'b0000000000001???????????????????????????????????????: dividend_shift = 12; |
52'b00000000000001??????????????????????????????????????: dividend_shift = 13; |
52'b000000000000001?????????????????????????????????????: dividend_shift = 14; |
52'b0000000000000001????????????????????????????????????: dividend_shift = 15; |
52'b00000000000000001???????????????????????????????????: dividend_shift = 16; |
52'b000000000000000001??????????????????????????????????: dividend_shift = 17; |
52'b0000000000000000001?????????????????????????????????: dividend_shift = 18; |
52'b00000000000000000001????????????????????????????????: dividend_shift = 19; |
52'b000000000000000000001???????????????????????????????: dividend_shift = 20; |
52'b0000000000000000000001??????????????????????????????: dividend_shift = 21; |
52'b00000000000000000000001?????????????????????????????: dividend_shift = 22; |
52'b000000000000000000000001????????????????????????????: dividend_shift = 23; |
52'b0000000000000000000000001???????????????????????????: dividend_shift = 24; |
52'b00000000000000000000000001??????????????????????????: dividend_shift = 25; |
52'b000000000000000000000000001?????????????????????????: dividend_shift = 26; |
52'b0000000000000000000000000001????????????????????????: dividend_shift = 27; |
52'b00000000000000000000000000001???????????????????????: dividend_shift = 28; |
52'b000000000000000000000000000001??????????????????????: dividend_shift = 29; |
52'b0000000000000000000000000000001?????????????????????: dividend_shift = 30; |
52'b00000000000000000000000000000001????????????????????: dividend_shift = 31; |
52'b000000000000000000000000000000001???????????????????: dividend_shift = 32; |
52'b0000000000000000000000000000000001??????????????????: dividend_shift = 33; |
52'b00000000000000000000000000000000001?????????????????: dividend_shift = 34; |
52'b000000000000000000000000000000000001????????????????: dividend_shift = 35; |
52'b0000000000000000000000000000000000001???????????????: dividend_shift = 36; |
52'b00000000000000000000000000000000000001??????????????: dividend_shift = 37; |
52'b000000000000000000000000000000000000001?????????????: dividend_shift = 38; |
52'b0000000000000000000000000000000000000001????????????: dividend_shift = 39; |
52'b00000000000000000000000000000000000000001???????????: dividend_shift = 40; |
52'b000000000000000000000000000000000000000001??????????: dividend_shift = 41; |
52'b0000000000000000000000000000000000000000001?????????: dividend_shift = 42; |
52'b00000000000000000000000000000000000000000001????????: dividend_shift = 43; |
52'b000000000000000000000000000000000000000000001???????: dividend_shift = 44; |
52'b0000000000000000000000000000000000000000000001??????: dividend_shift = 45; |
52'b00000000000000000000000000000000000000000000001?????: dividend_shift = 46; |
52'b000000000000000000000000000000000000000000000001????: dividend_shift = 47; |
52'b0000000000000000000000000000000000000000000000001???: dividend_shift = 48; |
52'b00000000000000000000000000000000000000000000000001??: dividend_shift = 49; |
52'b000000000000000000000000000000000000000000000000001?: dividend_shift = 50; |
52'b0000000000000000000000000000000000000000000000000001: dividend_shift = 51; |
52'b0000000000000000000000000000000000000000000000000000: dividend_shift = 52; |
52'b1???????????????????????????????????????????????????: dividend_shift <= 0; |
52'b01??????????????????????????????????????????????????: dividend_shift <= 1; |
52'b001?????????????????????????????????????????????????: dividend_shift <= 2; |
52'b0001????????????????????????????????????????????????: dividend_shift <= 3; |
52'b00001???????????????????????????????????????????????: dividend_shift <= 4; |
52'b000001??????????????????????????????????????????????: dividend_shift <= 5; |
52'b0000001?????????????????????????????????????????????: dividend_shift <= 6; |
52'b00000001????????????????????????????????????????????: dividend_shift <= 7; |
52'b000000001???????????????????????????????????????????: dividend_shift <= 8; |
52'b0000000001??????????????????????????????????????????: dividend_shift <= 9; |
52'b00000000001?????????????????????????????????????????: dividend_shift <= 10; |
52'b000000000001????????????????????????????????????????: dividend_shift <= 11; |
52'b0000000000001???????????????????????????????????????: dividend_shift <= 12; |
52'b00000000000001??????????????????????????????????????: dividend_shift <= 13; |
52'b000000000000001?????????????????????????????????????: dividend_shift <= 14; |
52'b0000000000000001????????????????????????????????????: dividend_shift <= 15; |
52'b00000000000000001???????????????????????????????????: dividend_shift <= 16; |
52'b000000000000000001??????????????????????????????????: dividend_shift <= 17; |
52'b0000000000000000001?????????????????????????????????: dividend_shift <= 18; |
52'b00000000000000000001????????????????????????????????: dividend_shift <= 19; |
52'b000000000000000000001???????????????????????????????: dividend_shift <= 20; |
52'b0000000000000000000001??????????????????????????????: dividend_shift <= 21; |
52'b00000000000000000000001?????????????????????????????: dividend_shift <= 22; |
52'b000000000000000000000001????????????????????????????: dividend_shift <= 23; |
52'b0000000000000000000000001???????????????????????????: dividend_shift <= 24; |
52'b00000000000000000000000001??????????????????????????: dividend_shift <= 25; |
52'b000000000000000000000000001?????????????????????????: dividend_shift <= 26; |
52'b0000000000000000000000000001????????????????????????: dividend_shift <= 27; |
52'b00000000000000000000000000001???????????????????????: dividend_shift <= 28; |
52'b000000000000000000000000000001??????????????????????: dividend_shift <= 29; |
52'b0000000000000000000000000000001?????????????????????: dividend_shift <= 30; |
52'b00000000000000000000000000000001????????????????????: dividend_shift <= 31; |
52'b000000000000000000000000000000001???????????????????: dividend_shift <= 32; |
52'b0000000000000000000000000000000001??????????????????: dividend_shift <= 33; |
52'b00000000000000000000000000000000001?????????????????: dividend_shift <= 34; |
52'b000000000000000000000000000000000001????????????????: dividend_shift <= 35; |
52'b0000000000000000000000000000000000001???????????????: dividend_shift <= 36; |
52'b00000000000000000000000000000000000001??????????????: dividend_shift <= 37; |
52'b000000000000000000000000000000000000001?????????????: dividend_shift <= 38; |
52'b0000000000000000000000000000000000000001????????????: dividend_shift <= 39; |
52'b00000000000000000000000000000000000000001???????????: dividend_shift <= 40; |
52'b000000000000000000000000000000000000000001??????????: dividend_shift <= 41; |
52'b0000000000000000000000000000000000000000001?????????: dividend_shift <= 42; |
52'b00000000000000000000000000000000000000000001????????: dividend_shift <= 43; |
52'b000000000000000000000000000000000000000000001???????: dividend_shift <= 44; |
52'b0000000000000000000000000000000000000000000001??????: dividend_shift <= 45; |
52'b00000000000000000000000000000000000000000000001?????: dividend_shift <= 46; |
52'b000000000000000000000000000000000000000000000001????: dividend_shift <= 47; |
52'b0000000000000000000000000000000000000000000000001???: dividend_shift <= 48; |
52'b00000000000000000000000000000000000000000000000001??: dividend_shift <= 49; |
52'b000000000000000000000000000000000000000000000000001?: dividend_shift <= 50; |
52'b0000000000000000000000000000000000000000000000000001: dividend_shift <= 51; |
52'b0000000000000000000000000000000000000000000000000000: dividend_shift <= 52; |
|
endcase |
|
always @(divisor_b) |
casex(divisor_b) |
52'b1???????????????????????????????????????????????????: divisor_shift = 0; |
52'b01??????????????????????????????????????????????????: divisor_shift = 1; |
52'b001?????????????????????????????????????????????????: divisor_shift = 2; |
52'b0001????????????????????????????????????????????????: divisor_shift = 3; |
52'b00001???????????????????????????????????????????????: divisor_shift = 4; |
52'b000001??????????????????????????????????????????????: divisor_shift = 5; |
52'b0000001?????????????????????????????????????????????: divisor_shift = 6; |
52'b00000001????????????????????????????????????????????: divisor_shift = 7; |
52'b000000001???????????????????????????????????????????: divisor_shift = 8; |
52'b0000000001??????????????????????????????????????????: divisor_shift = 9; |
52'b00000000001?????????????????????????????????????????: divisor_shift = 10; |
52'b000000000001????????????????????????????????????????: divisor_shift = 11; |
52'b0000000000001???????????????????????????????????????: divisor_shift = 12; |
52'b00000000000001??????????????????????????????????????: divisor_shift = 13; |
52'b000000000000001?????????????????????????????????????: divisor_shift = 14; |
52'b0000000000000001????????????????????????????????????: divisor_shift = 15; |
52'b00000000000000001???????????????????????????????????: divisor_shift = 16; |
52'b000000000000000001??????????????????????????????????: divisor_shift = 17; |
52'b0000000000000000001?????????????????????????????????: divisor_shift = 18; |
52'b00000000000000000001????????????????????????????????: divisor_shift = 19; |
52'b000000000000000000001???????????????????????????????: divisor_shift = 20; |
52'b0000000000000000000001??????????????????????????????: divisor_shift = 21; |
52'b00000000000000000000001?????????????????????????????: divisor_shift = 22; |
52'b000000000000000000000001????????????????????????????: divisor_shift = 23; |
52'b0000000000000000000000001???????????????????????????: divisor_shift = 24; |
52'b00000000000000000000000001??????????????????????????: divisor_shift = 25; |
52'b000000000000000000000000001?????????????????????????: divisor_shift = 26; |
52'b0000000000000000000000000001????????????????????????: divisor_shift = 27; |
52'b00000000000000000000000000001???????????????????????: divisor_shift = 28; |
52'b000000000000000000000000000001??????????????????????: divisor_shift = 29; |
52'b0000000000000000000000000000001?????????????????????: divisor_shift = 30; |
52'b00000000000000000000000000000001????????????????????: divisor_shift = 31; |
52'b000000000000000000000000000000001???????????????????: divisor_shift = 32; |
52'b0000000000000000000000000000000001??????????????????: divisor_shift = 33; |
52'b00000000000000000000000000000000001?????????????????: divisor_shift = 34; |
52'b000000000000000000000000000000000001????????????????: divisor_shift = 35; |
52'b0000000000000000000000000000000000001???????????????: divisor_shift = 36; |
52'b00000000000000000000000000000000000001??????????????: divisor_shift = 37; |
52'b000000000000000000000000000000000000001?????????????: divisor_shift = 38; |
52'b0000000000000000000000000000000000000001????????????: divisor_shift = 39; |
52'b00000000000000000000000000000000000000001???????????: divisor_shift = 40; |
52'b000000000000000000000000000000000000000001??????????: divisor_shift = 41; |
52'b0000000000000000000000000000000000000000001?????????: divisor_shift = 42; |
52'b00000000000000000000000000000000000000000001????????: divisor_shift = 43; |
52'b000000000000000000000000000000000000000000001???????: divisor_shift = 44; |
52'b0000000000000000000000000000000000000000000001??????: divisor_shift = 45; |
52'b00000000000000000000000000000000000000000000001?????: divisor_shift = 46; |
52'b000000000000000000000000000000000000000000000001????: divisor_shift = 47; |
52'b0000000000000000000000000000000000000000000000001???: divisor_shift = 48; |
52'b00000000000000000000000000000000000000000000000001??: divisor_shift = 49; |
52'b000000000000000000000000000000000000000000000000001?: divisor_shift = 50; |
52'b0000000000000000000000000000000000000000000000000001: divisor_shift = 51; |
52'b0000000000000000000000000000000000000000000000000000: divisor_shift = 52; |
52'b1???????????????????????????????????????????????????: divisor_shift <= 0; |
52'b01??????????????????????????????????????????????????: divisor_shift <= 1; |
52'b001?????????????????????????????????????????????????: divisor_shift <= 2; |
52'b0001????????????????????????????????????????????????: divisor_shift <= 3; |
52'b00001???????????????????????????????????????????????: divisor_shift <= 4; |
52'b000001??????????????????????????????????????????????: divisor_shift <= 5; |
52'b0000001?????????????????????????????????????????????: divisor_shift <= 6; |
52'b00000001????????????????????????????????????????????: divisor_shift <= 7; |
52'b000000001???????????????????????????????????????????: divisor_shift <= 8; |
52'b0000000001??????????????????????????????????????????: divisor_shift <= 9; |
52'b00000000001?????????????????????????????????????????: divisor_shift <= 10; |
52'b000000000001????????????????????????????????????????: divisor_shift <= 11; |
52'b0000000000001???????????????????????????????????????: divisor_shift <= 12; |
52'b00000000000001??????????????????????????????????????: divisor_shift <= 13; |
52'b000000000000001?????????????????????????????????????: divisor_shift <= 14; |
52'b0000000000000001????????????????????????????????????: divisor_shift <= 15; |
52'b00000000000000001???????????????????????????????????: divisor_shift <= 16; |
52'b000000000000000001??????????????????????????????????: divisor_shift <= 17; |
52'b0000000000000000001?????????????????????????????????: divisor_shift <= 18; |
52'b00000000000000000001????????????????????????????????: divisor_shift <= 19; |
52'b000000000000000000001???????????????????????????????: divisor_shift <= 20; |
52'b0000000000000000000001??????????????????????????????: divisor_shift <= 21; |
52'b00000000000000000000001?????????????????????????????: divisor_shift <= 22; |
52'b000000000000000000000001????????????????????????????: divisor_shift <= 23; |
52'b0000000000000000000000001???????????????????????????: divisor_shift <= 24; |
52'b00000000000000000000000001??????????????????????????: divisor_shift <= 25; |
52'b000000000000000000000000001?????????????????????????: divisor_shift <= 26; |
52'b0000000000000000000000000001????????????????????????: divisor_shift <= 27; |
52'b00000000000000000000000000001???????????????????????: divisor_shift <= 28; |
52'b000000000000000000000000000001??????????????????????: divisor_shift <= 29; |
52'b0000000000000000000000000000001?????????????????????: divisor_shift <= 30; |
52'b00000000000000000000000000000001????????????????????: divisor_shift <= 31; |
52'b000000000000000000000000000000001???????????????????: divisor_shift <= 32; |
52'b0000000000000000000000000000000001??????????????????: divisor_shift <= 33; |
52'b00000000000000000000000000000000001?????????????????: divisor_shift <= 34; |
52'b000000000000000000000000000000000001????????????????: divisor_shift <= 35; |
52'b0000000000000000000000000000000000001???????????????: divisor_shift <= 36; |
52'b00000000000000000000000000000000000001??????????????: divisor_shift <= 37; |
52'b000000000000000000000000000000000000001?????????????: divisor_shift <= 38; |
52'b0000000000000000000000000000000000000001????????????: divisor_shift <= 39; |
52'b00000000000000000000000000000000000000001???????????: divisor_shift <= 40; |
52'b000000000000000000000000000000000000000001??????????: divisor_shift <= 41; |
52'b0000000000000000000000000000000000000000001?????????: divisor_shift <= 42; |
52'b00000000000000000000000000000000000000000001????????: divisor_shift <= 43; |
52'b000000000000000000000000000000000000000000001???????: divisor_shift <= 44; |
52'b0000000000000000000000000000000000000000000001??????: divisor_shift <= 45; |
52'b00000000000000000000000000000000000000000000001?????: divisor_shift <= 46; |
52'b000000000000000000000000000000000000000000000001????: divisor_shift <= 47; |
52'b0000000000000000000000000000000000000000000000001???: divisor_shift <= 48; |
52'b00000000000000000000000000000000000000000000000001??: divisor_shift <= 49; |
52'b000000000000000000000000000000000000000000000000001?: divisor_shift <= 50; |
52'b0000000000000000000000000000000000000000000000000001: divisor_shift <= 51; |
52'b0000000000000000000000000000000000000000000000000000: divisor_shift <= 52; |
|
endcase |
|
/branches/avendor/fpu_sub.v
157,62 → 157,62
|
always @(diff) |
casex(diff) |
55'b1??????????????????????????????????????????????????????: diff_shift = 0; |
55'b01?????????????????????????????????????????????????????: diff_shift = 1; |
55'b001????????????????????????????????????????????????????: diff_shift = 2; |
55'b0001???????????????????????????????????????????????????: diff_shift = 3; |
55'b00001??????????????????????????????????????????????????: diff_shift = 4; |
55'b000001?????????????????????????????????????????????????: diff_shift = 5; |
55'b0000001????????????????????????????????????????????????: diff_shift = 6; |
55'b00000001???????????????????????????????????????????????: diff_shift = 7; |
55'b000000001??????????????????????????????????????????????: diff_shift = 8; |
55'b0000000001?????????????????????????????????????????????: diff_shift = 9; |
55'b00000000001????????????????????????????????????????????: diff_shift = 10; |
55'b000000000001???????????????????????????????????????????: diff_shift = 11; |
55'b0000000000001??????????????????????????????????????????: diff_shift = 12; |
55'b00000000000001?????????????????????????????????????????: diff_shift = 13; |
55'b000000000000001????????????????????????????????????????: diff_shift = 14; |
55'b0000000000000001???????????????????????????????????????: diff_shift = 15; |
55'b00000000000000001??????????????????????????????????????: diff_shift = 16; |
55'b000000000000000001?????????????????????????????????????: diff_shift = 17; |
55'b0000000000000000001????????????????????????????????????: diff_shift = 18; |
55'b00000000000000000001???????????????????????????????????: diff_shift = 19; |
55'b000000000000000000001??????????????????????????????????: diff_shift = 20; |
55'b0000000000000000000001?????????????????????????????????: diff_shift = 21; |
55'b00000000000000000000001????????????????????????????????: diff_shift = 22; |
55'b000000000000000000000001???????????????????????????????: diff_shift = 23; |
55'b0000000000000000000000001??????????????????????????????: diff_shift = 24; |
55'b00000000000000000000000001?????????????????????????????: diff_shift = 25; |
55'b000000000000000000000000001????????????????????????????: diff_shift = 26; |
55'b0000000000000000000000000001???????????????????????????: diff_shift = 27; |
55'b00000000000000000000000000001??????????????????????????: diff_shift = 28; |
55'b000000000000000000000000000001?????????????????????????: diff_shift = 29; |
55'b0000000000000000000000000000001????????????????????????: diff_shift = 30; |
55'b00000000000000000000000000000001???????????????????????: diff_shift = 31; |
55'b000000000000000000000000000000001??????????????????????: diff_shift = 32; |
55'b0000000000000000000000000000000001?????????????????????: diff_shift = 33; |
55'b00000000000000000000000000000000001????????????????????: diff_shift = 34; |
55'b000000000000000000000000000000000001???????????????????: diff_shift = 35; |
55'b0000000000000000000000000000000000001??????????????????: diff_shift = 36; |
55'b00000000000000000000000000000000000001?????????????????: diff_shift = 37; |
55'b000000000000000000000000000000000000001????????????????: diff_shift = 38; |
55'b0000000000000000000000000000000000000001???????????????: diff_shift = 39; |
55'b00000000000000000000000000000000000000001??????????????: diff_shift = 40; |
55'b000000000000000000000000000000000000000001?????????????: diff_shift = 41; |
55'b0000000000000000000000000000000000000000001????????????: diff_shift = 42; |
55'b00000000000000000000000000000000000000000001???????????: diff_shift = 43; |
55'b000000000000000000000000000000000000000000001??????????: diff_shift = 44; |
55'b0000000000000000000000000000000000000000000001?????????: diff_shift = 45; |
55'b00000000000000000000000000000000000000000000001????????: diff_shift = 46; |
55'b000000000000000000000000000000000000000000000001???????: diff_shift = 47; |
55'b0000000000000000000000000000000000000000000000001??????: diff_shift = 48; |
55'b00000000000000000000000000000000000000000000000001?????: diff_shift = 49; |
55'b000000000000000000000000000000000000000000000000001????: diff_shift = 50; |
55'b0000000000000000000000000000000000000000000000000001???: diff_shift = 51; |
55'b00000000000000000000000000000000000000000000000000001??: diff_shift = 52; |
55'b000000000000000000000000000000000000000000000000000001?: diff_shift = 53; |
55'b0000000000000000000000000000000000000000000000000000001: diff_shift = 54; |
55'b0000000000000000000000000000000000000000000000000000000: diff_shift = 55; |
55'b1??????????????????????????????????????????????????????: diff_shift <= 0; |
55'b01?????????????????????????????????????????????????????: diff_shift <= 1; |
55'b001????????????????????????????????????????????????????: diff_shift <= 2; |
55'b0001???????????????????????????????????????????????????: diff_shift <= 3; |
55'b00001??????????????????????????????????????????????????: diff_shift <= 4; |
55'b000001?????????????????????????????????????????????????: diff_shift <= 5; |
55'b0000001????????????????????????????????????????????????: diff_shift <= 6; |
55'b00000001???????????????????????????????????????????????: diff_shift <= 7; |
55'b000000001??????????????????????????????????????????????: diff_shift <= 8; |
55'b0000000001?????????????????????????????????????????????: diff_shift <= 9; |
55'b00000000001????????????????????????????????????????????: diff_shift <= 10; |
55'b000000000001???????????????????????????????????????????: diff_shift <= 11; |
55'b0000000000001??????????????????????????????????????????: diff_shift <= 12; |
55'b00000000000001?????????????????????????????????????????: diff_shift <= 13; |
55'b000000000000001????????????????????????????????????????: diff_shift <= 14; |
55'b0000000000000001???????????????????????????????????????: diff_shift <= 15; |
55'b00000000000000001??????????????????????????????????????: diff_shift <= 16; |
55'b000000000000000001?????????????????????????????????????: diff_shift <= 17; |
55'b0000000000000000001????????????????????????????????????: diff_shift <= 18; |
55'b00000000000000000001???????????????????????????????????: diff_shift <= 19; |
55'b000000000000000000001??????????????????????????????????: diff_shift <= 20; |
55'b0000000000000000000001?????????????????????????????????: diff_shift <= 21; |
55'b00000000000000000000001????????????????????????????????: diff_shift <= 22; |
55'b000000000000000000000001???????????????????????????????: diff_shift <= 23; |
55'b0000000000000000000000001??????????????????????????????: diff_shift <= 24; |
55'b00000000000000000000000001?????????????????????????????: diff_shift <= 25; |
55'b000000000000000000000000001????????????????????????????: diff_shift <= 26; |
55'b0000000000000000000000000001???????????????????????????: diff_shift <= 27; |
55'b00000000000000000000000000001??????????????????????????: diff_shift <= 28; |
55'b000000000000000000000000000001?????????????????????????: diff_shift <= 29; |
55'b0000000000000000000000000000001????????????????????????: diff_shift <= 30; |
55'b00000000000000000000000000000001???????????????????????: diff_shift <= 31; |
55'b000000000000000000000000000000001??????????????????????: diff_shift <= 32; |
55'b0000000000000000000000000000000001?????????????????????: diff_shift <= 33; |
55'b00000000000000000000000000000000001????????????????????: diff_shift <= 34; |
55'b000000000000000000000000000000000001???????????????????: diff_shift <= 35; |
55'b0000000000000000000000000000000000001??????????????????: diff_shift <= 36; |
55'b00000000000000000000000000000000000001?????????????????: diff_shift <= 37; |
55'b000000000000000000000000000000000000001????????????????: diff_shift <= 38; |
55'b0000000000000000000000000000000000000001???????????????: diff_shift <= 39; |
55'b00000000000000000000000000000000000000001??????????????: diff_shift <= 40; |
55'b000000000000000000000000000000000000000001?????????????: diff_shift <= 41; |
55'b0000000000000000000000000000000000000000001????????????: diff_shift <= 42; |
55'b00000000000000000000000000000000000000000001???????????: diff_shift <= 43; |
55'b000000000000000000000000000000000000000000001??????????: diff_shift <= 44; |
55'b0000000000000000000000000000000000000000000001?????????: diff_shift <= 45; |
55'b00000000000000000000000000000000000000000000001????????: diff_shift <= 46; |
55'b000000000000000000000000000000000000000000000001???????: diff_shift <= 47; |
55'b0000000000000000000000000000000000000000000000001??????: diff_shift <= 48; |
55'b00000000000000000000000000000000000000000000000001?????: diff_shift <= 49; |
55'b000000000000000000000000000000000000000000000000001????: diff_shift <= 50; |
55'b0000000000000000000000000000000000000000000000000001???: diff_shift <= 51; |
55'b00000000000000000000000000000000000000000000000000001??: diff_shift <= 52; |
55'b000000000000000000000000000000000000000000000000000001?: diff_shift <= 53; |
55'b0000000000000000000000000000000000000000000000000000001: diff_shift <= 54; |
55'b0000000000000000000000000000000000000000000000000000000: diff_shift <= 55; |
endcase |
|
|
/branches/avendor/fpu_mul.v
96,7 → 96,7
reg [105:0] product_4; |
reg [105:0] product_5; |
reg [105:0] product_6; |
reg product_lsb; |
reg product_lsb; // if there are any 1's in the remainder |
wire [55:0] product_7 = { 1'b0, product_6[105:52], product_lsb }; |
reg [11:0] exponent_5; |
|
162,8 → 162,8
exponent_b <= opb[62:52]; |
a_is_norm <= |exponent_a; |
b_is_norm <= |exponent_b; |
a_is_zero <= !(opa[62:0]); |
b_is_zero <= !(opb[62:0]); |
a_is_zero <= !(|opa[62:0]); |
b_is_zero <= !(|opb[62:0]); |
in_zero <= a_is_zero | b_is_zero; |
exponent_terms <= exponent_a + exponent_b + !a_is_norm + !b_is_norm; |
exponent_gt_expoffset <= exponent_terms > 1021; |
205,67 → 205,69
product_6 <= exponent_et_zero ? product_5 >> 1 : product_5; |
product_lsb <= |product_6[51:0]; |
exponent_5 <= in_zero ? 12'b0 : exponent_4; |
product_shift_2 <= product_shift; |
product_shift_2 <= product_shift; // redundant register |
// reduces fanout on product_shift |
end |
end |
|
always @(product) |
casex(product) |
106'b1?????????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 0; |
106'b01????????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 1; |
106'b001???????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 2; |
106'b0001??????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 3; |
106'b00001?????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 4; |
106'b000001????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 5; |
106'b0000001???????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 6; |
106'b00000001??????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 7; |
106'b000000001?????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 8; |
106'b0000000001????????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 9; |
106'b00000000001???????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 10; |
106'b000000000001??????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 11; |
106'b0000000000001?????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 12; |
106'b00000000000001????????????????????????????????????????????????????????????????????????????????????????????: product_shift = 13; |
106'b000000000000001???????????????????????????????????????????????????????????????????????????????????????????: product_shift = 14; |
106'b0000000000000001??????????????????????????????????????????????????????????????????????????????????????????: product_shift = 15; |
106'b00000000000000001?????????????????????????????????????????????????????????????????????????????????????????: product_shift = 16; |
106'b000000000000000001????????????????????????????????????????????????????????????????????????????????????????: product_shift = 17; |
106'b0000000000000000001???????????????????????????????????????????????????????????????????????????????????????: product_shift = 18; |
106'b00000000000000000001??????????????????????????????????????????????????????????????????????????????????????: product_shift = 19; |
106'b000000000000000000001?????????????????????????????????????????????????????????????????????????????????????: product_shift = 20; |
106'b0000000000000000000001????????????????????????????????????????????????????????????????????????????????????: product_shift = 21; |
106'b00000000000000000000001???????????????????????????????????????????????????????????????????????????????????: product_shift = 22; |
106'b000000000000000000000001??????????????????????????????????????????????????????????????????????????????????: product_shift = 23; |
106'b0000000000000000000000001?????????????????????????????????????????????????????????????????????????????????: product_shift = 24; |
106'b00000000000000000000000001????????????????????????????????????????????????????????????????????????????????: product_shift = 25; |
106'b000000000000000000000000001???????????????????????????????????????????????????????????????????????????????: product_shift = 26; |
106'b0000000000000000000000000001??????????????????????????????????????????????????????????????????????????????: product_shift = 27; |
106'b00000000000000000000000000001?????????????????????????????????????????????????????????????????????????????: product_shift = 28; |
106'b000000000000000000000000000001????????????????????????????????????????????????????????????????????????????: product_shift = 29; |
106'b0000000000000000000000000000001???????????????????????????????????????????????????????????????????????????: product_shift = 30; |
106'b00000000000000000000000000000001??????????????????????????????????????????????????????????????????????????: product_shift = 31; |
106'b000000000000000000000000000000001?????????????????????????????????????????????????????????????????????????: product_shift = 32; |
106'b0000000000000000000000000000000001????????????????????????????????????????????????????????????????????????: product_shift = 33; |
106'b00000000000000000000000000000000001???????????????????????????????????????????????????????????????????????: product_shift = 34; |
106'b000000000000000000000000000000000001??????????????????????????????????????????????????????????????????????: product_shift = 35; |
106'b0000000000000000000000000000000000001?????????????????????????????????????????????????????????????????????: product_shift = 36; |
106'b00000000000000000000000000000000000001????????????????????????????????????????????????????????????????????: product_shift = 37; |
106'b000000000000000000000000000000000000001???????????????????????????????????????????????????????????????????: product_shift = 38; |
106'b0000000000000000000000000000000000000001??????????????????????????????????????????????????????????????????: product_shift = 39; |
106'b00000000000000000000000000000000000000001?????????????????????????????????????????????????????????????????: product_shift = 40; |
106'b000000000000000000000000000000000000000001????????????????????????????????????????????????????????????????: product_shift = 41; |
106'b0000000000000000000000000000000000000000001???????????????????????????????????????????????????????????????: product_shift = 42; |
106'b00000000000000000000000000000000000000000001??????????????????????????????????????????????????????????????: product_shift = 43; |
106'b000000000000000000000000000000000000000000001?????????????????????????????????????????????????????????????: product_shift = 44; |
106'b0000000000000000000000000000000000000000000001????????????????????????????????????????????????????????????: product_shift = 45; |
106'b00000000000000000000000000000000000000000000001???????????????????????????????????????????????????????????: product_shift = 46; |
106'b000000000000000000000000000000000000000000000001??????????????????????????????????????????????????????????: product_shift = 47; |
106'b0000000000000000000000000000000000000000000000001?????????????????????????????????????????????????????????: product_shift = 48; |
106'b00000000000000000000000000000000000000000000000001????????????????????????????????????????????????????????: product_shift = 49; |
106'b000000000000000000000000000000000000000000000000001???????????????????????????????????????????????????????: product_shift = 50; |
106'b0000000000000000000000000000000000000000000000000001??????????????????????????????????????????????????????: product_shift = 51; |
106'b00000000000000000000000000000000000000000000000000001?????????????????????????????????????????????????????: product_shift = 52; |
106'b000000000000000000000000000000000000000000000000000000????????????????????????????????????????????????????: product_shift = 53; |
|
106'b1?????????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 0; |
106'b01????????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 1; |
106'b001???????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 2; |
106'b0001??????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 3; |
106'b00001?????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 4; |
106'b000001????????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 5; |
106'b0000001???????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 6; |
106'b00000001??????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 7; |
106'b000000001?????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 8; |
106'b0000000001????????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 9; |
106'b00000000001???????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 10; |
106'b000000000001??????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 11; |
106'b0000000000001?????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 12; |
106'b00000000000001????????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 13; |
106'b000000000000001???????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 14; |
106'b0000000000000001??????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 15; |
106'b00000000000000001?????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 16; |
106'b000000000000000001????????????????????????????????????????????????????????????????????????????????????????: product_shift <= 17; |
106'b0000000000000000001???????????????????????????????????????????????????????????????????????????????????????: product_shift <= 18; |
106'b00000000000000000001??????????????????????????????????????????????????????????????????????????????????????: product_shift <= 19; |
106'b000000000000000000001?????????????????????????????????????????????????????????????????????????????????????: product_shift <= 20; |
106'b0000000000000000000001????????????????????????????????????????????????????????????????????????????????????: product_shift <= 21; |
106'b00000000000000000000001???????????????????????????????????????????????????????????????????????????????????: product_shift <= 22; |
106'b000000000000000000000001??????????????????????????????????????????????????????????????????????????????????: product_shift <= 23; |
106'b0000000000000000000000001?????????????????????????????????????????????????????????????????????????????????: product_shift <= 24; |
106'b00000000000000000000000001????????????????????????????????????????????????????????????????????????????????: product_shift <= 25; |
106'b000000000000000000000000001???????????????????????????????????????????????????????????????????????????????: product_shift <= 26; |
106'b0000000000000000000000000001??????????????????????????????????????????????????????????????????????????????: product_shift <= 27; |
106'b00000000000000000000000000001?????????????????????????????????????????????????????????????????????????????: product_shift <= 28; |
106'b000000000000000000000000000001????????????????????????????????????????????????????????????????????????????: product_shift <= 29; |
106'b0000000000000000000000000000001???????????????????????????????????????????????????????????????????????????: product_shift <= 30; |
106'b00000000000000000000000000000001??????????????????????????????????????????????????????????????????????????: product_shift <= 31; |
106'b000000000000000000000000000000001?????????????????????????????????????????????????????????????????????????: product_shift <= 32; |
106'b0000000000000000000000000000000001????????????????????????????????????????????????????????????????????????: product_shift <= 33; |
106'b00000000000000000000000000000000001???????????????????????????????????????????????????????????????????????: product_shift <= 34; |
106'b000000000000000000000000000000000001??????????????????????????????????????????????????????????????????????: product_shift <= 35; |
106'b0000000000000000000000000000000000001?????????????????????????????????????????????????????????????????????: product_shift <= 36; |
106'b00000000000000000000000000000000000001????????????????????????????????????????????????????????????????????: product_shift <= 37; |
106'b000000000000000000000000000000000000001???????????????????????????????????????????????????????????????????: product_shift <= 38; |
106'b0000000000000000000000000000000000000001??????????????????????????????????????????????????????????????????: product_shift <= 39; |
106'b00000000000000000000000000000000000000001?????????????????????????????????????????????????????????????????: product_shift <= 40; |
106'b000000000000000000000000000000000000000001????????????????????????????????????????????????????????????????: product_shift <= 41; |
106'b0000000000000000000000000000000000000000001???????????????????????????????????????????????????????????????: product_shift <= 42; |
106'b00000000000000000000000000000000000000000001??????????????????????????????????????????????????????????????: product_shift <= 43; |
106'b000000000000000000000000000000000000000000001?????????????????????????????????????????????????????????????: product_shift <= 44; |
106'b0000000000000000000000000000000000000000000001????????????????????????????????????????????????????????????: product_shift <= 45; |
106'b00000000000000000000000000000000000000000000001???????????????????????????????????????????????????????????: product_shift <= 46; |
106'b000000000000000000000000000000000000000000000001??????????????????????????????????????????????????????????: product_shift <= 47; |
106'b0000000000000000000000000000000000000000000000001?????????????????????????????????????????????????????????: product_shift <= 48; |
106'b00000000000000000000000000000000000000000000000001????????????????????????????????????????????????????????: product_shift <= 49; |
106'b000000000000000000000000000000000000000000000000001???????????????????????????????????????????????????????: product_shift <= 50; |
106'b0000000000000000000000000000000000000000000000000001??????????????????????????????????????????????????????: product_shift <= 51; |
106'b00000000000000000000000000000000000000000000000000001?????????????????????????????????????????????????????: product_shift <= 52; |
106'b000000000000000000000000000000000000000000000000000000????????????????????????????????????????????????????: product_shift <= 53; |
// It's not necessary to go past 53, because you will only get more than 53 zeros |
// when multiplying 2 denormalized numbers together, in which case you will underflow |
endcase |
|
endmodule |