Exemplo n.º 1
0
class Test (unittest.TestCase):
	"""Unit test for FIFO controller"""

	def setUp(self):
		self.dbg = False;
		self.vbs = False;
		if "S1_VERBOSE" in os.environ:
			if (os.environ["S1_VERBOSE"] == "True"):
				self.vbs = True

		if "S1_DEBUG" in os.environ:
			if (os.environ["S1_DEBUG"] == "True"):
				self.dbg = True

		os.environ["S1_BASE"] = sys.path[0] + "/s1-pycontrol"


		self.fifo = FifoController(0x0403, 0x8530)
		return

	def tearDown(self):
		del self.fifo

	def test_set_mode(self):
		print "set sync mode"
		self.fifo.set_sync_fifo()

		print "set async mode"
		self.fifo.set_async_fifo()
Exemplo n.º 2
0
class Test(unittest.TestCase):
    """Unit test for FIFO controller"""
    def setUp(self):
        self.dbg = False
        self.vbs = False
        if "S1_VERBOSE" in os.environ:
            if (os.environ["S1_VERBOSE"] == "True"):
                self.vbs = True

        if "S1_DEBUG" in os.environ:
            if (os.environ["S1_DEBUG"] == "True"):
                self.dbg = True

        os.environ["S1_BASE"] = sys.path[0] + "/s1-pycontrol"

        self.fifo = FifoController(0x0403, 0x8530)
        return

    def tearDown(self):
        del self.fifo

    def test_set_mode(self):
        print "set sync mode"
        self.fifo.set_sync_fifo()

        print "set async mode"
        self.fifo.set_async_fifo()
    def set_debug_mode(self):
        """
        Change the mode of the FIFO to a asynchronous FIFO

        Args:
            Nothing

        Returns:
            Nothing

        Raises:
            Nothing
        """
        fifo = FifoController(self.vendor, self.product)
        fifo.set_async_fifo()
def set_debug_mode(vendor, product, serial_number):
    """
    Change the mode of the FIFO to a asynchronous FIFO

    Args:
        Nothing

    Returns:
        Nothing

    Raises:
        Nothing
    """
    fifo = FifoController(vendor, product)
    fifo.set_async_fifo()
    def set_debug_mode(self):
        """
        Change the mode of the FIFO to a asynchronous FIFO

        Args:
            Nothing

        Returns:
            Nothing

        Raises:
            Nothing
        """
        fifo = FifoController(self.vendor, self.product)
        fifo.set_async_fifo()
def set_debug_mode(vendor, product, serial_number):
    """
    Change the mode of the FIFO to a asynchronous FIFO

    Args:
        Nothing

    Returns:
        Nothing

    Raises:
        Nothing
    """
    fifo = FifoController(vendor, product)
    fifo.set_async_fifo()
Exemplo n.º 7
0
    def setUp(self):
        self.dbg = False
        self.vbs = False
        if "S1_VERBOSE" in os.environ:
            if (os.environ["S1_VERBOSE"] == "True"):
                self.vbs = True

        if "S1_DEBUG" in os.environ:
            if (os.environ["S1_DEBUG"] == "True"):
                self.dbg = True

        os.environ["S1_BASE"] = sys.path[0] + "/s1-pycontrol"

        self.fifo = FifoController(0x0403, 0x8530)
        return
Exemplo n.º 8
0
	def setUp(self):
		self.dbg = False;
		self.vbs = False;
		if "S1_VERBOSE" in os.environ:
			if (os.environ["S1_VERBOSE"] == "True"):
				self.vbs = True

		if "S1_DEBUG" in os.environ:
			if (os.environ["S1_DEBUG"] == "True"):
				self.dbg = True

		os.environ["S1_BASE"] = sys.path[0] + "/s1-pycontrol"


		self.fifo = FifoController(0x0403, 0x8530)
		return
Exemplo n.º 9
0
 def __init__(self, idVendor=0x0403, idProduct=0x8530):
     self.vendor = idVendor
     self.product = idProduct
     self.fifo = FifoController(idVendor, idProduct)