self.ddrc_register_sets={'PRE':ezynq_registers.EzynqRegisters(self.DDRC_DEFS,0,regs_masked,permit_undefined_bits),# all now start from the same registers
self.ddriob_register_sets={'PRE':ezynq_registers.EzynqRegisters(self.DDRIOB_DEFS,0,regs_masked,permit_undefined_bits),# all now start from the same registers
# self.ddrc_register_sets= {'PRE': ezynq_registers.EzynqRegisters(self.DDRC_DEFS,0,regs_masked,permit_undefined_bits), # all now start from the same registers
# self.ddriob_register_sets= {'PRE': ezynq_registers.EzynqRegisters(self.DDRIOB_DEFS,0,regs_masked,permit_undefined_bits), # all now start from the same registers
reg_set.parse_options_set(raw_configs,prefix,postfix,self.postfixes,qualifier_char,force,warn)#force - readonly/undefined fields, warn: data does not fit in the bit field
'a9_rst1':{'r':(1,1),'d':0,'c':'CPU 1 software reset control: 0 - no reset, 1 - hold in reset'},
'a9_rst0':{'r':(0,0),'d':0,'c':'CPU 0 software reset control: 0 - no reset, 1 - hold in reset'}}},
'ps_awdt_ctrl':{'OFFS':0x24c,'DFLT':0,'RW':'RW',# Never set
'COMMENTS':'CPU reset and clock control',
'FIELDS':{
'reserved':{'r':(2,31),'d':0,'c':'reserved'},
'ctrl1':{'r':(1,1),'d':0,'c':'Select target for APU watchdog timer 1: 0 - same as PS_SRST_B, 1 - CPU associated with this WDT'},
'ctrl0':{'r':(0,0),'d':0,'c':'Select target for APU watchdog timer 0: 0 - same as PS_SRST_B, 1 - CPU associated with this WDT'}}},
'reboot_status':{'OFFS':0x258,'DFLT':0x00400000,'RW':'RW',# Never set
'COMMENTS':'Reboot status, persistent through reboots (but POR)',
'FIELDS':{
'reboot_state':{'r':(24,31),'d':0,'c':'1 byte data that is preserved through all resets but POR. RBL puts last known reset reason here'},
'reserved':{'r':(23,23),'d':0,'c':'reserved'},
'por':{'r':(22,22),'d':0x1,'c':'Last reset was POR (written by RBL)'},
'srst_b':{'r':(21,21),'d':0,'c':'Last reset was SRST_B (written by RBL)'},
'dbg_rst':{'r':(20,20),'d':0,'c':'Last reset was by debug system (written by RBL)'},
'slc_rst':{'r':(19,19),'d':0,'c':'Last reset was SLC soft reset (written by RBL)'},
'awdt1_rst':{'r':(18,18),'d':0,'c':'Last reset was by APU watchdog timer1 (written by RBL)'},
'awdt0_rst':{'r':(17,17),'d':0,'c':'Last reset was by APU watchdog timer0 (written by RBL)'},
'swdt_rst':{'r':(16,16),'d':0,'c':'Last reset was by system watchdog timeout (written by RBL)'},
'bootrom_error_code':{'r':(0,15),'d':0,'c':'RBL error code (written by RBL)'}}},
'boot_mode':{'OFFS':0x25c,'RW':'M',#
'COMMENTS':'Boot mode strapping pins state',
'FIELDS':{
'reserved':{'r':(5,31),'d':0,'c':'reserved'},
'pll_bypass':{'r':(4,4),'d':0,'m':'R','c':'1 PLL is enabled, outputs routed to clock generators, 0 - PLLs are diusabled and bypassed'},
'boot_mode':{'r':(0,3),'m':'R','c':'boot mode pins as sampled'}}},
'apu_ctrl':{'OFFS':0x300,'DFLT':0,'RW':'RW',# Never set
'COMMENTS':'APU control',
'FIELDS':{
'reserved':{'r':(3,31),'d':0,'c':'reserved'},
'cfgsdisable':{'r':(2,2),'d':0,'c':'Disable write to some system control processor registers and some GIC registers. Reset by POR only'},
'cp15sdiasble':{'r':(0,1),'d':0,'c':'Disable write to some system control processor (CP15) registers in each processor. Reset by POR only'}}},
'wdt_clk_sel':{'OFFS':0x304,'DFLT':0,'RW':'RW',# Never set
'COMMENTS':'SWDT source clock select',
'FIELDS':{
'reserved':{'r':(1,31),'d':0,'c':'reserved'},
'sel':{'r':(0,1),'d':0,'c':'SWDT clock select: 0 - internal CPU_1x, 1 - PL via EMIO or MIO pin'}}},
'ddr_urgent':{'OFFS':0x600,'DFLT':0,'RW':'RW',
'COMMENTS':'DDR Urgent Control',
'FIELDS':{
'reserved':{'r':(8,31),'d':0,'c':'reserved'},
's3_arurgent':{'r':(7,7),'d':0,'c':'Read port 3 - set high priority'},
's2_arurgent':{'r':(6,6),'d':0,'c':'Read port 2 - set high priority'},
's3_arurgent':{'r':(5,5),'d':0,'c':'Read port 1 - set high priority'},
's0_arurgent':{'r':(4,4),'d':0,'c':'Read port 0 - set high priority'},
's3_awurgent':{'r':(3,3),'d':0,'c':'Write port 3 - set high priority'},
's2_awurgent':{'r':(2,2),'d':0,'c':'Write port 2 - set high priority'},
's1_awurgent':{'r':(1,1),'d':0,'c':'Write port 1 - set high priority'},
's0_awurgent':{'r':(0,0),'d':0,'c':'Write port 0 - set high priority'}}},
'ddr_cal_start':{'OFFS':0x60c,'DFLT':0,'RW':'RW',
'COMMENTS':'DDR Calibration start',
'FIELDS':{
'reserved':{'r':(2,31),'d':0,'c':'reserved'},
'start_cal_dll':{'r':(1,1),'d':0,'c':'1 - Start DLL calibration command (self-clearing). Only needed if auto calibration is disabled in reg_ddrc_dis_dll_calib'},
'start_cal_short':{'r':(0,0),'d':0,'c':'1 - Start ZQ calibration short command (self-clearing). Only needed if auto calibration is disabled in reg_ddrc_dis_auto_dq'}}},
'ddr_ref_start':{'OFFS':0x614,'DFLT':0,'RW':'RW',
'COMMENTS':'DDR Refresh start',
'FIELDS':{
'reserved':{'r':(1,31),'d':0,'c':'reserved'},
'start_ref':{'r':(0,0),'d':0,'c':'1 - Start Refresh (self-clearing). Only needed if auto refresh is disabled in reg_ddrc_dis_auto_refresh'}}},
'ddr_cmd_sta':{'OFFS':0x618,'DFLT':0,'RO':'RW',
'COMMENTS':'DDR Command queue state',
'FIELDS':{
'reserved':{'r':(1,31),'d':0,'c':'reserved'},
'vmd_q_empty':{'r':(0,0),'d':0,'m':'R','c':'0 - no commands fro DDRC are queued, 1 - commands pending'}}},