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

Subversion Repositories mem_ctrl

[/] [mem_ctrl/] [trunk/] [rtl/] [verilog/] [mc_rf.v] - Diff between revs 4 and 8

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 8
Line 35... Line 35...
////                                                             ////
////                                                             ////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
 
 
//  CVS Log
//  CVS Log
//
//
//  $Id: mc_rf.v,v 1.1 2001-07-29 07:34:41 rudi Exp $
//  $Id: mc_rf.v,v 1.2 2001-08-10 08:16:21 rudi Exp $
//
//
//  $Date: 2001-07-29 07:34:41 $
//  $Date: 2001-08-10 08:16:21 $
//  $Revision: 1.1 $
//  $Revision: 1.2 $
//  $Author: rudi $
//  $Author: rudi $
//  $Locker:  $
//  $Locker:  $
//  $State: Exp $
//  $State: Exp $
//
//
// Change History:
// Change History:
//               $Log: not supported by cvs2svn $
//               $Log: not supported by cvs2svn $
 
//               Revision 1.1  2001/07/29 07:34:41  rudi
 
//
 
//
 
//               1) Changed Directory Structure
 
//               2) Fixed several minor bugs
 
//
//               Revision 1.3  2001/06/12 15:19:49  rudi
//               Revision 1.3  2001/06/12 15:19:49  rudi
//
//
//
//
//               Minor changes after running lint, and a small bug fix reading csr and ba_mask registers.
//               Minor changes after running lint, and a small bug fix reading csr and ba_mask registers.
//
//
Line 206... Line 212...
//
//
 
 
assign wb_err_o = 1'b0;
assign wb_err_o = 1'b0;
 
 
always @(posedge clk)
always @(posedge clk)
        if(wb_cyc_i & wb_stb_i & `REG_SEL & !wb_we_i)
        if(wb_cyc_i & wb_stb_i & `MC_REG_SEL & !wb_we_i)
        case(wb_addr_i[6:2])            // synopsys full_case parallel_case
        case(wb_addr_i[6:2])            // synopsys full_case parallel_case
           5'h0:        rf_dout <= #1 csr;
           5'h0:        rf_dout <= #1 csr;
           5'h1:        rf_dout <= #1 poc;
           5'h1:        rf_dout <= #1 poc;
           5'h2:        rf_dout <= #1 csc_mask;
           5'h2:        rf_dout <= #1 csc_mask;
 
 
Line 235... Line 241...
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
// WISHBONE Register Write logic
// WISHBONE Register Write logic
//
//
 
 
assign rf_we = `REG_SEL & wb_we_i & wb_cyc_i & wb_stb_i;
assign rf_we = `MC_REG_SEL & wb_we_i & wb_cyc_i & wb_stb_i;
 
 
always @(posedge clk or negedge rst)
always @(posedge clk or negedge rst)
        if(!rst)        csr_r2 <= #1 8'h0;
        if(!rst)        csr_r2 <= #1 8'h0;
        else
        else
        if(rf_we & (wb_addr_i[6:2] == 5'h0) )
        if(rf_we & (wb_addr_i[6:2] == 5'h0) )
Line 271... Line 277...
//
//
// WISHBONE Register Ack logic
// WISHBONE Register Ack logic
//
//
 
 
always @(posedge clk)
always @(posedge clk)
        ack_r <= #1 `REG_SEL & wb_cyc_i & wb_stb_i & !ack_r & !wb_ack_o;
        ack_r <= #1 `MC_REG_SEL & wb_cyc_i & wb_stb_i & !ack_r & !wb_ack_o;
 
 
always @(posedge clk)
always @(posedge clk)
        wb_ack_o <= #1 ack_r;
        wb_ack_o <= #1 ack_r;
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
Line 351... Line 357...
           3'h5: sp_tms <= #1 tms5;
           3'h5: sp_tms <= #1 tms5;
           3'h6: sp_tms <= #1 tms6;
           3'h6: sp_tms <= #1 tms6;
           3'h7: sp_tms <= #1 tms7;
           3'h7: sp_tms <= #1 tms7;
        endcase
        endcase
 
 
assign  cs_need_rfr[0] = csc0[0] & (csc0[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[0] = csc0[0] & (csc0[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[1] = csc1[0] & (csc1[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[1] = csc1[0] & (csc1[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[2] = csc2[0] & (csc2[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[2] = csc2[0] & (csc2[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[3] = csc3[0] & (csc3[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[3] = csc3[0] & (csc3[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[4] = csc4[0] & (csc4[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[4] = csc4[0] & (csc4[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[5] = csc5[0] & (csc5[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[5] = csc5[0] & (csc5[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[6] = csc6[0] & (csc6[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[6] = csc6[0] & (csc6[3:1] == `MC_MEM_TYPE_SDRAM);
assign  cs_need_rfr[7] = csc7[0] & (csc7[3:1] == `MEM_TYPE_SDRAM);
assign  cs_need_rfr[7] = csc7[0] & (csc7[3:1] == `MC_MEM_TYPE_SDRAM);
 
 
assign ref_int = csr_r[10:8];
assign ref_int = csr_r[10:8];
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
Line 455... Line 461...
                .lmr_ack(       lmr_ack0        ),
                .lmr_ack(       lmr_ack0        ),
                .init_req(      init_req0       ),
                .init_req(      init_req0       ),
                .init_ack(      init_ack0       )
                .init_ack(      init_ack0       )
                );
                );
 
 
`ifdef HAVE_CS1
`ifdef MC_HAVE_CS1
mc_cs_rf #(3'h1) u1(
mc_cs_rf #(3'h1) u1(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 495... Line 501...
                .init_req(      init_req1       ),
                .init_req(      init_req1       ),
                .init_ack(      init_ack1       )
                .init_ack(      init_ack1       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS2
`ifdef MC_HAVE_CS2
mc_cs_rf #(3'h2) u2(
mc_cs_rf #(3'h2) u2(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 535... Line 541...
                .init_req(      init_req2       ),
                .init_req(      init_req2       ),
                .init_ack(      init_ack2       )
                .init_ack(      init_ack2       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS3
`ifdef MC_HAVE_CS3
mc_cs_rf #(3'h3) u3(
mc_cs_rf #(3'h3) u3(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 575... Line 581...
                .init_req(      init_req3       ),
                .init_req(      init_req3       ),
                .init_ack(      init_ack3       )
                .init_ack(      init_ack3       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS4
`ifdef MC_HAVE_CS4
mc_cs_rf #(3'h4) u4(
mc_cs_rf #(3'h4) u4(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 615... Line 621...
                .init_req(      init_req4       ),
                .init_req(      init_req4       ),
                .init_ack(      init_ack4       )
                .init_ack(      init_ack4       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS5
`ifdef MC_HAVE_CS5
mc_cs_rf #(3'h5) u5(
mc_cs_rf #(3'h5) u5(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 655... Line 661...
                .init_req(      init_req5       ),
                .init_req(      init_req5       ),
                .init_ack(      init_ack5       )
                .init_ack(      init_ack5       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS6
`ifdef MC_HAVE_CS6
mc_cs_rf #(3'h6) u6(
mc_cs_rf #(3'h6) u6(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),
Line 695... Line 701...
                .init_req(      init_req6       ),
                .init_req(      init_req6       ),
                .init_ack(      init_ack6       )
                .init_ack(      init_ack6       )
                );
                );
`endif
`endif
 
 
`ifdef HAVE_CS7
`ifdef MC_HAVE_CS7
mc_cs_rf #(3'h7) u7(
mc_cs_rf #(3'h7) u7(
                .clk(           clk             ),
                .clk(           clk             ),
                .rst(           rst             ),
                .rst(           rst             ),
                .wb_we_i(       wb_we_i         ),
                .wb_we_i(       wb_we_i         ),
                .din(           wb_data_i       ),
                .din(           wb_data_i       ),

powered by: WebSVN 2.1.0

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