if (!KjcOptions.magic_net && !KjcOptions.decoupled) { fw.write("void raw_init();\n\n"); fw.write("void raw_init2();\n\n"); }
    private static void joinerCode(FlatNode joiner)     {	try {	    FileWriter fw = 		new FileWriter("tile" + Layout.getTileNumber(Layout.getTile(joiner)) 			       + ".c");	    fw.write("/* " + joiner.contents.getName() + "*/\n");	    fw.write("#include <raw.h>\n");	    fw.write("#include <math.h>\n\n");  	    if(KjcOptions.altcodegen) {		fw.write("register float " + Util.CSTOFPVAR + " asm(\"$csto\");\n");		fw.write("register float " + Util.CSTIFPVAR + " asm(\"$csti\");\n");		fw.write("register int " + Util.CSTOINTVAR + " asm(\"$csto\");\n");		fw.write("register int " + Util.CSTIINTVAR + " asm(\"$csti\");\n");	    }	    if (RawBackend.FILTER_DEBUG_MODE) {		fw.write("void static_send_print(");		fw.write(Util.getJoinerType(joiner) + " f) {\n");		if (Util.getJoinerType(joiner).isFloatingPoint()) 		    fw.write("print_float(f);\n");		else 		    fw.write("print_int(f);\n");		fw.write("static_send(f);\n");		fw.write("}\n\n");	    }		    	    //if there are structures in the code, include	    //the structure definition header files	    //this must be included after the above declarations 	    //(of CSTO*, CSTI*)	    if (RawBackend.structures.length > 0) 		fw.write("#include \"structs.h\"\n");	    	    if (KjcOptions.decoupled) {		fw.write("float " + Util.CSTOFPVAR + ";\n");		fw.write("float " + Util.CSTIFPVAR + ";\n");		fw.write("int " + Util.CSTOINTVAR + ";\n");		fw.write("int " + Util.CSTIINTVAR + ";\n");	    }	    	    if (joiner.contents.getParent() instanceof SIRFeedbackLoop)		fw.write(createInitPath(joiner) + "\n");	    	    fw.write(createJoinerWork(joiner));	    //write the extern for the function to init the 	    //switch, but there is no switch for the magic network	    if (!KjcOptions.magic_net && !KjcOptions.decoupled) {		fw.write("void raw_init();\n\n");		fw.write("void raw_init2();\n\n");	    }	    fw.write("void begin(void) {\n");	    if (!KjcOptions.magic_net) {		fw.write("  raw_init();\n");		fw.write("  raw_init2();\n");	    }	    else		fw.write("  __asm__ volatile (\"magc $0, $0, 1\");\n");	    	    //initialize the dummy network receive value	    if (KjcOptions.decoupled) {		if (Util.getJoinerType(joiner).isFloatingPoint()) 		    fw.write("  " + Util.CSTIFPVAR + " = 1.0;\n");		else 		    fw.write("  " + Util.CSTIINTVAR + " = 1;\n");	    }	    	    fw.write("  work();\n");	    fw.write("}\n");	    fw.close();	    System.out.println("Code for " + joiner.contents.getName() +			       " written to tile" + Layout.getTileNumber(Layout.getTile(joiner)) +			       ".c");	}	catch (Exception e) {	    e.printStackTrace();	    	    Utils.fail("Error writing switch code for tile " +		       Layout.getTileNumber(Layout.getTile(joiner)));	}    }