code-comments for LDSTException.instr_fault
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 8 Dec 2021 13:45:09 +0000 (13:45 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 8 Dec 2021 13:45:09 +0000 (13:45 +0000)
(which is not actually an exception)

src/openpower/decoder/test/test_power_decoder.py
src/openpower/exceptions.py

index 0d5878690f62a9c9d645200940deb15251cbe55d..500b139292364c171562feefc68004bfe5b26cc4 100644 (file)
@@ -55,9 +55,9 @@ class DecoderTestCase(FHDLTestCase):
                  cry_in.eq(dut.op.cry_in),
                  internal_op.eq(dut.op.internal_op)]
 
-        sim = Simulator(m)
+        #sim = Simulator(m)
         # Use the below line instead to run the work-in-progress C simulator.
-        #sim = Simulator(m, engine=PySimEngine)
+        sim = Simulator(m, engine=PySimEngine)
 
         opcodes = get_csv(csvname)
 
index d53271d56fb450a4552045dbc2eeb503b82c83ff..0f932f333e167296832019ffb2f3eac608858eec 100644 (file)
@@ -4,9 +4,18 @@ from nmutil.iocontrol import RecordObject
 from nmigen import Signal
 from collections import namedtuple
 
-exc_types = ['alignment', 'instr_fault', 'invalid', 'badtree',
-             'perm_error', 'rc_error', 'segment_fault',
-              'happened', ] # must be last: may overlap with Data.ok
+exc_types = ['alignment',
+             'instr_fault', # this one is not an actual exception
+                            # but information *about* the type of
+                            # exception that must be generated
+             'invalid',
+             'badtree',
+             'perm_error',
+             'rc_error',
+             'segment_fault',
+             'happened', # must be last: may overlap with Data.ok
+            ]
+
 LDSTExceptionTuple = namedtuple("LDSTExceptionTuple", exc_types)
 
 # https://bugs.libre-soc.org/show_bug.cgi?id=465