System.out.println("     (for " + trace + " trying " + tile + " at " + currentTime + ")");
    private HashMap canLayoutTrace(Trace trace)     {	if (getAvailTiles() < trace.getNumFilters())	    return null;		LinkedList tiles = new LinkedList();	for (int i = 0; i < rawChip.getTotalTiles(); i++) {	    tiles.add(rawChip.getTile(i));	}		//if we want to, try to force a single input trace to the source's tile	if (false && trace.getHead().getSourceSet().size() == 1) {	    Trace upstream = ((Edge)trace.getHead().getSourceSet().iterator().next()).getSrc().getParent();	    if (schedule.contains(upstream)) {		RawTile tile = rawChip.getTile(upstream.getTail().getPrevFilter().getX(),					       upstream.getTail().getPrevFilter().getY());		HashMap layout = new HashMap();		//try to place on the tile ignoring the tile avail		if (getLayout(trace.getHead().getNextFilter(), tile, layout, true))		    return layout;		else 		    tiles.remove(tile);	    }	}			//first try starting tiles that are either endpoints of upstream	//or starts of downstream	Iterator sources = trace.getHead().getSourceSet().iterator();	while (sources.hasNext()) {	    Trace current = ((Edge)sources.next()).getSrc().getParent();	    //now if the source is already scheduled or if it is io try its tile	    if (schedule.contains(current)) {		//get the endpoint of the trace		RawTile tile = rawChip.getTile(current.getTail().getPrevFilter().getX(),					       current.getTail().getPrevFilter().getY());		//we already tried this tile previously		if (!tiles.contains(tile))		    continue;		HashMap layout = new HashMap();		System.out.println("     (for " + trace + " trying source " + tile + " at " + currentTime + ")");		//if successful, return layout		if (getLayout(trace.getHead().getNextFilter(), tile,			      layout, false))		    return layout;		else //we tried this tile, remove it...		    tiles.remove(tile);	    }	}		Iterator dests = trace.getTail().getDestSet().iterator();	while (dests.hasNext()) {	    Trace current = ((Edge)dests.next()).getDest().getParent();	    if (schedule.contains(current)) { 		//get the endpoint of the trace		RawTile tile = rawChip.getTile(current.getHead().getNextFilter().getX(),					       current.getHead().getNextFilter().getY());		//we already tried this tile previously		if (!tiles.contains(tile))		    continue;		HashMap layout = new HashMap();		System.out.println("     (for " + trace + " trying dest " + tile + " at " + currentTime + ")");		//if successful, return layout		if (getLayout(trace.getHead().getNextFilter(), tile, 			      layout, false))		    return layout;		else //we tried this tile, remove it...		    tiles.remove(tile);	    }	}		Iterator tilesIt = tiles.iterator();	while (tilesIt.hasNext()) {	    RawTile tile = (RawTile)tilesIt.next();	    HashMap layout = new HashMap();	    System.out.println("     (for " + trace + " trying " + tile + " at " + currentTime + ")");	    //if successful, return layout	    if (getLayout(trace.getHead().getNextFilter(), tile,			  layout, false))		return layout;	}	//if we got here, then we could not find a layout	return null;    }