mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-22 07:05:51 +00:00
Map $macc_v2 cells (one signed <=27x18 product + one <=48-bit addend)
to MULTALU27X18 with the C addend enabled, so a*b+c maps to a single
DSP block instead of a multiply + fabric adder.
The C addend requires DYN_C_SEL("TRUE") + CSEL=1 (gowin_pack reads the
CSEL port, not the C_SEL parameter).
alumacc + macc techmap run before wreduce for gw5a, so $mul and $add
ports still have matching widths when alumacc tries to merge them.
Running after wreduce breaks the merge: wreduce narrows $mul Y (48->45)
but not $add A (stays 48), and alumacc can't merge mismatched widths.
56 lines
667 B
CMake
56 lines
667 B
CMake
yosys_pass(synth_gowin
|
|
synth_gowin.cc
|
|
REQUIRES
|
|
abc
|
|
abc9
|
|
alumacc
|
|
autoname
|
|
blackbox
|
|
check
|
|
clean
|
|
deminout
|
|
dfflegalize
|
|
flatten
|
|
fsm
|
|
hierarchy
|
|
hilomap
|
|
iopadmap
|
|
memory
|
|
memory_libmap
|
|
memory_map
|
|
opt
|
|
opt_clean
|
|
opt_expr
|
|
opt_lut_ins
|
|
peepopt
|
|
proc
|
|
read_verilog
|
|
setundef
|
|
share
|
|
simplemap
|
|
sort
|
|
splitnets
|
|
stat
|
|
techmap
|
|
tribuf
|
|
wreduce
|
|
write_json
|
|
write_verilog
|
|
DATA_DIR
|
|
gowin
|
|
DATA_FILES
|
|
cells_map.v
|
|
cells_sim.v
|
|
cells_latch.v
|
|
cells_xtra_gw1n.v
|
|
cells_xtra_gw2a.v
|
|
cells_xtra_gw5a.v
|
|
arith_map.v
|
|
brams_map.v
|
|
brams_map_gw5a.v
|
|
brams.txt
|
|
lutrams_map.v
|
|
lutrams.txt
|
|
dsp_map.v
|
|
macc_map_gw5a.v
|
|
)
|