Bug 752 - SPR FU broken with pspec.regreduce=True
Summary: SPR FU broken with pspec.regreduce=True
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's second ASIC
Classification: Unclassified
Component: source code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2021-12-09 02:54 GMT by Jacob Lifshay
Modified: 2021-12-10 22:46 GMT (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2021-12-09 02:54:59 GMT
File ".../soc/src/soc/fu/spr/main_stage.py", line 59, in elaborate
    with m.Case(SPR.CTR, SPR.LR, SPR.TAR, SPR.SRR0,
  File "/usr/lib/python3.8/enum.py", line 384, in __getattr__
    raise AttributeError(name) from None
Comment 1 Luke Kenneth Casson Leighton 2021-12-09 10:03:41 GMT
commit 9d8b6f64765a8d05875fc216ce29e584358d6080 (HEAD -> master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Thu Dec 9 10:01:57 2021 +0000

    add FAST SPRs temporarily to power_enums


jacob: you just committed code that completely destroys absolutely everybody's
ability to run TestIssuer unit tests including yourself.

please do not do that again.

i have fixed this - in what is extremely fortunately a very small commit.
Comment 2 Jacob Lifshay 2021-12-10 22:46:25 GMT
I root-caused this issue, I added CommonPipeSpec.__getattr__ which caused the SPR pipe to see pspec.regreduce == True where it hadn't ever before (cuz regreduce wasn't ever copied to the FU pspecs).

This revealed a pre-existing bug in the SPR pipe where it tried to access CTR, LR, etc. on SPRreduced, which until you just added them, didn't exist.

I found the bug by running:
cd openpower-isa
git checkout 455cc38127db6274d1902fb860d444618864da2a
make svanalysis && make pywriter && make pyfnwriter
cd ../soc
git checkout c672fb5eb93f1ab0040921496479188e08f90883
add breakpoint() at end of SPRMainStage.__init__
python src/soc/simple/test/test_issuer.py nosvp64 mul

notice that self.regreduce_en == False, even though, if you look further up the call stack, you'll see that pspec.regreduce == True in TestRunnerBase.run_all