aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-13 12:48:58 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-13 12:48:58 +0200
commit1e314cc0ced067d72cea54c8225cf9d3ed0b6c14 (patch)
treec173f3746dfb352f95e504cbf335e9372e40f3fc /ice40/chip.cc
parent145c849596bdcd24f3b4e617eeb4ee06e1b93452 (diff)
downloadnextpnr-1e314cc0ced067d72cea54c8225cf9d3ed0b6c14.tar.gz
nextpnr-1e314cc0ced067d72cea54c8225cf9d3ed0b6c14.tar.bz2
nextpnr-1e314cc0ced067d72cea54c8225cf9d3ed0b6c14.zip
Update chip Graphics API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r--ice40/chip.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc
index 441e65f2..a9626a2c 100644
--- a/ice40/chip.cc
+++ b/ice40/chip.cc
@@ -289,6 +289,23 @@ float Chip::estimateDelay(PosInfo src, PosInfo dst) const
// -----------------------------------------------------------------------
+std::vector<GraphicElement> Chip::getFrameGraphics() const
+{
+ std::vector<GraphicElement> ret;
+
+ for (int x = 0; x <= chip_info.width; x++)
+ for (int y = 0; y <= chip_info.height; y++) {
+ GraphicElement el;
+ el.type = GraphicElement::G_LINE;
+ el.x1 = x - 0.05, el.x2 = x + 0.05, el.y1 = y, el.y2 = y, el.z = 0;
+ ret.push_back(el);
+ el.x1 = x, el.x2 = x, el.y1 = y - 0.05, el.y2 = y + 0.05, el.z = 0;
+ ret.push_back(el);
+ }
+
+ return ret;
+}
+
std::vector<GraphicElement> Chip::getBelGraphics(BelId bel) const
{
std::vector<GraphicElement> ret;
@@ -369,21 +386,4 @@ std::vector<GraphicElement> Chip::getPipGraphics(PipId pip) const
return ret;
}
-std::vector<GraphicElement> Chip::getFrameGraphics() const
-{
- std::vector<GraphicElement> ret;
-
- for (int x = 0; x <= chip_info.width; x++)
- for (int y = 0; y <= chip_info.height; y++) {
- GraphicElement el;
- el.type = GraphicElement::G_LINE;
- el.x1 = x - 0.05, el.x2 = x + 0.05, el.y1 = y, el.y2 = y, el.z = 0;
- ret.push_back(el);
- el.x1 = x, el.x2 = x, el.y1 = y - 0.05, el.y2 = y + 0.05, el.z = 0;
- ret.push_back(el);
- }
-
- return ret;
-}
-
NEXTPNR_NAMESPACE_END