data/full_repos/permissive/171279647/hdl/axis/axis_bitonic_node.v
1: b"%Error: data/full_repos/permissive/171279647/hdl/axis/axis_bitonic_node.v:74: Cannot find file containing module: 'axis_bitonic_comp'\n  axis_bitonic_comp #(\n  ^~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_comp\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_comp.v\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_comp.sv\n             axis_bitonic_comp\n             axis_bitonic_comp.v\n             axis_bitonic_comp.sv\n             obj_dir/axis_bitonic_comp\n             obj_dir/axis_bitonic_comp.v\n             obj_dir/axis_bitonic_comp.sv\n%Error: Exiting due to 1 error(s)\n"
module axis_bitonic_node #(
	parameter DATA_WIDTH = 16,
	parameter ORDER = 0,
	parameter POLARITY = 0,
	parameter SIGNED = 0
)
(
	input wire aclk,
	input wire aresetn,
	input wire [DATA_WIDTH*2**(ORDER+1)-1:0]s_axis_tdata,
	input wire s_axis_tvalid,
	output wire s_axis_tready,
	input wire s_axis_tlast,
	output wire [DATA_WIDTH*2**(ORDER+1)-1:0]m_axis_tdata,
	output wire m_axis_tvalid,
	input wire m_axis_tready,
	output wire m_axis_tlast
);

localparam COMP_NUM = 2**ORDER;

genvar i;

generate for (i = 0; i < COMP_NUM; i = i + 1) begin: COMP
	wire [DATA_WIDTH-1:0]a;
	wire [DATA_WIDTH-1:0]b;
	wire [DATA_WIDTH-1:0]h;
	wire [DATA_WIDTH-1:0]l;
	
	assign a = s_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 0)-1-:DATA_WIDTH];
	assign b = s_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 1)-1-:DATA_WIDTH];
	assign m_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 0)-1-:DATA_WIDTH] = h;
	assign m_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 1)-1-:DATA_WIDTH] = l;

	if (i == 0) begin
		axis_bitonic_comp #(
			.DATA_WIDTH(DATA_WIDTH),
			.POLARITY(POLARITY),
			.SIGNED(SIGNED)
		) abc_inst (
			.aclk(aclk),
			.aresetn(aresetn),
			.s_axis_tdata({b,a}),
			.s_axis_tvalid(s_axis_tvalid),
			.s_axis_tready(s_axis_tready),
			.s_axis_tlast(s_axis_tlast),
			.m_axis_tdata({h,l}),
			.m_axis_tvalid(m_axis_tvalid),
			.m_axis_tready(m_axis_tready),
			.m_axis_tlast(m_axis_tlast)
		);
	end else begin
		axis_bitonic_comp #(
			.DATA_WIDTH(DATA_WIDTH),
			.POLARITY(POLARITY),
			.SIGNED(SIGNED)
		) abc_inst (
			.aclk(aclk),
			.aresetn(aresetn),
			.s_axis_tdata({b,a}),
			.s_axis_tvalid(s_axis_tvalid),
			.s_axis_tready(),
			.s_axis_tlast(s_axis_tlast),
			.m_axis_tdata({h,l}),
			.m_axis_tvalid(),
			.m_axis_tready(m_axis_tready),
			.m_axis_tlast()
		);
	end
end endgenerate

endmodule
module axis_bitonic_node #(
	parameter DATA_WIDTH = 16,
	parameter ORDER = 0,
	parameter POLARITY = 0,
	parameter SIGNED = 0
)
(
	input wire aclk,
	input wire aresetn,
	input wire [DATA_WIDTH*2**(ORDER+1)-1:0]s_axis_tdata,
	input wire s_axis_tvalid,
	output wire s_axis_tready,
	input wire s_axis_tlast,
	output wire [DATA_WIDTH*2**(ORDER+1)-1:0]m_axis_tdata,
	output wire m_axis_tvalid,
	input wire m_axis_tready,
	output wire m_axis_tlast
);


localparam COMP_NUM = 2**ORDER;

genvar i;

generate for (i = 0; i < COMP_NUM; i = i + 1) begin: COMP
	wire [DATA_WIDTH-1:0]a;
	wire [DATA_WIDTH-1:0]b;
	wire [DATA_WIDTH-1:0]h;
	wire [DATA_WIDTH-1:0]l;
	
	assign a = s_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 0)-1-:DATA_WIDTH];
	assign b = s_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 1)-1-:DATA_WIDTH];
	assign m_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 0)-1-:DATA_WIDTH] = h;
	assign m_axis_tdata[DATA_WIDTH*(i + 1 + COMP_NUM * 1)-1-:DATA_WIDTH] = l;

	if (i == 0) begin
		axis_bitonic_comp #(
			.DATA_WIDTH(DATA_WIDTH),
			.POLARITY(POLARITY),
			.SIGNED(SIGNED)
		) abc_inst (
			.aclk(aclk),
			.aresetn(aresetn),
			.s_axis_tdata({b,a}),
			.s_axis_tvalid(s_axis_tvalid),
			.s_axis_tready(s_axis_tready),
			.s_axis_tlast(s_axis_tlast),
			.m_axis_tdata({h,l}),
			.m_axis_tvalid(m_axis_tvalid),
			.m_axis_tready(m_axis_tready),
			.m_axis_tlast(m_axis_tlast)
		);
	end else begin
		axis_bitonic_comp #(
			.DATA_WIDTH(DATA_WIDTH),
			.POLARITY(POLARITY),
			.SIGNED(SIGNED)
		) abc_inst (
			.aclk(aclk),
			.aresetn(aresetn),
			.s_axis_tdata({b,a}),
			.s_axis_tvalid(s_axis_tvalid),
			.s_axis_tready(),
			.s_axis_tlast(s_axis_tlast),
			.m_axis_tdata({h,l}),
			.m_axis_tvalid(),
			.m_axis_tready(m_axis_tready),
			.m_axis_tlast()
		);
	end
end endgenerate

endmodule