diff options
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r-- | ice40/chip.cc | 34 |
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 |