diff options
author | David Shah <davey1576@gmail.com> | 2018-06-12 14:43:56 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-12 14:43:56 +0200 |
commit | 592a627e0c99ddf2cf06c286813a2d08962d8cd9 (patch) | |
tree | 5da4e6d6c4bfdb3d5a600b365ed9cb856c307de9 /common/nextpnr.h | |
parent | 5a9ff4aea15fca7bcf8c86eaa1f92eb51f551e5b (diff) | |
parent | c8b815361e2435bf12786705638908aa891df44f (diff) | |
download | nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.tar.gz nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.tar.bz2 nextpnr-592a627e0c99ddf2cf06c286813a2d08962d8cd9.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 453af496..0c74c1ad 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -27,42 +27,40 @@ #ifndef NEXTPNR_H #define NEXTPNR_H +#ifdef NEXTPNR_NAMESPACE +#define NEXTPNR_NAMESPACE_PREFIX NEXTPNR_NAMESPACE:: +#define NEXTPNR_NAMESPACE_BEGIN namespace NEXTPNR_NAMESPACE { +#define NEXTPNR_NAMESPACE_END } +#define USING_NEXTPNR_NAMESPACE using namespace NEXTPNR_NAMESPACE; +#else +#define NEXTPNR_NAMESPACE_PREFIX +#define NEXTPNR_NAMESPACE_BEGIN +#define NEXTPNR_NAMESPACE_END +#define USING_NEXTPNR_NAMESPACE +#endif + +NEXTPNR_NAMESPACE_BEGIN + // replace with proper IdString later typedef std::string IdString; struct GraphicElement { - // This will control colour, and there should be separate - // visibility controls in some cases also - enum - { - // Wires entirely inside tiles, e.g. between switchbox and bels - G_LOCAL_WIRES, - // Standard inter-tile routing - G_GENERAL_WIRES, - // Special inter-tile wires, e.g. carry chains - G_DEDICATED_WIRES, - G_BEL_OUTLINE, - G_SWITCHBOX_OUTLINE, - G_TILE_OUTLINE, - G_BEL_PINS, - G_SWITCHBOX_PINS, - G_BEL_MISC, - G_TILE_MISC, - } style; - enum { + G_NONE, G_LINE, G_BOX, G_CIRCLE, G_LABEL - } type; + } type = G_NONE; - float x1, y1, x2, y2, z; + float x1 = 0, y1 = 0, x2 = 0, y2 = 0, z = 0; std::string text; }; +NEXTPNR_NAMESPACE_END + #include "chip.h" #include "design.h" |