From 8df72a1f3454da1d16059f465a6d205b9337dd1a Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 4 Nov 2018 14:13:53 +0000 Subject: [PATCH 1/3] ice40: Fix SPRAM and IO globals Signed-off-by: David Shah --- ice40/cells.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ice40/cells.cc b/ice40/cells.cc index 76e67ab7..fbb77b0c 100644 --- a/ice40/cells.cc +++ b/ice40/cells.cc @@ -383,6 +383,10 @@ bool is_clock_port(const BaseCtx *ctx, const PortRef &port) port.port == ctx->id("WCLKN"); if (is_sb_mac16(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_DSP")) return port.port == ctx->id("CLK"); + if (is_sb_spram(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_SPRAM")) + return port.port == id_CLOCK; + if (is_sb_io(ctx, port.cell)) + return port.port == id_INPUT_CLK || port.port == id_OUTPUT_CLK; return false; } From 636a03d71ea925b141a1aacf3a96da8cc933bdf3 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 5 Nov 2018 08:56:01 +0100 Subject: [PATCH 2/3] Fix method override in gui --- gui/ecp5/mainwindow.h | 2 +- gui/generic/mainwindow.h | 2 +- gui/ice40/mainwindow.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/ecp5/mainwindow.h b/gui/ecp5/mainwindow.h index f67f7a81..721c6c0b 100644 --- a/gui/ecp5/mainwindow.h +++ b/gui/ecp5/mainwindow.h @@ -43,7 +43,7 @@ class MainWindow : public BaseMainWindow void onProjectLoaded() override; protected Q_SLOTS: - virtual void new_proj(); + void new_proj() override; void newContext(Context *ctx); void open_lpf(); void open_base(); diff --git a/gui/generic/mainwindow.h b/gui/generic/mainwindow.h index a4ce9958..bb6a4cf1 100644 --- a/gui/generic/mainwindow.h +++ b/gui/generic/mainwindow.h @@ -36,7 +36,7 @@ class MainWindow : public BaseMainWindow void createMenu(); protected Q_SLOTS: - virtual void new_proj(); + void new_proj() override; void newContext(Context *ctx); }; diff --git a/gui/ice40/mainwindow.h b/gui/ice40/mainwindow.h index bb8ed75f..4a9a7d8e 100644 --- a/gui/ice40/mainwindow.h +++ b/gui/ice40/mainwindow.h @@ -44,7 +44,7 @@ class MainWindow : public BaseMainWindow void onProjectLoaded() override; protected Q_SLOTS: - virtual void new_proj(); + void new_proj() override; void open_pcf(); void save_asc(); From 8258586c7db3989a9c7f615b2f273142ba5f22d5 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 8 Nov 2018 16:21:31 -0800 Subject: [PATCH 3/3] [common] placer to produce error when >1 cell->bel constraint --- common/placer1.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/placer1.cc b/common/placer1.cc index 01f822a5..0d7c0701 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -118,6 +118,12 @@ class SAPlacer loc_name.c_str(), bel_type.c_str(ctx), cell->name.c_str(ctx), cell->type.c_str(ctx)); } + auto bound_cell = ctx->getBoundBelCell(bel); + if (bound_cell) { + log_error("Cell \'%s\' cannot be bound to bel \'%s\' since it is already bound to cell \'%s\'\n", + cell->name.c_str(ctx), loc_name.c_str(), bound_cell->name.c_str(ctx)); + } + ctx->bindBel(bel, cell, STRENGTH_USER); locked_bels.insert(bel); placed_cells++;