Skip to content

Commit 7a4ff26

Browse files
committed
[vpr][pack] add comment
1 parent f4c6ee8 commit 7a4ff26

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vpr/src/pack/prepack.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,9 @@ static AtomBlockId get_sink_block(const AtomBlockId block_id,
10911091
if (net_id.is_valid()) {
10921092
const auto& net_sinks = atom_nlist.net_sinks(net_id);
10931093
if (is_chain_pattern) {
1094+
// If the pattern is a chain, allow nets with multiple sinks.
1095+
// This enables forming chains where the COUT is connected both to
1096+
// the next element in the chain and to the block's output pin.
10941097
for (const auto& sink_pin_id : net_sinks) {
10951098
auto sink_block_id = atom_nlist.pin_block(sink_pin_id);
10961099
if (primitive_type_feasible(sink_block_id, to_pb_type)) {
@@ -1102,6 +1105,11 @@ static AtomBlockId get_sink_block(const AtomBlockId block_id,
11021105
}
11031106
}
11041107
} else {
1108+
// For non-chain patterns, we conservatively only consider the sink block
1109+
// if the net fanout is 1. To clarify, consider a case where the output of a LUT
1110+
// is connected to both a register and an unregistered output that feeds another block.
1111+
// If the intra-cluster architecture doesn't support having both registered and
1112+
// unregistered outputs simultaneously, this could lead to a packing failure.
11051113
if (net_sinks.size() == 1) {
11061114
auto sink_pin_id = *(net_sinks.begin());
11071115
return atom_nlist.pin_block(sink_pin_id);

0 commit comments

Comments
 (0)