diff options
author | David Shah <davey1576@gmail.com> | 2017-11-01 12:02:44 +0000 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2017-11-01 12:02:44 +0000 |
commit | 3bd601c0cde0bdb5f26b1d67c88fcd57fc9f5cd8 (patch) | |
tree | adfe1224ed31eb852682c40edbd2d8476cd82082 | |
parent | c0b6c1b98d9b428bbb6101cf49885ee83318d0dc (diff) | |
download | icestorm-3bd601c0cde0bdb5f26b1d67c88fcd57fc9f5cd8.tar.gz icestorm-3bd601c0cde0bdb5f26b1d67c88fcd57fc9f5cd8.tar.bz2 icestorm-3bd601c0cde0bdb5f26b1d67c88fcd57fc9f5cd8.zip |
Fix BRAM initialisation on 5k parts
-rw-r--r-- | icepack/icepack.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc index e776bb8..e42f398 100644 --- a/icepack/icepack.cc +++ b/icepack/icepack.cc @@ -661,7 +661,7 @@ void FpgaConfig::read_ascii(std::istream &ifs) continue; } - if (command == ".io_tile" || command == ".logic_tile" || command == ".ramb_tile" || command == ".ramt_tile") + if (command == ".io_tile" || command == ".logic_tile" || command == ".ramb_tile" || command == ".ramt_tile" || command.substr(0, 4) == ".dsp" || command == ".ipconn_tile") { if (!got_device) error("Missing .device statement before %s.\n", command.c_str()); @@ -1165,16 +1165,17 @@ BramIndexConverter::BramIndexConverter(const FpgaConfig *fpga, int tile_x, int t // used for SRAM instead of logic. Therefore the bitstream for the top two // quadrants are half the height of the bottom. if (this->fpga->device == "5k") { - top_half = this->tile_y > (chip_height / 3); + top_half = this->tile_y > (2 * chip_height / 3); } this->bank_num = 0; int y_offset = this->tile_y - 1; if (this->fpga->device == "5k") { - if (!top_half) { + if (top_half) { this->bank_num |= 1; + y_offset = this->tile_y - (2 * chip_height / 3); } else { - y_offset = this->tile_y - (chip_height / 3); + //y_offset = this->tile_y - (2 * chip_height / 3); } } else if (top_half) { this->bank_num |= 1; |