Allow backslash-EOL to end tokens in Liberty file (#279)

* Allow backslash EOL to end tokens in Liberty file

* Update liberty_backslash_eol.lib

* Update liberty_backslash_eol.lib
This commit is contained in:
Akash Levy 2025-07-31 12:19:36 -07:00 committed by GitHub
parent 0635ba03e0
commit ec3208bfbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 55 additions and 1 deletions

View File

@ -78,7 +78,7 @@ TOKEN ({ALPHA}|{DIGIT}|_)({ALPHA}|{DIGIT}|[._\-])*(:({ALPHA}|{DIGIT}|_)+)?
/* bus_naming_style : %s[%d] ; */ /* bus_naming_style : %s[%d] ; */
BUS_STYLE "%s"{BUS_LEFT}"%d"{BUS_RIGHT} BUS_STYLE "%s"{BUS_LEFT}"%d"{BUS_RIGHT}
PUNCTUATION [,\:;|(){}+*&!'=] PUNCTUATION [,\:;|(){}+*&!'=]
TOKEN_END {PUNCTUATION}|[ \t\r\n] TOKEN_END {PUNCTUATION}|[ \t\r\n]|\\{EOL}
EOL \r?\n EOL \r?\n
%% %%

View File

@ -0,0 +1,51 @@
library (liberty_backslash_eol) {
delay_model : "table_lookup";
simulation : false;
capacitive_load_unit\
(1,pF);
leakage_power_unit : "1pW";
current_unit : "1A";
pulling_resistance_unit : "1kohm";
time_unit : "1ns";
voltage_unit : "1v";
library_features : "report_delay_calculation";
input_threshold_pct_rise : 50;
input_threshold_pct_fall : 50;
output_threshold_pct_rise : 50;
output_threshold_pct_fall : 50;
slew_lower_threshold_pct_rise : 30;
slew_lower_threshold_pct_fall : 30;
slew_upper_threshold_pct_rise : 70;
slew_upper_threshold_pct_fall : 70;
slew_derate_from_library : 1.0;
nom_process : 1.0;
nom_temperature : 85.0;
nom_voltage : 0.75;
cell (my_inv) {
pin (A) {
capacitance : 1;
direction : "input";
}
pin (Y) {
function : "!A";
direction : "output";
timing () {
related_pin : "A";
timing_sense : "negative_unate";
cell_rise (scalar) {
values ("1");
}
cell_fall (scalar) {
values ("1");
}
rise_transition (scalar) {
values ("1");
}
fall_transition (scalar) {
values ("1");
}
}
}
}
}

View File

View File

@ -0,0 +1,2 @@
# backslash eol should be ignored in liberty file
read_liberty liberty_backslash_eol.lib

View File

@ -145,6 +145,7 @@ record_sta_tests {
get_objrefs get_objrefs
liberty_arcs_one2one_1 liberty_arcs_one2one_1
liberty_arcs_one2one_2 liberty_arcs_one2one_2
liberty_backslash_eol
liberty_ccsn liberty_ccsn
liberty_latch3 liberty_latch3
path_group_names path_group_names