Exemplo n.º 1
0
 def _load_xilinx_device(self):
     self.device_name = self._cfg_manager.get_value('weblab_xilinx_experiment_xilinx_device')
     devices = [ i for i in XilinxDevices.getXilinxDeviceValues() if i == self.device_name ]
     if len(devices) == 1:
         return devices[0], XilinxImpact.create(devices[0], self._cfg_manager)
     else:
         raise UdXilinxExperimentErrors.InvalidXilinxDeviceError(self.device_name)
Exemplo n.º 2
0
 def _load_xilinx_device(self):
     device_name = self._cfg_manager.get_value("weblab_xilinx_experiment_xilinx_device")
     devices = [i for i in XilinxDevices.getXilinxDeviceValues() if i == device_name]
     if len(devices) == 1:
         return device_name, devices[0], XilinxImpact.create(devices[0], self._cfg_manager)
     else:
         raise UdXilinxExperimentErrors.InvalidXilinxDeviceError(device_name)
Exemplo n.º 3
0
def create(xilinx_device, cfg_manager):
    if not xilinx_device in XilinxDevices.getXilinxDeviceValues():
        raise XilinxImpactErrors.NotAXilinxDeviceEnumError(
            "Not a Xilinx Device Enumeration: %s" % xilinx_device)
    if xilinx_device == XilinxDevices.FPGA:
        return _XilinxImpactFPGA(cfg_manager)
    elif xilinx_device == XilinxDevices.PLD:
        return _XilinxImpactPLD(cfg_manager)
    else:
        raise XilinxImpactErrors.XilinxDeviceNotFoundError(
            "Couldn't find xilinx device gateway: %s" % xilinx_device)
Exemplo n.º 4
0
def create(xilinx_device, cfg_manager):
    if not xilinx_device in XilinxDevices.getXilinxDeviceValues():
        raise XilinxImpactErrors.NotAXilinxDeviceEnumError(
                "Not a Xilinx Device Enumeration: %s" % xilinx_device
            )
    if xilinx_device == XilinxDevices.FPGA:
        return _XilinxImpactFPGA(cfg_manager)
    elif xilinx_device == XilinxDevices.PLD:
        return _XilinxImpactPLD(cfg_manager)
    else:
        raise XilinxImpactErrors.XilinxDeviceNotFoundError(
                "Couldn't find xilinx device gateway: %s" % xilinx_device
            )