device = null;
devices = new IODevice[2];
    public IOPort(RawChip chip, int index) {        super(chip);        device = null;        port = index;        assert !(port < 0 || port >= (2 * rawChip.getXSize() + 2 * rawChip                                      .getYSize())) : "invalid port number for io device";        this.port = port;        // set the x and y coordinates        if (port >= 0 && port < rawChip.getXSize()) {            Y = -1;            X = port;        } else if (port >= rawChip.getXSize()                   && port < (rawChip.getXSize() + rawChip.getYSize())) {            X = rawChip.getXSize();            Y = port - rawChip.getXSize();        } else if (port >= (rawChip.getXSize() + rawChip.getYSize())                   && port < (2 * rawChip.getXSize() + rawChip.getYSize())) {            X = (rawChip.getXSize() - 1)                - (port - (rawChip.getXSize() + rawChip.getYSize()));            Y = rawChip.getYSize();        } else if (port >= (2 * rawChip.getXSize() + rawChip.getYSize())                   && port < (2 * rawChip.getXSize() + 2 * rawChip.getYSize())) {            X = -1;            Y = (rawChip.getYSize() - 1)                - (port - (2 * rawChip.getXSize() + rawChip.getYSize()));        }        getNeighboringTile().addIOPort(this);    }