forked from Github_Repos/cvw
Updated synthesis and Makefile to output into binned directories.
This commit is contained in:
parent
793670d878
commit
380085ca20
@ -3,11 +3,10 @@
|
||||
set CURRENT_DIR [exec pwd]
|
||||
set search_path [list "./" ]
|
||||
|
||||
#set timing_lib "$::env(RISCV)/cad/lib"
|
||||
set timing_lib "/opt/riscv/cad/lib"
|
||||
set timing_lib $::env(RISCV)/cad/lib
|
||||
lappend search_path $timing_lib
|
||||
#set s8lib ../addins/sky130_osu_sc_t12/12T_ms/lib
|
||||
#lappend search_path $s8lib
|
||||
set s8lib $timing_lib/sky130_osu_sc_t12/12T_ms/lib
|
||||
lappend search_path $s8lib
|
||||
|
||||
|
||||
# Synthetic libraries
|
||||
@ -16,8 +15,8 @@ set synthetic_library [list dw_foundation.sldb]
|
||||
# Set OKSTATE standard cell libraries
|
||||
set target_library [list]
|
||||
|
||||
lappend target_library scc9gena_tt_1.2v_25C.db
|
||||
#lappend target_library sky130_osu_sc_12T_ms_TT_1P8_25C.ccs.db
|
||||
#lappend target_library scc9gena_tt_1.2v_25C.db
|
||||
lappend target_library sky130_osu_sc_12T_ms_TT_1P8_25C.ccs.db
|
||||
|
||||
# Set Link Library
|
||||
set link_library "$target_library $synthetic_library"
|
||||
|
@ -3,7 +3,15 @@
|
||||
#
|
||||
NAME := synth
|
||||
|
||||
#instead of variant can we select 130nm, 90nm, or 28nm?
|
||||
VARIANT := 18T_ms
|
||||
# defaults
|
||||
export DESIGN ?= wallypipelinedcore
|
||||
export FREQ ?= 500
|
||||
|
||||
time := $(shell date +%F-%H-%M)
|
||||
hash := $(shell git rev-parse --short HEAD)
|
||||
export OUTPUTDIR := runs/$(DESIGN)_$(FREQ)_MHz_$(time)_$(hash)
|
||||
|
||||
default:
|
||||
@echo "Basic synthesis procedure for OSU/HMC/UNLV:"
|
||||
@ -11,11 +19,13 @@ default:
|
||||
@echo
|
||||
|
||||
synth:
|
||||
@sed -i 's/18T_ms/${VARIANT}/g' scripts/synth.tcl
|
||||
@sed -i 's/18T_ms/${VARIANT}/g' .synopsys_dc.setup
|
||||
# @sed -i 's/18T_ms/${VARIANT}/g' scripts/synth.tcl
|
||||
# @sed -i 's/18T_ms/${VARIANT}/g' .synopsys_dc.setup
|
||||
@echo "DC Synthesis"
|
||||
@mkdir -p reports
|
||||
@mkdir -p mapped
|
||||
@mkdir -p $(OUTPUTDIR)
|
||||
@mkdir -p $(OUTPUTDIR)/reports
|
||||
@mkdir -p $(OUTPUTDIR)/mapped
|
||||
@mkdir -p $(OUTPUTDIR)/unmapped
|
||||
dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(NAME).out
|
||||
# @cp mapped/*.sdc ../../outputs/
|
||||
# @cp mapped/*.vh ../../outputs/
|
||||
|
@ -2,17 +2,20 @@
|
||||
# OKSTATE Main Synopsys Flow
|
||||
# Updated Sep 27, 2015 jes
|
||||
#
|
||||
# get outputDir from environment (Makefile)
|
||||
set outputDir $::env(OUTPUTDIR)
|
||||
|
||||
# Config
|
||||
set hdl_src "../../../pipelined/src"
|
||||
set hdl_src "../pipelined/src"
|
||||
set cfg "${hdl_src}/../config/rv32e/wally-config.vh"
|
||||
|
||||
eval file copy -force ${cfg} {hdl/}
|
||||
eval file copy -force ${cfg} {reports/}
|
||||
eval file copy -force ${cfg} $outputDir
|
||||
eval file copy -force [glob ${hdl_src}/../config/shared/*.vh] {hdl/}
|
||||
eval file copy -force [glob ${hdl_src}/*/*.sv] {hdl/}
|
||||
eval file copy -force [glob ${hdl_src}/*/flop/*.sv] {hdl/}
|
||||
|
||||
|
||||
# Verilog files
|
||||
set my_verilog_files [glob hdl/*]
|
||||
|
||||
@ -46,7 +49,7 @@ link
|
||||
reset_design
|
||||
|
||||
# Set reset false path
|
||||
set_false_path -from [get_ports reset_ext]
|
||||
set_false_path -from [get_ports reset]
|
||||
|
||||
# Set Frequency in [MHz] or [ps]
|
||||
set my_clock_pin clk
|
||||
@ -77,16 +80,16 @@ set all_in_ex_clk [remove_from_collection [all_inputs] [get_ports $my_clk]]
|
||||
#set_propagated_clock [get_clocks $my_clk]
|
||||
|
||||
# Setting constraints on input ports
|
||||
set_driving_cell -lib_cell scc9gena_dfxbp_1 -pin Q $all_in_ex_clk
|
||||
#set_driving_cell -lib_cell sky130_osu_sc_12T_ms__dff_1 -pin Q $all_in_ex_clk
|
||||
#set_driving_cell -lib_cell scc9gena_dfxbp_1 -pin Q $all_in_ex_clk
|
||||
set_driving_cell -lib_cell sky130_osu_sc_12T_ms__dff_1 -pin Q $all_in_ex_clk
|
||||
|
||||
# Set input/output delay
|
||||
set_input_delay 0.0 -max -clock $my_clk $all_in_ex_clk
|
||||
set_output_delay 0.0 -max -clock $my_clk [all_outputs]
|
||||
|
||||
# Setting load constraint on output ports
|
||||
set_load [expr [load_of scc9gena_tt_1.2v_25C/scc9gena_dfxbp_1/D] * 1] [all_outputs]
|
||||
#set_load [expr [load_of sky130_osu_sc_12T_ms_TT_1P8_25C.ccs/sky130_osu_sc_12T_ms__dff_1/D] * 1] [all_outputs]
|
||||
#set_load [expr [load_of scc9gena_tt_1.2v_25C/scc9gena_dfxbp_1/D] * 1] [all_outputs]
|
||||
set_load [expr [load_of sky130_osu_sc_12T_ms_TT_1P8_25C.ccs/sky130_osu_sc_12T_ms__dff_1/D] * 1] [all_outputs]
|
||||
|
||||
# Set the wire load model
|
||||
set_wire_load_mode "top"
|
||||
@ -109,7 +112,7 @@ set_fix_multiple_port_nets -all -buffer_constants
|
||||
#group_path -name COMBO -from [all_inputs] -to [all_outputs]
|
||||
|
||||
# Save Unmapped Design
|
||||
set filename [format "%s%s%s" "unmapped/" $my_toplevel ".ddc"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/unmapped/" $my_toplevel ".ddc"]
|
||||
write_file -format ddc -hierarchy -o $filename
|
||||
|
||||
# Compile statements
|
||||
@ -130,40 +133,40 @@ set write_cst 1 ;# generate report of constraints
|
||||
set write_hier 1 ;# generate hierarchy report
|
||||
|
||||
# Report Constraint Violators
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_constraint_all_violators.rpt"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_constraint_all_violators.rpt"]
|
||||
redirect $filename {report_constraint -all_violators}
|
||||
|
||||
# Check design
|
||||
redirect reports/check_design.rpt { check_design }
|
||||
redirect $outputDir/reports/check_design.rpt { check_design }
|
||||
|
||||
# Report Final Netlist (Hierarchical)
|
||||
set filename [format "%s%s%s" "mapped/" $my_toplevel ".vh"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/mapped/" $my_toplevel ".vh"]
|
||||
write_file -f verilog -hierarchy -output $filename
|
||||
|
||||
set filename [format "%s%s%s" "mapped/" $my_toplevel ".sdc"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/mapped/" $my_toplevel ".sdc"]
|
||||
write_sdc $filename
|
||||
|
||||
set filename [format "%s%s%s" "mapped/" $my_toplevel ".ddc"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/mapped/" $my_toplevel ".ddc"]
|
||||
write_file -format ddc -hierarchy -o $filename
|
||||
|
||||
set filename [format "%s%s%s" "mapped/" $my_toplevel ".sdf"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/mapped/" $my_toplevel ".sdf"]
|
||||
write_sdf $filename
|
||||
|
||||
# QoR
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_qor.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_qor.rep"]
|
||||
redirect $filename { report_qor }
|
||||
|
||||
# Report Timing
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_reportpath.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_reportpath.rep"]
|
||||
redirect $filename { report_path_group }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_report_clock.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_report_clock.rep"]
|
||||
redirect $filename { report_clock }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_timing.rep"]
|
||||
redirect $filename { report_timing -capacitance -transition_time -nets -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_per_module_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_per_module_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through ifu ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ifu/*} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through ieu ////////////////\n\n\n" }
|
||||
@ -181,7 +184,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through fpu ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {fpu/*} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_mdu_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_mdu_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through entire mdu ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {mdu/*} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through multiply unit ////////////////\n\n\n" }
|
||||
@ -205,7 +208,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through div/DAbsBE ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {mdu/genblk1.div/DAbsBE} -nworst 1 }
|
||||
|
||||
# set filename [format "%s%s%s" "reports/" $my_toplevel "_fpu_timing.rep"]
|
||||
# set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_fpu_timing.rep"]
|
||||
# redirect $filename { echo "\n\n\n//////////////// Critical paths through fma ////////////////\n\n\n" }
|
||||
# redirect -append $filename { report_timing -capacitance -transition_time -nets -through {fpu/fpu.fma/*} -nworst 1 }
|
||||
# redirect -append $filename { echo "\n\n\n//////////////// Critical paths through fpdiv ////////////////\n\n\n" }
|
||||
@ -213,7 +216,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
# redirect -append $filename { echo "\n\n\n//////////////// Critical paths through faddcvt ////////////////\n\n\n" }
|
||||
# redirect -append $filename { report_timing -capacitance -transition_time -nets -through {fpu/fpu.faddcvt/*} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_ifu_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "reports/" $my_toplevel "_ifu_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through PCF ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ifu/PCF} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through PCNextF ////////////////\n\n\n" }
|
||||
@ -223,7 +226,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through InstrD ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ifu/decomp/InstrD} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_stall_flush_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_stall_flush_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through StallD ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ieu/StallD} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through StallE ////////////////\n\n\n" }
|
||||
@ -241,7 +244,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through FlushW ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ieu/FlushW} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_ieu_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_ieu_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through datapath/RD1D ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ieu/dp/RD1D} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through datapath/RD2D ////////////////\n\n\n" }
|
||||
@ -261,7 +264,7 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical path through datapath/ReadDataM ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ieu/dp/ReadDataM} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_fpu_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_fpu_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through fma ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {fpu/fpu.fma/*} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through fpdiv ////////////////\n\n\n" }
|
||||
@ -279,13 +282,13 @@ redirect -append $filename { report_timing -capacitance -transition_time -nets -
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through fma/ProdExpE ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {fpu/fpu.fma/ProdExpE} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_mmu_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_mmu_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through immu/physicaladdress ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {ifu/immu/PhysicalAddress} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through dmmu/physicaladdress ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {lsu/dmmu/PhysicalAddress} -nworst 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_priv_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_priv_timing.rep"]
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through priv/TrapM ////////////////\n\n\n" }
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {priv/TrapM} -nworst 1 }
|
||||
redirect -append $filename { echo "\n\n\n//////////////// Critical paths through priv/CSRReadValM ////////////////\n\n\n" }
|
||||
@ -294,22 +297,22 @@ redirect -append $filename { echo "\n\n\n//////////////// Critical paths through
|
||||
redirect -append $filename { report_timing -capacitance -transition_time -nets -through {priv/CSRReadValW} -nworst 1 }
|
||||
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_min_timing.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_min_timing.rep"]
|
||||
redirect $filename { report_timing -delay min }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_area.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_area.rep"]
|
||||
redirect $filename { report_area -hierarchy -nosplit -physical -designware}
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_cell.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_cell.rep"]
|
||||
redirect $filename { report_cell [get_cells -hier *] }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_power.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_power.rep"]
|
||||
redirect $filename { report_power -hierarchy -levels 1 }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_constraint.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_constraint.rep"]
|
||||
redirect $filename { report_constraint }
|
||||
|
||||
set filename [format "%s%s%s" "reports/" $my_toplevel "_hier.rep"]
|
||||
set filename [format "%s%s%s%s" $outputDir "/reports/" $my_toplevel "_hier.rep"]
|
||||
redirect $filename { report_hierarchy }
|
||||
|
||||
#Quit
|
||||
|
Loading…
Reference in New Issue
Block a user