-
Notifications
You must be signed in to change notification settings - Fork 243
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
Run out of RAM when compiling with 4Gbyte #115
Comments
@darkstar007 It is unfortunate that building the DB currently requires so much memory. I believe the ECP-85k is probably the biggest device semi-officially supported by nextpnr. If you can't build the DB then you may well struggle to run any designs through nextpnr that utilise that capacity. If you can must use ECP5 device, then consider a smaller device: Line 66 in 3b2b15d
Line 1 in 3b2b15d
to get only that DB to build. Otherwise if you just want to play with nextpnr, you can try the smaller ice40 architecture. Hope that helps! |
I think the long term solution to this problem is to distribute the (plaintext, so not strictly a binary blob) |
@eddiehung OK, thanks. I'll see what I can do. What would be the recommended minimum amount of ram for a 85k device? (If project x-ray eventually runs on Kintex-7 devices, how much ram would be required then?) I'll leave this bug open so that other people can be aware of this issue. Thanks, Matt |
nextpnr uses a deduplicated database approach, which means that it's memory usage while running is quite low (but our current approach to build the database is quite expensive). For a medium-size design on the 85k, I am seeing a memory usage of around 250MB (design size should not greatly affect this). This deduplicated approach could also be applied to Xilinx devices in the future, and I would expect their memory usage to be on a similar order of magnitude as a result. |
@daveshah1 OK, thanks for the numbers. So it seems like when it is packaged, by say Debian, it will be fine to run (as the database will have been created by them) and memory usage when running is fine. As there currently (and understandably) no packages, I suspect I could probably just copy the files from my desktop (which has much more ram and builds it fine). |
Yes, once packaged it should be fine (although right now I do not consider Trellis to be stable enough to package). I think in the future there should also be a build option to pass to CMake that will tell it to fetch the databases prebuilt from a build server, but build everything else locally. |
OK, thanks for all your help. |
FWIW, |
I can confirm this is still an issue:
As seen with
It appears that 5GB RAM is the minimum to make I'm using this script to build the toolchain in an Ubuntu 18.04 LTS VM with the latest everything as of today. See also 4GB minimum needed for prjtrellis confirming what @q3k saw a couple of years ago. |
Hi,
When I try to compile nextpnr (configured with cmake . -DARCH=all -DTRELLIS_ROOT=/home/matt/prjtrellis), it runs out of RAM (I have 4GB, no swap, no graphics) with the following error:
Can anything be done to reduce its RAM usage?
Thanks,
Matt
The text was updated successfully, but these errors were encountered: