Skip to content

[chip, gpio, sw] Adding Verilator as an option to .cmake#437

Merged
KinzaQamar merged 1 commit intolowRISC:mainfrom
KinzaQamar:cmake_verilator_option
Apr 13, 2026
Merged

[chip, gpio, sw] Adding Verilator as an option to .cmake#437
KinzaQamar merged 1 commit intolowRISC:mainfrom
KinzaQamar:cmake_verilator_option

Conversation

@KinzaQamar
Copy link
Copy Markdown
Contributor

@KinzaQamar KinzaQamar commented Apr 11, 2026

Merge 406 first as a dependency

The motivation of this PR comes from 382 which is adding a chip level GPIO smoke test. That test fails on verilator. Reason being different tops used for different platforms ( DVSim(Xcelium), Verilator, FPGA). For Xcelium, an interface is connecting the UVM to the GPIO. UVM has the control to drive GPIOs inputs. In 382, SW waits for a specific pattern driven by UVM to arrive in data_in reg. If we run the exact test with the verilator top, which is using GPIO DPI, then the abilty to drive inputs depends on a host SW infrastructure which is currently missing.

Second problem is that we use cmake to build software images for DVSim, verilator and FPGA. We run tests on FPGA and Verilator in CI. If the build system develops an Xcelium compatible image and feed that image to Verilator and FPGA
to execute the test in CI then the test will fail due to the reason given in the first paragraph.

Hence, the best way forward is to make images only for the compatible paltforms.

@KinzaQamar KinzaQamar marked this pull request as draft April 11, 2026 14:09
@KinzaQamar KinzaQamar force-pushed the cmake_verilator_option branch from c480d17 to 658caeb Compare April 13, 2026 10:13
@KinzaQamar KinzaQamar marked this pull request as ready for review April 13, 2026 10:14
@KinzaQamar KinzaQamar force-pushed the cmake_verilator_option branch from 658caeb to 1dca8c3 Compare April 13, 2026 10:17
@KinzaQamar KinzaQamar force-pushed the cmake_verilator_option branch from 1dca8c3 to a94ab48 Compare April 13, 2026 11:47
The motivation of this PR comes from lowRISC#382 which is adding a
chip level GPIO smoke test. That test fails on verilator. Reason
being different tops used for different platforms (DVSim(Xcelium),
Verilator, FPGA). For Xcelium, an interface is connecting the UVM
to the GPIO. UVM has the control to drive GPIOs inputs. In 382, SW
waits for a specific pattern driven by UVM to arrive in data_in
reg. If we run the exacttest with the verilator top, which is
using GPIO DPI, then the abilty to drive inputs depends on a host
SW infrastructure which is currently missing.

Second problem is that we use cmake to build software images
for DVSim, verilator and FPGA. We run tests on FPGA and
Verilator in CI. If the build system develops an Xcelium
compatible image and feed that image to Verilator and FPGA
to execute the test in CI then the test will fail due to the
reason given in the first paragraph.

Hence, the best way forward is to make images only for the
compatible plaforms.

Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
@KinzaQamar KinzaQamar force-pushed the cmake_verilator_option branch from a94ab48 to 9bd5b90 Compare April 13, 2026 11:54
Copy link
Copy Markdown
Contributor

@martin-velay martin-velay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KinzaQamar KinzaQamar merged commit 9a58b7e into lowRISC:main Apr 13, 2026
9 of 10 checks passed
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

Successfully merging this pull request may close these issues.

4 participants