OpenCores
URL https://opencores.org/ocsvn/s1_core/s1_core/trunk

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [sparc_exu_reg.v] - Diff between revs 105 and 113

Show entire file | Details | Blame | View Log

Rev 105 Rev 113
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 sparc_exu_reg (/*AUTOARG*/
module sparc_exu_reg (/*AUTOARG*/
   // Outputs
   // Outputs
   data_out,
   data_out,
   // Inputs
   // Inputs
   clk, se, thr_out, wen_w, thr_w, data_in_w
   clk, se, thr_out, wen_w, thr_w, data_in_w
Line 50... Line 55...
   wire          wen_thr3_w;
   wire          wen_thr3_w;
 
 
   //////////////////////////////////
   //////////////////////////////////
   //  Output selection for reg
   //  Output selection for reg
   //////////////////////////////////
   //////////////////////////////////
 
`ifdef FPGA_SYN_1THREAD
 
   assign        data_out[SIZE -1:0] = data_thr0[SIZE -1:0];
 
   assign        wen_thr0_w = (thr_w[0] & wen_w);
 
   // mux between new and current value
 
   mux2ds #(SIZE) data_next0_mux(.dout(data_thr0_next[SIZE -1:0]),
 
                               .in0(data_thr0[SIZE -1:0]),
 
                               .in1(data_in_w[SIZE -1:0]),
 
                               .sel0(~wen_thr0_w),
 
                               .sel1(wen_thr0_w));
 
   dff_s #(SIZE) dff_reg_thr0(.din(data_thr0_next[SIZE -1:0]), .clk(clk), .q(data_thr0[SIZE -1:0]),
 
                       .se(se), `SIMPLY_RISC_SCANIN, .so());
 // !`ifdef FPGA_SYN_1THREAD
`else // !`ifdef FPGA_SYN_1THREAD
 
 
   // mux between the 4 regs
   // mux between the 4 regs
   mux4ds #(SIZE) mux_data_out1(.dout(data_out[SIZE -1:0]), .sel0(thr_out[0]),
   mux4ds #(SIZE) mux_data_out1(.dout(data_out[SIZE -1:0]), .sel0(thr_out[0]),
                               .sel1(thr_out[1]), .sel2(thr_out[2]),
                               .sel1(thr_out[1]), .sel2(thr_out[2]),
                               .sel3(thr_out[3]), .in0(data_thr0[SIZE -1:0]),
                               .sel3(thr_out[3]), .in0(data_thr0[SIZE -1:0]),
Line 102... Line 107...
                               .in1(data_in_w[SIZE -1:0]),
                               .in1(data_in_w[SIZE -1:0]),
                               .sel0(~wen_thr3_w),
                               .sel0(~wen_thr3_w),
                               .sel1(wen_thr3_w));
                               .sel1(wen_thr3_w));
 
 
   // store new value
   // store new value
   dff #(SIZE) dff_reg_thr0(.din(data_thr0_next[SIZE -1:0]), .clk(clk), .q(data_thr0[SIZE -1:0]),
   dff_s #(SIZE) dff_reg_thr0(.din(data_thr0_next[SIZE -1:0]), .clk(clk), .q(data_thr0[SIZE -1:0]),
                       .se(se), .si(), .so());
                       .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(SIZE) dff_reg_thr1(.din(data_thr1_next[SIZE -1:0]), .clk(clk), .q(data_thr1[SIZE -1:0]),
   dff_s #(SIZE) dff_reg_thr1(.din(data_thr1_next[SIZE -1:0]), .clk(clk), .q(data_thr1[SIZE -1:0]),
                       .se(se), .si(), .so());
                       .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(SIZE) dff_reg_thr2(.din(data_thr2_next[SIZE -1:0]), .clk(clk), .q(data_thr2[SIZE -1:0]),
   dff_s #(SIZE) dff_reg_thr2(.din(data_thr2_next[SIZE -1:0]), .clk(clk), .q(data_thr2[SIZE -1:0]),
                       .se(se), .si(), .so());
                       .se(se), `SIMPLY_RISC_SCANIN, .so());
   dff #(SIZE) dff_reg_thr3(.din(data_thr3_next[SIZE -1:0]), .clk(clk), .q(data_thr3[SIZE -1:0]),
   dff_s #(SIZE) dff_reg_thr3(.din(data_thr3_next[SIZE -1:0]), .clk(clk), .q(data_thr3[SIZE -1:0]),
                       .se(se), .si(), .so());
                       .se(se), `SIMPLY_RISC_SCANIN, .so());
 // !`ifdef FPGA_SYN_1THREAD
`endif // !`ifdef FPGA_SYN_1THREAD
 
 
endmodule // sparc_exu_reg
endmodule // sparc_exu_reg
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.