2021-04-16 21:00:30 -05:00
|
|
|
# Yosys synthesis script for ${TOP_MODULE}
|
|
|
|
# Read verilog files
|
|
|
|
${READ_VERILOG_FILE}
|
|
|
|
# Read technology library
|
|
|
|
read_verilog -lib -specify ${YOSYS_CELL_SIM_VERILOG}
|
|
|
|
|
|
|
|
# Technology mapping
|
|
|
|
hierarchy -top ${TOP_MODULE}
|
|
|
|
proc
|
|
|
|
techmap -D NO_LUT -map ${YOSYS_DFF_MAP_VERILOG}
|
|
|
|
|
|
|
|
# Synthesis
|
2021-10-30 17:12:34 -05:00
|
|
|
flatten
|
2021-10-30 16:56:54 -05:00
|
|
|
opt_expr
|
|
|
|
opt_clean
|
|
|
|
check
|
|
|
|
opt -nodffe -nosdff
|
|
|
|
fsm
|
|
|
|
opt -nodffe -nosdff
|
|
|
|
wreduce
|
|
|
|
peepopt
|
|
|
|
opt_clean
|
|
|
|
opt -nodffe -nosdff
|
|
|
|
memory -nomap
|
|
|
|
opt_clean
|
|
|
|
opt -fast -full -nodffe -nosdff
|
|
|
|
memory_map
|
|
|
|
opt -full -nodffe -nosdff
|
|
|
|
techmap
|
|
|
|
opt -fast -nodffe -nosdff
|
2021-04-16 21:00:30 -05:00
|
|
|
clean
|
|
|
|
|
|
|
|
# LUT mapping
|
|
|
|
abc -lut ${LUT_SIZE}
|
|
|
|
|
2021-04-16 21:47:18 -05:00
|
|
|
# FF mapping
|
|
|
|
techmap -D NO_LUT -map ${YOSYS_DFF_MAP_VERILOG}
|
|
|
|
|
2021-04-16 21:00:30 -05:00
|
|
|
# Check
|
|
|
|
synth -run check
|
|
|
|
|
|
|
|
# Clean and output blif
|
|
|
|
opt_clean -purge
|
|
|
|
write_blif ${OUTPUT_BLIF}
|