data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_blc.v
data/verilator_xmls/1a346cd9-2ae2-46fd-a4b0-dcbeb20c3e3b.xml
function [BITS-1:0] blc_sub;
		input [BITS-1:0] value;
		input [1:0] format;
		case (format)
			2'b00: blc_sub = value > black_b ? value - black_b : {BITS{1'b0}};
			2'b01: blc_sub = value > black_gb ? value - black_gb : {BITS{1'b0}};
			2'b10: blc_sub = value > black_gr ? value - black_gr : {BITS{1'b0}};
			2'b11: blc_sub = value > black_r ? value - black_r : {BITS{1'b0}};
			default: blc_sub = {BITS{1'b0}};
		endcase
	endfunction
function [BITS-1:0] blc_sub;

		input [BITS-1:0] value;
		input [1:0] format;
		case (format)
			2'b00: blc_sub = value > black_b ? value - black_b : {BITS{1'b0}};
			2'b01: blc_sub = value > black_gb ? value - black_gb : {BITS{1'b0}};
			2'b10: blc_sub = value > black_gr ? value - black_gr : {BITS{1'b0}};
			2'b11: blc_sub = value > black_r ? value - black_r : {BITS{1'b0}};
			default: blc_sub = {BITS{1'b0}};
		endcase
	endfunction