print(FLOAT_HEADER_WORD + " = construct_dyn_hdr(3, 1, 0, 0, 0, 3, 0);\n"); print(INT_HEADER_WORD + " = construct_dyn_hdr(3, 1, 1, 0, 0, 3, 0);\n");
    public void visitFilter(SIRFilter self,			    SIRFilterIter iter) {	circular = !(self.getPeekInt() > 4 * self.getPopInt()) && !ratematch;		//	System.out.println(self.getName());	//Entry point of the visitor	print("#include <raw.h>\n");	print("#include <stdlib.h>\n");	print("#include <math.h>\n\n");	//print the inline asm 	print("static inline void static_send_from_mem(void *val) instr_one_input(\"lw $csto,0(%0)\");\n");	print("static inline void static_receive_to_mem(void *val) instr_one_input(\"sw $csti,0(%0)\");\n");		//print the extern for the function to init the 	//switch	print("void raw_init();\n");	    	print("int " + TAPE_INDEX + " = -1;\n");	print("int " + BUFFER_INDEX + ";\n");	print("unsigned int " + FLOAT_HEADER_WORD + ";\n");	print("unsigned int " + INT_HEADER_WORD + ";\n");	if (ratematch) {	    print("int " + recvBufferIndex + "= -1;\n");	    print("int " + sendBufferIndex + "= -1;\n");	}		//print the declarations for the array indexs for pushing and popping	//if this filter deals with arrays	if (self.getInputType().isArrayType() || self.getOutputType().isArrayType()) {	    int inputDim = 0, outputDim = 0, maxDim;	    //find which array has the greatest dimensionality	   	    if (self.getInputType().isArrayType())		inputDim = ((CArrayType)self.getInputType()).getArrayBound();	    if (self.getOutputType().isArrayType()) 		outputDim = ((CArrayType)self.getOutputType()).getArrayBound();	    maxDim = (inputDim > outputDim) ? inputDim : outputDim;	    	    for (int i = 0; i < maxDim; i++)		print("int " + ARRAY_INDEX + i + ";\n");	}		if (ratematch) {	    rateMatch(self);	    return;	}		if (filter.getPeekInt() > 0) {	    if (circular) {		if (filter instanceof SIRTwoStageFilter) {		    SIRTwoStageFilter two = (SIRTwoStageFilter)filter;		    int buffersize = (two.getInitPeek() > two.getPeekInt()) ? two.getInitPeek() :			two.getPeekInt();		    buffersize = nextPow2(buffersize + 1);		    print ("#define " + BUFFER_SIZE + " " + buffersize + "\n");		    print ("#define " + BITS + " " + (buffersize - 1) + "\n");		    bufferDeclaration(two.getInputType(), BUFFER, BUFFER_SIZE);		}		else{		    int buffersize = nextPow2(filter.getPeekInt());		    print ("#define " + BUFFER_SIZE + " " + buffersize + "\n");		    print ("#define " + BITS + " " + (buffersize - 1) + "\n");		    bufferDeclaration(filter.getInputType(), BUFFER, BUFFER_SIZE);		}	    }	    else {		if (filter instanceof SIRTwoStageFilter) {		    SIRTwoStageFilter two = (SIRTwoStageFilter)filter;		    int buffersize = (two.getInitPeek() > two.getPeekInt()) ? two.getInitPeek() :			two.getPeekInt();		    bufferDeclaration(two.getInputType(), BUFFER,				      new Integer(buffersize).toString());		}		else {		    bufferDeclaration(filter.getInputType(), BUFFER, 				      new Integer(filter.getPeekInt()).toString());		}	    }	}	//Visit fields declared in the filter class	JFieldDeclaration[] fields = self.getFields();	for (int i = 0; i < fields.length; i++)	   fields[i].accept(this);		//visit methods of filter, print the declaration first	declOnly = true;	JMethodDeclaration[] methods = self.getMethods();	for (int i =0; i < methods.length; i++)	    methods[i].accept(this);	//now print the functions with body	declOnly = false;	for (int i =0; i < methods.length; i++) {	    methods[i].accept(this);		}		print("void begin(void) {\n");	print("  raw_init();\n");	print(FLOAT_HEADER_WORD + " = construct_dyn_hdr(3, 1, 0, 0, 0, 3, 0);\n");	print(INT_HEADER_WORD + " = construct_dyn_hdr(3, 1, 1, 0, 0, 3, 0);\n");	print("  " + self.getInit().getName() + "(");	print(InitArgument.getInitArguments(self));	print (");\n");	if (self instanceof SIRTwoStageFilter) {	    print("  " + ((SIRTwoStageFilter)self).getInitWork().getName() + "();\n");	}	print("  " + self.getWork().getName() + "();\n");	print("}\n");		createFile();    }