Skip to content

Commit 1c6150c

Browse files
committed
vpr: base: netlist writer: change formatting
Signed-off-by: Paweł Czarnecki <[email protected]>
1 parent 8b09d1b commit 1c6150c

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

vpr/src/base/netlist_writer.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,9 +2433,6 @@ void print_verilog_port(std::ostream& os, size_t& unconn_count, const std::strin
24332433
}
24342434
};
24352435

2436-
//Port name
2437-
os << indent(depth) << "." << port_name << "(";
2438-
24392436
//Pins
24402437
if (nets.size() == 1) {
24412438
//Single-bit port
@@ -2470,11 +2467,9 @@ void print_verilog_port(std::ostream& os, size_t& unconn_count, const std::strin
24702467
// Empty connection
24712468
} else {
24722469
// Individual bits
2473-
os << "{"
2474-
<< "\n";
24752470
for (int ipin = (int)nets.size() - 1; ipin >= 0; --ipin) { //Reverse order to match endianess
2476-
std::string name = port_name + "[" + std::to_string(ipin) + "]";
2477-
os << indent(depth) << "." << escape_verilog_identifier(name) << " (";
2471+
std::string name = port_name + "[" + std::to_string(ipin) + "]";
2472+
os << indent(depth) << "." << escape_verilog_identifier(name) << "(";
24782473
if (nets[ipin].empty()) {
24792474
//Disconnected
24802475
if (type == PortType::INPUT || type == PortType::CLOCK) {
@@ -2490,12 +2485,12 @@ void print_verilog_port(std::ostream& os, size_t& unconn_count, const std::strin
24902485
//Connected
24912486
os << escape_verilog_identifier(nets[ipin]);
24922487
}
2493-
if (ipin != 0) {
2494-
os << ",";
2495-
}
2488+
if (ipin != 0)
2489+
os << "),";
2490+
else
2491+
os << ")";
24962492
os << "\n";
24972493
}
2498-
os << indent(depth) + " }";
24992494
}
25002495
}
25012496
}

0 commit comments

Comments
 (0)