2021-11-22 15:10:25 -06:00
|
|
|
# SPDX-FileCopyrightText: 2020 Efabless Corporation
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# User config
|
|
|
|
set script_dir [file dirname [file normalize [info script]]]
|
|
|
|
|
|
|
|
set ::env(DESIGN_NAME) caravan
|
|
|
|
|
|
|
|
set ::env(STD_CELL_LIBRARY_OPT) "sky130_fd_sc_hd"
|
|
|
|
|
2022-10-21 09:37:41 -05:00
|
|
|
set verilog_root $::env(CARAVEL_ROOT)/verilog/
|
|
|
|
set lef_root $::env(CARAVEL_ROOT)/lef/
|
|
|
|
set gds_root $::env(CARAVEL_ROOT)/gds/
|
2021-11-22 15:10:25 -06:00
|
|
|
|
2022-04-14 17:05:16 -05:00
|
|
|
set mgmt_area_verilog_root $::env(MCW_ROOT)/verilog/
|
|
|
|
set mgmt_area_lef_root $::env(MCW_ROOT)/lef/
|
|
|
|
set mgmt_area_gds_root $::env(MCW_ROOT)/gds/
|
2021-11-22 15:10:25 -06:00
|
|
|
|
|
|
|
# Change if needed
|
|
|
|
set ::env(VERILOG_FILES) "\
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/user_defines.v
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/caravan.v"
|
|
|
|
|
|
|
|
set ::env(SYNTH_READ_BLACKBOX_LIB) 1
|
|
|
|
|
2022-10-21 09:37:41 -05:00
|
|
|
|
|
|
|
# defines and pads need to be first
|
|
|
|
# order matters
|
2021-11-22 15:10:25 -06:00
|
|
|
set ::env(VERILOG_FILES_BLACKBOX) "\
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/defines.v
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/pads.v \
|
2022-10-21 09:37:41 -05:00
|
|
|
$mgmt_area_verilog_root/rtl/mgmt_core_wrapper.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/__user_analog_project_wrapper.v \
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/buff_flash_clkrst.v \
|
|
|
|
$verilog_root/rtl/caravan_power_routing.v \
|
|
|
|
$verilog_root/rtl/caravel_clocking.v \
|
|
|
|
$verilog_root/rtl/caravan_signal_routing.v \
|
|
|
|
$verilog_root/rtl/chip_io_alt.v \
|
|
|
|
$verilog_root/rtl/digital_pll.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/gpio_control_block.v \
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/gpio_defaults_block.v \
|
|
|
|
$verilog_root/rtl/gpio_signal_buffering_alt.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/housekeeping.v \
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/mgmt_protect.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/simple_por.v\
|
2022-04-14 17:05:16 -05:00
|
|
|
$verilog_root/rtl/spare_logic_block.v\
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/user_id_programming.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
$verilog_root/rtl/xres_buf.v \
|
2022-10-21 09:37:41 -05:00
|
|
|
$verilog_root/rtl/caravan_logo.v \
|
|
|
|
$verilog_root/rtl/caravan_motto.v \
|
|
|
|
$verilog_root/rtl/copyright_block_a.v \
|
|
|
|
$verilog_root/rtl/open_source.v \
|
|
|
|
$verilog_root/rtl/user_id_textblock.v \
|
2021-11-22 15:10:25 -06:00
|
|
|
"
|
|
|
|
|
|
|
|
set ::env(EXTRA_LEFS) "\
|
2022-10-21 09:37:41 -05:00
|
|
|
$lef_root/caravan_signal_routing.lef \
|
|
|
|
$lef_root/caravan_logo-stub.lef \
|
|
|
|
$lef_root/caravan_motto-stub.lef \
|
|
|
|
$lef_root/copyright_block_a-stub.lef \
|
|
|
|
$lef_root/open_source-stub.lef \
|
|
|
|
$lef_root/user_id_textblock-stub.lef \
|
|
|
|
$lef_root/buff_flash_clkrst.lef\
|
|
|
|
$lef_root/caravan_power_routing.lef\
|
|
|
|
$lef_root/caravel_clocking.lef \
|
2021-11-22 15:10:25 -06:00
|
|
|
$lef_root/chip_io_alt.lef \
|
2022-10-21 09:37:41 -05:00
|
|
|
$lef_root/digital_pll.lef \
|
2021-11-22 15:10:25 -06:00
|
|
|
$lef_root/gpio_control_block.lef \
|
|
|
|
$lef_root/gpio_defaults_block.lef \
|
2022-10-21 09:37:41 -05:00
|
|
|
$lef_root/gpio_signal_buffering_alt.lef\
|
2021-11-22 15:10:25 -06:00
|
|
|
$lef_root/housekeeping.lef \
|
2022-10-21 09:37:41 -05:00
|
|
|
$lef_root/mgmt_protect.lef \
|
2021-11-22 15:10:25 -06:00
|
|
|
$lef_root/simple_por.lef\
|
2022-04-14 17:05:16 -05:00
|
|
|
$lef_root/spare_logic_block.lef\
|
2022-10-21 09:37:41 -05:00
|
|
|
$lef_root/user_analog_project_wrapper.lef \
|
|
|
|
$lef_root/user_id_programming.lef \
|
|
|
|
$lef_root/xres_buf.lef\
|
2021-11-22 15:10:25 -06:00
|
|
|
$mgmt_area_lef_root/mgmt_core_wrapper.lef \
|
|
|
|
"
|
|
|
|
|
|
|
|
set ::env(EXTRA_GDS_FILES) "\
|
2022-10-21 09:37:41 -05:00
|
|
|
$gds_root/caravan_signal_routing.gds \
|
|
|
|
$gds_root/caravan_logo.gds \
|
|
|
|
$gds_root/caravan_motto.gds \
|
|
|
|
$gds_root/copyright_block_a.gds \
|
|
|
|
$gds_root/open_source.gds \
|
|
|
|
$gds_root/user_id_textblock.gds \
|
|
|
|
$gds_root/caravel_clocking.gds \
|
2021-11-22 15:10:25 -06:00
|
|
|
$gds_root/chip_io_alt.gds \
|
2022-10-21 09:37:41 -05:00
|
|
|
$gds_root/digital_pll.gds \
|
2021-11-22 15:10:25 -06:00
|
|
|
$gds_root/gpio_control_block.gds \
|
|
|
|
$gds_root/gpio_defaults_block.gds \
|
|
|
|
$gds_root/housekeeping.gds \
|
2022-10-21 09:37:41 -05:00
|
|
|
$gds_root/mgmt_protect.gds \
|
2021-11-22 15:10:25 -06:00
|
|
|
$gds_root/simple_por.gds\
|
2022-10-21 09:37:41 -05:00
|
|
|
$gds_root/user_analog_project_wrapper.gds \
|
|
|
|
$gds_root/user_id_programming.gds \
|
2021-11-22 15:10:25 -06:00
|
|
|
$gds_root/xres_buf.gds\
|
|
|
|
$mgmt_area_gds_root/mgmt_core_wrapper.gds \
|
2022-10-21 09:37:41 -05:00
|
|
|
$gds_root/buff_flash_clkrst.gds \
|
|
|
|
$gds_root/gpio_signal_buffering_alt.gds \
|
2021-11-22 15:10:25 -06:00
|
|
|
"
|
|
|
|
|
|
|
|
# # !!!
|
|
|
|
# if { [info exists ::env(LVS_RUN_DIR)] || [info exists ::env(CONNECTIVITY_RUN)] } {
|
|
|
|
# # if running to get a full floorplan, need the original pads due to
|
|
|
|
# # missing pins in the abstracted version
|
|
|
|
# set ::env(GPIO_PADS_LEF) [glob "$::env(PDK_ROOT)/$::env(PDK)/libs.ref/lef/s8iom0s8/*.lef"]
|
|
|
|
# }
|
|
|
|
|
|
|
|
set ::env(SYNTH_TOP_LEVEL) 1
|
|
|
|
set ::env(SYNTH_FLAT_TOP) 1
|
|
|
|
set ::env(LEC_ENABLE) 0
|
|
|
|
|
|
|
|
set ::env(FP_SIZING) absolute
|
|
|
|
|
|
|
|
set fd [open "$script_dir/../chip_dimensions.txt" "r"]
|
|
|
|
set ::env(DIE_AREA) [read $fd]
|
|
|
|
close $fd
|
|
|
|
|
|
|
|
|
|
|
|
set ::env(CELL_PAD) 0
|
|
|
|
|
|
|
|
set ::env(PL_RESIZER_DESIGN_OPTIMIZATIONS) 0
|
|
|
|
set ::env(PL_RESIZER_TIMING_OPTIMIZATIONS) 0
|
|
|
|
|
|
|
|
set ::env(DIODE_INSERTION_STRATEGY) 0
|
|
|
|
|
|
|
|
set ::env(GLB_RT_ALLOW_CONGESTION) 1
|
|
|
|
set ::env(GLB_RT_OVERFLOW_ITERS) 50
|
|
|
|
set ::env(GLB_RT_TILES) 30
|
|
|
|
set ::env(GLB_RT_MINLAYER) 2
|
|
|
|
set ::env(GLB_RT_MAXLAYER) 6
|
|
|
|
|
|
|
|
set ::env(GLB_RT_ADJUSTMENT) "0"
|
|
|
|
set ::env(GLB_RT_L1_ADJUSTMENT) "0.99"
|
2022-10-21 09:37:41 -05:00
|
|
|
set ::env(GLB_RT_L2_ADJUSTMENT) "0.15"
|
|
|
|
set ::env(GLB_RT_L3_ADJUSTMENT) "0.45"
|
|
|
|
set ::env(GLB_RT_L4_ADJUSTMENT) "0.45"
|
|
|
|
set ::env(GLB_RT_L5_ADJUSTMENT) "0.45"
|
2021-11-22 15:10:25 -06:00
|
|
|
set ::env(GLB_RT_L6_ADJUSTMENT) "0"
|
|
|
|
|
2022-10-21 09:37:41 -05:00
|
|
|
set ::env(TECH_LEF) $::env(DESIGN_DIR)/sky130_fd_sc_hd.tlef
|
|
|
|
|
2021-11-22 15:10:25 -06:00
|
|
|
# set ::env(ROUTING_OPT_ITERS) 7
|
|
|
|
# set ::env(GLB_RT_UNIDIRECTIONAL) 0
|
|
|
|
|
|
|
|
set ::env(FILL_INSERTION) 0
|
|
|
|
|
|
|
|
# DON'T PUT CELLS ON THE TOP LEVEL
|
|
|
|
set ::env(LVS_INSERT_POWER_PINS) 0
|
|
|
|
|
|
|
|
set ::env(MAGIC_GENERATE_LEF) 0
|
|
|
|
|
2022-04-14 17:05:16 -05:00
|
|
|
set ::env(QUIT_ON_ILLEGAL_OVERLAPS) 0
|
|
|
|
set ::env(QUIT_ON_TR_DRC) 0
|
|
|
|
set ::env(QUIT_ON_LVS_ERROR) 0
|