Skip to content

Commit

Permalink
cmd filename args with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Dec 23, 2020
1 parent a231978 commit 1a99dd0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion parasitics/Parasitics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ proc_redirect read_spef {
set delete_after_reduce [info exists flags(-delete_after_reduce)]
set quiet [info exists flags(-quiet)]
set save [info exists flags(-save)]
set filename $args
set filename [file nativename [lindex $args 0]]
return [read_spef_cmd $filename $instance $min_max $increment \
$pin_cap_included $keep_coupling_caps $coupling_reduction_factor \
$reduce_to $delete_after_reduce $quiet]
Expand Down
4 changes: 2 additions & 2 deletions sdf/Sdf.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ proc_redirect read_sdf {
keys {-path -corner -analysis_type -type -min_type -max_type -cond_use} \
flags {-unescaped_dividers -incremental_only}
check_argc_eq1 "read_sdf" $args
set filename $args
set filename [file nativename [lindex $args 0]]
set path ""
if [info exists keys(-path)] {
set path $keys(-path)
Expand Down Expand Up @@ -202,7 +202,7 @@ proc_redirect write_sdf {
flags {-gzip -no_timestamp -no_version}
check_argc_eq1 "write_sdf" $args
set corner [parse_corner keys]
set filename $args
set filename [file nativename [lindex $args 0]]
set divider "/"
if [info exists keys(-divider)] {
set divider $keys(-divider)
Expand Down
16 changes: 3 additions & 13 deletions tcl/Cmds.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ proc write_path_spice { args } {
flags {}

if { [info exists keys(-spice_directory)] } {
set spice_dir [file_expand_tilde $keys(-spice_directory)]
set spice_dir [file nativename $keys(-spice_directory)]
if { ![file exists $spice_dir] } {
sta_error 496 "Directory $spice_dir not found."
}
Expand All @@ -1988,7 +1988,7 @@ proc write_path_spice { args } {
}

if { [info exists keys(-lib_subckt_file)] } {
set lib_subckt_file [file_expand_tilde $keys(-lib_subckt_file)]
set lib_subckt_file [file nativename $keys(-lib_subckt_file)]
if { ![file readable $lib_subckt_file] } {
sta_error 500 "-lib_subckt_file $lib_subckt_file is not readable."
}
Expand All @@ -1997,7 +1997,7 @@ proc write_path_spice { args } {
}

if { [info exists keys(-model_file)] } {
set model_file [file_expand_tilde $keys(-model_file)]
set model_file [file nativename $keys(-model_file)]
if { ![file readable $model_file] } {
sta_error 502 "-model_file $model_file is not readable."
}
Expand Down Expand Up @@ -2038,15 +2038,5 @@ proc write_path_spice { args } {
}
}

proc file_expand_tilde { filename } {
global env

if { [string range $filename 0 1] == "~/" } {
return [file join $env(HOME) [string range $filename 2 end]]
} else {
return $filename
}
}

# sta namespace end.
}
2 changes: 1 addition & 1 deletion tcl/Liberty.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ proc_redirect read_liberty {
flags {-min -max -no_latch_infer}
check_argc_eq1 "read_liberty" $args

set filename [file nativename $args]
set filename [file nativename [lindex $args 0]]
set corner [parse_corner keys]
set min_max [parse_min_max_all_flags flags]
set infer_latches [expr ![info exists flags(-no_latch_infer)]]
Expand Down
4 changes: 2 additions & 2 deletions tcl/Sdc.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ proc_redirect read_sdc {

check_argc_eq1 "read_sdc" $args
set echo [info exists flags(-echo)]
set filename [lindex $args 0]
set filename [file nativename [lindex $args 0]]
source_ $filename $echo 0
}

Expand All @@ -52,7 +52,7 @@ proc_redirect source {
}
set echo [info exists flags(-echo)]
set verbose [info exists flags(-verbose)]
set filename [lindex $args 0]
set filename [file nativename [lindex $args 0]]
source_ $filename $echo $verbose
}

Expand Down
2 changes: 1 addition & 1 deletion verilog/Verilog.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ proc write_verilog { args } {
set sort [info exists flags(-sort)]
set include_pwr_gnd [info exists flags(-include_pwr_gnd)]
check_argc_eq1 "write_verilog" $args
set filename $args
set filename [file nativename [lindex $args 0]]
write_verilog_cmd $filename $sort $include_pwr_gnd $remove_cells
}

Expand Down

0 comments on commit 1a99dd0

Please sign in to comment.