data/full_repos/permissive/158077025/mac.v
1: b"%Error: data/full_repos/permissive/158077025/mac.v:39: Cannot find file containing module: 'multiplier'\nmultiplier inst_multiplier(\n^~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/multiplier\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/multiplier.v\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/multiplier.sv\n             multiplier\n             multiplier.v\n             multiplier.sv\n             obj_dir/multiplier\n             obj_dir/multiplier.v\n             obj_dir/multiplier.sv\n%Error: data/full_repos/permissive/158077025/mac.v:53: Cannot find file containing module: 'adder'\nadder inst_adder(\n^~~~~\n%Error: Exiting due to 2 error(s)\n"
module mac(
	clk,
	layer_reset,
	stage_finish,
	mac_en,
	neuron,
	weight,
	accumulator
	);

parameter INPUT_BIT_WIDTH   = 8;
parameter PRODUCT_BIT_WIDTH = 16+4;
parameter OUTPUT_BIT_WIDTH  = 16+6+2;
parameter INI_ACCUMULATOR   = 24'h000000; 

input                             clk;
input                             layer_reset;
input                             stage_finish;
input                             mac_en;
input      [INPUT_BIT_WIDTH-1:0]  neuron;
input      [INPUT_BIT_WIDTH-1:0]  weight;
output     [OUTPUT_BIT_WIDTH-1:0] accumulator;

wire [PRODUCT_BIT_WIDTH-1:0] product;
wire [OUTPUT_BIT_WIDTH-1:0]  sum;
multiplier inst_multiplier(
	.clk(clk),

	.multi_en(mac_en),
	.multiplicator(neuron),
	.multiplicand(weight),
	.product(product)
	);


reg adder_en;
always @(posedge clk) begin
	adder_en <= mac_en;
end
adder inst_adder(
	.clk(clk),
	.layer_reset(layer_reset),
	.stage_finish(stage_finish),
	.adder_en(adder_en),
	.addend(product),
	.sum(sum)
	);

assign accumulator = sum;









endmodule
module mac(
	clk,
	layer_reset,
	stage_finish,
	mac_en,
	neuron,
	weight,
	accumulator
	);


parameter INPUT_BIT_WIDTH   = 8;
parameter PRODUCT_BIT_WIDTH = 16+4;
parameter OUTPUT_BIT_WIDTH  = 16+6+2;
parameter INI_ACCUMULATOR   = 24'h000000; 

input                             clk;
input                             layer_reset;
input                             stage_finish;
input                             mac_en;
input      [INPUT_BIT_WIDTH-1:0]  neuron;
input      [INPUT_BIT_WIDTH-1:0]  weight;
output     [OUTPUT_BIT_WIDTH-1:0] accumulator;

wire [PRODUCT_BIT_WIDTH-1:0] product;
wire [OUTPUT_BIT_WIDTH-1:0]  sum;
multiplier inst_multiplier(
	.clk(clk),

	.multi_en(mac_en),
	.multiplicator(neuron),
	.multiplicand(weight),
	.product(product)
	);


reg adder_en;
always @(posedge clk) begin
	adder_en <= mac_en;
end
adder inst_adder(
	.clk(clk),
	.layer_reset(layer_reset),
	.stage_finish(stage_finish),
	.adder_en(adder_en),
	.addend(product),
	.sum(sum)
	);

assign accumulator = sum;









endmodule