aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/gfx.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-12-14 13:00:09 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2019-12-14 13:00:09 +0100
commitd42ecc081e6ce8316098318cc0072767f445e652 (patch)
tree6294282a65c4edc51eb8815a360a4e7a88387fe5 /ecp5/gfx.cc
parent7e7e20742d551da270adde59639eaf23f695591d (diff)
downloadnextpnr-d42ecc081e6ce8316098318cc0072767f445e652.tar.gz
nextpnr-d42ecc081e6ce8316098318cc0072767f445e652.tar.bz2
nextpnr-d42ecc081e6ce8316098318cc0072767f445e652.zip
pips for alu, mult and memory
Diffstat (limited to 'ecp5/gfx.cc')
-rw-r--r--ecp5/gfx.cc46
1 files changed, 43 insertions, 3 deletions
diff --git a/ecp5/gfx.cc b/ecp5/gfx.cc
index 6e78f7f7..cdeebb91 100644
--- a/ecp5/gfx.cc
+++ b/ecp5/gfx.cc
@@ -836,7 +836,26 @@ void setSource(GraphicElement &el, int x, int y, int w, int h, WireId src, IdStr
}
el.y1 = src.location.y + io_cell_v_y1 + gap * 0.10 + 0.0017f * (num + 1);
}
- }
+ }
+ if (src_type == id_WIRE_TYPE_EBR) {
+ el.x1 = src.location.x + slice_x1 - 0.005f;
+ el.y1 = src.location.y + slice_y2 - 0.0017f * (src_id - TILE_WIRE_JADA0_EBR + 1) + 3 * slice_pitch;
+ }
+ if (src_type == id_WIRE_TYPE_MULT18) {
+ el.x1 = src.location.x + slice_x1 - 0.005f;
+ el.y1 = src.location.y + slice_y2 - 0.00085f * (src_id - TILE_WIRE_JCLK0_MULT18 + 1) + 3 * slice_pitch;
+ }
+ if (src_type == id_WIRE_TYPE_ALU54) {
+ int num = (src_id - TILE_WIRE_JCLK0_ALU54) % 225;
+ int group = (src_id - TILE_WIRE_JCLK0_ALU54) / 225;
+ if (group==0) {
+ el.x1 = src.location.x + slice_x1 - 0.005f;
+ } else {
+ el.x1 = src.location.x + 0.97 + 0.005f;
+ }
+ el.y1 = src.location.y + slice_y2 - 0.00085f * (num + 1) + 3 * slice_pitch;
+ }
+
}
void setDestination(GraphicElement &el, int x, int y, int w, int h, WireId dst, IdString dst_type, GfxTileWireId dst_id)
@@ -951,7 +970,24 @@ void setDestination(GraphicElement &el, int x, int y, int w, int h, WireId dst,
el.y2 = dst.location.y + io_cell_v_y1 + gap * 0.10 + 0.0017f * (num + 1);
}
}
-
+ if (dst_type == id_WIRE_TYPE_EBR) {
+ el.x2 = dst.location.x + slice_x1 - 0.005f;
+ el.y2 = dst.location.y + slice_y2 - 0.0017f * (dst_id - TILE_WIRE_JADA0_EBR + 1) + 3 * slice_pitch;
+ }
+ if (dst_type == id_WIRE_TYPE_MULT18) {
+ el.x2 = dst.location.x + slice_x1 - 0.005f;
+ el.y2 = dst.location.y + slice_y2 - 0.00085f * (dst_id - TILE_WIRE_JCLK0_MULT18 + 1) + 3 * slice_pitch;
+ }
+ if (dst_type == id_WIRE_TYPE_ALU54) {
+ int num = (dst_id - TILE_WIRE_JCLK0_ALU54) % 225;
+ int group = (dst_id - TILE_WIRE_JCLK0_ALU54) / 225;
+ if (group==0) {
+ el.x2 = dst.location.x + slice_x1 - 0.005f;
+ } else {
+ el.x2 = dst.location.x + 0.97 + 0.005f;
+ }
+ el.y2 = dst.location.y + slice_y2 - 0.00085f * (num + 1) + 3 * slice_pitch;
+ }
}
void straightLine(std::vector<GraphicElement> &g, GraphicElement &el, int x, int y, int w, int h, WireId src, IdString src_type,
@@ -1250,10 +1286,14 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, Wire
((dst_id >= TILE_WIRE_FCO && dst_id <= TILE_WIRE_FCI) || (dst_id >= TILE_WIRE_JCE0 && dst_id <= TILE_WIRE_JQ7))) {
straightLine(g, el, x, y, w, h, src, src_type, src_id, dst, dst_type, dst_id);
}
- if (src_type == id_WIRE_TYPE_NONE && (dst_type == id_WIRE_TYPE_IOLOGIC || dst_type == id_WIRE_TYPE_SIOLOGIC) &&
+ if (src_type == id_WIRE_TYPE_NONE && (dst_type == id_WIRE_TYPE_IOLOGIC || dst_type == id_WIRE_TYPE_SIOLOGIC || dst_type == id_WIRE_TYPE_EBR || dst_type == id_WIRE_TYPE_MULT18 || dst_type == id_WIRE_TYPE_ALU54) &&
(src_id >= TILE_WIRE_JCE0 && src_id <= TILE_WIRE_JQ7)) {
straightLine(g, el, x, y, w, h, src, src_type, src_id, dst, dst_type, dst_id);
}
+ if (dst_type == id_WIRE_TYPE_NONE && (src_type == id_WIRE_TYPE_IOLOGIC || src_type == id_WIRE_TYPE_SIOLOGIC || src_type == id_WIRE_TYPE_EBR || src_type == id_WIRE_TYPE_MULT18 || src_type == id_WIRE_TYPE_ALU54) &&
+ (dst_id >= TILE_WIRE_JCE0 && dst_id <= TILE_WIRE_JQ7)) {
+ straightLine(g, el, x, y, w, h, src, src_type, src_id, dst, dst_type, dst_id);
+ }
if (src_type == id_WIRE_TYPE_NONE && (dst_type == id_WIRE_TYPE_IOLOGIC || dst_type == id_WIRE_TYPE_SIOLOGIC || dst_type == id_WIRE_TYPE_PIO) &&
(src_id >= TILE_WIRE_JDIA && src_id <= TILE_WIRE_ECLKD)) {
straightLine(g, el, x, y, w, h, src, src_type, src_id, dst, dst_type, dst_id);