// subsys_cam_vfb.v

// This file was auto-generated from alt_vip_cl_vfb_hw.tcl.  If you edit it your changes
// will probably be lost.
// 
// Generated using ACDS version 18.1 625

`timescale 1 ps / 1 ps
module subsys_cam_vfb #(
		parameter BITS_PER_SYMBOL              = 8,
		parameter NUMBER_OF_COLOR_PLANES       = 3,
		parameter COLOR_PLANES_ARE_IN_PARALLEL = 1,
		parameter PIXELS_IN_PARALLEL           = 1,
		parameter READY_LATENCY                = 1,
		parameter MAX_WIDTH                    = 1280,
		parameter MAX_HEIGHT                   = 720,
		parameter CLOCKS_ARE_SEPARATE          = 0,
		parameter MEM_PORT_WIDTH               = 256,
		parameter MEM_BASE_ADDR                = 2130706432,
		parameter BURST_ALIGNMENT              = 1,
		parameter WRITE_FIFO_DEPTH             = 16,
		parameter WRITE_BURST_TARGET           = 8,
		parameter READ_FIFO_DEPTH              = 16,
		parameter READ_BURST_TARGET            = 8,
		parameter WRITER_RUNTIME_CONTROL       = 1,
		parameter READER_RUNTIME_CONTROL       = 0,
		parameter IS_FRAME_WRITER              = 1,
		parameter IS_FRAME_READER              = 0,
		parameter DROP_FRAMES                  = 1,
		parameter REPEAT_FRAMES                = 1,
		parameter DROP_REPEAT_USER             = 0,
		parameter INTERLACED_SUPPORT           = 0,
		parameter CONTROLLED_DROP_REPEAT       = 0,
		parameter DROP_INVALID_FIELDS          = 0,
		parameter MULTI_FRAME_DELAY            = 1,
		parameter IS_SYNC_MASTER               = 0,
		parameter IS_SYNC_SLAVE                = 0,
		parameter LINE_BASED_BUFFERING         = 0,
		parameter PRIORITIZE_FMAX              = 0,
		parameter USER_PACKETS_MAX_STORAGE     = 0,
		parameter MAX_SYMBOLS_PER_PACKET       = 10,
		parameter NUM_BUFFERS                  = 3
	) (
		input  wire         main_clock,                //        main_clock.clk
		input  wire         main_reset,                //        main_reset.reset
		input  wire [23:0]  din_data,                  //               din.data
		input  wire         din_valid,                 //                  .valid
		input  wire         din_startofpacket,         //                  .startofpacket
		input  wire         din_endofpacket,           //                  .endofpacket
		output wire         din_ready,                 //                  .ready
		output wire [31:0]  mem_master_wr_address,     //     mem_master_wr.address
		output wire [3:0]   mem_master_wr_burstcount,  //                  .burstcount
		input  wire         mem_master_wr_waitrequest, //                  .waitrequest
		output wire         mem_master_wr_write,       //                  .write
		output wire [255:0] mem_master_wr_writedata,   //                  .writedata
		output wire [31:0]  mem_master_wr_byteenable,  //                  .byteenable
		output wire         control_interrupt_irq,     // control_interrupt.irq
		input  wire [3:0]   control_address,           //           control.address
		input  wire [3:0]   control_byteenable,        //                  .byteenable
		input  wire         control_write,             //                  .write
		input  wire [31:0]  control_writedata,         //                  .writedata
		input  wire         control_read,              //                  .read
		output wire [31:0]  control_readdata,          //                  .readdata
		output wire         control_readdatavalid,     //                  .readdatavalid
		output wire         control_waitrequest        //                  .waitrequest
	);

	wire         video_in_av_st_dout_valid;         // video_in:av_st_dout_valid -> wr_ctrl:vib_data_valid
	wire  [55:0] video_in_av_st_dout_data;          // video_in:av_st_dout_data -> wr_ctrl:vib_data_data
	wire         video_in_av_st_dout_ready;         // wr_ctrl:vib_data_ready -> video_in:av_st_dout_ready
	wire         video_in_av_st_dout_startofpacket; // video_in:av_st_dout_startofpacket -> wr_ctrl:vib_data_startofpacket
	wire         video_in_av_st_dout_endofpacket;   // video_in:av_st_dout_endofpacket -> wr_ctrl:vib_data_endofpacket
	wire         video_in_av_st_resp_valid;         // video_in:av_st_resp_valid -> wr_ctrl:vib_resp_valid
	wire  [63:0] video_in_av_st_resp_data;          // video_in:av_st_resp_data -> wr_ctrl:vib_resp_data
	wire         video_in_av_st_resp_ready;         // wr_ctrl:vib_resp_ready -> video_in:av_st_resp_ready
	wire         video_in_av_st_resp_startofpacket; // video_in:av_st_resp_startofpacket -> wr_ctrl:vib_resp_startofpacket
	wire         video_in_av_st_resp_endofpacket;   // video_in:av_st_resp_endofpacket -> wr_ctrl:vib_resp_endofpacket
	wire         wr_ctrl_vib_cmd_valid;             // wr_ctrl:vib_cmd_valid -> video_in:av_st_cmd_valid
	wire  [63:0] wr_ctrl_vib_cmd_data;              // wr_ctrl:vib_cmd_data -> video_in:av_st_cmd_data
	wire         wr_ctrl_vib_cmd_ready;             // video_in:av_st_cmd_ready -> wr_ctrl:vib_cmd_ready
	wire         wr_ctrl_vib_cmd_startofpacket;     // wr_ctrl:vib_cmd_startofpacket -> video_in:av_st_cmd_startofpacket
	wire         wr_ctrl_vib_cmd_endofpacket;       // wr_ctrl:vib_cmd_endofpacket -> video_in:av_st_cmd_endofpacket
	wire         wr_ctrl_pkt_wr_cmd_valid;          // wr_ctrl:pkt_wr_cmd_valid -> pkt_trans_wr:av_st_cmd_valid
	wire  [63:0] wr_ctrl_pkt_wr_cmd_data;           // wr_ctrl:pkt_wr_cmd_data -> pkt_trans_wr:av_st_cmd_data
	wire         wr_ctrl_pkt_wr_cmd_ready;          // pkt_trans_wr:av_st_cmd_ready -> wr_ctrl:pkt_wr_cmd_ready
	wire         wr_ctrl_pkt_wr_cmd_startofpacket;  // wr_ctrl:pkt_wr_cmd_startofpacket -> pkt_trans_wr:av_st_cmd_startofpacket
	wire         wr_ctrl_pkt_wr_cmd_endofpacket;    // wr_ctrl:pkt_wr_cmd_endofpacket -> pkt_trans_wr:av_st_cmd_endofpacket
	wire         wr_ctrl_pkt_wr_data_valid;         // wr_ctrl:pkt_wr_data_valid -> pkt_trans_wr:av_st_din_valid
	wire  [55:0] wr_ctrl_pkt_wr_data_data;          // wr_ctrl:pkt_wr_data_data -> pkt_trans_wr:av_st_din_data
	wire         wr_ctrl_pkt_wr_data_ready;         // pkt_trans_wr:av_st_din_ready -> wr_ctrl:pkt_wr_data_ready
	wire         wr_ctrl_pkt_wr_data_startofpacket; // wr_ctrl:pkt_wr_data_startofpacket -> pkt_trans_wr:av_st_din_startofpacket
	wire         wr_ctrl_pkt_wr_data_endofpacket;   // wr_ctrl:pkt_wr_data_endofpacket -> pkt_trans_wr:av_st_din_endofpacket
	wire         wr_ctrl_sync_resp_valid;           // wr_ctrl:sync_resp_valid -> sync_ctrl:wr_resp_valid
	wire  [63:0] wr_ctrl_sync_resp_data;            // wr_ctrl:sync_resp_data -> sync_ctrl:wr_resp_data
	wire         wr_ctrl_sync_resp_ready;           // sync_ctrl:wr_resp_ready -> wr_ctrl:sync_resp_ready
	wire         wr_ctrl_sync_resp_startofpacket;   // wr_ctrl:sync_resp_startofpacket -> sync_ctrl:wr_resp_startofpacket
	wire         wr_ctrl_sync_resp_endofpacket;     // wr_ctrl:sync_resp_endofpacket -> sync_ctrl:wr_resp_endofpacket
	wire         sync_ctrl_wr_cmd_valid;            // sync_ctrl:wr_cmd_valid -> wr_ctrl:sync_cmd_valid
	wire  [63:0] sync_ctrl_wr_cmd_data;             // sync_ctrl:wr_cmd_data -> wr_ctrl:sync_cmd_data
	wire         sync_ctrl_wr_cmd_ready;            // wr_ctrl:sync_cmd_ready -> sync_ctrl:wr_cmd_ready
	wire         sync_ctrl_wr_cmd_startofpacket;    // sync_ctrl:wr_cmd_startofpacket -> wr_ctrl:sync_cmd_startofpacket
	wire         sync_ctrl_wr_cmd_endofpacket;      // sync_ctrl:wr_cmd_endofpacket -> wr_ctrl:sync_cmd_endofpacket

	generate
		// If any of the display statements (or deliberately broken
		// instantiations) within this generate block triggers then this module
		// has been instantiated this module with a set of parameters different
		// from those it was generated for.  This will usually result in a
		// non-functioning system.
		if (BITS_PER_SYMBOL != 8)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					bits_per_symbol_check ( .error(1'b1) );
		end
		if (NUMBER_OF_COLOR_PLANES != 3)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					number_of_color_planes_check ( .error(1'b1) );
		end
		if (COLOR_PLANES_ARE_IN_PARALLEL != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					color_planes_are_in_parallel_check ( .error(1'b1) );
		end
		if (PIXELS_IN_PARALLEL != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					pixels_in_parallel_check ( .error(1'b1) );
		end
		if (READY_LATENCY != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					ready_latency_check ( .error(1'b1) );
		end
		if (MAX_WIDTH != 1280)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					max_width_check ( .error(1'b1) );
		end
		if (MAX_HEIGHT != 720)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					max_height_check ( .error(1'b1) );
		end
		if (CLOCKS_ARE_SEPARATE != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					clocks_are_separate_check ( .error(1'b1) );
		end
		if (MEM_PORT_WIDTH != 256)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					mem_port_width_check ( .error(1'b1) );
		end
		if (MEM_BASE_ADDR != 2130706432)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					mem_base_addr_check ( .error(1'b1) );
		end
		if (BURST_ALIGNMENT != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					burst_alignment_check ( .error(1'b1) );
		end
		if (WRITE_FIFO_DEPTH != 16)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					write_fifo_depth_check ( .error(1'b1) );
		end
		if (WRITE_BURST_TARGET != 8)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					write_burst_target_check ( .error(1'b1) );
		end
		if (READ_FIFO_DEPTH != 16)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					read_fifo_depth_check ( .error(1'b1) );
		end
		if (READ_BURST_TARGET != 8)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					read_burst_target_check ( .error(1'b1) );
		end
		if (WRITER_RUNTIME_CONTROL != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					writer_runtime_control_check ( .error(1'b1) );
		end
		if (READER_RUNTIME_CONTROL != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					reader_runtime_control_check ( .error(1'b1) );
		end
		if (IS_FRAME_WRITER != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					is_frame_writer_check ( .error(1'b1) );
		end
		if (IS_FRAME_READER != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					is_frame_reader_check ( .error(1'b1) );
		end
		if (DROP_FRAMES != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					drop_frames_check ( .error(1'b1) );
		end
		if (REPEAT_FRAMES != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					repeat_frames_check ( .error(1'b1) );
		end
		if (DROP_REPEAT_USER != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					drop_repeat_user_check ( .error(1'b1) );
		end
		if (INTERLACED_SUPPORT != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					interlaced_support_check ( .error(1'b1) );
		end
		if (CONTROLLED_DROP_REPEAT != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					controlled_drop_repeat_check ( .error(1'b1) );
		end
		if (DROP_INVALID_FIELDS != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					drop_invalid_fields_check ( .error(1'b1) );
		end
		if (MULTI_FRAME_DELAY != 1)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					multi_frame_delay_check ( .error(1'b1) );
		end
		if (IS_SYNC_MASTER != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					is_sync_master_check ( .error(1'b1) );
		end
		if (IS_SYNC_SLAVE != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					is_sync_slave_check ( .error(1'b1) );
		end
		if (LINE_BASED_BUFFERING != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					line_based_buffering_check ( .error(1'b1) );
		end
		if (PRIORITIZE_FMAX != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					prioritize_fmax_check ( .error(1'b1) );
		end
		if (USER_PACKETS_MAX_STORAGE != 0)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					user_packets_max_storage_check ( .error(1'b1) );
		end
		if (MAX_SYMBOLS_PER_PACKET != 10)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					max_symbols_per_packet_check ( .error(1'b1) );
		end
		if (NUM_BUFFERS != 3)
		begin
			initial begin
				$display("Generated module instantiated with wrong parameters");
				$stop;
			end
			instantiated_with_wrong_parameters_error_see_comment_above
					num_buffers_check ( .error(1'b1) );
		end
	endgenerate

	subsys_cam_vfb_video_in video_in (
		.main_clock_clk              (main_clock),                        //    main_clock.clk
		.main_reset_reset            (main_reset),                        //    main_reset.reset
		.av_st_vid_din_data          (din_data),                          // av_st_vid_din.data
		.av_st_vid_din_valid         (din_valid),                         //              .valid
		.av_st_vid_din_startofpacket (din_startofpacket),                 //              .startofpacket
		.av_st_vid_din_endofpacket   (din_endofpacket),                   //              .endofpacket
		.av_st_vid_din_ready         (din_ready),                         //              .ready
		.av_st_cmd_valid             (wr_ctrl_vib_cmd_valid),             //     av_st_cmd.valid
		.av_st_cmd_startofpacket     (wr_ctrl_vib_cmd_startofpacket),     //              .startofpacket
		.av_st_cmd_endofpacket       (wr_ctrl_vib_cmd_endofpacket),       //              .endofpacket
		.av_st_cmd_data              (wr_ctrl_vib_cmd_data),              //              .data
		.av_st_cmd_ready             (wr_ctrl_vib_cmd_ready),             //              .ready
		.av_st_resp_valid            (video_in_av_st_resp_valid),         //    av_st_resp.valid
		.av_st_resp_startofpacket    (video_in_av_st_resp_startofpacket), //              .startofpacket
		.av_st_resp_endofpacket      (video_in_av_st_resp_endofpacket),   //              .endofpacket
		.av_st_resp_data             (video_in_av_st_resp_data),          //              .data
		.av_st_resp_ready            (video_in_av_st_resp_ready),         //              .ready
		.av_st_dout_valid            (video_in_av_st_dout_valid),         //    av_st_dout.valid
		.av_st_dout_startofpacket    (video_in_av_st_dout_startofpacket), //              .startofpacket
		.av_st_dout_endofpacket      (video_in_av_st_dout_endofpacket),   //              .endofpacket
		.av_st_dout_data             (video_in_av_st_dout_data),          //              .data
		.av_st_dout_ready            (video_in_av_st_dout_ready)          //              .ready
	);

	alt_vip_vfb_wr_ctrl #(
		.SRC_WIDTH                    (8),
		.DST_WIDTH                    (8),
		.CONTEXT_WIDTH                (8),
		.TASK_WIDTH                   (8),
		.BITS_PER_SYMBOL              (8),
		.NUMBER_OF_COLOR_PLANES       (3),
		.COLOR_PLANES_ARE_IN_PARALLEL (1),
		.PIXELS_IN_PARALLEL           (1),
		.MAX_WIDTH                    (1280),
		.MAX_HEIGHT                   (720),
		.MAX_SYMBOLS_IN_ANC_PACKET    (12),
		.PRIORITIZE_FMAX              (0)
	) wr_ctrl (
		.clock                     (main_clock),                        //  main_clock.clk
		.reset                     (main_reset),                        //  main_reset.reset
		.vib_data_valid            (video_in_av_st_dout_valid),         //    vib_data.valid
		.vib_data_startofpacket    (video_in_av_st_dout_startofpacket), //            .startofpacket
		.vib_data_endofpacket      (video_in_av_st_dout_endofpacket),   //            .endofpacket
		.vib_data_data             (video_in_av_st_dout_data),          //            .data
		.vib_data_ready            (video_in_av_st_dout_ready),         //            .ready
		.vib_cmd_valid             (wr_ctrl_vib_cmd_valid),             //     vib_cmd.valid
		.vib_cmd_startofpacket     (wr_ctrl_vib_cmd_startofpacket),     //            .startofpacket
		.vib_cmd_endofpacket       (wr_ctrl_vib_cmd_endofpacket),       //            .endofpacket
		.vib_cmd_data              (wr_ctrl_vib_cmd_data),              //            .data
		.vib_cmd_ready             (wr_ctrl_vib_cmd_ready),             //            .ready
		.vib_resp_valid            (video_in_av_st_resp_valid),         //    vib_resp.valid
		.vib_resp_startofpacket    (video_in_av_st_resp_startofpacket), //            .startofpacket
		.vib_resp_endofpacket      (video_in_av_st_resp_endofpacket),   //            .endofpacket
		.vib_resp_data             (video_in_av_st_resp_data),          //            .data
		.vib_resp_ready            (video_in_av_st_resp_ready),         //            .ready
		.pkt_wr_cmd_valid          (wr_ctrl_pkt_wr_cmd_valid),          //  pkt_wr_cmd.valid
		.pkt_wr_cmd_startofpacket  (wr_ctrl_pkt_wr_cmd_startofpacket),  //            .startofpacket
		.pkt_wr_cmd_endofpacket    (wr_ctrl_pkt_wr_cmd_endofpacket),    //            .endofpacket
		.pkt_wr_cmd_data           (wr_ctrl_pkt_wr_cmd_data),           //            .data
		.pkt_wr_cmd_ready          (wr_ctrl_pkt_wr_cmd_ready),          //            .ready
		.pkt_wr_data_valid         (wr_ctrl_pkt_wr_data_valid),         // pkt_wr_data.valid
		.pkt_wr_data_startofpacket (wr_ctrl_pkt_wr_data_startofpacket), //            .startofpacket
		.pkt_wr_data_endofpacket   (wr_ctrl_pkt_wr_data_endofpacket),   //            .endofpacket
		.pkt_wr_data_data          (wr_ctrl_pkt_wr_data_data),          //            .data
		.pkt_wr_data_ready         (wr_ctrl_pkt_wr_data_ready),         //            .ready
		.sync_cmd_valid            (sync_ctrl_wr_cmd_valid),            //    sync_cmd.valid
		.sync_cmd_startofpacket    (sync_ctrl_wr_cmd_startofpacket),    //            .startofpacket
		.sync_cmd_endofpacket      (sync_ctrl_wr_cmd_endofpacket),      //            .endofpacket
		.sync_cmd_data             (sync_ctrl_wr_cmd_data),             //            .data
		.sync_cmd_ready            (sync_ctrl_wr_cmd_ready),            //            .ready
		.sync_resp_valid           (wr_ctrl_sync_resp_valid),           //   sync_resp.valid
		.sync_resp_startofpacket   (wr_ctrl_sync_resp_startofpacket),   //            .startofpacket
		.sync_resp_endofpacket     (wr_ctrl_sync_resp_endofpacket),     //            .endofpacket
		.sync_resp_data            (wr_ctrl_sync_resp_data),            //            .data
		.sync_resp_ready           (wr_ctrl_sync_resp_ready)            //            .ready
	);

	alt_vip_packet_transfer #(
		.FAMILY                            ("Cyclone V"),
		.DATA_WIDTH                        (24),
		.SYMBOLS_IN_SEQ                    (1),
		.ELEMENTS_IN_PARALLEL              (1),
		.MEM_ADDR_WIDTH                    (32),
		.CLOCKS_ARE_SEPARATE               (0),
		.MEM_PORT_WIDTH                    (256),
		.WRITE_HAS_PRIORITY                (1),
		.WRITE_ENABLE                      (1),
		.USE_RESPONSE_WRITE                (0),
		.ENABLE_MANY_COMMAND_WRITE         (0),
		.ENABLE_PERIOD_MODE_WRITE          (0),
		.SUPPORT_BEATS_OVERFLOW_PRETECTION (0),
		.ENABLE_MM_OUTPUT_REGISTER         (1),
		.MAX_PACKET_SIZE_WRITE             (921600),
		.MAX_PACKET_NUM_WRITE              (1),
		.MAX_CONTEXT_NUMBER_WRITE          (1),
		.CONTEXT_BUFFER_RATIO_WRITE        (2),
		.BURST_TARGET_WRITE                (8),
		.COMB_OUTPUT_WRITE                 (0),
		.PIPELINE_READY_WRITE              (0),
		.RESPONSE_DETINATION_ID_WRITE      (0),
		.RESPONSE_SOURCE_ID_WRITE          (0),
		.READ_ENABLE                       (0),
		.ENABLE_MANY_COMMAND_READ          (0),
		.ENABLE_PERIOD_MODE_READ           (0),
		.ENABLE_COMMAND_BUFFER_READ        (0),
		.MAX_PACKET_SIZE_READ              (8192),
		.PREFETCH_THRESHOLD_READ           (1),
		.MAX_CONTEXT_NUMBER_READ           (1),
		.CONTEXT_BUFFER_RATIO_READ         (4),
		.BURST_TARGET_READ                 (8),
		.OUTPUT_MSG_QUEUE_DEPTH_READ       (4),
		.MM_MSG_QUEUE_DEPTH_READ           (8),
		.LOGIC_ONLY_SCFIFO_READ            (1),
		.PIPELINE_READY_READ               (0),
		.COMB_OUTPUT_READ                  (0),
		.DOUT_MAX_DESTINATION_ID_NUM_READ  (32),
		.DOUT_SOURCE_ID_READ               (0),
		.SRC_WIDTH                         (8),
		.DST_WIDTH                         (8),
		.CONTEXT_WIDTH                     (8),
		.TASK_WIDTH                        (8)
	) pkt_trans_wr (
		.av_st_clock              (main_clock),                        //  av_st_clock.clk
		.av_st_reset              (main_reset),                        //  av_st_reset.reset
		.av_st_cmd_valid          (wr_ctrl_pkt_wr_cmd_valid),          //    av_st_cmd.valid
		.av_st_cmd_startofpacket  (wr_ctrl_pkt_wr_cmd_startofpacket),  //             .startofpacket
		.av_st_cmd_endofpacket    (wr_ctrl_pkt_wr_cmd_endofpacket),    //             .endofpacket
		.av_st_cmd_data           (wr_ctrl_pkt_wr_cmd_data),           //             .data
		.av_st_cmd_ready          (wr_ctrl_pkt_wr_cmd_ready),          //             .ready
		.av_st_din_valid          (wr_ctrl_pkt_wr_data_valid),         //    av_st_din.valid
		.av_st_din_startofpacket  (wr_ctrl_pkt_wr_data_startofpacket), //             .startofpacket
		.av_st_din_endofpacket    (wr_ctrl_pkt_wr_data_endofpacket),   //             .endofpacket
		.av_st_din_data           (wr_ctrl_pkt_wr_data_data),          //             .data
		.av_st_din_ready          (wr_ctrl_pkt_wr_data_ready),         //             .ready
		.av_mm_master_address     (mem_master_wr_address),             // av_mm_master.address
		.av_mm_master_burstcount  (mem_master_wr_burstcount),          //             .burstcount
		.av_mm_master_waitrequest (mem_master_wr_waitrequest),         //             .waitrequest
		.av_mm_master_write       (mem_master_wr_write),               //             .write
		.av_mm_master_writedata   (mem_master_wr_writedata),           //             .writedata
		.av_mm_master_byteenable  (mem_master_wr_byteenable)           //             .byteenable
	);

	alt_vip_vfb_sync_ctrl #(
		.SRC_WIDTH                (8),
		.DST_WIDTH                (8),
		.CONTEXT_WIDTH            (8),
		.TASK_WIDTH               (8),
		.FRAME_BUFFER_LENGTH      (2764800),
		.ANC_BUFFER_LENGTH        (256),
		.MAX_WIDTH                (1280),
		.MAX_HEIGHT               (720),
		.NUM_BUFFERS              (3),
		.WRITER_RUNTIME_CONTROL   (1),
		.READER_RUNTIME_CONTROL   (0),
		.IS_FRAME_WRITER          (1),
		.IS_FRAME_READER          (0),
		.DROP_FRAMES              (1),
		.REPEAT_FRAMES            (1),
		.DROP_REPEAT_USER         (0),
		.MULTI_FRAME_DELAY        (1),
		.MEM_BASE_ADDR            (2130706432),
		.USER_PACKETS_MAX_STORAGE (0),
		.MAX_SYMBOLS_PER_PACKET   (12),
		.INTERLACED_SUPPORT       (0),
		.CONTROLLED_DROP_REPEAT   (0),
		.DROP_INVALID_FIELDS      (0),
		.IS_SYNC_MASTER           (0),
		.IS_SYNC_SLAVE            (0)
	) sync_ctrl (
		.clock                        (main_clock),                      //               main_clock.clk
		.reset                        (main_reset),                      //               main_reset.reset
		.wr_cmd_valid                 (sync_ctrl_wr_cmd_valid),          //                   wr_cmd.valid
		.wr_cmd_startofpacket         (sync_ctrl_wr_cmd_startofpacket),  //                         .startofpacket
		.wr_cmd_endofpacket           (sync_ctrl_wr_cmd_endofpacket),    //                         .endofpacket
		.wr_cmd_data                  (sync_ctrl_wr_cmd_data),           //                         .data
		.wr_cmd_ready                 (sync_ctrl_wr_cmd_ready),          //                         .ready
		.wr_resp_valid                (wr_ctrl_sync_resp_valid),         //                  wr_resp.valid
		.wr_resp_startofpacket        (wr_ctrl_sync_resp_startofpacket), //                         .startofpacket
		.wr_resp_endofpacket          (wr_ctrl_sync_resp_endofpacket),   //                         .endofpacket
		.wr_resp_data                 (wr_ctrl_sync_resp_data),          //                         .data
		.wr_resp_ready                (wr_ctrl_sync_resp_ready),         //                         .ready
		.writer_control_address       (control_address),                 //           writer_control.address
		.writer_control_byteenable    (control_byteenable),              //                         .byteenable
		.writer_control_write         (control_write),                   //                         .write
		.writer_control_writedata     (control_writedata),               //                         .writedata
		.writer_control_read          (control_read),                    //                         .read
		.writer_control_readdata      (control_readdata),                //                         .readdata
		.writer_control_readdatavalid (control_readdatavalid),           //                         .readdatavalid
		.writer_control_waitrequest   (control_waitrequest),             //                         .waitrequest
		.writer_control_irq           (control_interrupt_irq)            // writer_control_interrupt.irq
	);

endmodule
