Skip to content

Commit

Permalink
read_verilog/link_design support redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Jul 9, 2021
1 parent c3624ed commit 8c23d8e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion tcl/Link.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ namespace eval sta {

define_cmd_args "link_design" {[top_cell_name]}

proc link_design { {top_cell_name ""} } {
proc_redirect link_design {
variable current_design_name

check_argc_eq0or1 "link_design" $args
if { $args == "" } {
set top_cell_name ""
} else {
set top_cell_name [lindex $args 0]
}
if { $top_cell_name == "" } {
if { $current_design_name == "" } {
sta_error 593 "missing top_cell_name argument and no current_design."
Expand Down
2 changes: 1 addition & 1 deletion verilog/Verilog.i
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using sta::readVerilogFile;
%inline %{

bool
read_verilog(const char *filename)
read_verilog_cmd(const char *filename)
{
Sta *sta = Sta::sta();
NetworkReader *network = sta->networkReader();
Expand Down
4 changes: 4 additions & 0 deletions verilog/Verilog.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ namespace eval sta {
# Defined by SWIG interface Verilog.i.
define_cmd_args "read_verilog" {filename}

proc_redirect read_verilog {
read_verilog_cmd $args
}

define_cmd_args "write_verilog" {[-sort] [-include_pwr_gnd]\
[-remove_cells cells] filename}

Expand Down
2 changes: 1 addition & 1 deletion verilog/VerilogReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ VerilogReader::makeModuleInstNetwork(VerilogModuleInst *mod_inst,
if (make_black_boxes) {
cell = makeBlackBox(mod_inst, parent_module);
linkWarn(198, filename_, mod_inst->line(),
"module %s not found. Creating black box for %s.",
"module %s not found. Creating black box for %s.",
mod_inst->moduleName(),
verilogName(mod_inst));
}
Expand Down

0 comments on commit 8c23d8e

Please sign in to comment.