OpenCores

* Amber ARM-compatible core

Issue List
Carry issue with TEQ and EOR #25
Closed sleary opened this issue about 9 years ago
sleary commented about 9 years ago

:( sorry but another carry issue...

TEQ and EOR should use the carry in it seems. Code to demonstrate is below.

;; setup the carry for the test
;; could do this in program.cpp but
;; doing this makes the test repeatable
;; on a real Archie from BASIC V.
MOV	R0,#0
SUB	R1,R0,#1
ADDS	R1,R1,#1
;;Do the test
MOV	R4,#0
MOV     R5,#&53000000
TEQS    R4,R5
;; flag a result to BASIC/Program.cpp
MOVCC	R0,#1
MOVCS	R0,#0

On a real archie/arcem R0 is 0, on Amber R0 comes back 1.

$ ./program/Va23_core bugs/teqbug.bin Executing Amber/ArcEM Comparison 52 52 Failed. errors: expected,actual,bitwise difference r0(0x00000000,0x00000001,0x00000001) r15(0x20001033,0x0000102f,0x2000001c)

initial: r0=0x7e1d4e3c,r1=0x06f1d01b,r2=0x1d5d2ed9,r3=0x6f6f8292,r4=0x7c6b63c9,r5=0x2f69a363,r6=0x19430192,r7=0x0de580bf,r8=0x4c467585,r9=0x41ce04b8,r10=0x44a2b75b,r11=0x0b00c412,r12=0x3119e1f5,r13=0x6b052991,r14=0x66b52125,r15=0x00000003,r8_firq=0x304dc14d,r9_firq=0x611dec5a,r10_firq=0x1b088c0e,r11_firq=0x147c49d9,r12_firq=0x4ab42a1b,r13_firq=0x0e0912fe,r14_firq=0x464da53c,r13_irq=0x529e0ec9,r14_irq=0x4580ab03,r13_svc=0x5c49d017,r14_svc=0x322acccd,

arcem: r0=0x00000000,r1=0x00000000,r2=0x1d5d2ed9,r3=0x6f6f8292,r4=0x00000000,r5=0x53000000,r6=0x19430192,r7=0x0de580bf,r8=0x4c467585,r9=0x41ce04b8,r10=0x44a2b75b,r11=0x0b00c412,r12=0x3119e1f5,r13=0x6b052991,r14=0x66b52125,r15=0x20001033,r8_firq=0x304dc14d,r9_firq=0x611dec5a,r10_firq=0x1b088c0e,r11_firq=0x147c49d9,r12_firq=0x4ab42a1b,r13_firq=0x0e0912fe,r14_firq=0x464da53c,r13_irq=0x529e0ec9,r14_irq=0x4580ab03,r13_svc=0x5c49d017,r14_svc=0x322acccd,

amber: r0=0x00000001,r1=0x00000000,r2=0x1d5d2ed9,r3=0x6f6f8292,r4=0x00000000,r5=0x53000000,r6=0x19430192,r7=0x0de580bf,r8=0x4c467585,r9=0x41ce04b8,r10=0x44a2b75b,r11=0x0b00c412,r12=0x3119e1f5,r13=0x6b052991,r14=0x66b52125,r15=0x0000102f,r8_firq=0x304dc14d,r9_firq=0x611dec5a,r10_firq=0x1b088c0e,r11_firq=0x147c49d9,r12_firq=0x4ab42a1b,r13_firq=0x0e0912fe,r14_firq=0x464da53c,r13_irq=0x529e0ec9,r14_irq=0x4580ab03,r13_svc=0x5c49d017,r14_svc=0x322acccd,

I have a photo of this running on an A540 and agreeing with ArcEM. Will post on request.

sleary commented about 9 years ago

https://www.dropbox.com/s/u5iovqsl2avhnda/amber23_fixes.diff?dl=0

This patch fixes all open amber23 bugs.

  1. Fixes all the carry issues (verified with a fuzz - will post the fuzz result)
  2. Fixes all the rrx issues.
  3. Fixes the LDM/STM issue

Also patches the use of the wire/reg name type to itype. This is a reserved keyword on some verilog variations.

Note this patch doesnt include my Data abort fixes or the translate pin additions (Implemented as o_wb_tga).

sleary commented about 9 years ago

Here are the fuzz results...

https://www.dropbox.com/s/nwjfok2fqzh0ut1/soak_patch.txt?dl=0

Summary....

Executed: 44124768 Skipped: 32 Passed: 44124768 Failed: 0

I wouldnt swear that all the bugs are gone but i'd say this was a big step forward in confidence.

csantifort commented about 9 years ago

Code changes from Stephen added to release 87 for a23, and release 88 for a25. This fixes the issue.

csantifort closed this about 9 years ago

Assignee
No one
Labels
Bug