Visible to Intel only — GUID: raz1563491709943
Ixiasoft
A.2. Modify the Stratix® 10 SX SoC Development Kit HPS DDR4 memory width and ECC configuration using the Golden Hardware Reference Design project
The supported HPS DDR4 configurations are:
- 72 bits : 64 bit data + 8 bit ECC
- 64 bits : 64 bit data
- 40 bits : 32 bit data + 8 bit ECC
- 32 bits : 32 bit data
- 24 bits : 16 bit data + 8 bit ECC
- 16 bits : 16 bit data
The Golden Hardware Reference Design (GHRD) project has an HPS DDR4 interface configuration with a width of 72 bits.
Flow to modify the HPS DDR4 memory width and ECC Configuration
- Open the qsys_top.qsys file. Select the emif_hps component and open the Parameter Editor. Change the Memory tab > DQ width as required. If ECC isn’t required, unselect the Controller tab parameters Enable Error Detection and Correction Logic with ECC and Enable Auto Error Correction to External Memory. Generate the qsys component.
- Open the top level RTL file ghrd_s10_top.v. At the top, change the input wire bus width declarations for emif_hps_mem_mem_dbi_n, emif_hps_mem_mem_dq, emif_hps_mem_mem_dqs and emif_hps_mem_mem_dqs_n for your required DDR4 configuration.
- In the Quartus Assignment Editor or in the project .qsf file, make these changes:
- For the required DDR4 interface width, disable all the location assignments of the unused mem_dbi_n, mem_dqs, mem_dqs_n and mem_dq signals.
- For narrower width interfaces with ECC, in order to meet the pinout rules in the Stratix® 10 SoC Design Guidelines and the Stratix® 10 EMIF IP User Guide's HPS DQS group placements, the DQS group used for the ECC bits needs to move so it is placed in lane 3 of I/O bank 2M.
- For a DDR4 interface width of 16 bit + ECC, copy the pin locations for emif_hps_mem_mem_dbi_n [8], emif_hps_mem_mem_dqs[8], emif_hps_mem_mem_dqs_n[8], emif_hps_mem_mem_dq[71:64], to emif_hps_mem_mem_dbi_n[2], emif_hps_mem_mem_dqs[2], emif_hps_mem_mem_dqs_n[2], emif_hps_mem_mem_dq[23:16] respectively.
- For a DDR4 interface width of 32 bit + ECC, copy the pin locations for emif_hps_mem_mem_dbi_n [8], emif_hps_mem_mem_dqs[8], emif_hps_mem_mem_dqs_n[8], emif_hps_mem_mem_dq[71:64], to emif_hps_mem_mem_dbi_n[4], emif_hps_mem_mem_dqs[4], emif_hps_mem_mem_dqs_n[4], emif_hps_mem_mem_dq[39:32] respectively.
Note: Note the alert# pin is placed in DQS group 0 which is always in the GHRD project regardless of the HPS DDR4 interface width, so no changes are needed.
Note: Further details for some configurations are shown in Enabling ECC for HPS SDRAM Article on RocketBoards website.