Use same error code for all -filter errors
This commit is contained in:
parent
677a905bd3
commit
582b419fbc
|
|
@ -120,7 +120,7 @@ Warning: 0000 duplicated
|
|||
0347 Sdc.tcl:401 current_design for other than top cell not supported.
|
||||
0348 Sdc.tcl:467 patterns argument not supported with -of_objects.
|
||||
0349 Sdc.tcl:500 instance '$pattern' not found.
|
||||
0350 Sdc.tcl:506 unsupported instance -filter expression.
|
||||
0350 Sdc.tcl:432 unsupported $object_type -filter expression.
|
||||
0351 Sdc.tcl:533 clock '$pattern' not found.
|
||||
0352 Sdc.tcl:562 positional arguments not supported with -of_objects.
|
||||
0353 Sdc.tcl:589 library '$lib_name' not found.
|
||||
|
|
@ -134,10 +134,8 @@ Warning: 0000 duplicated
|
|||
0361 Sdc.tcl:805 net '$pattern' not found.
|
||||
0362 Sdc.tcl:837 patterns argument not supported with -of_objects.
|
||||
0363 Sdc.tcl:874 pin '$pattern' not found.
|
||||
0364 Sdc.tcl:879 unsupported pin -filter expression.
|
||||
0365 Sdc.tcl:904 patterns argument not supported with -of_objects.
|
||||
0366 Sdc.tcl:918 port '$pattern' not found.
|
||||
0367 Sdc.tcl:924 unsupported port -filter expression.
|
||||
0368 Sdc.tcl:957 -add requires -name.
|
||||
0369 Sdc.tcl:962 -name or port_pin_list must be specified.
|
||||
0370 Sdc.tcl:970 missing -period argument.
|
||||
|
|
@ -269,7 +267,6 @@ Warning: 0000 duplicated
|
|||
0526 Search.tcl:1013 specify one of -setup and -hold.
|
||||
0527 Search.tcl:1063 unknown path group '$name'.
|
||||
0540 Sta.tcl:158 -from/-to arguments not supported with -of_objects.
|
||||
0541 Sta.tcl:174 unsupported timing arc -filter expression.
|
||||
0560 Util.tcl:44 $cmd $key missing value.
|
||||
0561 Util.tcl:61 $cmd $key missing value.
|
||||
0562 Util.tcl:71 $cmd $arg is not a known keyword or flag.
|
||||
|
|
@ -574,8 +571,3 @@ Warning: 0000 duplicated
|
|||
2121 Sdc.i:105 unknown analysis type
|
||||
2122 Sdc.i:232 unknown wire load mode
|
||||
2140 StaTclTypes.i:431 Delay calc arg requires 5 or 6 args.
|
||||
2351 Sdc.tcl:538 unsupported clock -filter expression.
|
||||
2354 Sdc.tcl:608 unsupported liberty cell -filter expression.
|
||||
2357 Sdc.tcl:681 unsupported liberty port -filter expression.
|
||||
2359 Sdc.tcl:720 unsupported liberty library -filter expression.
|
||||
2361 Sdc.tcl:810 unsupported net -filter expression.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ exec tclsh $0 ${1+"$@"}
|
|||
# Find warning/error message IDs and detect collisions.
|
||||
# Usage: FindMessages.tcl > doc/messages.txt
|
||||
|
||||
proc scan_file { file warn_regexp is_filter_objs } {
|
||||
proc scan_file { file warn_regexp } {
|
||||
global msgs
|
||||
|
||||
if { [file exists $file] } {
|
||||
|
|
@ -22,11 +22,7 @@ proc scan_file { file warn_regexp is_filter_objs } {
|
|||
set file_line 1
|
||||
|
||||
while { ![eof $in_stream] } {
|
||||
if { !$is_filter_objs && [regexp -- $warn_regexp $line ignore1 ignore2 msg_id msg] } {
|
||||
lappend msgs "$msg_id $file $file_line $msg"
|
||||
}
|
||||
if { $is_filter_objs && [regexp -- $warn_regexp $line ignore1 ignore2 object_type msg_id] } {
|
||||
set msg "\"unsupported $object_type -filter expression.\""
|
||||
if { [regexp -- $warn_regexp $line ignore1 ignore2 msg_id msg] } {
|
||||
lappend msgs "$msg_id $file $file_line $msg"
|
||||
}
|
||||
gets $in_stream line
|
||||
|
|
@ -52,11 +48,10 @@ foreach subdir $subdirs {
|
|||
set files_tcl [concat $files_tcl [glob -nocomplain [file join $subdir "*.tcl"]]]
|
||||
}
|
||||
set warn_regexp_tcl {(sta_warn|sta_error|sta_warn_error) ([0-9]+) (".+")}
|
||||
set warn_regexp_tcl_filter_objs {(filter_objs) \S+ \S+ \S+ "([^"]+)" ([0-9]+)}
|
||||
|
||||
proc scan_files {files warn_regexp is_filter_objs } {
|
||||
proc scan_files {files warn_regexp } {
|
||||
foreach file $files {
|
||||
scan_file $file $warn_regexp $is_filter_objs
|
||||
scan_file $file $warn_regexp
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,8 +79,7 @@ proc report_msgs { } {
|
|||
}
|
||||
|
||||
set msgs {}
|
||||
scan_files $files_c $warn_regexp_c 0
|
||||
scan_files $files_tcl $warn_regexp_tcl 0
|
||||
scan_files $files_tcl $warn_regexp_tcl_filter_objs 1
|
||||
scan_files $files_c $warn_regexp_c
|
||||
scan_files $files_tcl $warn_regexp_tcl
|
||||
check_msgs
|
||||
report_msgs
|
||||
|
|
|
|||
20
sdc/Sdc.tcl
20
sdc/Sdc.tcl
|
|
@ -407,7 +407,7 @@ proc current_design { {design ""} } {
|
|||
################################################################
|
||||
|
||||
# Generic get_* filter.
|
||||
proc filter_objs { filter objects filter_function object_type error_code } {
|
||||
proc filter_objs { filter objects filter_function object_type } {
|
||||
set filter_regexp1 {@?([a-zA-Z_]+) *(==|!=|=~|!~) *([0-9a-zA-Z_\*]+)}
|
||||
set filter_or_regexp "($filter_regexp1) *\\|\\| *($filter_regexp1)"
|
||||
set filter_and_regexp "($filter_regexp1) *&& *($filter_regexp1)"
|
||||
|
|
@ -429,7 +429,7 @@ proc filter_objs { filter objects filter_function object_type error_code } {
|
|||
} elseif { [regexp $filter_regexp1 $filter ignore attr_name op arg] } {
|
||||
set filtered_objects [$filter_function $attr_name $op $arg $objects]
|
||||
} else {
|
||||
sta_error $error_code "unsupported $object_type -filter expression."
|
||||
sta_error 350 "unsupported $object_type -filter expression."
|
||||
}
|
||||
return $filtered_objects
|
||||
}
|
||||
|
|
@ -503,7 +503,7 @@ proc get_cells { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set insts [filter_objs $keys(-filter) $insts filter_insts "instance" 350]
|
||||
set insts [filter_objs $keys(-filter) $insts filter_insts "instance"]
|
||||
}
|
||||
return $insts
|
||||
}
|
||||
|
|
@ -535,7 +535,7 @@ proc get_clocks { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set clocks [filter_objs $keys(-filter) $clocks filter_clocks "clock" 2351]
|
||||
set clocks [filter_objs $keys(-filter) $clocks filter_clocks "clock"]
|
||||
}
|
||||
return $clocks
|
||||
}
|
||||
|
|
@ -605,7 +605,7 @@ proc get_lib_cells { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set cells [filter_objs $keys(-filter) $cells filter_lib_cells "liberty cell" 2354]
|
||||
set cells [filter_objs $keys(-filter) $cells filter_lib_cells "liberty cell"]
|
||||
}
|
||||
return $cells
|
||||
}
|
||||
|
|
@ -678,7 +678,7 @@ proc get_lib_pins { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set ports [filter_objs $keys(-filter) $ports filter_lib_pins "liberty port" 2357]
|
||||
set ports [filter_objs $keys(-filter) $ports filter_lib_pins "liberty port"]
|
||||
}
|
||||
return $ports
|
||||
}
|
||||
|
|
@ -717,7 +717,7 @@ proc get_libs { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set libs [filter_objs $keys(-filter) $libs filter_liberty_libraries "liberty library" 2359]
|
||||
set libs [filter_objs $keys(-filter) $libs filter_liberty_libraries "liberty library"]
|
||||
}
|
||||
return $libs
|
||||
}
|
||||
|
|
@ -807,7 +807,7 @@ proc get_nets { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set nets [filter_objs $keys(-filter) $nets filter_nets "net" 2361]
|
||||
set nets [filter_objs $keys(-filter) $nets filter_nets "net"]
|
||||
}
|
||||
return $nets
|
||||
}
|
||||
|
|
@ -876,7 +876,7 @@ proc get_pins { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set pins [filter_objs $keys(-filter) $pins filter_pins "pin" 364]
|
||||
set pins [filter_objs $keys(-filter) $pins filter_pins "pin"]
|
||||
}
|
||||
return $pins
|
||||
}
|
||||
|
|
@ -921,7 +921,7 @@ proc get_ports { args } {
|
|||
}
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set ports [filter_objs $keys(-filter) $ports filter_ports "port" 367]
|
||||
set ports [filter_objs $keys(-filter) $ports filter_ports "port"]
|
||||
}
|
||||
return $ports
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ proc get_timing_edges_cmd { cmd cmd_args } {
|
|||
cmd_usage_error $cmd
|
||||
}
|
||||
if [info exists keys(-filter)] {
|
||||
set arcs [filter_objs $keys(-filter) $arcs filter_timing_arcs "timing arc" 541]
|
||||
set arcs [filter_objs $keys(-filter) $arcs filter_timing_arcs "timing arc"]
|
||||
}
|
||||
return $arcs
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue