aboutsummaryrefslogtreecommitdiffstats
path: root/icetime
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2017-11-24 16:41:34 +0000
committerDavid Shah <davey1576@gmail.com>2017-11-24 16:41:34 +0000
commitbaa7a45c2e7515b05f4ae817e726f57055540ed8 (patch)
tree96c048ae76de830feb9e48e4dee3ee17a0d4d4e2 /icetime
parent2219530535d7c5bb9e55e50e1f79d42b3a346e47 (diff)
downloadicestorm-baa7a45c2e7515b05f4ae817e726f57055540ed8.tar.gz
icestorm-baa7a45c2e7515b05f4ae817e726f57055540ed8.tar.bz2
icestorm-baa7a45c2e7515b05f4ae817e726f57055540ed8.zip
Initial 5k support in icetime (no support for new cells yet)
Diffstat (limited to 'icetime')
-rw-r--r--icetime/Makefile6
-rw-r--r--icetime/icetime.cc27
-rw-r--r--icetime/timings.py2
3 files changed, 28 insertions, 7 deletions
diff --git a/icetime/Makefile b/icetime/Makefile
index d058153..85d31f8 100644
--- a/icetime/Makefile
+++ b/icetime/Makefile
@@ -9,7 +9,7 @@ endif
all: icetime$(EXE)
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
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
mkdir -p share/$(CHIPDB_SUBDIR)
cp $< $@
-
+share/$(CHIPDB_SUBDIR)/chipdb-5k.txt: ../icebox/chipdb-5k.txt
+ mkdir -p share/$(CHIPDB_SUBDIR)
+ cp $< $@
override LDFLAGS += --embed-file share
endif
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index 58ae3bf..176b4a0 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -231,7 +231,10 @@ void read_config()
config_device = strtok(nullptr, " \t\r\n");
} else
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;
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";
if (!strcmp(tok, ".ramt_tile"))
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
if (!strcmp(tok, ".extra_bit")) {
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")
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());
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)
{
- 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);
@@ -1884,7 +1899,7 @@ void help(const char *cmd)
printf(" -j <output_file>\n");
printf(" write timing report in json format to the file\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("\n");
printf(" -C <chipdb-file>\n");
@@ -2025,6 +2040,10 @@ int main(int argc, char **argv)
if (device_type == "lp8k" || device_type == "hx8k") {
if (config_device != "8k")
goto device_chip_mismatch;
+ } else
+ if (device_type == "up5k") {
+ if (config_device != "5k")
+ goto device_chip_mismatch;
} else {
fprintf(stderr, "Error: Invalid device type '%s'.\n", device_type.c_str());
exit(1);
diff --git a/icetime/timings.py b/icetime/timings.py
index ae1e538..43d54ae 100644
--- a/icetime/timings.py
+++ b/icetime/timings.py
@@ -41,7 +41,7 @@ def timings_to_c(chip, f):
print(" exit(1);")
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:
timings_to_c(db, f);