Line 16... |
Line 16... |
// You should have received a copy of the GNU General Public
|
// You should have received a copy of the GNU General Public
|
// License along with this work; if not, write to the Free Software
|
// License along with this work; if not, write to the Free Software
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
//
|
//
|
// ========== Copyright Header End ============================================
|
// ========== Copyright Header End ============================================
|
|
`ifdef SIMPLY_RISC_TWEAKS
|
|
`define SIMPLY_RISC_SCANIN .si(0)
|
|
`else
|
|
`define SIMPLY_RISC_SCANIN .si()
|
|
`endif
|
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
/*
|
/*
|
// Module Name: sparc_exu_aluaddsub
|
// Module Name: sparc_exu_aluaddsub
|
// Description: This block implements addition and subtraction.
|
// Description: This block implements addition and subtraction.
|
// It takes two operands, a carry_in, plus two control signals
|
// It takes two operands, a carry_in, plus two control signals
|
Line 63... |
Line 68... |
|
|
////////////////////////////////////////////
|
////////////////////////////////////////////
|
// Module implementation
|
// Module implementation
|
////////////////////////////////////////////
|
////////////////////////////////////////////
|
assign subtract_d[63:0] = {64{ifu_exu_invert_d}};
|
assign subtract_d[63:0] = {64{ifu_exu_invert_d}};
|
dff #(64) sub_dff(.din(subtract_d[63:0]), .clk(clk), .q(subtract_e[63:0]), .se(se),
|
dff_s #(64) sub_dff(.din(subtract_d[63:0]), .clk(clk), .q(subtract_e[63:0]), .se(se),
|
.si(), .so());
|
`SIMPLY_RISC_SCANIN, .so());
|
|
|
assign rs1_data[63:0] = byp_alu_rs1_data_e[63:0];
|
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 rs2_data[63:0] = byp_alu_rs2_data_e[63:0] ^ subtract_e[63:0];
|
|
|