data/full_repos/permissive/516181732/src/command_generator.v
data/verilator_xmls/3a29651f-e46c-48e7-927f-be417b4fd0d1.xml
module command_generator(
	input wire [25:0]addr_img_buffer,
	input wire [15:0]area_X,
	input wire [15:0]area_Y,
	input wire [15:0]area_W,
	input wire [15:0]area_H,
	input wire [15:0]pixel,
	input wire [15:0]D_mode,
	input wire [7:0]command_select,
	input wire [7:0]command_index,
	output wire [16:0]command,
	output wire command_done
);




	wire [16:0]command_query_for_ready = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0010 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_1224 :
		command_index ==  4 ? 17'h0_1000 :
		command_index ==  5 ? 17'h0_0000 :
		command_index ==  6 ? 17'h1_0000 :
		17'h0_0000;
	wire doneflag_query_for_ready = ( command_index > 6 );
	

	wire [16:0]command_initialize = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0001 :

		command_index ==  2 ? 17'h0_6000 :
		command_index ==  3 ? 17'h1_0302 :
		command_index ==  4 ? 17'h0_1000 :
		command_index ==  5 ? 17'h0_0000 :
		command_index ==  6 ? 17'h0_0000 :
		command_index == 25 ? 17'h1_0000 :

		command_index == 26 ? 17'h0_6000 :
		command_index == 27 ? 17'h1_0011 :
		command_index == 28 ? 17'h0_0000 :
		command_index == 29 ? 17'h1_0004 :
		command_index == 30 ? 17'h0_0000 :
		command_index == 31 ? 17'h1_0001 :

		command_index == 32 ? 17'h0_6000 :
		command_index == 33 ? 17'h1_0039 :
		command_index == 34 ? 17'h0_0000 :
		command_index == 35 ? 17'h1_0001 :
		command_index == 36 ? 17'h0_0000 :
		command_index == 37 ? 17'h1_0870 :
		17'h0_0000;
	wire doneflag_initialize = ( command_index > 37 );
	

	wire [16:0]command_set_memory_address = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0011 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_020A :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,6'b0,addr_img_buffer[25:16]} :

		command_index ==  6 ? 17'h0_6000 :
		command_index ==  7 ? 17'h1_0011 :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? 17'h1_0208 :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,addr_img_buffer[15:0]} :

		17'h0_0000;
	wire doneflag_set_memory_address = ( command_index > 11 );
	

	wire [16:0]command_load_image_start = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0021 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_0022 :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,area_X} :
		command_index ==  6 ? 17'h0_0000 :
		command_index ==  7 ? {1'b1,area_Y} :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? {1'b1,area_W} :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,area_H} :
		17'h0_0000;
	wire doneflag_load_image_start = ( command_index > 11 );
	

	wire [16:0]command_load_image_transfer = 

		command_index ==  0 ? 17'h0_0000 :
		command_index ==  1 ? {1'b1,pixel} :
		17'h0_0000;
	wire doneflag_load_image_transfer = ( command_index > 1 );
	

	wire [16:0]command_load_image_end = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0022 :
		17'h0_0000;
	wire doneflag_load_image_end = ( command_index > 1 );
	

	wire [16:0]command_display_image = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0034 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? {1'b1,area_X} :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,area_Y} :
		command_index ==  6 ? 17'h0_0000 :
		command_index ==  7 ? {1'b1,area_W} :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? {1'b1,area_H} :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,D_mode} :
		17'h0_0000;
	wire doneflag_display_image = ( command_index > 11 );
	
	

	assign command = 
		command_select ==  0 ? 17'h1_0000 :
		command_select ==  1 ? command_query_for_ready :
		command_select ==  2 ? command_initialize :
		command_select ==  3 ? command_set_memory_address :
		command_select ==  4 ? command_load_image_start :
		command_select ==  5 ? command_load_image_transfer :
		command_select ==  6 ? command_load_image_end :
		command_select ==  7 ? command_display_image :
		17'h1_0000;
	assign command_done =
		command_select ==  0 ? 1'b1 :
		command_select ==  1 ? doneflag_query_for_ready :
		command_select ==  2 ? doneflag_initialize :
		command_select ==  3 ? doneflag_set_memory_address :
		command_select ==  4 ? doneflag_load_image_start :
		command_select ==  5 ? doneflag_load_image_transfer :
		command_select ==  6 ? doneflag_load_image_end :
		command_select ==  7 ? doneflag_display_image :
		1'b1;


endmodule
module command_generator(
	input wire [25:0]addr_img_buffer,
	input wire [15:0]area_X,
	input wire [15:0]area_Y,
	input wire [15:0]area_W,
	input wire [15:0]area_H,
	input wire [15:0]pixel,
	input wire [15:0]D_mode,
	input wire [7:0]command_select,
	input wire [7:0]command_index,
	output wire [16:0]command,
	output wire command_done
);





	wire [16:0]command_query_for_ready = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0010 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_1224 :
		command_index ==  4 ? 17'h0_1000 :
		command_index ==  5 ? 17'h0_0000 :
		command_index ==  6 ? 17'h1_0000 :
		17'h0_0000;
	wire doneflag_query_for_ready = ( command_index > 6 );
	

	wire [16:0]command_initialize = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0001 :

		command_index ==  2 ? 17'h0_6000 :
		command_index ==  3 ? 17'h1_0302 :
		command_index ==  4 ? 17'h0_1000 :
		command_index ==  5 ? 17'h0_0000 :
		command_index ==  6 ? 17'h0_0000 :
		command_index == 25 ? 17'h1_0000 :

		command_index == 26 ? 17'h0_6000 :
		command_index == 27 ? 17'h1_0011 :
		command_index == 28 ? 17'h0_0000 :
		command_index == 29 ? 17'h1_0004 :
		command_index == 30 ? 17'h0_0000 :
		command_index == 31 ? 17'h1_0001 :

		command_index == 32 ? 17'h0_6000 :
		command_index == 33 ? 17'h1_0039 :
		command_index == 34 ? 17'h0_0000 :
		command_index == 35 ? 17'h1_0001 :
		command_index == 36 ? 17'h0_0000 :
		command_index == 37 ? 17'h1_0870 :
		17'h0_0000;
	wire doneflag_initialize = ( command_index > 37 );
	

	wire [16:0]command_set_memory_address = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0011 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_020A :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,6'b0,addr_img_buffer[25:16]} :

		command_index ==  6 ? 17'h0_6000 :
		command_index ==  7 ? 17'h1_0011 :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? 17'h1_0208 :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,addr_img_buffer[15:0]} :

		17'h0_0000;
	wire doneflag_set_memory_address = ( command_index > 11 );
	

	wire [16:0]command_load_image_start = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0021 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? 17'h1_0022 :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,area_X} :
		command_index ==  6 ? 17'h0_0000 :
		command_index ==  7 ? {1'b1,area_Y} :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? {1'b1,area_W} :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,area_H} :
		17'h0_0000;
	wire doneflag_load_image_start = ( command_index > 11 );
	

	wire [16:0]command_load_image_transfer = 

		command_index ==  0 ? 17'h0_0000 :
		command_index ==  1 ? {1'b1,pixel} :
		17'h0_0000;
	wire doneflag_load_image_transfer = ( command_index > 1 );
	

	wire [16:0]command_load_image_end = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0022 :
		17'h0_0000;
	wire doneflag_load_image_end = ( command_index > 1 );
	

	wire [16:0]command_display_image = 

		command_index ==  0 ? 17'h0_6000 :
		command_index ==  1 ? 17'h1_0034 :
		command_index ==  2 ? 17'h0_0000 :
		command_index ==  3 ? {1'b1,area_X} :
		command_index ==  4 ? 17'h0_0000 :
		command_index ==  5 ? {1'b1,area_Y} :
		command_index ==  6 ? 17'h0_0000 :
		command_index ==  7 ? {1'b1,area_W} :
		command_index ==  8 ? 17'h0_0000 :
		command_index ==  9 ? {1'b1,area_H} :
		command_index == 10 ? 17'h0_0000 :
		command_index == 11 ? {1'b1,D_mode} :
		17'h0_0000;
	wire doneflag_display_image = ( command_index > 11 );
	
	

	assign command = 
		command_select ==  0 ? 17'h1_0000 :
		command_select ==  1 ? command_query_for_ready :
		command_select ==  2 ? command_initialize :
		command_select ==  3 ? command_set_memory_address :
		command_select ==  4 ? command_load_image_start :
		command_select ==  5 ? command_load_image_transfer :
		command_select ==  6 ? command_load_image_end :
		command_select ==  7 ? command_display_image :
		17'h1_0000;
	assign command_done =
		command_select ==  0 ? 1'b1 :
		command_select ==  1 ? doneflag_query_for_ready :
		command_select ==  2 ? doneflag_initialize :
		command_select ==  3 ? doneflag_set_memory_address :
		command_select ==  4 ? doneflag_load_image_start :
		command_select ==  5 ? doneflag_load_image_transfer :
		command_select ==  6 ? doneflag_load_image_end :
		command_select ==  7 ? doneflag_display_image :
		1'b1;


endmodule