Skip to content

Commit

Permalink
Add more extras
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed Nov 14, 2024
1 parent 4685060 commit 3a2429b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion tcl/Extras.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################
# Miscellaneous commands that exist in commercial tools
# Miscellaneous commands
################################################################

# Set dont_use attribute (ignore)
Expand All @@ -23,6 +23,9 @@ proc get_db { attr } {
}
}

# Get attribute
interp alias {} get_attribute {} get_property

################################################################
# Unsupported commands (for now)
################################################################
Expand All @@ -42,9 +45,25 @@ proc set_clock_jitter { args } {
puts "Warning: set_clock_jitter not supported"
}

# Get liberty timing arcs
proc get_lib_timing_arcs { args } {
puts "Warning: get_lib_timing_arcs not supported, will return empty list"
return [list]
}

################################################################
# TCL extras
################################################################

# Add echo alias
interp alias {} echo {} puts

# Add date getter
proc date {} {
return [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"]
}

# Add memory usage getter
proc mem {} {
return [exec ps -o rss= -p [pid]]
}

0 comments on commit 3a2429b

Please sign in to comment.