diff --git a/example/rs232/README.txt b/example/rs232/README.txt index 1bdff78d..31bcef0e 100644 --- a/example/rs232/README.txt +++ b/example/rs232/README.txt @@ -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 diff --git a/example/rs232/test_rs232.py b/example/rs232/test_rs232.py index ce67ac62..350e0980 100644 --- a/example/rs232/test_rs232.py +++ b/example/rs232/test_rs232.py @@ -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