// ********************************************************************
// The touch coordinates and motor coordinates are toggled between one
// another as it's sent to the camera interface.  The REGMUX module
// is a mux that outputs either the touch or motor coordinates.  It is
// controlled by the SENDXY module.

module REGMUX (MUXSEL, MOTOR, TOUCH, OUTPUT) ;

input MUXSEL;
input [31:0] MOTOR;
input [31:0] TOUCH;
output [31:0] OUTPUT;

reg [31:0] OUTPUT;

always@(MUXSEL)
begin
 if(MUXSEL)
  OUTPUT = TOUCH;
 else
  OUTPUT = MOTOR;
end
 

endmodule
 
 

Back to Report