Commit 60c8fcd2 authored by Andrey Filippov's avatar Andrey Filippov

Re-organized DDR-related parameters to separate device datasheet ones

parent 4e40c7aa
......@@ -69,6 +69,8 @@ class EzynqDDR:
#TODO: just testing on a few pars, migrate more of them
try:
tCK=1000.0/self.features.get_par_value('FREQ_MHZ')
# print 'FREQ_MHZ=',self.features.get_par_value('FREQ_MHZ')
try:
self.features.set_max_value('RP', int(math.ceil(self.features.get_par_value('T_RP')/tCK)))
except:
......@@ -320,6 +322,23 @@ class EzynqDDR:
tFAWx1=int(math.ceil(self.features.get_par_value('T_FAW')/tCK))
inactiveToPDx32=6 # cycles 'Power down after this many clocks of NOP/DESELECT (if enabled in mcr). Make configurable?
WR=int(math.ceil(tWR/tCK))
# print 'tWR=',tWR,'tCK=',tCK
wr_options_ddr3=(16,5,6,7,8,10,12,14)
# some values are not valid for DDR3 when writing to MR0 register, trying to fix WR (in tCK) to be valid
if is_DDR3 and (not WR in wr_options_ddr3):
print 'Calculated value for Write recovery (WR): '+str(WR)+ ' (as defined by tWR), is not valid for DDR3 MR0, it only supports '+str(sorted(wr_options_ddr3))
print 'trying to adjust WR:'
cheat_down=0.1 # reduce calculated WR if before rounding up it did not exceed integer value by more than 'cheat'
WR1=int(math.ceil(tWR/tCK-cheat_down))
if WR1 in wr_options_ddr3:
print 'Using WR='+str(WR1)+' instead of '+str(WR)+' (cheating down), before rounding the value was '+str(tWR/tCK)
WR=WR1
elif (WR+1) in wr_options_ddr3:
print 'Using WR='+str(WR+1)+' instead of '+str(WR)+' (to much to cheat down, increasing to next valid), before rounding the value was '+str(tWR/tCK)
WR=WR+1
else:
raise Exception('Could not fix the value of WR, please check frequency ('+self.features.get_par_confname('FREQ_MHZ')+
') and write recovery (ns) '+ self.features.get_par_confname('T_WR'))
WL=self.features.get_par_value('CWL')
BL=self.features.get_par_value('BL')
wr2pre=WL+BL/2+WR
......@@ -515,11 +534,11 @@ class EzynqDDR:
except:
raise Exception('Wrong value for CAS latency: '+str(CL)+ ' - only CL=5..14 are supported by DDR3')
mr_dll_reset=1 # Seems to be always set (including dflt)?
wr_options=(16,5,6,7,8,10,12,14)
wr_options_ddr3=(16,5,6,7,8,10,12,14)
try:
mr_write_recovery=wr_options.index(WR)
mr_write_recovery=wr_options_ddr3.index(WR)
except:
raise Exception('Wrong value for Write recovery (WR): '+str(WR)+ ' (may be defined by tWR), DDR3 only supports '+str(wr_options))
raise Exception('Wrong value for Write recovery (WR): '+str(WR)+ ' (may be defined by tWR), DDR3 only supports '+str(sorted(wr_options_ddr3)))
mr_PD = 0 # 0 - DLL off during PD (slow exit), 1 - DLL on during PD (fast exit)
mr=set_random_bits(mr, mr_bl, (0,1))
mr=set_random_bits(mr, mr_bt, (3, ))
......
......@@ -25,61 +25,18 @@ __status__ = "Development"
DDR_CFG_DEFS=[
{'NAME':'ENABLE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ENABLE','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':True,
'DESCRIPTION':'Enable DDR memory'},
{'NAME':'MEMORY_TYPE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_MEMORY_TYPE','TYPE':('DDR3','DDR3L','DDR2','LPDDR2'),'MANDATORY':True,'DERIVED':False,'DEFAULT':'DDR3',
'DESCRIPTION':'DDR memory type'},
{'NAME':'TARGET_FREQ_MHZ', 'CONF_NAME':'CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ','TYPE':'F','MANDATORY':True,'DERIVED':True,'DEFAULT':533.333333,
'DESCRIPTION':'Target DDR clock frequency in MHz (actual frequency will depend on the clock/clock muxes)'},
{'NAME':'FREQ_MHZ', 'CONF_NAME':'CONFIG_EZYNQ_DDR_FREQ_MHZ','TYPE':'F','MANDATORY':True,'DERIVED':True,'DEFAULT':533.333333,
'DESCRIPTION':'Actual DDR clock frequency in MHz, may be derived form CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ and clock multiplexer settings'},
{'NAME':'CL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'CAS read latency (in tCK)'},
{'NAME':'AL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_AL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':0,
'DESCRIPTION':'Posted CAS additive latency (in tCK)'},
{'NAME':'CWL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CWL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':6,
'DESCRIPTION':'CAS write latency (in tCK)'},
{'NAME':'RCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_RCD','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'RAS to CAS delay (in tCK)'},
{'NAME':'RP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_RP','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'Row Precharge time (in tCK)'},
{'NAME':'T_RC', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RC','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':48.75,
'DESCRIPTION':'Activate to Activate or Refresh command period (ns)'},
{'NAME':'T_RAS_MIN', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RAS_MIN','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':35.0,
'DESCRIPTION':'Minimal Row Active time (ns)'},
{'NAME':'T_FAW', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_FAW','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':40.0,
'DESCRIPTION':'Minimal running window for 4 page activates (ns)'},
{'NAME':'T_RFC', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RFC','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':350.0,
'DESCRIPTION':'Minimal Refresh-to-Activate or Refresh command period (ns)'},
{'NAME':'T_WR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_WR','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':15.0,
'DESCRIPTION':'Write recovery time (ns)'},
{'NAME':'BANK_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BANK_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':3,
'DESCRIPTION':'Number of DDR banks'},
{'NAME':'ROW_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ROW_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':15,
'DESCRIPTION':'Number of DDR banks'},
{'NAME':'COL_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_COL_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':10,
'DESCRIPTION':'Number of DDR banks'},
'DESCRIPTION':'Actual DDR clock frequency in MHz, may be derived form CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ and clock multiplexer settings'},
{'NAME':'BANK_ADDR_MAP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BANK_ADDR_MAP','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':10,
'DESCRIPTION':'DRAM address mapping: number of combined column and row addresses lower than BA0'},
{'NAME':'ARB_PAGE_BANK', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ARB_PAGE_BANK','TYPE':'B','MANDATORY':False,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Enable Arbiter prioritization based on page/bank match'},
{'NAME':'ECC', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ECC','TYPE':'B','MANDATORY':False,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Enable ECC for the DDR memory'},
{'NAME':'BUS_WIDTH', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BUS_WIDTH','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':32,
'DESCRIPTION':'SoC DDR bus width'},
{'NAME':'BL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BL','TYPE':(8,4,16),'MANDATORY':True,'DERIVED':False,'DEFAULT':8, # DDR2 may have different lengths?
'DESCRIPTION':'Burst length, 16 is only supported for LPDDR2'},
{'NAME':'HIGH_TEMP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_HIGH_TEMP','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'High temperature (influences refresh)'},
{'NAME':'T_REFI_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_REFI_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.8,
'DESCRIPTION':'Maximal average periodic refresh, microseconds. Will be automatically reduced if high temperature option is selected'},
{'NAME':'PARTNO', 'CONF_NAME':'CONFIG_EZYNQ_DDR_PARTNO','TYPE':'T','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Memory part number (currently not used - derive some parameters later)'},
{'NAME':'DRAM_WIDTH', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DRAM_WIDTH','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':16,
'DESCRIPTION':'Memory chip bus width'},
{'NAME':'SPEED_BIN', 'CONF_NAME':'CONFIG_EZYNQ_DDR_SPEED_BIN','TYPE':'T','MANDATORY':True,'DERIVED':False,'DEFAULT':'DDR3_1066F',
'DESCRIPTION':'Memory speed bin (currently not used - derive timing later)'},
{'NAME':'TRAIN_WRITE_LEVEL','CONF_NAME':'CONFIG_EZYNQ_DDR_TRAIN_WRITE_LEVEL','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Automatically train write leveling during initialization'},
{'NAME':'TRAIN_READ_GATE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_TRAIN_READ_GATE','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
......@@ -90,6 +47,24 @@ DDR_CFG_DEFS=[
'DESCRIPTION':'Enable clock stop'},
{'NAME':'INTERNAL_VREF', 'CONF_NAME':'CONFIG_EZYNQ_DDR_USE_INTERNAL_VREF','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Use internal Vref'},
###### DDR Dependent ######
{'NAME':'CL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'CAS read latency (in tCK)'},
{'NAME':'CWL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CWL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':6,
'DESCRIPTION':'CAS write latency (in tCK)'},
{'NAME':'AL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_AL','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':0,
'DESCRIPTION':'Posted CAS additive latency (in tCK)'},
{'NAME':'BL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BL','TYPE':(8,4,16),'MANDATORY':True,'DERIVED':False,'DEFAULT':8, # DDR2 may have different lengths?
'DESCRIPTION':'Burst length, 16 is only supported for LPDDR2'},
{'NAME':'HIGH_TEMP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_HIGH_TEMP','TYPE':'B','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'High temperature (influences refresh)'},
{'NAME':'SPEED_BIN', 'CONF_NAME':'CONFIG_EZYNQ_DDR_SPEED_BIN','TYPE':'T','MANDATORY':True,'DERIVED':False,'DEFAULT':'DDR3_1066F',
'DESCRIPTION':'Memory speed bin (currently not used - derive timing later)'}, # not yet used
{'NAME':'DDR2_RTT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DDR2_RTT','TYPE':('DISABLED','75','150','50'),'MANDATORY':False,'DERIVED':False,'DEFAULT':'75',
'DESCRIPTION':'DDR2 on-chip termination, Ohm'},
{'NAME':'DDR3_RTT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DDR3_RTT','TYPE':('DISABLED','60','120','40'),'MANDATORY':False,'DERIVED':False,'DEFAULT':'60',
'DESCRIPTION':'DDR3 on-chip termination, Ohm'}, # Does not include 20 & 30 - not clear if DDRC can use them with auto write leveling
{'NAME':'OUT_SLEW_NEG', 'CONF_NAME':'CONFIG_EZYNQ_DDR_OUT_SLEW_NEG','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':26,
'DESCRIPTION':'Slew rate negative for DDR address/clock outputs'},
{'NAME':'OUT_SLEW_POS', 'CONF_NAME':'CONFIG_EZYNQ_DDR_OUT_SLEW_POS','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':26,
......@@ -106,112 +81,130 @@ DDR_CFG_DEFS=[
'DESCRIPTION':'Drive strength negative for driving DDR DQ/DQS signals'},
{'NAME':'BIDIR_DRIVE_POS', 'CONF_NAME':'CONFIG_EZYNQ_DDR_BIDIR_DRIVE_POS','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':28,
'DESCRIPTION':'Slew rate positive for driving DDR DQ/DQS signals'},
{'NAME':'RTP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_RTP','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal Read-to-Precharge time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_T_RTP/CONFIG_EZYNQ_DDR_T_CK'},
{'NAME':'T_RTP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RTP','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Minimal Read-to-Precharge time (ns). Will use max of this divided by CONFIG_EZYNQ_DDR_T_CK and CONFIG_EZYNQ_DDR_RTP'},
{'NAME':'WTR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_WTR','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal Write-to-Read time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_T_WTR/CONFIG_EZYNQ_DDR_T_CK'},
{'NAME':'T_WTR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_WTR','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Minimal Write-to-Read time (ns). Will use max of this divided by CONFIG_EZYNQ_DDR_T_CK and CONFIG_EZYNQ_DDR_WTR'},
{'NAME':'XP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_XP','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal Minimal time from power down (DLL on) to any operation (in tCK)'},
{'NAME':'T_DQSCK_MAX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_DQSCK_MAX','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
###### DDR Datasheet #######
{'NAME':'PARTNO', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_PARTNO','TYPE':'T','MANDATORY':True,'DERIVED':False,'DEFAULT':False,
'DESCRIPTION':'Memory part number (currently not used - derive some parameters later)'},
{'NAME':'MEMORY_TYPE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_MEMORY_TYPE','TYPE':('DDR3','DDR3L','DDR2','LPDDR2'),'MANDATORY':True,'DERIVED':False,'DEFAULT':'DDR3',
'DESCRIPTION':'DDR memory type: DDR3 (1.5V), DDR3L (1.35V), DDR2 (1.8V), LPDDR2 (1.2V)'},
{'NAME':'BANK_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_BANK_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':3,
'DESCRIPTION':'Number of DDR banks'},
{'NAME':'ROW_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_ROW_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':15,
'DESCRIPTION':'Number of DDR row address bits'},
{'NAME':'COL_ADDR_COUNT', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_COL_ADDR_COUNT','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':10,
'DESCRIPTION':'Number of DDR column address bits'},
{'NAME':'DRAM_WIDTH', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_DRAM_WIDTH','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':16,
'DESCRIPTION':'Memory chip bus width'},# not used
{'NAME':'RCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_RCD','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'RAS to CAS delay (in tCK)'},
{'NAME':'T_RCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RCD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':13.1,
'DESCRIPTION':'Activate to internal Read or Write (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RCD automatically'},
{'NAME':'RP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_RP','TYPE':'I','MANDATORY':True,'DERIVED':False,'DEFAULT':7,
'DESCRIPTION':'Row Precharge time (in tCK)'},
{'NAME':'T_RP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RP','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':13.1,
'DESCRIPTION':'Precharge command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RP automatically'},
{'NAME':'T_RC', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RC','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':48.75,
'DESCRIPTION':'Activate to Activate or Refresh command period (ns)'},
{'NAME':'T_RAS_MIN', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RAS_MIN','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':35.0,
'DESCRIPTION':'Minimal Row Active time (ns)'},
{'NAME':'T_FAW', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_FAW','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':40.0,
'DESCRIPTION':'Minimal running window for 4 page activates (ns)'},
{'NAME':'T_RFC', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RFC','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':350.0,
'DESCRIPTION':'Minimal Refresh-to-Activate or Refresh command period (ns)'},
{'NAME':'T_WR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_WR','TYPE':'F','MANDATORY':True,'DERIVED':False,'DEFAULT':15.0,
'DESCRIPTION':'Write recovery time (ns)'},
{'NAME':'T_REFI_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_REFI_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.8,
'DESCRIPTION':'Maximal average periodic refresh, microseconds. Will be automatically reduced if high temperature option is selected'},
{'NAME':'RTP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_RTP','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal Read-to-Precharge time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_DS_T_RTP/tCK'},
{'NAME':'T_RTP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RTP','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Minimal Read-to-Precharge time (ns). Will use max of this divided by tCK and CONFIG_EZYNQ_DDR_DS_RTP'},
{'NAME':'WTR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_WTR','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal Write-to-Read time (in tCK). Will use max of this and CONFIG_EZYNQ_DDR_DS_T_WTR/tCK'},
{'NAME':'T_WTR', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_WTR','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Minimal Write-to-Read time (ns). Will use max of this divided by tCK and CONFIG_EZYNQ_DDR_DS_WTR'},
{'NAME':'XP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_XP','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'Minimal time from power down (DLL on) to any operation (in tCK)'},
{'NAME':'T_DQSCK_MAX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_DQSCK_MAX','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'DQS output access time from CK (ns). Used for LPDDR2'},
{'NAME':'T_RP', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RP','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':13.1,
'DESCRIPTION':'Precharge command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_RP automatically'},
{'NAME':'T_RCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RCD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':13.1,
'DESCRIPTION':'Activate to internal Read or Write (ns). May be used to calculate CONFIG_EZYNQ_DDR_RCD automatically'},
{'NAME':'CCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CCD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':5,
{'NAME':'CCD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_CCD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':5,
'DESCRIPTION':'CAS-to-CAS command delay (in tCK)'},
{'NAME':'RRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_RRD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':6,
{'NAME':'RRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_RRD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':6,
'DESCRIPTION':'ACTIVATE-to-ACTIVATE minimal command period (in tCK)'},
{'NAME':'T_RRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_RRD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':10.0,
'DESCRIPTION':'ACTIVATE-to-ACTIVATE minimal command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_RRD automatically'},
{'NAME':'MRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_MRD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
{'NAME':'T_RRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_RRD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':10.0,
'DESCRIPTION':'ACTIVATE-to-ACTIVATE minimal command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RRD automatically'},
{'NAME':'MRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_MRD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':4,
'DESCRIPTION':'MODE REGISTER SET command period (in tCK)'},
{'NAME':'MOD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_MOD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':12,
{'NAME':'MOD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_MOD','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':12,
'DESCRIPTION':'MODE REGISTER SET update delay (in tCK)'},
{'NAME':'T_MOD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_MOD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':15.0,
{'NAME':'T_MOD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_MOD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':15.0,
'DESCRIPTION':'MODE REGISTER SET update delay (ns).'},
{'NAME':'DDR2_RTT', 'CONF_NAME':'CONFIG_EZYNQ_DDR2_RTT','TYPE':('DISABLED','75','150','50'),'MANDATORY':False,'DERIVED':False,'DEFAULT':'75',
'DESCRIPTION':'DDR2 on-chip termination, Ohm'},
{'NAME':'DDR3_RTT', 'CONF_NAME':'CONFIG_EZYNQ_DDR3_RTT','TYPE':('DISABLED','60','120','40'),'MANDATORY':False,'DERIVED':False,'DEFAULT':'60',
'DESCRIPTION':'DDR3 on-chip termination, Ohm'}, # Does not include 20 & 30 - not clear if DDRC can use them with auto write leveling
{'NAME':'T_WLMRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_WLMRD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':40.0,
{'NAME':'T_WLMRD', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_WLMRD','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':40.0,
'DESCRIPTION':'Write leveling : time to the first DQS rising edge (ns).'},
{'NAME':'CKE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CKE','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
{'NAME':'CKE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_CKE','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
'DESCRIPTION':'CKE min pulse width (in tCK)'},
{'NAME':'T_CKE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_CKE','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
{'NAME':'T_CKE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_CKE','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'CKE min pulse width (ns).'},
{'NAME':'CKSRE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CKSRE','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
{'NAME':'CKSRE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_CKSRE','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
'DESCRIPTION':'Keep valid clock after self refresh/power down entry (in tCK)'},
{'NAME':'T_CKSRE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_CKSRE','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
{'NAME':'T_CKSRE', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_CKSRE','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Keep valid clock after self refresh/power down entry (ns).'},
{'NAME':'CKSRX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_CKSRX','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
{'NAME':'CKSRX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_CKSRX','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':3,
'DESCRIPTION':'Valid clock before self refresh, power down or reset exit (in tCK)'},
{'NAME':'T_CKSRX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_CKSRX','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
{'NAME':'T_CKSRX', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_CKSRX','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':7.5,
'DESCRIPTION':'Valid clock before self refresh, power down or reset exit (ns).'},
{'NAME':'ZQCS', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ZQCS','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':64,
{'NAME':'ZQCS', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_ZQCS','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':64,
'DESCRIPTION':'ZQCS command: short calibration time (in tCK)'},
{'NAME':'ZQCL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_ZQCL','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':512,
{'NAME':'ZQCL', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_ZQCL','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':512,
'DESCRIPTION':'ZQCL command: long calibration time, including init (in tCK)'},
{'NAME':'INIT2', 'CONF_NAME':'CONFIG_EZYNQ_DDR_INIT2','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':5,
{'NAME':'INIT2', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_INIT2','TYPE':'I','MANDATORY':False,'DERIVED':False,'DEFAULT':5,
'DESCRIPTION':'LPDDR2 only: tINIT2 (in tCK): clock stable before CKE high'},
{'NAME':'T_INIT4_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_INIT4_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':1.0,
{'NAME':'T_INIT4_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_INIT4_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':1.0,
'DESCRIPTION':'LPDDR2 only: tINIT4 (in us)- minimal idle time after RESET command.'},
{'NAME':'T_INIT5_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_INIT5_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':10.0,
{'NAME':'T_INIT5_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_INIT5_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':10.0,
'DESCRIPTION':'LPDDR2 only: tINIT5 (in us)- maximal duration of device auto initialization.'},
{'NAME':'T_ZQINIT_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_T_ZQINIT_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':1.0,
{'NAME':'T_ZQINIT_US', 'CONF_NAME':'CONFIG_EZYNQ_DDR_DS_T_ZQINIT_US','TYPE':'F','MANDATORY':False,'DERIVED':False,'DEFAULT':1.0,
'DESCRIPTION':'LPDDR2 only: tZQINIT (in us)- ZQ initial calibration time.'},
]
# CONFIG_EZYNQ_DDR_T_INIT4_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_T_INIT5_US = 10.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_T_ZQINIT_US = 1.0 #(us) LPDDR2 ONLY
]
# CONFIG_EZYNQ_DDR_DS_T_INIT4_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_T_INIT5_US = 10.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_T_ZQINIT_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR3_RTT = 60 # DISABLED, 60,120,40 - only used for DDR3
# CONFIG_EZYNQ_DDR2_RTT = 75 # DISABLED, 75,150,50 - only used for DDR2
# CONFIG_EZYNQ_DDR_T_RTP = 7.5
# CONFIG_EZYNQ_DDR_WTR = 4
# CONFIG_EZYNQ_DDR_T_WTR = 7.5
# CONFIG_EZYNQ_DDR_XP = 4 # power down (DLL on) to any operation, cycles
# CONFIG_EZYNQ_DDR_T_DQSCK_MAX = 5.5 # (LPDDR2 only)
# CONFIG_EZYNQ_DDR_T_RP = 13.1
# CONFIG_EZYNQ_DDR_T_RCD = 13.1
# CONFIG_EZYNQ_DDR_CCD = 4
# CONFIG_EZYNQ_DDR_RRD = 4
# CONFIG_EZYNQ_DDR_T_RRD = 10.0
# CONFIG_EZYNQ_DDR_MRD = 4
# CONFIG_EZYNQ_DDR_T_WLMRD = 40.0 #
# CONFIG_EZYNQ_DDR_T_MOD = 15.0
# CONFIG_EZYNQ_DDR_MOD = 12
# CONFIG_EZYNQ_DDR_DS_T_RTP = 7.5
# CONFIG_EZYNQ_DDR_DS_WTR = 4
# CONFIG_EZYNQ_DDR_DS_T_WTR = 7.5
# CONFIG_EZYNQ_DDR_DS_XP = 4 # power down (DLL on) to any operation, cycles
# CONFIG_EZYNQ_DDR_DS_T_DQSCK_MAX = 5.5 # (LPDDR2 only)
# CONFIG_EZYNQ_DDR_DS_T_RP = 13.1
# CONFIG_EZYNQ_DDR_DS_T_RCD = 13.1
# CONFIG_EZYNQ_DDR_DS_CCD = 4
# CONFIG_EZYNQ_DDR_DS_RRD = 4
# CONFIG_EZYNQ_DDR_DS_T_RRD = 10.0
# CONFIG_EZYNQ_DDR_DS_MRD = 4
# CONFIG_EZYNQ_DDR_DS_T_WLMRD = 40.0 #
# CONFIG_EZYNQ_DDR_DS_T_MOD = 15.0
# CONFIG_EZYNQ_DDR_DS_MOD = 12
# CONFIG_EZYNQ_DDR_T_CKE = 5.625 # 7.5
# CONFIG_EZYNQ_DDR_CKE = 3
# CONFIG_EZYNQ_DDR_DS_T_CKE = 5.625 # 7.5
# CONFIG_EZYNQ_DDR_DS_CKE = 3
# CONFIG_EZYNQ_DDR_T_CKSRE = 10.0
# CONFIG_EZYNQ_DDR_CKSRE = 5
# CONFIG_EZYNQ_DDR_DS_T_CKSRE = 10.0
# CONFIG_EZYNQ_DDR_DS_CKSRE = 5
# CONFIG_EZYNQ_DDR_T_CKSRX = 10.0
# CONFIG_EZYNQ_DDR_CKSRX = 5
# CONFIG_EZYNQ_DDR_DS_T_CKSRX = 10.0
# CONFIG_EZYNQ_DDR_DS_CKSRX = 5
#CONFIG_EZYNQ_DDR_ZQCS = 64
#CONFIG_EZYNQ_DDR_ZQCL = 512
#CONFIG_EZYNQ_DDR_DS_ZQCS = 64
#CONFIG_EZYNQ_DDR_DS_ZQCL = 512
# CONFIG_EZYNQ_DDR_INIT2 = 5 #LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_T_INIT4_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_T_INIT5_US = 10.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_T_ZQINIT_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_INIT2 = 5 #LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_T_INIT4_US = 1.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_T_INIT5_US = 10.0 #(us) LPDDR2 ONLY
# CONFIG_EZYNQ_DDR_DS_T_ZQINIT_US = 1.0 #(us) LPDDR2 ONLY
......@@ -220,35 +213,35 @@ DDR_CFG_DEFS=[
# CONFIG_EZYNQ_DDR_FREQ_MHZ = 533.333333 *
# CONFIG_EZYNQ_DDR_CL = 7 *
# CONFIG_EZYNQ_DDR_CWL = 6 *
# CONFIG_EZYNQ_DDR_RCD = 7 (was CONFIG_EZYNQ_DDR_T_RCD = 7) *
# CONFIG_EZYNQ_DDR_RP = 7 (was CONFIG_EZYNQ_DDR_T_RP = 7) *
# CONFIG_EZYNQ_DDR_T_RC = 48.75 *
# CONFIG_EZYNQ_DDR_T_RAS_MIN = 35.0 *
# CONFIG_EZYNQ_DDR_T_FAW = 40.0 *
# CONFIG_EZYNQ_DDR_T_RFC = 350.0
# CONFIG_EZYNQ_DDR_T_WR = 15.0
# CONFIG_EZYNQ_DDR_RTP = 4
# CONFIG_EZYNQ_DDR_tRTP = 7.5
# CONFIG_EZYNQ_DDR_WTR = 4
# CONFIG_EZYNQ_DDR_tWTR = 7.5
# CONFIG_EZYNQ_DDR_DS_RCD = 7 (was CONFIG_EZYNQ_DDR_DS_T_RCD = 7) *
# CONFIG_EZYNQ_DDR_DS_RP = 7 (was CONFIG_EZYNQ_DDR_DS_T_RP = 7) *
# CONFIG_EZYNQ_DDR_DS_T_RC = 48.75 *
# CONFIG_EZYNQ_DDR_DS_T_RAS_MIN = 35.0 *
# CONFIG_EZYNQ_DDR_DS_T_FAW = 40.0 *
# CONFIG_EZYNQ_DDR_DS_T_RFC = 350.0
# CONFIG_EZYNQ_DDR_DS_T_WR = 15.0
# CONFIG_EZYNQ_DDR_DS_RTP = 4
# CONFIG_EZYNQ_DDR_DS_T_RTP = 7.5
# CONFIG_EZYNQ_DDR_DS_WTR = 4
# CONFIG_EZYNQ_DDR_DS_T_WTR = 7.5
# CONFIG_EZYNQ_DDR_AL = 0 *
# CONFIG_EZYNQ_DDR_BANK_ADDR_COUNT = 3 *
# CONFIG_EZYNQ_DDR_ROW_ADDR_COUNT = 15 *
# CONFIG_EZYNQ_DDR_COL_ADDR_COUNT = 10 *
# CONFIG_EZYNQ_DDR_DS_BANK_ADDR_COUNT = 3 *
# CONFIG_EZYNQ_DDR_DS_ROW_ADDR_COUNT = 15 *
# CONFIG_EZYNQ_DDR_DS_COL_ADDR_COUNT = 10 *
# CONFIG_EZYNQ_DDR_BANK_ADDR_MAP = 10
# CONFIG_EZYNQ_DDR_ARB_PAGE_BANK = Y
# CONFIG_EZYNQ_DDR_ENABLE = 1 *
# CONFIG_EZYNQ_DDR_MEMORY_TYPE = DDR3 *
# CONFIG_EZYNQ_DDR_DS_MEMORY_TYPE = DDR3 *
# CONFIG_EZYNQ_DDR_ECC = Disabled *
# CONFIG_EZYNQ_DDR_BUS_WIDTH = 32 *
# CONFIG_EZYNQ_DDR_BL = 8 *
# CONFIG_EZYNQ_DDR_T_REFI_US = 7.8 *
# CONFIG_EZYNQ_DDR_DS_T_REFI_US = 7.8 *
# CONFIG_EZYNQ_DDR_HIGH_TEMP = Normal *
# CONFIG_EZYNQ_DDR_PARTNO = MT41K256M16RE-125 *
# CONFIG_EZYNQ_DDR_DRAM_WIDTH = 16 *
# CONFIG_EZYNQ_DDR_DS_PARTNO = MT41K256M16RE-125 *
# CONFIG_EZYNQ_DDR_DS_DRAM_WIDTH = 16 *
# CONFIG_EZYNQ_DDR_SPEED_BIN = DDR3_1066F *
# CONFIG_EZYNQ_DDR_TRAIN_WRITE_LEVEL = 0
# CONFIG_EZYNQ_DDR_TRAIN_READ_GATE = 0
......
......@@ -75,116 +75,116 @@ CONFIG_EZYNQ_MIO_UART_1=48 # 8+4*N
#CONFIG_EZYNQ_MIO_GPIO_OUT_02= 0 # Set selected GPIO output to 0/1
#CONFIG_EZYNQ_MIO_GPIO_OUT_15= 1 # Set selected GPIO output to 0/1
## Boot image parameters
#RBL header parameters
CONFIG_EZYNQ_BOOT_USERDEF= 0x1234567 # will be saved in the file header
CONFIG_EZYNQ_BOOT_OCM_OFFSET= 0x8C0 # start of OCM data relative to the flash image start >=0x8C0, 63-bytes aligned
CONFIG_EZYNQ_BOOT_OCM_IMAGE_LENGTH= 0#0x30000 # number of bytes to load to the OCM memory, <= 0x30000
CONFIG_EZYNQ_START_EXEC= 0x00 # start of execution address
CONFIG_EZYNQ_DDR_PERIPHERAL_CLKSRC = DDR PLL
CONFIG_EZYNQ_DDR_RAM_BASEADDR = 0x00100000
CONFIG_EZYNQ_DDR_RAM_HIGHADDR = 0x3FFFFFFF
CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ = 533.3333 # New added
CONFIG_EZYNQ_DDR_FREQ_MHZ = 533.333374 # Taking available CLK and divisors into account?
CONFIG_EZYNQ_DCI_PERIPHERAL_FREQMHZ = 10.158731 # Taking available CLK and divisors into account?
CONFIG_EZYNQ_DDR_ENABLE = 1
CONFIG_EZYNQ_DDR_MEMORY_TYPE = DDR3
CONFIG_EZYNQ_DDR_ECC = Disabled
CONFIG_EZYNQ_DDR_BUS_WIDTH = 32
CONFIG_EZYNQ_DDR_BL = 8
CONFIG_EZYNQ_DDR_HIGH_TEMP = False # Normal
CONFIG_EZYNQ_DDR_T_REFI_US = 7.8
CONFIG_EZYNQ_DDR_T_RFC = 300 # 350.0
CONFIG_EZYNQ_DDR_T_WR = 15.0 # Write recovery time
CONFIG_EZYNQ_DDR_RTP = 4
CONFIG_EZYNQ_DDR_T_RTP = 7.5
CONFIG_EZYNQ_DDR_WTR = 4
CONFIG_EZYNQ_DDR_T_WTR = 7.5
CONFIG_EZYNQ_DDR_XP = 4 # power down (DLL on) to any operation, cycles
CONFIG_EZYNQ_DDR_T_DQSCK_MAX = 5.5 # (LPDDR2 only)
CONFIG_EZYNQ_DDR_T_WLMRD = 40.0 # Write leveling : time to the first DQS rising edge (ns)
CONFIG_EZYNQ_DDR_T_CKE = 7.5 # 5.625
CONFIG_EZYNQ_DDR_CKE = 3
CONFIG_EZYNQ_DDR_T_CKSRE = 10.0
CONFIG_EZYNQ_DDR_CKSRE = 5
CONFIG_EZYNQ_DDR_T_CKSRX = 10.0
CONFIG_EZYNQ_DDR_CKSRX = 5
CONFIG_EZYNQ_DDR_ZQCS = 64
CONFIG_EZYNQ_DDR_ZQCL = 512
CONFIG_EZYNQ_DDR_T_MOD = 15.0
CONFIG_EZYNQ_DDR_MOD = 12
CONFIG_EZYNQ_DDR_INIT2 = 5 #(tCK)LPDDR2 ONLY
CONFIG_EZYNQ_DDR_T_INIT4_US = 1.0 #(us) LPDDR2 ONLY
CONFIG_EZYNQ_DDR_T_INIT5_US = 10.0 #(us) LPDDR2 ONLY
CONFIG_EZYNQ_DDR_T_ZQINIT_US = 1.0 #(us) LPDDR2 ONLY
CONFIG_EZYNQ_DDR_PARTNO = MT41K256M16RE125
CONFIG_EZYNQ_DDR_DRAM_WIDTH = 16
#CONFIG_EZYNQ_DDR_DEVICE_CAPACITY_MBITS = 4096 - can be calculated
CONFIG_EZYNQ_DDR_SPEED_BIN = DDR3_1066F
CONFIG_EZYNQ_DDR_TRAIN_WRITE_LEVEL = 0
CONFIG_EZYNQ_DDR_TRAIN_READ_GATE = 0
CONFIG_EZYNQ_DDR_TRAIN_DATA_EYE = 0
CONFIG_EZYNQ_DDR_CLOCK_STOP_EN = 0
CONFIG_EZYNQ_DDR_USE_INTERNAL_VREF = 0
# undisclosed algorithm, get values from ps7*
CONFIG_EZYNQ_DDR_OUT_SLEW_NEG = 26
CONFIG_EZYNQ_DDR_OUT_SLEW_POS = 26
CONFIG_EZYNQ_DDR_OUT_DRIVE_NEG = 12
CONFIG_EZYNQ_DDR_OUT_DRIVE_POS = 28
CONFIG_EZYNQ_DDR_BIDIR_SLEW_NEG = 31
CONFIG_EZYNQ_DDR_BIDIR_SLEW_POS = 6
CONFIG_EZYNQ_DDR_BIDIR_DRIVE_NEG = 12
CONFIG_EZYNQ_DDR_BIDIR_DRIVE_POS = 28
CONFIG_EZYNQ_DDR_FREQ_MHZ = 533.333333
CONFIG_EZYNQ_DDR_BANK_ADDR_COUNT = 3
CONFIG_EZYNQ_DDR_ROW_ADDR_COUNT = 15
CONFIG_EZYNQ_DDR_COL_ADDR_COUNT = 10
CONFIG_EZYNQ_DDR_BANK_ADDR_MAP = 10 # number of combine CA and RA lower than BA0
CONFIG_EZYNQ_DDR_ARB_PAGE_BANK = N # Y # default N, testing
#just software testing - remove later
#CONFIG_EZYNQ_DDR_SETREG_ctrl_reg1__reg_ddrc_selfref_en_PRE = 1
#CONFIG_EZYNQ_DDR_SETREG_ctrl_reg1__reg_ddrc_lpr_num_entries_PRE = 5
#CONFIG_EZYNQ_DDR_SETREG_phy_wr_dqs_cfg0_PRE = 0xAAAAA
#CONFIG_EZYNQ_DDR_SETREG_phy_wr_dqs_cfg0__reg_phy_wr_dqs_slave_delay_PRE = 0x77
#CONFIG_EZYNQ_DDR_ARB_PAGE_BANK = N # Y # default N, testing
CONFIG_EZYNQ_DDR_CL = 7
CONFIG_EZYNQ_DDR_CWL = 6
#CONFIG_EZYNQ_DDR_T_RCD = 7
#CONFIG_EZYNQ_DDR_T_RP = 7
#testing calculation of derivative parameters
#CONFIG_EZYNQ_DDR_RCD = 7
#CONFIG_EZYNQ_DDR_RP = 7
CONFIG_EZYNQ_DDR_T_RP = 13.1
CONFIG_EZYNQ_DDR_T_RCD = 13.1
CONFIG_EZYNQ_DDR_CCD = 5 # 4 in Micron specs
#will use max of two
CONFIG_EZYNQ_DDR_RRD = 6 # 4 in Micron specs
CONFIG_EZYNQ_DDR_T_RRD = 10.0
CONFIG_EZYNQ_DDR_MRD = 4
CONFIG_EZYNQ_DDR2_RTT = 75 # DISABLED, 75,150,50 - only used for DDR2
CONFIG_EZYNQ_DDR3_RTT = 60 # DISABLED, 60,120,40 - only used for DDR3
CONFIG_EZYNQ_DDR_T_RC = 48.75
CONFIG_EZYNQ_DDR_T_RAS_MIN = 35.0
CONFIG_EZYNQ_DDR_T_FAW = 40.0
CONFIG_EZYNQ_DDR_AL = 0
# not yet processed
CONFIG_EZYNQ_DCI_PERIPHERAL_FREQMHZ = 10.158731 # Taking available CLK and divisors into account?
CONFIG_EZYNQ_DDR_PERIPHERAL_CLKSRC = DDR PLL
CONFIG_EZYNQ_DDR_RAM_BASEADDR = 0x00100000
CONFIG_EZYNQ_DDR_RAM_HIGHADDR = 0x3FFFFFFF
##### DDR independent ######
CONFIG_EZYNQ_DDR_ENABLE = Y # Enable DDR memory'},
CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ = 533.3333 # Target DDR clock frequency in MHz (actual frequency will depend on the clock/clock muxes)
#CONFIG_EZYNQ_DDR_FREQ_MHZ = 545.0 # Actual DDR clock frequency in MHz, may be derived form CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ and clock multiplexer settings. Causes tWR to go higher
#CONFIG_EZYNQ_DDR_FREQ_MHZ = 533.333374 # Actual DDR clock frequency in MHz, may be derived form CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ and clock multiplexer settings. Causes tWR to go higher
CONFIG_EZYNQ_DDR_FREQ_MHZ = 533.3333 # Actual DDR clock frequency in MHz, may be derived form CONFIG_EZYNQ_DDR_TARGET_FREQ_MHZ and clock multiplexer settings
CONFIG_EZYNQ_DDR_BANK_ADDR_MAP = 10 # DRAM address mapping: number of combined column and row addresses lower than BA0
CONFIG_EZYNQ_DDR_ARB_PAGE_BANK = N # Enable Arbiter prioritization based on page/bank match
CONFIG_EZYNQ_DDR_ECC = Disabled # Enable ECC for the DDR memory
CONFIG_EZYNQ_DDR_BUS_WIDTH = 32 # SoC DDR bus width
CONFIG_EZYNQ_DDR_TRAIN_WRITE_LEVEL =0 # Automatically train write leveling during initialization
CONFIG_EZYNQ_DDR_TRAIN_READ_GATE = 0 # Automatically train read gate timing during initialization
CONFIG_EZYNQ_DDR_TRAIN_DATA_EYE = 0 # Automatically train data eye during initialization
CONFIG_EZYNQ_DDR_CLOCK_STOP_EN = 0 # Enable clock stop
CONFIG_EZYNQ_DDR_USE_INTERNAL_VREF =0 # Use internal Vref
###### DDR Dependent ######
CONFIG_EZYNQ_DDR_CL = 7 # CAS read latency (in tCK)
CONFIG_EZYNQ_DDR_CWL = 6 # CAS write latency (in tCK)
CONFIG_EZYNQ_DDR_AL = 0 # Posted CAS additive latency (in tCK)
CONFIG_EZYNQ_DDR_BL = 8 # Burst length, 16 is only supported for LPDDR2
CONFIG_EZYNQ_DDR_HIGH_TEMP = False # Normal # High temperature (influences refresh)
CONFIG_EZYNQ_DDR_SPEED_BIN = DDR3_1066F # Memory speed bin (currently not used - derive timing later)
CONFIG_EZYNQ_DDR_DDR2_RTT = 75 # DDR2 on-chip termination, Ohm ('DISABLED','75','150','50'
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
CONFIG_EZYNQ_DDR_OUT_SLEW_NEG = 26 # Slew rate negative for DDR address/clock outputs
CONFIG_EZYNQ_DDR_OUT_SLEW_POS = 26 # Slew rate positive for DDR address/clock outputs
CONFIG_EZYNQ_DDR_OUT_DRIVE_NEG = 12 # Drive strength negative for DDR address/clock outputs
CONFIG_EZYNQ_DDR_OUT_DRIVE_POS = 28 # Drive strength positive for DDR address/clock outputs
CONFIG_EZYNQ_DDR_BIDIR_SLEW_NEG = 31 # Slew rate negative for driving DDR DQ/DQS signals
CONFIG_EZYNQ_DDR_BIDIR_SLEW_POS = 6 # Drive strength positive for driving DDR DQ/DQS signals
CONFIG_EZYNQ_DDR_BIDIR_DRIVE_NEG = 12 # Drive strength negative for driving DDR DQ/DQS signals
CONFIG_EZYNQ_DDR_BIDIR_DRIVE_POS = 28 # Slew rate positive for driving DDR DQ/DQS signals
###### DDR Datasheet (can be in include file) #######
CONFIG_EZYNQ_DDR_DS_PARTNO = MT41K256M16RE125 # Memory part number (currently not used - derive some parameters later)
CONFIG_EZYNQ_DDR_DS_MEMORY_TYPE = DDR3L # DDR memory type: DDR3 (1.5V), DDR3L (1.35V), DDR2 (1.8V), LPDDR2 (1.2V)
CONFIG_EZYNQ_DDR_DS_BANK_ADDR_COUNT = 3 # Number of DDR banks
CONFIG_EZYNQ_DDR_DS_ROW_ADDR_COUNT = 15 # Number of DDR Row Address bits
CONFIG_EZYNQ_DDR_DS_COL_ADDR_COUNT = 10 # Number of DDR Column address bits
CONFIG_EZYNQ_DDR_DS_DRAM_WIDTH = 16 # Memory chip bus width (not yet used)
CONFIG_EZYNQ_DDR_DS_RCD = 7 # DESCRIPTION':'RAS to CAS delay (in tCK)
CONFIG_EZYNQ_DDR_DS_T_RCD = 13.1 # Activate to internal Read or Write (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RCD automatically
CONFIG_EZYNQ_DDR_DS_RP = 7 # Row Precharge time (in tCK)
CONFIG_EZYNQ_DDR_DS_T_RP = 13.1 # Precharge command period (ns). May be used to calculate CONFIG_EZYNQ_DDR_DS_RP automatically,
CONFIG_EZYNQ_DDR_DS_T_RC = 48.75# Activate to Activate or Refresh command period (ns)
CONFIG_EZYNQ_DDR_DS_T_RAS_MIN = 35.0 # Minimal Row Active time (ns)
CONFIG_EZYNQ_DDR_DS_T_FAW = 40.0 # Minimal running window for 4 page activates (ns)
CONFIG_EZYNQ_DDR_DS_T_RFC = 300.0 # Minimal Refresh-to-Activate or Refresh command period (ns)
CONFIG_EZYNQ_DDR_DS_T_WR = 15.0 # Write recovery time (ns)
CONFIG_EZYNQ_DDR_DS_T_REFI_US = 7.8 # Maximal average periodic refresh, microseconds. Will be automatically reduced if high temperature option is selected
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
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
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
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
CONFIG_EZYNQ_DDR_DS_XP = 4 # Minimal time from power down (DLL on) to any operation (in tCK)
CONFIG_EZYNQ_DDR_DS_T_DQSCK_MAX = 5.5 # LPDDR2 only. DQS output access time from CK (ns). Used for LPDDR2
CONFIG_EZYNQ_DDR_DS_CCD = 5 # DESCRIPTION':'CAS-to-CAS command delay (in tCK) (4 in Micron DS)
CONFIG_EZYNQ_DDR_DS_RRD = 6 # ACTIVATE-to-ACTIVATE minimal command period (in tCK)
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
CONFIG_EZYNQ_DDR_DS_MRD = 4 # MODE REGISTER SET command period (in tCK)
CONFIG_EZYNQ_DDR_DS_MOD = 12 # MODE REGISTER SET update delay (in tCK)
CONFIG_EZYNQ_DDR_DS_T_MOD = 15.0 # MODE REGISTER SET update delay (ns).
CONFIG_EZYNQ_DDR_DS_T_WLMRD = 40.0 # Write leveling : time to the first DQS rising edge (ns).
CONFIG_EZYNQ_DDR_DS_CKE = 3 # CKE min pulse width (in tCK)
CONFIG_EZYNQ_DDR_DS_T_CKE = 7.5 # CKE min pulse width (ns). # 5.625
CONFIG_EZYNQ_DDR_DS_CKSRE = 5 # Keep valid clock after self refresh/power down entry (in tCK)
CONFIG_EZYNQ_DDR_DS_T_CKSRE = 10.0 # Keep valid clock after self refresh/power down entry (ns).
CONFIG_EZYNQ_DDR_DS_CKSRX = 5 # Valid clock before self refresh, power down or reset exit (in tCK)
CONFIG_EZYNQ_DDR_DS_T_CKSRX = 10.0 # Valid clock before self refresh, power down or reset exit (ns).
CONFIG_EZYNQ_DDR_DS_ZQCS = 64 # ZQCS command: short calibration time (in tCK)
CONFIG_EZYNQ_DDR_DS_ZQCL = 512 # ZQCL command: long calibration time, including init (in tCK)
CONFIG_EZYNQ_DDR_DS_INIT2 = 5 # LPDDR2 only: tINIT2 (in tCK): clock stable before CKE high
CONFIG_EZYNQ_DDR_DS_T_INIT4_US = 1.0 # LPDDR2 only: tINIT4 (in us)- minimal idle time after RESET command.
CONFIG_EZYNQ_DDR_DS_T_INIT5_US = 10.0 # LPDDR2 only: tINIT5 (in us)- maximal duration of device auto initialization.
CONFIG_EZYNQ_DDR_DS_T_ZQINIT_US = 1.0 # LPDDR2 only: tZQINIT (in us)- ZQ initial calibration time.
# Board/Soc parameters to set phases manually (or as a starting point for automatic) Not yet processed
CONFIG_EZYNQ_DDR_DQS_TO_CLK_DELAY_0 = 0.0
CONFIG_EZYNQ_DDR_DQS_TO_CLK_DELAY_1 = 0.0
CONFIG_EZYNQ_DDR_DQS_TO_CLK_DELAY_2 = 0.0
......@@ -239,22 +239,3 @@ CONFIG_EZYNQ_DDR_CLOCK_0_PROPOGATION_DELAY = 160
CONFIG_EZYNQ_DDR_CLOCK_1_PROPOGATION_DELAY = 160
CONFIG_EZYNQ_DDR_CLOCK_2_PROPOGATION_DELAY = 160
CONFIG_EZYNQ_DDR_CLOCK_3_PROPOGATION_DELAY = 160
# PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_0 = -0.005
# PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_1 = -0.004
# PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_2 = -0.008
# PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_3 = -0.058
# PCW_PACKAGE_DDR_BOARD_DELAY0 = 0.075
# PCW_PACKAGE_DDR_BOARD_DELAY1 = 0.076
# PCW_PACKAGE_DDR_BOARD_DELAY2 = 0.082
# PCW_PACKAGE_DDR_BOARD_DELAY3 = 0.100
#just software testing - remove later
CONFIG_EZYNQ_DDR_SETREG_ctrl_reg1__reg_ddrc_selfref_en_PRE = 1
CONFIG_EZYNQ_DDR_SETREG_ctrl_reg1__reg_ddrc_lpr_num_entries_PRE = 5
CONFIG_EZYNQ_DDR_SETREG_phy_wr_dqs_cfg0_PRE = 0xAAAAA
CONFIG_EZYNQ_DDR_SETREG_phy_wr_dqs_cfg0__reg_phy_wr_dqs_slave_delay_PRE = 0x77
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment