Update passes/pmgen/peepopt_muxadd.pmg

Co-authored-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
Akash Levy 2024-11-16 23:21:01 -08:00 committed by GitHub
parent 9f84a92878
commit a3cc22821c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,13 @@ state <SigSpec> add_a add_b add_y
match add match add
// Select adder // Select adder
select add->type == $add select add->type == $add
choice <IdString> A {\A, \B}
define <IdString> 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 endmatch
code add_y add_a add_b code add_y add_a add_b