コード例 #1
0
ファイル: test_fifo.py プロジェクト: CospanDesign/olympus
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()
コード例 #2
0
ファイル: test_fifo.py プロジェクト: junganghu/olympus
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()
コード例 #3
0
    def set_sync_fifo_mode(self):
        """
        Change the mode of the FIFO to a synchronous FIFO

        Args:
            Nothing

        Returns:
            Nothing

        Raises:
            Nothing

        """
        fifo = FifoController(self.vendor, self.product)
        fifo.set_sync_fifo()
コード例 #4
0
def set_sync_fifo_mode(vendor, product, serial_numbe):
    """
    Change the mode of the FIFO to a synchronous FIFO

    Args:
        Nothing

    Returns:
        Nothing

    Raises:
        Nothing

    """
    fifo = FifoController(vendor, product)
    fifo.set_sync_fifo()
コード例 #5
0
    def set_sync_fifo_mode(self):
        """
        Change the mode of the FIFO to a synchronous FIFO

        Args:
            Nothing

        Returns:
            Nothing

        Raises:
            Nothing

        """
        fifo = FifoController(self.vendor, self.product)
        fifo.set_sync_fifo()
コード例 #6
0
def set_sync_fifo_mode(vendor, product, serial_numbe):
    """
    Change the mode of the FIFO to a synchronous FIFO

    Args:
        Nothing

    Returns:
        Nothing

    Raises:
        Nothing

    """
    fifo = FifoController(vendor, product)
    fifo.set_sync_fifo()