ddrc_register_set.set_word('dram_param_reg4',0x0,force)# reset all fields. This register is controlled by the hardware during automatic initialization
#Maybe just the LSBB (reg_ddrc_en_2t_timing_mode) is needed for "2t timing mode" - is it non-common?
ddrc_register_set.set_bitfields('dram_param_reg4',(('reg_ddrc_max_rank_rd',0xf)),force,warn)# Not documented, but appears to be set in 2-nd and 3-rd round
ddrc_register_set.set_bitfields('dram_param_reg4',(('reg_ddrc_max_rank_rd',(0xf,0)[self.silicon==3])),force,warn)# Not documented, but appears to be set in 2-nd and 3-rd round
('reg_phy_data_slice_in_use',slice_in_use3),# 1 Data bus width for read FIFO generation. 0 - read data responses are ignored, 1 - data slice 3 is valid (always 1)
ddrc_register_set.set_bitfields('phy_rd_dqs_cfg0',(# PHY read DQS configuration register for data slice 0
('reg_phy_rd_dqs_slave_delay',0),# 0 If reg_phy_rd_dqs_slave_force is 1, use this tap/delay value for read DQS slave DLL, data slice 0
('reg_phy_rd_dqs_slave_force',0),# 0 0 - use reg_phy_rd_dqs_slave_ratio for the read DQS slave DLL, 1 - use provided in reg_phy_rd_dqs_slave_delay, data slice 0
('reg_phy_rd_dqs_slave_ratio',dqs_slave_ratio0),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 0
('reg_phy_rd_dqs_slave_ratio',rd_dqs_slave_ratio0),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 0
ddrc_register_set.set_bitfields('phy_rd_dqs_cfg1',(# PHY read DQS configuration register for data slice 1
('reg_phy_rd_dqs_slave_delay',0),# 0 If reg_phy_rd_dqs_slave_force is 1, use this tap/delay value for read DQS slave DLL, data slice 1
('reg_phy_rd_dqs_slave_force',0),# 0 0 - use reg_phy_rd_dqs_slave_ratio for the read DQS slave DLL, 1 - use provided in reg_phy_rd_dqs_slave_delay, data slice 1
('reg_phy_rd_dqs_slave_ratio',dqs_slave_ratio1),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 1
('reg_phy_rd_dqs_slave_ratio',rd_dqs_slave_ratio1),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 1
ddrc_register_set.set_bitfields('phy_rd_dqs_cfg2',(# PHY read DQS configuration register for data slice 2
('reg_phy_rd_dqs_slave_delay',0),# 0 If reg_phy_rd_dqs_slave_force is 1, use this tap/delay value for read DQS slave DLL, data slice 2
('reg_phy_rd_dqs_slave_force',0),# 0 0 - use reg_phy_rd_dqs_slave_ratio for the read DQS slave DLL, 1 - use provided in reg_phy_rd_dqs_slave_delay, data slice 2
('reg_phy_rd_dqs_slave_ratio',dqs_slave_ratio2),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 2
('reg_phy_rd_dqs_slave_ratio',rd_dqs_slave_ratio2),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 2
ddrc_register_set.set_bitfields('phy_rd_dqs_cfg3',(# PHY read DQS configuration register for data slice 3
('reg_phy_rd_dqs_slave_delay',0),# 0 If reg_phy_rd_dqs_slave_force is 1, use this tap/delay value for read DQS slave DLL, data slice 3
('reg_phy_rd_dqs_slave_force',0),# 0 0 - use reg_phy_rd_dqs_slave_ratio for the read DQS slave DLL, 1 - use provided in reg_phy_rd_dqs_slave_delay, data slice 3
('reg_phy_rd_dqs_slave_ratio',dqs_slave_ratio3),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 3
('reg_phy_rd_dqs_slave_ratio',rd_dqs_slave_ratio3),# 0x35 Fraction of the clock cycle (256 = full period) for the read DQS slave DLL, data slice 3
ddrc_register_set.set_bitfields('phy_wr_dqs_cfg0',(# ,PHY write DQS configuration register for data slice 0
('reg_phy_wr_dqs_slave_delay',0),# 0 If reg_phy_wr_dqs_slave_force is 1, use this tap/delay value for write DQS slave DLL, data slice 0
('reg_phy_wr_dqs_slave_force',0),# 0 0 - use reg_phy_wr_dqs_slave_ratio for the write DQS slave DLL, 1 - use provided in reg_phy_wr_dqs_slave_delay, data slice 0
('reg_phy_wr_dqs_slave_ratio',0),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 0. Program manual training ratio
('reg_phy_wr_dqs_slave_ratio',wr_dqs_slave_ratio0),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 0. Program manual training ratio
ddrc_register_set.set_bitfields('phy_wr_dqs_cfg1',(# ,PHY write DQS configuration register for data slice 1
('reg_phy_wr_dqs_slave_delay',0),# 0 If reg_phy_wr_dqs_slave_force is 1, use this tap/delay value for write DQS slave DLL, data slice 1
('reg_phy_wr_dqs_slave_force',0),# 0 0 - use reg_phy_wr_dqs_slave_ratio for the write DQS slave DLL, 1 - use provided in reg_phy_wr_dqs_slave_delay, data slice 1
('reg_phy_wr_dqs_slave_ratio',0),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 1. Program manual training ratio
('reg_phy_wr_dqs_slave_ratio',wr_dqs_slave_ratio1),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 1. Program manual training ratio
ddrc_register_set.set_bitfields('phy_wr_dqs_cfg2',(# ,PHY write DQS configuration register for data slice 2
('reg_phy_wr_dqs_slave_delay',0),# 0 If reg_phy_wr_dqs_slave_force is 1, use this tap/delay value for write DQS slave DLL, data slice 2
('reg_phy_wr_dqs_slave_force',0),# 0 0 - use reg_phy_wr_dqs_slave_ratio for the write DQS slave DLL, 1 - use provided in reg_phy_wr_dqs_slave_delay, data slice 2
('reg_phy_wr_dqs_slave_ratio',0),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 2. Program manual training ratio
('reg_phy_wr_dqs_slave_ratio',wr_dqs_slave_ratio2),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 2. Program manual training ratio
ddrc_register_set.set_bitfields('phy_wr_dqs_cfg3',(# ,PHY write DQS configuration register for data slice 3
('reg_phy_wr_dqs_slave_delay',0),# 0 If reg_phy_wr_dqs_slave_force is 1, use this tap/delay value for write DQS slave DLL, data slice 3
('reg_phy_wr_dqs_slave_force',0),# 0 0 - use reg_phy_wr_dqs_slave_ratio for the write DQS slave DLL, 1 - use provided in reg_phy_wr_dqs_slave_delay, data slice 3
('reg_phy_wr_dqs_slave_ratio',0),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 3. Program manual training ratio
('reg_phy_wr_dqs_slave_ratio',wr_dqs_slave_ratio3),# 0 Fraction of the clock cycle (256 = full period) for the write DQS slave DLL, data slice 3. Program manual training ratio
ddrc_register_set.set_bitfields('phy_we_cfg0',(# PHY FIFO write enable configuration register for data slice 0
...
...
@@ -1132,10 +1182,10 @@ class EzynqDDR:
('reg_phy_fifo_we_in_force',0),# 0 0 - use reg_phy_fifo_we_slave_ratio for fifo_we_0 slave DLL, 1 - use provided in reg_phy_fifo_we_in_delay, data slice 3
('reg_phy_fifo_we_slave_ratio',fifo_we_slave_ratio3),# 0x35 Fraction of the clock cycle (256 = full period) for fifo_we_0 slave DLL, data slice 3. Program manual training ratio
ddrc_register_set.set_bitfields('wr_data_slv0',(# PHY write data slave ratio configuration register for data slice 0
('reg_phy_wr_data_slave_delay',0),# 0 If reg_phy_wr_dqs_slave_force is 1, use this tap/delay value for write data slave DLL, data slice 0
...
...
@@ -1161,10 +1211,16 @@ class EzynqDDR:
('reg_phy_wr_data_slave_ratio',wr_data_slave_ratio3),# 0x40 Fraction of the clock cycle (256 = full period) for the write data slave DLL, data slice 3. Program manual training ratio
#define CONFIG_EZYNQ_DDR_DDR3_RTT 60 /* DDR3 on-chip termination, Ohm ('DISABLED','60','120','40') Does not include 20 & 30 - not clear if DDRC can use them with auto write leveling */
#define CONFIG_EZYNQ_DDR_DS_T_RFC 300.0 /* Minimal Refresh-to-Activate or Refresh command period (ns) */
#define CONFIG_EZYNQ_DDR_DS_T_WR 15.0 /* Write recovery time (ns) */
#define CONFIG_EZYNQ_DDR_DS_T_REFI_US 7.8 /* Maximal average periodic refresh, microseconds. Will be automatically reduced if high temperature option is selected */
#define CONFIG_EZYNQ_DDR_DS_RTP 4 /* Minimal Read-to-Precharge time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_DS_T_RTP/tCK */
#define CONFIG_EZYNQ_DDR_DS_T_RTP 7.5 /* Minimal Read-to-Precharge time (ns). Will use max of this divided by tCK and CONFIG_EZYNQ_DDR_DS_RTP */
#define CONFIG_EZYNQ_DDR_DS_WTR 4 /* Minimal Write-to-Read time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_DS_T_WTR/tCK */
#define CONFIG_EZYNQ_DDR_DS_T_WTR 7.5 /* Minimal Write-to-Read time (ns). Will use max of this divided by tCK and CONFIG_EZYNQ_DDR_DS_WTR */
#define CONFIG_EZYNQ_DDR_DS_XP 4 /* Minimal time from power down (DLL on) to any operation (in tCK) */
#define CONFIG_EZYNQ_DDR_DS_T_DQSCK_MAX 5.5 /* LPDDR2 only. DQS output access time from CK (ns). Used for LPDDR2 */
#define CONFIG_EZYNQ_DDR_DS_CCD 5 /* DESCRIPTION':'CAS-to-CAS command delay (in tCK) (4 in Micron DS) */
#define CONFIG_EZYNQ_DDR_DS_RRD 6 /* ACTIVATE-to-ACTIVATE minimal command period (in tCK) */
#define CONFIG_EZYNQ_DDR_DS_T_RRD 10.0 /* ACTIVATE-to-ACTIVATE minimal command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RRD automatically */
#define CONFIG_EZYNQ_DDR_DS_MRD 4 /* MODE REGISTER SET command period (in tCK) */
#define CONFIG_EZYNQ_DDR_DS_MOD 12 /* MODE REGISTER SET update delay (in tCK) */