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

Testfloat on Verilator not progressing #707

Open
davidharrishmc opened this issue Apr 4, 2024 · 4 comments
Open

Testfloat on Verilator not progressing #707

davidharrishmc opened this issue Apr 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@davidharrishmc
Copy link
Contributor

I started writing sim-testfloat-verilator. It now compiles but seems to hang in the first test.

harris@chips:/cvw/sim$ ./sim-testfloat-verilator
harris@chips:
/cvw/sim$ time obj_dir/Vtestbenchfp
Running ui32_to_f128_rne.tv vectors
...(no progress)

@davidharrishmc
Copy link
Contributor Author

Now invokes with
wsim -s verilator -t testbench_fp fdqh_ieee_rv64gc cvtint

Still hangs at
Running ui32_to_f128_rne.tv vectors

@davidharrishmc
Copy link
Contributor Author

davidharrishmc commented Jun 27, 2024

After cleaning up some lint issues,

wsim --tb testbench_fp --sim verilator rv32gc add

fails with

Running f64_add_rne.tv vectors 

Error in f64_add_rne.tv
TestNum          0 VectorNum          0 OpCtrl 6
inputs: ffffffff3f908000 0000000000000000 0000000000000000
SrcA: 00000000
 Res: ffffffff00000000 00
 Expected: 000000000007ffff 01

The reason is that readvectors is triggered (@VectorNum) before Unit, Fmt, OpCtrl) have their correct values, so the wrong vector is read. In contrast, Questa receives

# TestNum          0 VectorNum          0 OpCtrl 6
# inputs: b68ffff8000000ff 3ff0000000000000 3f9080000007ffff
# SrcA: xxxxxxxx
#  Res: 3f9080000007ffff 01
#  Expected: 3f9080000007ffff 01

@davidharrishmc
Copy link
Contributor Author

Made some progress with commit 459eaae
However, the sequencing of testbench_fp is highly messed up. The module will likely require an entire refactoring to fix this. Readvectors may need to be removed as a module and incorporated into the main module. In the same always_ff @(posedge clk) block that loads vectors or advances the vector number, the readvectors logic may need to assign the new inputs and expected output.

@davidharrishmc
Copy link
Contributor Author

Defer this to an enhancement. Modify wsim to produce errors on testbench_fp when run in a sim other than Questa.

@davidharrishmc davidharrishmc added the enhancement New feature or request label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants