800 | 800 |
error("cram_x %d (bit %d, %d) larger than bank size %lu\n", cram_x, bit_x, bit_y, this->cram[cram_bank].size());
|
801 | 801 |
}
|
802 | 802 |
if (cram_y > int(this->cram[cram_bank][cram_x].size())) {
|
803 | |
error("cram_y %d larger than bank size %lu\n", cram_y, this->cram[cram_bank][cram_x].size());
|
|
803 |
error("cram_y %d (bit %d, %d) larger than bank %d size %lu\n", cram_y, bit_x, bit_y, cram_bank, this->cram[cram_bank][cram_x].size());
|
804 | 804 |
}
|
805 | 805 |
ofs << (this->cram[cram_bank][cram_x][cram_y] ? '1' : '0');
|
806 | 806 |
}
|
|
979 | 979 |
string FpgaConfig::tile_type(int x, int y) const
|
980 | 980 |
{
|
981 | 981 |
if ((x == 0 || x == this->chip_width()+1) && (y == 0 || y == this->chip_height()+1)) return "corner";
|
982 | |
// The sides on the 5k devices are unsupported tile types.
|
983 | |
if (this->device == "5k" && (x == 0 || x == this->chip_width()+1)) return "unsupported";
|
|
982 |
// The sides on the 5k devices are IPConnect or DSP tiles
|
|
983 |
if (this->device == "5k" && (x == 0 || x == this->chip_width()+1)) {
|
|
984 |
if( (y == 5) || (y == 10) || (y == 15) || (y == 23)) //check ordering here, tile 23-26 might be reversed
|
|
985 |
return "dsp0";
|
|
986 |
if( (y == 6) || (y == 11) || (y == 16) || (y == 24))
|
|
987 |
return "dsp1";
|
|
988 |
if( (y == 7) || (y == 12) || (y == 17) || (y == 25))
|
|
989 |
return "dsp2";
|
|
990 |
if( (y == 8) || (y == 13) || (y == 18) || (y == 26))
|
|
991 |
return "dsp3";
|
|
992 |
return "ipconn";
|
|
993 |
}
|
984 | 994 |
if ((x == 0 || x == this->chip_width()+1) || (y == 0 || y == this->chip_height()+1)) return "io";
|
985 | 995 |
|
986 | 996 |
if (this->device == "384") return "logic";
|
|
1010 | 1020 |
if (type == "ramb") return 42;
|
1011 | 1021 |
if (type == "ramt") return 42;
|
1012 | 1022 |
if (type == "io") return 18;
|
1013 | |
if (type == "unsupported") return 76;
|
|
1023 |
if (type.substr(0, 3) == "dsp") return 54;
|
|
1024 |
if (type == "ipconn") return 54;
|
|
1025 |
|
1014 | 1026 |
panic("Unknown tile type '%s'.\n", type.c_str());
|
1015 | 1027 |
}
|
1016 | 1028 |
|