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

Subversion Repositories sdr_ctrl

[/] [sdr_ctrl/] [trunk/] [rtl/] [core/] [sdrc_core.v] - Diff between revs 3 and 4

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

Rev 3 Rev 4
Line 65... Line 65...
 
 
 
 
`include "sdrc.def"
`include "sdrc.def"
module sdrc_core
module sdrc_core
           (
           (
                sdram_clk,
                clk,
                pad_sdram_clk,
                pad_clk,
                reset_n,
                reset_n,
                sdr_width,
                sdr_width,
 
 
                /* Request from app */
                /* Request from app */
                app_req,                // Transfer Request
                app_req,                // Transfer Request
Line 127... Line 127...
 
 
 
 
//-----------------------------------------------
//-----------------------------------------------
// Global Variable
// Global Variable
// ----------------------------------------------
// ----------------------------------------------
input                   sdram_clk           ; // SDRAM Clock 
input                   clk                 ; // SDRAM Clock 
input                   pad_sdram_clk       ; // SDRAM Clock from Pad, used for registering Read Data
input                   pad_clk             ; // SDRAM Clock from Pad, used for registering Read Data
input                   reset_n             ; // Reset Signal
input                   reset_n             ; // Reset Signal
input                   sdr_width           ; // 0 - 32 Bit SDR, 1 - 16 Bit SDR
input                   sdr_width           ; // 0 - 32 Bit SDR, 1 - 16 Bit SDR
 
 
//------------------------------------------------
//------------------------------------------------
// Request from app
// Request from app
Line 264... Line 264...
   // Instantiate sdr_req_gen
   // Instantiate sdr_req_gen
   // This module takes requests from the app, chops them to burst booundaries
   // This module takes requests from the app, chops them to burst booundaries
   // if wrap=0, decodes the bank and passe the request to bank_ctl
   // if wrap=0, decodes the bank and passe the request to bank_ctl
 
 
   sdrc_req_gen u_req_gen (
   sdrc_req_gen u_req_gen (
          .clk                (sdram_clk          ),
          .clk                (clk          ),
          .reset_n            (reset_n            ),
          .reset_n            (reset_n            ),
          .sdr_dev_config     (cfg_sdr_dev_config ),
          .sdr_dev_config     (cfg_sdr_dev_config ),
 
 
        /* Request from app */
        /* Request from app */
          .r2x_idle           (r2x_idle           ),
          .r2x_idle           (r2x_idle           ),
Line 304... Line 304...
   // This module takes requests from sdr_req_gen, checks for page hit/miss and
   // This module takes requests from sdr_req_gen, checks for page hit/miss and
   // issues precharge/activate commands and then passes the request to
   // issues precharge/activate commands and then passes the request to
   // sdr_xfr_ctl. 
   // sdr_xfr_ctl. 
 
 
   sdrc_bank_ctl u_bank_ctl (
   sdrc_bank_ctl u_bank_ctl (
          .clk                (sdram_clk          ),
          .clk                (clk          ),
          .reset_n            (reset_n            ),
          .reset_n            (reset_n            ),
          .a2b_req_depth      (cfg_req_depth      ),
          .a2b_req_depth      (cfg_req_depth      ),
 
 
      /* Req from req_gen */
      /* Req from req_gen */
          .r2b_req            (r2b_req            ),
          .r2b_req            (r2b_req            ),
Line 363... Line 363...
   // controls data flow to/from the app. At the end of the transfer it issues a
   // controls data flow to/from the app. At the end of the transfer it issues a
   // burst terminate if not at the end of a burst and another command to this
   // burst terminate if not at the end of a burst and another command to this
   // bank is not available.
   // bank is not available.
 
 
   sdrc_xfr_ctl u_xfr_ctl (
   sdrc_xfr_ctl u_xfr_ctl (
          .clk                (sdram_clk          ),
          .clk                (clk          ),
          .reset_n            (reset_n            ),
          .reset_n            (reset_n            ),
 
 
      /* Transfer request from bank_ctl */
      /* Transfer request from bank_ctl */
          .r2x_idle           (r2x_idle           ),
          .r2x_idle           (r2x_idle           ),
          .b2x_idle           (b2x_idle           ),
          .b2x_idle           (b2x_idle           ),
Line 408... Line 408...
          .x2a_wrstart        (xfr_wrstart        ),
          .x2a_wrstart        (xfr_wrstart        ),
          .x2a_id             (xfr_id             ),
          .x2a_id             (xfr_id             ),
          .x2a_rdlast         (xfr_rdlast         ),
          .x2a_rdlast         (xfr_rdlast         ),
          .x2a_wrlast         (xfr_wrlast         ),
          .x2a_wrlast         (xfr_wrlast         ),
          .app_wrdt           (add_wr_data_int    ),
          .app_wrdt           (add_wr_data_int    ),
          .app_wren_n         (add_wr_en_n_int    ),
          .app_wren_n         (app_wr_en_n_int    ),
          .x2a_wrnext         (app_wr_next_int    ),
          .x2a_wrnext         (app_wr_next_int    ),
          .x2a_rddt           (app_rd_data_int    ),
          .x2a_rddt           (app_rd_data_int    ),
          .x2a_rdok           (app_rd_valid_int   ),
          .x2a_rdok           (app_rd_valid_int   ),
          .sdr_init_done      (sdr_init_done      ),
          .sdr_init_done      (sdr_init_done      ),
 
 
Line 431... Line 431...
          .rfsh_time          (cfg_sdr_rfsh       ),
          .rfsh_time          (cfg_sdr_rfsh       ),
          .rfsh_rmax          (cfg_sdr_rfmax      )
          .rfsh_rmax          (cfg_sdr_rfmax      )
    );
    );
 
 
sdrc_bs_convert u_bs_convert (
sdrc_bs_convert u_bs_convert (
          .clk                (sdram_clk          ),
          .clk                (clk          ),
          .reset_n            (reset_n            ),
          .reset_n            (reset_n            ),
          .sdr_width          (sdr_width          ),
          .sdr_width          (sdr_width          ),
 
 
          .app_req_addr       (app_req_addr       ),
          .app_req_addr       (app_req_addr       ),
          .app_req_addr_int   (app_req_addr_int   ),
          .app_req_addr_int   (app_req_addr_int   ),
Line 444... Line 444...
          .app_sdr_req        (app_req            ),
          .app_sdr_req        (app_req            ),
          .app_sdr_req_int    (app_req_int        ),
          .app_sdr_req_int    (app_req_int        ),
          .app_req_dma_last   (app_req_dma_last   ),
          .app_req_dma_last   (app_req_dma_last   ),
          .app_req_dma_last_int(app_req_dma_last_int),
          .app_req_dma_last_int(app_req_dma_last_int),
          .app_req_wr_n       (app_req_wr_n       ),
          .app_req_wr_n       (app_req_wr_n       ),
          .app_req_ack16      (app_req_ack_int    ),
          .app_req_ack_int    (app_req_ack_int    ),
          .app_req_ack        (app_req_ack        ),
          .app_req_ack        (app_req_ack        ),
 
 
          .app_wr_data        (app_wr_data        ),
          .app_wr_data        (app_wr_data        ),
          .app_wr_data_int    (add_wr_data_int    ),
          .app_wr_data_int    (add_wr_data_int    ),
          .app_wr_en_n        (app_wr_en_n        ),
          .app_wr_en_n        (app_wr_en_n        ),

powered by: WebSVN 2.1.0

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