aboutsummaryrefslogtreecommitdiffstats
path: root/icetime/icetime.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-01-15 23:36:05 +0100
committerClifford Wolf <clifford@clifford.at>2016-01-15 23:36:05 +0100
commitfdaac3542cf01ff757fd764871df0e81f4c62a3a (patch)
tree823f7a993691bb566f87bc62d5ecf67c8be26532 /icetime/icetime.cc
parent8467e955e59616969a05e87edef88bbf6cff7662 (diff)
downloadicestorm-fdaac3542cf01ff757fd764871df0e81f4c62a3a.tar.gz
icestorm-fdaac3542cf01ff757fd764871df0e81f4c62a3a.tar.bz2
icestorm-fdaac3542cf01ff757fd764871df0e81f4c62a3a.zip
icetime progress
Diffstat (limited to 'icetime/icetime.cc')
-rw-r--r--icetime/icetime.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index e014855..8daf89d 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -28,13 +28,12 @@
#include <map>
#include <set>
-#define MAX_SPAN_HACK 1
-
// add this number of ns as estimation for clock distribution mismatch
#define GLOBAL_CLK_DIST_JITTER 0.1
FILE *fin, *fout;
bool verbose = false;
+bool max_span_hack = false;
std::string config_device, selected_package;
std::vector<std::vector<std::string>> config_tile_type;
@@ -1510,7 +1509,7 @@ struct make_interconn_worker_t
cell_log[trg] = std::make_pair(*cursor, "IoSpan4Mux");
} else {
tn = tname();
- netlist_cell_types[tn] = stringf("Span4Mux_%c%d", horiz ? 'h' : 'v', MAX_SPAN_HACK ? 4 : count_length);
+ netlist_cell_types[tn] = stringf("Span4Mux_%c%d", horiz ? 'h' : 'v', max_span_hack ? 4 : count_length);
netlist_cell_ports[tn]["I"] = seg_name(*cursor);
netlist_cell_ports[tn]["O"] = seg_name(trg);
cell_log[trg] = std::make_pair(*cursor, stringf("Span4Mux_%c%d", horiz ? 'h' : 'v', count_length));
@@ -1538,7 +1537,7 @@ struct make_interconn_worker_t
count_length = std::max(count_length, 0);
tn = tname();
- netlist_cell_types[tn] = stringf("Span12Mux_%c%d", horiz ? 'h' : 'v', MAX_SPAN_HACK ? 12 : count_length);
+ netlist_cell_types[tn] = stringf("Span12Mux_%c%d", horiz ? 'h' : 'v', max_span_hack ? 12 : count_length);
netlist_cell_ports[tn]["I"] = seg_name(*cursor);
netlist_cell_ports[tn]["O"] = seg_name(trg);
cell_log[trg] = std::make_pair(*cursor, stringf("Span12Mux_%c%d", horiz ? 'h' : 'v', count_length));
@@ -1727,6 +1726,9 @@ void help(const char *cmd)
printf(" write a graphviz description of the interconnect tree\n");
printf(" that includes the given net to 'icetime_graph.dot'.\n");
printf("\n");
+ printf(" -m\n");
+ printf(" enable max_span_hack for conservative estimates\n");
+ printf("\n");
printf(" -t\n");
printf(" print a timing estimate (based on topological timing\n");
printf(" analysis)\n");
@@ -1746,7 +1748,7 @@ int main(int argc, char **argv)
std::vector<std::string> print_timing_nets;
int opt;
- while ((opt = getopt(argc, argv, "p:P:g:tT:v")) != -1)
+ while ((opt = getopt(argc, argv, "p:P:g:mtT:v")) != -1)
{
switch (opt)
{
@@ -1760,6 +1762,9 @@ int main(int argc, char **argv)
case 'g':
graph_nets.insert(atoi(optarg));
break;
+ case 'm':
+ max_span_hack = true;
+ break;
case 't':
print_timing = true;
break;
@@ -2006,6 +2011,8 @@ int main(int argc, char **argv)
printf("==========================================\n");
printf("\n");
printf("Warning: This timing analysis report is an estimate!\n");
+ if (max_span_hack)
+ printf("Info: max_span_hack is enabled: estimate is conservative.\n");
printf("\n");
TimingAnalysis ta;