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
|
//FPGA_SYN enables all FPGA related modifications
|
//FPGA_SYN enables all FPGA related modifications
|
|
`ifdef FPGA_SYN
|
|
`define FPGA_SYN_CLK_EN
|
|
`define FPGA_SYN_CLK_DFF
|
|
`endif
|
|
|
module sparc_mul_dp(
|
module sparc_mul_dp(
|
ecl_mul_rs1_data,
|
ecl_mul_rs1_data,
|
ecl_mul_rs2_data,
|
ecl_mul_rs2_data,
|
spu_mul_op1_data,
|
spu_mul_op1_data,
|
Line 143... |
Line 148... |
.areg (areg),
|
.areg (areg),
|
.accreg (acc_reg[135:129]),
|
.accreg (acc_reg[135:129]),
|
.x2 (x2),
|
.x2 (x2),
|
.out (mout),
|
.out (mout),
|
.rclk (clk),
|
.rclk (clk),
|
.si (),
|
`SIMPLY_RISC_SCANIN,
|
.so (),
|
.so (),
|
.se (se),
|
.se (se),
|
.mul_rst_l (rst_l),
|
.mul_rst_l (rst_l),
|
.mul_step (1'b1)
|
.mul_step (1'b1)
|
);
|
);
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
///// ACCUM register and right shift muxes
|
///// ACCUM register and right shift muxes
|
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
dff dffshf (.din (acc_reg_shf),
|
dff_s dffshf (.din (acc_reg_shf),
|
.clk (clk),
|
.clk (clk),
|
.q (acc_reg_shf2),
|
.q (acc_reg_shf2),
|
.se (se),
|
.se (se),
|
.si (),
|
`SIMPLY_RISC_SCANIN,
|
.so ()
|
.so ()
|
);
|
);
|
|
|
assign acc_reg_in = acc_reg_shf ? {64'b0,acc_reg[135:64]}
|
assign acc_reg_in = acc_reg_shf ? {64'b0,acc_reg[135:64]}
|
: mout ;
|
: mout ;
|
|
|
assign mul_data_out = acc_reg_shf2 ? acc_reg[63:0]
|
assign mul_data_out = acc_reg_shf2 ? acc_reg[63:0]
|
: mout[63:0] ;
|
: mout[63:0] ;
|
|
|
|
`ifdef FPGA_SYN_CLK_DFF
|
dffre #(136) accum (.din (acc_reg_in),
|
dffre_s #(136) accum (.din (acc_reg_in),
|
.rst (acc_reg_rst),
|
.rst (acc_reg_rst),
|
.en (acc_reg_enb | acc_reg_rst), .clk(clk), //manually fixed
|
.en (acc_reg_enb | acc_reg_rst), .clk(clk), //manually fixed
|
.q (acc_reg),
|
.q (acc_reg),
|
.se (se),
|
.se (se),
|
.si (),
|
`SIMPLY_RISC_SCANIN,
|
.so ()
|
.so ()
|
);
|
);
|
|
`else
|
|
dffr_s #(136) accum (.din (acc_reg_in),
|
|
.rst (acc_reg_rst),
|
|
.clk (clk_enb1),
|
|
.q (acc_reg),
|
|
.se (se),
|
|
`SIMPLY_RISC_SCANIN,
|
|
.so ()
|
|
);
|
|
`endif
|
|
|
|
`ifdef FPGA_SYN_CLK_EN
|
|
`else
|
|
clken_buf ckbuf_1(.clk(clk_enb1), .rclk(clk), .enb_l(~(acc_reg_enb | acc_reg_rst)), .tmb_l(~se));
|
|
`endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assign bypreg = byp_imm ? mout[63:0]
|
assign bypreg = byp_imm ? mout[63:0]
|
: acc_reg[63:0] ;
|
: acc_reg[63:0] ;
|
|
|