From a3cc22821cbfb6bf043c2e07bf8b3b5119f9e2b3 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Sat, 16 Nov 2024 23:21:01 -0800 Subject: [PATCH] Update passes/pmgen/peepopt_muxadd.pmg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin PoviĊĦer --- passes/pmgen/peepopt_muxadd.pmg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/passes/pmgen/peepopt_muxadd.pmg b/passes/pmgen/peepopt_muxadd.pmg index 421b89366..7f114c93e 100644 --- a/passes/pmgen/peepopt_muxadd.pmg +++ b/passes/pmgen/peepopt_muxadd.pmg @@ -10,6 +10,13 @@ state add_a add_b add_y match add // Select adder select add->type == $add + choice A {\A, \B} + define B (A == \A ? \B : \A) + set add_y port(add, \Y) + set add_a port(add, A) + set add_b port(add, B) + set add_a_signed param(add, (A == \A) ? \A_SIGNED : \B_SIGNED)) + set add_a_id A endmatch code add_y add_a add_b