Merge remote-tracking branch 'origin/master' into redist_slack
This commit is contained in:
commit
a21cc4dd5b
12
bba/main.cc
12
bba/main.cc
@ -276,13 +276,13 @@ int main(int argc, char **argv)
|
|||||||
case 4:
|
case 4:
|
||||||
data[cursor++] = value >> 24;
|
data[cursor++] = value >> 24;
|
||||||
data[cursor++] = value >> 16;
|
data[cursor++] = value >> 16;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 2:
|
case 2:
|
||||||
data[cursor++] = value >> 8;
|
data[cursor++] = value >> 8;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 1:
|
case 1:
|
||||||
data[cursor++] = value;
|
data[cursor++] = value;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -293,13 +293,13 @@ int main(int argc, char **argv)
|
|||||||
case 4:
|
case 4:
|
||||||
data[cursor + 3] = value >> 24;
|
data[cursor + 3] = value >> 24;
|
||||||
data[cursor + 2] = value >> 16;
|
data[cursor + 2] = value >> 16;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 2:
|
case 2:
|
||||||
data[cursor + 1] = value >> 8;
|
data[cursor + 1] = value >> 8;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 1:
|
case 1:
|
||||||
data[cursor] = value;
|
data[cursor] = value;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
10
ecp5/main.cc
10
ecp5/main.cc
@ -100,18 +100,16 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("help") || argc == 1) {
|
if (vm.count("help") || argc == 1) {
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
std::cout << options << "\n";
|
std::cout << options << "\n";
|
||||||
return argc != 1;
|
return argc != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("version")) {
|
if (vm.count("version")) {
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,18 +75,16 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("help") || argc == 1) {
|
if (vm.count("help") || argc == 1) {
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
std::cout << options << "\n";
|
std::cout << options << "\n";
|
||||||
return argc != 1;
|
return argc != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("version")) {
|
if (vm.count("version")) {
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ void DesignWidget::newContext(Context *ctx)
|
|||||||
pip_root->setText(0, "Pips");
|
pip_root->setText(0, "Pips");
|
||||||
pip_root->setFlags(pip_root->flags() & ~Qt::ItemIsSelectable);
|
pip_root->setFlags(pip_root->flags() & ~Qt::ItemIsSelectable);
|
||||||
treeWidget->insertTopLevelItem(0, pip_root);
|
treeWidget->insertTopLevelItem(0, pip_root);
|
||||||
#ifndef ARCH_ECP5
|
#ifndef ARCH_ECP5
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
for (auto pip : ctx->getPips()) {
|
for (auto pip : ctx->getPips()) {
|
||||||
auto id = ctx->getPipName(pip);
|
auto id = ctx->getPipName(pip);
|
||||||
@ -346,7 +346,7 @@ void DesignWidget::newContext(Context *ctx)
|
|||||||
for (auto pip : nameToItem[2].toStdMap()) {
|
for (auto pip : nameToItem[2].toStdMap()) {
|
||||||
pip_root->addChild(pip.second);
|
pip_root->addChild(pip.second);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nets_root = new QTreeWidgetItem(treeWidget);
|
nets_root = new QTreeWidgetItem(treeWidget);
|
||||||
nets_root->setText(0, "Nets");
|
nets_root->setText(0, "Nets");
|
||||||
@ -512,8 +512,7 @@ void DesignWidget::onItemSelectionChanged()
|
|||||||
if (treeWidget->selectedItems().size() == 0)
|
if (treeWidget->selectedItems().size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (treeWidget->selectedItems().size() > 1)
|
if (treeWidget->selectedItems().size() > 1) {
|
||||||
{
|
|
||||||
std::vector<DecalXY> decals;
|
std::vector<DecalXY> decals;
|
||||||
for (auto clickItem : treeWidget->selectedItems()) {
|
for (auto clickItem : treeWidget->selectedItems()) {
|
||||||
IdString value = static_cast<IdStringTreeItem *>(clickItem)->getData();
|
IdString value = static_cast<IdStringTreeItem *>(clickItem)->getData();
|
||||||
|
@ -188,6 +188,13 @@ Arch::Arch(ArchArgs args) : args(args)
|
|||||||
id_i3 = id("I3");
|
id_i3 = id("I3");
|
||||||
id_dff_en = id("DFF_ENABLE");
|
id_dff_en = id("DFF_ENABLE");
|
||||||
id_neg_clk = id("NEG_CLK");
|
id_neg_clk = id("NEG_CLK");
|
||||||
|
id_cin = id("CIN");
|
||||||
|
id_cout = id("COUT");
|
||||||
|
id_o = id("O");
|
||||||
|
id_lo = id("LO");
|
||||||
|
id_icestorm_ram = id("ICESTORM_RAM");
|
||||||
|
id_rclk = id("RCLK");
|
||||||
|
id_wclk = id("WCLK");
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@ -702,26 +709,26 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
|||||||
|
|
||||||
bool Arch::getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort, delay_t &delay) const
|
bool Arch::getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort, delay_t &delay) const
|
||||||
{
|
{
|
||||||
if (cell->type == id("ICESTORM_LC")) {
|
if (cell->type == id_icestorm_lc) {
|
||||||
if ((fromPort == id("I0") || fromPort == id("I1") || fromPort == id("I2") || fromPort == id("I3")) &&
|
if ((fromPort == id_i0 || fromPort == id_i1 || fromPort == id_i2 || fromPort == id_i3) &&
|
||||||
(toPort == id("O") || toPort == id("LO"))) {
|
(toPort == id_o || toPort == id_lo)) {
|
||||||
delay = 450;
|
delay = 450;
|
||||||
return true;
|
return true;
|
||||||
} else if (fromPort == id("CIN") && toPort == id("COUT")) {
|
} else if (fromPort == id_cin && toPort == id_cout) {
|
||||||
delay = 120;
|
delay = 120;
|
||||||
return true;
|
return true;
|
||||||
} else if (fromPort == id("I1") && toPort == id("COUT")) {
|
} else if (fromPort == id_i1 && toPort == id_cout) {
|
||||||
delay = 260;
|
delay = 260;
|
||||||
return true;
|
return true;
|
||||||
} else if (fromPort == id("I2") && toPort == id("COUT")) {
|
} else if (fromPort == id_i2 && toPort == id_cout) {
|
||||||
delay = 230;
|
delay = 230;
|
||||||
return true;
|
return true;
|
||||||
} else if (fromPort == id("CLK") && toPort == id("O")) {
|
} else if (fromPort == id_clk && toPort == id_o) {
|
||||||
delay = 540;
|
delay = 540;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (cell->type == id("ICESTORM_RAM")) {
|
} else if (cell->type == id_icestorm_ram) {
|
||||||
if (fromPort == id("RCLK")) {
|
if (fromPort == id_rclk) {
|
||||||
delay = 2140;
|
delay = 2140;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -731,14 +738,14 @@ bool Arch::getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort
|
|||||||
|
|
||||||
IdString Arch::getPortClock(const CellInfo *cell, IdString port) const
|
IdString Arch::getPortClock(const CellInfo *cell, IdString port) const
|
||||||
{
|
{
|
||||||
if (cell->type == id("ICESTORM_LC") && bool_or_default(cell->params, id("DFF_ENABLE"))) {
|
if (cell->type == id_icestorm_lc && cell->lcInfo.dffEnable) {
|
||||||
if (port != id("LO") && port != id("CIN") && port != id("COUT"))
|
if (port != id_lo && port != id_cin && port != id_cout)
|
||||||
return id("CLK");
|
return id_clk;
|
||||||
} else if (cell->type == id("ICESTORM_RAM")) {
|
} else if (cell->type == id_icestorm_ram) {
|
||||||
if (port.str(this)[0] == 'R')
|
if (port.str(this)[0] == 'R')
|
||||||
return id("RCLK");
|
return id_rclk;
|
||||||
else
|
else
|
||||||
return id("WCLK");
|
return id_wclk;
|
||||||
}
|
}
|
||||||
return IdString();
|
return IdString();
|
||||||
}
|
}
|
||||||
|
@ -740,6 +740,9 @@ struct Arch : BaseCtx
|
|||||||
IdString id_cen, id_clk, id_sr;
|
IdString id_cen, id_clk, id_sr;
|
||||||
IdString id_i0, id_i1, id_i2, id_i3;
|
IdString id_i0, id_i1, id_i2, id_i3;
|
||||||
IdString id_dff_en, id_neg_clk;
|
IdString id_dff_en, id_neg_clk;
|
||||||
|
IdString id_cin, id_cout;
|
||||||
|
IdString id_o, id_lo;
|
||||||
|
IdString id_icestorm_ram, id_rclk, id_wclk;
|
||||||
|
|
||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
BelPin getIOBSharingPLLPin(BelId pll, PortPin pll_pin) const
|
BelPin getIOBSharingPLLPin(BelId pll, PortPin pll_pin) const
|
||||||
|
@ -566,9 +566,8 @@ void write_asc(const Context *ctx, std::ostream &out)
|
|||||||
set_config(ti, config.at(y).at(x),
|
set_config(ti, config.at(y).at(x),
|
||||||
"Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5", true);
|
"Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5", true);
|
||||||
else
|
else
|
||||||
set_config(ti, config.at(y).at(x),
|
set_config(ti, config.at(y).at(x), "Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) +
|
||||||
"Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) + "_LC0" +
|
"_LC0" + std::to_string(lc_idx) + "_inmux02_5",
|
||||||
std::to_string(lc_idx) + "_inmux02_5",
|
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,18 +144,16 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
if (vm.count("help") || argc == 1) {
|
if (vm.count("help") || argc == 1) {
|
||||||
help:
|
help:
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
std::cout << options << "\n";
|
std::cout << options << "\n";
|
||||||
return argc != 1;
|
return argc != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("version")) {
|
if (vm.count("version")) {
|
||||||
std::cout << boost::filesystem::basename(argv[0])
|
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||||
<< " -- Next Generation Place and Route (git "
|
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -662,12 +662,12 @@ static void pack_special(Context *ctx)
|
|||||||
|
|
||||||
auto feedback_path = packed->params[ctx->id("FEEDBACK_PATH")];
|
auto feedback_path = packed->params[ctx->id("FEEDBACK_PATH")];
|
||||||
packed->params[ctx->id("FEEDBACK_PATH")] =
|
packed->params[ctx->id("FEEDBACK_PATH")] =
|
||||||
feedback_path == "DELAY"
|
feedback_path == "DELAY" ? "0" : feedback_path == "SIMPLE"
|
||||||
? "0"
|
? "1"
|
||||||
: feedback_path == "SIMPLE" ? "1"
|
: feedback_path == "PHASE_AND_DELAY"
|
||||||
: feedback_path == "PHASE_AND_DELAY"
|
? "2"
|
||||||
? "2"
|
: feedback_path == "EXTERNAL" ? "6"
|
||||||
: feedback_path == "EXTERNAL" ? "6" : feedback_path;
|
: feedback_path;
|
||||||
packed->params[ctx->id("PLLTYPE")] = std::to_string(sb_pll40_type(ctx, ci));
|
packed->params[ctx->id("PLLTYPE")] = std::to_string(sb_pll40_type(ctx, ci));
|
||||||
|
|
||||||
NetInfo *pad_packagepin_net = nullptr;
|
NetInfo *pad_packagepin_net = nullptr;
|
||||||
|
@ -90,21 +90,20 @@ static int get_cell_evilness(const Context *ctx, const CellInfo *cell)
|
|||||||
// This returns how "evil" a logic cell is, and thus how likely it is to be ripped up
|
// This returns how "evil" a logic cell is, and thus how likely it is to be ripped up
|
||||||
// during logic tile legalisation
|
// during logic tile legalisation
|
||||||
int score = 0;
|
int score = 0;
|
||||||
if (get_net_or_empty(cell, ctx->id("I0")))
|
if (get_net_or_empty(cell, ctx->id_i0))
|
||||||
++score;
|
++score;
|
||||||
if (get_net_or_empty(cell, ctx->id("I1")))
|
if (get_net_or_empty(cell, ctx->id_i1))
|
||||||
++score;
|
++score;
|
||||||
if (get_net_or_empty(cell, ctx->id("I2")))
|
if (get_net_or_empty(cell, ctx->id_i2))
|
||||||
++score;
|
++score;
|
||||||
if (get_net_or_empty(cell, ctx->id("I3")))
|
if (get_net_or_empty(cell, ctx->id_i3))
|
||||||
++score;
|
++score;
|
||||||
if (bool_or_default(cell->params, ctx->id("DFF_ENABLE"))) {
|
if (cell->lcInfo.dffEnable) {
|
||||||
const NetInfo *cen = get_net_or_empty(cell, ctx->id("CEN")), *sr = get_net_or_empty(cell, ctx->id("SR"));
|
if (cell->lcInfo.cen)
|
||||||
if (cen)
|
|
||||||
score += 10;
|
score += 10;
|
||||||
if (sr)
|
if (cell->lcInfo.sr)
|
||||||
score += 10;
|
score += 10;
|
||||||
if (bool_or_default(cell->params, ctx->id("NEG_CLK")))
|
if (cell->lcInfo.negClk)
|
||||||
score += 5;
|
score += 5;
|
||||||
}
|
}
|
||||||
return score;
|
return score;
|
||||||
|
Loading…
Reference in New Issue
Block a user