data/full_repos/permissive/119107706/Xilinx Project/SourceCode/General Functions/leadingOne.v
1: b'%Error: Cannot find file containing module: Project/SourceCode/General\n        ... Looked in:\n             data/full_repos/permissive/119107706/Xilinx/Project/SourceCode/General\n             data/full_repos/permissive/119107706/Xilinx/Project/SourceCode/General.v\n             data/full_repos/permissive/119107706/Xilinx/Project/SourceCode/General.sv\n             Project/SourceCode/General\n             Project/SourceCode/General.v\n             Project/SourceCode/General.sv\n             obj_dir/Project/SourceCode/General\n             obj_dir/Project/SourceCode/General.v\n             obj_dir/Project/SourceCode/General.sv\n%Error: Cannot find file containing module: Functions,data/full_repos/permissive/119107706\n%Error: Cannot find file containing module: data/full_repos/permissive/119107706/Xilinx\n%Error: Cannot find file containing module: Functions/leadingOne.v\n%Error: Exiting due to 4 error(s)\n'
module leadingOne 
		#(parameter xWL = 32)


		(input clk,
		 input ce,
		 input sclr,
		 input [xWL-1:0] x,
		 output reg [cLog2(xWL-1):0] loPosition);



		parameter ctrWidth = cLog2(xWL-1);
		

		always @ (posedge clk) begin
			loPosition = LOD(x);
		end
		

		function [ctrWidth :0] LOD;
		
		input [xWL-1:0] val;


		reg   [ctrWidth-1 :0] indx;
		integer found;
		integer ctr;
		
		begin
		   found   = 0;




			for( ctr = xWL-1; ctr >= 0; ctr = ctr-1 ) begin
				if( val[ctr] && !found) begin

					indx = ctr;
					found = 1;
				end

			end
			LOD = {found,indx};
		end	

		endfunction




		function integer cLog2;
			input [31:0] value;
			integer i;
			begin
			  i = value;
				for (cLog2=0; i>0; cLog2=cLog2+1)
					i = i >> 1;
			end		
		endfunction		

endmodule
module leadingOne 
		#(parameter xWL = 32)


		(input clk,
		 input ce,
		 input sclr,
		 input [xWL-1:0] x,
		 output reg [cLog2(xWL-1):0] loPosition);




		parameter ctrWidth = cLog2(xWL-1);
		

		always @ (posedge clk) begin
			loPosition = LOD(x);
		end
		

		function [ctrWidth :0] LOD;
		
		input [xWL-1:0] val;


		reg   [ctrWidth-1 :0] indx;
		integer found;
		integer ctr;
		
		begin
		   found   = 0;




			for( ctr = xWL-1; ctr >= 0; ctr = ctr-1 ) begin
				if( val[ctr] && !found) begin

					indx = ctr;
					found = 1;
				end

			end
			LOD = {found,indx};
		end	

		endfunction




		function integer cLog2;
			input [31:0] value;
			integer i;
			begin
			  i = value;
				for (cLog2=0; i>0; cLog2=cLog2+1)
					i = i >> 1;
			end		
		endfunction		

endmodule