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

$value$plusargs compile error for real types (%e / %f / %g unsupported) #1619

Closed
veripoolbot opened this issue Dec 3, 2019 · 5 comments
Closed
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Garrett Smith
Original Redmine Issue: 1619 from https://www.veripool.org

Original Assignee: Garrett Smith


Similar to Issue #1592, the command-line processing in verilated_heavy.h lacks support for 'double':

Vt_sys_plusargs.cpp: In member function _void Vt_sys_plusargs::_initial__TOP__1(Vt_sys_plusargs__Syms*)_:
Vt_sys_plusargs.cpp:170:53: error: invalid initialization of non-const reference of type _QData& {aka long unsigned int&}_ from an rvalue of type _QData {aka long unsigned int}_
                                              vlTOPp->t__DOT__p_r)))) {
                                                      ^
/home/scratch.gasmith_gpu_4/gasmith_nvgpu_verilator_1/dev/dv/verilator_utils/nvtools/verif/verilator/test_regress/../include/verilatedos.h:60:45: note: in definition of macro _VL_UNLIKELY_
 # define VL_UNLIKELY(x) __builtin_expect(!!(x), 0)
                                              ^
In file included from Vt_sys_plusargs.h:11:0,
                  from Vt_sys_plusargs.cpp:5,
                  from Vt_sys_plusargs__ALLcls.cpp:3:
/home/scratch.gasmith_gpu_4/gasmith_nvgpu_verilator_1/dev/dv/verilator_utils/nvtools/verif/verilator/test_regress/../include/verilated_heavy.h:98:14: note:   initializing argument 3 of _IData VL_VALUEPLUSARGS_INQ(int, const string&, QData&)_
 inline IData VL_VALUEPLUSARGS_INQ(int rbits, const std::string& ld, QData& rdr) VL_MT_SAFE

With the compilation error fixed, attempts to read real value plusargs always yield 0 because %e/%f/%g are unimplemented.

Changes to add this support: gcsmith@1fe2cfa

I'm adding unit tests for this alongside the updates for Issue #1592.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Garrett Smith
Original Date: 2019-12-03T20:12:50Z


Pull request: #6

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-03T22:50:08Z


Love getting bugs with patches to fix them!

Your patch looks good, just one nit, please replicate the %f test to also cover %e and %g so the verilated.cpp code coverage stays high. Then I'll merge.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Garrett Smith
Original Date: 2019-12-03T23:00:10Z


done

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-03T23:28:15Z


Fixed in git towards eventual 4.024 release.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-08T13:11:27Z


In 4.024.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

1 participant