File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1086,16 +1086,18 @@ static AtomBlockId get_sink_block(const AtomBlockId block_id,
1086
1086
1087
1087
if (from_port_id) {
1088
1088
auto net_id = atom_nlist.port_net (from_port_id, from_pin_number);
1089
- const auto & net_sinks = atom_nlist.net_sinks (net_id);
1090
1089
// Iterate over all net sinks and find the one corresponding
1091
1090
// to the to_pin specified in the pack pattern connection
1092
- for (const auto & sink_pin_id : net_sinks) {
1093
- auto sink_block_id = atom_nlist.pin_block (sink_pin_id);
1094
- if (primitive_type_feasible (sink_block_id, to_pb_type)) {
1095
- auto to_port_id = atom_nlist.find_atom_port (sink_block_id, to_port_model);
1096
- auto to_pin_id = atom_nlist.find_pin (to_port_id, BitIndex (to_pin_number));
1097
- if (to_pin_id == sink_pin_id) {
1098
- return sink_block_id;
1091
+ if (net_id.is_valid ()) {
1092
+ const auto & net_sinks = atom_nlist.net_sinks (net_id);
1093
+ for (const auto & sink_pin_id : net_sinks) {
1094
+ auto sink_block_id = atom_nlist.pin_block (sink_pin_id);
1095
+ if (primitive_type_feasible (sink_block_id, to_pb_type)) {
1096
+ auto to_port_id = atom_nlist.find_atom_port (sink_block_id, to_port_model);
1097
+ auto to_pin_id = atom_nlist.find_pin (to_port_id, BitIndex (to_pin_number));
1098
+ if (to_pin_id == sink_pin_id) {
1099
+ return sink_block_id;
1100
+ }
1099
1101
}
1100
1102
}
1101
1103
}
You can’t perform that action at this time.
0 commit comments