write_verilog -sorted -> -sort
This commit is contained in:
parent
49b2c3cea7
commit
eea6ab1a29
|
|
@ -51,10 +51,10 @@ delete_verilog_reader()
|
|||
|
||||
void
|
||||
write_verilog_cmd(const char *filename,
|
||||
bool sorted)
|
||||
bool sort)
|
||||
{
|
||||
Network *network = cmdNetwork();
|
||||
writeVerilog(filename, sorted, network);
|
||||
writeVerilog(filename, sort, network);
|
||||
}
|
||||
|
||||
%} // inline
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@ namespace eval sta {
|
|||
# Defined by SWIG interface Verilog.i.
|
||||
define_cmd_args "read_verilog" {filename}
|
||||
|
||||
define_cmd_args "write_verilog" {[-sorted] filename}
|
||||
define_cmd_args "write_verilog" {[-sort] filename}
|
||||
|
||||
proc write_verilog { args } {
|
||||
parse_key_args "write_verilog" args keys {} flags {-sorted}
|
||||
parse_key_args "write_verilog" args keys {} flags {-sort}
|
||||
|
||||
set sorted [info exists flags(-sorted)]
|
||||
set sort [info exists flags(-sort)]
|
||||
check_argc_eq1 "write_verilog" $args
|
||||
set filename $args
|
||||
write_verilog_cmd $filename $sorted
|
||||
write_verilog_cmd $filename $sort
|
||||
}
|
||||
|
||||
# sta namespace end
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class VerilogWriter
|
|||
{
|
||||
public:
|
||||
VerilogWriter(const char *filename,
|
||||
bool sorted,
|
||||
bool sort,
|
||||
FILE *stream,
|
||||
Network *network);
|
||||
void writeModule(Instance *inst);
|
||||
|
|
@ -42,7 +42,7 @@ protected:
|
|||
void writeChild(Instance *child);
|
||||
|
||||
const char *filename_;
|
||||
bool sorted_;
|
||||
bool sort_;
|
||||
FILE *stream_;
|
||||
Network *network_;
|
||||
|
||||
|
|
@ -52,12 +52,12 @@ protected:
|
|||
|
||||
void
|
||||
writeVerilog(const char *filename,
|
||||
bool sorted,
|
||||
bool sort,
|
||||
Network *network)
|
||||
{
|
||||
FILE *stream = fopen(filename, "w");
|
||||
if (stream) {
|
||||
VerilogWriter writer(filename, sorted, stream, network);
|
||||
VerilogWriter writer(filename, sort, stream, network);
|
||||
writer.writeModule(network->topInstance());
|
||||
fclose(stream);
|
||||
}
|
||||
|
|
@ -66,11 +66,11 @@ writeVerilog(const char *filename,
|
|||
}
|
||||
|
||||
VerilogWriter::VerilogWriter(const char *filename,
|
||||
bool sorted,
|
||||
bool sort,
|
||||
FILE *stream,
|
||||
Network *network) :
|
||||
filename_(filename),
|
||||
sorted_(sorted),
|
||||
sort_(sort),
|
||||
stream_(stream),
|
||||
network_(network)
|
||||
{
|
||||
|
|
@ -171,7 +171,7 @@ VerilogWriter::writeChildren(Instance *inst)
|
|||
}
|
||||
delete child_iter;
|
||||
|
||||
if (sorted_)
|
||||
if (sort_)
|
||||
sort(children, InstancePathNameLess(network_));
|
||||
|
||||
for (auto child : children)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class Network;
|
|||
|
||||
void
|
||||
writeVerilog(const char *filename,
|
||||
bool sorted,
|
||||
bool sort,
|
||||
Network *network);
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Reference in New Issue