2022-09-29 05:54:28 -05:00
### Housekeeping SDC Update
### Mod Rev 2
2022-10-11 18:41:50 -05:00
### Date: 7/10/2022
2022-09-29 05:54:28 -05:00
2022-10-05 14:35:03 -05:00
set ::env(WB_CLK_PERIOD) 25
2021-11-18 17:30:14 -06:00
set ::env(SCK_CLK_PERIOD) 100
2021-11-25 04:54:22 -06:00
set ::env(RESET_PORT) "wb_rstn_i"
2022-09-29 05:54:28 -05:00
set ::env(STD_CELL_LIBRARY) "sky130_fd_sc_hd"
2021-11-15 05:23:54 -06:00
2021-11-25 04:54:22 -06:00
## MASTER CLOCKS
2021-11-18 17:30:14 -06:00
create_clock [get_ports {"wb_clk_i"} ] -name "wb_clk_i" -period $::env(WB_CLK_PERIOD)
2021-12-02 13:07:45 -06:00
create_clock [get_ports {"user_clock"} ] -name "user_clock" -period $::env(WB_CLK_PERIOD)
2022-09-29 05:54:28 -05:00
create_clock [get_ports {"mgmt_gpio_in[4]"} ] -name "sck" -period $::env(SCK_CLK_PERIOD)
2022-10-07 18:59:01 -05:00
##
set_propagated_clock [get_clocks {wb_clk_i}]
set_propagated_clock [get_clocks {user_clock}]
set_propagated_clock [get_clocks {"mgmt_gpio_in[4]"}]
2021-11-18 17:30:14 -06:00
2021-11-25 04:54:22 -06:00
## GENERATED CLOCKS
# NOTE: change the clock pins whenever the synthesis receipe changes
2022-09-29 05:54:28 -05:00
set wbbd_sck_pin [get_pins -of_objects wbbd_sck -filter lib_pin_name==Q]
2021-12-02 13:07:45 -06:00
2022-09-29 05:54:28 -05:00
create_generated_clock -name "wbbd_sck" -source [get_ports {"wb_clk_i"} ] -divide_by 2 $wbbd_sck_pin
2021-12-02 13:07:45 -06:00
2022-09-29 05:54:28 -05:00
# paths between wb_clk_i and sck shouldn't be timed
set_clock_groups -logically_exclusive -group wb_clk_i -group sck
2021-11-25 04:54:22 -06:00
2022-09-29 05:54:28 -05:00
set_propagated_clock [all_clocks]
2021-12-02 13:07:45 -06:00
2021-11-25 04:54:22 -06:00
## FALSE PATHS
set_false_path -from [get_ports $::env(RESET_PORT)]
set_false_path -from [get_ports "porb"]
## INPUT/OUTPUT DELAYS
2022-09-29 05:54:28 -05:00
set input_delay_value 10
2022-10-05 14:35:03 -05:00
# output delay is 23 which is 2ns less than the clock period, this helps in fixing transition violations due to the high capacitances at the outputs ports
2022-10-07 18:59:01 -05:00
set output_delay_value 10
2021-11-15 05:23:54 -06:00
puts "\[INFO\]: Setting output delay to: $output_delay_value"
puts "\[INFO\]: Setting input delay to: $input_delay_value"
2022-10-05 14:35:03 -05:00
## INPUT DELAYS
set_input_delay $input_delay_value -clock [get_clocks wb_clk_i] [all_inputs]
set_input_delay 0 -clock [get_clocks wb_clk_i] [get_port "mgmt_gpio_in[4]"]
2022-10-07 18:59:01 -05:00
# set_input_delay 0 -clock [get_clocks wb_clk_i] [get_port "wb_clk_i"]
2022-10-05 14:35:03 -05:00
set_input_delay 0 -clock [get_clocks wb_clk_i] [get_port "user_clock"]
2021-12-02 13:07:45 -06:00
## OUTPUT DELAYS
# WISHBONE DELAY
2022-10-07 18:59:01 -05:00
set wb_output_delay 10
2022-09-29 05:54:28 -05:00
set_output_delay $wb_output_delay -clock [get_clocks wb_clk_i] [get_ports wb_ack_o]
set_output_delay $wb_output_delay -clock [get_clocks wb_clk_i] [get_ports wb_dat_o[*]]
2021-12-02 13:07:45 -06:00
# PLL DELAYS
2022-09-29 05:54:28 -05:00
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_ena]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_dco_ena]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_div[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_sel[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll90_sel[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_trim[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pll_bypass]
2021-12-02 13:07:45 -06:00
# SOC DELAYS
2022-09-29 05:54:28 -05:00
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports ser_rx]
2021-12-02 13:07:45 -06:00
# SPI DELAYS
2022-09-29 05:54:28 -05:00
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports spi_sdi]
2021-12-02 13:07:45 -06:00
# IRQ
2022-09-29 05:54:28 -05:00
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports irq[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports reset]
2021-12-02 13:07:45 -06:00
# GPIO
# Specify serial_clock as a generated clock signal
2022-09-29 05:54:28 -05:00
#set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports serial_clock]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports serial_load]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports serial_resetn]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports serial_data_1]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports serial_data_2]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports mgmt_gpio_out[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports mgmt_gpio_oeb[*]]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pwr_ctrl_out[*]]
2021-12-02 13:07:45 -06:00
# FLASH
2022-09-29 05:54:28 -05:00
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports spimemio_flash_io0_di]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports spimemio_flash_io1_di]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports spimemio_flash_io2_di]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports spimemio_flash_io3_di]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports debug_in]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_csb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_csb_oeb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_clk]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_clk_oeb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io0_oeb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io1_oeb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io0_ieb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io1_ieb]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io0_do]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io1_do]
set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports pad_flash_io0_ieb]
2021-12-02 13:07:45 -06:00
# SRAM
2022-10-07 18:59:01 -05:00
# set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports sram_ro_clk]
# set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports sram_ro_csb]
# set_output_delay $output_delay_value -clock [get_clocks wb_clk_i] [get_ports sram_ro_addr[*]]
2021-11-15 05:23:54 -06:00
2022-09-29 05:54:28 -05:00
## OUTPUT LOADS
set PT_cap_load 0.21
puts "\[INFO\]: Setting load to: $PT_cap_load"
set_load $PT_cap_load [all_outputs]
2021-11-15 05:23:54 -06:00
2021-11-25 04:54:22 -06:00
## TIMING DERATE
2022-09-29 05:54:28 -05:00
set ::env(SYNTH_TIMING_DERATE) 0.05
puts "\[INFO\]: Setting timing derate to: [expr {$::env(SYNTH_TIMING_DERATE) * 100}] %"
2021-11-15 05:23:54 -06:00
set_timing_derate -early [expr {1-$::env(SYNTH_TIMING_DERATE)}]
set_timing_derate -late [expr {1+$::env(SYNTH_TIMING_DERATE)}]
2021-11-25 04:54:22 -06:00
## CLOCK UNCERTAINITY
2022-10-05 14:35:03 -05:00
set wb_clk_uncer 0.3
set sck_clk_uncer 0.3
2022-09-29 05:54:28 -05:00
puts "\[INFO\]: Setting WB clock uncertainity to: $wb_clk_uncer"
puts "\[INFO\]: Setting SCK clock uncertainity to: $sck_clk_uncer"
set_clock_uncertainty $wb_clk_uncer [get_clocks {wb_clk_i}]
set_clock_uncertainty $wb_clk_uncer [get_clocks {user_clock}]
set_clock_uncertainty $sck_clk_uncer [get_clocks {sck}]
2021-11-15 05:23:54 -06:00
2021-11-25 04:54:22 -06:00
## CLOCK TRANSITION
2022-10-11 18:41:50 -05:00
set wb_clk_tran 0.15
set sck_clk_tran 0.15
2022-09-29 05:54:28 -05:00
puts "\[INFO\]: Setting clock transition to: $wb_clk_tran"
puts "\[INFO\]: Setting clock transition to: $sck_clk_tran"
set_clock_transition $wb_clk_tran [get_clocks {wb_clk_i}]
set_clock_transition $wb_clk_tran [get_clocks {user_clock}]
set_clock_transition $sck_clk_tran [get_clocks {sck}]
2021-11-25 04:54:22 -06:00
## FANOUT
2022-10-07 18:59:01 -05:00
set ::env(SYNTH_MAX_FANOUT) 20
2022-09-29 05:54:28 -05:00
puts "\[INFO\]: Setting maximum fanout to: $::env(SYNTH_MAX_FANOUT)"
2022-09-29 07:30:03 -05:00
set_max_fanout $::env(SYNTH_MAX_FANOUT) [current_design]
2022-10-05 14:35:03 -05:00
## MAX Transition
2022-10-11 18:41:50 -05:00
set_max_trans 0.75 [current_design]