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

ERROR: Assert `n.id != 0' failed - seems related to unassigned variables #159

Closed
JulianKemmerer opened this issue Oct 9, 2021 · 7 comments

Comments

@JulianKemmerer
Copy link
Contributor

JulianKemmerer commented Oct 9, 2021

Hello,

I am hitting this assertion failure in recent builds of ghdl plugin for yosys.

log_assert(n.id != 0);

ERROR: Assert `n.id != 0' failed in frontends/ghdl/ghdl.cc:204.

I am testing using last night's OSS CAD Suite release for linux x64

GHDL 2.0.0-dev (1.0.0.r816.gcd3a3210.dirty) [Dunoon edition]
 Compiled with GNAT Version: 9.3.0
 llvm code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2021 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Yosys 0.10+14 (git sha1 772b9a108, clang 10.0.0-4ubuntu1 -fPIC -Os)

Steps to replicate:

  1. Unarchive attached zip. cd ghdl_assert_fail into the newly created dir.
  2. Run GHDL+Yosys build
cd verilator; # The build dir inside ghdl_assert_fail 
ghdl -i --std=08 `cat ../vhdl_files.txt`
ghdl -m --std=08 top 
yosys -g -p "ghdl --std=08 top; proc; opt; fsm; opt; memory; opt; write_verilog ../top/top.v" 

WRONG FILE PATHS WHOOPS:ghdl_assert_fail.zip

Correct: ghdl_assert_fail_correct_file_paths.zip

I will follow up with the working build I also have to compare to...

@JulianKemmerer
Copy link
Contributor Author

The same VHDL code compiles just fine - no assertion failure. With these versions

GHDL 2.0.0-dev (1.0.0.r778.g140ec481) [Dunoon edition]
 Compiled with GNAT Version: 9.3.0
 mcode code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2021 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Yosys 0.9+4303 (git sha1 e6766b95, clang 10.0.0-4ubuntu1 -fPIC -Os)

@JulianKemmerer
Copy link
Contributor Author

This may be related to this issue:
#158

Similar things about adding/removing extra variable assignments seem to change behavior

@JulianKemmerer
Copy link
Contributor Author

Whoops didnt fix absolute file paths on my system in the first .zip file - new one coming

@JulianKemmerer
Copy link
Contributor Author

@tgingold
Copy link
Member

now fixed. Thank you for the issue.

tgingold added a commit that referenced this issue Oct 11, 2021
@JulianKemmerer
Copy link
Contributor Author

Excellent - finally got around to testing this via the nightly oss cad suite build.

Working great!

Thanks again for your time!

@tgingold
Copy link
Member

tgingold commented Oct 15, 2021 via email

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

No branches or pull requests

2 participants