From 8f7308b036533bbd25b60fe99f6bb47b2d7ff062 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Wed, 10 Jun 2020 19:42:17 +0200 Subject: [PATCH] migen: add patch to limit vivado threads to 1 --- .../migen-limit-vivado-threads-to-1.patch | 24 +++++++++++++++++++ artiq-fast/pkgs/python-deps.nix | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 artiq-fast/pkgs/migen-limit-vivado-threads-to-1.patch diff --git a/artiq-fast/pkgs/migen-limit-vivado-threads-to-1.patch b/artiq-fast/pkgs/migen-limit-vivado-threads-to-1.patch new file mode 100644 index 0000000..903ac6f --- /dev/null +++ b/artiq-fast/pkgs/migen-limit-vivado-threads-to-1.patch @@ -0,0 +1,24 @@ +From 59a61be1b7b7cb45f5494b980b9f37e2838d6e6a Mon Sep 17 00:00:00 2001 +From: Astro +Date: Wed, 10 Jun 2020 19:29:25 +0200 +Subject: [PATCH] limit vivado threads to 1 + +--- + migen/build/xilinx/vivado.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/migen/build/xilinx/vivado.py b/migen/build/xilinx/vivado.py +index d2cf101..e9e4b77 100644 +--- a/migen/build/xilinx/vivado.py ++++ b/migen/build/xilinx/vivado.py +@@ -149,6 +149,7 @@ class XilinxVivadoToolchain: + + # script that calls above steps + tcl = [] ++ tcl.append("set_param general.maxThreads 1") + tcl.append("source \"{}_route.tcl\"".format(build_name)) + tcl.append("source \"{}_bitstream.tcl\"".format(build_name)) + tools.write_to_file(build_name + ".tcl", "\n".join(tcl)) +-- +2.26.2 + diff --git a/artiq-fast/pkgs/python-deps.nix b/artiq-fast/pkgs/python-deps.nix index 31f6147..b5ff625 100644 --- a/artiq-fast/pkgs/python-deps.nix +++ b/artiq-fast/pkgs/python-deps.nix @@ -86,6 +86,11 @@ rec { rev = "b1b2b298b85a795239daad84c75be073ddc4f8bd"; sha256 = "1qy2ydk8xqqv92i992j1g71fbi185zd6s3kigzsf3169874dyh81"; }; + patches = [ + # Vivado synthesis processes consume over 1 GB of RSS each. Limit them to + # 1 thread because they can become overwhelming during parallel builds. + ./migen-limit-vivado-threads-to-1.patch + ]; propagatedBuildInputs = with python3Packages; [ colorama ];