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

Another out-of-memory problem with for loop #4345

Open
YikeZhou opened this issue Apr 19, 2024 · 0 comments
Open

Another out-of-memory problem with for loop #4345

YikeZhou opened this issue Apr 19, 2024 · 0 comments
Labels
pending-verification This issue is pending verification and/or reproduction

Comments

@YikeZhou
Copy link

Version

Yosys 0.40+25 (git sha1 171577f, clang++ 14.0.6 -fPIC -Os)

On which OS did this happen?

Linux

Reproduction Steps

Hello. After searching existing issues, I found #3447 and #3456. However, the problem I encountered seems different from those former ones. Therefore, I opened this new issue. Any help would be appreciated!

I managed to reduce the input program into oom.v as below:

module oom #(parameter P = 4);

function [31:0] foo;
  input [31:0]  x;
  begin
    foo = x;
  end
endfunction

localparam STEP = foo(P);
integer i;
  always @(*) begin
    for (i = 4; i >= 0; i=i-STEP) begin
      /* empty */
    end
  end

endmodule

Command:

yosys -p "read_verilog oom.v"

Expected Behavior

To perform read_verilog successfully.

Actual Behavior

Before the Yosys process got killed, it took nearly 20g of virtual memory on my PC.

Console output:

$ yosys -p "read_verilog oom.v"

 /----------------------------------------------------------------------------\
 |  yosys -- Yosys Open SYnthesis Suite                                       |
 |  Copyright (C) 2012 - 2024  Claire Xenia Wolf <claire@yosyshq.com>         |
 |  Distributed under an ISC-like license, type "license" to see terms        |
 \----------------------------------------------------------------------------/
 Yosys 0.40+25 (git sha1 171577f90, clang++ 14.0.6 -fPIC -Os)

-- Running command `read_verilog oom.v' --

1. Executing Verilog-2005 frontend: oom.v
Parsing Verilog input from `oom.v' to AST representation.
Generating RTLIL representation for module `\oom'.
Killed
@YikeZhou YikeZhou added the pending-verification This issue is pending verification and/or reproduction label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification This issue is pending verification and/or reproduction
Projects
None yet
Development

No branches or pull requests

1 participant