45 lines
729 B
Plaintext
45 lines
729 B
Plaintext
# 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
|
|
flatten
|
|
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
|
|
clean
|
|
|
|
# LUT mapping
|
|
abc -lut ${LUT_SIZE}
|
|
|
|
# FF mapping
|
|
techmap -D NO_LUT -map ${YOSYS_DFF_MAP_VERILOG}
|
|
|
|
# Check
|
|
synth -run check
|
|
|
|
# Clean and output blif
|
|
opt_clean -purge
|
|
write_blif ${OUTPUT_BLIF}
|