}
    public static void dumpSchedules()     {	//get all the nodes that have either init switch code	//or steady state switch code	HashSet tiles = new HashSet(RawBackend.simulator.initSchedules.	    keySet());		RawBackend.addAll(tiles, RawBackend.simulator.steadySchedules.keySet());	RawBackend.addAll(tiles, Layout.getTiles());	//do not generate switchcode for Tiles assigned to file readers/writers	//they are just dummy tiles	Iterator fs = FileVisitor.fileNodes.iterator();	while (fs.hasNext()) {	    tiles.remove(Layout.getTile((FlatNode)fs.next()));	}       		Iterator tileIterator = tiles.iterator();				//for each tiles dump the code	while(tileIterator.hasNext()) {	    Coordinate tile = (Coordinate) tileIterator.next();	    try {		//true if we are compressing the switch code		boolean compression = false;				//get the code		String steadyCode = "";		String initCode = "";		if (RawBackend.simulator.initSchedules.get(tile) != null)		    initCode = ((StringBuffer)RawBackend.simulator.initSchedules.get(tile)).toString();		if (RawBackend.simulator.steadySchedules.get(tile) != null)		    steadyCode = ((StringBuffer)RawBackend.simulator.steadySchedules.get(tile)).toString();				//the sequences we are going to compress if compression is needed		Repetition[] big3init = null;                Repetition[] big3work = null;				int codeSize = getCodeLength(steadyCode + initCode);		if (codeSize > 5000) {		    System.out.println("Compression needed.  Code size = " + codeSize);		    compression = true;                    big3init = threeBiggestRepetitions(initCode);		    big3work = threeBiggestRepetitions(steadyCode);		}				FileWriter fw =		    new FileWriter("sw" + Layout.getTileNumber(tile) 				   + ".s");		fw.write("#  Switch code\n");		fw.write(getHeader());		//if this tile is the north neighbor of a bc file i/o device		//we need to send a data word to it		printIOStartUp(tile, fw);		//print the code to get the repetition counts from the processor		//print the init switch code                if (big3init != null)                    getRepetitionCounts(big3init, fw);		toASM(initCode, "i", big3init, fw);		//loop label		if (big3work != null)		    getRepetitionCounts(big3work, fw);		fw.write("sw_loop:\n");		//print the steady state switch code		if (RawBackend.simulator.steadySchedules.get(tile) != null)		    toASM(steadyCode, "w", big3work, fw);		//print the jump ins		fw.write("\tj\tsw_loop\n\n");		fw.write(getTrailer(tile, big3init, big3work));		fw.close();		/*if (threeBiggest != null) {		    		    System.out.print("Found Seqeunces of: " +				     threeBiggest[0].repetitions + " " + t" " + 				     threeBiggest[1].repetitions + " " + threeBiggest[1].length + " " + 				     threeBiggest[2].repetitions + " " + threeBiggest[2].length + "\n");				     } */		System.out.println("sw" + Layout.getTileNumber(tile) 				   + ".s written");	    }	    catch (Exception e) {		e.printStackTrace();				Utils.fail("Error creating switch code file for tile " + 			   Layout.getTileNumber(tile));	    }	}    }