data/full_repos/permissive/164482394/Verilog/MIDI_PitchConv.v
 line:115: before: "pitchOut"
data/verilator_xmls/2b7b3318-08bb-4901-995f-5ff95d219fd3.xml
module MIDI_PitchConv(dataIn, pitchOut, velOut, Clk);
	input [15:0] dataIn;
	input Clk;
	output reg [23:0] pitchOut;
	output [7:0] velOut;
	
	assign velOut = dataIn[7:0];
	
	always @ (dataIn[15:8])
	begin

		
		case (dataIn[15:8])

			23	: pitchOut = 	806452;
			24	: pitchOut = 	757576;
			25	: pitchOut = 	714286;
			26	: pitchOut = 	675676;
			27	: pitchOut = 	641026;
			28	: pitchOut = 	609756;
			29	: pitchOut = 	568182;
			30	: pitchOut = 	543478;
			31	: pitchOut = 	510204;
			32	: pitchOut = 	480769;
			33	: pitchOut = 	454545;
			34	: pitchOut = 	431034;
			35	: pitchOut = 	403226;
			36	: pitchOut = 	384615;
			37	: pitchOut = 	362319;
			38	: pitchOut = 	342466;
			39	: pitchOut = 	320513;
			40	: pitchOut = 	304878;
			41	: pitchOut = 	287356;
			42	: pitchOut = 	268817;
			43	: pitchOut = 	255102;
			44	: pitchOut = 	240385;
			45	: pitchOut = 	227273;
			46	: pitchOut = 	213675;
			47	: pitchOut = 	203252;
			48	: pitchOut = 	190840;
			49	: pitchOut = 	179856;
			50	: pitchOut = 	170068;
			51	: pitchOut = 	160256;
			52	: pitchOut = 	304878;
			53	: pitchOut = 	287356;
			54	: pitchOut = 	135135;
			55	: pitchOut = 	127551;
			56	: pitchOut = 	120192;
			57	: pitchOut = 	113636;
			58	: pitchOut = 	107296;
			59	: pitchOut = 	101215;
			60	: pitchOut = 	95420;
			61	: pitchOut = 	90253;
			62	: pitchOut = 	85034;
			63	: pitchOut = 	80386;
			64	: pitchOut = 	75758;
			65	: pitchOut = 	71633;
			66	: pitchOut = 	67568;
			67	: pitchOut = 	63776;
			68	: pitchOut = 	60241;
			69	: pitchOut = 	56818;
			70	: pitchOut = 	53648;
			71	: pitchOut = 	50607;
			72	: pitchOut = 	47801;
			73	: pitchOut = 	45126;
			74	: pitchOut = 	42589;
			75	: pitchOut = 	40193;
			76	: pitchOut = 	37936;
			77	: pitchOut = 	35817;
			78	: pitchOut = 	33784;
			79	: pitchOut = 	31888;
			80	: pitchOut = 	30084;
			81	: pitchOut = 	28409;
			82	: pitchOut = 	26824;
			83	: pitchOut = 	25304;
			84	: pitchOut = 	23878;
			85	: pitchOut = 	22543;
			86	: pitchOut = 	21277;
			87	: pitchOut = 	20080;
			88	: pitchOut = 	18954;
			89	: pitchOut = 	17895;
			90	: pitchOut = 	16892;
			91	: pitchOut = 	15944;
			92	: pitchOut = 	15051;
			93	: pitchOut = 	14205;
			94	: pitchOut = 	13405;
			95	: pitchOut = 	12652;
			96	: pitchOut = 	11945;
			97	: pitchOut = 	11276;
			98	: pitchOut = 	10643;
			99	: pitchOut = 	10044;
			100: pitchOut = 	9480;
			101: pitchOut = 	8948;
			102: pitchOut = 	8446;
			103: pitchOut = 	7972;
			104: pitchOut = 	7526;
			105: pitchOut = 	7102;
			106: pitchOut = 	6704;
			107: pitchOut = 	6328;
			108: pitchOut = 	5972;
			109: pitchOut = 	5637;
			110: pitchOut = 	5320;
			111: pitchOut = 	5022;
			default pitchOut = 0;
		endcase
	end

endmodule
module MIDI_PitchConv(dataIn, pitchOut, velOut, Clk);

	input [15:0] dataIn;
	input Clk;
	output reg [23:0] pitchOut;
	output [7:0] velOut;
	
	assign velOut = dataIn[7:0];
	
	always @ (dataIn[15:8])
	begin

		
		case (dataIn[15:8])

			23	: pitchOut = 	806452;
			24	: pitchOut = 	757576;
			25	: pitchOut = 	714286;
			26	: pitchOut = 	675676;
			27	: pitchOut = 	641026;
			28	: pitchOut = 	609756;
			29	: pitchOut = 	568182;
			30	: pitchOut = 	543478;
			31	: pitchOut = 	510204;
			32	: pitchOut = 	480769;
			33	: pitchOut = 	454545;
			34	: pitchOut = 	431034;
			35	: pitchOut = 	403226;
			36	: pitchOut = 	384615;
			37	: pitchOut = 	362319;
			38	: pitchOut = 	342466;
			39	: pitchOut = 	320513;
			40	: pitchOut = 	304878;
			41	: pitchOut = 	287356;
			42	: pitchOut = 	268817;
			43	: pitchOut = 	255102;
			44	: pitchOut = 	240385;
			45	: pitchOut = 	227273;
			46	: pitchOut = 	213675;
			47	: pitchOut = 	203252;
			48	: pitchOut = 	190840;
			49	: pitchOut = 	179856;
			50	: pitchOut = 	170068;
			51	: pitchOut = 	160256;
			52	: pitchOut = 	304878;
			53	: pitchOut = 	287356;
			54	: pitchOut = 	135135;
			55	: pitchOut = 	127551;
			56	: pitchOut = 	120192;
			57	: pitchOut = 	113636;
			58	: pitchOut = 	107296;
			59	: pitchOut = 	101215;
			60	: pitchOut = 	95420;
			61	: pitchOut = 	90253;
			62	: pitchOut = 	85034;
			63	: pitchOut = 	80386;
			64	: pitchOut = 	75758;
			65	: pitchOut = 	71633;
			66	: pitchOut = 	67568;
			67	: pitchOut = 	63776;
			68	: pitchOut = 	60241;
			69	: pitchOut = 	56818;
			70	: pitchOut = 	53648;
			71	: pitchOut = 	50607;
			72	: pitchOut = 	47801;
			73	: pitchOut = 	45126;
			74	: pitchOut = 	42589;
			75	: pitchOut = 	40193;
			76	: pitchOut = 	37936;
			77	: pitchOut = 	35817;
			78	: pitchOut = 	33784;
			79	: pitchOut = 	31888;
			80	: pitchOut = 	30084;
			81	: pitchOut = 	28409;
			82	: pitchOut = 	26824;
			83	: pitchOut = 	25304;
			84	: pitchOut = 	23878;
			85	: pitchOut = 	22543;
			86	: pitchOut = 	21277;
			87	: pitchOut = 	20080;
			88	: pitchOut = 	18954;
			89	: pitchOut = 	17895;
			90	: pitchOut = 	16892;
			91	: pitchOut = 	15944;
			92	: pitchOut = 	15051;
			93	: pitchOut = 	14205;
			94	: pitchOut = 	13405;
			95	: pitchOut = 	12652;
			96	: pitchOut = 	11945;
			97	: pitchOut = 	11276;
			98	: pitchOut = 	10643;
			99	: pitchOut = 	10044;
			100: pitchOut = 	9480;
			101: pitchOut = 	8948;
			102: pitchOut = 	8446;
			103: pitchOut = 	7972;
			104: pitchOut = 	7526;
			105: pitchOut = 	7102;
			106: pitchOut = 	6704;
			107: pitchOut = 	6328;
			108: pitchOut = 	5972;
			109: pitchOut = 	5637;
			110: pitchOut = 	5320;
			111: pitchOut = 	5022;
			default pitchOut = 0;
		endcase
	end

endmodule