diff options
| author | Miodrag Milanovic <mmicko@gmail.com> | 2019-12-01 11:00:24 +0100 | 
|---|---|---|
| committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-12-01 11:00:24 +0100 | 
| commit | 0c77eed07dfa40b7a2564db652c52be74b4fe441 (patch) | |
| tree | 5eacc35371c1b8e6cdd281c9dc6376b328d8b60a | |
| parent | da8b5758cd743441999a43c29fa1498c57fd047d (diff) | |
| download | nextpnr-0c77eed07dfa40b7a2564db652c52be74b4fe441.tar.gz nextpnr-0c77eed07dfa40b7a2564db652c52be74b4fe441.tar.bz2 nextpnr-0c77eed07dfa40b7a2564db652c52be74b4fe441.zip  | |
add more pips
| -rw-r--r-- | ecp5/gfx.cc | 49 | 
1 files changed, 49 insertions, 0 deletions
diff --git a/ecp5/gfx.cc b/ecp5/gfx.cc index 1a774884..5adf591d 100644 --- a/ecp5/gfx.cc +++ b/ecp5/gfx.cc @@ -413,6 +413,16 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, IdS  void setSource(GraphicElement &el, int x, int y, WireId src, IdString src_type, GfxTileWireId src_id)  { +    if (src_type == id_WIRE_TYPE_H00) { +        int group = (src_id - TILE_WIRE_H00L0000) / 2; +        el.y1 = y + switchbox_y1 + 0.0017f*(8 - ((src_id - TILE_WIRE_H00L0000) % 2)*4); + +        if (group) { +            el.x1 = x + switchbox_x2; +        } else { +            el.x1 = x + switchbox_x1; +        } +    }          if (src_type == id_WIRE_TYPE_H01) {          if (x == src.location.x)               el.x1 = x + switchbox_x1; @@ -428,6 +438,15 @@ void setSource(GraphicElement &el, int x, int y, WireId src, IdString src_type,          el.x1 = x + switchbox_x1 + 0.0017f*(96 + (src_id - TILE_WIRE_H06W0303)+ 10 *(src.location.x%9));          el.y1 = y + switchbox_y1;      } +    if (src_type == id_WIRE_TYPE_V00) { +        int group = (src_id - TILE_WIRE_V00T0000) / 2; +        el.x1 = x + switchbox_x2 - 0.0017f*(8 - ((src_id - TILE_WIRE_V00T0000) % 2)*4); +        if (group) { +            el.y1 = y + switchbox_y1; +        } else { +            el.y1 = y + switchbox_y2; +        } +    }      if (src_type == id_WIRE_TYPE_V01) {          el.x1 = x + switchbox_x2 - 0.0017f*16 + 0.0017f * (src_id - TILE_WIRE_V01N0001);          if (y == src.location.y)  @@ -496,6 +515,15 @@ void setDestination(GraphicElement &el, int x, int y, WireId dst, IdString dst_t          el.x2 = x + switchbox_x1;          el.y2 = y + switchbox_y1 + 0.0017f*(96 + (dst_id - TILE_WIRE_V06N0303)+ 10 *(dst.location.y%9));      } + +    if (dst_type == id_WIRE_TYPE_NONE) { +        if (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI) +        { +            int gap = (dst_id - TILE_WIRE_FCO) / 24;            +            el.x2 = x + switchbox_x2; +            el.y2 = y + slice_y2 - 0.0017f * (dst_id - TILE_WIRE_FCO + 1 + gap*2) + 3*slice_pitch; +        }    +    }  }  void straightLine(std::vector<GraphicElement> &g, GraphicElement &el,int x, int y, WireId src, IdString src_type, GfxTileWireId src_id,WireId dst, IdString dst_type, GfxTileWireId dst_id) @@ -741,6 +769,27 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, Wire      if (src_type == id_WIRE_TYPE_V06 && dst_type == id_WIRE_TYPE_V06) {          toSameSideVer(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id,style,src_id - TILE_WIRE_V06N0303);      } +     +    if (src_type == id_WIRE_TYPE_H00 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        toSameSideH1Ver(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id,style, dst_id - TILE_WIRE_FCO);                         +    } +    if (src_type == id_WIRE_TYPE_H01 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        toSameSideH1Ver(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id,style, dst_id - TILE_WIRE_FCO);                         +    } +    if (src_type == id_WIRE_TYPE_H02 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        straightLine(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id); +    } + +    if (src_type == id_WIRE_TYPE_V00 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        straightLine(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id); +    }     +    if (src_type == id_WIRE_TYPE_V01 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        straightLine(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id); +    } +    if (src_type == id_WIRE_TYPE_V02 && dst_type == id_WIRE_TYPE_NONE && (dst_id >= TILE_WIRE_FCO && dst_id <=TILE_WIRE_FCI)) { +        straightLine(g,el,x,y,src,src_type,src_id,dst,dst_type,dst_id); +    } +  }  NEXTPNR_NAMESPACE_END  | 
