Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploder #84

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
be9570e
Add pragma once everywhere.
yashton Mar 10, 2022
d9fbb47
Initial cleanup
yashton Mar 17, 2022
deb3cdd
Update benchmarks.
yashton Mar 21, 2022
92f881d
Fix mapping verilog
yashton Mar 21, 2022
7569488
Add missing abc techmapping scripts and update github workflow.
yashton Mar 22, 2022
a15923f
Fix variable substitution in graph makefile target.
yashton Mar 22, 2022
287e5e4
Update build flags in github actions
yashton Mar 22, 2022
3e699cf
Update build image and github action usage.
yashton Mar 22, 2022
323fa07
Update to even newer ubuntu docker.
yashton Mar 22, 2022
7826bb1
Don't run cmake concurrently to check where the failure is
yashton Mar 22, 2022
524c6cd
Fix path to yosys in github build.
yashton Mar 22, 2022
3681209
Fix environment variables for matrix build and fix a test value.
yashton Mar 23, 2022
6217a99
Copy yosys plugin during actions.
yashton Mar 23, 2022
0901c4a
fix path to artifacts in benchmark run.
yashton Mar 23, 2022
ffe1303
Add a direct resynthesis run in benchmarks
yashton Mar 25, 2022
01a9dfb
Implement exploder and split optimizers to individual files.
yashton Mar 30, 2022
846e505
Fix signal connections
yashton Mar 30, 2022
becd6ad
WIP
yashton Apr 7, 2022
f20717b
Working exploder
yashton Apr 19, 2022
169a608
Update SDC files.
yashton May 2, 2022
6990c81
Update sdc and clock for opdb and ibex benchmarks
yashton May 11, 2022
64a7587
New critical path calculation for resynthesis
yashton May 16, 2022
9da624a
Add missing output and signal names in exploder
yashton May 16, 2022
e4bfe5b
Add an ABC only partition optimization
yashton May 16, 2022
511d231
Cleanup benchmark names and recipes
yashton May 16, 2022
5770f15
Merge remote-tracking branch 'origin/master' into exploder
yashton May 16, 2022
ca98029
Add tigfet db.
yashton May 16, 2022
85a61eb
Update mockturtle with fix to register info.
yashton May 16, 2022
7368723
Refactor for new partition manager (Normand reopti (#85) )
NormandAlexandre Jun 14, 2022
febd152
Handle newlines in external partition file (#87)
NormandAlexandre Jul 7, 2022
d922aa0
Set temporary filename prefix.
yashton Sep 12, 2022
b2ec2c3
Updated benchmark makefile
yashton Sep 12, 2022
61f091f
Fix indentation in plot script.
yashton Sep 12, 2022
7ef1078
Ignore dirty commits for libraries except alice, mockturtle, and kahy…
yashton Nov 7, 2024
88c2739
Preemptively migrate optimizers to subfiles before merge.
yashton Nov 7, 2024
b06fb81
Merge branch 'timing'
yashton Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated benchmark makefile
yashton committed Sep 12, 2022
commit b2ec2c375326d81a2671899a1cbdc4bc341dba29
44 changes: 35 additions & 9 deletions benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -41,20 +41,22 @@ ISCAS89 := iscas89/s1196.v iscas89/s1238.v iscas89/s15850.v iscas89/s298.v
OPDB := opdb/chip_bridge.pickle.v opdb/fpu.pickle.v opdb/gng.pickle.v # opdb/sparc_core.pickle.v
EPFL := EPFL/adder.v EPFL/arbiter.v EPFL/bar.v EPFL/i2c.v EPFL/log2.v EPFL/max.v EPFL/mem_ctrl.v EPFL/multiplier.v #EPFL/sin.v EPFL/sqrt.v EPFL/square.v EPFL/voter.v

DESIGNS := ${EPFL} ${ISCAS85} ${ISCAS89} ${OPDB} picorv32/picorv32.v
DESIGNS := ${EPFL} ${OPDB} # picorv32/picorv32.v

LIBERTY_FILES := techmapping/skywater/sky130_fd_sc_hd__tt_025C_1v80.lib
techmapping/tigfet/sclib_tigfet10_hpall_tt_0p70v_25c.lib \
techmapping/tigfet/sclib_tigfet10_hpnw1_tt_0p70v_25c.lib \
techmapping/tigfet/sclib_tigfet10_hpnw4_tt_0p70v_25c.lib \
techmapping/tigfet/sclib_tigfet10_hpnw8_tt_0p70v_25c.lib \
techmapping/tigfet/sclib_tigfet10_hpnw12_tt_0p70v_25c.lib
# techmapping/tigfet/sclib_tigfet10_hpall_tt_0p70v_25c.lib \
# techmapping/tigfet/sclib_tigfet10_hpnw1_tt_0p70v_25c.lib \
# techmapping/tigfet/sclib_tigfet10_hpnw4_tt_0p70v_25c.lib \
# techmapping/tigfet/sclib_tigfet10_hpnw8_tt_0p70v_25c.lib \
# techmapping/tigfet/sclib_tigfet10_hpnw12_tt_0p70v_25c.lib
# techmapping/gf12/sc9mcpp84_12lp_base_rvt_c14_tt_nominal_max_0p70v_25c.lib

LIBERTY_LIBS := $(foreach LIB,${LIBERTY_FILES},$(shell basename ${LIB} .lib))
TECHMAPPING_SCRIPTS := $(patsubst %.lib,%.synth.tcl,${LIBERTY_FILES})

RUNS := unoptimized abc timing_direct timing_internal_direct ndp_direct resynth_direct depth_direct nodes_direct abc_part_direct nodes_plugin depth_plugin ndp_plugin resynth_plugin migscript aigscript
RUNS := unoptimized timing_direct timing_direct_old ndp_direct resynth_direct
# timing_internal_direct timing_internal_direct_old
#abc depth_direct nodes_direct abc_part_direct nodes_plugin depth_plugin ndp_plugin resynth_plugin migscript aigscript

################################################################
######################## Targets ###############################
@@ -314,7 +316,7 @@ tigfet12: sclib_tigfet10_hpnw12_tt_0p70v_25c.pdf
@ echo "read_blif -a $<" > ${TEMP}
@ echo "ps -a" >> ${TEMP}
@ echo "external_partition $*.direct.parts" >> ${TEMP}
@ echo "optimize --resynth --abc_exec ${ABC} --temp_prefix $*" >> ${TEMP}
@ echo "optimize --resynth --abc_exec ${ABC}" >> ${TEMP}
@ echo "ps -g" >> ${TEMP}
@ echo "write_blif -g --filename $*.resynth_direct.blif" >> ${TEMP}
@ echo "write_stats -g --name $(shell basename $*) --optimization resynth_direct $*.resynth_direct.stats.json" >> ${TEMP}
@@ -341,21 +343,42 @@ define TIMING_SYNTH =
@ echo "read_blif -a $$<" > $${TEMP}
@ echo "ps -a" >> $${TEMP}
@ echo "external_partition $$*.direct.parts" >> $${TEMP}
@ echo "optimize_timing --clock clk --sdc $$*.timing_direct.${2}.sdc --output $$*.timing_internal_direct.${2}.mapped.v --abc_exec $${ABC} --liberty ${1} --mapping ${3}" >> $${TEMP}
@ echo "optimize_timing --clock clk --sdc $$*.timing_direct.${2}.sdc --output $$*.timing_internal_direct.${2}.mapped.v --abc_exec $${ABC} --liberty ${1} --mapping ${3} --temp-prefix $$*.timing_direct" >> $${TEMP}
@ echo "ps -g" >> $${TEMP}
@ echo "write_blif -g --filename $$*.timing_direct.blif" >> $${TEMP}
@ echo "write_stats --name $$(shell basename $$*) --optimization timing_direct -g $$*.timing_direct.stats.json" >> $${TEMP}
@ echo "write_stats --name $$(shell basename $$*) --optimization timing_internal_direct -g $$*.timing_internal_direct.stats.json" >> $${TEMP}
$${LSORACLE} -e -f $${TEMP} | $${TEE} $$*.timing_direct.optimize.log


%.timing_internal_direct_old.${2}.mapped.v %.timing_direct_old.optimize.log %.timing_direct_old.stats.json %.timing_internal_direct_old.stats.json %.timing_direct_old.blif &: %.unoptimized.blif %.timing_direct_old.${2}.sdc %.direct.parts
# $$(eval TEMP=$$(shell mktemp))
$$(eval TEMP=$$*.timing_direct_old.script)
@ echo "read_blif -a $$<" > $${TEMP}
@ echo "ps -a" >> $${TEMP}
@ echo "external_partition $$*.direct.parts" >> $${TEMP}
@ echo "optimize_timing2 --clock clk --sdc $$*.timing_direct_old.${2}.sdc --output $$*.timing_internal_direct_old.${2}.mapped.v --abc_exec $${ABC} --liberty ${1} --mapping ${3} --temp-prefix $$*.timing_direct" >> $${TEMP}
@ echo "ps -g" >> $${TEMP}
@ echo "write_blif -g --filename $$*.timing_direct_old.blif" >> $${TEMP}
@ echo "write_stats --name $$(shell basename $$*) --optimization timing_direct_old -g $$*.timing_direct_old.stats.json" >> $${TEMP}
@ echo "write_stats --name $$(shell basename $$*) --optimization timing_internal_direct_old -g $$*.timing_internal_direct_old.stats.json" >> $${TEMP}
$${LSORACLE} -e -f $${TEMP} | $${TEE} $$*.timing_direct_old.optimize.log

endef
$(foreach LIB,${LIBERTY_FILES},$(eval $(call TIMING_SYNTH,${LIB},$(shell basename ${LIB} .lib),$(patsubst %.lib,%.mapping.v,${LIB}))))

%.timing_direct.rtl &: %.timing_direct.blif
${YOSYS} -m ${YOSYS_PLUGIN} -Q -p "read_blif $*.timing_direct.blif; stat; simplemap; stat; techmap; stat; opt -purge; stat; write_rtlil $*.timing_direct.rtl" | ${TEE} $*.timing_direct.optimize_rtl.log

%.timing_direct_old.rtl &: %.timing_direct_old.blif
${YOSYS} -m ${YOSYS_PLUGIN} -Q -p "read_blif $*.timing_direct_old.blif; stat; simplemap; stat; techmap; stat; opt -purge; stat; write_rtlil $*.timing_direct_old.rtl" | ${TEE} $*.timing_direct_old.optimize_rtl.log

%.timing_internal_direct.rtl: %.timing_direct.rtl
cp $< $@

%.timing_internal_direct_old.rtl: %.timing_direct_old.rtl
cp $< $@

%.abc.rtl %.abc.blif %.abc.optimize.log &: %.unoptimized.rtl
${YOSYS} -Q -p "read_rtlil $<; abc -script techmapping/resyn2rs.abc; techmap; stat; write_rtlil $*.abc.rtl; write_blif $*.abc.blif" | ${TEE} $*.abc.optimize.log

@@ -432,6 +455,9 @@ define TIMING_JSON =
%.timing_internal_direct.$(2).gates: %.timing_internal_direct.$(2).mapped.flatten.v
${YOSYS} -Q -p "read_verilog $$<; stat -liberty $(1)" > $$@

%.timing_internal_direct_old.$(2).gates: %.timing_internal_direct_old.$(2).mapped.flatten.v
${YOSYS} -Q -p "read_verilog $$<; stat -liberty $(1)" > $$@

%.$(2).gates: %.$(2).mapped.v
${YOSYS} -Q -p "read_verilog $$<; stat -liberty $(1)" > $$@
endef