[Chipyard/Gemmini] Simulation Fails with "ReservationStation.scala" Assertion for Softmax/Layernorm Workloads
Background Work
- [x] Yes, I searched the mailing list
- [x] Yes, I searched prior issues
- [x] Yes, I searched the documentation
Chipyard Version and Hash
Release: 1.10.0 Hash: 00853c
OS Setup
Linux mingzhenjia-OMEN-by-HP-Gaming-Laptop-16-wf0xxx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64 x86_64 x86_64 GNU/Linux LSB Version: core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch Distributor ID: Ubuntu Description: Ubuntu 22.04.5 LTS Release: 22.04 Codename: jammy
Other Setup
I have followed the documentation.
Current Behavior
好的,这是一个优化后的版本,使其更专业、清晰,并包含了一些额外但有用的信息,可以帮助社区更好地理解您的问题。 优化后的版本 (Optimized Version):
Subject: [Chipyard/Gemmini] Simulation Fails with "ReservationStation.scala" Assertion for Softmax/Layernorm Workloads
Hello Chipyard Developers and Community,
I am encountering a simulation assertion failure when running specific Gemmini baremetal tests on Chipyard v1.10.0. The Gemmini submodule is at commit f13847e8.
Issue Description:
The standard tiled_matmul_ws-baremetal test completes successfully. However, when I run tests that include more complex operations like softmax or layernorm, the simulation consistently fails with an assertion error in ReservationStation.scala.
Environment:
OS: Ubuntu 22.04
Chipyard Version: 1.10.0
Gemmini Commit Hash: f13847e8
Commands to Reproduce:
- Successful Command: code Bash IGNORE_WHEN_COPYING_START IGNORE_WHEN_COPYING_END
make CONFIG=GemminiRocketConfig run-binary BINARY=../../generators/gemmini/software/gemmini-rocc-tests/build/bareMetalC/tiled_matmul_ws-baremetal
- Failing Command (e.g., with softmax): code Bash IGNORE_WHEN_COPYING_START IGNORE_WHEN_COPYING_END
make CONFIG=GemminiRocketConfig run-binary BINARY=../../generators/gemmini/software/gemmini-rocc-tests/build/bareMetalC/tiled_matmul_ws_softmax-baremetal
Assertion Failure Log:
The failing simulation produces the following error, indicating an invalid entry is being accessed in the reservation station: code Code IGNORE_WHEN_COPYING_START IGNORE_WHEN_COPYING_END
Error: "/home/mingzhenjia/Desktop/chipyard/sims/vcs/generated-src/chipyard.harness.TestHarness.GemminiRocketConfig/gen-collateral/ReservationStation.sv", 9827: TestDriver.testHarness.chiptop0.system.tile_prci_domain.tile_reset_domain_tile.gemmini.reservation_station: at time 2877727000 ps Assertion failed at ReservationStation.scala:479 assert(entries_st(issue_id).valid)
Fatal: "/home/mingzhenjia/Desktop/chipyard/sims/vcs/generated-src/chipyard.harness.TestHarness.GemminiRocketConfig/gen-collateral/ReservationStation.sv", 9829: TestDriver.testHarness.chiptop0.system.tile_prci_domain.tile_reset_domain_tile.gemmini.reservation_station: at time 2877727000 ps $finish called from file "/home/mingzhenjia/Desktop/chipyard/sims/vcs/generated-src/chipyard.harness.TestHarness.GemminiRocketConfig/gen-collateral/ReservationStation.sv", line 9829.
For reference, the log from the successful run (tiled_matmul_ws-baremetal.log) completes as expected: code Code IGNORE_WHEN_COPYING_START IGNORE_WHEN_COPYING_END
... Starting gemmini matmul Cycles taken: 2392 Starting slow CPU matmul Cycles taken: 3227174 Fatal: ".../TestDriver.v", 147: TestDriver: at time 10000000500 ps $finish called from file ".../TestDriver.v", line 147.
My Analysis:
The assertion assert(entries_st(issue_id).valid) suggests that the reservation station is receiving an instruction to issue an entry that is not valid. Since this only occurs for workloads with softmax/layernorm, it seems related to how these specific micro-operations are scheduled or tracked within Gemmini's pipeline.
Could someone please provide insight into what might be causing this assertion failure? I would also appreciate any recommendations for further debugging steps, such as specific signals to trace or configuration changes to try.
Thank you for your time and assistance.
Expected Behavior
It should print cycles.
Other Information
No response
Hi, this issue may be more suitable to be posted under the gemmini repo. https://github.com/ucb-bar/gemmini/issues Can you post it there and close the issue here? Thanks.
ok,I will