Page MenuHomePhorge

bbdd_synth_muxxor.ys
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

bbdd_synth_muxxor.ys

######################### preprocessing ###########################################################################
read_verilog {{VERILOG_FILE}}
hierarchy -top {{TOP_MODULE}}
proc;;
opt;;;
flatten -noscopeinfo;;
opt;;;
techmap;;
opt;;;
splitnets -ports;;
opt;;;
########################## write design to a blif file and delete empty line because mockturtle cannot handle that #
write_blif {{TEMP_DIR}}/{{BASE_NAME}}.blif
rename {{TOP_MODULE}} {{TOP_MODULE}}_golden
exec -- sed -i '/^$/d' {{TEMP_DIR}}/{{BASE_NAME}}.blif
########################## execute bbdd pass map the result back to yosys names and rename the module #############
exec -- timeout {{TIMEOUT}} time -f "\nTime: %E\nCPU: %P\nMemory: %M KB" -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd_time.txt ./build/src/convert_bbdd -t 300000 {{TEMP_DIR}}/{{BASE_NAME}}.blif
read_blif {{TEMP_DIR}}/{{BASE_NAME}}_bbdd.blif
rename {{TOP_MODULE}} {{TOP_MODULE}}_bbdd
stat {{TOP_MODULE}}_bbdd
techmap -map {{TECHMAP_BBDD}}
copy {{TOP_MODULE}}_bbdd {{TOP_MODULE}}_sat
techmap -map yosys/muxxor_inv_map.v {{TOP_MODULE}}_bbdd
techmap -map yosys/muxxor_inv_sat.v {{TOP_MODULE}}_sat
opt -full {{TOP_MODULE}}_bbdd
opt -full {{TOP_MODULE}}_golden
########################### check equality of the optimization ######################################################
{{SAT}}miter -equiv -make_assert {{TOP_MODULE}}_golden {{TOP_MODULE}}_sat equal
{{SAT}}flatten equal
{{SAT}}clean equal
{{SAT}}opt -full equal;;
{{SAT}}techmap equal
{{SAT}}sat -prove-asserts -set-init-zero -tempinduct -verify -show-regs -show-inputs -show-outputs -dump_vcd trace.vcd equal
########################### write data without abc pass #############################################################
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd.json stat -json {{TOP_MODULE}}_bbdd
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden.json stat -json {{TOP_MODULE}}_golden
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd_ltp.txt ltp {{TOP_MODULE}}_sat
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden_ltp.txt ltp {{TOP_MODULE}}_golden
########################### abc pass for the golden solution ########################################################
copy {{TOP_MODULE}}_golden {{TOP_MODULE}}_golden_abc
abc -liberty {{LIBERTY_FILE}} {{TOP_MODULE}}_golden_abc
########################### abc pass for the optimization solution #################################################
copy {{TOP_MODULE}}_bbdd {{TOP_MODULE}}_bbdd_abc
abc -D 100 -liberty {{LIBERTY_FILE}} {{TOP_MODULE}}_bbdd_abc
#print stats to file
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd.json stat -json {{TOP_MODULE}}_bbdd
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd_abc.json stat -json {{TOP_MODULE}}_bbdd_abc
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden.json stat -json {{TOP_MODULE}}_golden
tee -o {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden_abc.json stat -json {{TOP_MODULE}}_golden_abc
########################### write abc blif and verilog #############################################################
write_blif -top {{TOP_MODULE}}_bbdd_abc {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd_abc.blif
write_blif -top {{TOP_MODULE}}_bbdd {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd.blif
write_blif -top {{TOP_MODULE}}_golden_abc {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden_abc.blif
write_blif -top {{TOP_MODULE}}_golden {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden.blif
select {{TOP_MODULE}}_bbdd_abc
write_verilog -selected {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd_abc.v
select {{TOP_MODULE}}_bbdd
write_verilog -selected {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_bbdd.v
select {{TOP_MODULE}}_golden_abc
write_verilog -selected {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden_abc.v
select {{TOP_MODULE}}_golden
write_verilog -selected {{OUT_DIR}}/{{BASE_NAME}}/{{BASE_NAME}}_golden.v

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 19, 1:45 PM (11 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
199600
Default Alt Text
bbdd_synth_muxxor.ys (3 KB)

Event Timeline