aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r--ice40/chip.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc
index 1255dfc8..7b1afd2e 100644
--- a/ice40/chip.cc
+++ b/ice40/chip.cc
@@ -153,7 +153,7 @@ BelId Chip::getBelByName(IdString name) const
if (bel_by_name.empty()) {
for (int i = 0; i < chip_info.num_bels; i++)
- bel_by_name[chip_info.bel_data[i].name] = i;
+ bel_by_name[chip_info.bel_data[i].name.get()] = i;
}
auto it = bel_by_name.find(name);
@@ -190,7 +190,7 @@ WireId Chip::getWireBelPin(BelId bel, PortPin pin) const
assert(bel != BelId());
int num_bel_wires = chip_info.bel_data[bel.index].num_bel_wires;
- BelWirePOD *bel_wires = chip_info.bel_data[bel.index].bel_wires;
+ const BelWirePOD *bel_wires = chip_info.bel_data[bel.index].bel_wires.get();
for (int i = 0; i < num_bel_wires; i++)
if (bel_wires[i].port == pin) {
@@ -209,7 +209,7 @@ WireId Chip::getWireByName(IdString name) const
if (wire_by_name.empty()) {
for (int i = 0; i < chip_info.num_wires; i++)
- wire_by_name[chip_info.wire_data[i].name] = i;
+ wire_by_name[chip_info.wire_data[i].name.get()] = i;
}
auto it = wire_by_name.find(name);
@@ -248,11 +248,11 @@ IdString Chip::getPipName(PipId pip) const
int y = chip_info.pip_data[pip.index].y;
std::string src_name =
- chip_info.wire_data[chip_info.pip_data[pip.index].src].name;
+ chip_info.wire_data[chip_info.pip_data[pip.index].src].name.get();
std::replace(src_name.begin(), src_name.end(), '/', '.');
std::string dst_name =
- chip_info.wire_data[chip_info.pip_data[pip.index].dst].name;
+ chip_info.wire_data[chip_info.pip_data[pip.index].dst].name.get();
std::replace(dst_name.begin(), dst_name.end(), '/', '.');
return "X" + std::to_string(x) + "/Y" + std::to_string(y) + "/" + src_name +
@@ -264,7 +264,7 @@ IdString Chip::getPipName(PipId pip) const
BelId Chip::getPackagePinBel(const std::string &pin) const
{
for (int i = 0; i < package_info->num_pins; i++) {
- if (package_info->pins[i].name == pin) {
+ if (package_info->pins[i].name.get() == pin) {
BelId id;
id.index = package_info->pins[i].bel_index;
return id;
@@ -277,7 +277,7 @@ std::string Chip::getBelPackagePin(BelId bel) const
{
for (int i = 0; i < package_info->num_pins; i++) {
if (package_info->pins[i].bel_index == bel.index) {
- return std::string(package_info->pins[i].name);
+ return std::string(package_info->pins[i].name.get());
}
}
return "";