data/full_repos/permissive/109394014/examples/PxsMoveLogo.v
1: b'%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:25: Cannot find include file: Pxs.vh\n`include "Pxs.vh" \n         ^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/109394014/examples,data/full_repos/permissive/109394014/Pxs.vh\n             data/full_repos/permissive/109394014/examples,data/full_repos/permissive/109394014/Pxs.vh.v\n             data/full_repos/permissive/109394014/examples,data/full_repos/permissive/109394014/Pxs.vh.sv\n             Pxs.vh\n             Pxs.vh.v\n             Pxs.vh.sv\n             obj_dir/Pxs.vh\n             obj_dir/Pxs.vh.v\n             obj_dir/Pxs.vh.sv\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:96: Define or directive not defined: \'`XC\'\n assign endframe = (RGBStr_i[`XC]==VISIBLECOLS-1 && RGBStr_i[`YC]==VISIBLEROWS-1)? 1\'b1 : 1\'b0 ;\n                             ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:96: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n assign endframe = (RGBStr_i[`XC]==VISIBLECOLS-1 && RGBStr_i[`YC]==VISIBLEROWS-1)? 1\'b1 : 1\'b0 ;\n                                ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:96: Define or directive not defined: \'`YC\'\n assign endframe = (RGBStr_i[`XC]==VISIBLECOLS-1 && RGBStr_i[`YC]==VISIBLEROWS-1)? 1\'b1 : 1\'b0 ;\n                                                             ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:107: Define or directive not defined: \'`XC\'\n  x_img <= RGBStr_i[`XC]-x_logo;\n                    ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:107: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  x_img <= RGBStr_i[`XC]-x_logo;\n                       ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:108: Define or directive not defined: \'`YC\'\n  y_img <= RGBStr_i[`YC]-y_logo;\n                    ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:108: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  y_img <= RGBStr_i[`YC]-y_logo;\n                       ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: Define or directive not defined: \'`HS\'\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n          ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n             ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: Define or directive not defined: \'`HS\'\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n                         ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: Define or directive not defined: \'`VS\'\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n                                       ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n                                          ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:109: Define or directive not defined: \'`VS\'\n  AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];\n                                                      ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: Define or directive not defined: \'`XC\'\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n          ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n             ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: Define or directive not defined: \'`XC\'\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n                         ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: Define or directive not defined: \'`YC\'\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n                                       ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n                                          ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:110: Define or directive not defined: \'`YC\'\n  AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];\n                                                      ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:111: Define or directive not defined: \'`Active\'\n  AuxStr1[`Active]<=RGBStr_i[`Active];\n          ^~~~~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:111: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`Active]<=RGBStr_i[`Active];\n                 ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:111: Define or directive not defined: \'`Active\'\n  AuxStr1[`Active]<=RGBStr_i[`Active];\n                             ^~~~~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:112: Define or directive not defined: \'`RGB\'\n  AuxStr1[`RGB]<=RGBStr_i[`RGB];\n          ^~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:112: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr1[`RGB]<=RGBStr_i[`RGB];\n              ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:112: Define or directive not defined: \'`RGB\'\n  AuxStr1[`RGB]<=RGBStr_i[`RGB];\n                          ^~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: Define or directive not defined: \'`HS\'\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n          ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n             ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: Define or directive not defined: \'`HS\'\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n                        ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: Define or directive not defined: \'`VS\'\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n                                      ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n                                         ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:120: Define or directive not defined: \'`VS\'\n  AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];\n                                                    ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: Define or directive not defined: \'`XC\'\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n          ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n             ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: Define or directive not defined: \'`XC\'\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n                        ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: Define or directive not defined: \'`YC\'\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n                                      ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n                                         ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:121: Define or directive not defined: \'`YC\'\n  AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];\n                                                    ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:122: Define or directive not defined: \'`Active\'\n  AuxStr2[`Active]<=AuxStr1[`Active];\n          ^~~~~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:122: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`Active]<=AuxStr1[`Active];\n                 ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:122: Define or directive not defined: \'`Active\'\n  AuxStr2[`Active]<=AuxStr1[`Active];\n                            ^~~~~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:123: Define or directive not defined: \'`RGB\'\n  AuxStr2[`RGB]<=AuxStr1[`RGB];\n          ^~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:123: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  AuxStr2[`RGB]<=AuxStr1[`RGB];\n              ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:123: Define or directive not defined: \'`RGB\'\n  AuxStr2[`RGB]<=AuxStr1[`RGB];\n                         ^~~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: Define or directive not defined: \'`HS\'\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n           ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n              ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: Define or directive not defined: \'`HS\'\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n                         ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: Define or directive not defined: \'`VS\'\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n                                        ^~~\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n                                           ^\n%Error: data/full_repos/permissive/109394014/examples/PxsMoveLogo.v:131: Define or directive not defined: \'`VS\'\n  RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];\n                                                      ^~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n'
module PxsMoveLogo (
                input wire        px_clk,       
                input wire [25:0] RGBStr_i,      
                output reg [25:0] RGBStr_o      
               );



	parameter FILE_LOGO = "logofpga.list";
	parameter ALFA = 1'b0;
   

    parameter width_logo = 96;
    parameter height_logo = 80;





	localparam Awidth = $clog2(width_logo*height_logo);

	reg  [0:0] logo [width_logo*height_logo-1:0];


    parameter [2:0] black = 3'b000;
    parameter [2:0] blue  = 3'b001;
    parameter [2:0] green = 3'b010;
    parameter [2:0] white = 3'b111;
    parameter [2:0] pink = 3'b101;

    parameter ink = white;
    parameter background = white;

	parameter [9:0] VISIBLECOLS = 640;
	parameter [9:0] VISIBLEROWS = 480;
    parameter border = 240;
    parameter [9:0] x_logo_min = border;
    parameter [9:0] y_logo_min = border;
	parameter [9:0] x_logo_max = VISIBLECOLS - width_logo - border;
    parameter [9:0] y_logo_max = VISIBLEROWS - height_logo - border;






	wire [Awidth-1:0] addr, addr2x;

	reg [4:0] SPEED;
	reg dx,dy;
	wire endframe;
	reg [9:0] x_logo, y_logo;
	reg [9:0] x_img, y_img;
	reg [25:0] AuxStr1, AuxStr2;
	reg InLogo;
	reg pixel;
	reg [6:0] counter;
	

	initial
    begin
		if (FILE_LOGO) $readmemb(FILE_LOGO, logo);
		x_logo <=10;
		y_logo <=(VISIBLEROWS - height_logo)/4;
		dx <=0;
		dy <=1;
		SPEED <= 1;
    end
	
	assign endframe = (RGBStr_i[`XC]==VISIBLECOLS-1 && RGBStr_i[`YC]==VISIBLEROWS-1)? 1'b1 : 1'b0 ;
	assign addr=y_img*width_logo+x_img;
	



    


	always @(posedge px_clk)
    begin
		x_img <= RGBStr_i[`XC]-x_logo;
		y_img <= RGBStr_i[`YC]-y_logo;
		AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];
		AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];
		AuxStr1[`Active]<=RGBStr_i[`Active];
		AuxStr1[`RGB]<=RGBStr_i[`RGB];
	end

	always @(posedge px_clk)
    begin


		InLogo<= (x_img >= 0 && x_img < width_logo) && (y_img >= 0 && y_img < height_logo);
		AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];
		AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];
		AuxStr2[`Active]<=AuxStr1[`Active];
		AuxStr2[`RGB]<=AuxStr1[`RGB];


		pixel <= logo [addr];
	end		

	always @(posedge px_clk)
    begin
		RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];
		RGBStr_o[`XC]<=AuxStr2[`XC]; RGBStr_o[`YC]<=AuxStr2[`YC];
		RGBStr_o[`Active]<=AuxStr2[`Active];

		if(InLogo)
			RGBStr_o[`RGB]<= pixel? ink: (ALFA? AuxStr2[`RGB]:background);
		else
			RGBStr_o[`RGB]<=AuxStr2[`RGB];
	end


	always @(posedge px_clk)
    begin
		if (endframe)
		begin
				counter <= counter+1;
				




				if (counter[0]==1)
				begin
					if (y_logo>=200  ||  y_logo<80) 
						dy = ~ dy;
					if (dx==0)
						x_logo = x_logo+2;
					else 
						x_logo = x_logo-SPEED;
					if (dy==0)
						y_logo = y_logo+SPEED;
					else 
						y_logo = y_logo-SPEED;
				end
		end		
    end
	
endmodule
module PxsMoveLogo (
                input wire        px_clk,       
                input wire [25:0] RGBStr_i,      
                output reg [25:0] RGBStr_o      
               );




	parameter FILE_LOGO = "logofpga.list";
	parameter ALFA = 1'b0;
   

    parameter width_logo = 96;
    parameter height_logo = 80;





	localparam Awidth = $clog2(width_logo*height_logo);

	reg  [0:0] logo [width_logo*height_logo-1:0];


    parameter [2:0] black = 3'b000;
    parameter [2:0] blue  = 3'b001;
    parameter [2:0] green = 3'b010;
    parameter [2:0] white = 3'b111;
    parameter [2:0] pink = 3'b101;

    parameter ink = white;
    parameter background = white;

	parameter [9:0] VISIBLECOLS = 640;
	parameter [9:0] VISIBLEROWS = 480;
    parameter border = 240;
    parameter [9:0] x_logo_min = border;
    parameter [9:0] y_logo_min = border;
	parameter [9:0] x_logo_max = VISIBLECOLS - width_logo - border;
    parameter [9:0] y_logo_max = VISIBLEROWS - height_logo - border;






	wire [Awidth-1:0] addr, addr2x;

	reg [4:0] SPEED;
	reg dx,dy;
	wire endframe;
	reg [9:0] x_logo, y_logo;
	reg [9:0] x_img, y_img;
	reg [25:0] AuxStr1, AuxStr2;
	reg InLogo;
	reg pixel;
	reg [6:0] counter;
	

	initial
    begin
		if (FILE_LOGO) $readmemb(FILE_LOGO, logo);
		x_logo <=10;
		y_logo <=(VISIBLEROWS - height_logo)/4;
		dx <=0;
		dy <=1;
		SPEED <= 1;
    end
	
	assign endframe = (RGBStr_i[`XC]==VISIBLECOLS-1 && RGBStr_i[`YC]==VISIBLEROWS-1)? 1'b1 : 1'b0 ;
	assign addr=y_img*width_logo+x_img;
	



    


	always @(posedge px_clk)
    begin
		x_img <= RGBStr_i[`XC]-x_logo;
		y_img <= RGBStr_i[`YC]-y_logo;
		AuxStr1[`HS]<=RGBStr_i[`HS]; AuxStr1[`VS]<=RGBStr_i[`VS];
		AuxStr1[`XC]<=RGBStr_i[`XC]; AuxStr1[`YC]<=RGBStr_i[`YC];
		AuxStr1[`Active]<=RGBStr_i[`Active];
		AuxStr1[`RGB]<=RGBStr_i[`RGB];
	end

	always @(posedge px_clk)
    begin


		InLogo<= (x_img >= 0 && x_img < width_logo) && (y_img >= 0 && y_img < height_logo);
		AuxStr2[`HS]<=AuxStr1[`HS]; AuxStr2[`VS]<=AuxStr1[`VS];
		AuxStr2[`XC]<=AuxStr1[`XC]; AuxStr2[`YC]<=AuxStr1[`YC];
		AuxStr2[`Active]<=AuxStr1[`Active];
		AuxStr2[`RGB]<=AuxStr1[`RGB];


		pixel <= logo [addr];
	end		

	always @(posedge px_clk)
    begin
		RGBStr_o[`HS]<=AuxStr2[`HS]; RGBStr_o[`VS]<=AuxStr2[`VS];
		RGBStr_o[`XC]<=AuxStr2[`XC]; RGBStr_o[`YC]<=AuxStr2[`YC];
		RGBStr_o[`Active]<=AuxStr2[`Active];

		if(InLogo)
			RGBStr_o[`RGB]<= pixel? ink: (ALFA? AuxStr2[`RGB]:background);
		else
			RGBStr_o[`RGB]<=AuxStr2[`RGB];
	end


	always @(posedge px_clk)
    begin
		if (endframe)
		begin
				counter <= counter+1;
				




				if (counter[0]==1)
				begin
					if (y_logo>=200  ||  y_logo<80) 
						dy = ~ dy;
					if (dx==0)
						x_logo = x_logo+2;
					else 
						x_logo = x_logo-SPEED;
					if (dy==0)
						y_logo = y_logo+SPEED;
					else 
						y_logo = y_logo-SPEED;
				end
		end		
    end
	
endmodule