From f77647a3e814045d4169a431615e490888656554 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Mon, 9 Sep 2024 20:16:26 -0700 Subject: [PATCH 1/6] Smallfix to get tests consistently passing in regression --- test/liberty_arcs_one2one.ok | 226 ++-------------------------------- test/liberty_arcs_one2one.tcl | 4 +- 2 files changed, 14 insertions(+), 216 deletions(-) diff --git a/test/liberty_arcs_one2one.ok b/test/liberty_arcs_one2one.ok index 22d298ef..dca9c149 100644 --- a/test/liberty_arcs_one2one.ok +++ b/test/liberty_arcs_one2one.ok @@ -1,220 +1,18 @@ Warning: liberty_arcs_one2one.lib line 48, timing port A and related port Y are different sizes. Warning: liberty_arcs_one2one.lib line 76, timing port A and related port Y are different sizes. TEST 1: -Startpoint: a[0] (input port clocked by clk) -Endpoint: y[0] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[0] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[0] (inv_8_to_4) - 0.00 1.00 ^ y[0] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[1] (input port clocked by clk) -Endpoint: y[1] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[1] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[1] (inv_8_to_4) - 0.00 1.00 ^ y[1] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[2] (input port clocked by clk) -Endpoint: y[2] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[2] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[2] (inv_8_to_4) - 0.00 1.00 ^ y[2] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[3] (input port clocked by clk) -Endpoint: y[3] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[3] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[3] (inv_8_to_4) - 0.00 1.00 ^ y[3] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - +Startpoint Endpoint Slack +-------------------------------------------------------------------------------- +a[0] (input) y[0] (output) -1.00 +a[1] (input) y[1] (output) -1.00 +a[2] (input) y[2] (output) -1.00 +a[3] (input) y[3] (output) -1.00 TEST 2: -Startpoint: a[0] (input port clocked by clk) -Endpoint: y[0] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[0] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[0] (inv_4_to_8) - 0.00 1.00 ^ y[0] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[1] (input port clocked by clk) -Endpoint: y[1] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[1] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[1] (inv_4_to_8) - 0.00 1.00 ^ y[1] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[2] (input port clocked by clk) -Endpoint: y[2] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[2] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[2] (inv_4_to_8) - 0.00 1.00 ^ y[2] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - - -Startpoint: a[3] (input port clocked by clk) -Endpoint: y[3] (output port clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description ---------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 v input external delay - 0.00 0.00 v a[3] (in) - 1.00 1.00 ^ partial_wide_inv_cell/Y[3] (inv_4_to_8) - 0.00 1.00 ^ y[3] (out) - 1.00 data arrival time - - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 clock reconvergence pessimism - 0.00 0.00 output external delay - 0.00 data required time ---------------------------------------------------------- - 0.00 data required time - -1.00 data arrival time ---------------------------------------------------------- - -1.00 slack (VIOLATED) - +Startpoint Endpoint Slack +-------------------------------------------------------------------------------- +a[0] (input) y[0] (output) -1.00 +a[1] (input) y[1] (output) -1.00 +a[2] (input) y[2] (output) -1.00 +a[3] (input) y[3] (output) -1.00 diff --git a/test/liberty_arcs_one2one.tcl b/test/liberty_arcs_one2one.tcl index 38bac255..372bd8bc 100644 --- a/test/liberty_arcs_one2one.tcl +++ b/test/liberty_arcs_one2one.tcl @@ -6,7 +6,7 @@ link_design liberty_arcs_one2one_1 create_clock -name clk -period 0 set_input_delay -clock clk 0 [all_inputs] set_output_delay -clock clk 0 [all_outputs] -report_checks -group_count 5 +report_checks -format summary -group_count 5 puts "TEST 2:" read_verilog liberty_arcs_one2one_2.v @@ -14,4 +14,4 @@ link_design liberty_arcs_one2one_2 create_clock -name clk -period 0 set_input_delay -clock clk 0 [all_inputs] set_output_delay -clock clk 0 [all_outputs] -report_checks -group_count 5 +report_checks -format summary -group_count 5 From 9c7cfb4efb8b473ffc76264474052704d715e9d7 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Thu, 12 Sep 2024 18:15:17 -0700 Subject: [PATCH 2/6] Use report_edges instead --- test/liberty_arcs_one2one.ok | 70 ++++++++++++++++++++++++++++------- test/liberty_arcs_one2one.tcl | 10 ++++- 2 files changed, 64 insertions(+), 16 deletions(-) diff --git a/test/liberty_arcs_one2one.ok b/test/liberty_arcs_one2one.ok index dca9c149..29721cbc 100644 --- a/test/liberty_arcs_one2one.ok +++ b/test/liberty_arcs_one2one.ok @@ -1,18 +1,60 @@ Warning: liberty_arcs_one2one.lib line 48, timing port A and related port Y are different sizes. Warning: liberty_arcs_one2one.lib line 76, timing port A and related port Y are different sizes. TEST 1: -Startpoint Endpoint Slack --------------------------------------------------------------------------------- -a[0] (input) y[0] (output) -1.00 -a[1] (input) y[1] (output) -1.00 -a[2] (input) y[2] (output) -1.00 -a[3] (input) y[3] (output) -1.00 - +report_edges -from partial_wide_inv_cell/A[0] +A[0] -> Y[0] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[1] +A[1] -> Y[1] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[2] +A[2] -> Y[2] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[3] +A[3] -> Y[3] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[4] +report_edges -from partial_wide_inv_cell/A[5] +report_edges -from partial_wide_inv_cell/A[6] +report_edges -from partial_wide_inv_cell/A[7] TEST 2: -Startpoint Endpoint Slack --------------------------------------------------------------------------------- -a[0] (input) y[0] (output) -1.00 -a[1] (input) y[1] (output) -1.00 -a[2] (input) y[2] (output) -1.00 -a[3] (input) y[3] (output) -1.00 - +report_edges -to partial_wide_inv_cell/Y[0] +A[0] -> Y[0] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[1] +A[1] -> Y[1] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[2] +A[2] -> Y[2] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[3] +A[3] -> Y[3] combinational + v -> v 1.00:1.00 + ^ -> v 1.00:1.00 + ^ -> ^ 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[4] +report_edges -to partial_wide_inv_cell/Y[5] +report_edges -to partial_wide_inv_cell/Y[6] +report_edges -to partial_wide_inv_cell/Y[7] diff --git a/test/liberty_arcs_one2one.tcl b/test/liberty_arcs_one2one.tcl index 372bd8bc..e523fb33 100644 --- a/test/liberty_arcs_one2one.tcl +++ b/test/liberty_arcs_one2one.tcl @@ -6,7 +6,10 @@ link_design liberty_arcs_one2one_1 create_clock -name clk -period 0 set_input_delay -clock clk 0 [all_inputs] set_output_delay -clock clk 0 [all_outputs] -report_checks -format summary -group_count 5 +for {set i 0} {$i < 8} {incr i} { + puts "report_edges -from partial_wide_inv_cell/A[$i]" + report_edges -from partial_wide_inv_cell/A[$i] +} puts "TEST 2:" read_verilog liberty_arcs_one2one_2.v @@ -14,4 +17,7 @@ link_design liberty_arcs_one2one_2 create_clock -name clk -period 0 set_input_delay -clock clk 0 [all_inputs] set_output_delay -clock clk 0 [all_outputs] -report_checks -format summary -group_count 5 +for {set i 0} {$i < 8} {incr i} { + puts "report_edges -to partial_wide_inv_cell/Y[$i]" + report_edges -to partial_wide_inv_cell/Y[$i] +} From 4f62e54542d18c7d77a7a0e9d11ecb3d53e2ba78 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Fri, 13 Sep 2024 00:57:41 -0700 Subject: [PATCH 3/6] Follow testing guidelines and specify unateness --- test/get_filter.tcl | 2 + test/liberty_arcs_one2one.ok | 60 ----------------- test/liberty_arcs_one2one.tcl | 23 ------- ...one2one.lib => liberty_arcs_one2one_1.lib} | 31 +-------- test/liberty_arcs_one2one_1.ok | 21 ++++++ test/liberty_arcs_one2one_1.tcl | 11 ++++ test/liberty_arcs_one2one_2.lib | 66 +++++++++++++++++++ test/liberty_arcs_one2one_2.ok | 21 ++++++ test/liberty_arcs_one2one_2.tcl | 11 ++++ test/regression_vars.tcl | 3 +- test/verilog_attribute.tcl | 1 + 11 files changed, 137 insertions(+), 113 deletions(-) delete mode 100644 test/liberty_arcs_one2one.ok delete mode 100644 test/liberty_arcs_one2one.tcl rename test/{liberty_arcs_one2one.lib => liberty_arcs_one2one_1.lib} (71%) create mode 100644 test/liberty_arcs_one2one_1.ok create mode 100644 test/liberty_arcs_one2one_1.tcl create mode 100644 test/liberty_arcs_one2one_2.lib create mode 100644 test/liberty_arcs_one2one_2.ok create mode 100644 test/liberty_arcs_one2one_2.tcl diff --git a/test/get_filter.tcl b/test/get_filter.tcl index e3269754..4bc0f896 100644 --- a/test/get_filter.tcl +++ b/test/get_filter.tcl @@ -1,3 +1,5 @@ +# Test get_* -filter + # Read in design and libraries read_liberty asap7_small.lib.gz read_verilog reg1_asap7.v diff --git a/test/liberty_arcs_one2one.ok b/test/liberty_arcs_one2one.ok deleted file mode 100644 index 29721cbc..00000000 --- a/test/liberty_arcs_one2one.ok +++ /dev/null @@ -1,60 +0,0 @@ -Warning: liberty_arcs_one2one.lib line 48, timing port A and related port Y are different sizes. -Warning: liberty_arcs_one2one.lib line 76, timing port A and related port Y are different sizes. -TEST 1: -report_edges -from partial_wide_inv_cell/A[0] -A[0] -> Y[0] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -from partial_wide_inv_cell/A[1] -A[1] -> Y[1] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -from partial_wide_inv_cell/A[2] -A[2] -> Y[2] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -from partial_wide_inv_cell/A[3] -A[3] -> Y[3] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -from partial_wide_inv_cell/A[4] -report_edges -from partial_wide_inv_cell/A[5] -report_edges -from partial_wide_inv_cell/A[6] -report_edges -from partial_wide_inv_cell/A[7] -TEST 2: -report_edges -to partial_wide_inv_cell/Y[0] -A[0] -> Y[0] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -to partial_wide_inv_cell/Y[1] -A[1] -> Y[1] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -to partial_wide_inv_cell/Y[2] -A[2] -> Y[2] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -to partial_wide_inv_cell/Y[3] -A[3] -> Y[3] combinational - v -> v 1.00:1.00 - ^ -> v 1.00:1.00 - ^ -> ^ 1.00:1.00 - v -> ^ 1.00:1.00 -report_edges -to partial_wide_inv_cell/Y[4] -report_edges -to partial_wide_inv_cell/Y[5] -report_edges -to partial_wide_inv_cell/Y[6] -report_edges -to partial_wide_inv_cell/Y[7] diff --git a/test/liberty_arcs_one2one.tcl b/test/liberty_arcs_one2one.tcl deleted file mode 100644 index e523fb33..00000000 --- a/test/liberty_arcs_one2one.tcl +++ /dev/null @@ -1,23 +0,0 @@ -read_liberty liberty_arcs_one2one.lib - -puts "TEST 1:" -read_verilog liberty_arcs_one2one_1.v -link_design liberty_arcs_one2one_1 -create_clock -name clk -period 0 -set_input_delay -clock clk 0 [all_inputs] -set_output_delay -clock clk 0 [all_outputs] -for {set i 0} {$i < 8} {incr i} { - puts "report_edges -from partial_wide_inv_cell/A[$i]" - report_edges -from partial_wide_inv_cell/A[$i] -} - -puts "TEST 2:" -read_verilog liberty_arcs_one2one_2.v -link_design liberty_arcs_one2one_2 -create_clock -name clk -period 0 -set_input_delay -clock clk 0 [all_inputs] -set_output_delay -clock clk 0 [all_outputs] -for {set i 0} {$i < 8} {incr i} { - puts "report_edges -to partial_wide_inv_cell/Y[$i]" - report_edges -to partial_wide_inv_cell/Y[$i] -} diff --git a/test/liberty_arcs_one2one.lib b/test/liberty_arcs_one2one_1.lib similarity index 71% rename from test/liberty_arcs_one2one.lib rename to test/liberty_arcs_one2one_1.lib index 7eebe107..4056f6b9 100644 --- a/test/liberty_arcs_one2one.lib +++ b/test/liberty_arcs_one2one_1.lib @@ -1,4 +1,4 @@ -library (one_to_one_mismatched_width) { +library (liberty_arcs_one2one_1) { delay_model : "table_lookup"; simulation : false; capacitive_load_unit (1,pF); @@ -47,34 +47,7 @@ library (one_to_one_mismatched_width) { direction : "output"; timing () { related_pin : "A"; - cell_rise (scalar) { - values ("1"); - } - cell_fall (scalar) { - values ("1"); - } - rise_transition (scalar) { - values ("1"); - } - fall_transition (scalar) { - values ("1"); - } - } - } - } - - cell (inv_4_to_8) { - bus (A) { - capacitance : 1; - bus_type : "bus4"; - direction : "input"; - } - bus (Y) { - function : "!A"; - bus_type : "bus8"; - direction : "output"; - timing () { - related_pin : "A"; + timing_sense : "negative_unate"; cell_rise (scalar) { values ("1"); } diff --git a/test/liberty_arcs_one2one_1.ok b/test/liberty_arcs_one2one_1.ok new file mode 100644 index 00000000..64c906ff --- /dev/null +++ b/test/liberty_arcs_one2one_1.ok @@ -0,0 +1,21 @@ +Warning: liberty_arcs_one2one_1.lib line 48, timing port A and related port Y are different sizes. +report_edges -from partial_wide_inv_cell/A[0] +A[0] -> Y[0] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[1] +A[1] -> Y[1] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[2] +A[2] -> Y[2] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[3] +A[3] -> Y[3] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -from partial_wide_inv_cell/A[4] +report_edges -from partial_wide_inv_cell/A[5] +report_edges -from partial_wide_inv_cell/A[6] +report_edges -from partial_wide_inv_cell/A[7] diff --git a/test/liberty_arcs_one2one_1.tcl b/test/liberty_arcs_one2one_1.tcl new file mode 100644 index 00000000..6102782b --- /dev/null +++ b/test/liberty_arcs_one2one_1.tcl @@ -0,0 +1,11 @@ +# Test one-to-one functionality with mismatched widths where A width (8) is larger than Y width (4) +read_liberty liberty_arcs_one2one_1.lib +read_verilog liberty_arcs_one2one_1.v +link_design liberty_arcs_one2one_1 +create_clock -name clk -period 0 +set_input_delay -clock clk 0 [all_inputs] +set_output_delay -clock clk 0 [all_outputs] +for {set i 0} {$i < 8} {incr i} { + puts "report_edges -from partial_wide_inv_cell/A[$i]" + report_edges -from partial_wide_inv_cell/A[$i] +} diff --git a/test/liberty_arcs_one2one_2.lib b/test/liberty_arcs_one2one_2.lib new file mode 100644 index 00000000..b15b3b5e --- /dev/null +++ b/test/liberty_arcs_one2one_2.lib @@ -0,0 +1,66 @@ +library (liberty_arcs_one2one_2) { + 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; + type (bus8) { + base_type : "array"; + data_type : "bit"; + bit_width : 8; + bit_from : 7; + bit_to : 0; + } + type (bus4) { + base_type : "array"; + data_type : "bit"; + bit_width : 4; + bit_from : 3; + bit_to : 0; + } + + cell (inv_4_to_8) { + bus (A) { + capacitance : 1; + bus_type : "bus4"; + direction : "input"; + } + bus (Y) { + function : "!A"; + bus_type : "bus8"; + 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"); + } + } + } + } +} \ No newline at end of file diff --git a/test/liberty_arcs_one2one_2.ok b/test/liberty_arcs_one2one_2.ok new file mode 100644 index 00000000..879b8a74 --- /dev/null +++ b/test/liberty_arcs_one2one_2.ok @@ -0,0 +1,21 @@ +Warning: liberty_arcs_one2one_2.lib line 48, timing port A and related port Y are different sizes. +report_edges -to partial_wide_inv_cell/Y[0] +A[0] -> Y[0] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[1] +A[1] -> Y[1] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[2] +A[2] -> Y[2] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[3] +A[3] -> Y[3] combinational + ^ -> v 1.00:1.00 + v -> ^ 1.00:1.00 +report_edges -to partial_wide_inv_cell/Y[4] +report_edges -to partial_wide_inv_cell/Y[5] +report_edges -to partial_wide_inv_cell/Y[6] +report_edges -to partial_wide_inv_cell/Y[7] diff --git a/test/liberty_arcs_one2one_2.tcl b/test/liberty_arcs_one2one_2.tcl new file mode 100644 index 00000000..0bd423ad --- /dev/null +++ b/test/liberty_arcs_one2one_2.tcl @@ -0,0 +1,11 @@ +# Test one-to-one functionality with mismatched widths where Y width (8) is larger than A width (4) +read_liberty liberty_arcs_one2one_2.lib +read_verilog liberty_arcs_one2one_2.v +link_design liberty_arcs_one2one_2 +create_clock -name clk -period 0 +set_input_delay -clock clk 0 [all_inputs] +set_output_delay -clock clk 0 [all_outputs] +for {set i 0} {$i < 8} {incr i} { + puts "report_edges -to partial_wide_inv_cell/Y[$i]" + report_edges -to partial_wide_inv_cell/Y[$i] +} diff --git a/test/regression_vars.tcl b/test/regression_vars.tcl index 97e197ba..ef03580b 100644 --- a/test/regression_vars.tcl +++ b/test/regression_vars.tcl @@ -124,7 +124,8 @@ record_example_tests { record_sta_tests { prima3 verilog_attribute - liberty_arcs_one2one + liberty_arcs_one2one_1 + liberty_arcs_one2one_2 get_filter } diff --git a/test/verilog_attribute.tcl b/test/verilog_attribute.tcl index 225a0187..f8b88722 100644 --- a/test/verilog_attribute.tcl +++ b/test/verilog_attribute.tcl @@ -1,3 +1,4 @@ +# Tests whether Verilog attributes can be parsed and retrieved correctly read_liberty ../examples/sky130hd_tt.lib read_verilog verilog_attribute.v link_design counter From 6832467a03f223518b8394667b0c0483cea5e518 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 17 Sep 2024 09:12:35 -0700 Subject: [PATCH 4/6] README update cudd url Signed-off-by: James Cherry --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e48cd86c..4e7c86b3 100644 --- a/README.md +++ b/README.md @@ -128,13 +128,11 @@ The Zlib library is an optional. If CMake finds libz, OpenSTA can read Liberty, Verilog, SDF, SPF, and SPEF files compressed with gzip. CUDD is a binary decision diageram (BDD) package that is used to -improve conditional timing arc handling. OpenSTA does not require it -to be installed, but it improves constant propagation, power activity propagation -and spice netlist generation if it is installed. +improve conditional timing arc handling, constant propagation, and +power activity propagation and spice netlist generation. CUDD is available -[here](https://www.davidkebo.com/source/cudd_versions/cudd-3.0.0.tar.gz) -or [here](https://sourceforge.net/projects/cudd-mirror/). +[here](https://github.com/davidkebo/cudd/blob/main/cudd_versions/cudd-3.0.0.tar.gz). Use the CUDD_DIR option to set the install directory of the CUDD library if it is not in one of the normal system install directories. From a095ef109a967a0b58c23472c546eddc038b0320 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 17 Sep 2024 09:29:37 -0700 Subject: [PATCH 5/6] README Signed-off-by: James Cherry --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4e7c86b3..2e54852f 100644 --- a/README.md +++ b/README.md @@ -134,24 +134,16 @@ power activity propagation and spice netlist generation. CUDD is available [here](https://github.com/davidkebo/cudd/blob/main/cudd_versions/cudd-3.0.0.tar.gz). -Use the CUDD_DIR option to set the install directory of the CUDD -library if it is not in one of the normal system install directories. - -``` -cmake -DCUDD_DIR=$HOME/stax/cudd-3.0.0 .." -``` - When building CUDD you may use the `--prefix ` option to `configure` to install in a location other than the default (`/usr/local/lib`). ``` cd $HOME/cudd-3.0.0 -mkdir $HOME/cudd -./configure --prefix $HOME/cudd +./configure --prefix $HOME/cudd-3.0.0 make make install cd /build -cmake .. -DUSE_CUDD=ON -DCUDD_DIR=$HOME/cudd +cmake -DCUDD_DIR=$HOME/cudd-3.0.0 ,. ``` ### Installing with CMake From d4f221970d4d00215891c87150a9abfc3ff5c8d1 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 17 Sep 2024 12:44:50 -0700 Subject: [PATCH 6/6] readme Signed-off-by: James Cherry --- README.md | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 2e54852f..2555a5f8 100644 --- a/README.md +++ b/README.md @@ -128,24 +128,24 @@ The Zlib library is an optional. If CMake finds libz, OpenSTA can read Liberty, Verilog, SDF, SPF, and SPEF files compressed with gzip. CUDD is a binary decision diageram (BDD) package that is used to -improve conditional timing arc handling, constant propagation, and -power activity propagation and spice netlist generation. +improve conditional timing arc handling, constant propagation, power +activity propagation and spice netlist generation. CUDD is available [here](https://github.com/davidkebo/cudd/blob/main/cudd_versions/cudd-3.0.0.tar.gz). -When building CUDD you may use the `--prefix ` option to `configure` to -install in a location other than the default (`/usr/local/lib`). +Unpack and build CUDD. + ``` -cd $HOME/cudd-3.0.0 -./configure --prefix $HOME/cudd-3.0.0 +tar xvfz cudd-3.0.0.tar.gz +cd cudd-3.0.0 +./configure make -make install - -cd /build -cmake -DCUDD_DIR=$HOME/cudd-3.0.0 ,. ``` +You can use the "configure --prefix" option and "make install" to install CUDD +in a different directory. + ### Installing with CMake Use the following commands to checkout the git repository and build the @@ -156,7 +156,7 @@ git clone https://github.com/parallaxsw/OpenSTA.git cd OpenSTA mkdir build cd build -cmake .. +cmake -DCUDD_DIR= ,. make ``` The default build type is release to compile optimized code. @@ -170,7 +170,7 @@ CMAKE_BUILD_TYPE DEBUG|RELEASE CMAKE_CXX_FLAGS - additional compiler flags TCL_LIBRARY - path to tcl library TCL_HEADER - path to tcl.h -CUDD - path to cudd installation +CUDD_DIR - path to cudd installation ZLIB_ROOT - path to zlib CMAKE_INSTALL_PREFIX ``` @@ -179,11 +179,7 @@ If `TCL_LIBRARY` is specified the CMake script will attempt to locate the header from the library path. The default install directory is `/usr/local`. -To install in a different directory with CMake use: - -``` -cmake .. -DCMAKE_INSTALL_PREFIX= -``` +To install in a different directory with CMake use the CMAKE_INSTALL_PREFIX option. If you make changes to `CMakeLists.txt` you may need to clean out existing CMake cached variable values by deleting all of the