clangformat

This commit is contained in:
Eddie Hung 2018-07-25 17:53:01 -07:00
parent e6015dc695
commit 950f33c1bb
7 changed files with 29 additions and 37 deletions

View File

@ -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:

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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();

View File

@ -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);
} }
} }

View File

@ -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;
} }

View File

@ -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;