From 3c9c54e297de34fbac4b789201fc4ea51495fccb Mon Sep 17 00:00:00 2001 From: nella Date: Thu, 2 Apr 2026 09:03:14 +0200 Subject: [PATCH 1/2] Yosys CSA tree QoR. --- .gitmodules | 2 +- flake.lock | 35 ++++++++++++++++++----------------- flake.nix | 7 ++++--- flow/scripts/synth.tcl | 2 ++ tools/yosys | 2 +- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.gitmodules b/.gitmodules index 32bdbc7301..767e5543f7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "tools/yosys"] path = tools/yosys - url = ../../The-OpenROAD-Project/yosys.git + url = https://github.com/YosysHQ/yosys.git [submodule "tools/OpenROAD"] path = tools/OpenROAD url = ../OpenROAD.git diff --git a/flake.lock b/flake.lock index 724d7fe1e0..a1146abe73 100644 --- a/flake.lock +++ b/flake.lock @@ -54,16 +54,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1724316499, - "narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=", + "lastModified": 1771419570, + "narHash": "sha256-bxAlQgre3pcQcaRUm/8A0v/X8d2nhfraWSFqVmMcBcU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841", + "rev": "6d41bc27aaf7b6a3ba6b169db3bd5d6159cfaa47", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } @@ -89,17 +89,17 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1745262648, - "narHash": "sha256-NPLjho9TAygCUbRGdR8y+gxYcV0tek2ceMmuoFhwv1s=", + "lastModified": 1774752712, + "narHash": "sha256-bF0ZqAhLrrTanmNqF5z/fHpGy17t/eAV2SUaOpkNYQ0=", "ref": "refs/heads/master", - "rev": "7ecbe2e306a961888c17adc8eb761f51c94f06d8", - "revCount": 29094, + "rev": "ce7ee82f49a965e90de5dfc8de6e4d7d32534984", + "revCount": 38824, "submodules": true, "type": "git", "url": "https://github.com/The-OpenROAD-Project/OpenROAD" }, "original": { - "rev": "7ecbe2e306a961888c17adc8eb761f51c94f06d8", + "rev": "ce7ee82f49a965e90de5dfc8de6e4d7d32534984", "submodules": true, "type": "git", "url": "https://github.com/The-OpenROAD-Project/OpenROAD" @@ -149,20 +149,21 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1741764697, - "narHash": "sha256-5jQ9l0cyRhEI4UFInW3kqw5B+mdLFr66nfG716rO454=", - "ref": "refs/heads/master", - "rev": "c4b5190229616f7ebf8197f43990b4429de3e420", - "revCount": 14791, + "lastModified": 1775061651, + "narHash": "sha256-3a+Q9hkR4Ny07xdt2DEd3DM1n1pNy7iJlm7UT5pNbbk=", + "ref": "nella/carry-save-adders", + "rev": "0909e462c3efc2ecd9395e1d69485f9ad4027857", + "revCount": 16821, "submodules": true, "type": "git", - "url": "https://github.com/The-OpenROAD-Project/yosys" + "url": "https://github.com/YosysHQ/yosys" }, "original": { - "rev": "c4b5190229616f7ebf8197f43990b4429de3e420", + "ref": "nella/carry-save-adders", + "rev": "0909e462c3efc2ecd9395e1d69485f9ad4027857", "submodules": true, "type": "git", - "url": "https://github.com/The-OpenROAD-Project/yosys" + "url": "https://github.com/YosysHQ/yosys" } } }, diff --git a/flake.nix b/flake.nix index f6fba52b27..60965258e7 100644 --- a/flake.nix +++ b/flake.nix @@ -6,13 +6,14 @@ type = "git"; url = "https://github.com/The-OpenROAD-Project/OpenROAD"; submodules = true; - rev = "7ecbe2e306a961888c17adc8eb761f51c94f06d8"; + rev = "ce7ee82f49a965e90de5dfc8de6e4d7d32534984"; }; yosys = { type = "git"; - url = "https://github.com/The-OpenROAD-Project/yosys"; + url = "https://github.com/YosysHQ/yosys"; submodules = true; - rev = "c4b5190229616f7ebf8197f43990b4429de3e420"; + ref = "nella/carry-save-adders"; + rev = "0909e462c3efc2ecd9395e1d69485f9ad4027857"; }; }; outputs = { self, nixpkgs, flake-utils, openroad, yosys }: flake-utils.lib.eachDefaultSystem ( diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl index 8554f6d61c..ab2ee4500f 100644 --- a/flow/scripts/synth.tcl +++ b/flow/scripts/synth.tcl @@ -131,6 +131,8 @@ if { [env_var_exists_and_non_empty SYNTH_RETIME_MODULES] } { select -clear } +csa_tree + if { [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] || [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] diff --git a/tools/yosys b/tools/yosys index d3e297fcd4..0909e462c3 160000 --- a/tools/yosys +++ b/tools/yosys @@ -1 +1 @@ -Subproject commit d3e297fcd479247322f83d14f42b3556db7acdfb +Subproject commit 0909e462c3efc2ecd9395e1d69485f9ad4027857 From 7695d158fe2e6742c4912fc2cde078f92f7869a2 Mon Sep 17 00:00:00 2001 From: nella Date: Thu, 2 Apr 2026 15:50:47 +0200 Subject: [PATCH 2/2] Force CSA via synth. --- flake.lock | 14 +++++++------- flake.nix | 4 ++-- flow/scripts/synth.tcl | 2 -- tools/yosys | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index a1146abe73..774ac2d118 100644 --- a/flake.lock +++ b/flake.lock @@ -149,18 +149,18 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1775061651, - "narHash": "sha256-3a+Q9hkR4Ny07xdt2DEd3DM1n1pNy7iJlm7UT5pNbbk=", - "ref": "nella/carry-save-adders", - "rev": "0909e462c3efc2ecd9395e1d69485f9ad4027857", - "revCount": 16821, + "lastModified": 1775135859, + "narHash": "sha256-Feg5TeX5cUd+I0uwciytR3Fv4onpCivC54VDOyG1gPU=", + "ref": "nella/csa-orfs-eval", + "rev": "a41f55eba71a000a8aba26bb1b209659ffeb159a", + "revCount": 16822, "submodules": true, "type": "git", "url": "https://github.com/YosysHQ/yosys" }, "original": { - "ref": "nella/carry-save-adders", - "rev": "0909e462c3efc2ecd9395e1d69485f9ad4027857", + "ref": "nella/csa-orfs-eval", + "rev": "a41f55eba71a000a8aba26bb1b209659ffeb159a", "submodules": true, "type": "git", "url": "https://github.com/YosysHQ/yosys" diff --git a/flake.nix b/flake.nix index 60965258e7..e9d7cfa678 100644 --- a/flake.nix +++ b/flake.nix @@ -12,8 +12,8 @@ type = "git"; url = "https://github.com/YosysHQ/yosys"; submodules = true; - ref = "nella/carry-save-adders"; - rev = "0909e462c3efc2ecd9395e1d69485f9ad4027857"; + ref = "nella/csa-orfs-eval"; + rev = "a41f55eba71a000a8aba26bb1b209659ffeb159a"; }; }; outputs = { self, nixpkgs, flake-utils, openroad, yosys }: flake-utils.lib.eachDefaultSystem ( diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl index ab2ee4500f..8554f6d61c 100644 --- a/flow/scripts/synth.tcl +++ b/flow/scripts/synth.tcl @@ -131,8 +131,6 @@ if { [env_var_exists_and_non_empty SYNTH_RETIME_MODULES] } { select -clear } -csa_tree - if { [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] || [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] diff --git a/tools/yosys b/tools/yosys index 0909e462c3..a41f55eba7 160000 --- a/tools/yosys +++ b/tools/yosys @@ -1 +1 @@ -Subproject commit 0909e462c3efc2ecd9395e1d69485f9ad4027857 +Subproject commit a41f55eba71a000a8aba26bb1b209659ffeb159a