diff --git a/liberty/test/liberty_ecsm.lib b/liberty/test/liberty_ecsm.lib new file mode 100644 index 00000000..fdbd2f7d --- /dev/null +++ b/liberty/test/liberty_ecsm.lib @@ -0,0 +1,59 @@ +library(test_ecsm_lib) { + delay_model : table_lookup ; + time_unit : "1ns" ; + voltage_unit : "1V" ; + current_unit : "1mA" ; + capacitive_load_unit(1, ff) ; + input_threshold_pct_rise : 50 ; + output_threshold_pct_rise : 50 ; + slew_lower_threshold_pct_rise : 20 ; + slew_upper_threshold_pct_rise : 80 ; + input_threshold_pct_fall : 50 ; + output_threshold_pct_fall : 50 ; + slew_lower_threshold_pct_fall : 20 ; + slew_upper_threshold_pct_fall : 80 ; + + lu_table_template(delay_template_2x2) { + variable_1 : input_net_transition ; + variable_2 : total_output_net_capacitance ; + index_1("0.01, 0.1") ; + index_2("0.001, 0.01") ; + } + + cell(ECSM1) { + area : 2.0 ; + pin(A) { direction : input ; capacitance : 0.01 ; } + pin(Z) { + direction : output ; + function : "A" ; + timing() { + related_pin : "A" ; + timing_sense : positive_unate ; + cell_rise(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + cell_fall(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + rise_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + fall_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + ecsm_waveform() {} + } + } + } + + cell(ECSM2) { + area : 2.0 ; + pin(A) { direction : input ; capacitance : 0.01 ; } + pin(Z) { + direction : output ; + function : "A" ; + timing() { + related_pin : "A" ; + timing_sense : positive_unate ; + cell_rise(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + cell_fall(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + rise_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + fall_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } + ecsm_waveform_set() {} + ecsm_capacitance() {} + } + } + } +} diff --git a/liberty/test/liberty_ecsm.tcl b/liberty/test/liberty_ecsm.tcl index 949f8f88..9000d6b5 100644 --- a/liberty/test/liberty_ecsm.tcl +++ b/liberty/test/liberty_ecsm.tcl @@ -1,71 +1,6 @@ source ../../test/helpers.tcl -set lib_file [make_result_file liberty_ecsm_generated.lib] -set f [open $lib_file w] -puts $f { -library(test_ecsm_lib) { - delay_model : table_lookup ; - time_unit : "1ns" ; - voltage_unit : "1V" ; - current_unit : "1mA" ; - capacitive_load_unit(1, ff) ; - input_threshold_pct_rise : 50 ; - output_threshold_pct_rise : 50 ; - slew_lower_threshold_pct_rise : 20 ; - slew_upper_threshold_pct_rise : 80 ; - input_threshold_pct_fall : 50 ; - output_threshold_pct_fall : 50 ; - slew_lower_threshold_pct_fall : 20 ; - slew_upper_threshold_pct_fall : 80 ; - - lu_table_template(delay_template_2x2) { - variable_1 : input_net_transition ; - variable_2 : total_output_net_capacitance ; - index_1("0.01, 0.1") ; - index_2("0.001, 0.01") ; - } - - cell(ECSM1) { - area : 2.0 ; - pin(A) { direction : input ; capacitance : 0.01 ; } - pin(Z) { - direction : output ; - function : "A" ; - timing() { - related_pin : "A" ; - timing_sense : positive_unate ; - cell_rise(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - cell_fall(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - rise_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - fall_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - ecsm_waveform() {} - } - } - } - - cell(ECSM2) { - area : 2.0 ; - pin(A) { direction : input ; capacitance : 0.01 ; } - pin(Z) { - direction : output ; - function : "A" ; - timing() { - related_pin : "A" ; - timing_sense : positive_unate ; - cell_rise(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - cell_fall(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - rise_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - fall_transition(delay_template_2x2) { values("0.01, 0.02", "0.03, 0.04") ; } - ecsm_waveform_set() {} - ecsm_capacitance() {} - } - } - } -} -} -close $f - -read_liberty $lib_file +read_liberty liberty_ecsm.lib set cell_names {} foreach cell [get_lib_cells test_ecsm_lib/*] {