`timescale 1ns / 1ps

// VGA Pong v1.0     Chris Fallin <cfallin@nd.edu>

module box_detect(vpos, hpos, v, vsize, h, hsize, q);
   input [9:0] vpos;
   input [9:0] hpos;
   input [9:0] v;
   input [9:0] vsize;
   input [9:0] h;
   input [9:0] hsize;
   output q;

	wire h_ok;
	wire v_ok;
	
	assign q = h_ok & v_ok;
	
	assign v_ok =
		( vpos >= v ) &
		( vpos < v + vsize);
		
	assign h_ok =
		( hpos >= h ) &
		( hpos < h + hsize);

endmodule
