1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

Documentation

This commit is contained in:
jand 2003-02-03 19:38:37 +00:00
parent f69a75ed8d
commit 789971e772
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,6 @@ original Samples is held by Janick Bergeron.
I added a test bench, test_rs232.py, to verify the translation into
myhdl/Python, and to demonstrate some possibilities of myhdl and the
Python unittest framework. Run the testbench as follows:
Python unit test framework. Run the test bench as follows:
python test_rs232.py

View File

@ -12,6 +12,8 @@ from rs232_util import Config, EVEN, ODD, ParityError, Error
class rs232Test(TestCase):
""" rs232 functional unit test """
def default(self):
tx = Signal(intbv(0))
rx = tx
@ -76,6 +78,8 @@ class rs232Test(TestCase):
class rs232Characterize(TestCase):
""" rs232 baud rate characterization test """
def bench(self, tx_baud_rate):
tx = Signal(intbv(0))
rx = tx
@ -89,7 +93,7 @@ class rs232Characterize(TestCase):
raise Error
def testCharacterize(self):
""" Characterize baud rate tolerance """
""" Find min/max tx baud rate tolerance by simulation """
coarseOffset = 100
fineOffset = 5
tx_baud_rate = 9600