Navigation Menu

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

scr1 test suite: processing passes get stuck, and allocate huge amounts of system RAM when verilog contains memory blocks #1286

Closed
veripoolbot opened this issue Mar 8, 2018 · 4 comments
Labels
effort: days Expect this issue to require roughly days of invested effort to resolve

Comments

@veripoolbot
Copy link
Contributor


Author Name: Joel Holdsworth
Original Redmine Issue: 1286 from https://www.veripool.org


Verilator gets stuck allocating huge amounts of memory when processing SystemVerilog code like this...

module test(input reset);

parameter MEM_POWER_SIZE = 16;
logic [7:0] memory [0:2**MEM_POWER_SIZE-1];

always @(negedge reset) begin
  memory = '{2**MEM_POWER_SIZE{'0}};
end

endmodule

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-03-09T04:45:02Z


Verilator needs enough memory to fit the entire model, times some inefficiency factor.

The fix could be to throw an error on very large structures (which of course should instead be sparse models), but it's hard to determine what is too large as that depends on system constraints. So my inclination is to leave it as is, but other ideas are welcome.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Joel Holdsworth
Original Date: 2018-03-09T17:10:54Z


It would be nice to get an error or a warning. I only figured out the source of the problem by reading the file & line-number out of the AST in gdb.

I could try making the RAM block smaller. At the moment it's allocating more system RAM than I have; at least 2Gb. I'm not sure to what extent the test suite relies on this block being the size it is.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Joel Holdsworth
Original Date: 2018-03-10T04:21:31Z


The block was 16Mb in size. Fortunately nothing in the test suite needs this much memory, so I reduced it to 64kB, and now Verilator is much happier

@veripoolbot veripoolbot added the effort: days Expect this issue to require roughly days of invested effort to resolve label Dec 22, 2019
@wsnyder
Copy link
Member

wsnyder commented May 27, 2023

Closing due to age; not sure what can be fixed here, if someone wants to contribute ideas or a patch please reopen.

@wsnyder wsnyder closed this as completed May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: days Expect this issue to require roughly days of invested effort to resolve
Projects
None yet
Development

No branches or pull requests

2 participants