data/full_repos/permissive/16507090/bus/bus.v
 line:19: before: "]"
1: b'%Error: data/full_repos/permissive/16507090/bus/bus.v:1: Cannot find include file: fifo/fifo.v\n`include "fifo/fifo.v" \n         ^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/16507090/bus,data/full_repos/permissive/16507090/fifo/fifo.v\n             data/full_repos/permissive/16507090/bus,data/full_repos/permissive/16507090/fifo/fifo.v.v\n             data/full_repos/permissive/16507090/bus,data/full_repos/permissive/16507090/fifo/fifo.v.sv\n             fifo/fifo.v\n             fifo/fifo.v.v\n             fifo/fifo.v.sv\n             obj_dir/fifo/fifo.v\n             obj_dir/fifo/fifo.v.v\n             obj_dir/fifo/fifo.v.sv\n%Error: Exiting due to 1 error(s)\n'
module BusReader
#(
	parameter bus_width=32,
	parameter bus_max_devices=16,
	parameter bus_buffer_size=32,
	parameter device_id=1
)
(

	input clk,
	input [bus_width-1:0] bus_data,
	input [bus_max_devices-1:0] bus_receiver,
	output [bus_max_devices-1:0] bus_buffer_full,
	input  [bus_max_devices-1:0] bus_voice,

	output [bus_width-1:0] client_data,
	output [bus_max_devices-1:0] client_source_addr,
	input client_next,
	output client_buffer_empty,
	output client_buffer_full
);
	wire data_on_bus=bus_receiver[device_id] && bus_voice;
	assign bus_buffer_full[device_id]=client_buffer_full;

	wire clear=0;

	FIFO
	#(
		.data_width(bus_width),
		.size(bus_buffer_size),
		.device_id(device_id)
	) buffer
	(	
		.data_in(bus_data),
		.data_out(client_data),
		.clk(clk),
		.next(client_next),
		.insert(data_on_bus),
		.clear(clear),
		.full(client_buffer_full),
		.empty(client_buffer_empty)
	);
	
	wire sender_addresses_buffer_full;
	wire sender_addresses_buffer_empty;

	FIFO
	#(
		.data_width(bus_max_devices), 
		.size(bus_buffer_size),
		.device_id(device_id<<1)
	) sender_addresses
	(
		.data_in(bus_voice),
		.data_out(client_source_addr),
		.clk(clk),
		.next(client_next),
		.insert(data_on_bus),
		.clear(clear),
		.full(sender_addresses_buffer_full),
		.empty(sender_addresses_buffer_empty)
	);

	always @(posedge clk) begin
		if (data_on_bus && client_source_addr==0)
			$display("BusReader %d: --MAJOR SCREWUP-- Received data from address 0",device_id);
	end
endmodule
module BusReader
#(
	parameter bus_width=32,
	parameter bus_max_devices=16,
	parameter bus_buffer_size=32,
	parameter device_id=1
)
(

	input clk,
	input [bus_width-1:0] bus_data,
	input [bus_max_devices-1:0] bus_receiver,
	output [bus_max_devices-1:0] bus_buffer_full,
	input  [bus_max_devices-1:0] bus_voice,

	output [bus_width-1:0] client_data,
	output [bus_max_devices-1:0] client_source_addr,
	input client_next,
	output client_buffer_empty,
	output client_buffer_full
);

	wire data_on_bus=bus_receiver[device_id] && bus_voice;
	assign bus_buffer_full[device_id]=client_buffer_full;

	wire clear=0;

	FIFO
	#(
		.data_width(bus_width),
		.size(bus_buffer_size),
		.device_id(device_id)
	) buffer
	(	
		.data_in(bus_data),
		.data_out(client_data),
		.clk(clk),
		.next(client_next),
		.insert(data_on_bus),
		.clear(clear),
		.full(client_buffer_full),
		.empty(client_buffer_empty)
	);
	
	wire sender_addresses_buffer_full;
	wire sender_addresses_buffer_empty;

	FIFO
	#(
		.data_width(bus_max_devices), 
		.size(bus_buffer_size),
		.device_id(device_id<<1)
	) sender_addresses
	(
		.data_in(bus_voice),
		.data_out(client_source_addr),
		.clk(clk),
		.next(client_next),
		.insert(data_on_bus),
		.clear(clear),
		.full(sender_addresses_buffer_full),
		.empty(sender_addresses_buffer_empty)
	);

	always @(posedge clk) begin
		if (data_on_bus && client_source_addr==0)
			$display("BusReader %d: --MAJOR SCREWUP-- Received data from address 0",device_id);
	end
endmodule