/** * Window_Sel.v * Window selection module selects between 2x2, 4x4, and 8x8 window sizes * depending on the local variation near the pixel in question. * * Written by Peter Kung and Jsoon Kim */ module Window_Sel ( iVAR2[9:0], oSEL[1:0]); input [9:0] iVAR2; // Local variation around pixel output [1:0] oSEL; // Window size selection //CHANGE THRESHOLDS AS APPROPRIATE //select table: //0 == 2 by 2 //1 == 4 by 4 //2 == 8 by 8 assign oSEL = (iVAR2 < 10'd50) ? 2'b01 : 2'b00; endmodule