OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

terminate called after throwing an instance of 'std::length_error'

Open JiaDYuan opened this issue 2 years ago • 7 comments

Hi, I am failing the placement process of Single Rocket because of the possible memory problem: #2082

So I tried to run a simple one, here is the RTL: serial.zip

And the PDK is also nangate45: config&PDK.zip

But the synthesis failed beacause of a error, "terminate called after throwing an instance of 'std::length_error'"

Here is the log: 1_1_yosys.log BTW, the synthesis passed successfully in FPGA flow (Vivado) without any error.

What's more, I have an additional question. I tried to generate a FFT through Chipyard. But it seems like that only FFT with a processor (Rocket) can be generated. So can Chipyard generate RTLs of accelerators only without any processor or core?

JiaDYuan avatar Aug 01 '22 06:08 JiaDYuan

@vvbandeira FYI Issue confirmed at my end as well.

7.23.2. Executing OPT_MERGE pass (detect identical cells).
terminate called after throwing an instance of 'std::length_error'
  what():  hash table exceeded maximum size. use a ILP64 abi for larger tables.
Elapsed time: 37:01.61[h:]min:sec. CPU time: user 2151.83 sys 69.10 (99%). Peak memory: 23500444KB.
make: *** [results/nangate45/serial/base/1_1_yosys.v] Error 6

vijayank88 avatar Aug 01 '22 09:08 vijayank88

This looks like an issue with Yosys and not OpenROAD.

vvbandeira avatar Aug 01 '22 14:08 vvbandeira

@JiaDYuan are you using ORFS / OpenLane? I would suggest you try the latest version of Yosys to see if the problem got fixed --- ORFS and OpenLane usually are behind. If the problem persists, file an issue in the upstream repo: https://github.com/YosysHQ/yosys

vvbandeira avatar Aug 01 '22 15:08 vvbandeira

@vvbandeira Hi, I installed the newest Yosys: Yosys 0.20+1 (git sha1 60a787fa5, clang 11.0.1-2 -fPIC -Os)

But the synthesis still failed with the same error:

7.23.2. Executing OPT_MERGE pass (detect identical cells). terminate called after throwing an instance of 'std::length_error' what(): hash table exceeded maximum size. use a ILP64 abi for larger tables. Command terminated by signal 6 Elapsed time: 30:35.81[h:]min:sec. CPU time: user 1801.48 sys 33.81 (99%). Peak memory: 19007064KB. make: *** [Makefile:372: results/nangate45/serial/base/1_1_yosys.v] Error 134

JiaDYuan avatar Aug 07 '22 14:08 JiaDYuan

The message "use a ILP64 abi" suggests you have compiled for 32bits.

Check if your executable is 32 bit or 64 bit. I did:

% file /workspaces/mliberty/w1/OpenROAD-flow-scripts/tools/install/yosys/bin/yosys
/workspaces/mliberty/w1/OpenROAD-flow-scripts/tools/install/yosys/bin/yosys: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=225a0e0281bd0a519b433d718ae65d5955961a94, not stripped

the "64-bit LSB executable" is what we are looking for.

maliberty avatar Aug 07 '22 21:08 maliberty

@maliberty

Hi, I think it is 64-bit LSB executable:

$ file ~/YOSYS/usr/local/bin/yosys /home/yuanjiadong/YOSYS/usr/local/bin/yosys: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2c59d312ae6c641d9ca693495f26f96d63670331, for GNU/Linux 3.2.0, not stripped

JiaDYuan avatar Aug 07 '22 22:08 JiaDYuan

I have filed a yosys issue for you. Note that the yosys team is separate so I have no control over whether if/when they choose to address this.

maliberty avatar Aug 08 '22 17:08 maliberty

throw std::length_error("hash table exceeded maximum size.\nDesign is likely too large for yosys to handle, if possible try not to flatten the design.");

@JiaDYuan above is the new message from Yosys team. Looks like the issue is due to the design size and Yosys limitations -- not related to OpenROAD itself. You could try to break down your design into modules and use black-box to combine them afterwards. For these reasons, I will close the issue, but let us know if we can help with anything else.

vvbandeira avatar Oct 10 '22 15:10 vvbandeira