<commit_before># Copyright 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.

foreach lib $::env(LIB_RESIZER_OPT) {
    read_liberty $lib
}
if {[catch {read_lef $::env(MERGED_LEF_UNPADDED)} errmsg]} {
    puts stderr $errmsg
    exit 1
}

if {[catch {read_def $::env(CURRENT_DEF)} errmsg]} {
    puts stderr $errmsg
    exit 1
}
read_sdc -echo $::env(BASE_SDC_FILE)
# Resize
# estimate wire rc parasitics
set_wire_rc -signal -layer $::env(WIRE_RC_LAYER)
set_wire_rc -clock  -layer $::env(WIRE_RC_LAYER)

if { [info exists ::env(DONT_USE_CELLS)] } {
    set_dont_use $::env(DONT_USE_CELLS)
}

# CTS and detailed placement move instances, so update parastic estimates.
global_route
estimate_parasitics -global_routing
set_propagated_clock [all_clocks]
repair_timing

# set_placement_padding -global -right $::env(CELL_PAD)

# set_placement_padding -masters $::env(CELL_PAD_EXCLUDE) -right 0 -left 0

detailed_placement

if { [info exists ::env(GLB_OPTIMIZE_MIRRORING)] && $::env(GLB_OPTIMIZE_MIRRORING) } {
    optimize_mirroring
}

check_placement -verbose

write_def $::env(SAVE_DEF)
<commit_msg>Read CTS Generated SDC File When Appropriate (#606)<commit_after># Copyright 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.

foreach lib $::env(LIB_RESIZER_OPT) {
    read_liberty $lib
}

if {[catch {read_lef $::env(MERGED_LEF_UNPADDED)} errmsg]} {
    puts stderr $errmsg
    exit 1
}

if {[catch {read_def $::env(CURRENT_DEF)} errmsg]} {
    puts stderr $errmsg
    exit 1
}

if { $::env(CLOCK_TREE_SYNTH) } {
    read_sdc -echo $::env(cts_result_file_tag)_1.sdc
} else {
    puts "INFO: CTS was skipped, reading base sdc file."
    read_sdc -echo $::env(BASE_SDC_FILE)
}

# Resize
# estimate wire rc parasitics
set_wire_rc -signal -layer $::env(WIRE_RC_LAYER)
set_wire_rc -clock  -layer $::env(WIRE_RC_LAYER)

if { [info exists ::env(DONT_USE_CELLS)] } {
    set_dont_use $::env(DONT_USE_CELLS)
}

# CTS and detailed placement move instances, so update parasitic estimates.
global_route
estimate_parasitics -global_routing
#set_propagated_clock [all_clocks]
repair_timing

# set_placement_padding -global -right $::env(CELL_PAD)
# set_placement_padding -masters $::env(CELL_PAD_EXCLUDE) -right 0 -left 0

detailed_placement

if { [info exists ::env(GLB_OPTIMIZE_MIRRORING)] && $::env(GLB_OPTIMIZE_MIRRORING) } {
    optimize_mirroring
}

check_placement -verbose

write_def $::env(SAVE_DEF)

{'fraction_non_alphanumeric': 0.10031986042454202, 'fraction_numerical': 0.008141901715615005, 'mean_word_length': 4.890410958904109, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4618417', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1200, 'n_words': 358}