Codebase list fpga-icestorm / aa653a2
Add DSP and IPConnect tile support to icepack and glbcheck David Shah 6 years ago
2 changed file(s) with 19 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
2929 with open(argv[2]) as f:
3030 current_tile = None
3131 for line in f:
32 if line.startswith(("Tile", "IO_Tile", "RAM_Tile", "LogicTile")):
33 f = line.replace("IO_", "").replace("RAM_", "").split("_")
32 if line.startswith(("Tile", "IO_Tile", "RAM_Tile", "LogicTile", "DSP_Tile", "IpCon_Tile")):
33 f = line.replace("IO_", "").replace("RAM_", "").replace("DSP_","").replace("IpCon_","").split("_")
3434 assert len(f) == 3
3535 current_tile = "%02d.%02d" % (int(f[1]), int(f[2]))
3636 continue
3737
38 if line.find("GlobalNetwork") >= 0 or line.startswith(("IpCon", "DSP")):
38 if line.find("GlobalNetwork") >= 0:
3939 current_tile = None
4040 continue
4141
6464 print(bit)
6565
6666 exit(1)
67
800800 error("cram_x %d (bit %d, %d) larger than bank size %lu\n", cram_x, bit_x, bit_y, this->cram[cram_bank].size());
801801 }
802802 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());
804804 }
805805 ofs << (this->cram[cram_bank][cram_x][cram_y] ? '1' : '0');
806806 }
979979 string FpgaConfig::tile_type(int x, int y) const
980980 {
981981 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 }
984994 if ((x == 0 || x == this->chip_width()+1) || (y == 0 || y == this->chip_height()+1)) return "io";
985995
986996 if (this->device == "384") return "logic";
10101020 if (type == "ramb") return 42;
10111021 if (type == "ramt") return 42;
10121022 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
10141026 panic("Unknown tile type '%s'.\n", type.c_str());
10151027 }
10161028