- if (xgater != null) {
- /*
- if (fpslicCell.zi() != NONE) {
- g.color(LOCAL_WIRE_COLOR);
- int layer = fpslicCell.zi() - L0;
- P p2 = new P(r.minx()+2*(layer+1), r.miny()+2*(layer+1));
- R r2 = new R(r.minx()+2*(layer+1), r.miny()+2*(layer+1),
- r.maxx()-2*(layer+1), r.maxy()-2*(layer+1));
- g.route(p2, r2, xgate.getInput(3));
- }
- */
- if (fpslicCell.wi() != NONE) {
- g.color(LOCAL_WIRE_COLOR);
- int layer = fpslicCell.wi() - L0;
- P p2 = new P(r.minx()+2*(layer+1), r.miny()+2*(layer+1));
- R r2 = new R(r.minx()+2*(layer+1), r.miny()+2*(layer+1),
- r.maxx()-2*(layer+1), r.maxy()-2*(layer+1));
- g.route(p2, r2, xgate.getInput(2));
- g.line(xgate.getInput(2), xgate.getInputDest(2));
- }
- xgate.draw(g, XGATE_COLOR);
- }
- if (ygater != null) {
- /*
- if (fpslicCell.zi() != NONE) {
- g.color(LOCAL_WIRE_COLOR);
- int layer = fpslicCell.zi() - L0;
- P p2 = new P(r.minx()+2*(layer+1), r.miny()+2*(layer+1));
- R r2 = new R(r.minx()+2*(layer+1), r.miny()+2*(layer+1),
- r.maxx()-2*(layer+1), r.maxy()-2*(layer+1));
- g.route(p2, r2, ygate.getInput(3));
- }
- */
- if (fpslicCell.wi() != NONE) {
- g.color(LOCAL_WIRE_COLOR);
- int layer = fpslicCell.wi() - L0;
- P p2 = new P(r.minx()+2*(layer+1), r.miny()+2*(layer+1));
- R r2 = new R(r.minx()+2*(layer+1), r.miny()+2*(layer+1),
- r.maxx()-2*(layer+1), r.maxy()-2*(layer+1));
- g.route(p2, r2, ygate.getInput(2));
- g.line(ygate.getInput(2), ygate.getInputDest(2));
- }
- ygate.draw(g, YGATE_COLOR);
- }
+ xgate.rotation(fpslicCell.yi());
+ xgate.gateArea = gateArea;
+ xgate.r = xgater;
+ if (xip != null) xgate.route(g, xip, xring, 0, XGATE_COLOR);
+ if (yip != null) xgate.route(g, yip, yring, 2, YGATE_COLOR);
+
+ ygate.rotation(fpslicCell.yi());
+ ygate.gateArea = gateArea;
+ ygate.r = ygater;
+ if (xip != null) ygate.route(g, xip, xring, 2, XGATE_COLOR);
+ if (yip != null) ygate.route(g, yip, yring, 0, YGATE_COLOR);
+
+ int layer = fpslicCell.wi() - L0;
+ P p2 = r.corner(SW).translate(2*(layer+1), 2*(layer+1));
+ R r2 = r.plus(2*(layer+1), 2*(layer+1), -2*(layer+1), -2*(layer+1));
+ ygate.route(g, p2, r2, 1, LOCAL_WIRE_COLOR);
+ xgate.route(g, p2, r2, 1, LOCAL_WIRE_COLOR);
+
+ xgate.draw(g, XGATE_COLOR);
+ ygate.draw(g, YGATE_COLOR);