1 Reply Latest reply on Oct 13, 2010 2:17 AM by 807576

    Question about the ALU in OpenSPARC T1 core

      I'm trying to make some modification to the OpenSPARC T1 core according to the new robust design method reported on papers.

      It seems OpenSPARC uses 1's complement instead of 2's complement.

      The ALU uses a full adder to perform subtraction, simply by toggling the second operand.(thus 1's complement?)

      But I think there will results in wrong result.
      Need your help.
        • 1. Re: Question about the ALU in OpenSPARC T1 core
          // Module implementation
          assign subtract_d[63:0] = {64{ifu_exu_invert_d}};
          dff_s #(64) sub_dff(.din(subtract_d[63:0]), .clk(clk), .q(subtract_e[63:0]), .se(se),
          .si(), .so());

          assign rs1_data[63:0] = byp_alu_rs1_data_e[63:0];

          assign rs2_data[63:0] = byp_alu_rs2_data_e[63:0] ^ subtract_e[63:0];

          assign alu_ecl_adderin2_63_e = rs2_data[63];
          assign alu_ecl_adderin2_31_e = rs2_data[31];
          sparc_exu_aluadder64 adder(.rs1_data(rs1_data[63:0]), .rs2_data(rs2_data[63:0]),
          .cin(ecl_alu_cin_e), .adder_out(adder_out[63:0]),
          .cout32(alu_ecl_cout32_e), .cout64(cout64_e));
          assign alu_ecl_cout64_e_l = ~cout64_e;