File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -961,15 +961,15 @@ class NetlistWriterVisitor : public NetlistVisitor {
961
961
}
962
962
}
963
963
964
- // All the cell instances
964
+ // All the cell instances (to an internal buffer for now)
965
+ std::stringstream instances_ss;
966
+
965
967
size_t unconn_count = 0 ;
966
- verilog_os_ << " \n " ;
967
- verilog_os_ << indent (depth + 1 ) << " //Cell instances\n " ;
968
968
for (auto & inst : cell_instances_) {
969
- inst->print_verilog (verilog_os_ , unconn_count, depth + 1 );
969
+ inst->print_verilog (instances_ss , unconn_count, depth + 1 );
970
970
}
971
971
972
- // Unconnected wires
972
+ // Unconnected wires declarations
973
973
if (unconn_count) {
974
974
verilog_os_ << " \n " ;
975
975
verilog_os_ << indent (depth + 1 ) << " //Unconnected wires\n " ;
@@ -979,6 +979,11 @@ class NetlistWriterVisitor : public NetlistVisitor {
979
979
}
980
980
}
981
981
982
+ // All the cell instances
983
+ verilog_os_ << " \n " ;
984
+ verilog_os_ << indent (depth + 1 ) << " //Cell instances\n " ;
985
+ verilog_os_ << instances_ss.str ();
986
+
982
987
verilog_os_ << " \n " ;
983
988
verilog_os_ << indent (depth) << " endmodule\n " ;
984
989
}
You can’t perform that action at this time.
0 commit comments