| #!/usr/bin/tclsh8.5 |
| |
| # Copyright (c) Efabless Corporation. All rights reserved. |
| # See LICENSE file in the project root for full license information. |
| |
| set ::env(OPENLANE_ROOT) [file dirname [file normalize [info script]]] |
| source $::env(OPENLANE_ROOT)/scripts/utils/utils.tcl |
| proc run_non_interactive_mode {args} { |
| set ::env(OPENLANE_ROOT) [file dirname [file normalize [info script]]] |
| source $::env(OPENLANE_ROOT)/scripts/tcl_commands/all.tcl |
| if {[prep {*}$args] < 0} { |
| puts "prep failed" |
| exit |
| } |
| run_synthesis |
| run_floorplan |
| run_placement |
| #run_cts |
| gen_pdn |
| run_routing |
| run_magic |
| run_magic_drc |
| } |
| |
| proc run_interactive_mode {args} { |
| set ::env(TCLLIBPATH) $::env(OPENLANE_ROOT)/scripts/tcl_commands/ |
| exec tclsh |& tee /dev/tty |
| } |
| |
| proc run_file {args} { |
| set ::env(TCLLIBPATH) $::env(OPENLANE_ROOT)/scripts/tcl_commands/ |
| exec tclsh $args |& tee /dev/tty |
| } |
| |
| set options {{-design optional} \ |
| {-tag optional} \ |
| {-config optional} \ |
| {-file optional} \ |
| } |
| |
| |
| set flags {-init_design_config -disable_output -interactive} |
| |
| set argv_copy $argv |
| parse_key_args "flow.tcl" argv arg_values $options flags_map $flags |
| |
| if { [info exists flags_map(-interactive)] } { |
| if { [info exists arg_values(-file)] } { |
| run_file $arg_values(-file) |
| } else { |
| run_interactive_mode "$argv_copy" |
| } |
| } else { |
| run_non_interactive_mode {*}$argv_copy |
| } |
| |
| |