Skip to content

Commit 0487b53

Browse files
authored
Merge pull request #3331 from verilog-to-routing/prepack_fix
fix the issue for pack pattern to recognize register connection
2 parents 13f29e2 + 4621cd3 commit 0487b53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vpr/src/pack/prepack.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,11 +1141,12 @@ static AtomBlockId get_sink_block(const AtomBlockId block_id,
11411141
// Iterate through all sink blocks and check whether any of them
11421142
// is compatible with the block specified in the pack pattern.
11431143
bool connected_to_latch = false;
1144-
LogicalModelId latch_model_id = LogicalModels::MODEL_LATCH_ID;
11451144
AtomBlockId pattern_sink_block_id = AtomBlockId::INVALID();
11461145
for (const auto& sink_pin_id : net_sinks) {
11471146
auto sink_block_id = atom_nlist.pin_block(sink_pin_id);
1148-
if (atom_nlist.block_model(sink_block_id) == latch_model_id) {
1147+
// If the sink block has a clock, it is considered stateful (e.g., a latch or flip-flop).
1148+
// Mark this so we can later decide whether to drop the block based on the net’s fanout.
1149+
if (!atom_nlist.block_is_combinational(sink_block_id)) {
11491150
connected_to_latch = true;
11501151
}
11511152
if (primitive_type_feasible(sink_block_id, to_pb_type)) {

0 commit comments

Comments
 (0)