def __init__(self, dev_dict, status = None):
     Nysa.__init__(self, status)
     self.dev_dict = dev_dict
     self.configuration = None
     self.usb_status = USB_DEVICE_NOT_CONNECTED
     self.fx3 = PrometheusUSB(self.usb_device_status_cb,
                              self.device_to_host_comm)
 def __init__(self, path, status = None):
     Nysa.__init__(self, status)
     ser_path = path
     self.ser = serial.Serial(path, BAUDRATE)
     self.ser.timeout = 2
     self.ser.flushInput()
     if self.ser == None:
         print "Error openning Serial Port"
Exemple #3
0
 def __init__(self, path, status=None):
     Nysa.__init__(self, status)
     ser_path = path
     baudrate = 115200
     self.ser = serial.Serial(path, baudrate)
     self.ser.timeout = 2
     self.ser.flushInput()
     if self.ser == None:
         print "Error openning Serial Port"
 def __init__(self, path, status = None):
     Nysa.__init__(self, status)
     ser_path = path
     baudrate = 115200
     self.ser = serial.Serial(path, baudrate)
     self.ser.timeout = 2
     self.ser.flushInput()
     if self.ser == None:
         print "Error openning Serial Port"
Exemple #5
0
    def __init__(self, dut, uart_if, sim_config, period = CLK_PERIOD, user_paths = [], status = None):
        self.dev_dict                              = json.load(open(sim_config), object_pairs_hook = OrderedDict)
        Nysa.__init__(self, Status())
        self.s.set_level('verbose')
        self.user_paths = user_paths
        self.comm_lock = cocotb.triggers.Lock('comm')
        self.dut                              = dut
        cocotb.fork(Clock(dut.clk, period).start())
        gd = GenSDB()
        self.rom = gd.gen_rom(self.dev_dict, user_paths = self.user_paths, debug = False)

        self.uart = uart_if
        self.response = Array('B')
    def __init__(self, idVendor = 0x0403, idProduct = 0x8530, sernum = None, status = False):
        Nysa.__init__(self, status)
        self.vendor = idVendor
        self.product = idProduct
        self.sernum = sernum

        self.dev = None
        #Run a full garbage collection so any previous references to Dionysus will be removed
        gc.collect()
        self.lock = threading.Lock()


        self.dev = Ftdi()
        self._open_dev()
        self.name = "Dionysus"
        self.interrupts = 0x00
        self.events = []
        for i in range (INTERRUPT_COUNT):
            e = threading.Event()
            e.set()
            self.events.append(e)

        self.hwq = Queue.Queue(10)
        self.hrq = Queue.Queue(10)

        self.d = DionysusData()

        self.worker = WorkerThread(self.dev,
                                   self.hwq,
                                   self.hrq,
                                   self.d,
                                   self.lock,
                                   self.interrupt_update_callback)
        #Is there a way to indicate closing
        self.worker.setDaemon(True)
        self.worker.start()

        try:
            #XXX: Hack to fix a strange bug where FTDI
            #XXX: won't recognize Dionysus until a read and reset occurs
            self.ping()

        except NysaCommError:
            pass

        self.reset()



        '''
Exemple #7
0
    def __init__(self,
                 idVendor=0x0403,
                 idProduct=0x8531,
                 sernum=None,
                 status=False):
        Nysa.__init__(self, status)
        self.vendor = idVendor
        self.product = idProduct
        self.sernum = sernum

        self.dev = None
        #Run a full garbage collection so any previous references to Artemis will be removed
        gc.collect()
        self.lock = threading.Lock()

        self.dev = Ftdi()
        self._open_dev()
        self.name = "Artemis"
        self.interrupts = 0x00
        self.events = []
        for i in range(INTERRUPT_COUNT):
            e = threading.Event()
            e.set()
            self.events.append(e)

        self.hwq = Queue.Queue(10)
        self.hrq = Queue.Queue(10)

        self.d = ArtemisData()

        self.worker = WorkerThread(self.dev, self.hwq, self.hrq, self.d,
                                   self.lock, self.interrupt_update_callback)
        #Is there a way to indicate closing
        self.worker.setDaemon(True)
        self.worker.start()

        try:
            #XXX: Hack to fix a strange bug where FTDI
            #XXX: won't recognize Artemis until a read and reset occurs
            #self.ping()
            pass

        except NysaCommError:
            pass

        self.reset()
        '''
    def __init__(self,
                 dut,
                 uart_if,
                 sim_config,
                 period=CLK_PERIOD,
                 user_paths=[],
                 status=None):
        self.dev_dict = json.load(open(sim_config),
                                  object_pairs_hook=OrderedDict)
        Nysa.__init__(self, Status())
        self.s.set_level('verbose')
        self.user_paths = user_paths
        self.comm_lock = cocotb.triggers.Lock('comm')
        self.dut = dut
        cocotb.fork(Clock(dut.clk, period).start())
        gd = GenSDB()
        self.rom = gd.gen_rom(self.dev_dict,
                              user_paths=self.user_paths,
                              debug=False)

        self.uart = uart_if
        self.response = Array('B')
 def __init__(self, dev_dict, status = None):
     Nysa.__init__(self, status)
     self.dev_dict = dev_dict
Exemple #10
0
 def __init__(self, dev_dict, status=None):
     Nysa.__init__(self, status)
     self.dev_dict = dev_dict