2022-09-27 09:09:26 -05: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
package require openlane
proc custom_run_placement { args } {
global SCRIPT_DIR
global_placement_or
set : : env( PL_RESIZER_BUFFER_INPUT_PORTS ) 0
set : : env( PL_RESIZER_BUFFER_OUTPUT_PORTS ) 0
set log [ index_file $::env ( placement_logs ) / resizer-1.log]
set : : env( SAVE_DEF ) [ index_file $::env ( placement_tmpfiles ) / resizer-1.def]
set : : env( SAVE_SDC ) [ index_file $::env ( placement_tmpfiles ) / resizer-1.sdc]
run_openroad_script $::env ( SCRIPTS_DIR ) / openroad/ resizer.tcl - indexed_log $log
set_def $::env ( SAVE_DEF )
set : : env( CURRENT_SDC ) $::env ( SAVE_SDC )
set dont_use_buffers " s k y 1 3 0 _ f d _ s c _ h d _ _ p r o b e * s k y 1 3 0 _ f d _ s c _ h d _ _ b u f b u f * s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 1 s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 2 s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 4 s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 6 s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 8 s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 1 2 s k y 1 3 0 _ f d _ s c _ h d _ _ c l k b u f * "
set dont_use_old " "
if { [ info exists : : env( DONT_USE_CELLS ) ] } {
set : : env( DONT_USE_CELLS ) " $ : : e n v ( D O N T _ U S E _ C E L L S ) $ d o n t _ u s e _ b u f f e r s "
} else {
set : : env( DONT_USE_CELLS ) " $ d o n t _ u s e _ b u f f e r s "
set dont_use_old : : env( DONT_USE_CELLS )
}
set dont_touch_old " $ : : e n v ( R S Z _ D O N T _ T O U C H ) "
set : : env( RSZ_DONT_TOUCH ) " $ : : e n v ( R S Z _ D O N T _ T O U C H ) m g m t _ g p i o _ o u t m g m t _ g p i o _ o e b p a d _ g p i o _ i n u s e r _ g p i o _ o e b u s e r _ g p i o _ o u t "
set log [ index_file $::env ( placement_logs ) / resizer-2.log]
set : : env( SAVE_DEF ) [ index_file $::env ( placement_tmpfiles ) / resizer-2.def]
set : : env( SAVE_SDC ) [ index_file $::env ( placement_tmpfiles ) / resizer-2.sdc]
run_openroad_script $SCRIPT_DIR / buffer.tcl - indexed_log $log
set_def $::env ( SAVE_DEF )
set : : env( CURRENT_SDC ) $::env ( SAVE_SDC )
write_verilog $::env ( placement_results ) / $::env ( DESIGN_NAME ) .resized.v - log $::env ( placement_logs ) / write_verilog.log
set : : env( RSZ_DONT_TOUCH ) " $ d o n t _ t o u c h _ o l d "
set : : env( DONT_USE_CELLS ) $dont_use_old
exit 1
detailed_placement_or - def $::env ( placement_results ) / $::env ( DESIGN_NAME ) .def - log $::env ( placement_logs ) / detailed.log
}
variable SCRIPT_DIR [ file dirname [ file normalize [ info script] ] ]
2022-10-10 07:42:29 -05:00
prep - ignore_mismatches - design $SCRIPT_DIR - tag $::env ( OPENLANE_RUN_TAG ) - overwrite - verbose 0
2022-09-27 09:09:26 -05:00
exec rm - rf $SCRIPT_DIR / runs/ gpio_control_block_interactive
2022-10-10 07:42:29 -05:00
exec ln - sf $SCRIPT_DIR / runs/ $::env ( OPENLANE_RUN_TAG ) $SCRIPT_DIR / runs/ gpio_control_block_interactive
2022-09-27 09:09:26 -05:00
run_synthesis
init_floorplan
place_io
apply_def_template
file copy - force $::env ( MACRO_PLACEMENT_CFG ) $::env ( placement_tmpfiles ) / macro_placement.cfg
manual_macro_placement - f
tap_decap_or
add_route_obs
run_power_grid_generation
2022-10-05 09:00:34 -05:00
set dont_use_old $::env ( DONT_USE_CELLS )
2022-09-27 09:09:26 -05:00
global_placement_or
set : : env( DONT_USE_CELLS ) " $ : : e n v ( D O N T _ U S E _ C E L L S ) s k y 1 3 0 _ f d _ s c _ h d _ _ b u f _ 1 "
run_resizer_design
set : : env( DONT_USE_CELLS ) " $ d o n t _ u s e _ o l d "
set : : env( SAVE_DEF ) [ index_file $::env ( placement_tmpfiles ) / buffer_insert.def]
run_openroad_script $SCRIPT_DIR / buffer.tcl - indexed_log [ index_file $::env ( placement_logs ) / buffer_insert.log]
set_def $::env ( SAVE_DEF )
write_verilog [ index_file $::env ( placement_tmpfiles ) / buffer_insert.v] - log $::env ( placement_logs ) / write_verilog_buffer.log
set : : env( UNBUFFER_NETS ) " s e r i a l _ c l o c k _ o u t _ b u f f e r e d | s e r i a l _ l o a d _ o u t _ b u f f e r e d "
write_verilog [ index_file $::env ( placement_tmpfiles ) / buffer_remove.v] - log $::env ( placement_logs ) / write_verilog_buffer_remove.log
detailed_placement_or - def $::env ( CURRENT_DEF ) - log $::env ( placement_logs ) / detailed.log
run_cts
remove_buffers_from_nets
run_resizer_timing_routing
ins_diode_cells_4
ins_fill_cells
global_routing
set global_routed_netlist [ index_file $::env ( routing_tmpfiles ) / global.v]
write_verilog $global_routed_netlist - log $::env ( routing_logs ) / write_verilog_global.log
# detailed routing
detailed_routing
set detailed_routed_netlist [ index_file $::env ( routing_tmpfiles ) / detailed.v]
write_verilog $detailed_routed_netlist - log $::env ( routing_logs ) / write_verilog_detailed.log
# for lvs
set_netlist $detailed_routed_netlist
run_parasitics_sta
run_irdrop_report
run_magic
run_magic_spice_export ;
run_lvs ; # requires run_magic_spice_export
run_magic_drc
run_antenna_check
run_lef_cvc
calc_total_runtime
save_final_views
2022-10-10 07:42:29 -05:00
save_final_views - save_path .. - tag $::env ( RUN_OPENLANE_RUN_TAG )
2022-09-27 09:09:26 -05:00
save_state
generate_final_summary_report
check_timing_violations