aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-10-12 19:07:54 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-10-20 09:41:48 +0200
commit8c79044d43417790a2a8844ea09cfc038e6b239c (patch)
tree9481dbe6527ce8fb9e7f116d478a5e68ebbfb625 /ecp5
parent4cbdc388b860ca5f5af5e99c2bc7b21ff6b461bd (diff)
downloadnextpnr-8c79044d43417790a2a8844ea09cfc038e6b239c.tar.gz
nextpnr-8c79044d43417790a2a8844ea09cfc038e6b239c.tar.bz2
nextpnr-8c79044d43417790a2a8844ea09cfc038e6b239c.zip
more wires between switchboxes
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc38
-rw-r--r--ecp5/constids.inc2
-rw-r--r--ecp5/gfx.h15
-rwxr-xr-xecp5/trellis_import.py6
4 files changed, 59 insertions, 2 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 80dc8817..ce27e077 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -677,13 +677,49 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
- el.x1 = x + switchbox_x1 + 0.005f + 0.0017f * (tilewire - TILE_WIRE_V01N0001);
+ el.x1 = x + switchbox_x1 + 0.0017f*4 + 0.0017f * (tilewire - TILE_WIRE_V01N0001);
el.x2 = el.x1;
el.y1 = y + switchbox_y1;
el.y2 = y + switchbox_y2 - 1;
ret.push_back(el);
}
}
+ if (wire_type == id_WIRE_TYPE_H01) {
+ if (tilewire >= TILE_WIRE_H01E0001 && tilewire <=TILE_WIRE_H01W0100)
+ //if (tilewire >= TILE_WIRE_H01E0000 && tilewire <=TILE_WIRE_H01W0101) // not existing in trellis
+ {
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x1;
+ el.x2 = x + switchbox_x2 - 1;
+ el.y1 = y + switchbox_y1 + 0.0017f*12 - 0.0017f * (tilewire - TILE_WIRE_H01E0001);
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ }
+ if (wire_type == id_WIRE_TYPE_HFI) {
+ // only TILE_WIRE_HFIE0000
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x1;
+ el.x2 = x + switchbox_x2 - 1;
+ el.y1 = y + switchbox_y1 + 0.0017f*1;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ if (wire_type == id_WIRE_TYPE_HL7) {
+ // only TILE_WIRE_HL7W0001
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x2 - 1;
+ el.x2 = x + switchbox_x1;
+ el.y1 = y + switchbox_y1 + 0.0017f*20;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
if (wire_type == id_WIRE_TYPE_NONE) {
if (tilewire >= TILE_WIRE_FCO && tilewire <=TILE_WIRE_FCI)
{
diff --git a/ecp5/constids.inc b/ecp5/constids.inc
index 63ca4b26..62d14bf6 100644
--- a/ecp5/constids.inc
+++ b/ecp5/constids.inc
@@ -1305,3 +1305,5 @@ X(WIRE_TYPE_V00)
X(WIRE_TYPE_V01)
X(WIRE_TYPE_V02)
X(WIRE_TYPE_V06)
+X(WIRE_TYPE_HFI)
+X(WIRE_TYPE_HL7)
diff --git a/ecp5/gfx.h b/ecp5/gfx.h
index f030d9c8..40d5c0fb 100644
--- a/ecp5/gfx.h
+++ b/ecp5/gfx.h
@@ -400,6 +400,16 @@ enum GfxTileWireId
TILE_WIRE_V01S0000,
TILE_WIRE_V01S0100,
+ TILE_WIRE_H01E0001,
+ TILE_WIRE_H01E0101,
+ TILE_WIRE_H01W0000,
+ TILE_WIRE_H01W0100,
+
+ TILE_WIRE_H01E0000,
+ TILE_WIRE_H01E0100,
+ TILE_WIRE_H01W0001,
+ TILE_WIRE_H01W0101,
+
TILE_WIRE_V00T0000,
TILE_WIRE_V00T0100,
@@ -415,7 +425,10 @@ enum GfxTileWireId
TILE_WIRE_NBOUNCE,
TILE_WIRE_SBOUNCE,
TILE_WIRE_WBOUNCE,
- TILE_WIRE_EBOUNCE
+ TILE_WIRE_EBOUNCE,
+
+ TILE_WIRE_HFIE0000,
+ TILE_WIRE_HL7W0001
};
diff --git a/ecp5/trellis_import.py b/ecp5/trellis_import.py
index e12f8bb7..ebdc45f7 100755
--- a/ecp5/trellis_import.py
+++ b/ecp5/trellis_import.py
@@ -74,6 +74,12 @@ def wire_type(name):
if name[0].startswith("V06"):
return "WIRE_TYPE_V06"
+ if name[0].startswith("HFI"):
+ return "WIRE_TYPE_HFI"
+
+ if name[0].startswith("HL7"):
+ return "WIRE_TYPE_HL7"
+
return "WIRE_TYPE_NONE"
def is_global(loc):