aboutsummaryrefslogtreecommitdiffstats
path: root/icepack
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-07-07 17:00:20 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-07-07 17:00:20 -0700
commitb019ae4e65a65e26ae0b765641f2c1a8150500b0 (patch)
tree30fbf50fbc4db31ab92011f77d496519b6427a92 /icepack
parentf16265c6624890bd7f850146ec57ddd02b0c8642 (diff)
downloadicestorm-b019ae4e65a65e26ae0b765641f2c1a8150500b0.tar.gz
icestorm-b019ae4e65a65e26ae0b765641f2c1a8150500b0.tar.bz2
icestorm-b019ae4e65a65e26ae0b765641f2c1a8150500b0.zip
Rework bram indexing to unbreak 8k. Still not sure if its correct for 5k.
Diffstat (limited to 'icepack')
-rw-r--r--icepack/icepack.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc
index fd2ce5b..6b837f4 100644
--- a/icepack/icepack.cc
+++ b/icepack/icepack.cc
@@ -1144,11 +1144,14 @@ BramIndexConverter::BramIndexConverter(const FpgaConfig *fpga, int tile_x, int t
this->bank_num = 0;
int y_offset = this->tile_y - 1;
- if (!top_half) {
+ if (this->fpga->device == "5k") {
+ if (!top_half) {
+ this->bank_num |= 1;
+ } else {
+ y_offset = this->tile_y - (chip_height / 3);
+ }
+ } else if (top_half) {
this->bank_num |= 1;
- } else if (this->fpga->device == "5k") {
- y_offset = this->tile_y - (chip_height / 3);
- } else {
y_offset = this->tile_y - chip_height / 2;
}
if (right_half) this->bank_num |= 2;