data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v
1: b"%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:88: Cannot find file containing module: 'float_multi'\nfloat_multi float_multi_K_x (\n^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/194007311,data/full_repos/permissive/194007311/float_multi\n             data/full_repos/permissive/194007311,data/full_repos/permissive/194007311/float_multi.v\n             data/full_repos/permissive/194007311,data/full_repos/permissive/194007311/float_multi.sv\n             float_multi\n             float_multi.v\n             float_multi.sv\n             obj_dir/float_multi\n             obj_dir/float_multi.v\n             obj_dir/float_multi.sv\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:94: Cannot find file containing module: 'float_multi'\nfloat_multi float_multi_K_x_1 (\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:100: Cannot find file containing module: 'float_multi'\nfloat_multi float_multi_K_x_2 (\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:106: Cannot find file containing module: 'float_multi'\nfloat_multi float_multi_K_y_1 (\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:112: Cannot find file containing module: 'float_multi'\nfloat_multi float_multi_K_y_2 (\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:119: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_x_x_1(\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:126: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_x_2_y_1(\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:133: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_y_2_temp_1(\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:140: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_y_2_temp_2(\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:147: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_x_y_sum(\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194007311/filter_float_IIR_buttorworth.v:155: Cannot find file containing module: 'float_add_sub'\nfloat_add_sub float_add_sub_out(\n^~~~~~~~~~~~~\n%Error: Exiting due to 11 error(s)\n"
module filter_butterworth( clk, rst, filter_input, filter_output );




reg [31:0] ZERO = 32'b00000000000000000000000000000000;
reg [31:0] X_K = 32'b00111011011011010100111001001101;
reg [31:0] X_1_K = 32'b00111011111011010101011010110000;
reg [31:0] X_2_K = 32'b00111011011011010100111001001101;
reg [31:0] Y_1_K = 32'b00111111111010010101100000010000;
reg [31:0] Y_2_K = 32'b00111111010101100100110000110000;




input clk;
input rst;
input [31 :0] filter_input;



output  [31: 0] filter_output;



reg [31: 0] y_2 = 0;
reg [31: 0] y_1 = 0;
reg [31: 0] x_2 = 0;
reg [31: 0] x_1 = 0;

wire [31: 0] K_y_2_temp_1;
wire [31: 0] K_y_2_temp_2;
wire [31: 0] K_y_2;
wire [31: 0] K_y_1;
wire [31: 0] K_x_2;
wire [31: 0] K_x_1;
wire [31: 0] K_x;
wire [31: 0] x_x_1;
wire [31: 0] x_2_y_1;
wire [31: 0] x_y_sum;

reg [15: 0] counter = 0;

always @(posedge clk) begin
	if (rst) begin
		y_2 <= 0;
		y_1 <= 0;
		x_2 <= 0;
		x_1 <= 0;
		counter <= 0;
	end
	else begin			
		counter <= counter + 1'b1;
		if (counter == 10000) begin
			y_2 <= y_1;
			y_1 <= filter_output;
			x_2 <= x_1;
			x_1 <= filter_input;
			counter <= 0;
		end		
	end
end


float_multi	float_multi_K_x (
	.clock ( clk ),
	.dataa ( filter_input ),
	.datab ( X_K ),
	.result ( K_x)
	);	
float_multi	float_multi_K_x_1 (
	.clock ( clk ),
	.dataa ( x_1 ),
	.datab ( X_1_K ),
	.result ( K_x_1)
	);
float_multi	float_multi_K_x_2 (
	.clock ( clk ),
	.dataa ( x_2 ),
	.datab ( X_2_K ),
	.result ( K_x_2)
	);
float_multi	float_multi_K_y_1 (
	.clock ( clk ),
	.dataa ( y_1 ),
	.datab ( Y_1_K),
	.result ( K_y_1)
	);	
float_multi	float_multi_K_y_2 (
	.clock ( clk ),
	.dataa ( y_2 ),
	.datab ( Y_2_K),
	.result ( K_y_2)
	);
	
float_add_sub	float_add_sub_x_x_1(
	.clock ( clk ),
	.dataa ( K_x ),
	.datab ( K_x_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_x_1)
	);	
float_add_sub	float_add_sub_x_2_y_1(
	.clock ( clk ),
	.dataa ( K_x_2 ),
	.datab ( K_y_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_2_y_1)
	);
float_add_sub	float_add_sub_y_2_temp_1(
	.clock ( clk ),
	.dataa ( K_y_2 ),
	.datab ( ZERO ),
	.add_sub ( 1'b1 ),
	.result ( K_y_2_temp_1)
	);
float_add_sub	float_add_sub_y_2_temp_2(
	.clock ( clk ),
	.dataa ( K_y_2_temp_1 ),
	.datab ( ZERO ),
	.add_sub ( 1'b1 ),
	.result ( K_y_2_temp_2)
	);
float_add_sub	float_add_sub_x_y_sum(
	.clock ( clk ),
	.dataa ( x_x_1 ),
	.datab ( x_2_y_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_y_sum)
	);	

float_add_sub	float_add_sub_out(
	.clock ( clk ),
	.dataa ( x_y_sum ),
	.datab ( K_y_2_temp_2 ),
	.add_sub ( 1'b0 ),
	.result ( filter_output)
	);
	
	
endmodule
module filter_butterworth( clk, rst, filter_input, filter_output );





reg [31:0] ZERO = 32'b00000000000000000000000000000000;
reg [31:0] X_K = 32'b00111011011011010100111001001101;
reg [31:0] X_1_K = 32'b00111011111011010101011010110000;
reg [31:0] X_2_K = 32'b00111011011011010100111001001101;
reg [31:0] Y_1_K = 32'b00111111111010010101100000010000;
reg [31:0] Y_2_K = 32'b00111111010101100100110000110000;




input clk;
input rst;
input [31 :0] filter_input;



output  [31: 0] filter_output;



reg [31: 0] y_2 = 0;
reg [31: 0] y_1 = 0;
reg [31: 0] x_2 = 0;
reg [31: 0] x_1 = 0;

wire [31: 0] K_y_2_temp_1;
wire [31: 0] K_y_2_temp_2;
wire [31: 0] K_y_2;
wire [31: 0] K_y_1;
wire [31: 0] K_x_2;
wire [31: 0] K_x_1;
wire [31: 0] K_x;
wire [31: 0] x_x_1;
wire [31: 0] x_2_y_1;
wire [31: 0] x_y_sum;

reg [15: 0] counter = 0;

always @(posedge clk) begin
	if (rst) begin
		y_2 <= 0;
		y_1 <= 0;
		x_2 <= 0;
		x_1 <= 0;
		counter <= 0;
	end
	else begin			
		counter <= counter + 1'b1;
		if (counter == 10000) begin
			y_2 <= y_1;
			y_1 <= filter_output;
			x_2 <= x_1;
			x_1 <= filter_input;
			counter <= 0;
		end		
	end
end


float_multi	float_multi_K_x (
	.clock ( clk ),
	.dataa ( filter_input ),
	.datab ( X_K ),
	.result ( K_x)
	);	
float_multi	float_multi_K_x_1 (
	.clock ( clk ),
	.dataa ( x_1 ),
	.datab ( X_1_K ),
	.result ( K_x_1)
	);
float_multi	float_multi_K_x_2 (
	.clock ( clk ),
	.dataa ( x_2 ),
	.datab ( X_2_K ),
	.result ( K_x_2)
	);
float_multi	float_multi_K_y_1 (
	.clock ( clk ),
	.dataa ( y_1 ),
	.datab ( Y_1_K),
	.result ( K_y_1)
	);	
float_multi	float_multi_K_y_2 (
	.clock ( clk ),
	.dataa ( y_2 ),
	.datab ( Y_2_K),
	.result ( K_y_2)
	);
	
float_add_sub	float_add_sub_x_x_1(
	.clock ( clk ),
	.dataa ( K_x ),
	.datab ( K_x_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_x_1)
	);	
float_add_sub	float_add_sub_x_2_y_1(
	.clock ( clk ),
	.dataa ( K_x_2 ),
	.datab ( K_y_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_2_y_1)
	);
float_add_sub	float_add_sub_y_2_temp_1(
	.clock ( clk ),
	.dataa ( K_y_2 ),
	.datab ( ZERO ),
	.add_sub ( 1'b1 ),
	.result ( K_y_2_temp_1)
	);
float_add_sub	float_add_sub_y_2_temp_2(
	.clock ( clk ),
	.dataa ( K_y_2_temp_1 ),
	.datab ( ZERO ),
	.add_sub ( 1'b1 ),
	.result ( K_y_2_temp_2)
	);
float_add_sub	float_add_sub_x_y_sum(
	.clock ( clk ),
	.dataa ( x_x_1 ),
	.datab ( x_2_y_1 ),
	.add_sub ( 1'b1 ),
	.result ( x_y_sum)
	);	

float_add_sub	float_add_sub_out(
	.clock ( clk ),
	.dataa ( x_y_sum ),
	.datab ( K_y_2_temp_2 ),
	.add_sub ( 1'b0 ),
	.result ( filter_output)
	);
	
	
endmodule