aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-10-12 09:27:55 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-10-20 09:41:48 +0200
commit3da7af9f026004dba6b08ffee1b09bec1506b6ee (patch)
treec06eab9878df3908c7577115dcecf0c2fecfcaff /ecp5/arch.cc
parent0b4ced96ecfd9ba216bccca5b073d23ed104a89f (diff)
downloadnextpnr-3da7af9f026004dba6b08ffee1b09bec1506b6ee.tar.gz
nextpnr-3da7af9f026004dba6b08ffee1b09bec1506b6ee.tar.bz2
nextpnr-3da7af9f026004dba6b08ffee1b09bec1506b6ee.zip
clk and lsr muxes
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r--ecp5/arch.cc63
1 files changed, 62 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 3c56e057..947d0f93 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -701,7 +701,68 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
ret.push_back(el);
}
}
- }
+
+ if (tilewire >= TILE_WIRE_LSR1 && tilewire <=TILE_WIRE_CLK0)
+ {
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x2;
+ el.x2 = x + switchbox_x2 + 0.0017f * (6-(tilewire-TILE_WIRE_LSR1));
+ el.y1 = y + slice_y2 - 0.0017f * (tilewire - TILE_WIRE_LSR1 - 5) + 3*slice_pitch;
+ el.y2 = y + slice_y2 - 0.0017f * (tilewire - TILE_WIRE_LSR1 - 5) + 3*slice_pitch;
+ ret.push_back(el);
+
+ if (tilewire == TILE_WIRE_LSR1 || tilewire==TILE_WIRE_LSR0) {
+ el.x1 = el.x2;
+ el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 1) + 3*slice_pitch;
+ ret.push_back(el);
+ if (tilewire == TILE_WIRE_LSR1) {
+ for (int i=0;i<2;i++){
+ el.x2 = x + slice_x1 - 0.005f;
+ el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 - 2) + (3+i)*slice_pitch;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ }
+ } else {
+ el.x1 = el.x2;
+ el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 -5 + 2) + 3*slice_pitch;
+ ret.push_back(el);
+ if (tilewire == TILE_WIRE_CLK1) {
+ for (int i=0;i<2;i++){
+ el.x2 = x + slice_x1 - 0.005f;
+ el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 - 1) + (3+i)*slice_pitch;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ }
+
+ }
+ }
+ if (tilewire >= TILE_WIRE_MUXCLK3 && tilewire <=TILE_WIRE_MUXCLK0)
+ {
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x2 + 0.0017f * 3;
+ el.x2 = x + slice_x1 - 0.005f;
+ el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 2) + (3 + tilewire - TILE_WIRE_MUXCLK3)*slice_pitch;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ if (tilewire >= TILE_WIRE_MUXLSR3 && tilewire <=TILE_WIRE_MUXLSR0)
+ {
+ GraphicElement el;
+ el.type = GraphicElement::TYPE_LINE;
+ el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
+ el.x1 = x + switchbox_x2 + 0.0017f * 5;
+ el.x2 = x + slice_x1 - 0.005f;
+ el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_CE0 - TILE_WIRE_LSR1 - 5 + 1) + (3 + tilewire - TILE_WIRE_MUXLSR3)*slice_pitch;
+ el.y2 = el.y1;
+ ret.push_back(el);
+ }
+ }
if (decal.type == DecalId::TYPE_BEL) {
BelId bel;
bel.index = decal.z;