viaduct: Allow constraining only cascades without fanout
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
5ef5c33e9e
commit
e5bfff6e9f
@ -82,7 +82,7 @@ void ViaductHelpers::remove_nextpnr_iobs(const pool<CellTypePort> &top_ports)
|
||||
}
|
||||
|
||||
int ViaductHelpers::constrain_cell_pairs(const pool<CellTypePort> &src_ports, const pool<CellTypePort> &sink_ports,
|
||||
int delta_z)
|
||||
int delta_z, bool allow_fanout)
|
||||
{
|
||||
int constrained = 0;
|
||||
for (auto &cell : ctx->cells) {
|
||||
@ -96,6 +96,8 @@ int ViaductHelpers::constrain_cell_pairs(const pool<CellTypePort> &src_ports, co
|
||||
continue;
|
||||
if (!src_ports.count(CellTypePort(ci.type, port.first)))
|
||||
continue;
|
||||
if (!allow_fanout && port.second.net->users.size() > 1)
|
||||
continue;
|
||||
for (auto &usr : port.second.net->users) {
|
||||
if (!sink_ports.count(CellTypePort(usr)))
|
||||
continue;
|
||||
|
@ -70,7 +70,8 @@ struct ViaductHelpers
|
||||
// expects a set of top-level port types
|
||||
void remove_nextpnr_iobs(const pool<CellTypePort> &top_ports);
|
||||
// Constrain cells with certain port connection patterns together with a fixed z-offset
|
||||
int constrain_cell_pairs(const pool<CellTypePort> &src_ports, const pool<CellTypePort> &sink_ports, int delta_z);
|
||||
int constrain_cell_pairs(const pool<CellTypePort> &src_ports, const pool<CellTypePort> &sink_ports, int delta_z,
|
||||
bool allow_fanout = true);
|
||||
// Replace constants with given driving cells
|
||||
void replace_constants(CellTypePort vcc_driver, CellTypePort gnd_driver,
|
||||
const dict<IdString, Property> &vcc_params = {},
|
||||
|
Loading…
Reference in New Issue
Block a user