Add support for CellInfo->pins in router
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
1a3d0f2f5d
commit
794fc6df60
@ -77,8 +77,13 @@ void route_design(Design *design, bool verbose)
|
|||||||
|
|
||||||
auto src_pos = chip.getBelPosition(src_bel);
|
auto src_pos = chip.getBelPosition(src_bel);
|
||||||
|
|
||||||
auto src_wire = chip.getWireBelPin(
|
IdString driver_port = net_info->driver.port;
|
||||||
src_bel, portPinFromId(net_info->driver.port));
|
|
||||||
|
auto driver_port_it = net_info->driver.cell->pins.find(driver_port);
|
||||||
|
if (driver_port_it != net_info->driver.cell->pins.end())
|
||||||
|
driver_port = driver_port_it->second;
|
||||||
|
|
||||||
|
auto src_wire = chip.getWireBelPin(src_bel, portPinFromId(driver_port));
|
||||||
|
|
||||||
if (src_wire == WireId())
|
if (src_wire == WireId())
|
||||||
log_error("No wire found for port %s on source bel.\n",
|
log_error("No wire found for port %s on source bel.\n",
|
||||||
@ -110,8 +115,15 @@ void route_design(Design *design, bool verbose)
|
|||||||
chip.estimateDelay(src_pos, dst_pos));
|
chip.estimateDelay(src_pos, dst_pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IdString user_port = user_it.port;
|
||||||
|
|
||||||
|
auto user_port_it = user_it.cell->pins.find(user_port);
|
||||||
|
|
||||||
|
if (user_port_it != user_it.cell->pins.end())
|
||||||
|
user_port = user_port_it->second;
|
||||||
|
|
||||||
auto dst_wire =
|
auto dst_wire =
|
||||||
chip.getWireBelPin(dst_bel, portPinFromId(user_it.port));
|
chip.getWireBelPin(dst_bel, portPinFromId(user_port));
|
||||||
|
|
||||||
if (dst_wire == WireId())
|
if (dst_wire == WireId())
|
||||||
log_error("No wire found for port %s on destination bel.\n",
|
log_error("No wire found for port %s on destination bel.\n",
|
||||||
|
@ -421,8 +421,8 @@ void json_import_ports(Design *design, const string &modname,
|
|||||||
//
|
//
|
||||||
// Pick a name for this port
|
// Pick a name for this port
|
||||||
if (is_bus)
|
if (is_bus)
|
||||||
this_port.name =
|
this_port.name = port_info.name.str() + "[" +
|
||||||
port_info.name.str() + "[" + std::to_string(index) + "]";
|
std::to_string(index) + "]";
|
||||||
else
|
else
|
||||||
this_port.name = port_info.name;
|
this_port.name = port_info.name;
|
||||||
this_port.type = port_info.type;
|
this_port.type = port_info.type;
|
||||||
|
Loading…
Reference in New Issue
Block a user