aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-12 22:04:13 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-12 22:04:13 +0200
commitb8a42ff53b1fbb6e03d169d14e58180a750f4cad (patch)
tree72920e1ca49d1520045c5df847abe227f70b2a2a
parentad60ab2ef164678cdde4410906cea674d122bf13 (diff)
downloadnextpnr-b8a42ff53b1fbb6e03d169d14e58180a750f4cad.tar.gz
nextpnr-b8a42ff53b1fbb6e03d169d14e58180a750f4cad.tar.bz2
nextpnr-b8a42ff53b1fbb6e03d169d14e58180a750f4cad.zip
Updates from clang-format
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--common/nextpnr.h49
-rw-r--r--ecp5/arch.cc10
-rw-r--r--ecp5/archdefs.h10
-rw-r--r--ecp5/main.cc10
-rw-r--r--generic/arch.cc33
-rw-r--r--generic/main.cc10
-rw-r--r--gui/basewindow.h2
-rw-r--r--gui/designwidget.cc10
-rw-r--r--gui/fpgaviewwidget.cc16
-rw-r--r--gui/fpgaviewwidget.h2
-rw-r--r--ice40/arch.cc36
-rw-r--r--ice40/archdefs.h12
-rw-r--r--ice40/bitstream.cc5
-rw-r--r--ice40/chipdb.py4
-rw-r--r--ice40/gfx.cc6
-rw-r--r--ice40/gfx.h3
-rw-r--r--ice40/main.cc10
17 files changed, 92 insertions, 136 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index 00a939a9..5e8c2362 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -268,9 +268,9 @@ struct BaseCtx
delete idstring_idx_to_str;
}
- Context *getCtx() { return reinterpret_cast<Context*>(this); }
+ Context *getCtx() { return reinterpret_cast<Context *>(this); }
- const Context *getCtx() const { return reinterpret_cast<const Context*>(this); }
+ const Context *getCtx() const { return reinterpret_cast<const Context *>(this); }
// --------------------------------------------------------------
@@ -281,35 +281,17 @@ struct BaseCtx
std::unordered_set<PipId> pipUiReload;
std::unordered_set<GroupId> groupUiReload;
- void refreshUi()
- {
- allUiReload = true;
- }
+ void refreshUi() { allUiReload = true; }
- void refreshUiFrame()
- {
- frameUiReload = true;
- }
+ void refreshUiFrame() { frameUiReload = true; }
- void refreshUiBel(BelId bel)
- {
- belUiReload.insert(bel);
- }
+ void refreshUiBel(BelId bel) { belUiReload.insert(bel); }
- void refreshUiWire(WireId wire)
- {
- wireUiReload.insert(wire);
- }
+ void refreshUiWire(WireId wire) { wireUiReload.insert(wire); }
- void refreshUiPip(PipId pip)
- {
- pipUiReload.insert(pip);
- }
+ void refreshUiPip(PipId pip) { pipUiReload.insert(pip); }
- void refreshUiGroup(GroupId group)
- {
- groupUiReload.insert(group);
- }
+ void refreshUiGroup(GroupId group) { groupUiReload.insert(group); }
};
NEXTPNR_NAMESPACE_END
@@ -330,7 +312,8 @@ struct Context : Arch
// --------------------------------------------------------------
- NPNR_DEPRECATED std::vector<GraphicElement> getFrameGraphics() const {
+ NPNR_DEPRECATED std::vector<GraphicElement> getFrameGraphics() const
+ {
std::vector<GraphicElement> ret;
DecalXY decalxy = getFrameDecal();
ret = getDecalGraphics(decalxy.decal);
@@ -343,7 +326,8 @@ struct Context : Arch
return ret;
}
- NPNR_DEPRECATED std::vector<GraphicElement> getBelGraphics(BelId bel) const {
+ NPNR_DEPRECATED std::vector<GraphicElement> getBelGraphics(BelId bel) const
+ {
std::vector<GraphicElement> ret;
DecalXY decalxy = getBelDecal(bel);
ret = getDecalGraphics(decalxy.decal);
@@ -356,7 +340,8 @@ struct Context : Arch
return ret;
}
- NPNR_DEPRECATED std::vector<GraphicElement> getWireGraphics(WireId wire) const {
+ NPNR_DEPRECATED std::vector<GraphicElement> getWireGraphics(WireId wire) const
+ {
std::vector<GraphicElement> ret;
DecalXY decalxy = getWireDecal(wire);
ret = getDecalGraphics(decalxy.decal);
@@ -369,7 +354,8 @@ struct Context : Arch
return ret;
}
- NPNR_DEPRECATED std::vector<GraphicElement> getPipGraphics(PipId pip) const {
+ NPNR_DEPRECATED std::vector<GraphicElement> getPipGraphics(PipId pip) const
+ {
std::vector<GraphicElement> ret;
DecalXY decalxy = getPipDecal(pip);
ret = getDecalGraphics(decalxy.decal);
@@ -382,7 +368,8 @@ struct Context : Arch
return ret;
}
- NPNR_DEPRECATED std::vector<GraphicElement> getGroupGraphics(GroupId group) const {
+ NPNR_DEPRECATED std::vector<GraphicElement> getGroupGraphics(GroupId group) const
+ {
std::vector<GraphicElement> ret;
DecalXY decalxy = getGroupDecal(group);
ret = getDecalGraphics(decalxy.decal);
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index ace0703e..51f4db84 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -290,15 +290,9 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
// -----------------------------------------------------------------------
-bool Arch::place()
-{
- return placer1(getCtx());
-}
+bool Arch::place() { return placer1(getCtx()); }
-bool Arch::route()
-{
- return router1(getCtx());
-}
+bool Arch::route() { return router1(getCtx()); }
// -----------------------------------------------------------------------
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h
index 797db5f7..c4d25a50 100644
--- a/ecp5/archdefs.h
+++ b/ecp5/archdefs.h
@@ -119,8 +119,14 @@ struct DecalId
Location location;
uint32_t z = 0;
- bool operator==(const DecalId &other) const { return type == other.type && location == other.location && z == other.z; }
- bool operator!=(const DecalId &other) const { return type != other.type || location != other.location || z != other.z; }
+ bool operator==(const DecalId &other) const
+ {
+ return type == other.type && location == other.location && z == other.z;
+ }
+ bool operator!=(const DecalId &other) const
+ {
+ return type != other.type || location != other.location || z != other.z;
+ }
};
NEXTPNR_NAMESPACE_END
diff --git a/ecp5/main.cc b/ecp5/main.cc
index 45774431..59403a93 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -93,18 +93,16 @@ int main(int argc, char *argv[])
}
if (vm.count("help") || argc == 1) {
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
std::cout << "\n";
std::cout << options << "\n";
return argc != 1;
}
if (vm.count("version")) {
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
return 1;
}
diff --git a/generic/arch.cc b/generic/arch.cc
index 1e1434d3..ec2443f2 100644
--- a/generic/arch.cc
+++ b/generic/arch.cc
@@ -109,25 +109,13 @@ void Arch::addBelInout(IdString bel, IdString name, IdString wire)
wires.at(wire).downhill_bel_pins.push_back(BelPin{bel, name});
}
-void Arch::addGroupBel(IdString group, IdString bel)
-{
- groups[group].bels.push_back(bel);
-}
+void Arch::addGroupBel(IdString group, IdString bel) { groups[group].bels.push_back(bel); }
-void Arch::addGroupWire(IdString group, IdString wire)
-{
- groups[group].wires.push_back(wire);
-}
+void Arch::addGroupWire(IdString group, IdString wire) { groups[group].wires.push_back(wire); }
-void Arch::addGroupPip(IdString group, IdString pip)
-{
- groups[group].pips.push_back(pip);
-}
+void Arch::addGroupPip(IdString group, IdString pip) { groups[group].pips.push_back(pip); }
-void Arch::addGroupGroup(IdString group, IdString grp)
-{
- groups[group].groups.push_back(grp);
-}
+void Arch::addGroupGroup(IdString group, IdString grp) { groups[group].groups.push_back(grp); }
void Arch::addDecalGraphic(DecalId decal, const GraphicElement &graphic)
{
@@ -330,7 +318,8 @@ GroupId Arch::getGroupByName(IdString name) const { return name; }
IdString Arch::getGroupName(GroupId group) const { return group; }
-std::vector<GroupId> Arch::getGroups() const {
+std::vector<GroupId> Arch::getGroups() const
+{
std::vector<GroupId> ret;
for (auto &it : groups)
ret.push_back(it.first);
@@ -365,15 +354,9 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
// ---------------------------------------------------------------
-bool Arch::place()
-{
- return placer1(getCtx());
-}
+bool Arch::place() { return placer1(getCtx()); }
-bool Arch::route()
-{
- return router1(getCtx());
-}
+bool Arch::route() { return router1(getCtx()); }
// ---------------------------------------------------------------
diff --git a/generic/main.cc b/generic/main.cc
index d025d8d4..6f4774d1 100644
--- a/generic/main.cc
+++ b/generic/main.cc
@@ -75,18 +75,16 @@ int main(int argc, char *argv[])
}
if (vm.count("help") || argc == 1) {
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
std::cout << "\n";
std::cout << options << "\n";
return argc != 1;
}
if (vm.count("version")) {
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
return 1;
}
diff --git a/gui/basewindow.h b/gui/basewindow.h
index c98a0356..ef3dcb95 100644
--- a/gui/basewindow.h
+++ b/gui/basewindow.h
@@ -26,10 +26,10 @@
#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
+#include <QProgressBar>
#include <QStatusBar>
#include <QTabWidget>
#include <QToolBar>
-#include <QProgressBar>
Q_DECLARE_METATYPE(std::string)
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index 14de974e..110cf1b7 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -91,7 +91,7 @@ DesignWidget::DesignWidget(QWidget *parent) : QWidget(parent), ctx(nullptr), net
propertyEditor->show();
const QIcon searchIcon(":/icons/resources/zoom.png");
- QLineEdit* lineEdit = new QLineEdit();
+ QLineEdit *lineEdit = new QLineEdit();
lineEdit->setClearButtonEnabled(true);
lineEdit->addAction(searchIcon, QLineEdit::LeadingPosition);
lineEdit->setPlaceholderText("Search...");
@@ -139,17 +139,17 @@ DesignWidget::DesignWidget(QWidget *parent) : QWidget(parent), ctx(nullptr), net
hbox->addWidget(toolbar);
QWidget *btmWidget = new QWidget();
-
+
QVBoxLayout *vbox2 = new QVBoxLayout();
- btmWidget->setLayout(vbox2);
+ btmWidget->setLayout(vbox2);
vbox2->setSpacing(0);
vbox2->setContentsMargins(0, 0, 0, 0);
vbox2->addWidget(toolbarWidget);
vbox2->addWidget(propertyEditor);
QSplitter *splitter = new QSplitter(Qt::Vertical);
- splitter->addWidget(topWidget);
- splitter->addWidget(btmWidget);
+ splitter->addWidget(topWidget);
+ splitter->addWidget(btmWidget);
QGridLayout *mainLayout = new QGridLayout();
mainLayout->setSpacing(0);
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc
index edb3aca8..1b105b98 100644
--- a/gui/fpgaviewwidget.cc
+++ b/gui/fpgaviewwidget.cc
@@ -240,8 +240,7 @@ void LineShader::draw(const LineShaderData &line, const QMatrix4x4 &projection)
vao_.release();
}
-FPGAViewWidget::FPGAViewWidget(QWidget *parent)
- : QOpenGLWidget(parent), lineShader_(this), zoom_(500.f), ctx_(nullptr)
+FPGAViewWidget::FPGAViewWidget(QWidget *parent) : QOpenGLWidget(parent), lineShader_(this), zoom_(500.f), ctx_(nullptr)
{
backgroundColor = QColor("#ffffff");
gridColor = QColor("#ddd");
@@ -284,7 +283,7 @@ void FPGAViewWidget::initializeGL()
log_error("Could not compile shader.\n");
}
initializeOpenGLFunctions();
- glClearColor(backgroundColor.red()/255, backgroundColor.green()/255, backgroundColor.blue()/255, 0.0);
+ glClearColor(backgroundColor.red() / 255, backgroundColor.green() / 255, backgroundColor.blue() / 255, 0.0);
}
void FPGAViewWidget::drawElement(LineShaderData &out, const GraphicElement &el)
@@ -311,7 +310,7 @@ QMatrix4x4 FPGAViewWidget::getProjection(void)
QMatrix4x4 matrix;
const float aspect = float(width()) / float(height());
- matrix.perspective(3.14/2, aspect, zoomNear_, zoomFar_);
+ matrix.perspective(3.14 / 2, aspect, zoomNear_, zoomFar_);
matrix.translate(0.0f, 0.0f, -zoom_);
return matrix;
}
@@ -391,10 +390,7 @@ void FPGAViewWidget::paintGL()
void FPGAViewWidget::resizeGL(int width, int height) {}
-void FPGAViewWidget::mousePressEvent(QMouseEvent *event)
-{
- lastPos_ = event->pos();
-}
+void FPGAViewWidget::mousePressEvent(QMouseEvent *event) { lastPos_ = event->pos(); }
// Invert the projection matrix to calculate screen/mouse to world/grid
// coordinates.
@@ -403,8 +399,8 @@ QVector4D FPGAViewWidget::mouseToWorldCoordinates(int x, int y)
QMatrix4x4 p = getProjection();
QVector2D unit = p.map(QVector4D(1, 1, 0, 1)).toVector2DAffine();
- float sx = (((float)x) / (width()/2));
- float sy = (((float)y) / (height()/2));
+ float sx = (((float)x) / (width() / 2));
+ float sy = (((float)y) / (height() / 2));
return QVector4D(sx / unit.x(), sy / unit.y(), 0, 1);
}
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h
index 526c6199..a2495f4e 100644
--- a/gui/fpgaviewwidget.h
+++ b/gui/fpgaviewwidget.h
@@ -258,7 +258,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
QMatrix4x4 getProjection(void);
QVector4D mouseToWorldCoordinates(int x, int y);
- const float zoomNear_ = 1.0f; // do not zoom closer than this
+ const float zoomNear_ = 1.0f; // do not zoom closer than this
const float zoomFar_ = 10000.0f; // do not zoom further than this
const float zoomLvl1_ = 100.0f;
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 8650aeff..786bf686 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -19,12 +19,12 @@
#include <algorithm>
#include <cmath>
+#include "gfx.h"
#include "log.h"
#include "nextpnr.h"
#include "placer1.h"
#include "router1.h"
#include "util.h"
-#include "gfx.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -380,10 +380,7 @@ GroupId Arch::getGroupByName(IdString name) const
return GroupId();
}
-IdString Arch::getGroupName(GroupId group) const
-{
- return IdString();
-}
+IdString Arch::getGroupName(GroupId group) const { return IdString(); }
std::vector<GroupId> Arch::getGroups() const
{
@@ -448,15 +445,9 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
// -----------------------------------------------------------------------
-bool Arch::place()
-{
- return placer1(getCtx());
-}
+bool Arch::place() { return placer1(getCtx()); }
-bool Arch::route()
-{
- return router1(getCtx());
-}
+bool Arch::route() { return router1(getCtx()); }
// -----------------------------------------------------------------------
@@ -499,8 +490,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
{
std::vector<GraphicElement> ret;
- if (decal.type == DecalId::TYPE_FRAME)
- {
+ if (decal.type == DecalId::TYPE_FRAME) {
for (int x = 0; x <= chip_info->width; x++)
for (int y = 0; y <= chip_info->height; y++) {
GraphicElement el;
@@ -512,23 +502,21 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
}
}
- if (decal.type == DecalId::TYPE_WIRE)
- {
+ if (decal.type == DecalId::TYPE_WIRE) {
WireId wire;
wire.index = decal.index;
int n = chip_info->wire_data[wire.index].num_segments;
const WireSegmentPOD *p = chip_info->wire_data[wire.index].segments.get();
- GraphicElement::style_t style = wire_to_net.at(wire.index) != IdString() ?
- GraphicElement::G_ACTIVE : GraphicElement::G_INACTIVE;
+ GraphicElement::style_t style =
+ wire_to_net.at(wire.index) != IdString() ? GraphicElement::G_ACTIVE : GraphicElement::G_INACTIVE;
for (int i = 0; i < n; i++)
gfxTileWire(ret, p[i].x, p[i].y, GfxTileWireId(p[i].index), style);
}
- if (decal.type == DecalId::TYPE_BEL)
- {
+ if (decal.type == DecalId::TYPE_BEL) {
BelId bel;
bel.index = decal.index;
@@ -540,8 +528,10 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
el.style = bel_to_cell.at(bel.index) != IdString() ? GraphicElement::G_ACTIVE : GraphicElement::G_INACTIVE;
el.x1 = chip_info->bel_data[bel.index].x + logic_cell_x1;
el.x2 = chip_info->bel_data[bel.index].x + logic_cell_x2;
- el.y1 = chip_info->bel_data[bel.index].y + logic_cell_y1 + (chip_info->bel_data[bel.index].z) * logic_cell_pitch;
- el.y2 = chip_info->bel_data[bel.index].y + logic_cell_y2 + (chip_info->bel_data[bel.index].z) * logic_cell_pitch;
+ el.y1 = chip_info->bel_data[bel.index].y + logic_cell_y1 +
+ (chip_info->bel_data[bel.index].z) * logic_cell_pitch;
+ el.y2 = chip_info->bel_data[bel.index].y + logic_cell_y2 +
+ (chip_info->bel_data[bel.index].z) * logic_cell_pitch;
el.z = 0;
ret.push_back(el);
diff --git a/ice40/archdefs.h b/ice40/archdefs.h
index 62c248c7..3252dabf 100644
--- a/ice40/archdefs.h
+++ b/ice40/archdefs.h
@@ -111,7 +111,8 @@ struct PipId
struct GroupId
{
- enum : int8_t {
+ enum : int8_t
+ {
TYPE_NONE,
TYPE_FRAME,
TYPE_MAIN_SW,
@@ -133,7 +134,8 @@ struct GroupId
struct DecalId
{
- enum : int8_t {
+ enum : int8_t
+ {
TYPE_NONE,
TYPE_FRAME,
TYPE_BEL,
@@ -178,7 +180,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PortPin> : hash<int>
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX GroupId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX GroupId &group) const noexcept {
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX GroupId &group) const noexcept
+ {
std::size_t seed = 0;
boost::hash_combine(seed, hash<int>()(group.type));
boost::hash_combine(seed, hash<int>()(group.x));
@@ -189,7 +192,8 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX GroupId>
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId>
{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DecalId &decal) const noexcept {
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DecalId &decal) const noexcept
+ {
std::size_t seed = 0;
boost::hash_combine(seed, hash<int>()(decal.type));
boost::hash_combine(seed, hash<int>()(decal.index));
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index 98a7a0e4..a62c6c09 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -341,9 +341,8 @@ void write_asc(const Context *ctx, std::ostream &out)
set_config(ti, config.at(y).at(x),
"Cascade.IPCON_LC0" + std::to_string(lc_idx) + "_inmux02_5", true);
else
- set_config(ti, config.at(y).at(x),
- "Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) + "_LC0" +
- std::to_string(lc_idx) + "_inmux02_5",
+ set_config(ti, config.at(y).at(x), "Cascade.MULT" + std::to_string(int(tile - TILE_DSP0)) +
+ "_LC0" + std::to_string(lc_idx) + "_inmux02_5",
true);
}
}
diff --git a/ice40/chipdb.py b/ice40/chipdb.py
index 97bc3183..f52a2283 100644
--- a/ice40/chipdb.py
+++ b/ice40/chipdb.py
@@ -73,10 +73,12 @@ with open(args.portspins) as f:
with open(args.gfxh) as f:
state = 0
for line in f:
- if state == 0 and line.startswith("enum GfxTileWireId "):
+ if state == 0 and line.startswith("enum GfxTileWireId"):
state = 1
elif state == 1 and line.startswith("};"):
state = 0
+ elif state == 1 and line.startswith("{"):
+ pass
elif state == 1:
idx = len(gfx_wire_ids)
name = line.strip().rstrip(",")
diff --git a/ice40/gfx.cc b/ice40/gfx.cc
index d6935b7d..f4941750 100644
--- a/ice40/gfx.cc
+++ b/ice40/gfx.cc
@@ -333,7 +333,7 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id,
// LC Inputs
- if (id >= TILE_WIRE_LUTFF_0_IN_0 && id <= TILE_WIRE_LUTFF_7_IN_3) {
+ if (id >= TILE_WIRE_LUTFF_0_IN_0 && id <= TILE_WIRE_LUTFF_7_IN_3) {
int idx = id - TILE_WIRE_LUTFF_0_IN_0;
int z = idx / 4;
int input = idx % 4;
@@ -354,7 +354,7 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id,
el.y1 = y1;
el.y2 = y1;
el.x1 = x + main_swbox_x2;
- el.x2 = x + 0.97 + 0.0025 * (7-idx);
+ el.x2 = x + 0.97 + 0.0025 * (7 - idx);
g.push_back(el);
el.y1 = y1;
@@ -386,7 +386,7 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId id,
el.x1 = el.x2;
g.push_back(el);
- for (int i = 0; i < 7; i ++) {
+ for (int i = 0; i < 7; i++) {
el.y1 = y + logic_cell_y2 + i * logic_cell_pitch;
el.y2 = y + logic_cell_y1 + (i + 1) * logic_cell_pitch;
g.push_back(el);
diff --git a/ice40/gfx.h b/ice40/gfx.h
index aa07c2fa..a65f7683 100644
--- a/ice40/gfx.h
+++ b/ice40/gfx.h
@@ -40,7 +40,8 @@ const float logic_cell_y1 = 0.05;
const float logic_cell_y2 = 0.10;
const float logic_cell_pitch = 0.0625;
-enum GfxTileWireId {
+enum GfxTileWireId
+{
TILE_WIRE_GLB2LOCAL_0,
TILE_WIRE_GLB2LOCAL_1,
TILE_WIRE_GLB2LOCAL_2,
diff --git a/ice40/main.cc b/ice40/main.cc
index 2427ea6c..5fa58921 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -128,18 +128,16 @@ int main(int argc, char *argv[])
if (vm.count("help") || argc == 1) {
help:
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
std::cout << "\n";
std::cout << options << "\n";
return argc != 1;
}
if (vm.count("version")) {
- std::cout << boost::filesystem::basename(argv[0])
- << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
return 1;
}