[Libre-soc-isa] [Bug 1056] questions and feedback (v2) on OPF RFC ls010
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun May 28 13:44:12 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1056
--- Comment #18 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #15)
> a reversed order messes with Data-Dependent Fail-First. clearly
> these are not the same:
>
>
> for i in VL-1 DOWNTO 0
> GPR(RT+i) <- GPR(RA+i) + EXTS64(SI)
> CR.field[i] = CCode_test(GPR(RT+i))
> if DDFFirst:
> if FAILED(CR.field[i]):
> VL=i
> break
>
> vs:
>
> for i in 0..VL-1
> GPR(RT+i) <- GPR(RA+i) + EXTS64(SI)
> CR.field[i] = CCode_test(GPR(RT+i))
> if DDFFirst:
> if FAILED(CR.field[i]):
> VL=i
> break
correction: this is much worse than it seems, starting here:
for i in 0..VL-1
# WRONG? reversed_i = VL-1-i
reversed_i = MAXVL-1-i # right?? maybe??
GPR(RT+i) <- GPR(RA+reversed_i) + EXTS64(SI)
but now DD-FFirst is catastrophically damaged. elements are no longer
numbered independent of the Vector Length.
LSB0 numbering, if MAXVL=8,VL=8:
Element numbering : 7 6 5 4 3 2 1 0
Execution order : 7 6 5 4 3 2 1 0
LSB0 numbering, if MAXVL=8,VL=5:
Element numbering : 7 6 5 4 3 2 1 0
Execution order : . . . 4 3 2 1 0
BE "meaning", LSB0 numbering, if MAXVL=8,VL=8:
Element numbering : 7 6 5 4 3 2 1 0
Execution order : 0 1 2 3 4 5 6 7
BE "meaning", LSB0 numbering, if MAXVL=8,VL=5 if reversed_i=VL-i-1
Element numbering : 7 6 5 4 3 2 1 0
Execution order : . . . 0 1 2 3 4
or if reversed_i=MAXVL-i-1
Element numbering : 7 6 5 4 3 2 1 0
Execution order : 0 1 2 3 4 . . .
(either way the lack of identity-relationship between
Element-numbering and Execution order is a serious comprehension
barrier)
now bring DD-FFirst into play. elements were tested in DESCENDING
order starting from the HIGHEST (LSB0) numbered element. VL was
truncated, now you have no idea where to start from because all
element positions have changed!
"fixing" that requires:
for i in MAXVL-1 DOWNTO (MAXVL-VL):
at which point i am unable to cope.
all the developer has to do is load data using appropriate
Structure Packing, by deploying REMAP. and to be honest if
data is that Dimensionally-challenging i don't think LE/BE
element ordering will help.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libre-SOC-ISA
mailing list