This commit is contained in:
Eddie Hung 2018-11-09 17:07:58 -08:00
commit c67f1091ca
5 changed files with 13 additions and 3 deletions

View File

@ -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)); 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); ctx->bindBel(bel, cell, STRENGTH_USER);
locked_bels.insert(bel); locked_bels.insert(bel);
placed_cells++; placed_cells++;

View File

@ -43,7 +43,7 @@ class MainWindow : public BaseMainWindow
void onProjectLoaded() override; void onProjectLoaded() override;
protected Q_SLOTS: protected Q_SLOTS:
virtual void new_proj(); void new_proj() override;
void newContext(Context *ctx); void newContext(Context *ctx);
void open_lpf(); void open_lpf();
void open_base(); void open_base();

View File

@ -36,7 +36,7 @@ class MainWindow : public BaseMainWindow
void createMenu(); void createMenu();
protected Q_SLOTS: protected Q_SLOTS:
virtual void new_proj(); void new_proj() override;
void newContext(Context *ctx); void newContext(Context *ctx);
}; };

View File

@ -44,7 +44,7 @@ class MainWindow : public BaseMainWindow
void onProjectLoaded() override; void onProjectLoaded() override;
protected Q_SLOTS: protected Q_SLOTS:
virtual void new_proj(); void new_proj() override;
void open_pcf(); void open_pcf();
void save_asc(); void save_asc();

View File

@ -383,6 +383,10 @@ bool is_clock_port(const BaseCtx *ctx, const PortRef &port)
port.port == ctx->id("WCLKN"); port.port == ctx->id("WCLKN");
if (is_sb_mac16(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_DSP")) if (is_sb_mac16(ctx, port.cell) || port.cell->type == ctx->id("ICESTORM_DSP"))
return port.port == ctx->id("CLK"); 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; return false;
} }