// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2017.4
// Copyright (C) 1986-2017 Xilinx, Inc. All Rights Reserved.
// 
// ===========================================================

`timescale 1 ns / 1 ps 

(* CORE_GENERATION_INFO="hls_saturation_enhance,hls_ip_2017_4,{HLS_INPUT_TYPE=cxx,HLS_INPUT_FLOAT=0,HLS_INPUT_FIXED=0,HLS_INPUT_PART=xc7z020clg400-1,HLS_INPUT_CLOCK=6.670000,HLS_INPUT_ARCH=dataflow,HLS_SYN_CLOCK=6.380000,HLS_SYN_LAT=-1,HLS_SYN_TPT=-1,HLS_SYN_MEM=7,HLS_SYN_DSP=8,HLS_SYN_FF=7965,HLS_SYN_LUT=7349}" *)

module hls_saturation_enhance (
        s_axi_AXILiteS_AWVALID,
        s_axi_AXILiteS_AWREADY,
        s_axi_AXILiteS_AWADDR,
        s_axi_AXILiteS_WVALID,
        s_axi_AXILiteS_WREADY,
        s_axi_AXILiteS_WDATA,
        s_axi_AXILiteS_WSTRB,
        s_axi_AXILiteS_ARVALID,
        s_axi_AXILiteS_ARREADY,
        s_axi_AXILiteS_ARADDR,
        s_axi_AXILiteS_RVALID,
        s_axi_AXILiteS_RREADY,
        s_axi_AXILiteS_RDATA,
        s_axi_AXILiteS_RRESP,
        s_axi_AXILiteS_BVALID,
        s_axi_AXILiteS_BREADY,
        s_axi_AXILiteS_BRESP,
        ap_clk,
        ap_rst_n,
        stream_in_TDATA,
        stream_in_TKEEP,
        stream_in_TSTRB,
        stream_in_TUSER,
        stream_in_TLAST,
        stream_in_TID,
        stream_in_TDEST,
        stream_out_TDATA,
        stream_out_TKEEP,
        stream_out_TSTRB,
        stream_out_TUSER,
        stream_out_TLAST,
        stream_out_TID,
        stream_out_TDEST,
        stream_in_TVALID,
        stream_in_TREADY,
        stream_out_TVALID,
        stream_out_TREADY
);

parameter    C_S_AXI_AXILITES_DATA_WIDTH = 32;
parameter    C_S_AXI_AXILITES_ADDR_WIDTH = 6;
parameter    C_S_AXI_DATA_WIDTH = 32;
parameter    C_S_AXI_ADDR_WIDTH = 32;

parameter C_S_AXI_AXILITES_WSTRB_WIDTH = (32 / 8);
parameter C_S_AXI_WSTRB_WIDTH = (32 / 8);

input   s_axi_AXILiteS_AWVALID;
output   s_axi_AXILiteS_AWREADY;
input  [C_S_AXI_AXILITES_ADDR_WIDTH - 1:0] s_axi_AXILiteS_AWADDR;
input   s_axi_AXILiteS_WVALID;
output   s_axi_AXILiteS_WREADY;
input  [C_S_AXI_AXILITES_DATA_WIDTH - 1:0] s_axi_AXILiteS_WDATA;
input  [C_S_AXI_AXILITES_WSTRB_WIDTH - 1:0] s_axi_AXILiteS_WSTRB;
input   s_axi_AXILiteS_ARVALID;
output   s_axi_AXILiteS_ARREADY;
input  [C_S_AXI_AXILITES_ADDR_WIDTH - 1:0] s_axi_AXILiteS_ARADDR;
output   s_axi_AXILiteS_RVALID;
input   s_axi_AXILiteS_RREADY;
output  [C_S_AXI_AXILITES_DATA_WIDTH - 1:0] s_axi_AXILiteS_RDATA;
output  [1:0] s_axi_AXILiteS_RRESP;
output   s_axi_AXILiteS_BVALID;
input   s_axi_AXILiteS_BREADY;
output  [1:0] s_axi_AXILiteS_BRESP;
input   ap_clk;
input   ap_rst_n;
input  [23:0] stream_in_TDATA;
input  [2:0] stream_in_TKEEP;
input  [2:0] stream_in_TSTRB;
input  [0:0] stream_in_TUSER;
input  [0:0] stream_in_TLAST;
input  [0:0] stream_in_TID;
input  [0:0] stream_in_TDEST;
output  [23:0] stream_out_TDATA;
output  [2:0] stream_out_TKEEP;
output  [2:0] stream_out_TSTRB;
output  [0:0] stream_out_TUSER;
output  [0:0] stream_out_TLAST;
output  [0:0] stream_out_TID;
output  [0:0] stream_out_TDEST;
input   stream_in_TVALID;
output   stream_in_TREADY;
output   stream_out_TVALID;
input   stream_out_TREADY;

reg    ap_rst_n_inv;
wire   [15:0] height;
wire   [15:0] width;
wire   [7:0] sat;
wire    Block_Mat_exit1573_p_U0_ap_start;
wire    Block_Mat_exit1573_p_U0_start_full_n;
wire    Block_Mat_exit1573_p_U0_ap_done;
wire    Block_Mat_exit1573_p_U0_ap_continue;
wire    Block_Mat_exit1573_p_U0_ap_idle;
wire    Block_Mat_exit1573_p_U0_ap_ready;
wire    Block_Mat_exit1573_p_U0_start_out;
wire    Block_Mat_exit1573_p_U0_start_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img0_rows_V_out_din;
wire    Block_Mat_exit1573_p_U0_img0_rows_V_out_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img0_cols_V_out_din;
wire    Block_Mat_exit1573_p_U0_img0_cols_V_out_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img2_rows_V_out_din;
wire    Block_Mat_exit1573_p_U0_img2_rows_V_out_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img2_cols_V_out_din;
wire    Block_Mat_exit1573_p_U0_img2_cols_V_out_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img3_rows_V_out_din;
wire    Block_Mat_exit1573_p_U0_img3_rows_V_out_write;
wire   [15:0] Block_Mat_exit1573_p_U0_img3_cols_V_out_din;
wire    Block_Mat_exit1573_p_U0_img3_cols_V_out_write;
wire   [11:0] Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_din;
wire    Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_write;
wire   [11:0] Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_din;
wire    Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_write;
wire   [7:0] Block_Mat_exit1573_p_U0_sat_out_din;
wire    Block_Mat_exit1573_p_U0_sat_out_write;
wire    AXIvideo2Mat_U0_ap_start;
wire    AXIvideo2Mat_U0_ap_done;
wire    AXIvideo2Mat_U0_ap_continue;
wire    AXIvideo2Mat_U0_ap_idle;
wire    AXIvideo2Mat_U0_ap_ready;
wire    AXIvideo2Mat_U0_start_out;
wire    AXIvideo2Mat_U0_start_write;
wire    AXIvideo2Mat_U0_stream_in_TREADY;
wire    AXIvideo2Mat_U0_img_rows_V_read;
wire    AXIvideo2Mat_U0_img_cols_V_read;
wire   [7:0] AXIvideo2Mat_U0_img_data_stream_0_V_din;
wire    AXIvideo2Mat_U0_img_data_stream_0_V_write;
wire   [7:0] AXIvideo2Mat_U0_img_data_stream_1_V_din;
wire    AXIvideo2Mat_U0_img_data_stream_1_V_write;
wire   [7:0] AXIvideo2Mat_U0_img_data_stream_2_V_din;
wire    AXIvideo2Mat_U0_img_data_stream_2_V_write;
wire   [15:0] AXIvideo2Mat_U0_img_rows_V_out_din;
wire    AXIvideo2Mat_U0_img_rows_V_out_write;
wire   [15:0] AXIvideo2Mat_U0_img_cols_V_out_din;
wire    AXIvideo2Mat_U0_img_cols_V_out_write;
wire    CvtColor_U0_ap_start;
wire    CvtColor_U0_ap_done;
wire    CvtColor_U0_ap_continue;
wire    CvtColor_U0_ap_idle;
wire    CvtColor_U0_ap_ready;
wire    CvtColor_U0_p_src_rows_V_read;
wire    CvtColor_U0_p_src_cols_V_read;
wire    CvtColor_U0_p_src_data_stream_0_V_read;
wire    CvtColor_U0_p_src_data_stream_1_V_read;
wire    CvtColor_U0_p_src_data_stream_2_V_read;
wire   [7:0] CvtColor_U0_p_dst_data_stream_0_V_din;
wire    CvtColor_U0_p_dst_data_stream_0_V_write;
wire   [7:0] CvtColor_U0_p_dst_data_stream_1_V_din;
wire    CvtColor_U0_p_dst_data_stream_1_V_write;
wire   [7:0] CvtColor_U0_p_dst_data_stream_2_V_din;
wire    CvtColor_U0_p_dst_data_stream_2_V_write;
wire    Loop_loop_height_pro_U0_ap_start;
wire    Loop_loop_height_pro_U0_ap_done;
wire    Loop_loop_height_pro_U0_ap_continue;
wire    Loop_loop_height_pro_U0_ap_idle;
wire    Loop_loop_height_pro_U0_ap_ready;
wire    Loop_loop_height_pro_U0_p_rows_assign_cast_loc_read;
wire    Loop_loop_height_pro_U0_p_cols_assign_cast_loc_read;
wire   [7:0] Loop_loop_height_pro_U0_img2_data_stream_0_V_din;
wire    Loop_loop_height_pro_U0_img2_data_stream_0_V_write;
wire   [7:0] Loop_loop_height_pro_U0_img2_data_stream_1_V_din;
wire    Loop_loop_height_pro_U0_img2_data_stream_1_V_write;
wire   [7:0] Loop_loop_height_pro_U0_img2_data_stream_2_V_din;
wire    Loop_loop_height_pro_U0_img2_data_stream_2_V_write;
wire    Loop_loop_height_pro_U0_img1_data_stream_0_V_read;
wire    Loop_loop_height_pro_U0_img1_data_stream_1_V_read;
wire    Loop_loop_height_pro_U0_img1_data_stream_2_V_read;
wire    Loop_loop_height_pro_U0_sat_read;
wire    CvtColor_1_U0_ap_start;
wire    CvtColor_1_U0_ap_done;
wire    CvtColor_1_U0_ap_continue;
wire    CvtColor_1_U0_ap_idle;
wire    CvtColor_1_U0_ap_ready;
wire    CvtColor_1_U0_p_src_rows_V_read;
wire    CvtColor_1_U0_p_src_cols_V_read;
wire    CvtColor_1_U0_p_src_data_stream_0_V_read;
wire    CvtColor_1_U0_p_src_data_stream_1_V_read;
wire    CvtColor_1_U0_p_src_data_stream_2_V_read;
wire   [7:0] CvtColor_1_U0_p_dst_data_stream_0_V_din;
wire    CvtColor_1_U0_p_dst_data_stream_0_V_write;
wire   [7:0] CvtColor_1_U0_p_dst_data_stream_1_V_din;
wire    CvtColor_1_U0_p_dst_data_stream_1_V_write;
wire   [7:0] CvtColor_1_U0_p_dst_data_stream_2_V_din;
wire    CvtColor_1_U0_p_dst_data_stream_2_V_write;
wire    Mat2AXIvideo_U0_ap_start;
wire    Mat2AXIvideo_U0_ap_done;
wire    Mat2AXIvideo_U0_ap_continue;
wire    Mat2AXIvideo_U0_ap_idle;
wire    Mat2AXIvideo_U0_ap_ready;
wire    Mat2AXIvideo_U0_img_rows_V_read;
wire    Mat2AXIvideo_U0_img_cols_V_read;
wire    Mat2AXIvideo_U0_img_data_stream_0_V_read;
wire    Mat2AXIvideo_U0_img_data_stream_1_V_read;
wire    Mat2AXIvideo_U0_img_data_stream_2_V_read;
wire   [23:0] Mat2AXIvideo_U0_stream_out_TDATA;
wire    Mat2AXIvideo_U0_stream_out_TVALID;
wire   [2:0] Mat2AXIvideo_U0_stream_out_TKEEP;
wire   [2:0] Mat2AXIvideo_U0_stream_out_TSTRB;
wire   [0:0] Mat2AXIvideo_U0_stream_out_TUSER;
wire   [0:0] Mat2AXIvideo_U0_stream_out_TLAST;
wire   [0:0] Mat2AXIvideo_U0_stream_out_TID;
wire   [0:0] Mat2AXIvideo_U0_stream_out_TDEST;
wire    ap_sync_continue;
wire    img0_rows_V_c_full_n;
wire   [15:0] img0_rows_V_c_dout;
wire    img0_rows_V_c_empty_n;
wire    img0_cols_V_c_full_n;
wire   [15:0] img0_cols_V_c_dout;
wire    img0_cols_V_c_empty_n;
wire    img2_rows_V_c_full_n;
wire   [15:0] img2_rows_V_c_dout;
wire    img2_rows_V_c_empty_n;
wire    img2_cols_V_c_full_n;
wire   [15:0] img2_cols_V_c_dout;
wire    img2_cols_V_c_empty_n;
wire    img3_rows_V_c_full_n;
wire   [15:0] img3_rows_V_c_dout;
wire    img3_rows_V_c_empty_n;
wire    img3_cols_V_c_full_n;
wire   [15:0] img3_cols_V_c_dout;
wire    img3_cols_V_c_empty_n;
wire    p_cols_assign_cast_lo_full_n;
wire   [11:0] p_cols_assign_cast_lo_dout;
wire    p_cols_assign_cast_lo_empty_n;
wire    p_rows_assign_cast_lo_full_n;
wire   [11:0] p_rows_assign_cast_lo_dout;
wire    p_rows_assign_cast_lo_empty_n;
wire    sat_c_full_n;
wire   [7:0] sat_c_dout;
wire    sat_c_empty_n;
wire    img0_data_stream_0_s_full_n;
wire   [7:0] img0_data_stream_0_s_dout;
wire    img0_data_stream_0_s_empty_n;
wire    img0_data_stream_1_s_full_n;
wire   [7:0] img0_data_stream_1_s_dout;
wire    img0_data_stream_1_s_empty_n;
wire    img0_data_stream_2_s_full_n;
wire   [7:0] img0_data_stream_2_s_dout;
wire    img0_data_stream_2_s_empty_n;
wire    img0_rows_V_c83_full_n;
wire   [15:0] img0_rows_V_c83_dout;
wire    img0_rows_V_c83_empty_n;
wire    img0_cols_V_c84_full_n;
wire   [15:0] img0_cols_V_c84_dout;
wire    img0_cols_V_c84_empty_n;
wire    img1_data_stream_0_s_full_n;
wire   [7:0] img1_data_stream_0_s_dout;
wire    img1_data_stream_0_s_empty_n;
wire    img1_data_stream_1_s_full_n;
wire   [7:0] img1_data_stream_1_s_dout;
wire    img1_data_stream_1_s_empty_n;
wire    img1_data_stream_2_s_full_n;
wire   [7:0] img1_data_stream_2_s_dout;
wire    img1_data_stream_2_s_empty_n;
wire    img2_data_stream_0_s_full_n;
wire   [7:0] img2_data_stream_0_s_dout;
wire    img2_data_stream_0_s_empty_n;
wire    img2_data_stream_1_s_full_n;
wire   [7:0] img2_data_stream_1_s_dout;
wire    img2_data_stream_1_s_empty_n;
wire    img2_data_stream_2_s_full_n;
wire   [7:0] img2_data_stream_2_s_dout;
wire    img2_data_stream_2_s_empty_n;
wire    img3_data_stream_0_s_full_n;
wire   [7:0] img3_data_stream_0_s_dout;
wire    img3_data_stream_0_s_empty_n;
wire    img3_data_stream_1_s_full_n;
wire   [7:0] img3_data_stream_1_s_dout;
wire    img3_data_stream_1_s_empty_n;
wire    img3_data_stream_2_s_full_n;
wire   [7:0] img3_data_stream_2_s_dout;
wire    img3_data_stream_2_s_empty_n;
wire   [0:0] start_for_Loop_loop_height_pro_U0_din;
wire    start_for_Loop_loop_height_pro_U0_full_n;
wire   [0:0] start_for_Loop_loop_height_pro_U0_dout;
wire    start_for_Loop_loop_height_pro_U0_empty_n;
wire   [0:0] start_for_CvtColor_1_U0_din;
wire    start_for_CvtColor_1_U0_full_n;
wire   [0:0] start_for_CvtColor_1_U0_dout;
wire    start_for_CvtColor_1_U0_empty_n;
wire   [0:0] start_for_Mat2AXIvideo_U0_din;
wire    start_for_Mat2AXIvideo_U0_full_n;
wire   [0:0] start_for_Mat2AXIvideo_U0_dout;
wire    start_for_Mat2AXIvideo_U0_empty_n;
wire   [0:0] start_for_CvtColor_U0_din;
wire    start_for_CvtColor_U0_full_n;
wire   [0:0] start_for_CvtColor_U0_dout;
wire    start_for_CvtColor_U0_empty_n;
wire    CvtColor_U0_start_full_n;
wire    CvtColor_U0_start_write;
wire    Loop_loop_height_pro_U0_start_full_n;
wire    Loop_loop_height_pro_U0_start_write;
wire    CvtColor_1_U0_start_full_n;
wire    CvtColor_1_U0_start_write;
wire    Mat2AXIvideo_U0_start_full_n;
wire    Mat2AXIvideo_U0_start_write;

hls_saturation_enhance_AXILiteS_s_axi #(
    .C_S_AXI_ADDR_WIDTH( C_S_AXI_AXILITES_ADDR_WIDTH ),
    .C_S_AXI_DATA_WIDTH( C_S_AXI_AXILITES_DATA_WIDTH ))
hls_saturation_enhance_AXILiteS_s_axi_U(
    .AWVALID(s_axi_AXILiteS_AWVALID),
    .AWREADY(s_axi_AXILiteS_AWREADY),
    .AWADDR(s_axi_AXILiteS_AWADDR),
    .WVALID(s_axi_AXILiteS_WVALID),
    .WREADY(s_axi_AXILiteS_WREADY),
    .WDATA(s_axi_AXILiteS_WDATA),
    .WSTRB(s_axi_AXILiteS_WSTRB),
    .ARVALID(s_axi_AXILiteS_ARVALID),
    .ARREADY(s_axi_AXILiteS_ARREADY),
    .ARADDR(s_axi_AXILiteS_ARADDR),
    .RVALID(s_axi_AXILiteS_RVALID),
    .RREADY(s_axi_AXILiteS_RREADY),
    .RDATA(s_axi_AXILiteS_RDATA),
    .RRESP(s_axi_AXILiteS_RRESP),
    .BVALID(s_axi_AXILiteS_BVALID),
    .BREADY(s_axi_AXILiteS_BREADY),
    .BRESP(s_axi_AXILiteS_BRESP),
    .ACLK(ap_clk),
    .ARESET(ap_rst_n_inv),
    .ACLK_EN(1'b1),
    .height(height),
    .width(width),
    .sat(sat)
);

Block_Mat_exit1573_p Block_Mat_exit1573_p_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(Block_Mat_exit1573_p_U0_ap_start),
    .start_full_n(Block_Mat_exit1573_p_U0_start_full_n),
    .ap_done(Block_Mat_exit1573_p_U0_ap_done),
    .ap_continue(Block_Mat_exit1573_p_U0_ap_continue),
    .ap_idle(Block_Mat_exit1573_p_U0_ap_idle),
    .ap_ready(Block_Mat_exit1573_p_U0_ap_ready),
    .start_out(Block_Mat_exit1573_p_U0_start_out),
    .start_write(Block_Mat_exit1573_p_U0_start_write),
    .height(height),
    .width(width),
    .sat(sat),
    .img0_rows_V_out_din(Block_Mat_exit1573_p_U0_img0_rows_V_out_din),
    .img0_rows_V_out_full_n(img0_rows_V_c_full_n),
    .img0_rows_V_out_write(Block_Mat_exit1573_p_U0_img0_rows_V_out_write),
    .img0_cols_V_out_din(Block_Mat_exit1573_p_U0_img0_cols_V_out_din),
    .img0_cols_V_out_full_n(img0_cols_V_c_full_n),
    .img0_cols_V_out_write(Block_Mat_exit1573_p_U0_img0_cols_V_out_write),
    .img2_rows_V_out_din(Block_Mat_exit1573_p_U0_img2_rows_V_out_din),
    .img2_rows_V_out_full_n(img2_rows_V_c_full_n),
    .img2_rows_V_out_write(Block_Mat_exit1573_p_U0_img2_rows_V_out_write),
    .img2_cols_V_out_din(Block_Mat_exit1573_p_U0_img2_cols_V_out_din),
    .img2_cols_V_out_full_n(img2_cols_V_c_full_n),
    .img2_cols_V_out_write(Block_Mat_exit1573_p_U0_img2_cols_V_out_write),
    .img3_rows_V_out_din(Block_Mat_exit1573_p_U0_img3_rows_V_out_din),
    .img3_rows_V_out_full_n(img3_rows_V_c_full_n),
    .img3_rows_V_out_write(Block_Mat_exit1573_p_U0_img3_rows_V_out_write),
    .img3_cols_V_out_din(Block_Mat_exit1573_p_U0_img3_cols_V_out_din),
    .img3_cols_V_out_full_n(img3_cols_V_c_full_n),
    .img3_cols_V_out_write(Block_Mat_exit1573_p_U0_img3_cols_V_out_write),
    .p_cols_assign_cast_out_out_din(Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_din),
    .p_cols_assign_cast_out_out_full_n(p_cols_assign_cast_lo_full_n),
    .p_cols_assign_cast_out_out_write(Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_write),
    .p_rows_assign_cast_out_out_din(Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_din),
    .p_rows_assign_cast_out_out_full_n(p_rows_assign_cast_lo_full_n),
    .p_rows_assign_cast_out_out_write(Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_write),
    .sat_out_din(Block_Mat_exit1573_p_U0_sat_out_din),
    .sat_out_full_n(sat_c_full_n),
    .sat_out_write(Block_Mat_exit1573_p_U0_sat_out_write)
);

AXIvideo2Mat AXIvideo2Mat_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(AXIvideo2Mat_U0_ap_start),
    .start_full_n(start_for_CvtColor_U0_full_n),
    .ap_done(AXIvideo2Mat_U0_ap_done),
    .ap_continue(AXIvideo2Mat_U0_ap_continue),
    .ap_idle(AXIvideo2Mat_U0_ap_idle),
    .ap_ready(AXIvideo2Mat_U0_ap_ready),
    .start_out(AXIvideo2Mat_U0_start_out),
    .start_write(AXIvideo2Mat_U0_start_write),
    .stream_in_TDATA(stream_in_TDATA),
    .stream_in_TVALID(stream_in_TVALID),
    .stream_in_TREADY(AXIvideo2Mat_U0_stream_in_TREADY),
    .stream_in_TKEEP(stream_in_TKEEP),
    .stream_in_TSTRB(stream_in_TSTRB),
    .stream_in_TUSER(stream_in_TUSER),
    .stream_in_TLAST(stream_in_TLAST),
    .stream_in_TID(stream_in_TID),
    .stream_in_TDEST(stream_in_TDEST),
    .img_rows_V_dout(img0_rows_V_c_dout),
    .img_rows_V_empty_n(img0_rows_V_c_empty_n),
    .img_rows_V_read(AXIvideo2Mat_U0_img_rows_V_read),
    .img_cols_V_dout(img0_cols_V_c_dout),
    .img_cols_V_empty_n(img0_cols_V_c_empty_n),
    .img_cols_V_read(AXIvideo2Mat_U0_img_cols_V_read),
    .img_data_stream_0_V_din(AXIvideo2Mat_U0_img_data_stream_0_V_din),
    .img_data_stream_0_V_full_n(img0_data_stream_0_s_full_n),
    .img_data_stream_0_V_write(AXIvideo2Mat_U0_img_data_stream_0_V_write),
    .img_data_stream_1_V_din(AXIvideo2Mat_U0_img_data_stream_1_V_din),
    .img_data_stream_1_V_full_n(img0_data_stream_1_s_full_n),
    .img_data_stream_1_V_write(AXIvideo2Mat_U0_img_data_stream_1_V_write),
    .img_data_stream_2_V_din(AXIvideo2Mat_U0_img_data_stream_2_V_din),
    .img_data_stream_2_V_full_n(img0_data_stream_2_s_full_n),
    .img_data_stream_2_V_write(AXIvideo2Mat_U0_img_data_stream_2_V_write),
    .img_rows_V_out_din(AXIvideo2Mat_U0_img_rows_V_out_din),
    .img_rows_V_out_full_n(img0_rows_V_c83_full_n),
    .img_rows_V_out_write(AXIvideo2Mat_U0_img_rows_V_out_write),
    .img_cols_V_out_din(AXIvideo2Mat_U0_img_cols_V_out_din),
    .img_cols_V_out_full_n(img0_cols_V_c84_full_n),
    .img_cols_V_out_write(AXIvideo2Mat_U0_img_cols_V_out_write)
);

CvtColor CvtColor_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(CvtColor_U0_ap_start),
    .ap_done(CvtColor_U0_ap_done),
    .ap_continue(CvtColor_U0_ap_continue),
    .ap_idle(CvtColor_U0_ap_idle),
    .ap_ready(CvtColor_U0_ap_ready),
    .p_src_rows_V_dout(img0_rows_V_c83_dout),
    .p_src_rows_V_empty_n(img0_rows_V_c83_empty_n),
    .p_src_rows_V_read(CvtColor_U0_p_src_rows_V_read),
    .p_src_cols_V_dout(img0_cols_V_c84_dout),
    .p_src_cols_V_empty_n(img0_cols_V_c84_empty_n),
    .p_src_cols_V_read(CvtColor_U0_p_src_cols_V_read),
    .p_src_data_stream_0_V_dout(img0_data_stream_0_s_dout),
    .p_src_data_stream_0_V_empty_n(img0_data_stream_0_s_empty_n),
    .p_src_data_stream_0_V_read(CvtColor_U0_p_src_data_stream_0_V_read),
    .p_src_data_stream_1_V_dout(img0_data_stream_1_s_dout),
    .p_src_data_stream_1_V_empty_n(img0_data_stream_1_s_empty_n),
    .p_src_data_stream_1_V_read(CvtColor_U0_p_src_data_stream_1_V_read),
    .p_src_data_stream_2_V_dout(img0_data_stream_2_s_dout),
    .p_src_data_stream_2_V_empty_n(img0_data_stream_2_s_empty_n),
    .p_src_data_stream_2_V_read(CvtColor_U0_p_src_data_stream_2_V_read),
    .p_dst_data_stream_0_V_din(CvtColor_U0_p_dst_data_stream_0_V_din),
    .p_dst_data_stream_0_V_full_n(img1_data_stream_0_s_full_n),
    .p_dst_data_stream_0_V_write(CvtColor_U0_p_dst_data_stream_0_V_write),
    .p_dst_data_stream_1_V_din(CvtColor_U0_p_dst_data_stream_1_V_din),
    .p_dst_data_stream_1_V_full_n(img1_data_stream_1_s_full_n),
    .p_dst_data_stream_1_V_write(CvtColor_U0_p_dst_data_stream_1_V_write),
    .p_dst_data_stream_2_V_din(CvtColor_U0_p_dst_data_stream_2_V_din),
    .p_dst_data_stream_2_V_full_n(img1_data_stream_2_s_full_n),
    .p_dst_data_stream_2_V_write(CvtColor_U0_p_dst_data_stream_2_V_write)
);

Loop_loop_height_pro Loop_loop_height_pro_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(Loop_loop_height_pro_U0_ap_start),
    .ap_done(Loop_loop_height_pro_U0_ap_done),
    .ap_continue(Loop_loop_height_pro_U0_ap_continue),
    .ap_idle(Loop_loop_height_pro_U0_ap_idle),
    .ap_ready(Loop_loop_height_pro_U0_ap_ready),
    .p_rows_assign_cast_loc_dout(p_rows_assign_cast_lo_dout),
    .p_rows_assign_cast_loc_empty_n(p_rows_assign_cast_lo_empty_n),
    .p_rows_assign_cast_loc_read(Loop_loop_height_pro_U0_p_rows_assign_cast_loc_read),
    .p_cols_assign_cast_loc_dout(p_cols_assign_cast_lo_dout),
    .p_cols_assign_cast_loc_empty_n(p_cols_assign_cast_lo_empty_n),
    .p_cols_assign_cast_loc_read(Loop_loop_height_pro_U0_p_cols_assign_cast_loc_read),
    .img2_data_stream_0_V_din(Loop_loop_height_pro_U0_img2_data_stream_0_V_din),
    .img2_data_stream_0_V_full_n(img2_data_stream_0_s_full_n),
    .img2_data_stream_0_V_write(Loop_loop_height_pro_U0_img2_data_stream_0_V_write),
    .img2_data_stream_1_V_din(Loop_loop_height_pro_U0_img2_data_stream_1_V_din),
    .img2_data_stream_1_V_full_n(img2_data_stream_1_s_full_n),
    .img2_data_stream_1_V_write(Loop_loop_height_pro_U0_img2_data_stream_1_V_write),
    .img2_data_stream_2_V_din(Loop_loop_height_pro_U0_img2_data_stream_2_V_din),
    .img2_data_stream_2_V_full_n(img2_data_stream_2_s_full_n),
    .img2_data_stream_2_V_write(Loop_loop_height_pro_U0_img2_data_stream_2_V_write),
    .img1_data_stream_0_V_dout(img1_data_stream_0_s_dout),
    .img1_data_stream_0_V_empty_n(img1_data_stream_0_s_empty_n),
    .img1_data_stream_0_V_read(Loop_loop_height_pro_U0_img1_data_stream_0_V_read),
    .img1_data_stream_1_V_dout(img1_data_stream_1_s_dout),
    .img1_data_stream_1_V_empty_n(img1_data_stream_1_s_empty_n),
    .img1_data_stream_1_V_read(Loop_loop_height_pro_U0_img1_data_stream_1_V_read),
    .img1_data_stream_2_V_dout(img1_data_stream_2_s_dout),
    .img1_data_stream_2_V_empty_n(img1_data_stream_2_s_empty_n),
    .img1_data_stream_2_V_read(Loop_loop_height_pro_U0_img1_data_stream_2_V_read),
    .sat_dout(sat_c_dout),
    .sat_empty_n(sat_c_empty_n),
    .sat_read(Loop_loop_height_pro_U0_sat_read)
);

CvtColor_1 CvtColor_1_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(CvtColor_1_U0_ap_start),
    .ap_done(CvtColor_1_U0_ap_done),
    .ap_continue(CvtColor_1_U0_ap_continue),
    .ap_idle(CvtColor_1_U0_ap_idle),
    .ap_ready(CvtColor_1_U0_ap_ready),
    .p_src_rows_V_dout(img2_rows_V_c_dout),
    .p_src_rows_V_empty_n(img2_rows_V_c_empty_n),
    .p_src_rows_V_read(CvtColor_1_U0_p_src_rows_V_read),
    .p_src_cols_V_dout(img2_cols_V_c_dout),
    .p_src_cols_V_empty_n(img2_cols_V_c_empty_n),
    .p_src_cols_V_read(CvtColor_1_U0_p_src_cols_V_read),
    .p_src_data_stream_0_V_dout(img2_data_stream_0_s_dout),
    .p_src_data_stream_0_V_empty_n(img2_data_stream_0_s_empty_n),
    .p_src_data_stream_0_V_read(CvtColor_1_U0_p_src_data_stream_0_V_read),
    .p_src_data_stream_1_V_dout(img2_data_stream_1_s_dout),
    .p_src_data_stream_1_V_empty_n(img2_data_stream_1_s_empty_n),
    .p_src_data_stream_1_V_read(CvtColor_1_U0_p_src_data_stream_1_V_read),
    .p_src_data_stream_2_V_dout(img2_data_stream_2_s_dout),
    .p_src_data_stream_2_V_empty_n(img2_data_stream_2_s_empty_n),
    .p_src_data_stream_2_V_read(CvtColor_1_U0_p_src_data_stream_2_V_read),
    .p_dst_data_stream_0_V_din(CvtColor_1_U0_p_dst_data_stream_0_V_din),
    .p_dst_data_stream_0_V_full_n(img3_data_stream_0_s_full_n),
    .p_dst_data_stream_0_V_write(CvtColor_1_U0_p_dst_data_stream_0_V_write),
    .p_dst_data_stream_1_V_din(CvtColor_1_U0_p_dst_data_stream_1_V_din),
    .p_dst_data_stream_1_V_full_n(img3_data_stream_1_s_full_n),
    .p_dst_data_stream_1_V_write(CvtColor_1_U0_p_dst_data_stream_1_V_write),
    .p_dst_data_stream_2_V_din(CvtColor_1_U0_p_dst_data_stream_2_V_din),
    .p_dst_data_stream_2_V_full_n(img3_data_stream_2_s_full_n),
    .p_dst_data_stream_2_V_write(CvtColor_1_U0_p_dst_data_stream_2_V_write)
);

Mat2AXIvideo Mat2AXIvideo_U0(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst_n_inv),
    .ap_start(Mat2AXIvideo_U0_ap_start),
    .ap_done(Mat2AXIvideo_U0_ap_done),
    .ap_continue(Mat2AXIvideo_U0_ap_continue),
    .ap_idle(Mat2AXIvideo_U0_ap_idle),
    .ap_ready(Mat2AXIvideo_U0_ap_ready),
    .img_rows_V_dout(img3_rows_V_c_dout),
    .img_rows_V_empty_n(img3_rows_V_c_empty_n),
    .img_rows_V_read(Mat2AXIvideo_U0_img_rows_V_read),
    .img_cols_V_dout(img3_cols_V_c_dout),
    .img_cols_V_empty_n(img3_cols_V_c_empty_n),
    .img_cols_V_read(Mat2AXIvideo_U0_img_cols_V_read),
    .img_data_stream_0_V_dout(img3_data_stream_0_s_dout),
    .img_data_stream_0_V_empty_n(img3_data_stream_0_s_empty_n),
    .img_data_stream_0_V_read(Mat2AXIvideo_U0_img_data_stream_0_V_read),
    .img_data_stream_1_V_dout(img3_data_stream_1_s_dout),
    .img_data_stream_1_V_empty_n(img3_data_stream_1_s_empty_n),
    .img_data_stream_1_V_read(Mat2AXIvideo_U0_img_data_stream_1_V_read),
    .img_data_stream_2_V_dout(img3_data_stream_2_s_dout),
    .img_data_stream_2_V_empty_n(img3_data_stream_2_s_empty_n),
    .img_data_stream_2_V_read(Mat2AXIvideo_U0_img_data_stream_2_V_read),
    .stream_out_TDATA(Mat2AXIvideo_U0_stream_out_TDATA),
    .stream_out_TVALID(Mat2AXIvideo_U0_stream_out_TVALID),
    .stream_out_TREADY(stream_out_TREADY),
    .stream_out_TKEEP(Mat2AXIvideo_U0_stream_out_TKEEP),
    .stream_out_TSTRB(Mat2AXIvideo_U0_stream_out_TSTRB),
    .stream_out_TUSER(Mat2AXIvideo_U0_stream_out_TUSER),
    .stream_out_TLAST(Mat2AXIvideo_U0_stream_out_TLAST),
    .stream_out_TID(Mat2AXIvideo_U0_stream_out_TID),
    .stream_out_TDEST(Mat2AXIvideo_U0_stream_out_TDEST)
);

fifo_w16_d1_A img0_rows_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img0_rows_V_out_din),
    .if_full_n(img0_rows_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img0_rows_V_out_write),
    .if_dout(img0_rows_V_c_dout),
    .if_empty_n(img0_rows_V_c_empty_n),
    .if_read(AXIvideo2Mat_U0_img_rows_V_read)
);

fifo_w16_d1_A img0_cols_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img0_cols_V_out_din),
    .if_full_n(img0_cols_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img0_cols_V_out_write),
    .if_dout(img0_cols_V_c_dout),
    .if_empty_n(img0_cols_V_c_empty_n),
    .if_read(AXIvideo2Mat_U0_img_cols_V_read)
);

fifo_w16_d4_A img2_rows_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img2_rows_V_out_din),
    .if_full_n(img2_rows_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img2_rows_V_out_write),
    .if_dout(img2_rows_V_c_dout),
    .if_empty_n(img2_rows_V_c_empty_n),
    .if_read(CvtColor_1_U0_p_src_rows_V_read)
);

fifo_w16_d4_A img2_cols_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img2_cols_V_out_din),
    .if_full_n(img2_cols_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img2_cols_V_out_write),
    .if_dout(img2_cols_V_c_dout),
    .if_empty_n(img2_cols_V_c_empty_n),
    .if_read(CvtColor_1_U0_p_src_cols_V_read)
);

fifo_w16_d5_A img3_rows_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img3_rows_V_out_din),
    .if_full_n(img3_rows_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img3_rows_V_out_write),
    .if_dout(img3_rows_V_c_dout),
    .if_empty_n(img3_rows_V_c_empty_n),
    .if_read(Mat2AXIvideo_U0_img_rows_V_read)
);

fifo_w16_d5_A img3_cols_V_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_img3_cols_V_out_din),
    .if_full_n(img3_cols_V_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_img3_cols_V_out_write),
    .if_dout(img3_cols_V_c_dout),
    .if_empty_n(img3_cols_V_c_empty_n),
    .if_read(Mat2AXIvideo_U0_img_cols_V_read)
);

fifo_w12_d3_A p_cols_assign_cast_lo_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_din),
    .if_full_n(p_cols_assign_cast_lo_full_n),
    .if_write(Block_Mat_exit1573_p_U0_p_cols_assign_cast_out_out_write),
    .if_dout(p_cols_assign_cast_lo_dout),
    .if_empty_n(p_cols_assign_cast_lo_empty_n),
    .if_read(Loop_loop_height_pro_U0_p_cols_assign_cast_loc_read)
);

fifo_w12_d3_A p_rows_assign_cast_lo_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_din),
    .if_full_n(p_rows_assign_cast_lo_full_n),
    .if_write(Block_Mat_exit1573_p_U0_p_rows_assign_cast_out_out_write),
    .if_dout(p_rows_assign_cast_lo_dout),
    .if_empty_n(p_rows_assign_cast_lo_empty_n),
    .if_read(Loop_loop_height_pro_U0_p_rows_assign_cast_loc_read)
);

fifo_w8_d3_A sat_c_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Block_Mat_exit1573_p_U0_sat_out_din),
    .if_full_n(sat_c_full_n),
    .if_write(Block_Mat_exit1573_p_U0_sat_out_write),
    .if_dout(sat_c_dout),
    .if_empty_n(sat_c_empty_n),
    .if_read(Loop_loop_height_pro_U0_sat_read)
);

fifo_w8_d1_A img0_data_stream_0_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(AXIvideo2Mat_U0_img_data_stream_0_V_din),
    .if_full_n(img0_data_stream_0_s_full_n),
    .if_write(AXIvideo2Mat_U0_img_data_stream_0_V_write),
    .if_dout(img0_data_stream_0_s_dout),
    .if_empty_n(img0_data_stream_0_s_empty_n),
    .if_read(CvtColor_U0_p_src_data_stream_0_V_read)
);

fifo_w8_d1_A img0_data_stream_1_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(AXIvideo2Mat_U0_img_data_stream_1_V_din),
    .if_full_n(img0_data_stream_1_s_full_n),
    .if_write(AXIvideo2Mat_U0_img_data_stream_1_V_write),
    .if_dout(img0_data_stream_1_s_dout),
    .if_empty_n(img0_data_stream_1_s_empty_n),
    .if_read(CvtColor_U0_p_src_data_stream_1_V_read)
);

fifo_w8_d1_A img0_data_stream_2_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(AXIvideo2Mat_U0_img_data_stream_2_V_din),
    .if_full_n(img0_data_stream_2_s_full_n),
    .if_write(AXIvideo2Mat_U0_img_data_stream_2_V_write),
    .if_dout(img0_data_stream_2_s_dout),
    .if_empty_n(img0_data_stream_2_s_empty_n),
    .if_read(CvtColor_U0_p_src_data_stream_2_V_read)
);

fifo_w16_d1_A img0_rows_V_c83_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(AXIvideo2Mat_U0_img_rows_V_out_din),
    .if_full_n(img0_rows_V_c83_full_n),
    .if_write(AXIvideo2Mat_U0_img_rows_V_out_write),
    .if_dout(img0_rows_V_c83_dout),
    .if_empty_n(img0_rows_V_c83_empty_n),
    .if_read(CvtColor_U0_p_src_rows_V_read)
);

fifo_w16_d1_A img0_cols_V_c84_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(AXIvideo2Mat_U0_img_cols_V_out_din),
    .if_full_n(img0_cols_V_c84_full_n),
    .if_write(AXIvideo2Mat_U0_img_cols_V_out_write),
    .if_dout(img0_cols_V_c84_dout),
    .if_empty_n(img0_cols_V_c84_empty_n),
    .if_read(CvtColor_U0_p_src_cols_V_read)
);

fifo_w8_d1_A img1_data_stream_0_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_U0_p_dst_data_stream_0_V_din),
    .if_full_n(img1_data_stream_0_s_full_n),
    .if_write(CvtColor_U0_p_dst_data_stream_0_V_write),
    .if_dout(img1_data_stream_0_s_dout),
    .if_empty_n(img1_data_stream_0_s_empty_n),
    .if_read(Loop_loop_height_pro_U0_img1_data_stream_0_V_read)
);

fifo_w8_d1_A img1_data_stream_1_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_U0_p_dst_data_stream_1_V_din),
    .if_full_n(img1_data_stream_1_s_full_n),
    .if_write(CvtColor_U0_p_dst_data_stream_1_V_write),
    .if_dout(img1_data_stream_1_s_dout),
    .if_empty_n(img1_data_stream_1_s_empty_n),
    .if_read(Loop_loop_height_pro_U0_img1_data_stream_1_V_read)
);

fifo_w8_d1_A img1_data_stream_2_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_U0_p_dst_data_stream_2_V_din),
    .if_full_n(img1_data_stream_2_s_full_n),
    .if_write(CvtColor_U0_p_dst_data_stream_2_V_write),
    .if_dout(img1_data_stream_2_s_dout),
    .if_empty_n(img1_data_stream_2_s_empty_n),
    .if_read(Loop_loop_height_pro_U0_img1_data_stream_2_V_read)
);

fifo_w8_d1_A img2_data_stream_0_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Loop_loop_height_pro_U0_img2_data_stream_0_V_din),
    .if_full_n(img2_data_stream_0_s_full_n),
    .if_write(Loop_loop_height_pro_U0_img2_data_stream_0_V_write),
    .if_dout(img2_data_stream_0_s_dout),
    .if_empty_n(img2_data_stream_0_s_empty_n),
    .if_read(CvtColor_1_U0_p_src_data_stream_0_V_read)
);

fifo_w8_d1_A img2_data_stream_1_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Loop_loop_height_pro_U0_img2_data_stream_1_V_din),
    .if_full_n(img2_data_stream_1_s_full_n),
    .if_write(Loop_loop_height_pro_U0_img2_data_stream_1_V_write),
    .if_dout(img2_data_stream_1_s_dout),
    .if_empty_n(img2_data_stream_1_s_empty_n),
    .if_read(CvtColor_1_U0_p_src_data_stream_1_V_read)
);

fifo_w8_d1_A img2_data_stream_2_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(Loop_loop_height_pro_U0_img2_data_stream_2_V_din),
    .if_full_n(img2_data_stream_2_s_full_n),
    .if_write(Loop_loop_height_pro_U0_img2_data_stream_2_V_write),
    .if_dout(img2_data_stream_2_s_dout),
    .if_empty_n(img2_data_stream_2_s_empty_n),
    .if_read(CvtColor_1_U0_p_src_data_stream_2_V_read)
);

fifo_w8_d1_A img3_data_stream_0_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_1_U0_p_dst_data_stream_0_V_din),
    .if_full_n(img3_data_stream_0_s_full_n),
    .if_write(CvtColor_1_U0_p_dst_data_stream_0_V_write),
    .if_dout(img3_data_stream_0_s_dout),
    .if_empty_n(img3_data_stream_0_s_empty_n),
    .if_read(Mat2AXIvideo_U0_img_data_stream_0_V_read)
);

fifo_w8_d1_A img3_data_stream_1_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_1_U0_p_dst_data_stream_1_V_din),
    .if_full_n(img3_data_stream_1_s_full_n),
    .if_write(CvtColor_1_U0_p_dst_data_stream_1_V_write),
    .if_dout(img3_data_stream_1_s_dout),
    .if_empty_n(img3_data_stream_1_s_empty_n),
    .if_read(Mat2AXIvideo_U0_img_data_stream_1_V_read)
);

fifo_w8_d1_A img3_data_stream_2_s_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(CvtColor_1_U0_p_dst_data_stream_2_V_din),
    .if_full_n(img3_data_stream_2_s_full_n),
    .if_write(CvtColor_1_U0_p_dst_data_stream_2_V_write),
    .if_dout(img3_data_stream_2_s_dout),
    .if_empty_n(img3_data_stream_2_s_empty_n),
    .if_read(Mat2AXIvideo_U0_img_data_stream_2_V_read)
);

start_for_Loop_lotde start_for_Loop_lotde_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(start_for_Loop_loop_height_pro_U0_din),
    .if_full_n(start_for_Loop_loop_height_pro_U0_full_n),
    .if_write(Block_Mat_exit1573_p_U0_start_write),
    .if_dout(start_for_Loop_loop_height_pro_U0_dout),
    .if_empty_n(start_for_Loop_loop_height_pro_U0_empty_n),
    .if_read(Loop_loop_height_pro_U0_ap_ready)
);

start_for_CvtColoudo start_for_CvtColoudo_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(start_for_CvtColor_1_U0_din),
    .if_full_n(start_for_CvtColor_1_U0_full_n),
    .if_write(Block_Mat_exit1573_p_U0_start_write),
    .if_dout(start_for_CvtColor_1_U0_dout),
    .if_empty_n(start_for_CvtColor_1_U0_empty_n),
    .if_read(CvtColor_1_U0_ap_ready)
);

start_for_Mat2AXIvdy start_for_Mat2AXIvdy_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(start_for_Mat2AXIvideo_U0_din),
    .if_full_n(start_for_Mat2AXIvideo_U0_full_n),
    .if_write(Block_Mat_exit1573_p_U0_start_write),
    .if_dout(start_for_Mat2AXIvideo_U0_dout),
    .if_empty_n(start_for_Mat2AXIvideo_U0_empty_n),
    .if_read(Mat2AXIvideo_U0_ap_ready)
);

start_for_CvtColowdI start_for_CvtColowdI_U(
    .clk(ap_clk),
    .reset(ap_rst_n_inv),
    .if_read_ce(1'b1),
    .if_write_ce(1'b1),
    .if_din(start_for_CvtColor_U0_din),
    .if_full_n(start_for_CvtColor_U0_full_n),
    .if_write(AXIvideo2Mat_U0_start_write),
    .if_dout(start_for_CvtColor_U0_dout),
    .if_empty_n(start_for_CvtColor_U0_empty_n),
    .if_read(CvtColor_U0_ap_ready)
);

assign AXIvideo2Mat_U0_ap_continue = 1'b1;

assign AXIvideo2Mat_U0_ap_start = 1'b1;

assign Block_Mat_exit1573_p_U0_ap_continue = 1'b1;

assign Block_Mat_exit1573_p_U0_ap_start = 1'b1;

assign Block_Mat_exit1573_p_U0_start_full_n = (start_for_Mat2AXIvideo_U0_full_n & start_for_Loop_loop_height_pro_U0_full_n & start_for_CvtColor_1_U0_full_n);

assign CvtColor_1_U0_ap_continue = 1'b1;

assign CvtColor_1_U0_ap_start = start_for_CvtColor_1_U0_empty_n;

assign CvtColor_1_U0_start_full_n = 1'b1;

assign CvtColor_1_U0_start_write = 1'b0;

assign CvtColor_U0_ap_continue = 1'b1;

assign CvtColor_U0_ap_start = start_for_CvtColor_U0_empty_n;

assign CvtColor_U0_start_full_n = 1'b1;

assign CvtColor_U0_start_write = 1'b0;

assign Loop_loop_height_pro_U0_ap_continue = 1'b1;

assign Loop_loop_height_pro_U0_ap_start = start_for_Loop_loop_height_pro_U0_empty_n;

assign Loop_loop_height_pro_U0_start_full_n = 1'b1;

assign Loop_loop_height_pro_U0_start_write = 1'b0;

assign Mat2AXIvideo_U0_ap_continue = 1'b1;

assign Mat2AXIvideo_U0_ap_start = start_for_Mat2AXIvideo_U0_empty_n;

assign Mat2AXIvideo_U0_start_full_n = 1'b1;

assign Mat2AXIvideo_U0_start_write = 1'b0;

always @ (*) begin
    ap_rst_n_inv = ~ap_rst_n;
end

assign ap_sync_continue = 1'b0;

assign start_for_CvtColor_1_U0_din = 1'b1;

assign start_for_CvtColor_U0_din = 1'b1;

assign start_for_Loop_loop_height_pro_U0_din = 1'b1;

assign start_for_Mat2AXIvideo_U0_din = 1'b1;

assign stream_in_TREADY = AXIvideo2Mat_U0_stream_in_TREADY;

assign stream_out_TDATA = Mat2AXIvideo_U0_stream_out_TDATA;

assign stream_out_TDEST = Mat2AXIvideo_U0_stream_out_TDEST;

assign stream_out_TID = Mat2AXIvideo_U0_stream_out_TID;

assign stream_out_TKEEP = Mat2AXIvideo_U0_stream_out_TKEEP;

assign stream_out_TLAST = Mat2AXIvideo_U0_stream_out_TLAST;

assign stream_out_TSTRB = Mat2AXIvideo_U0_stream_out_TSTRB;

assign stream_out_TUSER = Mat2AXIvideo_U0_stream_out_TUSER;

assign stream_out_TVALID = Mat2AXIvideo_U0_stream_out_TVALID;

endmodule //hls_saturation_enhance
