release
This commit is contained in:
Executable
+1
@@ -0,0 +1 @@
|
||||
insert_clock_gating
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
# buffer feedthrus and tieoffs so they exist in the netlist
|
||||
set_fix_multiple_port_nets -all -buffer_constants
|
||||
# "multiple port" here means both ends of a net are ports rather than cells
|
||||
|
||||
current_design $::config::DESIGN
|
||||
set_max_area 0.0 ;# dc will optimize area a whole bunch
|
||||
|
||||
# some compilation settings that dont apple with DC_ULTRA enabled
|
||||
set_flatten false
|
||||
set_structure true -timing true -boolean false
|
||||
|
||||
|
||||
# ## CHIP TOP
|
||||
# set_ungroup [get_designs pipeline_top*] true
|
||||
|
||||
# Compile
|
||||
if {$::config::WITH_DC_ULTRA} {
|
||||
if {$::config::DFT} {
|
||||
compile_ultra -scan -no_autoungroup -no_boundary_optimization
|
||||
} else {
|
||||
compile_ultra -no_autoungroup -no_boundary_optimization
|
||||
}
|
||||
optimize_netlist -area
|
||||
} else {
|
||||
if {$::config::DFT} {
|
||||
compile -scan -map_effort high -area_effort high
|
||||
} else {
|
||||
compile -map_effort high -area_effort high
|
||||
}
|
||||
}
|
||||
Executable
+104
@@ -0,0 +1,104 @@
|
||||
# TODO define a lot of the options in this file
|
||||
## probably doesnt matter _that_ much, but could
|
||||
## affect the number of optimization cycles
|
||||
## during sythesis
|
||||
#set_max_transition
|
||||
#set_max_fanout
|
||||
#set_max_capacitance
|
||||
|
||||
# pull clock period in from config file
|
||||
set CLOCK_PERIOD $::config::CLOCK_PERIOD
|
||||
|
||||
### Create real clock if clock port is found
|
||||
##if {[sizeof_collection $::input_clocks] > 0} {
|
||||
## foreach_in_collection clk $::input_clocks {
|
||||
## set clk_name [get_attribute $clk name]
|
||||
## create_clock -name "$clk_name" \
|
||||
## -period "$CLOCK_PERIOD" \
|
||||
## -waveform "[expr $CLOCK_PERIOD/2] $CLOCK_PERIOD" \
|
||||
## $clk_name
|
||||
## # prevent buffering; step_environment.tcl also sets infinite drive on the clock ports
|
||||
## set_dont_touch_network $clk
|
||||
## set_fix_hold $clk
|
||||
##
|
||||
## # input delay
|
||||
## set_input_delay -min 0.05 [all_inputs] -clock $clk_name
|
||||
## set_input_delay -max 0.3 [all_inputs] -clock $clk_name
|
||||
##
|
||||
## # output delay
|
||||
## set_output_delay 0.3 [all_outputs] -clock $clk_name
|
||||
## }
|
||||
##}
|
||||
|
||||
# ================= #
|
||||
# CHIP TOP CLOCKING #
|
||||
# ================= #
|
||||
if {[sizeof_collection [get_ports clk_i]] > 0} {
|
||||
#set clk_name phi
|
||||
create_clock -name "coreClk" \
|
||||
-period "$CLOCK_PERIOD" \
|
||||
-waveform "[expr $CLOCK_PERIOD/2] $CLOCK_PERIOD" \
|
||||
[get_ports clk_i]
|
||||
#set_dont_touch_network find(clock, "phi")
|
||||
set_fix_hold coreClk
|
||||
}
|
||||
# ================= #
|
||||
# ================= #
|
||||
# ================= #
|
||||
|
||||
|
||||
|
||||
# Create virtual clock if clock port is not found
|
||||
# (this probably wont happen)
|
||||
##if {[sizeof_collection $::input_clocks] == 0} {
|
||||
## set clk_name vclk
|
||||
## create_clock -name "vclk" \
|
||||
## -period "$CLOCK_PERIOD" \
|
||||
## -waveform "[expr $CLOCK_PERIOD/2] $CLOCK_PERIOD"
|
||||
## #set_dont_touch_network find(clock, "vclk")
|
||||
## set_fix_hold vclk
|
||||
##}
|
||||
|
||||
# TODO
|
||||
#set_clock_latency
|
||||
#set_propagated_clock
|
||||
#set_clock_uncertainty -setup 0.45 $clk_name
|
||||
#set_clock_transition
|
||||
|
||||
# TODO not sure how delay works when we are
|
||||
# generating the clock signal on chip (with RO)
|
||||
# COOPER: moved into for loop
|
||||
### input delay
|
||||
##set_input_delay -min 0.05 [all_inputs] -clock $clk_name
|
||||
##set_input_delay -max 0.3 [all_inputs] -clock $clk_name
|
||||
##
|
||||
### output delay
|
||||
##set_output_delay 0.3 [all_outputs] -clock $clk_name
|
||||
|
||||
# max delay
|
||||
#set_max_delay [expr 0.3*$CLOCK_PERIOD]
|
||||
|
||||
# min delay
|
||||
#set_min_delay [expr 0.1*$CLOCK_PERIOD]
|
||||
|
||||
# we could optimize for area, but our utilzation is low.
|
||||
# so we dont!
|
||||
# (dont ask me why this is in step_constraints)
|
||||
#compile -area_effort high -auto_ungroup area
|
||||
|
||||
# feedthrough exceptions
|
||||
# we generally synthesize at the toplevel, so dont do this
|
||||
#set_max_delay [expr 2.0 + $DMEM_DOUT_DLY + $DMEM_ADDR_DLY] \
|
||||
# -from [get_ports dmem_dout] \
|
||||
# -to [get_ports dmem_addr] \
|
||||
# -group_path FEEDTHROUGH
|
||||
|
||||
# TODO FALSE PATHS (could be implemented as hooks?)
|
||||
# The following signals are internaly synchronized to
|
||||
# the clk domain and can be set as false path.
|
||||
|
||||
#set_false_path -from dbg_uart_rxd
|
||||
#set_false_path -to dbg_uart_txd
|
||||
|
||||
# TODO dont touch (hooks?)
|
||||
# TODO dont use (hooks?)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
# Initialize PDK locations
|
||||
set ::PDK_PATH "$::config::RESOURCES/cadence_sky130"
|
||||
set ::LIB_PATH "$::PDK_PATH/sky130_scl_9T_0.1.2/sky130_scl_9T/lib"
|
||||
set ::LIB_DBS_PATH "$::config::RESOURCES/synopsys_libs"
|
||||
|
||||
# point synopsys to our pre-compiled timing libraries
|
||||
set ::alib_library_analysis_path $::LIB_DBS_PATH
|
||||
|
||||
# best case library
|
||||
set ::LIB_FF_NAME "sky130_ff_1.98_0"
|
||||
set ::LIB_FF_DB "$::LIB_DBS_PATH/$::LIB_FF_NAME.db"
|
||||
|
||||
# typical case library
|
||||
set ::LIB_TT_NAME "sky130_tt_1.8_25";
|
||||
set ::LIB_TT_DB "$::LIB_DBS_PATH/$::LIB_TT_NAME.db"
|
||||
|
||||
# worst case library
|
||||
set ::LIB_SS_NAME "sky130_ss_1.62_125"
|
||||
set ::LIB_SS_DB "$::LIB_DBS_PATH/$::LIB_SS_NAME.db"
|
||||
|
||||
|
||||
# Operating Conditions (used in step_environment.tcl)
|
||||
set ::LIB_FF_OPCON "ff_1.98_0"
|
||||
set ::LIB_TT_OPCON "tt_1.8_25";
|
||||
set ::LIB_SS_OPCON "ss_1.62_125"
|
||||
|
||||
set ::LIB_WIRE_LOAD "ZeroWireload"
|
||||
set ::NAND2_NAME "NAND2X1"
|
||||
|
||||
#=======#
|
||||
# MACRO #
|
||||
#=======#
|
||||
#==============#
|
||||
# LIBRARY PATH #
|
||||
#==============#
|
||||
# set MACRO_LIB_PATH "$::config::RESOURCES/memory"
|
||||
|
||||
#================#
|
||||
# TIMING LIBRARY #
|
||||
#================#
|
||||
# 1024w, 140b
|
||||
# set sram_1024w_140b_NAME "sram_1024w_140b"
|
||||
# set sram_1024w_140b_LIB_BC_DB "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_ff_1p10v_1p10v_0c_syn.db"
|
||||
# set sram_1024w_140b_LIB_BC_NAME "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_ff_1p10v_1p10v_0c_syn"
|
||||
# set sram_1024w_140b_LIB_WC_DB "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_ss_0p90v_0p90v_125c_syn.db"
|
||||
# set sram_1024w_140b_LIB_WC_NAME "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_ss_0p90v_0p90v_125c_syn"
|
||||
# set sram_1024w_140b_LIB_NC_DB "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_tt_1p00v_1p00v_25c_syn.db" # set sram_1024w_140b_LIB_NC_NAME "${MACRO_LIB_PATH}/${sram_1024w_140b_NAME}/${sram_1024w_140b_NAME}_nldm_tt_1p00v_1p00v_25c_syn"
|
||||
|
||||
# ============ #
|
||||
# OUR STUFF :) #
|
||||
# ============ #
|
||||
#set CF_SRAM_1024x32_tt_180V_25C_NAME "CF_SRAM"
|
||||
set CF_SRAM_1024x32_tt_180V_25C_DB "${::config::DESIGN_ROOT}/inputs/CF_SRAM_1024x32/db/CF_SRAM_1024x32_tt_180V_25C.db"
|
||||
set CF_SRAM_8192x32__min_tt_025C_1v80_DB "${::config::DESIGN_ROOT}/inputs/CF_SRAM_8192x32/CF_SRAM_8192x32__min_tt_025C_1v80.db"
|
||||
|
||||
# TODO ^^^^^ COPY IF USING NEW MACROS
|
||||
|
||||
#======================#
|
||||
# OPERATING CONDITIONS #
|
||||
#======================#
|
||||
|
||||
#===========#
|
||||
# WIRE LOAD #
|
||||
#===========#
|
||||
|
||||
#================#
|
||||
# SYMBOL LIBRARY #
|
||||
#================#
|
||||
|
||||
# Search Path
|
||||
set search_path ""
|
||||
set search_path "${::LIB_PATH}/symbols/synopsys $search_path" ; ## mysterious and confusing
|
||||
set search_path "${::LIB_PATH}/synopsys $search_path" ; ## as above
|
||||
|
||||
set ::target_library $::LIB_TT_DB
|
||||
set ::link_library "$::LIB_TT_DB $::LIB_SS_DB $::LIB_FF_DB"
|
||||
|
||||
# silence clock gating warnings by avoiding these cells
|
||||
# TODO: revist if DFT is enabled
|
||||
set_dont_use [get_lib_cells */SDFF*]
|
||||
|
||||
# confusing syntax.
|
||||
# here, this
|
||||
# is the lib | for max delay (setup timing)
|
||||
# and | this
|
||||
# is the lib | for min delay |
|
||||
# v (hold timing) v
|
||||
set_min_library $::LIB_SS_DB -min_version $::LIB_FF_DB
|
||||
|
||||
## left as example
|
||||
#=======#
|
||||
# MACRO #
|
||||
#=======#
|
||||
# 1024w, 140b
|
||||
# set ::link_library "$link_library $sram_1024w_140b_LIB_NC_DB"
|
||||
|
||||
set ::link_library "$::link_library $CF_SRAM_1024x32_tt_180V_25C_DB"
|
||||
set ::link_library "$::link_library $CF_SRAM_8192x32__min_tt_025C_1v80_DB"
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
# TODO im ignoring this file for now
|
||||
# DFT Signal Type Definitions
|
||||
set_dft_signal -view spec -type ScanEnable -port scan_enable -active_state 1
|
||||
set_dft_signal -view existing_dft -type ScanEnable -port scan_enable -active_state 1
|
||||
set_dft_signal -view spec -type Constant -port scan_mode -active_state 1
|
||||
set_dft_signal -view existing_dft -type Constant -port scan_mode -active_state 1
|
||||
set_dft_signal -view existing_dft -type ScanClock -port dco_clk -timing [list 45 55]
|
||||
set_dft_signal -view existing_dft -type ScanClock -port lfxt_clk -timing [list 45 55]
|
||||
set_dft_signal -view existing_dft -type Reset -port reset_n -active 0
|
||||
|
||||
# DFT Configuration
|
||||
set_dft_insertion_configuration -preserve_design_name true
|
||||
set_scan_configuration -style multiplexed_flip_flop
|
||||
set_scan_configuration -clock_mixing mix_clocks
|
||||
set_scan_configuration -chain_count 3
|
||||
|
||||
# DFT Test Protocol Creation
|
||||
create_test_protocol
|
||||
|
||||
# DFT Design Rule Check
|
||||
redirect -tee -file $::config::RUNDIR/report.dft_drc {dft_drc}
|
||||
redirect -file $::config::RUNDIR/report.dft_drc_verbose {dft_drc -verbose}
|
||||
redirect -file $::config::RUNDIR/report.dft_drc_coverage {dft_drc -coverage_estimate}
|
||||
redirect -file $::config::RUNDIR/report.dft_scan_config {report_scan_configuration}
|
||||
redirect -file $::config::RUNDIR/report.dft_insert_config {report_dft_insertion_configuration}
|
||||
|
||||
# Preview DFT insertion
|
||||
redirect -tee -file $::config::RUNDIR/report.dft_preview {preview_dft}
|
||||
redirect -file $::config::RUNDIR/report.dft_preview_all {preview_dft -show all -test_points all}
|
||||
|
||||
# DFT insertion
|
||||
insert_dft
|
||||
|
||||
# DFT Incremental Compile
|
||||
if {$::config::WITH_DC_ULTRA} {
|
||||
compile_ultra -scan -incremental
|
||||
} else {
|
||||
compile -scan -incremental
|
||||
}
|
||||
|
||||
# DFT Coverage estimate
|
||||
redirect -file $::config::RUNDIR/report.dft_drc_coverage_post_insert {dft_drc -coverage_estimate}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
current_design $::config::DESIGN
|
||||
|
||||
define_name_rules verilog -allowed "a-z0-9_" -type net
|
||||
change_name -rules verilog -hierarchy
|
||||
|
||||
write -hierarchy -format verilog -output "$::config::RUNDIR/$::config::DESIGN.gate.v"
|
||||
write -hierarchy -format ddc -output "$::config::RUNDIR/$::config::DESIGN.ddc"
|
||||
|
||||
if {$::config::DFT} {
|
||||
write_test_protocol -output "$::config::RUNDIR/$::config::DESIGN.spf"
|
||||
}
|
||||
|
||||
write_sdc "$::config::RUNDIR/$::config::DESIGN.sdc"
|
||||
write_sdf "$::config::RUNDIR/$::config::DESIGN.sdf"
|
||||
write_parasitics -output "$::config::RUNDIR/$::config::DESIGN.spef"
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
set_operating_conditions -analysis_type on_chip_variation \
|
||||
-max $::LIB_SS_OPCON -max_library $::LIB_SS_NAME \
|
||||
-min $::LIB_FF_OPCON -min_library $::LIB_FF_NAME
|
||||
|
||||
# default value. calculates all blocks with the top-level WLM
|
||||
# this only matters for synthesis timing analysis
|
||||
set_wire_load_mode top
|
||||
# 'top' treats all nets as though they cross the entire hierarchy.
|
||||
# this results in pessimistic analysis
|
||||
|
||||
# print inputs and outputs for logging/debug
|
||||
puts "Design contains the following inputs:"
|
||||
report_collection [all_inputs]
|
||||
puts "Design contains the following outputs:"
|
||||
report_collection [all_outputs]
|
||||
|
||||
set ::input_clocks [remove_from_collection [get_ports -nocase *clk*] [all_outputs]]
|
||||
|
||||
report_collection $::input_clocks
|
||||
|
||||
# set infinite drive strength on clock signals to prevent
|
||||
# DC from inserting buffers on the clock tree.
|
||||
# step_constraints.tcl sets dont_touch on the clock network for the same reason
|
||||
if {[sizeof_collection $::input_clocks] > 0} {
|
||||
set_drive 0 $::input_clocks
|
||||
}
|
||||
|
||||
set_driving_cell -lib_cell BUFX2 [remove_from_collection [all_inputs] $::input_clocks]
|
||||
|
||||
#set_load 0.5 [all_outputs] ; ## magic number (highly pessimistic?)
|
||||
set_load 0.033442 [all_outputs] ;# 33.442 fF from sdc. might be wrong.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# ===== SUPPRESS MESSAGES ===== #
|
||||
# Warnings
|
||||
suppress_message UID-401
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
# Synopsys Verification Format (SVF) file. Logs RTL optimizations
|
||||
set_svf $::config::RUNDIR/$::config::DESIGN.svf
|
||||
|
||||
# set working directory. used to store intermediate (GTECH)
|
||||
# representations of the RTL during elaboration
|
||||
define_design_lib WORK -path $::config::RUNDIR/WORK
|
||||
|
||||
# dynamically generate RTL dependencies, then ingest outputs
|
||||
try {
|
||||
set result [exec python3.12 $::config::SYNTH_SCRIPTS/get_rtl.py $::config::DESIGN {*}$::config::RTL_SEARCH_PATHS]
|
||||
} on error {} {
|
||||
set result [exec python3 $::config::SYNTH_SCRIPTS/get_rtl.py $::config::DESIGN {*}$::config::RTL_SEARCH_PATHS]
|
||||
}
|
||||
set RTL_SOURCE_FILES [split [string trim [read [open $::config::SYNTH_SCRIPTS/lists/file_list.f r]]] "\n"]
|
||||
set RTL_SOURCE_FILES [lsearch -all -inline -not -glob $RTL_SOURCE_FILES "*CF_SRAM*"]
|
||||
set RTL_SOURCE_FILES [lsearch -all -inline -not -glob $RTL_SOURCE_FILES "*clockComplex*"]
|
||||
## CHIP TOP
|
||||
set_app_var search_path [concat [get_app_var search_path] \
|
||||
search_path [split [string trim [read [open $::config::SYNTH_SCRIPTS/lists/header_directory_list.f r]]] "\n"]]
|
||||
set HEADER_SOURCE_FILES [split [string trim [read [open $::config::SYNTH_SCRIPTS/lists/header_list.f r]]] "\n"]
|
||||
|
||||
if { $HEADER_SOURCE_FILES ne "" } {
|
||||
analyze -format sverilog $HEADER_SOURCE_FILES ;# can result in double ingestion. (due to search_path) fix later
|
||||
}
|
||||
|
||||
|
||||
# pre-compilation linting
|
||||
analyze -format sverilog $RTL_SOURCE_FILES
|
||||
|
||||
# elaborate converts netlist to GTECH primitives
|
||||
# not "compilation" yet because it still uses
|
||||
# GTECH cells, not our PDK's cells
|
||||
elaborate $::config::DESIGN
|
||||
|
||||
# check design structure after reading verilog
|
||||
current_design $::config::DESIGN ;# just prints design name
|
||||
# run check_design to catch bad RTL and tee it to a logfile
|
||||
redirect $::config::RUNDIR/report.check {check_design}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
redirect -file $::config::RPT_DIR/report.timing {check_timing}
|
||||
redirect -file $::config::RPT_DIR/report.constraints {report_constraints -all_violators -verbose}
|
||||
redirect -file $::config::RPT_DIR/report.paths.max {report_timing -path end -delay max -max_paths 200 -nworst 2}
|
||||
redirect -file $::config::RPT_DIR/report.full_paths.max {report_timing -path full -delay max -max_paths 5 -nworst 2}
|
||||
redirect -file $::config::RPT_DIR/report.paths.min {report_timing -path end -delay min -max_paths 200 -nworst 2}
|
||||
redirect -file $::config::RPT_DIR/report.full_paths.min {report_timing -path full -delay min -max_paths 5 -nworst 2}
|
||||
redirect -file $::config::RPT_DIR/report.refs {report_reference}
|
||||
redirect -file $::config::RPT_DIR/report.area {report_area}
|
||||
redirect -file $::config::RPT_DIR/report.power {report_power}
|
||||
|
||||
# add NAND2 size equivalent report to the area report file
|
||||
# i dont honestly know why this is here
|
||||
if {[info exists NAND2_NAME]} {
|
||||
set nand2_area [get_attribute [get_lib_cell $LIB_TT_NAME/$NAND2_NAME] area]
|
||||
redirect -variable area {report_area}
|
||||
regexp {Total cell area:\s+([^\n]+)\n} $area whole_match area
|
||||
set nand2_eq [expr $area/$nand2_area]
|
||||
set fp [open "$::config::RPT_DIR/report.area" a]
|
||||
puts $fp ""
|
||||
puts $fp "NAND2 equivalent cell area: $nand2_eq"
|
||||
close $fp
|
||||
puts ""
|
||||
puts " ======================================================== "
|
||||
puts " | AREA SUMMARY |"
|
||||
puts " |--------------------------------------------------------|"
|
||||
puts " | |"
|
||||
puts " | $NAND2_NAME cell gate area: [format {%10.4f} $nand2_area] |"
|
||||
puts " | |"
|
||||
puts " | Total Area : [format {%10.4f} $area ] |"
|
||||
puts " | NAND2 equivalent cell area: [format {%10.4f} $nand2_eq ] |"
|
||||
puts " | |"
|
||||
puts " ======================================================== "
|
||||
puts ""
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# i dont know why we keep spamming this
|
||||
current_design $::config::DESIGN
|
||||
|
||||
define_name_rules verilog -allowed "a-z0-9_" -type net
|
||||
change_name -rules verilog -hierarchy
|
||||
|
||||
write -hierarchy -format verilog -output "$::config::RUNDIR/$::config::DESIGN.gate.v"
|
||||
write -hierarchy -format ddc -output "$::config::RUNDIR/$::config::DESIGN.ddc"
|
||||
|
||||
if {$::config::DFT} {
|
||||
write_test_protocol -output "$::config::RUNDIR/$::config::DESIGN.spf"
|
||||
}
|
||||
|
||||
write_sdc "$::config::RUNDIR/$::config::DESIGN.sdc"
|
||||
write_sdf "$::config::RUNDIR/$::config::DESIGN.sdf"
|
||||
write_parasitics -output "$::config::RUNDIR/$::config::DESIGN.spef"
|
||||
Reference in New Issue
Block a user