Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-march may be wrong when using pulpissimo configuration #18

Open
hongzhi2015 opened this issue Apr 25, 2021 · 1 comment
Open

-march may be wrong when using pulpissimo configuration #18

hongzhi2015 opened this issue Apr 25, 2021 · 1 comment

Comments

@hongzhi2015
Copy link

When running tests from https://github.com/pulp-platform/regression_tests/

At least, I found 3 cases freeze forever:

  • sequential_bare_tests/seidel
  • sequential_bare_tests/fdtd-1d
  • sequential_bare_tests/jacobi-1d-imper

And I use sequential_bare_tests/seidel to debug, the simulation hangs just before floating-point operations:

        a[i][j] = (a[i-1][j-1] + a[i-1][j] + a[i-1][j+1]
            + a[i][j-1] + a[i][j] + a[i][j+1]
            + a[i+1][j-1] + a[i+1][j] + a[i+1][j+1])/9.0f;

Finally, I edited rules/pulpos/targets/pulpissimo.mk, use -march=rv32imfcxpulpv2, and all the 3 cases run to the end.

Original

ifdef USE_IBEX
PULP_LDFLAGS +=
PULP_CFLAGS += -D__ibex__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 -DRV_ISA_RV32
PULP_ARCH_CFLAGS ?= -march=rv32imc
PULP_ARCH_LDFLAGS ?= -march=rv32imc
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imc
else
PULP_LDFLAGS      += 
PULP_CFLAGS       +=  -D__riscv__
# PULP_ARCH_CFLAGS ?=  -march=rv32imcxgap9
# PULP_ARCH_LDFLAGS ?=  -march=rv32imcxgap9
# PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imcxgap9
PULP_ARCH_CFLAGS ?=  -march=rv32imfcxpulpv2
PULP_ARCH_LDFLAGS ?=  -march=rv32imfcxpulpv2
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imfcxpulpv2
endif

I tried to use -march=rv32imfcxvpulpv3 as pulp-platform/pulpissimo#183 , and encounter the same error:

cc1: error: -march=rv32imfcxvpulpv3: unsupported ISA substring XVPULPV3

I checked pulp-sdk build by cd pulpissimo; make build-pulp-sdk, -march=rv32imfcxpulpv2 is used for pulpissimo, -march=rv32imcxgap9 is used for vega.

@hongzhi2015
Copy link
Author

More information.
When using -march=rv32imcxgap9, wait for the simulation hang and stop the simulation, last lines of regression_tests/sequential_bare_tests/seidel/build/trace_core_1f_0.log are:

...
8553554ns          141043 1c0081e6 0005a703 lw               x14, 0(x11)         x14=00000000 x11:1c010000  PA:1c010000 
8553574ns          141044 1c0081e8 0045a783 lw               x15, 4(x11)         x15=3f800000 x11:1c010000  PA:1c010004 
8553594ns          141045 1c0081ea 0085a503 lw               x10, 8(x11)         x10=40800000 x11:1c010000  PA:1c010008 
8553614ns          141046 1c0081ec 0145ae03 lw               x28, 20(x11)        x28=3f800000 x11:1c010000  PA:1c010014 
8553634ns          141047 1c0081f0 00f77753 fadd.s           f14, f14, f15       f14=xxxxxxxx f14:xxxxxxxx f15:xxxxxxxx 
8553653ns          141048 1c0081f4 0185a783 lw               x15, 24(x11)        x15=40000000 x11:1c010000  PA:1c010018 
8553673ns          141049 1c0081f6 01c5a303 lw               x6, 28(x11)          x6=40a00000 x11:1c010000  PA:1c01001c 
8553693ns          141050 1c0081fa 0285a883 lw               x17, 40(x11)        x17=40800000 x11:1c010000  PA:1c010028 
8553713ns          141051 1c0081fe 02c5a803 lw               x16, 44(x11)        x16=40a00000 x11:1c010000  PA:1c01002c 
8553733ns          141052 1c008202 00a77753 fadd.s           f14, f14, f10       f14=xxxxxxxx f14:xxxxxxxx f10:xxxxxxxx 
8553752ns          141053 1c008206 0305a503 lw               x10, 48(x11)        x10=41000000 x11:1c010000  PA:1c010030 
8553772ns          141054 1c008208 00160613 addi             x12, x12, 1         x12=00000001 x12:00000000 
8553792ns          141055 1c00820a 01c77753 fadd.s           f14, f14, f28       f14=xxxxxxxx f14:xxxxxxxx f28:xxxxxxxx 
8553812ns          141056 1c00820e 00f777d3 fadd.s           f15, f14, f15       f15=xxxxxxxx f14:xxxxxxxx f15:xxxxxxxx 
8553831ns          141057 1c008212 0067f7d3 fadd.s           f15, f15, f6        f15=xxxxxxxx f15:xxxxxxxx  f6:xxxxxxxx 
8553851ns          141058 1c008216 0117f7d3 fadd.s           f15, f15, f17       f15=xxxxxxxx f15:xxxxxxxx f17:xxxxxxxx 
8553871ns          141059 1c00821a 0107f7d3 fadd.s           f15, f15, f16       f15=xxxxxxxx f15:xxxxxxxx f16:xxxxxxxx 

Floating point registers contains 'x'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant