From 73f0a42f83f78a7d77f2933f61b04d8a83e5277f Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 8 Dec 2021 13:45:09 +0000 Subject: [PATCH] code-comments for LDSTException.instr_fault (which is not actually an exception) --- src/openpower/decoder/test/test_power_decoder.py | 4 ++-- src/openpower/exceptions.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/openpower/decoder/test/test_power_decoder.py b/src/openpower/decoder/test/test_power_decoder.py index 0d587869..500b1392 100644 --- a/src/openpower/decoder/test/test_power_decoder.py +++ b/src/openpower/decoder/test/test_power_decoder.py @@ -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) diff --git a/src/openpower/exceptions.py b/src/openpower/exceptions.py index d53271d5..0f932f33 100644 --- a/src/openpower/exceptions.py +++ b/src/openpower/exceptions.py @@ -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 -- 2.30.2