aboutsummaryrefslogtreecommitdiffstats
path: root/dummy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-07 12:56:49 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-07 12:56:49 +0200
commit1ea8fa488127c63e119b07b05ec1c468e820db9c (patch)
treecb40a97c46580e62203ce44ae9bf0d1ce578730c /dummy
parent2edde06c07cc3cd58ab156d9598d75e1cff1e7de (diff)
downloadnextpnr-1ea8fa488127c63e119b07b05ec1c468e820db9c.tar.gz
nextpnr-1ea8fa488127c63e119b07b05ec1c468e820db9c.tar.bz2
nextpnr-1ea8fa488127c63e119b07b05ec1c468e820db9c.zip
clang-format for design and chip codebase
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'dummy')
-rw-r--r--dummy/chip.cc4
-rw-r--r--dummy/chip.h94
2 files changed, 48 insertions, 50 deletions
diff --git a/dummy/chip.cc b/dummy/chip.cc
index 51a6a840..642984ca 100644
--- a/dummy/chip.cc
+++ b/dummy/chip.cc
@@ -19,6 +19,4 @@
#include "chip.h"
-Chip::Chip(ChipArgs)
-{
-}
+Chip::Chip(ChipArgs) {}
diff --git a/dummy/chip.h b/dummy/chip.h
index 054e822b..8c66fb96 100644
--- a/dummy/chip.h
+++ b/dummy/chip.h
@@ -24,10 +24,10 @@
struct DelayInfo
{
- float delay = 0;
+ float delay = 0;
- float raiseDelay() { return delay; }
- float fallDelay() { return delay; }
+ float raiseDelay() { return delay; }
+ float fallDelay() { return delay; }
};
typedef IdString BelType;
@@ -45,8 +45,8 @@ typedef IdString PipId;
struct BelPin
{
- BelId bel;
- PortPin pin;
+ BelId bel;
+ PortPin pin;
};
struct ChipArgs
@@ -55,48 +55,48 @@ struct ChipArgs
struct Chip
{
- Chip(ChipArgs args);
-
- BelId getBelByName(IdString name) const;
-
- IdString getBelName(BelId bel) const;
- void bindBel(BelId bel, IdString cell);
- void unbindBel(BelId bel);
- bool checkBelAvail(BelId bel) const;
- const vector<BelId> &getBels() const;
- const vector<BelId> &getBelsByType(BelType type) const;
- BelType getBelType(BelId bel) const;
- WireId getWireBelPin(BelId bel, PortPin pin) const;
- BelPin getBelPinUphill(WireId wire) const;
- const vector<BelPin> &getBelPinsDownhill(WireId wire) const;
-
- WireId getWireByName(IdString name) const;
- IdString getWireName(WireId wire) const;
- void bindWire(WireId bel, IdString net);
- void unbindWire(WireId bel);
- bool checkWireAvail(WireId bel) const;
- const vector<WireId> &getWires() const;
-
- PipId getPipByName(IdString name) const;
- IdString getPipName(PipId pip) const;
- void bindPip(PipId bel, IdString net);
- void unbindPip(PipId bel);
- bool checkPipAvail(PipId bel) const;
- const vector<PipId> &getPips() const;
- WireId getPipSrcWire(PipId pip) const;
- WireId getPipDstWire(PipId pip) const;
- DelayInfo getPipDelay(PipId pip) const;
- const vector<PipId> &getPipsDownhill(WireId wire) const;
- const vector<PipId> &getPipsUphill(WireId wire) const;
- const vector<PipId> &getWireAliases(WireId wire) const;
-
- void getBelPosition(BelId bel, float &x, float &y) const;
- void getWirePosition(WireId wire, float &x, float &y) const;
- void getPipPosition(PipId pip, float &x, float &y) const;
- vector<GraphicElement> getBelGraphics(BelId bel) const;
- vector<GraphicElement> getWireGraphics(WireId wire) const;
- vector<GraphicElement> getPipGraphics(PipId pip) const;
- vector<GraphicElement> getFrameGraphics() const;
+ Chip(ChipArgs args);
+
+ BelId getBelByName(IdString name) const;
+
+ IdString getBelName(BelId bel) const;
+ void bindBel(BelId bel, IdString cell);
+ void unbindBel(BelId bel);
+ bool checkBelAvail(BelId bel) const;
+ const vector<BelId> &getBels() const;
+ const vector<BelId> &getBelsByType(BelType type) const;
+ BelType getBelType(BelId bel) const;
+ WireId getWireBelPin(BelId bel, PortPin pin) const;
+ BelPin getBelPinUphill(WireId wire) const;
+ const vector<BelPin> &getBelPinsDownhill(WireId wire) const;
+
+ WireId getWireByName(IdString name) const;
+ IdString getWireName(WireId wire) const;
+ void bindWire(WireId bel, IdString net);
+ void unbindWire(WireId bel);
+ bool checkWireAvail(WireId bel) const;
+ const vector<WireId> &getWires() const;
+
+ PipId getPipByName(IdString name) const;
+ IdString getPipName(PipId pip) const;
+ void bindPip(PipId bel, IdString net);
+ void unbindPip(PipId bel);
+ bool checkPipAvail(PipId bel) const;
+ const vector<PipId> &getPips() const;
+ WireId getPipSrcWire(PipId pip) const;
+ WireId getPipDstWire(PipId pip) const;
+ DelayInfo getPipDelay(PipId pip) const;
+ const vector<PipId> &getPipsDownhill(WireId wire) const;
+ const vector<PipId> &getPipsUphill(WireId wire) const;
+ const vector<PipId> &getWireAliases(WireId wire) const;
+
+ void getBelPosition(BelId bel, float &x, float &y) const;
+ void getWirePosition(WireId wire, float &x, float &y) const;
+ void getPipPosition(PipId pip, float &x, float &y) const;
+ vector<GraphicElement> getBelGraphics(BelId bel) const;
+ vector<GraphicElement> getWireGraphics(WireId wire) const;
+ vector<GraphicElement> getPipGraphics(PipId pip) const;
+ vector<GraphicElement> getFrameGraphics() const;
};
#endif