// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2014.1
// Copyright (C) 2014 Xilinx Inc. All rights reserved.
// 
// ===========================================================

`timescale 1 ns / 1 ps 

(* CORE_GENERATION_INFO="nfa_accept_samples_generic_hw,hls_ip_2014_1,{HLS_INPUT_TYPE=c,HLS_INPUT_FLOAT=0,HLS_INPUT_FIXED=0,HLS_INPUT_PART=xc5vlx50tff1136-3,HLS_INPUT_CLOCK=7.000000,HLS_INPUT_ARCH=others,HLS_SYN_CLOCK=5.200000,HLS_SYN_LAT=53290010,HLS_SYN_TPT=none,HLS_SYN_MEM=0,HLS_SYN_DSP=0,HLS_SYN_FF=0,HLS_SYN_LUT=0}" *)

module nfa_accept_samples_generic_hw (
        ap_clk,
        ap_rst,
        ap_start,
        ap_done,
        ap_idle,
        ap_ready,
        nfa_initials_buckets_req_din,
        nfa_initials_buckets_req_full_n,
        nfa_initials_buckets_req_write,
        nfa_initials_buckets_rsp_empty_n,
        nfa_initials_buckets_rsp_read,
        nfa_initials_buckets_address,
        nfa_initials_buckets_datain,
        nfa_initials_buckets_dataout,
        nfa_initials_buckets_size,
        nfa_finals_buckets_req_din,
        nfa_finals_buckets_req_full_n,
        nfa_finals_buckets_req_write,
        nfa_finals_buckets_rsp_empty_n,
        nfa_finals_buckets_rsp_read,
        nfa_finals_buckets_address,
        nfa_finals_buckets_datain,
        nfa_finals_buckets_dataout,
        nfa_finals_buckets_size,
        nfa_forward_buckets_req_din,
        nfa_forward_buckets_req_full_n,
        nfa_forward_buckets_req_write,
        nfa_forward_buckets_rsp_empty_n,
        nfa_forward_buckets_rsp_read,
        nfa_forward_buckets_address,
        nfa_forward_buckets_datain,
        nfa_forward_buckets_dataout,
        nfa_forward_buckets_size,
        nfa_symbols,
        sample_buffer_req_din,
        sample_buffer_req_full_n,
        sample_buffer_req_write,
        sample_buffer_rsp_empty_n,
        sample_buffer_rsp_read,
        sample_buffer_address,
        sample_buffer_datain,
        sample_buffer_dataout,
        sample_buffer_size,
        sample_buffer_length,
        sample_length,
        indices_req_din,
        indices_req_full_n,
        indices_req_write,
        indices_rsp_empty_n,
        indices_rsp_read,
        indices_address,
        indices_datain,
        indices_dataout,
        indices_size,
        i_size,
        begin_index,
        begin_sample,
        end_index,
        end_sample,
        stop_on_first,
        accept,
        ap_return
);

parameter    ap_const_logic_1 = 1'b1;
parameter    ap_const_logic_0 = 1'b0;
parameter    ap_ST_st1_fsm_0 = 6'b000000;
parameter    ap_ST_st2_fsm_1 = 6'b1;
parameter    ap_ST_st3_fsm_2 = 6'b10;
parameter    ap_ST_st4_fsm_3 = 6'b11;
parameter    ap_ST_st5_fsm_4 = 6'b100;
parameter    ap_ST_st6_fsm_5 = 6'b101;
parameter    ap_ST_st7_fsm_6 = 6'b110;
parameter    ap_ST_st8_fsm_7 = 6'b111;
parameter    ap_ST_st9_fsm_8 = 6'b1000;
parameter    ap_ST_st10_fsm_9 = 6'b1001;
parameter    ap_ST_st11_fsm_10 = 6'b1010;
parameter    ap_ST_st12_fsm_11 = 6'b1011;
parameter    ap_ST_st13_fsm_12 = 6'b1100;
parameter    ap_ST_st14_fsm_13 = 6'b1101;
parameter    ap_ST_st15_fsm_14 = 6'b1110;
parameter    ap_ST_st16_fsm_15 = 6'b1111;
parameter    ap_ST_st17_fsm_16 = 6'b10000;
parameter    ap_ST_st18_fsm_17 = 6'b10001;
parameter    ap_ST_st19_fsm_18 = 6'b10010;
parameter    ap_ST_st20_fsm_19 = 6'b10011;
parameter    ap_ST_st21_fsm_20 = 6'b10100;
parameter    ap_ST_st22_fsm_21 = 6'b10101;
parameter    ap_ST_st23_fsm_22 = 6'b10110;
parameter    ap_ST_st24_fsm_23 = 6'b10111;
parameter    ap_ST_st25_fsm_24 = 6'b11000;
parameter    ap_ST_st26_fsm_25 = 6'b11001;
parameter    ap_ST_st27_fsm_26 = 6'b11010;
parameter    ap_ST_st28_fsm_27 = 6'b11011;
parameter    ap_ST_st29_fsm_28 = 6'b11100;
parameter    ap_ST_st30_fsm_29 = 6'b11101;
parameter    ap_ST_st31_fsm_30 = 6'b11110;
parameter    ap_ST_st32_fsm_31 = 6'b11111;
parameter    ap_ST_st33_fsm_32 = 6'b100000;
parameter    ap_ST_st34_fsm_33 = 6'b100001;
parameter    ap_ST_st35_fsm_34 = 6'b100010;
parameter    ap_ST_st36_fsm_35 = 6'b100011;
parameter    ap_ST_st37_fsm_36 = 6'b100100;
parameter    ap_const_lv1_0 = 1'b0;
parameter    ap_const_lv16_0 = 16'b0000000000000000;
parameter    ap_const_lv64_0 = 64'b0000000000000000000000000000000000000000000000000000000000000000;
parameter    ap_const_lv1_1 = 1'b1;
parameter    ap_const_lv32_0 = 32'b00000000000000000000000000000000;
parameter    ap_const_lv2_2 = 2'b10;
parameter    ap_const_lv32_1 = 32'b1;
parameter    ap_const_lv64_1 = 64'b1;
parameter    ap_const_lv16_1 = 16'b1;
parameter    ap_const_lv5_0 = 5'b00000;
parameter    ap_const_lv8_0 = 8'b00000000;
parameter    ap_true = 1'b1;

input   ap_clk;
input   ap_rst;
input   ap_start;
output   ap_done;
output   ap_idle;
output   ap_ready;
output   nfa_initials_buckets_req_din;
input   nfa_initials_buckets_req_full_n;
output   nfa_initials_buckets_req_write;
input   nfa_initials_buckets_rsp_empty_n;
output   nfa_initials_buckets_rsp_read;
output  [31:0] nfa_initials_buckets_address;
input  [31:0] nfa_initials_buckets_datain;
output  [31:0] nfa_initials_buckets_dataout;
output  [31:0] nfa_initials_buckets_size;
output   nfa_finals_buckets_req_din;
input   nfa_finals_buckets_req_full_n;
output   nfa_finals_buckets_req_write;
input   nfa_finals_buckets_rsp_empty_n;
output   nfa_finals_buckets_rsp_read;
output  [31:0] nfa_finals_buckets_address;
input  [31:0] nfa_finals_buckets_datain;
output  [31:0] nfa_finals_buckets_dataout;
output  [31:0] nfa_finals_buckets_size;
output   nfa_forward_buckets_req_din;
input   nfa_forward_buckets_req_full_n;
output   nfa_forward_buckets_req_write;
input   nfa_forward_buckets_rsp_empty_n;
output   nfa_forward_buckets_rsp_read;
output  [31:0] nfa_forward_buckets_address;
input  [31:0] nfa_forward_buckets_datain;
output  [31:0] nfa_forward_buckets_dataout;
output  [31:0] nfa_forward_buckets_size;
input  [7:0] nfa_symbols;
output   sample_buffer_req_din;
input   sample_buffer_req_full_n;
output   sample_buffer_req_write;
input   sample_buffer_rsp_empty_n;
output   sample_buffer_rsp_read;
output  [31:0] sample_buffer_address;
input  [7:0] sample_buffer_datain;
output  [7:0] sample_buffer_dataout;
output  [31:0] sample_buffer_size;
input  [31:0] sample_buffer_length;
input  [15:0] sample_length;
output   indices_req_din;
input   indices_req_full_n;
output   indices_req_write;
input   indices_rsp_empty_n;
output   indices_rsp_read;
output  [31:0] indices_address;
input  [55:0] indices_datain;
output  [55:0] indices_dataout;
output  [31:0] indices_size;
input  [15:0] i_size;
input  [15:0] begin_index;
input  [15:0] begin_sample;
input  [15:0] end_index;
input  [15:0] end_sample;
input  [0:0] stop_on_first;
input  [0:0] accept;
output  [31:0] ap_return;

reg ap_done;
reg ap_idle;
reg ap_ready;
reg nfa_forward_buckets_req_write;
reg nfa_forward_buckets_rsp_read;
reg[31:0] nfa_forward_buckets_address;
reg sample_buffer_req_write;
reg sample_buffer_rsp_read;
reg indices_req_din;
reg indices_req_write;
reg indices_rsp_read;
reg[31:0] indices_address;
reg[55:0] indices_dataout;
reg[31:0] indices_size;
reg   [5:0] ap_CS_fsm = 6'b000000;
reg   [31:0] reg_512;
wire   [0:0] stop_on_first_read_read_fu_150_p2;
reg   [31:0] c_load_reg_813;
reg   [31:0] current_buckets_0_reg_822;
reg   [31:0] current_buckets_1_reg_827;
wire   [63:0] tmp_2_fu_548_p1;
reg   [63:0] tmp_2_reg_832;
reg   [31:0] sample_buffer_addr_reg_837;
wire   [15:0] i_fu_568_p2;
reg   [15:0] i_reg_846;
wire   [63:0] p_rec_i_fu_574_p2;
reg   [63:0] p_rec_i_reg_851;
wire   [0:0] tmp_3_fu_563_p2;
reg   [7:0] sym_reg_856;
wire   [0:0] tmp_2_i_fu_580_p2;
reg   [0:0] tmp_2_i_reg_861;
wire   [0:0] tmp_2_1_i_fu_586_p2;
reg   [0:0] tmp_2_1_i_reg_865;
wire   [4:0] r_bit_p_bsf32_hw_fu_506_ap_return;
reg   [4:0] r_bit_reg_869;
wire   [7:0] j_bucket_index1_ph_cast_fu_597_p1;
wire   [7:0] j_bit1_ph_cast_fu_601_p1;
wire   [13:0] tmp_10_i_cast_fu_605_p1;
reg   [13:0] tmp_10_i_cast_reg_884;
wire   [0:0] j_end_phi_fu_417_p4;
wire   [13:0] tmp_11_i_fu_644_p2;
reg   [13:0] tmp_11_i_reg_899;
reg   [7:0] j_bit_reg_911;
reg   [7:0] j_bucket_index_reg_916;
reg   [31:0] j_bucket_reg_921;
reg   [0:0] p_s_reg_926;
wire   [31:0] next_buckets_0_1_fu_701_p2;
reg   [31:0] next_buckets_0_1_reg_937;
wire   [31:0] next_buckets_1_1_fu_707_p2;
reg   [31:0] tmp_buckets_0_reg_947;
reg   [31:0] tmp_buckets_1_reg_952;
wire   [0:0] tmp_5_fu_737_p2;
wire    grp_bitset_next_fu_460_ap_start;
wire    grp_bitset_next_fu_460_ap_done;
wire    grp_bitset_next_fu_460_ap_idle;
wire    grp_bitset_next_fu_460_ap_ready;
wire    grp_bitset_next_fu_460_ap_ce;
wire   [31:0] grp_bitset_next_fu_460_p_read;
wire   [7:0] grp_bitset_next_fu_460_r_bit;
wire   [7:0] grp_bitset_next_fu_460_r_bucket_index;
wire   [31:0] grp_bitset_next_fu_460_r_bucket;
wire   [7:0] grp_bitset_next_fu_460_ap_return_0;
wire   [7:0] grp_bitset_next_fu_460_ap_return_1;
wire   [31:0] grp_bitset_next_fu_460_ap_return_2;
wire   [0:0] grp_bitset_next_fu_460_ap_return_3;
wire    grp_sample_iterator_next_fu_472_ap_start;
wire    grp_sample_iterator_next_fu_472_ap_done;
wire    grp_sample_iterator_next_fu_472_ap_idle;
wire    grp_sample_iterator_next_fu_472_ap_ready;
wire    grp_sample_iterator_next_fu_472_indices_req_din;
wire    grp_sample_iterator_next_fu_472_indices_req_full_n;
wire    grp_sample_iterator_next_fu_472_indices_req_write;
wire    grp_sample_iterator_next_fu_472_indices_rsp_empty_n;
wire    grp_sample_iterator_next_fu_472_indices_rsp_read;
wire   [31:0] grp_sample_iterator_next_fu_472_indices_address;
wire   [55:0] grp_sample_iterator_next_fu_472_indices_datain;
wire   [55:0] grp_sample_iterator_next_fu_472_indices_dataout;
wire   [31:0] grp_sample_iterator_next_fu_472_indices_size;
wire    grp_sample_iterator_next_fu_472_ap_ce;
wire   [15:0] grp_sample_iterator_next_fu_472_i_index;
wire   [15:0] grp_sample_iterator_next_fu_472_i_sample;
wire   [15:0] grp_sample_iterator_next_fu_472_ap_return_0;
wire   [15:0] grp_sample_iterator_next_fu_472_ap_return_1;
wire    grp_sample_iterator_get_offset_fu_482_ap_start;
wire    grp_sample_iterator_get_offset_fu_482_ap_done;
wire    grp_sample_iterator_get_offset_fu_482_ap_idle;
wire    grp_sample_iterator_get_offset_fu_482_ap_ready;
wire    grp_sample_iterator_get_offset_fu_482_indices_req_din;
wire    grp_sample_iterator_get_offset_fu_482_indices_req_full_n;
wire    grp_sample_iterator_get_offset_fu_482_indices_req_write;
wire    grp_sample_iterator_get_offset_fu_482_indices_rsp_empty_n;
wire    grp_sample_iterator_get_offset_fu_482_indices_rsp_read;
wire   [31:0] grp_sample_iterator_get_offset_fu_482_indices_address;
wire   [55:0] grp_sample_iterator_get_offset_fu_482_indices_datain;
wire   [55:0] grp_sample_iterator_get_offset_fu_482_indices_dataout;
wire   [31:0] grp_sample_iterator_get_offset_fu_482_indices_size;
wire    grp_sample_iterator_get_offset_fu_482_ap_ce;
wire   [15:0] grp_sample_iterator_get_offset_fu_482_i_index;
wire   [15:0] grp_sample_iterator_get_offset_fu_482_i_sample;
wire   [31:0] grp_sample_iterator_get_offset_fu_482_sample_buffer_size;
wire   [15:0] grp_sample_iterator_get_offset_fu_482_sample_length;
wire   [31:0] grp_sample_iterator_get_offset_fu_482_ap_return;
wire    grp_nfa_get_initials_fu_494_ap_start;
wire    grp_nfa_get_initials_fu_494_ap_done;
wire    grp_nfa_get_initials_fu_494_ap_idle;
wire    grp_nfa_get_initials_fu_494_ap_ready;
wire    grp_nfa_get_initials_fu_494_ap_ce;
wire    grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_din;
wire    grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_full_n;
wire    grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_write;
wire    grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_empty_n;
wire    grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_read;
wire   [31:0] grp_nfa_get_initials_fu_494_nfa_initials_buckets_address;
wire   [31:0] grp_nfa_get_initials_fu_494_nfa_initials_buckets_datain;
wire   [31:0] grp_nfa_get_initials_fu_494_nfa_initials_buckets_dataout;
wire   [31:0] grp_nfa_get_initials_fu_494_nfa_initials_buckets_size;
wire   [31:0] grp_nfa_get_initials_fu_494_ap_return_0;
wire   [31:0] grp_nfa_get_initials_fu_494_ap_return_1;
wire    grp_nfa_get_finals_fu_500_ap_start;
wire    grp_nfa_get_finals_fu_500_ap_done;
wire    grp_nfa_get_finals_fu_500_ap_idle;
wire    grp_nfa_get_finals_fu_500_ap_ready;
wire    grp_nfa_get_finals_fu_500_ap_ce;
wire    grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_din;
wire    grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_full_n;
wire    grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_write;
wire    grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_empty_n;
wire    grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_read;
wire   [31:0] grp_nfa_get_finals_fu_500_nfa_finals_buckets_address;
wire   [31:0] grp_nfa_get_finals_fu_500_nfa_finals_buckets_datain;
wire   [31:0] grp_nfa_get_finals_fu_500_nfa_finals_buckets_dataout;
wire   [31:0] grp_nfa_get_finals_fu_500_nfa_finals_buckets_size;
wire   [31:0] grp_nfa_get_finals_fu_500_ap_return_0;
wire   [31:0] grp_nfa_get_finals_fu_500_ap_return_1;
wire   [31:0] r_bit_p_bsf32_hw_fu_506_bus_r;
reg   [15:0] i_index_reg_222;
reg   [15:0] i_sample_reg_232;
reg   [31:0] next_buckets_1_reg_242;
wire   [0:0] any_0_i_phi_fu_429_p4;
reg   [31:0] next_buckets_0_reg_252;
reg   [15:0] i_0_i_reg_262;
reg   [63:0] p_01_rec_i_reg_273;
reg   [31:0] bus_assign_reg_284;
reg   [0:0] agg_result_bucket_index_0_lcssa4_i_reg_296;
reg   [31:0] j_bucket1_ph_phi_fu_313_p4;
reg   [31:0] j_bucket1_ph_reg_309;
reg   [1:0] j_bucket_index1_ph_phi_fu_326_p4;
reg   [1:0] j_bucket_index1_ph_reg_322;
wire   [1:0] agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_592_p1;
reg   [4:0] j_bit1_ph_phi_fu_337_p4;
reg   [4:0] j_bit1_ph_reg_333;
reg   [0:0] j_end_ph_phi_fu_348_p4;
reg   [0:0] j_end_ph_reg_344;
reg   [31:0] tmp_buckets_1_3_reg_357;
reg   [31:0] tmp_buckets_0_3_reg_370;
reg   [31:0] j_bucket1_reg_383;
reg   [7:0] j_bucket_index1_reg_394;
reg   [7:0] j_bit1_reg_404;
reg   [0:0] j_end_reg_414;
reg   [0:0] any_0_i_reg_424;
reg   [0:0] r_reg_437;
reg   [31:0] p_0_reg_448;
wire   [0:0] tmp_i_13_fu_534_p2;
wire   [0:0] or_cond_fu_743_p2;
reg    grp_bitset_next_fu_460_ap_start_ap_start_reg = 1'b0;
reg   [5:0] ap_NS_fsm;
reg    grp_sample_iterator_next_fu_472_ap_start_ap_start_reg = 1'b0;
reg    grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg = 1'b0;
reg    grp_nfa_get_initials_fu_494_ap_start_ap_start_reg = 1'b0;
reg    grp_nfa_get_finals_fu_500_ap_start_ap_start_reg = 1'b0;
wire   [63:0] sum_fu_552_p2;
wire   [63:0] tmp_12_i_cast_fu_656_p1;
wire   [63:0] tmp_13_i_cast_fu_690_p1;
reg   [31:0] c_fu_140;
wire   [31:0] c_1_fu_748_p2;
wire   [0:0] tmp_i_fu_524_p2;
wire   [0:0] tmp_i_12_fu_529_p2;
wire   [0:0] tmp_6_fu_608_p1;
wire   [5:0] tmp_i1_fu_612_p3;
wire   [5:0] tmp_8_fu_620_p1;
wire   [5:0] state_fu_624_p2;
wire   [7:0] grp_fu_638_p0;
wire   [5:0] grp_fu_638_p1;
wire   [13:0] grp_fu_638_p2;
wire   [14:0] tmp_12_i_fu_649_p3;
wire   [14:0] tmp_13_i_fu_683_p3;
wire   [31:0] current_buckets_1_1_fu_726_p2;
wire   [31:0] current_buckets_0_1_fu_721_p2;
wire   [31:0] tmp_1_fu_731_p2;
wire    grp_fu_638_ce;
wire   [13:0] grp_fu_638_p00;
wire   [13:0] grp_fu_638_p10;
reg    ap_sig_bdd_370;
reg    ap_sig_bdd_187;


bitset_next grp_bitset_next_fu_460(
    .ap_clk( ap_clk ),
    .ap_rst( ap_rst ),
    .ap_start( grp_bitset_next_fu_460_ap_start ),
    .ap_done( grp_bitset_next_fu_460_ap_done ),
    .ap_idle( grp_bitset_next_fu_460_ap_idle ),
    .ap_ready( grp_bitset_next_fu_460_ap_ready ),
    .ap_ce( grp_bitset_next_fu_460_ap_ce ),
    .p_read( grp_bitset_next_fu_460_p_read ),
    .r_bit( grp_bitset_next_fu_460_r_bit ),
    .r_bucket_index( grp_bitset_next_fu_460_r_bucket_index ),
    .r_bucket( grp_bitset_next_fu_460_r_bucket ),
    .ap_return_0( grp_bitset_next_fu_460_ap_return_0 ),
    .ap_return_1( grp_bitset_next_fu_460_ap_return_1 ),
    .ap_return_2( grp_bitset_next_fu_460_ap_return_2 ),
    .ap_return_3( grp_bitset_next_fu_460_ap_return_3 )
);

sample_iterator_next grp_sample_iterator_next_fu_472(
    .ap_clk( ap_clk ),
    .ap_rst( ap_rst ),
    .ap_start( grp_sample_iterator_next_fu_472_ap_start ),
    .ap_done( grp_sample_iterator_next_fu_472_ap_done ),
    .ap_idle( grp_sample_iterator_next_fu_472_ap_idle ),
    .ap_ready( grp_sample_iterator_next_fu_472_ap_ready ),
    .indices_req_din( grp_sample_iterator_next_fu_472_indices_req_din ),
    .indices_req_full_n( grp_sample_iterator_next_fu_472_indices_req_full_n ),
    .indices_req_write( grp_sample_iterator_next_fu_472_indices_req_write ),
    .indices_rsp_empty_n( grp_sample_iterator_next_fu_472_indices_rsp_empty_n ),
    .indices_rsp_read( grp_sample_iterator_next_fu_472_indices_rsp_read ),
    .indices_address( grp_sample_iterator_next_fu_472_indices_address ),
    .indices_datain( grp_sample_iterator_next_fu_472_indices_datain ),
    .indices_dataout( grp_sample_iterator_next_fu_472_indices_dataout ),
    .indices_size( grp_sample_iterator_next_fu_472_indices_size ),
    .ap_ce( grp_sample_iterator_next_fu_472_ap_ce ),
    .i_index( grp_sample_iterator_next_fu_472_i_index ),
    .i_sample( grp_sample_iterator_next_fu_472_i_sample ),
    .ap_return_0( grp_sample_iterator_next_fu_472_ap_return_0 ),
    .ap_return_1( grp_sample_iterator_next_fu_472_ap_return_1 )
);

sample_iterator_get_offset grp_sample_iterator_get_offset_fu_482(
    .ap_clk( ap_clk ),
    .ap_rst( ap_rst ),
    .ap_start( grp_sample_iterator_get_offset_fu_482_ap_start ),
    .ap_done( grp_sample_iterator_get_offset_fu_482_ap_done ),
    .ap_idle( grp_sample_iterator_get_offset_fu_482_ap_idle ),
    .ap_ready( grp_sample_iterator_get_offset_fu_482_ap_ready ),
    .indices_req_din( grp_sample_iterator_get_offset_fu_482_indices_req_din ),
    .indices_req_full_n( grp_sample_iterator_get_offset_fu_482_indices_req_full_n ),
    .indices_req_write( grp_sample_iterator_get_offset_fu_482_indices_req_write ),
    .indices_rsp_empty_n( grp_sample_iterator_get_offset_fu_482_indices_rsp_empty_n ),
    .indices_rsp_read( grp_sample_iterator_get_offset_fu_482_indices_rsp_read ),
    .indices_address( grp_sample_iterator_get_offset_fu_482_indices_address ),
    .indices_datain( grp_sample_iterator_get_offset_fu_482_indices_datain ),
    .indices_dataout( grp_sample_iterator_get_offset_fu_482_indices_dataout ),
    .indices_size( grp_sample_iterator_get_offset_fu_482_indices_size ),
    .ap_ce( grp_sample_iterator_get_offset_fu_482_ap_ce ),
    .i_index( grp_sample_iterator_get_offset_fu_482_i_index ),
    .i_sample( grp_sample_iterator_get_offset_fu_482_i_sample ),
    .sample_buffer_size( grp_sample_iterator_get_offset_fu_482_sample_buffer_size ),
    .sample_length( grp_sample_iterator_get_offset_fu_482_sample_length ),
    .ap_return( grp_sample_iterator_get_offset_fu_482_ap_return )
);

nfa_get_initials grp_nfa_get_initials_fu_494(
    .ap_clk( ap_clk ),
    .ap_rst( ap_rst ),
    .ap_start( grp_nfa_get_initials_fu_494_ap_start ),
    .ap_done( grp_nfa_get_initials_fu_494_ap_done ),
    .ap_idle( grp_nfa_get_initials_fu_494_ap_idle ),
    .ap_ready( grp_nfa_get_initials_fu_494_ap_ready ),
    .ap_ce( grp_nfa_get_initials_fu_494_ap_ce ),
    .nfa_initials_buckets_req_din( grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_din ),
    .nfa_initials_buckets_req_full_n( grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_full_n ),
    .nfa_initials_buckets_req_write( grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_write ),
    .nfa_initials_buckets_rsp_empty_n( grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_empty_n ),
    .nfa_initials_buckets_rsp_read( grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_read ),
    .nfa_initials_buckets_address( grp_nfa_get_initials_fu_494_nfa_initials_buckets_address ),
    .nfa_initials_buckets_datain( grp_nfa_get_initials_fu_494_nfa_initials_buckets_datain ),
    .nfa_initials_buckets_dataout( grp_nfa_get_initials_fu_494_nfa_initials_buckets_dataout ),
    .nfa_initials_buckets_size( grp_nfa_get_initials_fu_494_nfa_initials_buckets_size ),
    .ap_return_0( grp_nfa_get_initials_fu_494_ap_return_0 ),
    .ap_return_1( grp_nfa_get_initials_fu_494_ap_return_1 )
);

nfa_get_finals grp_nfa_get_finals_fu_500(
    .ap_clk( ap_clk ),
    .ap_rst( ap_rst ),
    .ap_start( grp_nfa_get_finals_fu_500_ap_start ),
    .ap_done( grp_nfa_get_finals_fu_500_ap_done ),
    .ap_idle( grp_nfa_get_finals_fu_500_ap_idle ),
    .ap_ready( grp_nfa_get_finals_fu_500_ap_ready ),
    .ap_ce( grp_nfa_get_finals_fu_500_ap_ce ),
    .nfa_finals_buckets_req_din( grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_din ),
    .nfa_finals_buckets_req_full_n( grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_full_n ),
    .nfa_finals_buckets_req_write( grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_write ),
    .nfa_finals_buckets_rsp_empty_n( grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_empty_n ),
    .nfa_finals_buckets_rsp_read( grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_read ),
    .nfa_finals_buckets_address( grp_nfa_get_finals_fu_500_nfa_finals_buckets_address ),
    .nfa_finals_buckets_datain( grp_nfa_get_finals_fu_500_nfa_finals_buckets_datain ),
    .nfa_finals_buckets_dataout( grp_nfa_get_finals_fu_500_nfa_finals_buckets_dataout ),
    .nfa_finals_buckets_size( grp_nfa_get_finals_fu_500_nfa_finals_buckets_size ),
    .ap_return_0( grp_nfa_get_finals_fu_500_ap_return_0 ),
    .ap_return_1( grp_nfa_get_finals_fu_500_ap_return_1 )
);

p_bsf32_hw r_bit_p_bsf32_hw_fu_506(
    .bus_r( r_bit_p_bsf32_hw_fu_506_bus_r ),
    .ap_return( r_bit_p_bsf32_hw_fu_506_ap_return )
);

nfa_accept_samples_generic_hw_mul_8ns_6ns_14_2 #(
    .ID( 16 ),
    .NUM_STAGE( 2 ),
    .din0_WIDTH( 8 ),
    .din1_WIDTH( 6 ),
    .dout_WIDTH( 14 ))
nfa_accept_samples_generic_hw_mul_8ns_6ns_14_2_U16(
    .clk( ap_clk ),
    .reset( ap_rst ),
    .din0( grp_fu_638_p0 ),
    .din1( grp_fu_638_p1 ),
    .ce( grp_fu_638_ce ),
    .dout( grp_fu_638_p2 )
);



/// the current state (ap_CS_fsm) of the state machine. ///
always @ (posedge ap_clk)
begin : ap_ret_ap_CS_fsm
    if (ap_rst == 1'b1) begin
        ap_CS_fsm <= ap_ST_st1_fsm_0;
    end else begin
        ap_CS_fsm <= ap_NS_fsm;
    end
end

/// grp_bitset_next_fu_460_ap_start_ap_start_reg assign process. ///
always @ (posedge ap_clk)
begin : ap_ret_grp_bitset_next_fu_460_ap_start_ap_start_reg
    if (ap_rst == 1'b1) begin
        grp_bitset_next_fu_460_ap_start_ap_start_reg <= ap_const_logic_0;
    end else begin
        if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & (ap_ST_st17_fsm_16 == ap_NS_fsm))) begin
            grp_bitset_next_fu_460_ap_start_ap_start_reg <= ap_const_logic_1;
        end else if ((ap_const_logic_1 == grp_bitset_next_fu_460_ap_ready)) begin
            grp_bitset_next_fu_460_ap_start_ap_start_reg <= ap_const_logic_0;
        end
    end
end

/// grp_nfa_get_finals_fu_500_ap_start_ap_start_reg assign process. ///
always @ (posedge ap_clk)
begin : ap_ret_grp_nfa_get_finals_fu_500_ap_start_ap_start_reg
    if (ap_rst == 1'b1) begin
        grp_nfa_get_finals_fu_500_ap_start_ap_start_reg <= ap_const_logic_0;
    end else begin
        if (((ap_ST_st10_fsm_9 == ap_CS_fsm) & (ap_ST_st25_fsm_24 == ap_NS_fsm))) begin
            grp_nfa_get_finals_fu_500_ap_start_ap_start_reg <= ap_const_logic_1;
        end else if ((ap_const_logic_1 == grp_nfa_get_finals_fu_500_ap_ready)) begin
            grp_nfa_get_finals_fu_500_ap_start_ap_start_reg <= ap_const_logic_0;
        end
    end
end

/// grp_nfa_get_initials_fu_494_ap_start_ap_start_reg assign process. ///
always @ (posedge ap_clk)
begin : ap_ret_grp_nfa_get_initials_fu_494_ap_start_ap_start_reg
    if (ap_rst == 1'b1) begin
        grp_nfa_get_initials_fu_494_ap_start_ap_start_reg <= ap_const_logic_0;
    end else begin
        if (((ap_ST_st2_fsm_1 == ap_CS_fsm) & (ap_ST_st3_fsm_2 == ap_NS_fsm))) begin
            grp_nfa_get_initials_fu_494_ap_start_ap_start_reg <= ap_const_logic_1;
        end else if ((ap_const_logic_1 == grp_nfa_get_initials_fu_494_ap_ready)) begin
            grp_nfa_get_initials_fu_494_ap_start_ap_start_reg <= ap_const_logic_0;
        end
    end
end

/// grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg assign process. ///
always @ (posedge ap_clk)
begin : ap_ret_grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg
    if (ap_rst == 1'b1) begin
        grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg <= ap_const_logic_0;
    end else begin
        if (((ap_ST_st5_fsm_4 == ap_NS_fsm) & (ap_ST_st4_fsm_3 == ap_CS_fsm))) begin
            grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg <= ap_const_logic_1;
        end else if ((ap_const_logic_1 == grp_sample_iterator_get_offset_fu_482_ap_ready)) begin
            grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg <= ap_const_logic_0;
        end
    end
end

/// grp_sample_iterator_next_fu_472_ap_start_ap_start_reg assign process. ///
always @ (posedge ap_clk)
begin : ap_ret_grp_sample_iterator_next_fu_472_ap_start_ap_start_reg
    if (ap_rst == 1'b1) begin
        grp_sample_iterator_next_fu_472_ap_start_ap_start_reg <= ap_const_logic_0;
    end else begin
        if (((ap_ST_st32_fsm_31 == ap_CS_fsm) & (ap_ST_st33_fsm_32 == ap_NS_fsm))) begin
            grp_sample_iterator_next_fu_472_ap_start_ap_start_reg <= ap_const_logic_1;
        end else if ((ap_const_logic_1 == grp_sample_iterator_next_fu_472_ap_ready)) begin
            grp_sample_iterator_next_fu_472_ap_start_ap_start_reg <= ap_const_logic_0;
        end
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (ap_sig_bdd_187) begin
        if (ap_sig_bdd_370) begin
            agg_result_bucket_index_0_lcssa4_i_reg_296 <= ap_const_lv1_1;
        end else if ((ap_const_lv1_0 == tmp_2_i_fu_580_p2)) begin
            agg_result_bucket_index_0_lcssa4_i_reg_296 <= ap_const_lv1_0;
        end
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        any_0_i_reg_424 <= ap_const_lv1_0;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        any_0_i_reg_424 <= ap_const_lv1_1;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (ap_sig_bdd_187) begin
        if (ap_sig_bdd_370) begin
            bus_assign_reg_284 <= next_buckets_1_reg_242;
        end else if ((ap_const_lv1_0 == tmp_2_i_fu_580_p2)) begin
            bus_assign_reg_284 <= next_buckets_0_reg_252;
        end
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st32_fsm_31 == ap_CS_fsm) & (stop_on_first_read_read_fu_150_p2 == ap_const_lv1_0) & (ap_const_lv1_0 == or_cond_fu_743_p2))) begin
        c_fu_140 <= c_1_fu_748_p2;
    end else if (((ap_ST_st1_fsm_0 == ap_CS_fsm) & ~(ap_start == ap_const_logic_0))) begin
        c_fu_140 <= ap_const_lv32_0;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & ~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & ~(ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
        i_0_i_reg_262 <= i_reg_846;
    end else if ((ap_ST_st9_fsm_8 == ap_CS_fsm)) begin
        i_0_i_reg_262 <= ap_const_lv16_0;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st36_fsm_35 == ap_CS_fsm)) begin
        i_index_reg_222 <= grp_sample_iterator_next_fu_472_ap_return_0;
    end else if (((ap_ST_st1_fsm_0 == ap_CS_fsm) & ~(ap_start == ap_const_logic_0))) begin
        i_index_reg_222 <= begin_index;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st36_fsm_35 == ap_CS_fsm)) begin
        i_sample_reg_232 <= grp_sample_iterator_next_fu_472_ap_return_1;
    end else if (((ap_ST_st1_fsm_0 == ap_CS_fsm) & ~(ap_start == ap_const_logic_0))) begin
        i_sample_reg_232 <= begin_sample;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        j_bit1_reg_404 <= j_bit1_ph_cast_fu_601_p1;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        j_bit1_reg_404 <= j_bit_reg_911;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bucket1_ph_reg_309 <= bus_assign_reg_284;
    end else if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ~(ap_const_lv1_0 == tmp_2_i_fu_580_p2) & ~(ap_const_lv1_0 == tmp_2_1_i_fu_586_p2))) begin
        j_bucket1_ph_reg_309 <= ap_const_lv32_0;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        j_bucket1_reg_383 <= j_bucket1_ph_phi_fu_313_p4;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        j_bucket1_reg_383 <= j_bucket_reg_921;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bucket_index1_ph_reg_322 <= agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_592_p1;
    end else if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ~(ap_const_lv1_0 == tmp_2_i_fu_580_p2) & ~(ap_const_lv1_0 == tmp_2_1_i_fu_586_p2))) begin
        j_bucket_index1_ph_reg_322 <= ap_const_lv2_2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        j_bucket_index1_reg_394 <= j_bucket_index1_ph_cast_fu_597_p1;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        j_bucket_index1_reg_394 <= j_bucket_index_reg_916;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_end_ph_reg_344 <= ap_const_lv1_0;
    end else if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ~(ap_const_lv1_0 == tmp_2_i_fu_580_p2) & ~(ap_const_lv1_0 == tmp_2_1_i_fu_586_p2))) begin
        j_end_ph_reg_344 <= ap_const_lv1_1;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        j_end_reg_414 <= j_end_ph_phi_fu_348_p4;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        j_end_reg_414 <= p_s_reg_926;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & ~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & ~(ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
        next_buckets_0_reg_252 <= tmp_buckets_0_3_reg_370;
    end else if ((ap_ST_st9_fsm_8 == ap_CS_fsm)) begin
        next_buckets_0_reg_252 <= current_buckets_0_reg_822;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & ~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & ~(ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
        next_buckets_1_reg_242 <= tmp_buckets_1_3_reg_357;
    end else if ((ap_ST_st9_fsm_8 == ap_CS_fsm)) begin
        next_buckets_1_reg_242 <= current_buckets_1_reg_827;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & ~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & ~(ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
        p_01_rec_i_reg_273 <= p_rec_i_reg_851;
    end else if ((ap_ST_st9_fsm_8 == ap_CS_fsm)) begin
        p_01_rec_i_reg_273 <= ap_const_lv64_0;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st32_fsm_31 == ap_CS_fsm) & ~(stop_on_first_read_read_fu_150_p2 == ap_const_lv1_0) & (ap_const_lv1_0 == or_cond_fu_743_p2))) begin
        p_0_reg_448 <= ap_const_lv32_1;
    end else if (((ap_ST_st2_fsm_1 == ap_CS_fsm) & ~(ap_const_lv1_0 == tmp_i_13_fu_534_p2))) begin
        p_0_reg_448 <= c_fu_140;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st16_fsm_15 == ap_CS_fsm) & ~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & (ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
        r_reg_437 <= ap_const_lv1_0;
    end else if ((ap_ST_st31_fsm_30 == ap_CS_fsm)) begin
        r_reg_437 <= tmp_5_fu_737_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        tmp_buckets_0_3_reg_370 <= ap_const_lv32_0;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        tmp_buckets_0_3_reg_370 <= next_buckets_0_1_reg_937;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        tmp_buckets_1_3_reg_357 <= ap_const_lv32_0;
    end else if ((ap_ST_st24_fsm_23 == ap_CS_fsm)) begin
        tmp_buckets_1_3_reg_357 <= next_buckets_1_1_fu_707_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st2_fsm_1 == ap_CS_fsm)) begin
        c_load_reg_813 <= c_fu_140;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st8_fsm_7 == ap_CS_fsm)) begin
        current_buckets_0_reg_822 <= grp_nfa_get_initials_fu_494_ap_return_0;
        current_buckets_1_reg_827 <= grp_nfa_get_initials_fu_494_ap_return_1;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st10_fsm_9 == ap_CS_fsm)) begin
        i_reg_846 <= i_fu_568_p2;
        sample_buffer_addr_reg_837 <= sum_fu_552_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bit1_ph_reg_333 <= r_bit_reg_869;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st19_fsm_18 == ap_CS_fsm)) begin
        j_bit_reg_911 <= grp_bitset_next_fu_460_ap_return_0;
        j_bucket_index_reg_916 <= grp_bitset_next_fu_460_ap_return_1;
        j_bucket_reg_921 <= grp_bitset_next_fu_460_ap_return_2;
        p_s_reg_926 <= grp_bitset_next_fu_460_ap_return_3;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st21_fsm_20 == ap_CS_fsm)) begin
        next_buckets_0_1_reg_937 <= next_buckets_0_1_fu_701_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st10_fsm_9 == ap_CS_fsm) & ~(tmp_3_fu_563_p2 == ap_const_lv1_0))) begin
        p_rec_i_reg_851 <= p_rec_i_fu_574_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st14_fsm_13 == ap_CS_fsm)) begin
        r_bit_reg_869 <= r_bit_p_bsf32_hw_fu_506_ap_return;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((((ap_ST_st20_fsm_19 == ap_CS_fsm) & ~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0)) | (~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0) & (ap_ST_st23_fsm_22 == ap_CS_fsm)))) begin
        reg_512 <= nfa_forward_buckets_datain;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0))) begin
        sym_reg_856 <= sample_buffer_datain;
        tmp_2_i_reg_861 <= tmp_2_i_fu_580_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st15_fsm_14 == ap_CS_fsm)) begin
        tmp_10_i_cast_reg_884[0] <= tmp_10_i_cast_fu_605_p1[0];
tmp_10_i_cast_reg_884[1] <= tmp_10_i_cast_fu_605_p1[1];
tmp_10_i_cast_reg_884[2] <= tmp_10_i_cast_fu_605_p1[2];
tmp_10_i_cast_reg_884[3] <= tmp_10_i_cast_fu_605_p1[3];
tmp_10_i_cast_reg_884[4] <= tmp_10_i_cast_fu_605_p1[4];
tmp_10_i_cast_reg_884[5] <= tmp_10_i_cast_fu_605_p1[5];
tmp_10_i_cast_reg_884[6] <= tmp_10_i_cast_fu_605_p1[6];
tmp_10_i_cast_reg_884[7] <= tmp_10_i_cast_fu_605_p1[7];
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st17_fsm_16 == ap_CS_fsm)) begin
        tmp_11_i_reg_899 <= tmp_11_i_fu_644_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ~(ap_const_lv1_0 == tmp_2_i_fu_580_p2))) begin
        tmp_2_1_i_reg_865 <= tmp_2_1_i_fu_586_p2;
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st9_fsm_8 == ap_CS_fsm)) begin
        tmp_2_reg_832[0] <= tmp_2_fu_548_p1[0];
tmp_2_reg_832[1] <= tmp_2_fu_548_p1[1];
tmp_2_reg_832[2] <= tmp_2_fu_548_p1[2];
tmp_2_reg_832[3] <= tmp_2_fu_548_p1[3];
tmp_2_reg_832[4] <= tmp_2_fu_548_p1[4];
tmp_2_reg_832[5] <= tmp_2_fu_548_p1[5];
tmp_2_reg_832[6] <= tmp_2_fu_548_p1[6];
tmp_2_reg_832[7] <= tmp_2_fu_548_p1[7];
tmp_2_reg_832[8] <= tmp_2_fu_548_p1[8];
tmp_2_reg_832[9] <= tmp_2_fu_548_p1[9];
tmp_2_reg_832[10] <= tmp_2_fu_548_p1[10];
tmp_2_reg_832[11] <= tmp_2_fu_548_p1[11];
tmp_2_reg_832[12] <= tmp_2_fu_548_p1[12];
tmp_2_reg_832[13] <= tmp_2_fu_548_p1[13];
tmp_2_reg_832[14] <= tmp_2_fu_548_p1[14];
tmp_2_reg_832[15] <= tmp_2_fu_548_p1[15];
tmp_2_reg_832[16] <= tmp_2_fu_548_p1[16];
tmp_2_reg_832[17] <= tmp_2_fu_548_p1[17];
tmp_2_reg_832[18] <= tmp_2_fu_548_p1[18];
tmp_2_reg_832[19] <= tmp_2_fu_548_p1[19];
tmp_2_reg_832[20] <= tmp_2_fu_548_p1[20];
tmp_2_reg_832[21] <= tmp_2_fu_548_p1[21];
tmp_2_reg_832[22] <= tmp_2_fu_548_p1[22];
tmp_2_reg_832[23] <= tmp_2_fu_548_p1[23];
tmp_2_reg_832[24] <= tmp_2_fu_548_p1[24];
tmp_2_reg_832[25] <= tmp_2_fu_548_p1[25];
tmp_2_reg_832[26] <= tmp_2_fu_548_p1[26];
tmp_2_reg_832[27] <= tmp_2_fu_548_p1[27];
tmp_2_reg_832[28] <= tmp_2_fu_548_p1[28];
tmp_2_reg_832[29] <= tmp_2_fu_548_p1[29];
tmp_2_reg_832[30] <= tmp_2_fu_548_p1[30];
tmp_2_reg_832[31] <= tmp_2_fu_548_p1[31];
    end
end

/// assign process. ///
always @(posedge ap_clk)
begin
    if ((ap_ST_st30_fsm_29 == ap_CS_fsm)) begin
        tmp_buckets_0_reg_947 <= grp_nfa_get_finals_fu_500_ap_return_0;
        tmp_buckets_1_reg_952 <= grp_nfa_get_finals_fu_500_ap_return_1;
    end
end

/// ap_done assign process. ///
always @ (ap_CS_fsm)
begin
    if ((ap_ST_st37_fsm_36 == ap_CS_fsm)) begin
        ap_done = ap_const_logic_1;
    end else begin
        ap_done = ap_const_logic_0;
    end
end

/// ap_idle assign process. ///
always @ (ap_start or ap_CS_fsm)
begin
    if ((~(ap_const_logic_1 == ap_start) & (ap_ST_st1_fsm_0 == ap_CS_fsm))) begin
        ap_idle = ap_const_logic_1;
    end else begin
        ap_idle = ap_const_logic_0;
    end
end

/// ap_ready assign process. ///
always @ (ap_CS_fsm)
begin
    if ((ap_ST_st37_fsm_36 == ap_CS_fsm)) begin
        ap_ready = ap_const_logic_1;
    end else begin
        ap_ready = ap_const_logic_0;
    end
end

/// indices_address assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_address or grp_sample_iterator_get_offset_fu_482_indices_address)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_address = grp_sample_iterator_get_offset_fu_482_indices_address;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_address = grp_sample_iterator_next_fu_472_indices_address;
    end else begin
        indices_address = 'bx;
    end
end

/// indices_dataout assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_dataout or grp_sample_iterator_get_offset_fu_482_indices_dataout)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_dataout = grp_sample_iterator_get_offset_fu_482_indices_dataout;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_dataout = grp_sample_iterator_next_fu_472_indices_dataout;
    end else begin
        indices_dataout = 'bx;
    end
end

/// indices_req_din assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_req_din or grp_sample_iterator_get_offset_fu_482_indices_req_din)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_req_din = grp_sample_iterator_get_offset_fu_482_indices_req_din;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_req_din = grp_sample_iterator_next_fu_472_indices_req_din;
    end else begin
        indices_req_din = 'bx;
    end
end

/// indices_req_write assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_req_write or grp_sample_iterator_get_offset_fu_482_indices_req_write)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_req_write = grp_sample_iterator_get_offset_fu_482_indices_req_write;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_req_write = grp_sample_iterator_next_fu_472_indices_req_write;
    end else begin
        indices_req_write = 'bx;
    end
end

/// indices_rsp_read assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_rsp_read or grp_sample_iterator_get_offset_fu_482_indices_rsp_read)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_rsp_read = grp_sample_iterator_get_offset_fu_482_indices_rsp_read;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_rsp_read = grp_sample_iterator_next_fu_472_indices_rsp_read;
    end else begin
        indices_rsp_read = 'bx;
    end
end

/// indices_size assign process. ///
always @ (ap_CS_fsm or grp_sample_iterator_next_fu_472_indices_size or grp_sample_iterator_get_offset_fu_482_indices_size)
begin
    if (((ap_ST_st8_fsm_7 == ap_CS_fsm) | (ap_ST_st9_fsm_8 == ap_CS_fsm) | (ap_ST_st5_fsm_4 == ap_CS_fsm) | (ap_ST_st6_fsm_5 == ap_CS_fsm) | (ap_ST_st7_fsm_6 == ap_CS_fsm))) begin
        indices_size = grp_sample_iterator_get_offset_fu_482_indices_size;
    end else if (((ap_ST_st36_fsm_35 == ap_CS_fsm) | (ap_ST_st33_fsm_32 == ap_CS_fsm) | (ap_ST_st34_fsm_33 == ap_CS_fsm) | (ap_ST_st35_fsm_34 == ap_CS_fsm))) begin
        indices_size = grp_sample_iterator_next_fu_472_indices_size;
    end else begin
        indices_size = 'bx;
    end
end

/// j_bit1_ph_phi_fu_337_p4 assign process. ///
always @ (ap_CS_fsm or tmp_2_i_reg_861 or tmp_2_1_i_reg_865 or r_bit_reg_869 or j_bit1_ph_reg_333)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bit1_ph_phi_fu_337_p4 = r_bit_reg_869;
    end else begin
        j_bit1_ph_phi_fu_337_p4 = j_bit1_ph_reg_333;
    end
end

/// j_bucket1_ph_phi_fu_313_p4 assign process. ///
always @ (ap_CS_fsm or tmp_2_i_reg_861 or tmp_2_1_i_reg_865 or bus_assign_reg_284 or j_bucket1_ph_reg_309)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bucket1_ph_phi_fu_313_p4 = bus_assign_reg_284;
    end else begin
        j_bucket1_ph_phi_fu_313_p4 = j_bucket1_ph_reg_309;
    end
end

/// j_bucket_index1_ph_phi_fu_326_p4 assign process. ///
always @ (ap_CS_fsm or tmp_2_i_reg_861 or tmp_2_1_i_reg_865 or j_bucket_index1_ph_reg_322 or agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_592_p1)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_bucket_index1_ph_phi_fu_326_p4 = agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_592_p1;
    end else begin
        j_bucket_index1_ph_phi_fu_326_p4 = j_bucket_index1_ph_reg_322;
    end
end

/// j_end_ph_phi_fu_348_p4 assign process. ///
always @ (ap_CS_fsm or tmp_2_i_reg_861 or tmp_2_1_i_reg_865 or j_end_ph_reg_344)
begin
    if (((ap_ST_st15_fsm_14 == ap_CS_fsm) & ((ap_const_lv1_0 == tmp_2_i_reg_861) | (ap_const_lv1_0 == tmp_2_1_i_reg_865)))) begin
        j_end_ph_phi_fu_348_p4 = ap_const_lv1_0;
    end else begin
        j_end_ph_phi_fu_348_p4 = j_end_ph_reg_344;
    end
end

/// nfa_forward_buckets_address assign process. ///
always @ (ap_CS_fsm or tmp_12_i_cast_fu_656_p1 or tmp_13_i_cast_fu_690_p1)
begin
    if ((ap_ST_st21_fsm_20 == ap_CS_fsm)) begin
        nfa_forward_buckets_address = tmp_13_i_cast_fu_690_p1;
    end else if ((ap_ST_st18_fsm_17 == ap_CS_fsm)) begin
        nfa_forward_buckets_address = tmp_12_i_cast_fu_656_p1;
    end else begin
        nfa_forward_buckets_address = 'bx;
    end
end

/// nfa_forward_buckets_req_write assign process. ///
always @ (ap_CS_fsm)
begin
    if (((ap_ST_st18_fsm_17 == ap_CS_fsm) | (ap_ST_st21_fsm_20 == ap_CS_fsm))) begin
        nfa_forward_buckets_req_write = ap_const_logic_1;
    end else begin
        nfa_forward_buckets_req_write = ap_const_logic_0;
    end
end

/// nfa_forward_buckets_rsp_read assign process. ///
always @ (ap_CS_fsm or nfa_forward_buckets_rsp_empty_n)
begin
    if ((((ap_ST_st20_fsm_19 == ap_CS_fsm) & ~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0)) | (~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0) & (ap_ST_st23_fsm_22 == ap_CS_fsm)))) begin
        nfa_forward_buckets_rsp_read = ap_const_logic_1;
    end else begin
        nfa_forward_buckets_rsp_read = ap_const_logic_0;
    end
end

/// sample_buffer_req_write assign process. ///
always @ (ap_CS_fsm)
begin
    if ((ap_ST_st11_fsm_10 == ap_CS_fsm)) begin
        sample_buffer_req_write = ap_const_logic_1;
    end else begin
        sample_buffer_req_write = ap_const_logic_0;
    end
end

/// sample_buffer_rsp_read assign process. ///
always @ (ap_CS_fsm or sample_buffer_rsp_empty_n)
begin
    if (((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0))) begin
        sample_buffer_rsp_read = ap_const_logic_1;
    end else begin
        sample_buffer_rsp_read = ap_const_logic_0;
    end
end
always @ (ap_start or ap_CS_fsm or nfa_forward_buckets_rsp_empty_n or sample_buffer_rsp_empty_n or stop_on_first_read_read_fu_150_p2 or tmp_3_fu_563_p2 or tmp_2_i_fu_580_p2 or tmp_2_1_i_fu_586_p2 or j_end_phi_fu_417_p4 or any_0_i_phi_fu_429_p4 or tmp_i_13_fu_534_p2 or or_cond_fu_743_p2)
begin
    case (ap_CS_fsm)
        ap_ST_st1_fsm_0 : 
            if (~(ap_start == ap_const_logic_0)) begin
                ap_NS_fsm = ap_ST_st2_fsm_1;
            end else begin
                ap_NS_fsm = ap_ST_st1_fsm_0;
            end
        ap_ST_st2_fsm_1 : 
            if (~(ap_const_lv1_0 == tmp_i_13_fu_534_p2)) begin
                ap_NS_fsm = ap_ST_st37_fsm_36;
            end else begin
                ap_NS_fsm = ap_ST_st3_fsm_2;
            end
        ap_ST_st3_fsm_2 : 
            ap_NS_fsm = ap_ST_st4_fsm_3;
        ap_ST_st4_fsm_3 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
        ap_ST_st5_fsm_4 : 
            ap_NS_fsm = ap_ST_st6_fsm_5;
        ap_ST_st6_fsm_5 : 
            ap_NS_fsm = ap_ST_st7_fsm_6;
        ap_ST_st7_fsm_6 : 
            ap_NS_fsm = ap_ST_st8_fsm_7;
        ap_ST_st8_fsm_7 : 
            ap_NS_fsm = ap_ST_st9_fsm_8;
        ap_ST_st9_fsm_8 : 
            ap_NS_fsm = ap_ST_st10_fsm_9;
        ap_ST_st10_fsm_9 : 
            if ((tmp_3_fu_563_p2 == ap_const_lv1_0)) begin
                ap_NS_fsm = ap_ST_st25_fsm_24;
            end else begin
                ap_NS_fsm = ap_ST_st11_fsm_10;
            end
        ap_ST_st11_fsm_10 : 
            ap_NS_fsm = ap_ST_st12_fsm_11;
        ap_ST_st12_fsm_11 : 
            ap_NS_fsm = ap_ST_st13_fsm_12;
        ap_ST_st13_fsm_12 : 
            if ((~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ~(ap_const_lv1_0 == tmp_2_i_fu_580_p2) & ~(ap_const_lv1_0 == tmp_2_1_i_fu_586_p2))) begin
                ap_NS_fsm = ap_ST_st15_fsm_14;
            end else if ((~(sample_buffer_rsp_empty_n == ap_const_logic_0) & ((ap_const_lv1_0 == tmp_2_i_fu_580_p2) | (ap_const_lv1_0 == tmp_2_1_i_fu_586_p2)))) begin
                ap_NS_fsm = ap_ST_st14_fsm_13;
            end else begin
                ap_NS_fsm = ap_ST_st13_fsm_12;
            end
        ap_ST_st14_fsm_13 : 
            ap_NS_fsm = ap_ST_st15_fsm_14;
        ap_ST_st15_fsm_14 : 
            ap_NS_fsm = ap_ST_st16_fsm_15;
        ap_ST_st16_fsm_15 : 
            if ((~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & ~(ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
                ap_NS_fsm = ap_ST_st10_fsm_9;
            end else if ((~(ap_const_lv1_0 == j_end_phi_fu_417_p4) & (ap_const_lv1_0 == any_0_i_phi_fu_429_p4))) begin
                ap_NS_fsm = ap_ST_st32_fsm_31;
            end else begin
                ap_NS_fsm = ap_ST_st17_fsm_16;
            end
        ap_ST_st17_fsm_16 : 
            ap_NS_fsm = ap_ST_st18_fsm_17;
        ap_ST_st18_fsm_17 : 
            ap_NS_fsm = ap_ST_st19_fsm_18;
        ap_ST_st19_fsm_18 : 
            ap_NS_fsm = ap_ST_st20_fsm_19;
        ap_ST_st20_fsm_19 : 
            if (~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0)) begin
                ap_NS_fsm = ap_ST_st21_fsm_20;
            end else begin
                ap_NS_fsm = ap_ST_st20_fsm_19;
            end
        ap_ST_st21_fsm_20 : 
            ap_NS_fsm = ap_ST_st22_fsm_21;
        ap_ST_st22_fsm_21 : 
            ap_NS_fsm = ap_ST_st23_fsm_22;
        ap_ST_st23_fsm_22 : 
            if (~(nfa_forward_buckets_rsp_empty_n == ap_const_logic_0)) begin
                ap_NS_fsm = ap_ST_st24_fsm_23;
            end else begin
                ap_NS_fsm = ap_ST_st23_fsm_22;
            end
        ap_ST_st24_fsm_23 : 
            ap_NS_fsm = ap_ST_st16_fsm_15;
        ap_ST_st25_fsm_24 : 
            ap_NS_fsm = ap_ST_st26_fsm_25;
        ap_ST_st26_fsm_25 : 
            ap_NS_fsm = ap_ST_st27_fsm_26;
        ap_ST_st27_fsm_26 : 
            ap_NS_fsm = ap_ST_st28_fsm_27;
        ap_ST_st28_fsm_27 : 
            ap_NS_fsm = ap_ST_st29_fsm_28;
        ap_ST_st29_fsm_28 : 
            ap_NS_fsm = ap_ST_st30_fsm_29;
        ap_ST_st30_fsm_29 : 
            ap_NS_fsm = ap_ST_st31_fsm_30;
        ap_ST_st31_fsm_30 : 
            ap_NS_fsm = ap_ST_st32_fsm_31;
        ap_ST_st32_fsm_31 : 
            if ((~(stop_on_first_read_read_fu_150_p2 == ap_const_lv1_0) & (ap_const_lv1_0 == or_cond_fu_743_p2))) begin
                ap_NS_fsm = ap_ST_st37_fsm_36;
            end else begin
                ap_NS_fsm = ap_ST_st33_fsm_32;
            end
        ap_ST_st33_fsm_32 : 
            ap_NS_fsm = ap_ST_st34_fsm_33;
        ap_ST_st34_fsm_33 : 
            ap_NS_fsm = ap_ST_st35_fsm_34;
        ap_ST_st35_fsm_34 : 
            ap_NS_fsm = ap_ST_st36_fsm_35;
        ap_ST_st36_fsm_35 : 
            ap_NS_fsm = ap_ST_st2_fsm_1;
        ap_ST_st37_fsm_36 : 
            ap_NS_fsm = ap_ST_st1_fsm_0;
        default : 
            ap_NS_fsm = 'bx;
    endcase
end
assign agg_result_bucket_index_0_lcssa4_i_cast_cast_fu_592_p1 = $unsigned(agg_result_bucket_index_0_lcssa4_i_reg_296);
assign any_0_i_phi_fu_429_p4 = any_0_i_reg_424;
assign ap_return = p_0_reg_448;

/// ap_sig_bdd_187 assign process. ///
always @ (ap_CS_fsm or sample_buffer_rsp_empty_n)
begin
    ap_sig_bdd_187 = ((ap_ST_st13_fsm_12 == ap_CS_fsm) & ~(sample_buffer_rsp_empty_n == ap_const_logic_0));
end

/// ap_sig_bdd_370 assign process. ///
always @ (tmp_2_i_fu_580_p2 or tmp_2_1_i_fu_586_p2)
begin
    ap_sig_bdd_370 = (~(ap_const_lv1_0 == tmp_2_i_fu_580_p2) & (ap_const_lv1_0 == tmp_2_1_i_fu_586_p2));
end
assign c_1_fu_748_p2 = (c_load_reg_813 + ap_const_lv32_1);
assign current_buckets_0_1_fu_721_p2 = (next_buckets_0_reg_252 & tmp_buckets_0_reg_947);
assign current_buckets_1_1_fu_726_p2 = (next_buckets_1_reg_242 & tmp_buckets_1_reg_952);
assign grp_bitset_next_fu_460_ap_ce = ap_const_logic_1;
assign grp_bitset_next_fu_460_ap_start = grp_bitset_next_fu_460_ap_start_ap_start_reg;
assign grp_bitset_next_fu_460_p_read = next_buckets_1_reg_242;
assign grp_bitset_next_fu_460_r_bit = j_bit1_reg_404;
assign grp_bitset_next_fu_460_r_bucket = j_bucket1_reg_383;
assign grp_bitset_next_fu_460_r_bucket_index = j_bucket_index1_reg_394;
assign grp_fu_638_ce = ap_const_logic_1;
assign grp_fu_638_p0 = grp_fu_638_p00;
assign grp_fu_638_p00 = $unsigned(nfa_symbols);
assign grp_fu_638_p1 = grp_fu_638_p10;
assign grp_fu_638_p10 = $unsigned(state_fu_624_p2);
assign grp_nfa_get_finals_fu_500_ap_ce = ap_const_logic_1;
assign grp_nfa_get_finals_fu_500_ap_start = grp_nfa_get_finals_fu_500_ap_start_ap_start_reg;
assign grp_nfa_get_finals_fu_500_nfa_finals_buckets_datain = nfa_finals_buckets_datain;
assign grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_full_n = nfa_finals_buckets_req_full_n;
assign grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_empty_n = nfa_finals_buckets_rsp_empty_n;
assign grp_nfa_get_initials_fu_494_ap_ce = ap_const_logic_1;
assign grp_nfa_get_initials_fu_494_ap_start = grp_nfa_get_initials_fu_494_ap_start_ap_start_reg;
assign grp_nfa_get_initials_fu_494_nfa_initials_buckets_datain = nfa_initials_buckets_datain;
assign grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_full_n = nfa_initials_buckets_req_full_n;
assign grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_empty_n = nfa_initials_buckets_rsp_empty_n;
assign grp_sample_iterator_get_offset_fu_482_ap_ce = ap_const_logic_1;
assign grp_sample_iterator_get_offset_fu_482_ap_start = grp_sample_iterator_get_offset_fu_482_ap_start_ap_start_reg;
assign grp_sample_iterator_get_offset_fu_482_i_index = i_index_reg_222;
assign grp_sample_iterator_get_offset_fu_482_i_sample = i_sample_reg_232;
assign grp_sample_iterator_get_offset_fu_482_indices_datain = indices_datain;
assign grp_sample_iterator_get_offset_fu_482_indices_req_full_n = indices_req_full_n;
assign grp_sample_iterator_get_offset_fu_482_indices_rsp_empty_n = indices_rsp_empty_n;
assign grp_sample_iterator_get_offset_fu_482_sample_buffer_size = sample_buffer_length;
assign grp_sample_iterator_get_offset_fu_482_sample_length = sample_length;
assign grp_sample_iterator_next_fu_472_ap_ce = ap_const_logic_1;
assign grp_sample_iterator_next_fu_472_ap_start = grp_sample_iterator_next_fu_472_ap_start_ap_start_reg;
assign grp_sample_iterator_next_fu_472_i_index = i_index_reg_222;
assign grp_sample_iterator_next_fu_472_i_sample = i_sample_reg_232;
assign grp_sample_iterator_next_fu_472_indices_datain = indices_datain;
assign grp_sample_iterator_next_fu_472_indices_req_full_n = indices_req_full_n;
assign grp_sample_iterator_next_fu_472_indices_rsp_empty_n = indices_rsp_empty_n;
assign i_fu_568_p2 = (i_0_i_reg_262 + ap_const_lv16_1);
assign j_bit1_ph_cast_fu_601_p1 = $unsigned(j_bit1_ph_phi_fu_337_p4);
assign j_bucket_index1_ph_cast_fu_597_p1 = $unsigned(j_bucket_index1_ph_phi_fu_326_p4);
assign j_end_phi_fu_417_p4 = j_end_reg_414;
assign next_buckets_0_1_fu_701_p2 = (reg_512 | tmp_buckets_0_3_reg_370);
assign next_buckets_1_1_fu_707_p2 = (reg_512 | tmp_buckets_1_3_reg_357);
assign nfa_finals_buckets_address = grp_nfa_get_finals_fu_500_nfa_finals_buckets_address;
assign nfa_finals_buckets_dataout = grp_nfa_get_finals_fu_500_nfa_finals_buckets_dataout;
assign nfa_finals_buckets_req_din = grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_din;
assign nfa_finals_buckets_req_write = grp_nfa_get_finals_fu_500_nfa_finals_buckets_req_write;
assign nfa_finals_buckets_rsp_read = grp_nfa_get_finals_fu_500_nfa_finals_buckets_rsp_read;
assign nfa_finals_buckets_size = grp_nfa_get_finals_fu_500_nfa_finals_buckets_size;
assign nfa_forward_buckets_dataout = ap_const_lv32_0;
assign nfa_forward_buckets_req_din = ap_const_logic_0;
assign nfa_forward_buckets_size = ap_const_lv32_1;
assign nfa_initials_buckets_address = grp_nfa_get_initials_fu_494_nfa_initials_buckets_address;
assign nfa_initials_buckets_dataout = grp_nfa_get_initials_fu_494_nfa_initials_buckets_dataout;
assign nfa_initials_buckets_req_din = grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_din;
assign nfa_initials_buckets_req_write = grp_nfa_get_initials_fu_494_nfa_initials_buckets_req_write;
assign nfa_initials_buckets_rsp_read = grp_nfa_get_initials_fu_494_nfa_initials_buckets_rsp_read;
assign nfa_initials_buckets_size = grp_nfa_get_initials_fu_494_nfa_initials_buckets_size;
assign or_cond_fu_743_p2 = (r_reg_437 ^ accept);
assign p_rec_i_fu_574_p2 = (p_01_rec_i_reg_273 + ap_const_lv64_1);
assign r_bit_p_bsf32_hw_fu_506_bus_r = bus_assign_reg_284;
assign sample_buffer_address = sample_buffer_addr_reg_837;
assign sample_buffer_dataout = ap_const_lv8_0;
assign sample_buffer_req_din = ap_const_logic_0;
assign sample_buffer_size = ap_const_lv32_1;
assign state_fu_624_p2 = (tmp_i1_fu_612_p3 + tmp_8_fu_620_p1);
assign stop_on_first_read_read_fu_150_p2 = stop_on_first;
assign sum_fu_552_p2 = (p_01_rec_i_reg_273 + tmp_2_reg_832);
assign tmp_10_i_cast_fu_605_p1 = $unsigned(sym_reg_856);
assign tmp_11_i_fu_644_p2 = (grp_fu_638_p2 + tmp_10_i_cast_reg_884);
assign tmp_12_i_cast_fu_656_p1 = $unsigned(tmp_12_i_fu_649_p3);
assign tmp_12_i_fu_649_p3 = {{tmp_11_i_reg_899}, {ap_const_lv1_0}};
assign tmp_13_i_cast_fu_690_p1 = $unsigned(tmp_13_i_fu_683_p3);
assign tmp_13_i_fu_683_p3 = {{tmp_11_i_reg_899}, {ap_const_lv1_1}};
assign tmp_1_fu_731_p2 = (current_buckets_1_1_fu_726_p2 | current_buckets_0_1_fu_721_p2);
assign tmp_2_1_i_fu_586_p2 = (next_buckets_1_reg_242 == ap_const_lv32_0? 1'b1: 1'b0);
assign tmp_2_fu_548_p1 = $unsigned(grp_sample_iterator_get_offset_fu_482_ap_return);
assign tmp_2_i_fu_580_p2 = (next_buckets_0_reg_252 == ap_const_lv32_0? 1'b1: 1'b0);
assign tmp_3_fu_563_p2 = (i_0_i_reg_262 < sample_length? 1'b1: 1'b0);
assign tmp_5_fu_737_p2 = (tmp_1_fu_731_p2 != ap_const_lv32_0? 1'b1: 1'b0);
assign tmp_6_fu_608_p1 = j_bucket_index1_reg_394[0:0];
assign tmp_8_fu_620_p1 = j_bit1_reg_404[5:0];
assign tmp_i1_fu_612_p3 = {{tmp_6_fu_608_p1}, {ap_const_lv5_0}};
assign tmp_i_12_fu_529_p2 = (i_index_reg_222 == end_index? 1'b1: 1'b0);
assign tmp_i_13_fu_534_p2 = (tmp_i_fu_524_p2 & tmp_i_12_fu_529_p2);
assign tmp_i_fu_524_p2 = (i_sample_reg_232 == end_sample? 1'b1: 1'b0);
always @ (posedge ap_clk)
begin
    tmp_2_reg_832[63:32] <= 32'b00000000000000000000000000000000;
    tmp_10_i_cast_reg_884[13:8] <= 6'b000000;
end



endmodule //nfa_accept_samples_generic_hw

