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

Gemmini tests with spike #25

Closed
pbert519 opened this issue Jun 10, 2020 · 5 comments
Closed

Gemmini tests with spike #25

pbert519 opened this issue Jun 10, 2020 · 5 comments

Comments

@pbert519
Copy link

I use chipyard 1.3.0 with gemmini caaf781 and ucb-bar/esp-isa-sim@13384ca. When running the gemmini baremetal tests, e.g.
spike --extension=gemmini build/bareMetalC/mvin_mvout_acc-baremetal
the tests fails. The Matrix output is null for all entries.
I also tried ucb-bar/esp-isa-sim@2e96965 with the same result.
RISCV toolchain is the esp-tools variant.

Can you give some hint for a working riscv-isa-sim and gemmini version combination?

The output for the mvin_mvout_acc-baremetal test is attached:
gemmini.log

A other question, is it possible to define a different array dimension for spike?

@hngenc
Copy link
Member

hngenc commented Jun 19, 2020

To change the systolic array dimension in Spike, you can change this line.

Chipyard v1.3.0 should have worked... Do you know if any of the other tests also failed? Also, did you build Gemmini with your own configuration (like a different systolic array size) before running the Spike tests?

I'll clone and run Chipyard 1.3.0 myself just to be sure, and I'll get back to you.

@pbert519
Copy link
Author

Thanks for looking into it and the tip about the spike configuration.

I didn't rebuild gemmini with a different configuration and the gemmini_params.h file has the default values. I compared the gemmini_params.h in the gemmini_rocc_tests and in riscv-isa-sim, they have the same parameters.

All gemmini-rocc-test failed for me as baremetal test with spike except the mvin_scale and tiled_matmul_cpu.

In the meantime i also tested the linux version of the tests with firemarshal - gemmini-tests.json - and spike. I attached the log, warning: big size:
uartlog.txt
The problem is the same: All output matrix entries are 0.
I used the newer ucb-bar/esp-isa-sim@2e96965 spike version for this.

Btw. the verilator sim is working for the baremetal gemmini tests.

@hngenc
Copy link
Member

hngenc commented Jun 20, 2020

Can you try running these commands?

cd chipyard/
cp generators/gemmini/software/gemmini-rocc-tests/include/gemmini_params.h toolchains/esp-tools/riscv-isa-sim/gemmini/gemmini_params.h
cd toolchains/esp-tools/riscv-isa-sim/build/
make && make install

And then try to run the -baremetal tests with Spike again?

@pbert519
Copy link
Author

Now it's working. Thank you!

@hngenc
Copy link
Member

hngenc commented Jun 20, 2020

No problem. It turns out that the gemmini_params.h files in esp-tools and gemmini-rocc-tests do not match. We'll fix that in Chipyard's master branch. Thanks for uncovering this bug.

Zeldax64 added a commit to Zeldax64/esp-isa-sim that referenced this issue May 17, 2021
This update is necessary to match the gemmini_params.h in
gemmini-rocc-tests used by chipyard 1.3.0.
Solution: ucb-bar/gemmini#25 (comment)
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

2 participants