question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icarus Verilog failure "sorry: Format 1 not implemented for getting real values."

See original GitHub issue

As of today I’m getting the following error on Icarus Verilog master (5d97405724d7755ecfbe2bfc25f6e6e81f2d029a):

2022-05-17T18:53:51.1617134Z /usr/local/bin/iverilog -o sim_build/sim.vvp -D COCOTB_SIM=1 -s sample_module -f sim_build/cmds.f -g2012   /home/runner/work/cocotb/cocotb/tests/test_cases/issue_120/../../../tests/designs/sample_module/sample_module.sv
2022-05-17T18:53:51.3888688Z MODULE=issue_120 TESTCASE= TOPLEVEL=sample_module TOPLEVEL_LANG=verilog \
2022-05-17T18:53:51.3889876Z          /usr/local/bin/vvp -M /home/runner/work/cocotb/cocotb/.nox/release_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/lib/python3.8/site-packages/cocotb/libs -m libcocotbvpi_icarus   sim_build/sim.vvp 
2022-05-17T18:53:51.3935770Z      -.--ns INFO     gpi                                ..mbed/gpi_embed.cpp:109  in set_program_name_in_venv        Using Python virtual environment interpreter at /home/runner/work/cocotb/cocotb/.nox/release_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/bin/python
2022-05-17T18:53:51.4119241Z      -.--ns INFO     gpi                                ../gpi/GpiCommon.cpp:99   in gpi_print_registered_impl       VPI registered
2022-05-17T18:53:51.4752447Z      0.00ns INFO     cocotb                             Running on Icarus Verilog version 12.0 (devel)
2022-05-17T18:53:51.4755874Z      0.00ns INFO     cocotb                             Running tests with cocotb v1.7.0.dev0 from /home/runner/work/cocotb/cocotb/.nox/release_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/lib/python3.8/site-packages/cocotb
2022-05-17T18:53:51.4756472Z      0.00ns INFO     cocotb                             Seeding Python random module with 1652813631
2022-05-17T18:53:51.6018398Z      0.00ns INFO     cocotb.regression                  Found test issue_120.issue_120_scheduling
2022-05-17T18:53:51.6019952Z      0.00ns INFO     cocotb.regression                  running issue_120_scheduling (1/1)
2022-05-17T18:53:51.6030760Z sorry: Format 1 not implemented for getting real values.
2022-05-17T18:53:51.6031850Z vvp: vpi_priv.cc:882: void vpip_real_get_value(double, s_vpi_value*): Assertion `0' failed.

Most likely the regression window is closer to the bad commit, probably no more than a day or two of commits.

FYI @steveicarus Maybe you see the issue right away. Otherwise I’ll try to narrow the regression window in the coming days and file an upstream issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marlonjamescommented, May 17, 2022

I did a git bisect:

a1485906ca05a708f8920977a4a7f3565c96e2b1 is the first bad commit
commit a1485906ca05a708f8920977a4a7f3565c96e2b1
Author: Stephen Williams <steve@icarus.com>
Date:   Sun May 15 18:47:18 2022 -0700

    Add parameters to vcd dumps

    Writing parameters into VCD files makes the values available to waveform
    tools. This can be done easily enough by writing out a $dumpadd section
    at the beginning of the file that sets the parameter values. We don't need
    to track the values over change, because by definition they do not change.

    This changes the typical vcd output as well, so a few of the regression tests
    need to be adjusted to account for this.

    Also, while tracking this down, found and fixed the vvp/README.txt documention
    for the .param/x records.

 ivtest/gold/array_dump.vcd.gold |  5 ++-
 ivtest/gold/br_gh156.vcd.gold   | 25 +++++++++++++
 ivtest/gold/dump_memword.vcd    |  5 ++-
 ivtest/gold/pr2859628.vcd.gold  |  5 ++-
 ivtest/gold/vcd-dup.vcd.gold    |  5 ++-
 ivtest/ivltests/br_gh156.v      | 17 +++++++++
 ivtest/regress-vlg.list         |  1 +
 vpi/sys_vcd.c                   | 77 +++++++++++++++++++++++++++++++++++++----
 vvp/README.txt                  |  8 ++---
 9 files changed, 132 insertions(+), 16 deletions(-)
 create mode 100644 ivtest/gold/br_gh156.vcd.gold
 create mode 100644 ivtest/ivltests/br_gh156.v

iverilog PR: https://github.com/steveicarus/iverilog/pull/714

sample_module.sv is used in many of our tests, and it has a parameter of type real: https://github.com/cocotb/cocotb/blob/be1c95994e8143cdad481a65eea3a2be5db57e3f/tests/designs/sample_module/sample_module.sv#L42

For some reason the VCD dumping attempts to get the value in the unsupported format vpiBinStrVal.

0reactions
steveicaruscommented, Oct 11, 2022

Can you help us out by following the guidelines and attach a small, complete working (failing) example program? I will look into it, since I was the one who implemented this commit. I have a pretty good idea of what’s going on.

On Tue, May 17, 2022 at 3:01 PM Marlon James @.***> wrote:

I did a git bisect:

a1485906ca05a708f8920977a4a7f3565c96e2b1 is the first bad commit commit a1485906ca05a708f8920977a4a7f3565c96e2b1 Author: Stephen Williams @.***> Date: Sun May 15 18:47:18 2022 -0700

Add parameters to vcd dumps

Writing parameters into VCD files makes the values available to waveform
tools. This can be done easily enough by writing out a $dumpadd section
at the beginning of the file that sets the parameter values. We don't need
to track the values over change, because by definition they do not change.

This changes the typical vcd output as well, so a few of the regression tests
need to be adjusted to account for this.

Also, while tracking this down, found and fixed the vvp/README.txt documention
for the .param/x records.

ivtest/gold/array_dump.vcd.gold | 5 +± ivtest/gold/br_gh156.vcd.gold | 25 +++++++++++++ ivtest/gold/dump_memword.vcd | 5 +± ivtest/gold/pr2859628.vcd.gold | 5 +± ivtest/gold/vcd-dup.vcd.gold | 5 +± ivtest/ivltests/br_gh156.v | 17 +++++++++ ivtest/regress-vlg.list | 1 + vpi/sys_vcd.c | 77 ++++++++++++++++++++++++++++++++++++±— vvp/README.txt | 8 +±– 9 files changed, 132 insertions(+), 16 deletions(-) create mode 100644 ivtest/gold/br_gh156.vcd.gold create mode 100644 ivtest/ivltests/br_gh156.v

sample_module.sv is used in many of our tests, and it has a parameter of type real: https://github.com/cocotb/cocotb/blob/be1c95994e8143cdad481a65eea3a2be5db57e3f/tests/designs/sample_module/sample_module.sv#L42

For some reason the VCD dumping attempts to get the value in the unsupported format vpiBinStrVal.

— Reply to this email directly, view it on GitHub https://github.com/cocotb/cocotb/issues/2975#issuecomment-1129358344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACKMVBSFBTSMH2FSO4ATLVKQJLFANCNFSM5WGEFVQA . You are receiving this because you were mentioned.Message ID: @.***>

– Steve Williams @.*** @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

829 VVP error when trying to $dumpvars real array
iVerilog successfully compiles the code, but when running vvp, I get the error: ... sorry: Format 1 not implemented for getting real values....
Read more >
Icarus verilog dump memory array ($dumpvars) - Stack Overflow
Hello,. The problem is that the compiler is not emitting those values into the dump file. You'll have to get in contact with...
Read more >
Icarus Verilog
Icarus Verilog is a Verilog simulation and synthesis tool. It operates as a compiler, compiling source code written in Verilog (IEEE-1364) into some...
Read more >
iverilog unable to bind parameter
v:14: error: Cannot evaluate genvar case expression: sel 2 error(s) during elaboration. The problem code is as follows: module alu( a, b, sel, ......
Read more >
Qflow-1.3 Changelog Page - Open Circuit Design
So in parsing a line for "ERROR" one cannot assume that the line begins with ... a structural verilog netlist to include constant...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found