Skip to content

Commit 6bfe592

Browse files
committed
Revisions
1 parent cb25744 commit 6bfe592

File tree

3 files changed

+25
-28
lines changed

3 files changed

+25
-28
lines changed

sdc/Sdc.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ proc current_design { {design ""} } {
407407
################################################################
408408

409409
# Generic get_* filter.
410-
proc filter_objs { filter objects filter_function filter_type error_code } {
410+
proc filter_objs { filter objects filter_function object_type error_code } {
411411
set filter_regexp1 {@?([a-zA-Z_]+) *(==|!=|=~|!~) *([0-9a-zA-Z_\*]+)}
412412
set filter_or_regexp "($filter_regexp1) *\\|\\| *($filter_regexp1)"
413413
set filter_and_regexp "($filter_regexp1) *&& *($filter_regexp1)"
@@ -429,7 +429,7 @@ proc filter_objs { filter objects filter_function filter_type error_code } {
429429
} elseif { [regexp $filter_regexp1 $filter ignore attr_name op arg] } {
430430
set filtered_objects [$filter_function $attr_name $op $arg $objects]
431431
} else {
432-
sta_error $error_code "unsupported $filter_type -filter expression."
432+
sta_error $error_code "unsupported $object_type -filter expression."
433433
}
434434
return $filtered_objects
435435
}

test/get_filter.ok

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ Warning: asap7_simple.lib.gz line 82271, timing group from output port.
1818
Warning: asap7_simple.lib.gz line 82747, timing group from output port.
1919
get_cells
2020
u1
21-
2221
get_clocks
2322
clk
24-
23+
get_clocks 2
2524
vclk
26-
2725
get_lib_cells
2826
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/BUFx10_ASAP7_75t_R
2927
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/BUFx12_ASAP7_75t_R
@@ -41,7 +39,7 @@ asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/HB1xp67_ASAP7_75t_R
4139
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/HB2xp67_ASAP7_75t_R
4240
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/HB3xp67_ASAP7_75t_R
4341
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/HB4xp67_ASAP7_75t_R
44-
42+
get_lib_cells 2
4543
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/CKINVDCx10_ASAP7_75t_R
4644
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/CKINVDCx11_ASAP7_75t_R
4745
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/CKINVDCx12_ASAP7_75t_R
@@ -63,19 +61,15 @@ asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/INVx6_ASAP7_75t_R
6361
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/INVx8_ASAP7_75t_R
6462
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/INVxp33_ASAP7_75t_R
6563
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120/INVxp67_ASAP7_75t_R
66-
6764
get_lib_pins
6865
A
69-
66+
get_lib_pins 2
7067
Y
71-
7268
get_libs
7369
asap7sc7p5t_INVBUF_RVT_TT_ccs_211120
74-
7570
get_nets
7671
r1q
7772
r2q
78-
7973
get_pins
8074
r1/CLK
8175
r1/D
@@ -86,19 +80,17 @@ r3/D
8680
u1/A
8781
u2/A
8882
u2/B
89-
83+
get_pins 2
9084
r1/Q
9185
r2/Q
9286
r3/Q
9387
u1/Y
9488
u2/Y
95-
9689
get_ports
9790
clk1
9891
clk2
9992
clk3
10093
in1
10194
in2
102-
95+
get_ports 2
10396
out
104-

test/get_filter.tcl

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,28 @@ create_clock -name vclk -period 1000
99

1010
# Test filters for each SDC command
1111
puts "get_cells"
12-
puts [report_object_full_names [get_cells -filter liberty_cell==BUFx2_ASAP7_75t_R *]]
12+
report_object_full_names [get_cells -filter liberty_cell==BUFx2_ASAP7_75t_R *]
1313
puts "get_clocks"
14-
puts [report_object_full_names [get_clocks -filter is_virtual==0 *]]
15-
puts [report_object_full_names [get_clocks -filter is_virtual==1 *]]
14+
report_object_full_names [get_clocks -filter is_virtual==0 *]
15+
puts "get_clocks 2"
16+
report_object_full_names [get_clocks -filter is_virtual==1 *]
1617
puts "get_lib_cells"
17-
puts [report_object_full_names [get_lib_cells -filter is_buffer==1 *]]
18-
puts [report_object_full_names [get_lib_cells -filter is_inverter==1 *]]
18+
report_object_full_names [get_lib_cells -filter is_buffer==1 *]
19+
puts "get_lib_cells 2"
20+
report_object_full_names [get_lib_cells -filter is_inverter==1 *]
1921
puts "get_lib_pins"
20-
puts [report_object_full_names [get_lib_pins -filter direction==input BUFx2_ASAP7_75t_R/*]]
21-
puts [report_object_full_names [get_lib_pins -filter direction==output BUFx2_ASAP7_75t_R/*]]
22+
report_object_full_names [get_lib_pins -filter direction==input BUFx2_ASAP7_75t_R/*]
23+
puts "get_lib_pins 2"
24+
report_object_full_names [get_lib_pins -filter direction==output BUFx2_ASAP7_75t_R/*]
2225
puts "get_libs"
23-
puts [report_object_full_names [get_libs -filter name==asap7sc7p5t_INVBUF_RVT_TT_ccs_211120 *]]
26+
report_object_full_names [get_libs -filter name==asap7sc7p5t_INVBUF_RVT_TT_ccs_211120 *]
2427
puts "get_nets"
25-
puts [report_object_full_names [get_nets -filter name=~*q *]]
28+
report_object_full_names [get_nets -filter name=~*q *]
2629
puts "get_pins"
27-
puts [report_object_full_names [get_pins -filter direction==input *]]
28-
puts [report_object_full_names [get_pins -filter direction==output *]]
30+
report_object_full_names [get_pins -filter direction==input *]
31+
puts "get_pins 2"
32+
report_object_full_names [get_pins -filter direction==output *]
2933
puts "get_ports"
30-
puts [report_object_full_names [get_ports -filter direction==input *]]
31-
puts [report_object_full_names [get_ports -filter direction==output *]]
34+
report_object_full_names [get_ports -filter direction==input *]
35+
puts "get_ports 2"
36+
report_object_full_names [get_ports -filter direction==output *]

0 commit comments

Comments
 (0)