mirror of https://github.com/YosysHQ/icestorm.git
Initial 5k support in icetime (no support for new cells yet)
This commit is contained in:
parent
2219530535
commit
baa7a45c2e
|
|
@ -9,7 +9,7 @@ endif
|
||||||
all: icetime$(EXE)
|
all: icetime$(EXE)
|
||||||
|
|
||||||
ifeq ($(EXE),.js)
|
ifeq ($(EXE),.js)
|
||||||
icetime$(EXE): | share/$(CHIPDB_SUBDIR)/chipdb-384.txt share/$(CHIPDB_SUBDIR)/chipdb-1k.txt share/$(CHIPDB_SUBDIR)/chipdb-8k.txt
|
icetime$(EXE): | share/$(CHIPDB_SUBDIR)/chipdb-384.txt share/$(CHIPDB_SUBDIR)/chipdb-1k.txt share/$(CHIPDB_SUBDIR)/chipdb-8k.txt share/$(CHIPDB_SUBDIR)/chipdb-5k.txt
|
||||||
|
|
||||||
share/$(CHIPDB_SUBDIR)/chipdb-384.txt: ../icebox/chipdb-384.txt
|
share/$(CHIPDB_SUBDIR)/chipdb-384.txt: ../icebox/chipdb-384.txt
|
||||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||||
|
|
@ -20,7 +20,9 @@ share/$(CHIPDB_SUBDIR)/chipdb-1k.txt: ../icebox/chipdb-1k.txt
|
||||||
share/$(CHIPDB_SUBDIR)/chipdb-8k.txt: ../icebox/chipdb-8k.txt
|
share/$(CHIPDB_SUBDIR)/chipdb-8k.txt: ../icebox/chipdb-8k.txt
|
||||||
mkdir -p share/$(CHIPDB_SUBDIR)
|
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
share/$(CHIPDB_SUBDIR)/chipdb-5k.txt: ../icebox/chipdb-5k.txt
|
||||||
|
mkdir -p share/$(CHIPDB_SUBDIR)
|
||||||
|
cp $< $@
|
||||||
override LDFLAGS += --embed-file share
|
override LDFLAGS += --embed-file share
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,10 @@ void read_config()
|
||||||
config_device = strtok(nullptr, " \t\r\n");
|
config_device = strtok(nullptr, " \t\r\n");
|
||||||
} else
|
} else
|
||||||
if (!strcmp(tok, ".io_tile") || !strcmp(tok, ".logic_tile") ||
|
if (!strcmp(tok, ".io_tile") || !strcmp(tok, ".logic_tile") ||
|
||||||
!strcmp(tok, ".ramb_tile") || !strcmp(tok, ".ramt_tile"))
|
!strcmp(tok, ".ramb_tile") || !strcmp(tok, ".ramt_tile") ||
|
||||||
|
!strcmp(tok, ".ipcon_tile") || !strcmp(tok, ".dsp0_tile") ||
|
||||||
|
!strcmp(tok, ".dsp1_tile") || !strcmp(tok, ".dsp2_tile") ||
|
||||||
|
!strcmp(tok, ".dsp3_tile"))
|
||||||
{
|
{
|
||||||
line_nr = 0;
|
line_nr = 0;
|
||||||
tile_x = atoi(strtok(nullptr, " \t\r\n"));
|
tile_x = atoi(strtok(nullptr, " \t\r\n"));
|
||||||
|
|
@ -255,6 +258,16 @@ void read_config()
|
||||||
config_tile_type.at(tile_x).at(tile_y) = "ramb";
|
config_tile_type.at(tile_x).at(tile_y) = "ramb";
|
||||||
if (!strcmp(tok, ".ramt_tile"))
|
if (!strcmp(tok, ".ramt_tile"))
|
||||||
config_tile_type.at(tile_x).at(tile_y) = "ramt";
|
config_tile_type.at(tile_x).at(tile_y) = "ramt";
|
||||||
|
if (!strcmp(tok, ".dsp0_tile"))
|
||||||
|
config_tile_type.at(tile_x).at(tile_y) = "dsp0";
|
||||||
|
if (!strcmp(tok, ".dsp1_tile"))
|
||||||
|
config_tile_type.at(tile_x).at(tile_y) = "dsp1";
|
||||||
|
if (!strcmp(tok, ".dsp2_tile"))
|
||||||
|
config_tile_type.at(tile_x).at(tile_y) = "dsp2";
|
||||||
|
if (!strcmp(tok, ".dsp3_tile"))
|
||||||
|
config_tile_type.at(tile_x).at(tile_y) = "dsp3";
|
||||||
|
if (!strcmp(tok, ".ipcon_tile"))
|
||||||
|
config_tile_type.at(tile_x).at(tile_y) = "ipcon";
|
||||||
} else
|
} else
|
||||||
if (!strcmp(tok, ".extra_bit")) {
|
if (!strcmp(tok, ".extra_bit")) {
|
||||||
int b = atoi(strtok(nullptr, " \t\r\n"));
|
int b = atoi(strtok(nullptr, " \t\r\n"));
|
||||||
|
|
@ -666,7 +679,9 @@ double get_delay(std::string cell_type, std::string in_port, std::string out_por
|
||||||
|
|
||||||
if (device_type == "hx8k")
|
if (device_type == "hx8k")
|
||||||
return get_delay_hx8k(cell_type, in_port, out_port);
|
return get_delay_hx8k(cell_type, in_port, out_port);
|
||||||
|
|
||||||
|
if (device_type == "up5k")
|
||||||
|
return get_delay_up5k(cell_type, in_port, out_port);
|
||||||
fprintf(stderr, "No built-in timing database for '%s' devices!\n", device_type.c_str());
|
fprintf(stderr, "No built-in timing database for '%s' devices!\n", device_type.c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -1077,7 +1092,7 @@ std::string make_seg_pre_io(int x, int y, int z)
|
||||||
|
|
||||||
std::string make_lc40(int x, int y, int z)
|
std::string make_lc40(int x, int y, int z)
|
||||||
{
|
{
|
||||||
assert(0 < x && 0 < y && 0 <= z && z < 8);
|
assert(0 <= x && 0 < y && 0 <= z && z < 8);
|
||||||
|
|
||||||
auto cell = stringf("lc40_%d_%d_%d", x, y, z);
|
auto cell = stringf("lc40_%d_%d_%d", x, y, z);
|
||||||
|
|
||||||
|
|
@ -1884,7 +1899,7 @@ void help(const char *cmd)
|
||||||
printf(" -j <output_file>\n");
|
printf(" -j <output_file>\n");
|
||||||
printf(" write timing report in json format to the file\n");
|
printf(" write timing report in json format to the file\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" -d lp384|lp1k|hx1k|lp8k|hx8k\n");
|
printf(" -d lp384|lp1k|hx1k|lp8k|hx8k|up5k\n");
|
||||||
printf(" select the device type (default = lp variant)\n");
|
printf(" select the device type (default = lp variant)\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" -C <chipdb-file>\n");
|
printf(" -C <chipdb-file>\n");
|
||||||
|
|
@ -2025,6 +2040,10 @@ int main(int argc, char **argv)
|
||||||
if (device_type == "lp8k" || device_type == "hx8k") {
|
if (device_type == "lp8k" || device_type == "hx8k") {
|
||||||
if (config_device != "8k")
|
if (config_device != "8k")
|
||||||
goto device_chip_mismatch;
|
goto device_chip_mismatch;
|
||||||
|
} else
|
||||||
|
if (device_type == "up5k") {
|
||||||
|
if (config_device != "5k")
|
||||||
|
goto device_chip_mismatch;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Error: Invalid device type '%s'.\n", device_type.c_str());
|
fprintf(stderr, "Error: Invalid device type '%s'.\n", device_type.c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ def timings_to_c(chip, f):
|
||||||
print(" exit(1);")
|
print(" exit(1);")
|
||||||
print("}")
|
print("}")
|
||||||
|
|
||||||
for db in "lp384 lp1k lp8k hx1k hx8k".split():
|
for db in "lp384 lp1k lp8k hx1k hx8k up5k".split():
|
||||||
with open("../icefuzz/timings_%s.txt" % db, "r") as f:
|
with open("../icefuzz/timings_%s.txt" % db, "r") as f:
|
||||||
timings_to_c(db, f);
|
timings_to_c(db, f);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue