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

[ImportVerilog] Crash on ordering-methods-reverse test #8173

Open
fabianschuiki opened this issue Feb 2, 2025 · 0 comments
Open

[ImportVerilog] Crash on ordering-methods-reverse test #8173

fabianschuiki opened this issue Feb 2, 2025 · 0 comments
Labels
bug Something isn't working ImportVerilog

Comments

@fabianschuiki
Copy link
Contributor

Running circt-verilog on https://chipsalliance.github.io/sv-tests-results/?v=circt_verilog+7.4.2+ordering-methods-reverse causes a crash.

module top ();

string s[] = { "hello", "sad", "world" };

initial begin
	$display(":assert: (('%s' == 'hello') and ('%s' == 'sad') and ('%s' == 'world'))",
		s[0], s[1], s[2]);
	s.reverse;
	$display(":assert: (('%s' == 'world') and ('%s' == 'sad') and ('%s' == 'hello'))",
		s[0], s[1], s[2]);
end

endmodule
circt-verilog -I /root/sv-tests/sv-tests/tests/chapter-7/arrays/unpacked/ordering-methods --timescale=1ns/1ns --single-unit --top=top [tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv](https://chipsalliance.github.io/sv-tests-results/tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv.html)
[tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv:18:16](https://chipsalliance.github.io/sv-tests-results/tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv.html#l-18): error: expression of type '!moore.string' cannot be cast to a simple bit vector
string s[] = { "hello", "sad", "world" };
               ^
[tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv:18:25](https://chipsalliance.github.io/sv-tests-results/tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv.html#l-18): error: expression of type '!moore.string' cannot be cast to a simple bit vector
string s[] = { "hello", "sad", "world" };
                        ^
[tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv:18:32](https://chipsalliance.github.io/sv-tests-results/tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv.html#l-18): error: expression of type '!moore.string' cannot be cast to a simple bit vector
string s[] = { "hello", "sad", "world" };
                               ^
PLEASE submit a bug report to https://github.com/llvm/circt and include the crash backtrace.
Stack dump:
0.	Program arguments: circt-verilog -I /root/sv-tests/sv-tests/tests/chapter-7/arrays/unpacked/ordering-methods --timescale=1ns/1ns --single-unit --top=top [tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv](https://chipsalliance.github.io/sv-tests-results/tests/chapter-7/arrays/unpacked/ordering-methods/reverse.sv.html)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  circt-verilog 0x000055976388cb47
1  circt-verilog 0x000055976388a9ee
2  circt-verilog 0x000055976388d21a
[...]
@fabianschuiki fabianschuiki added bug Something isn't working ImportVerilog labels Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ImportVerilog
Projects
None yet
Development

No branches or pull requests

1 participant