data/full_repos/permissive/120944384/code/synt/tone_mapping.sv
1: b"%Error: data/full_repos/permissive/120944384/code/synt/tone_mapping.sv:24: Cannot find file containing module: 'min_max_detector'\nmin_max_detector \n^~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/120944384/code/synt,data/full_repos/permissive/120944384/min_max_detector\n             data/full_repos/permissive/120944384/code/synt,data/full_repos/permissive/120944384/min_max_detector.v\n             data/full_repos/permissive/120944384/code/synt,data/full_repos/permissive/120944384/min_max_detector.sv\n             min_max_detector\n             min_max_detector.v\n             min_max_detector.sv\n             obj_dir/min_max_detector\n             obj_dir/min_max_detector.v\n             obj_dir/min_max_detector.sv\n%Error: data/full_repos/permissive/120944384/code/synt/tone_mapping.sv:48: Cannot find file containing module: 'tone_mapping_divider'\ntone_mapping_divider tone_mapping_divider_inst\n^~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module tone_mapping
#(
    parameter W = 10
)
(
	input wire				clk,
	input wire				reset_n,
    input wire				sop,
	input wire				eop,
	input wire				valid,	
	input wire	[W-1: 0]	data,
	input wire	[7:0]		reg_parallax_corr,		
	output wire	[W-3: 0]	data_o	
);

wire	[W-1:  0]	min;
wire	[W-1:  0]	max;
wire	[W-1:  0]	max_min_diff;
reg		[W-1:  0]	data_min_diff;
reg		[(W-1)*2:0] data_min_diff_mult;


min_max_detector 
#(
    .W	( W		)
)
min_max_detector_inst
(
	.clk			( clk				),
	.reset_n        ( reset_n			),
    .sop            ( sop				),
	.eop            ( eop				),
	.valid          ( valid				),
	.data           ( data				),
	.min            ( min				),
	.max            ( max				),
	.max_min_diff   ( max_min_diff		),
	.reg_parallax_corr (reg_parallax_corr)	
);
	
always @( posedge clk )
	begin
		data_min_diff 		<= data - min;
		data_min_diff_mult 	<= data_min_diff*255;
	end
	
tone_mapping_divider tone_mapping_divider_inst
(
	.clock			( clk					),
	.denom          ( max_min_diff			),
	.numer          ( data_min_diff_mult	),
	.quotient       ( data_o				),
	.remain         (						)
);	
	
endmodule
module tone_mapping
#(
    parameter W = 10
)
(
	input wire				clk,
	input wire				reset_n,
    input wire				sop,
	input wire				eop,
	input wire				valid,	
	input wire	[W-1: 0]	data,
	input wire	[7:0]		reg_parallax_corr,		
	output wire	[W-3: 0]	data_o	
);


wire	[W-1:  0]	min;
wire	[W-1:  0]	max;
wire	[W-1:  0]	max_min_diff;
reg		[W-1:  0]	data_min_diff;
reg		[(W-1)*2:0] data_min_diff_mult;


min_max_detector 
#(
    .W	( W		)
)
min_max_detector_inst
(
	.clk			( clk				),
	.reset_n        ( reset_n			),
    .sop            ( sop				),
	.eop            ( eop				),
	.valid          ( valid				),
	.data           ( data				),
	.min            ( min				),
	.max            ( max				),
	.max_min_diff   ( max_min_diff		),
	.reg_parallax_corr (reg_parallax_corr)	
);
	
always @( posedge clk )
	begin
		data_min_diff 		<= data - min;
		data_min_diff_mult 	<= data_min_diff*255;
	end
	
tone_mapping_divider tone_mapping_divider_inst
(
	.clock			( clk					),
	.denom          ( max_min_diff			),
	.numer          ( data_min_diff_mult	),
	.quotient       ( data_o				),
	.remain         (						)
);	
	
endmodule