data/full_repos/permissive/171279647/hdl/axis/axis_bitonic_block.v
1: b"%Error: data/full_repos/permissive/171279647/hdl/axis/axis_bitonic_block.v:110: Cannot find file containing module: 'axis_bitonic_node'\n   axis_bitonic_node #(\n   ^~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_node\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_node.v\n             data/full_repos/permissive/171279647/hdl/axis,data/full_repos/permissive/171279647/axis_bitonic_node.sv\n             axis_bitonic_node\n             axis_bitonic_node.v\n             axis_bitonic_node.sv\n             obj_dir/axis_bitonic_node\n             obj_dir/axis_bitonic_node.v\n             obj_dir/axis_bitonic_node.sv\n%Error: Exiting due to 1 error(s)\n"
module axis_bitonic_block #(
	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 STAGES = ORDER + 1;
localparam STAGE_DATA_WIDTH = DATA_WIDTH*2**(ORDER+1);

wire [DATA_WIDTH*2**(ORDER+1)-1:0]axis_stage_tdata[STAGES:0];
wire [STAGES:0]axis_stage_tvalid;
wire [STAGES:0]axis_stage_tready;
wire [STAGES:0]axis_stage_tlast;

assign axis_stage_tdata[0] = s_axis_tdata;
assign axis_stage_tvalid[0] = s_axis_tvalid;
assign s_axis_tready = axis_stage_tready[0];
assign axis_stage_tlast[0] = s_axis_tlast;
assign m_axis_tdata = axis_stage_tdata[STAGES];
assign m_axis_tvalid = axis_stage_tvalid[STAGES];
assign axis_stage_tready[STAGES] = m_axis_tready;
assign m_axis_tlast = axis_stage_tlast[STAGES];

genvar stage;
genvar node;

generate for (stage = 0; stage < STAGES; stage = stage + 1) begin: BLOCK_STAGE
	localparam NODES = 2**stage;
	localparam NODE_ORDER = STAGES - stage - 1;
		
	wire [STAGE_DATA_WIDTH-1:0]s_axis_stage_tdata;
	wire s_axis_stage_tvalid;
	wire s_axis_stage_tready;
	wire s_axis_stage_tlast;
	wire [STAGE_DATA_WIDTH-1:0]m_axis_stage_tdata;
	wire m_axis_stage_tvalid;
	wire m_axis_stage_tready;
	wire m_axis_stage_tlast;
		
	assign s_axis_stage_tdata = axis_stage_tdata[stage];
	assign s_axis_stage_tvalid = axis_stage_tvalid[stage];
	assign axis_stage_tready[stage] = s_axis_stage_tready;
	assign s_axis_stage_tlast = axis_stage_tlast[stage];
	assign axis_stage_tdata[stage + 1] = m_axis_stage_tdata;
	assign m_axis_stage_tready = axis_stage_tready[stage + 1];
	assign axis_stage_tvalid[stage + 1] = m_axis_stage_tvalid;
	assign axis_stage_tlast[stage + 1] = m_axis_stage_tlast;
		
	for (node = 0; node < NODES; node = node + 1) begin: NODE
		localparam NODE_DATA_WIDTH = DATA_WIDTH*2**(NODE_ORDER+1);
		
		wire [NODE_DATA_WIDTH-1:0]s_axis_node_tdata;
		wire [NODE_DATA_WIDTH-1:0]m_axis_node_tdata;
			
		assign s_axis_node_tdata = s_axis_stage_tdata[NODE_DATA_WIDTH*(node + 1)-1-:NODE_DATA_WIDTH];
		assign m_axis_stage_tdata[NODE_DATA_WIDTH*(node + 1)-1-:NODE_DATA_WIDTH] = m_axis_node_tdata;
		
		if (node == 0) begin
			axis_bitonic_node #(
				.DATA_WIDTH(DATA_WIDTH),
				.ORDER(NODE_ORDER),
				.POLARITY(POLARITY),
				.SIGNED(SIGNED)
			) abn_inst (
				.aclk(aclk),
				.aresetn(aresetn),
				.s_axis_tdata(s_axis_node_tdata),
				.s_axis_tvalid(s_axis_stage_tvalid),
				.s_axis_tready(s_axis_stage_tready),
				.s_axis_tlast(s_axis_stage_tlast),
				.m_axis_tdata(m_axis_node_tdata),
				.m_axis_tvalid(m_axis_stage_tvalid),
				.m_axis_tready(m_axis_stage_tready),
				.m_axis_tlast(m_axis_stage_tlast)
			);
		end else begin
			axis_bitonic_node #(
				.DATA_WIDTH(DATA_WIDTH),
				.ORDER(NODE_ORDER),
				.POLARITY(POLARITY),
				.SIGNED(SIGNED)
			) abn_inst (
				.aclk(aclk),
				.aresetn(aresetn),
				.s_axis_tdata(s_axis_node_tdata),
				.s_axis_tvalid(s_axis_stage_tvalid),
				.s_axis_tready(),
				.s_axis_tlast(s_axis_stage_tlast),
				.m_axis_tdata(m_axis_node_tdata),
				.m_axis_tvalid(),
				.m_axis_tready(m_axis_stage_tready),
				.m_axis_tlast()
			);
		end
	end
end endgenerate

endmodule
module axis_bitonic_block #(
	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 STAGES = ORDER + 1;
localparam STAGE_DATA_WIDTH = DATA_WIDTH*2**(ORDER+1);

wire [DATA_WIDTH*2**(ORDER+1)-1:0]axis_stage_tdata[STAGES:0];
wire [STAGES:0]axis_stage_tvalid;
wire [STAGES:0]axis_stage_tready;
wire [STAGES:0]axis_stage_tlast;

assign axis_stage_tdata[0] = s_axis_tdata;
assign axis_stage_tvalid[0] = s_axis_tvalid;
assign s_axis_tready = axis_stage_tready[0];
assign axis_stage_tlast[0] = s_axis_tlast;
assign m_axis_tdata = axis_stage_tdata[STAGES];
assign m_axis_tvalid = axis_stage_tvalid[STAGES];
assign axis_stage_tready[STAGES] = m_axis_tready;
assign m_axis_tlast = axis_stage_tlast[STAGES];

genvar stage;
genvar node;

generate for (stage = 0; stage < STAGES; stage = stage + 1) begin: BLOCK_STAGE
	localparam NODES = 2**stage;
	localparam NODE_ORDER = STAGES - stage - 1;
		
	wire [STAGE_DATA_WIDTH-1:0]s_axis_stage_tdata;
	wire s_axis_stage_tvalid;
	wire s_axis_stage_tready;
	wire s_axis_stage_tlast;
	wire [STAGE_DATA_WIDTH-1:0]m_axis_stage_tdata;
	wire m_axis_stage_tvalid;
	wire m_axis_stage_tready;
	wire m_axis_stage_tlast;
		
	assign s_axis_stage_tdata = axis_stage_tdata[stage];
	assign s_axis_stage_tvalid = axis_stage_tvalid[stage];
	assign axis_stage_tready[stage] = s_axis_stage_tready;
	assign s_axis_stage_tlast = axis_stage_tlast[stage];
	assign axis_stage_tdata[stage + 1] = m_axis_stage_tdata;
	assign m_axis_stage_tready = axis_stage_tready[stage + 1];
	assign axis_stage_tvalid[stage + 1] = m_axis_stage_tvalid;
	assign axis_stage_tlast[stage + 1] = m_axis_stage_tlast;
		
	for (node = 0; node < NODES; node = node + 1) begin: NODE
		localparam NODE_DATA_WIDTH = DATA_WIDTH*2**(NODE_ORDER+1);
		
		wire [NODE_DATA_WIDTH-1:0]s_axis_node_tdata;
		wire [NODE_DATA_WIDTH-1:0]m_axis_node_tdata;
			
		assign s_axis_node_tdata = s_axis_stage_tdata[NODE_DATA_WIDTH*(node + 1)-1-:NODE_DATA_WIDTH];
		assign m_axis_stage_tdata[NODE_DATA_WIDTH*(node + 1)-1-:NODE_DATA_WIDTH] = m_axis_node_tdata;
		
		if (node == 0) begin
			axis_bitonic_node #(
				.DATA_WIDTH(DATA_WIDTH),
				.ORDER(NODE_ORDER),
				.POLARITY(POLARITY),
				.SIGNED(SIGNED)
			) abn_inst (
				.aclk(aclk),
				.aresetn(aresetn),
				.s_axis_tdata(s_axis_node_tdata),
				.s_axis_tvalid(s_axis_stage_tvalid),
				.s_axis_tready(s_axis_stage_tready),
				.s_axis_tlast(s_axis_stage_tlast),
				.m_axis_tdata(m_axis_node_tdata),
				.m_axis_tvalid(m_axis_stage_tvalid),
				.m_axis_tready(m_axis_stage_tready),
				.m_axis_tlast(m_axis_stage_tlast)
			);
		end else begin
			axis_bitonic_node #(
				.DATA_WIDTH(DATA_WIDTH),
				.ORDER(NODE_ORDER),
				.POLARITY(POLARITY),
				.SIGNED(SIGNED)
			) abn_inst (
				.aclk(aclk),
				.aresetn(aresetn),
				.s_axis_tdata(s_axis_node_tdata),
				.s_axis_tvalid(s_axis_stage_tvalid),
				.s_axis_tready(),
				.s_axis_tlast(s_axis_stage_tlast),
				.m_axis_tdata(m_axis_node_tdata),
				.m_axis_tvalid(),
				.m_axis_tready(m_axis_stage_tready),
				.m_axis_tlast()
			);
		end
	end
end endgenerate

endmodule