data/full_repos/permissive/127044786/examples/iCEZum Alhambra/PxsPlayer.v
1: b'%Error: Cannot find file containing module: Alhambra,data/full_repos/permissive/127044786\n        ... Looked in:\n             data/full_repos/permissive/127044786/examples/iCEZum/Alhambra,data/full_repos/permissive/127044786\n             data/full_repos/permissive/127044786/examples/iCEZum/Alhambra,data/full_repos/permissive/127044786.v\n             data/full_repos/permissive/127044786/examples/iCEZum/Alhambra,data/full_repos/permissive/127044786.sv\n             Alhambra,data/full_repos/permissive/127044786\n             Alhambra,data/full_repos/permissive/127044786.v\n             Alhambra,data/full_repos/permissive/127044786.sv\n             obj_dir/Alhambra,data/full_repos/permissive/127044786\n             obj_dir/Alhambra,data/full_repos/permissive/127044786.v\n             obj_dir/Alhambra,data/full_repos/permissive/127044786.sv\n%Error: Cannot find file containing module: data/full_repos/permissive/127044786/examples/iCEZum\n%Error: Cannot find file containing module: Alhambra/PxsPlayer.v\n%Error: Exiting due to 3 error(s)\n'
module PxsPlayer
#(
   parameter type = 1'b0,
   parameter pos_offset = 100
)(
   input wire        px_clk,
   input wire [25:0] RGBStr_i,
   input wire [9:0]  pos,
   output reg [25:0] RGBStr_o
);


`define Active 0:0
`define VS 1:1
`define HS 2:2
`define YC 12:3
`define XC 22:13
`define R 23:23
`define G 24:24
`define B 25:25
`define RGB 25:23
`define VGA 22:0
   

parameter size_player = 80;
parameter width_player = 10;

localparam width_screen = 640;
localparam height_screen = 480;

parameter [3:0] white = 3'b111;


	always @(posedge px_clk)
	begin

		RGBStr_o[`VGA] <= RGBStr_i[`VGA];


		case (type)

			1'b0 :
			     begin
				RGBStr_o[`RGB] <= (
						   (RGBStr_i[`YC] > pos) && (RGBStr_i[`YC] < pos+size_player) &&
		        		           (RGBStr_i[`XC] > pos_offset) && (RGBStr_i[`XC] < pos_offset + width_player)
		        			 ) ? white : RGBStr_i[`RGB];
			     end

			1'b1 :
			     begin
				RGBStr_o[`RGB] <= (
						   (RGBStr_i[`XC] > pos) && (RGBStr_i[`XC] < pos+size_player) &&
		        		           (RGBStr_i[`YC] > pos_offset) && (RGBStr_i[`YC] < pos_offset + width_player)
		        			 ) ? white : RGBStr_i[`RGB];
		             end

		endcase
	end
endmodule
module PxsPlayer
#(
   parameter type = 1'b0,
   parameter pos_offset = 100
)(
   input wire        px_clk,
   input wire [25:0] RGBStr_i,
   input wire [9:0]  pos,
   output reg [25:0] RGBStr_o
);



`define Active 0:0
`define VS 1:1
`define HS 2:2
`define YC 12:3
`define XC 22:13
`define R 23:23
`define G 24:24
`define B 25:25
`define RGB 25:23
`define VGA 22:0
   

parameter size_player = 80;
parameter width_player = 10;

localparam width_screen = 640;
localparam height_screen = 480;

parameter [3:0] white = 3'b111;


	always @(posedge px_clk)
	begin

		RGBStr_o[`VGA] <= RGBStr_i[`VGA];


		case (type)

			1'b0 :
			     begin
				RGBStr_o[`RGB] <= (
						   (RGBStr_i[`YC] > pos) && (RGBStr_i[`YC] < pos+size_player) &&
		        		           (RGBStr_i[`XC] > pos_offset) && (RGBStr_i[`XC] < pos_offset + width_player)
		        			 ) ? white : RGBStr_i[`RGB];
			     end

			1'b1 :
			     begin
				RGBStr_o[`RGB] <= (
						   (RGBStr_i[`XC] > pos) && (RGBStr_i[`XC] < pos+size_player) &&
		        		           (RGBStr_i[`YC] > pos_offset) && (RGBStr_i[`YC] < pos_offset + width_player)
		        			 ) ? white : RGBStr_i[`RGB];
		             end

		endcase
	end
endmodule