Rework bram indexing to unbreak 8k. Still not sure if its correct for 5k.

This commit is contained in:
Scott Shawcroft 2017-07-07 17:00:20 -07:00
parent f16265c662
commit b019ae4e65
1 changed files with 7 additions and 4 deletions

View File

@ -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;