aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-09 14:53:20 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-09 14:53:20 +0200
commita1cd9fcf73685a5b0c4e721d405550096d85d566 (patch)
tree93f1eafeb0eb383e7318f6836fb46294b8dee9db
parentf4c62e233cfc3e626501c4dbe30e596fa9e43d77 (diff)
downloadnextpnr-a1cd9fcf73685a5b0c4e721d405550096d85d566.tar.gz
nextpnr-a1cd9fcf73685a5b0c4e721d405550096d85d566.tar.bz2
nextpnr-a1cd9fcf73685a5b0c4e721d405550096d85d566.zip
Reduce line width, adding some switchboxes
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r--gui/fpgaviewwidget.cc6
-rw-r--r--ice40/arch.cc32
2 files changed, 31 insertions, 7 deletions
diff --git a/gui/fpgaviewwidget.cc b/gui/fpgaviewwidget.cc
index 0c6b1a98..831f80d4 100644
--- a/gui/fpgaviewwidget.cc
+++ b/gui/fpgaviewwidget.cc
@@ -346,7 +346,7 @@ void FPGAViewWidget::paintGL()
matrix.scale(zoom_ * 0.01f, zoom_ * 0.01f, 0);
// Draw grid.
- auto grid = LineShaderData(0.01f, QColor("#DDD"));
+ auto grid = LineShaderData(0.001f, QColor("#DDD"));
for (float i = -100.0f; i < 100.0f; i += 1.0f) {
PolyLine(-100.0f, i, 100.0f, i).build(grid);
PolyLine(i, -100.0f, i, 100.0f).build(grid);
@@ -354,7 +354,7 @@ void FPGAViewWidget::paintGL()
lineShader_.draw(grid, matrix);
// Draw Bels.
- auto bels = LineShaderData(0.02f, QColor("#b000ba"));
+ auto bels = LineShaderData(0.002f, QColor("#b000ba"));
if (ctx_) {
for (auto bel : ctx_->getBels()) {
for (auto &el : ctx_->getBelGraphics(bel))
@@ -364,7 +364,7 @@ void FPGAViewWidget::paintGL()
}
// Draw Frame Graphics.
- auto frames = LineShaderData(0.02f, QColor("#0066ba"));
+ auto frames = LineShaderData(0.002f, QColor("#0066ba"));
if (ctx_) {
for (auto &el : ctx_->getFrameGraphics()) {
drawElement(frames, el);
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 72f9c1f3..aed99b7b 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -424,12 +424,36 @@ std::vector<GraphicElement> Arch::getBelGraphics(BelId bel) const
if (bel_type == TYPE_ICESTORM_LC) {
GraphicElement el;
el.type = GraphicElement::G_BOX;
- el.x1 = chip_info->bel_data[bel.index].x + 0.1;
- el.x2 = chip_info->bel_data[bel.index].x + 0.9;
- el.y1 = chip_info->bel_data[bel.index].y + 0.10 + (chip_info->bel_data[bel.index].z) * (0.8 / 8);
- el.y2 = chip_info->bel_data[bel.index].y + 0.18 + (chip_info->bel_data[bel.index].z) * (0.8 / 8);
+ el.x1 = chip_info->bel_data[bel.index].x + 0.82;
+ el.x2 = chip_info->bel_data[bel.index].x + 0.92;
+ el.y1 = chip_info->bel_data[bel.index].y + 0.30 + (chip_info->bel_data[bel.index].z) * (0.6 / 8);
+ el.y2 = chip_info->bel_data[bel.index].y + 0.35 + (chip_info->bel_data[bel.index].z) * (0.6 / 8);
el.z = 0;
ret.push_back(el);
+
+ if (chip_info->bel_data[bel.index].z == 0) {
+ int tx = chip_info->bel_data[bel.index].x;
+ int ty = chip_info->bel_data[bel.index].y;
+ // Local tracks to LUT input switchbox
+ GraphicElement lc_lut_sw;
+ lc_lut_sw.type = GraphicElement::G_BOX;
+ lc_lut_sw.x1 = tx + 0.75;
+ lc_lut_sw.x2 = tx + 0.8;
+ lc_lut_sw.y1 = ty + 0.30;
+ lc_lut_sw.y2 = ty + 0.875;
+ lc_lut_sw.z = 0;
+ ret.push_back(lc_lut_sw);
+ // Local tracks switchbox
+ GraphicElement lc_sw;
+ lc_sw.type = GraphicElement::G_BOX;
+ lc_sw.x1 = tx + 0.6;
+ lc_sw.x2 = tx + 0.7;
+ lc_sw.y1 = ty + 0.65;
+ lc_sw.y2 = ty + 0.75;
+ ret.push_back(lc_sw);
+
+
+ }
}
if (bel_type == TYPE_SB_IO) {