diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-16 15:23:04 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-06-16 15:23:04 +0200 |
commit | 6acf23cf37285e16050b44370be6cbe7dd3e0dc5 (patch) | |
tree | 352eaa3249ff2941bf6523d0b587b02b535137dc /ice40/chip.cc | |
parent | 5d343a168b98826c80482c11376b1a95b9b0bbca (diff) | |
download | nextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.tar.gz nextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.tar.bz2 nextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.zip |
Some refactoring of Chip API (prep for chipdb refactoring)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r-- | ice40/chip.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc index b40963bf..db293f43 100644 --- a/ice40/chip.cc +++ b/ice40/chip.cc @@ -275,7 +275,7 @@ BelId Chip::getPackagePinBel(const std::string &pin) const // ----------------------------------------------------------------------- -bool Chip::estimatePosition(BelId bel, float &x, float &y) const +bool Chip::estimatePosition(BelId bel, int &x, int &y) const { assert(bel != BelId()); x = chip_info.bel_data[bel.index].x; @@ -284,15 +284,15 @@ bool Chip::estimatePosition(BelId bel, float &x, float &y) const return chip_info.bel_data[bel.index].type != TYPE_SB_GB; } -float Chip::estimateDelay(WireId src, WireId dst) const +delay_t Chip::estimateDelay(WireId src, WireId dst) const { assert(src != WireId()); - float x1 = chip_info.wire_data[src.index].x; - float y1 = chip_info.wire_data[src.index].y; + delay_t x1 = chip_info.wire_data[src.index].x; + delay_t y1 = chip_info.wire_data[src.index].y; assert(dst != WireId()); - float x2 = chip_info.wire_data[dst.index].x; - float y2 = chip_info.wire_data[dst.index].y; + delay_t x2 = chip_info.wire_data[dst.index].x; + delay_t y2 = chip_info.wire_data[dst.index].y; return fabsf(x1 - x2) + fabsf(y1 - y2); } |