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
--trace of SystemVerlog string gives compile error #1338
Comments
Original Redmine Comment The offending code (if I comment it out it compiles properly) is a function returning a SV string: https://github.com/jeras/rp32/blob/Verilator_string_bug/tbn/riscv_asm_pkg.sv#L13 The error is present regardless if the function is actually used or not, but I tried using it, just in case it would help (it did not): https://github.com/jeras/rp32/blob/Verilator_string_bug/tbn/rp_tb.sv#L111 |
Original Redmine Comment Your rp32.git seemed to pass on my current master, can you try using the latest code, and if it doesn't pass make a minimal test ideally in test_regress format - sounds like you reduced it quite a bit. Thanks |
Original Redmine Comment I was able to strip the test down to the basics, but I have not yet created a test_regress unit. I should be able to, I have done this before :) I was able to reproduce the issue with the git HEAD version of Verilator. While striping I first removed the SystemC dependency, ... the last part to be removed was the sprintf() function. It seems the parameter/localparameter of type array of strings is causing the issue. |
Original Redmine Comment Hi, I updated the string regression test and run "make test", and there was no error, but I am unsure if the test was actually executed. I added a $display debug line into the test bus not able to see it in the make test output, so I am assuming I did something wrong. The updated test is available here: |
Original Redmine Comment I will attach a tarball containing my build with all generated files, so you would be able to see if there are errors in the generated code. If there are no errors inside generated code, then a make inside odj_dir should not fail. tar -xvf bugreport.tgz |
Original Redmine Comment Fixed in git towards 4.000. Note the fix is not to trace the string at all, as VCD format isn't speced to have string support. |
Original Redmine Comment I was able to run the test code properly with the fixed Verilator, then I encountered another error compiling generated code. I tried to make the test case smaller (it is now about 20 lines), but if I remove additional lines of code the code compiles and runs properly. Verilator Git HEAD from a couple of days ago was used. I again attached a tarball containing the example and generated code. The rebuild process is the same as with the previous tarball. Regards, Iztok Jeras |
Original Redmine Comment Please file a new issue and I'll take a look tonight, thanks. |
Original Redmine Comment |
Original Redmine Comment In 4.002. |
Author Name: Iztok Jeras (@jeras)
Original Redmine Issue: 1338 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
Using Verilator Verilator 3.924 2018-06-12 (an Ubuntu build hosted as launchpad PPA), and the latest systemC from the same PPA. So it is possible the tools are not compiled properly.
The SystemVerilog code compiles without errors, but the generated C++ does not compile:
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: