diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-25 17:42:32 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-25 17:42:32 +0200 |
commit | 790d7159bb0c31ea015b08313cf4713728f8b574 (patch) | |
tree | 4ecd8bdaf60ed1c246088e84b86f0912d12d3c0e | |
parent | a8001daf6fd041f2133847b5cfef799afdba33ae (diff) | |
download | nextpnr-790d7159bb0c31ea015b08313cf4713728f8b574.tar.gz nextpnr-790d7159bb0c31ea015b08313cf4713728f8b574.tar.bz2 nextpnr-790d7159bb0c31ea015b08313cf4713728f8b574.zip |
Fixed packing non pod
-rw-r--r-- | ecp5/arch.cc | 6 | ||||
-rw-r--r-- | ecp5/arch.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 5507d1e3..3e8676ca 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -328,7 +328,7 @@ BelId Arch::getPackagePinBel(const std::string &pin) const std::string Arch::getBelPackagePin(BelId bel) const { for (int i = 0; i < package_info->num_pins; i++) { - if (package_info->pin_data[i].abs_loc == bel.location && package_info->pin_data[i].bel_index == bel.index) { + if (Location(package_info->pin_data[i].abs_loc) == bel.location && package_info->pin_data[i].bel_index == bel.index) { return package_info->pin_data[i].name.get(); } } @@ -338,7 +338,7 @@ std::string Arch::getBelPackagePin(BelId bel) const int Arch::getPioBelBank(BelId bel) const { for (int i = 0; i < chip_info->num_pios; i++) { - if (chip_info->pio_info[i].abs_loc == bel.location && chip_info->pio_info[i].bel_index == bel.index) { + if (Location(chip_info->pio_info[i].abs_loc) == bel.location && chip_info->pio_info[i].bel_index == bel.index) { return chip_info->pio_info[i].bank; } } @@ -348,7 +348,7 @@ int Arch::getPioBelBank(BelId bel) const std::string Arch::getPioFunctionName(BelId bel) const { for (int i = 0; i < chip_info->num_pios; i++) { - if (chip_info->pio_info[i].abs_loc == bel.location && chip_info->pio_info[i].bel_index == bel.index) { + if (Location(chip_info->pio_info[i].abs_loc) == bel.location && chip_info->pio_info[i].bel_index == bel.index) { const char *func = chip_info->pio_info[i].function_name.get(); if (func == nullptr) return ""; diff --git a/ecp5/arch.h b/ecp5/arch.h index 4400db5e..b9fd43f8 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -98,7 +98,7 @@ NPNR_PACKED_STRUCT(struct LocationTypePOD { }); NPNR_PACKED_STRUCT(struct PIOInfoPOD { - Location abs_loc; + LocationPOD abs_loc; int32_t bel_index; RelPtr<char> function_name; int16_t bank; @@ -107,7 +107,7 @@ NPNR_PACKED_STRUCT(struct PIOInfoPOD { NPNR_PACKED_STRUCT(struct PackagePinPOD { RelPtr<char> name; - Location abs_loc; + LocationPOD abs_loc; int32_t bel_index; }); |