module fm_3d_imul8 (
    i_a,
    i_b,
    o_c
);

////////////////////////////
// I/O definition
////////////////////////////
    input  [7:0]  i_a;
    input  [7:0]  i_b;
    output [7:0]  o_c;

///////////////////////////////////////////
//  wire 
///////////////////////////////////////////
    wire   [15:0] w_m0;
    wire   [15:0] w_m1;
    wire   [8:0]  w_carry;
    wire   [7:0]  w_c;
///////////////////////////////////////////
//  assign
///////////////////////////////////////////
    assign w_m0 = i_a * i_b;
    //assign w_m1 = w_m0 + 8'd128;  // original code
    assign w_m1[6:0] = w_m0[6:0];
    assign w_m1[15:7] = w_m0[15:7] + 1'b1;
    assign w_carry = w_m1[7:0] + w_m1[15:8];
    assign w_c = w_m1[15:8] + w_carry[8];
    assign o_c = w_c;

endmodule