# Delete CCS models
# receiver_capacitance/output_current_rise/output_current_fall/ccs_retain_rise/ccs_retain_fall
#=======================================================================
enable_api pub
proc delete_ccs {LIB} {
log_info "Delete all CCST tables"
foreach cellid [pub::get_obj_list $LIB type cell] {
set no_def_pins {}
log_info "Working on cell [pub::get_obj_name $cellid]"
foreach pinid [pub::get_obj_list $cellid type pin] {
set pintype [pub::get_obj_attr $pinid direction]
log_info "Working on $pintype pin [pub::get_obj_name $pinid]"
set flag 0
foreach receiver_capacitance_id [pub::get_obj_list $pinid type receiver_capacitance] {
log_info "deleting receiver_capacitance"
pub::del_obj $receiver_capacitance_id
}
}
log_info "checking bus"
foreach busid [pub::get_obj_list $cellid type bus] {
set bustype [pub::get_obj_attr $busid direction]
log_info "Working on $bustype bus [pub::get_obj_name $busid]"
set flag 0
foreach pin_bus_id [pub::get_obj_list $busid type pin] {
set bus_pin_type [pub::get_obj_attr $pin_bus_id direction]
log_info "Working on $bus_pin_type pin of bus [pub::get_obj_name $pin_bus_id]"
foreach receiver_capacitance_id [pub::get_obj_list $pin_bus_id type receiver_capacitance] {
log_info "deleting receiver_capacitance"
pub::del_obj $receiver_capacitance_id
}
foreach timing_block [pub::get_obj_list $pin_bus_id type timing] {
set bus_pin_timing_type [pub::get_obj_attr $timing_block timing_type]
log_info "Working on $bus_pin_timing_type timing_type of bus_pin [pub::get_obj_name $timing_block]"
foreach output_current_rise_id [pub::get_obj_list $timing_block type output_current_rise] {
log_info "deleting CCS rising"
pub::del_obj $output_current_rise_id
}
foreach output_current_fall_id [pub::get_obj_list $timing_block type output_current_fall] {
log_info "deleting CCS falling"
pub::del_obj $output_current_fall_id
}
foreach ccs_retain_rise_id [pub::get_obj_list $timing_block type ccs_retain_rise] {
log_info "deleting CCS retain rising"
pub::del_obj $ccs_retain_rise_id
}
foreach ccs_retain_fall_id [pub::get_obj_list $timing_block type ccs_retain_fall] {
log_info "deleting CCS retain falling"
pub::del_obj $ccs_retain_fall_id
}
}
}
}
}
}
set LIB [pub::read_model -liberty SYHB110_256X8X2CM4_ss0p90vm40c.lib]
delete_ccs $LIB
set tmp [pub::write_model $LIB SYHB110_256X8X2CM4_ss0p90vm40c.lib_withoutCCS]
沒有留言:
張貼留言