Skip to content

Commit 9f944ec

Browse files
committed
vpr: Mark CLB net driver pins constant if the matching atom pin is constant
This ensures CLB nets are correctly marked as constants.
1 parent 505df31 commit 9f944ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vpr/src/base/read_netlist.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,13 @@ static void load_external_nets_and_cb(const std::vector<std::string>& circuit_cl
837837
if (atom_net_id) {
838838
add_net_to_hash(ext_nhash, atom_ctx.nlist.net_name(atom_net_id).c_str(), &ext_ncount);
839839
clb_net_id = clb_nlist.create_net(atom_ctx.nlist.net_name(atom_net_id));
840-
clb_nlist.create_pin(output_port_id, (BitIndex)k, clb_net_id, PinType::DRIVER, ipin);
840+
841+
AtomPinId atom_net_driver = atom_ctx.nlist.net_driver(atom_net_id);
842+
bool driver_is_constant = atom_ctx.nlist.pin_is_constant(atom_net_driver);
843+
844+
clb_nlist.create_pin(output_port_id, (BitIndex)k, clb_net_id, PinType::DRIVER, ipin, driver_is_constant);
845+
846+
VTR_ASSERT(clb_nlist.net_is_constant(clb_net_id) == driver_is_constant);
841847
}
842848
ipin++;
843849
}

0 commit comments

Comments
 (0)