_lv1_0,
        I_AWLEN => ap_const_lv32_0,
        I_AWSIZE => ap_const_lv3_0,
        I_AWLOCK => ap_const_lv2_0,
        I_AWCACHE => ap_const_lv4_0,
        I_AWQOS => ap_const_lv4_0,
        I_AWPROT => ap_const_lv3_0,
        I_AWUSER => ap_const_lv1_0,
        I_AWBURST => ap_const_lv2_0,
        I_AWREGION => ap_const_lv4_0,
        I_WVALID => ap_const_logic_0,
        I_WREADY => CQDma_WREADY,
        I_WDATA => ap_const_lv32_0,
        I_WID => ap_const_lv1_0,
        I_WUSER => ap_const_lv1_0,
        I_WLAST => ap_const_logic_0,
        I_WSTRB => ap_const_lv4_0,
        I_BVALID => CQDma_BVALID,
        I_BREADY => ap_const_logic_0,
        I_BRESP => CQDma_BRESP,
        I_BID => CQDma_BID,
        I_BUSER => CQDma_BUSER);

    CuDmaController_CUDma_m_axi_U : component CuDmaController_CUDma_m_axi
    generic map (
        USER_DW => 32,
        USER_AW => 32,
        USER_MAXREQS => 5,
        NUM_READ_OUTSTANDING => 16,
        NUM_WRITE_OUTSTANDING => 16,
        MAX_READ_BURST_LENGTH => 16,
        MAX_WRITE_BURST_LENGTH => 16,
        C_M_AXI_ID_WIDTH => C_M_AXI_CUDMA_ID_WIDTH,
        C_M_AXI_ADDR_WIDTH => C_M_AXI_CUDMA_ADDR_WIDTH,
        C_M_AXI_DATA_WIDTH => C_M_AXI_CUDMA_DATA_WIDTH,
        C_M_AXI_AWUSER_WIDTH => C_M_AXI_CUDMA_AWUSER_WIDTH,
        C_M_AXI_ARUSER_WIDTH => C_M_AXI_CUDMA_ARUSER_WIDTH,
        C_M_AXI_WUSER_WIDTH => C_M_AXI_CUDMA_WUSER_WIDTH,
        C_M_AXI_RUSER_WIDTH => C_M_AXI_CUDMA_RUSER_WIDTH,
        C_M_AXI_BUSER_WIDTH => C_M_AXI_CUDMA_BUSER_WIDTH,
        C_TARGET_ADDR => C_M_AXI_CUDMA_TARGET_ADDR,
        C_USER_VALUE => C_M_AXI_CUDMA_USER_VALUE,
        C_PROT_VALUE => C_M_AXI_CUDMA_PROT_VALUE,
        C_CACHE_VALUE => C_M_AXI_CUDMA_CACHE_VALUE)
    port map (
        AWVALID => m_axi_CUDma_AWVALID,
        AWREADY => m_axi_CUDma_AWREADY,
        AWADDR => m_axi_CUDma_AWADDR,
        AWID => m_axi_CUDma_AWID,
        AWLEN => m_axi_CUDma_AWLEN,
        AWSIZE => m_axi_CUDma_AWSIZE,
        AWBURST => m_axi_CUDma_AWBURST,
        AWLOCK => m_axi_CUDma_AWLOCK,
        AWCACHE => m_axi_CUDma_AWCACHE,
        AWPROT => m_axi_CUDma_AWPROT,
        AWQOS => m_axi_CUDma_AWQOS,
        AWREGION => m_axi_CUDma_AWREGION,
        AWUSER => m_axi_CUDma_AWUSER,
        WVALID => m_axi_CUDma_WVALID,
        WREADY => m_axi_CUDma_WREADY,
        WDATA => m_axi_CUDma_WDATA,
        WSTRB => m_axi_CUDma_WSTRB,
        WLAST => m_axi_CUDma_WLAST,
        WID => m_axi_CUDma_WID,
        WUSER => m_axi_CUDma_WUSER,
        ARVALID => m_axi_CUDma_ARVALID,
        ARREADY => m_axi_CUDma_ARREADY,
        ARADDR => m_axi_CUDma_ARADDR,
        ARID => m_axi_CUDma_ARID,
        ARLEN => m_axi_CUDma_ARLEN,
        ARSIZE => m_axi_CUDma_ARSIZE,
        ARBURST => m_axi_CUDma_ARBURST,
        ARLOCK => m_axi_CUDma_ARLOCK,
        ARCACHE => m_axi_CUDma_ARCACHE,
        ARPROT => m_axi_CUDma_ARPROT,
        ARQOS => m_axi_CUDma_ARQOS,
        ARREGION => m_axi_CUDma_ARREGION,
        ARUSER => m_axi_CUDma_ARUSER,
        RVALID => m_axi_CUDma_RVALID,
        RREADY => m_axi_CUDma_RREADY,
        RDATA => m_axi_CUDma_RDATA,
        RLAST => m_axi_CUDma_RLAST,
        RID => m_axi_CUDma_RID,
        RUSER => m_axi_CUDma_RUSER,
        RRESP => m_axi_CUDma_RRESP,
        BVALID => m_axi_CUDma_BVALID,
        BREADY => m_axi_CUDma_BREADY,
        BRESP => m_axi_CUDma_BRESP,
        BID => m_axi_CUDma_BID,
        BUSER => m_axi_CUDma_BUSER,
        ACLK => ap_clk,
        ARESET => ap_rst_n_inv,
        ACLK_EN => ap_const_logic_1,
        I_ARVALID => ap_const_logic_0,
        I_ARREADY => CUDma_ARREADY,
        I_ARADDR => ap_const_lv32_0,
        I_ARID => ap_const_lv1_0,
        I_ARLEN => ap_const_lv32_0,
        I_ARSIZE => ap_const_lv3_0,
        I_ARLOCK => ap_const_lv2_0,
        I_ARCACHE => ap_const_lv4_0,
        I_ARQOS => ap_const_lv4_0,
        I_ARPROT => ap_const_lv3_0,
        I_ARUSER => ap_const_lv1_0,
        I_ARBURST => ap_const_lv2_0,
        I_ARREGION => ap_const_lv4_0,
        I_RVALID => CUDma_RVALID,
        I_RREADY => ap_const_logic_0,
        I_RDATA => CUDma_RDATA,
        I_RID => CUDma_RID,
        I_RUSER => CUDma_RUSER,
        I_RRESP => CUDma_RRESP,
        I_RLAST => CUDma_RLAST,
        I_AWVALID => CUDma_AWVALID,
        I_AWREADY => CUDma_AWREADY,
        I_AWADDR => CUDma_AWADDR,
        I_AWID => ap_const_lv1_0,
        I_AWLEN => CUDma_AWLEN,
        I_AWSIZE => ap_const_lv3_0,
        I_AWLOCK => ap_const_lv2_0,
        I_AWCACHE => ap_const_lv4_0,
        I_AWQOS => ap_const_lv4_0,
        I_AWPROT => ap_const_lv3_0,
        I_AWUSER => ap_const_lv1_0,
        I_AWBURST => ap_const_lv2_0,
        I_AWREGION => ap_const_lv4_0,
        I_WVALID => CUDma_WVALID,
        I_WREADY => CUDma_WREADY,
        I_WDATA => CUDma_WDATA,
        I_WID => ap_const_lv1_0,
        I_WUSER => ap_const_lv1_0,
        I_WLAST => ap_const_logic_0,
        I_WSTRB => ap_const_lv4_F,
        I_BVALID => CUDma_BVALID,
        I_BREADY => CUDma_BREADY,
        I_BRESP => CUDma_BRESP,
        I_BID => CUDma_BID,
        I_BUSER => CUDma_BUSER);

    CuDmaController_mbkb_U1 : component CuDmaController_mbkb
    generic map (
        ID => 1,
        NUM_STAGE => 1,
        din0_WIDTH => 32,
        din1_WIDTH => 32,
        din2_WIDTH => 32,
        din3_WIDTH => 32,
        din4_WIDTH => 2,
        dout_WIDTH => 32)
    port map (
        din0 => cubitmask_3_1_fu_142,
        din1 => cubitmask_3_3_fu_146,
        din2 => cubitmask_3_4_fu_150,
        din3 => cubitmask_3_7_fu_154,
        din4 => tmp_18_fu_783_p5,
        dout => tmp_18_fu_783_p6);





    ap_CS_fsm_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_CS_fsm <= ap_ST_fsm_state1;
            else
                ap_CS_fsm <= ap_NS_fsm;
            end if;
        end if;
    end process;


    ap_enable_reg_pp0_iter0_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_enable_reg_pp0_iter0 <= ap_const_logic_0;
            else
                if (((ap_const_boolean_0 = ap_block_pp0_stage0_subdone) and (ap_const_logic_1 = ap_condition_pp0_exit_iter0_state30) and (ap_const_logic_1 = ap_CS_fsm_pp0_stage0))) then 
                    ap_enable_reg_pp0_iter0 <= ap_const_logic_0;
                elsif (((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state29))) then 
                    ap_enable_reg_pp0_iter0 <= ap_const_logic_1;
                end if; 
            end if;
        end if;
    end process;


    ap_enable_reg_pp0_iter1_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_enable_reg_pp0_iter1 <= ap_const_logic_0;
            else
                if ((ap_const_boolean_0 = ap_block_pp0_stage0_subdone)) then
                    if ((ap_const_logic_1 = ap_condition_pp0_exit_iter0_state30)) then 
                        ap_enable_reg_pp0_iter1 <= (ap_const_logic_1 xor ap_condition_pp0_exit_iter0_state30);
                    elsif ((ap_const_boolean_1 = ap_const_boolean_1)) then 
                        ap_enable_reg_pp0_iter1 <= ap_enable_reg_pp0_iter0;
                    end if;
                end if; 
            end if;
        end if;
    end process;


    ap_enable_reg_pp0_iter2_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_enable_reg_pp0_iter2 <= ap_const_logic_0;
            else
                if ((ap_const_boolean_0 = ap_block_pp0_stage0_subdone)) then 
                    ap_enable_reg_pp0_iter2 <= ap_enable_reg_pp0_iter1;
                elsif (((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state29))) then 
                    ap_enable_reg_pp0_iter2 <= ap_const_logic_0;
                end if; 
            end if;
        end if;
    end process;


    ap_reg_ioackin_CQDma_ARREADY_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_reg_ioackin_CQDma_ARREADY <= ap_const_logic_0;
            else
                if ((((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state23)) or ((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state13)) or ((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state4)))) then 
                    ap_reg_ioackin_CQDma_ARREADY <= ap_const_logic_0;
                elsif ((((ap_const_logic_1 = CQDma_ARREADY) and (ap_const_logic_1 = ap_CS_fsm_state23)) or ((ap_const_logic_1 = CQDma_ARREADY) and (ap_const_logic_1 = ap_CS_fsm_state13)) or ((ap_const_logic_1 = CQDma_ARREADY) and (ap_const_logic_1 = ap_CS_fsm_state4)))) then 
                    ap_reg_ioackin_CQDma_ARREADY <= ap_const_logic_1;
                end if; 
            end if;
        end if;
    end process;


    ap_reg_ioackin_CUDma_AWREADY_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_reg_ioackin_CUDma_AWREADY <= ap_const_logic_0;
            else
                if ((((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state33)) or ((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state29)))) then 
                    ap_reg_ioackin_CUDma_AWREADY <= ap_const_logic_0;
                elsif ((((ap_const_logic_1 = CUDma_AWREADY) and (ap_const_logic_1 = ap_CS_fsm_state33)) or ((ap_const_logic_1 = CUDma_AWREADY) and (ap_const_logic_1 = ap_CS_fsm_state29)))) then 
                    ap_reg_ioackin_CUDma_AWREADY <= ap_const_logic_1;
                end if; 
            end if;
        end if;
    end process;


    ap_reg_ioackin_CUDma_WREADY_assign_proc : process(ap_clk)
    begin
        if (ap_clk'event and ap_clk =  '1') then
            if (ap_rst_n_inv = '1') then
                ap_reg_ioackin_CUDma_WREADY <= ap_const_logic_0;
            else
                if ((((ap_sig_ioackin_CUDma_WREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state34)) or ((ap_const_boolean_0 = ap_block_pp0_stage0_11001) and (ap_enable_reg_pp0_iter2 = ap_const_logic_1) and (ap_reg_pp0_iter1_tmp_32_reg_1151 = ap_const_lv1_1)))) then 
                    ap_reg_ioackin_CUDma_WREADY <= ap_const_logic_0;
                elsif ((((ap_const_logic_1 = CUDma_WREADY) and (ap_const_logic_1 = ap_CS_fsm_state34)) or ((ap_const_boolean_0 = ap_block_pp0_stage0_01001) and (ap_const_logic_1 = CUDma_WREADY) and (ap_enable_reg_pp0_iter2 = ap_const_logic_1) and (ap_reg_pp0_iter1_tmp_32_reg_1151 = ap_const_lv1_1)))) then 
                    ap_reg_ioackin_CUDma_WREADY <= ap_const_logic_1;
                end if; 
            end if;
        end if;
    end process;


    SlotOffset_n_reg_288_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((not(((ap_const_logic_0 = CUDma_BVALID) and (bit_reg_994 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state39))) then 
                SlotOffset_n_reg_288 <= SlotOffset_n_1_fu_913_p2;
            elsif ((ap_const_logic_1 = ap_CS_fsm_state2)) then 
                SlotOffset_n_reg_288 <= ap_const_lv32_0;
            end if; 
        end if;
    end process;

    i_reg_300_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((not(((ap_const_logic_0 = CUDma_BVALID) and (bit_reg_994 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state39))) then 
                i_reg_300 <= i_1_reg_989;
            elsif ((ap_const_logic_1 = ap_CS_fsm_state2)) then 
                i_reg_300 <= ap_const_lv8_0;
            end if; 
        end if;
    end process;

    idxloopcount_fu_158_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state33))) then 
                idxloopcount_fu_158 <= idxloopcount_4_reg_1092;
            elsif (((ap_start = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then 
                idxloopcount_fu_158 <= ap_const_lv8_0;
            end if; 
        end if;
    end process;

    j_reg_311_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state21)) then 
                j_reg_311 <= j_1_reg_1072;
            elsif ((ap_const_logic_1 = ap_CS_fsm_state19)) then 
                j_reg_311 <= ap_const_lv3_0;
            end if; 
        end if;
    end process;

    k_reg_322_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((idxbit_fu_803_p1 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state22) and (tmp_17_fu_762_p2 = ap_const_lv1_1))) then 
                k_reg_322 <= k_1_fu_767_p2;
            elsif ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20) and (tmp_9_fu_545_p2 = ap_const_lv1_0))) then 
                k_reg_322 <= ap_const_lv8_0;
            end if; 
        end if;
    end process;

    l_reg_333_assign_proc : process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_boolean_0 = ap_block_pp0_stage0_11001) and (ap_enable_reg_pp0_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp0_stage0) and (tmp_32_fu_884_p2 = ap_const_lv1_1))) then 
                l_reg_333 <= l_1_fu_889_p2;
            elsif (((ap_sig_ioackin_CUDma_AWREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state29))) then 
                l_reg_333 <= ap_const_lv8_0;
            end if; 
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_boolean_0 = ap_block_pp0_stage0_11001) and (ap_const_logic_1 = ap_CS_fsm_pp0_stage0) and (tmp_32_reg_1151 = ap_const_lv1_1))) then
                CQDma_addr_2_read_reg_1160 <= CQDma_RDATA;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_start = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
                CqBaseAddress_assign_fu_182 <= CqBaseAddress;
                CuBaseAddress_assign_fu_178 <= CuBaseAddress;
                CuDmaQueue_assign_fu_162 <= CuDmaQueue;
                CuOffset_assign_fu_170 <= CuOffset;
                NoOfSlots_assign_fu_174 <= NoOfSlots;
                SlotSize_assign_fu_166 <= SlotSize;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_logic_1 = ap_CS_fsm_state3) and (tmp_3_fu_409_p2 = ap_const_lv1_1) and (bit_fu_435_p1 = ap_const_lv1_1))) then
                SlotBaseAddr_reg_998 <= SlotBaseAddr_fu_439_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_boolean_0 = ap_block_pp0_stage0_11001) and (ap_const_logic_1 = ap_CS_fsm_pp0_stage0))) then
                ap_reg_pp0_iter1_tmp_32_reg_1151 <= tmp_32_reg_1151;
                tmp_32_reg_1151 <= tmp_32_fu_884_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_logic_1 = ap_CS_fsm_state3) and (tmp_3_fu_409_p2 = ap_const_lv1_1))) then
                bit_reg_994 <= bit_fu_435_p1;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) then
                cubitmask_3_10_reg_1077 <= CQDma_RDATA;
                tmp_reg_1085 <= tmp_fu_556_p1;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state21)) then
                cubitmask_3_1_fu_142 <= cubitmask_3_8_fu_727_p3;
                cubitmask_3_3_fu_146 <= cubitmask_3_6_fu_719_p3;
                cubitmask_3_4_fu_150 <= cubitmask_3_2_fu_704_p3;
                cubitmask_3_7_fu_154 <= cubitmask_3_fu_689_p3;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_logic_1 = CQDma_RVALID) and (ap_const_logic_1 = ap_CS_fsm_state11))) then
                header_reg_1011 <= CQDma_RDATA;
                noofcumasksread_tmp_reg_1021 <= CQDma_RDATA(11 downto 10);
                payload_reg_1016 <= CQDma_RDATA(19 downto 12);
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
                i_1_reg_989 <= i_1_fu_415_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20) and (tmp_9_fu_545_p2 = ap_const_lv1_0))) then
                idxloopcount_4_reg_1092 <= idxloopcount_4_fu_649_p3;
                    tmp_20_cast_reg_1097(7 downto 0) <= tmp_20_cast_fu_657_p1(7 downto 0);
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20))) then
                j_1_reg_1072 <= j_1_fu_550_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state12)) then
                noofcumasksread_reg_1027 <= noofcumasksread_fu_487_p2;
                payload_1_reg_1036 <= payload_1_fu_511_p2;
                tmp_s_reg_1042 <= tmp_s_fu_516_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state19)) then
                    tmp_10_cast_reg_1064(7 downto 0) <= tmp_10_cast_fu_538_p1(7 downto 0);
                    tmp_2_cast_reg_1058(2 downto 0) <= tmp_2_cast_fu_535_p1(2 downto 0);
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state22)) then
                tmp_16_reg_1102 <= tmp_16_fu_754_p1;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if ((ap_const_logic_1 = ap_CS_fsm_state28)) then
                tmp_24_reg_1135 <= tmp_24_fu_858_p2;
                tmp_29_reg_1140 <= tmp_29_fu_864_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_const_logic_1 = ap_CS_fsm_state22) and ((tmp_17_fu_762_p2 = ap_const_lv1_0) or (idxbit_fu_803_p1 = ap_const_lv1_1)))) then
                tmp_27_reg_1118 <= tmp_27_fu_816_p2;
            end if;
        end if;
    end process;
    process (ap_clk)
    begin
        if (ap_clk'event and ap_clk = '1') then
            if (((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state23))) then
                    tmp_31_reg_1129(7 downto 0) <= tmp_31_fu_831_p1(7 downto 0);
            end if;
        end if;
    end process;
    tmp_2_cast_reg_1058(3) <= '0';
    tmp_10_cast_reg_1064(8) <= '0';
    tmp_20_cast_reg_1097(8) <= '0';
    tmp_31_reg_1129(31 downto 8) <= "000000000000000000000000";

    ap_NS_fsm_assign_proc : process (ap_start, ap_CS_fsm, ap_CS_fsm_state1, ap_CS_fsm_state4, ap_CS_fsm_state11, ap_CS_fsm_state13, ap_CS_fsm_state20, tmp_9_fu_545_p2, ap_CS_fsm_state23, ap_enable_reg_pp0_iter1, ap_CS_fsm_state29, ap_enable_reg_pp0_iter2, ap_CS_fsm_state38, ap_CS_fsm_state33, ap_CS_fsm_state34, ap_CS_fsm_state39, bit_reg_994, CQDma_RVALID, CUDma_BVALID, ap_CS_fsm_state3, bit_fu_435_p1, tmp_3_fu_409_p2, ap_sig_ioackin_CQDma_ARREADY, ap_CS_fsm_state22, tmp_17_fu_762_p2, idxbit_fu_803_p1, ap_sig_ioackin_CUDma_AWREADY, tmp_32_fu_884_p2, ap_sig_ioackin_CUDma_WREADY, ap_enable_reg_pp0_iter0, ap_block_pp0_stage0_subdone)
    begin
        case ap_CS_fsm is
            when ap_ST_fsm_state1 => 
                if (((ap_start = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
                    ap_NS_fsm <= ap_ST_fsm_state2;
                else
                    ap_NS_fsm <= ap_ST_fsm_state1;
                end if;
            when ap_ST_fsm_state2 => 
                ap_NS_fsm <= ap_ST_fsm_state3;
            when ap_ST_fsm_state3 => 
                if (((tmp_3_fu_409_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state3))) then
                    ap_NS_fsm <= ap_ST_fsm_state1;
                elsif (((bit_fu_435_p1 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state3) and (tmp_3_fu_409_p2 = ap_const_lv1_1))) then
                    ap_NS_fsm <= ap_ST_fsm_state39;
                else
                    ap_NS_fsm <= ap_ST_fsm_state4;
                end if;
            when ap_ST_fsm_state4 => 
                if (((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
                    ap_NS_fsm <= ap_ST_fsm_state5;
                else
                    ap_NS_fsm <= ap_ST_fsm_state4;
                end if;
            when ap_ST_fsm_state5 => 
                ap_NS_fsm <= ap_ST_fsm_state6;
            when ap_ST_fsm_state6 => 
                ap_NS_fsm <= ap_ST_fsm_state7;
            when ap_ST_fsm_state7 => 
                ap_NS_fsm <= ap_ST_fsm_state8;
            when ap_ST_fsm_state8 => 
                ap_NS_fsm <= ap_ST_fsm_state9;
            when ap_ST_fsm_state9 => 
                ap_NS_fsm <= ap_ST_fsm_state10;
            when ap_ST_fsm_state10 => 
                ap_NS_fsm <= ap_ST_fsm_state11;
            when ap_ST_fsm_state11 => 
                if (((ap_const_logic_1 = CQDma_RVALID) and (ap_const_logic_1 = ap_CS_fsm_state11))) then
                    ap_NS_fsm <= ap_ST_fsm_state12;
                else
                    ap_NS_fsm <= ap_ST_fsm_state11;
                end if;
            when ap_ST_fsm_state12 => 
                ap_NS_fsm <= ap_ST_fsm_state13;
            when ap_ST_fsm_state13 => 
                if (((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state13))) then
                    ap_NS_fsm <= ap_ST_fsm_state14;
                else
                    ap_NS_fsm <= ap_ST_fsm_state13;
                end if;
            when ap_ST_fsm_state14 => 
                ap_NS_fsm <= ap_ST_fsm_state15;
            when ap_ST_fsm_state15 => 
                ap_NS_fsm <= ap_ST_fsm_state16;
            when ap_ST_fsm_state16 => 
                ap_NS_fsm <= ap_ST_fsm_state17;
            when ap_ST_fsm_state17 => 
                ap_NS_fsm <= ap_ST_fsm_state18;
            when ap_ST_fsm_state18 => 
                ap_NS_fsm <= ap_ST_fsm_state19;
            when ap_ST_fsm_state19 => 
                ap_NS_fsm <= ap_ST_fsm_state20;
            when ap_ST_fsm_state20 => 
                if ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20) and (tmp_9_fu_545_p2 = ap_const_lv1_0))) then
                    ap_NS_fsm <= ap_ST_fsm_state22;
                elsif ((not(((ap_const_logic_0 = CQDma_RVALID) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) and (ap_const_logic_1 = ap_CS_fsm_state20) and (tmp_9_fu_545_p2 = ap_const_lv1_1))) then
                    ap_NS_fsm <= ap_ST_fsm_state21;
                else
                    ap_NS_fsm <= ap_ST_fsm_state20;
                end if;
            when ap_ST_fsm_state21 => 
                ap_NS_fsm <= ap_ST_fsm_state20;
            when ap_ST_fsm_state22 => 
                if (((idxbit_fu_803_p1 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state22) and (tmp_17_fu_762_p2 = ap_const_lv1_1))) then
                    ap_NS_fsm <= ap_ST_fsm_state22;
                else
                    ap_NS_fsm <= ap_ST_fsm_state23;
                end if;
            when ap_ST_fsm_state23 => 
                if (((ap_sig_ioackin_CQDma_ARREADY = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state23))) then
                    ap_NS_fsm <= ap_ST_fsm_state24;
                else
                    ap_NS_fsm <= ap_ST_fsm_state23;
                end if;
            when ap_ST_fsm_state24 => 
                ap_NS_fsm <= ap_ST_fsm_state25;
            when ap_ST_fsm_state25 => 
                ap_NS_fsm <= ap_ST_fsm_state26;
            when ap_ST_fsm_state26 => 
                ap_NS_fsm <= ap_ST_fsm_state27;