def __init__(self, debug_mode=1, dry_mode=True, saveFileName=None): global BUFFER_ADDRESS_LOGGER, BUFFER_LEN_LOGGER self.DEBUG_MODE = debug_mode self.DRY_MODE = dry_mode self.x393_mem = X393Mem(debug_mode, dry_mode) self.x393_axi_tasks = x393_axi_control_status.X393AxiControlStatus( debug_mode, dry_mode) self.x393_utils = x393_utils.X393Utils( debug_mode, dry_mode, saveFileName) # should not overwrite save file path self.X393_gpio = x393_gpio.X393GPIO(debug_mode, dry_mode, saveFileName) try: self.verbose = vrlg.VERBOSE except: pass if dry_mode: print("Running in simulated mode, using hard-coded addresses:") else: try: with open(MEM_PATH + BUFFER_ADDRESS_LOGGER_NAME) as sysfile: BUFFER_ADDRESS_LOGGER = int(sysfile.read(), 0) with open(MEM_PATH + BUFFER_PAGES_LOGGER_NAME) as sysfile: BUFFER_LEN_LOGGER = PAGE_SIZE * int(sysfile.read(), 0) except: print("Failed to get reserved physical memory range") print('BUFFER_ADDRESS_LOGGER=', BUFFER_ADDRESS_LOGGER) print('BUFFER_LEN_LOGGER=', BUFFER_LEN_LOGGER) return print('BUFFER_ADDRESS_LOGGER=0x%x' % (BUFFER_ADDRESS_LOGGER)) print('BUFFER_LEN_LOGGER=0x%x' % (BUFFER_LEN_LOGGER))
def __init__(self, debug_mode=1, dry_mode=False, pcb_rev="10389"): global VSC_DIR self.DEBUG_MODE = debug_mode if not dry_mode: if not os.path.exists("/dev/xdevcfg"): dry_mode = True print( "Program is forced to run in SIMULATED mode as '/dev/xdevcfg' does not exist (not a camera)" ) else: if os.path.exists(VSC_DIR_OLD): if self.DEBUG_MODE: print('x393_vsc3304: Running on OLD system') VSC_DIR = VSC_DIR_OLD elif os.path.exists(VSC_DIR_NEW): if self.DEBUG_MODE: print('x393_vsc3304: Running on NEW system') VSC_DIR = VSC_DIR_NEW else: print( "Does not seem to be a known system - both %s (old) and %s (new) are not found" % (VSC_DIR_OLD, VSC_DIR_NEW)) return self.DRY_MODE = dry_mode self.x393_mem = X393Mem(debug_mode, dry_mode, 1) if not pcb_rev in self.PCB_CONNECTIONS: print("Unknown PCB/rev: %s (defined: %s), using %s" % (pcb_rev, str(self.PCB_CONNECTIONS.keys()), self.PCB_REV)) else: self.PCB_REV = pcb_rev
def __init__(self, debug_mode=1, dry_mode=True, saveFileName=None): self.DEBUG_MODE = debug_mode self.DRY_MODE = dry_mode if saveFileName: self.saveFileName = saveFileName.strip() self.x393_mem = X393Mem(debug_mode, dry_mode) # self.x393_axi_tasks=X393AxiControlStatus(debug_mode,dry_mode) self.x393_axi_tasks = x393_axi_control_status.X393AxiControlStatus( debug_mode, dry_mode)
def __init__(self, debug_mode=1,dry_mode=True, saveFileName=None): self.DEBUG_MODE= debug_mode self.DRY_MODE= dry_mode self.x393_mem= X393Mem(debug_mode,dry_mode) self.x393_axi_tasks= x393_axi_control_status.X393AxiControlStatus(debug_mode,dry_mode) self.x393_utils= x393_utils.X393Utils(debug_mode,dry_mode, saveFileName) # should not overwrite save file path try: self.verbose=vrlg.VERBOSE except: pass
def __init__(self, debug_mode=1, dry_mode=True): self.DEBUG_MODE = debug_mode self.DRY_MODE = dry_mode self.x393_mem = X393Mem(debug_mode, dry_mode) try: self.verbose = vrlg.VERBOSE except: pass # self.__dict__.update(VerilogParameters.__dict__["_VerilogParameters__shared_state"]) # Add verilog parameters to the class namespace '''
def __init__(self, debug_mode=1, dry_mode=True): self.DEBUG_MODE = debug_mode self.DRY_MODE = dry_mode self.x393_mem = X393Mem(debug_mode, dry_mode) # self.x393_axi_tasks=X393AxiControlStatus(debug_mode,dry_mode) self.x393_axi_tasks = x393_axi_control_status.X393AxiControlStatus( debug_mode, dry_mode) # self.__dict__.update(VerilogParameters.__dict__["_VerilogParameters__shared_state"]) # Add verilog parameters to the class namespace try: self.verbose = vrlg.VERBOSE except: pass
def __init__(self, debug_mode=1, dry_mode=True): self.DEBUG_MODE = debug_mode self.DRY_MODE = dry_mode self.x393_mem = X393Mem(debug_mode, dry_mode) self.x393_axi_tasks = x393_axi_control_status.X393AxiControlStatus( debug_mode, dry_mode)