data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v:124: Multiple top level modules\n                                                                                                                       : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                                                                       : ... Top module \'throttle_offset_generator\'\nmodule throttle_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, led, throttle_offset, switch_state, clk);\n       ^~~~~~~~~~~~~~~~~~~~~~~~~\n                                                                                                                       : ... Top module \'pitch_offset_generator\'\nmodule pitch_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, pitch_offset, throttle_offset, clk);\n       ^~~~~~~~~~~~~~~~~~~~~~\n                                                                                                                       : ... Top module \'roll_offset_generator\'\nmodule roll_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, roll_offset, throttle_offset, clk);\n       ^~~~~~~~~~~~~~~~~~~~~\n                                                                                                                       : ... Top module \'yaw_offset_generator\'\nmodule yaw_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, yaw_offset, throttle_offset, clk);\n       ^~~~~~~~~~~~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v:37: Operator ASSIGNDLY expects 11 bits on the Assign RHS, but Assign RHS\'s VARREF \'throttle_offset\' generates 10 bits.\n                                                                                                                   : ... In instance throttle_offset_generator\n          motor_1_offset <= throttle_offset;\n                         ^~\n%Warning-WIDTH: data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v:38: Operator ASSIGNDLY expects 11 bits on the Assign RHS, but Assign RHS\'s VARREF \'throttle_offset\' generates 10 bits.\n                                                                                                                   : ... In instance throttle_offset_generator\n          motor_2_offset <= throttle_offset;\n                         ^~\n%Warning-WIDTH: data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v:39: Operator ASSIGNDLY expects 11 bits on the Assign RHS, but Assign RHS\'s VARREF \'throttle_offset\' generates 10 bits.\n                                                                                                                   : ... In instance throttle_offset_generator\n          motor_3_offset <= throttle_offset;\n                         ^~\n%Warning-WIDTH: data/full_repos/permissive/114714167/Source-Code/PreviousTeamPorted/reciever_offset_generators.v:40: Operator ASSIGNDLY expects 11 bits on the Assign RHS, but Assign RHS\'s VARREF \'throttle_offset\' generates 10 bits.\n                                                                                                                   : ... In instance throttle_offset_generator\n          motor_4_offset <= throttle_offset;\n                         ^~\n%Error: Exiting due to 5 warning(s)\n'
module roll_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, roll_offset, throttle_offset, clk);
	output reg [10:0] motor_1_offset;
	output reg [10:0] motor_2_offset;
	output reg [10:0] motor_3_offset;
	output reg [10:0] motor_4_offset;
	input [9:0] 	  roll_offset;
	input [9:0] 	  throttle_offset;
	input             clk;
   
    parameter ROLL_MAX = 100;
	parameter MAX_STEP = 10;
	parameter ROLL_MIN = 5;
	parameter MIN_STEP = 4;
   
    always@ (posedge clk) 
	  begin
	    if (throttle_offset > 50) 
		  begin
		    if (roll_offset <= 10)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 0*MAX_STEP;
			  end
		    else if (roll_offset > 10 && roll_offset <= 20)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 1*MAX_STEP;
			  end
			else if (roll_offset > 20 && roll_offset <= 30)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 2*MAX_STEP;
			  end
			else if (roll_offset > 30 && roll_offset <= 40)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 3*MAX_STEP;
			  end
			else if (roll_offset > 40 && roll_offset <= 50)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 4*MAX_STEP;
			  end
			else if (roll_offset > 50 && roll_offset <= 60)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 5*MAX_STEP;
			  end
			else if (roll_offset > 60 && roll_offset <= 70)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 6*MAX_STEP;
			  end
			else if (roll_offset > 70 && roll_offset <= 80)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 7*MAX_STEP;
			  end
			else if (roll_offset > 80 && roll_offset <= 90)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 8*MAX_STEP;
			  end
			else if (roll_offset > 90 && roll_offset <= 100)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 9*MAX_STEP;
			  end
			else if (roll_offset > 100 && roll_offset <= 110)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 110 && roll_offset <= 120)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 120 && roll_offset <= 130)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 130 && roll_offset <= 140)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 140 && roll_offset <= 150)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 150 && roll_offset <= 160)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 160 && roll_offset <= 170)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 170 && roll_offset <= 180)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 180 && roll_offset <= 190)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 190 && roll_offset <= 195)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 195 && roll_offset <= 205)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset < 205 && roll_offset <= 210)
			  begin
			    motor_1_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 0*MIN_STEP;
			  end
		    else if (roll_offset > 210 && roll_offset <= 220)
			  begin
			    motor_1_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 1*MIN_STEP;
			  end
		    else if (roll_offset > 220 && roll_offset <= 230)
			  begin
			    motor_1_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 2*MIN_STEP;
			  end
		    else if (roll_offset > 230 && roll_offset <= 240)
			  begin
			    motor_1_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 3*MIN_STEP;
			  end
		    else if (roll_offset > 240 && roll_offset <= 250)
			  begin
			    motor_1_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 4*MIN_STEP;
			  end
			else if (roll_offset > 250 && roll_offset <= 260)
			  begin
			    motor_1_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 5*MIN_STEP;
			  end
		    else if (roll_offset > 260 && roll_offset <= 270)
			  begin
			    motor_1_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 6*MIN_STEP;
			  end
		    else if (roll_offset > 270 && roll_offset <= 280)
			  begin
			    motor_1_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 7*MIN_STEP;
			  end
		    else if (roll_offset > 280 && roll_offset <= 290)
			  begin
			    motor_1_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 8*MIN_STEP;
			  end
		    else if (roll_offset > 290 && roll_offset <= 300)
			  begin
			    motor_1_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 9*MIN_STEP;
			  end
			else if (roll_offset > 300 && roll_offset <= 310)
			  begin
			    motor_1_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+10*MIN_STEP;
			  end
			else if (roll_offset > 310 && roll_offset <= 320)
			  begin
			    motor_1_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+11*MIN_STEP;
			  end
			else if (roll_offset > 320 && roll_offset <= 330)
			  begin
			    motor_1_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+12*MIN_STEP;
			  end
			else if (roll_offset > 330 && roll_offset <= 340)
			  begin
			    motor_1_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+13*MIN_STEP;
			  end
			else if (roll_offset > 340 && roll_offset <= 350)
			  begin
			    motor_1_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+14*MIN_STEP;
			  end
			else if (roll_offset > 350 && roll_offset <= 360)
			  begin
			    motor_1_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+15*MIN_STEP;
			  end
			else if (roll_offset > 360 && roll_offset <= 370)
			  begin
			    motor_1_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+16*MIN_STEP;
			  end
			else if (roll_offset > 370 && roll_offset <= 380)
			  begin
			    motor_1_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+17*MIN_STEP;
			  end
			else if (roll_offset > 380 && roll_offset <= 390)
			  begin
			    motor_1_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+18*MIN_STEP;
			  end
			else if (roll_offset > 390)
			  begin
			    motor_1_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+19*MIN_STEP;
			  end
		  end 
	  end		  
endmodule
module roll_offset_generator(motor_1_offset, motor_2_offset, motor_3_offset, motor_4_offset, roll_offset, throttle_offset, clk);

	output reg [10:0] motor_1_offset;
	output reg [10:0] motor_2_offset;
	output reg [10:0] motor_3_offset;
	output reg [10:0] motor_4_offset;
	input [9:0] 	  roll_offset;
	input [9:0] 	  throttle_offset;
	input             clk;
   
    parameter ROLL_MAX = 100;
	parameter MAX_STEP = 10;
	parameter ROLL_MIN = 5;
	parameter MIN_STEP = 4;
   
    always@ (posedge clk) 
	  begin
	    if (throttle_offset > 50) 
		  begin
		    if (roll_offset <= 10)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 0*MAX_STEP;
			  end
		    else if (roll_offset > 10 && roll_offset <= 20)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 1*MAX_STEP;
			  end
			else if (roll_offset > 20 && roll_offset <= 30)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 2*MAX_STEP;
			  end
			else if (roll_offset > 30 && roll_offset <= 40)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 3*MAX_STEP;
			  end
			else if (roll_offset > 40 && roll_offset <= 50)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 4*MAX_STEP;
			  end
			else if (roll_offset > 50 && roll_offset <= 60)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 5*MAX_STEP;
			  end
			else if (roll_offset > 60 && roll_offset <= 70)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 6*MAX_STEP;
			  end
			else if (roll_offset > 70 && roll_offset <= 80)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 7*MAX_STEP;
			  end
			else if (roll_offset > 80 && roll_offset <= 90)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 8*MAX_STEP;
			  end
			else if (roll_offset > 90 && roll_offset <= 100)
			  begin
			    motor_1_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_2_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_3_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_4_offset <= -ROLL_MAX+ 9*MAX_STEP;
			  end
			else if (roll_offset > 100 && roll_offset <= 110)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 110 && roll_offset <= 120)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 120 && roll_offset <= 130)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 130 && roll_offset <= 140)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 140 && roll_offset <= 150)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 150 && roll_offset <= 160)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 160 && roll_offset <= 170)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 170 && roll_offset <= 180)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 180 && roll_offset <= 190)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset > 190 && roll_offset <= 195)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_3_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_4_offset <= 0;
			  end
		    else if (roll_offset > 195 && roll_offset <= 205)
			  begin
			    motor_1_offset <= 0;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= 0;
			  end
			else if (roll_offset < 205 && roll_offset <= 210)
			  begin
			    motor_1_offset <= ROLL_MIN+ 0*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 0*MIN_STEP;
			  end
		    else if (roll_offset > 210 && roll_offset <= 220)
			  begin
			    motor_1_offset <= ROLL_MIN+ 1*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 1*MIN_STEP;
			  end
		    else if (roll_offset > 220 && roll_offset <= 230)
			  begin
			    motor_1_offset <= ROLL_MIN+ 2*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 2*MIN_STEP;
			  end
		    else if (roll_offset > 230 && roll_offset <= 240)
			  begin
			    motor_1_offset <= ROLL_MIN+ 3*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 3*MIN_STEP;
			  end
		    else if (roll_offset > 240 && roll_offset <= 250)
			  begin
			    motor_1_offset <= ROLL_MIN+ 4*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 4*MIN_STEP;
			  end
			else if (roll_offset > 250 && roll_offset <= 260)
			  begin
			    motor_1_offset <= ROLL_MIN+ 5*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 5*MIN_STEP;
			  end
		    else if (roll_offset > 260 && roll_offset <= 270)
			  begin
			    motor_1_offset <= ROLL_MIN+ 6*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 6*MIN_STEP;
			  end
		    else if (roll_offset > 270 && roll_offset <= 280)
			  begin
			    motor_1_offset <= ROLL_MIN+ 7*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 7*MIN_STEP;
			  end
		    else if (roll_offset > 280 && roll_offset <= 290)
			  begin
			    motor_1_offset <= ROLL_MIN+ 8*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 8*MIN_STEP;
			  end
		    else if (roll_offset > 290 && roll_offset <= 300)
			  begin
			    motor_1_offset <= ROLL_MIN+ 9*MIN_STEP;
			    motor_2_offset <= 0;
			    motor_3_offset <= 0;
			    motor_4_offset <= ROLL_MIN+ 9*MIN_STEP;
			  end
			else if (roll_offset > 300 && roll_offset <= 310)
			  begin
			    motor_1_offset <=  ROLL_MIN+10*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 9*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+10*MIN_STEP;
			  end
			else if (roll_offset > 310 && roll_offset <= 320)
			  begin
			    motor_1_offset <=  ROLL_MIN+11*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 8*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+11*MIN_STEP;
			  end
			else if (roll_offset > 320 && roll_offset <= 330)
			  begin
			    motor_1_offset <=  ROLL_MIN+12*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 7*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+12*MIN_STEP;
			  end
			else if (roll_offset > 330 && roll_offset <= 340)
			  begin
			    motor_1_offset <=  ROLL_MIN+13*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 6*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+13*MIN_STEP;
			  end
			else if (roll_offset > 340 && roll_offset <= 350)
			  begin
			    motor_1_offset <=  ROLL_MIN+14*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 5*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+14*MIN_STEP;
			  end
			else if (roll_offset > 350 && roll_offset <= 360)
			  begin
			    motor_1_offset <=  ROLL_MIN+15*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 4*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+15*MIN_STEP;
			  end
			else if (roll_offset > 360 && roll_offset <= 370)
			  begin
			    motor_1_offset <=  ROLL_MIN+16*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 3*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+16*MIN_STEP;
			  end
			else if (roll_offset > 370 && roll_offset <= 380)
			  begin
			    motor_1_offset <=  ROLL_MIN+17*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 2*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+17*MIN_STEP;
			  end
			else if (roll_offset > 380 && roll_offset <= 390)
			  begin
			    motor_1_offset <=  ROLL_MIN+18*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 1*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+18*MIN_STEP;
			  end
			else if (roll_offset > 390)
			  begin
			    motor_1_offset <=  ROLL_MIN+19*MIN_STEP;
			    motor_2_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_3_offset <= -ROLL_MAX+ 0*MAX_STEP;
			    motor_4_offset <=  ROLL_MIN+19*MIN_STEP;
			  end
		  end 
	  end		  
endmodule