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

#include "sharedmem.h"
#include "AESL_pkg.h"

using namespace std;

namespace ap_rtl {

const sc_logic sharedmem::ap_const_logic_1 = sc_dt::Log_1;
const sc_logic sharedmem::ap_const_logic_0 = sc_dt::Log_0;
const sc_lv<46> sharedmem::ap_ST_st1_fsm_0 = "1";
const sc_lv<46> sharedmem::ap_ST_st2_fsm_1 = "10";
const sc_lv<46> sharedmem::ap_ST_st3_fsm_2 = "100";
const sc_lv<46> sharedmem::ap_ST_st4_fsm_3 = "1000";
const sc_lv<46> sharedmem::ap_ST_st5_fsm_4 = "10000";
const sc_lv<46> sharedmem::ap_ST_st6_fsm_5 = "100000";
const sc_lv<46> sharedmem::ap_ST_st7_fsm_6 = "1000000";
const sc_lv<46> sharedmem::ap_ST_st8_fsm_7 = "10000000";
const sc_lv<46> sharedmem::ap_ST_st9_fsm_8 = "100000000";
const sc_lv<46> sharedmem::ap_ST_st10_fsm_9 = "1000000000";
const sc_lv<46> sharedmem::ap_ST_st11_fsm_10 = "10000000000";
const sc_lv<46> sharedmem::ap_ST_st12_fsm_11 = "100000000000";
const sc_lv<46> sharedmem::ap_ST_st13_fsm_12 = "1000000000000";
const sc_lv<46> sharedmem::ap_ST_st14_fsm_13 = "10000000000000";
const sc_lv<46> sharedmem::ap_ST_st15_fsm_14 = "100000000000000";
const sc_lv<46> sharedmem::ap_ST_st16_fsm_15 = "1000000000000000";
const sc_lv<46> sharedmem::ap_ST_st17_fsm_16 = "10000000000000000";
const sc_lv<46> sharedmem::ap_ST_st18_fsm_17 = "100000000000000000";
const sc_lv<46> sharedmem::ap_ST_st19_fsm_18 = "1000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st20_fsm_19 = "10000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st21_fsm_20 = "100000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st22_fsm_21 = "1000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st23_fsm_22 = "10000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st24_fsm_23 = "100000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st25_fsm_24 = "1000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st26_fsm_25 = "10000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st27_fsm_26 = "100000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st28_fsm_27 = "1000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st29_fsm_28 = "10000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st30_fsm_29 = "100000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st31_fsm_30 = "1000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st32_fsm_31 = "10000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st33_fsm_32 = "100000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st34_fsm_33 = "1000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st35_fsm_34 = "10000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st36_fsm_35 = "100000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st37_fsm_36 = "1000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st38_fsm_37 = "10000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st39_fsm_38 = "100000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st40_fsm_39 = "1000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st41_fsm_40 = "10000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st42_fsm_41 = "100000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st43_fsm_42 = "1000000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st44_fsm_43 = "10000000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st45_fsm_44 = "100000000000000000000000000000000000000000000";
const sc_lv<46> sharedmem::ap_ST_st46_fsm_45 = "1000000000000000000000000000000000000000000000";
const sc_lv<32> sharedmem::ap_const_lv32_0 = "00000000000000000000000000000000";
const sc_lv<1> sharedmem::ap_const_lv1_1 = "1";
const sc_lv<8> sharedmem::ap_const_lv8_0 = "00000000";
const sc_lv<1> sharedmem::ap_const_lv1_0 = "0";
const sc_lv<32> sharedmem::ap_const_lv32_A = "1010";
const sc_lv<32> sharedmem::ap_const_lv32_14 = "10100";
const sc_lv<32> sharedmem::ap_const_lv32_1E = "11110";
const sc_lv<32> sharedmem::ap_const_lv32_28 = "101000";
const sc_lv<32> sharedmem::ap_const_lv32_3 = "11";
const sc_lv<32> sharedmem::ap_const_lv32_4 = "100";
const sc_lv<3> sharedmem::ap_const_lv3_4 = "100";
const sc_lv<3> sharedmem::ap_const_lv3_3 = "11";
const sc_lv<3> sharedmem::ap_const_lv3_2 = "10";
const sc_lv<3> sharedmem::ap_const_lv3_1 = "1";
const sc_lv<32> sharedmem::ap_const_lv32_9 = "1001";
const sc_lv<32> sharedmem::ap_const_lv32_13 = "10011";
const sc_lv<32> sharedmem::ap_const_lv32_1D = "11101";
const sc_lv<32> sharedmem::ap_const_lv32_27 = "100111";
const sc_lv<9> sharedmem::ap_const_lv9_0 = "000000000";
const sc_lv<32> sharedmem::ap_const_lv32_2 = "10";
const sc_lv<3> sharedmem::ap_const_lv3_0 = "000";
const sc_lv<32> sharedmem::ap_const_lv32_2D = "101101";
const sc_lv<32> sharedmem::ap_const_lv32_E = "1110";
const sc_lv<32> sharedmem::ap_const_lv32_18 = "11000";
const sc_lv<32> sharedmem::ap_const_lv32_22 = "100010";
const sc_lv<32> sharedmem::ap_const_lv32_2C = "101100";
const sc_lv<32> sharedmem::ap_const_lv32_5 = "101";
const sc_lv<32> sharedmem::ap_const_lv32_F = "1111";
const sc_lv<32> sharedmem::ap_const_lv32_19 = "11001";
const sc_lv<32> sharedmem::ap_const_lv32_23 = "100011";
const sc_lv<32> sharedmem::ap_const_lv32_1 = "1";
const sc_lv<32> sharedmem::ap_const_lv32_2A = "101010";
const sc_lv<32> sharedmem::ap_const_lv32_24 = "100100";
const sc_lv<32> sharedmem::ap_const_lv32_20 = "100000";
const sc_lv<32> sharedmem::ap_const_lv32_1A = "11010";
const sc_lv<32> sharedmem::ap_const_lv32_16 = "10110";
const sc_lv<32> sharedmem::ap_const_lv32_10 = "10000";
const sc_lv<32> sharedmem::ap_const_lv32_C = "1100";
const sc_lv<32> sharedmem::ap_const_lv32_6 = "110";
const sc_lv<9> sharedmem::ap_const_lv9_100 = "100000000";
const sc_lv<9> sharedmem::ap_const_lv9_1 = "1";

sharedmem::sharedmem(sc_module_name name) : sc_module(name), mVcdFile(0) {
    mem_U = new sharedmem_mem("mem_U");
    mem_U->clk(ap_clk);
    mem_U->reset(ap_rst);
    mem_U->address0(mem_address0);
    mem_U->ce0(mem_ce0);
    mem_U->we0(mem_we0);
    mem_U->d0(mem_d0);
    mem_U->q0(mem_q0);

    SC_METHOD(thread_ap_clk_no_reset_);
    dont_initialize();
    sensitive << ( ap_clk.pos() );

    SC_METHOD(thread_addr0_0_ack_out);

    SC_METHOD(thread_addr1_0_ack_out);

    SC_METHOD(thread_addr2_0_ack_out);

    SC_METHOD(thread_addr3_0_ack_out);

    SC_METHOD(thread_addr_1_fu_518_p2);
    sensitive << ( addr_reg_454 );

    SC_METHOD(thread_ap_done);

    SC_METHOD(thread_ap_idle);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );

    SC_METHOD(thread_ap_ready);

    SC_METHOD(thread_ap_sig_1003);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1041);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1051);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1061);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1071);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1080);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1097);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1109);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1126);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1138);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1155);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1167);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1184);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_1197);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_61);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_786);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_793);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_801);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_809);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_819);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_828);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_900);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_909);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_918);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_927);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_946);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_958);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_979);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_987);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_995);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_cseq_ST_st10_fsm_9);
    sensitive << ( ap_sig_900 );

    SC_METHOD(thread_ap_sig_cseq_ST_st11_fsm_10);
    sensitive << ( ap_sig_786 );

    SC_METHOD(thread_ap_sig_cseq_ST_st13_fsm_12);
    sensitive << ( ap_sig_1184 );

    SC_METHOD(thread_ap_sig_cseq_ST_st15_fsm_14);
    sensitive << ( ap_sig_979 );

    SC_METHOD(thread_ap_sig_cseq_ST_st16_fsm_15);
    sensitive << ( ap_sig_1051 );

    SC_METHOD(thread_ap_sig_cseq_ST_st17_fsm_16);
    sensitive << ( ap_sig_1167 );

    SC_METHOD(thread_ap_sig_cseq_ST_st1_fsm_0);
    sensitive << ( ap_sig_61 );

    SC_METHOD(thread_ap_sig_cseq_ST_st20_fsm_19);
    sensitive << ( ap_sig_909 );

    SC_METHOD(thread_ap_sig_cseq_ST_st21_fsm_20);
    sensitive << ( ap_sig_793 );

    SC_METHOD(thread_ap_sig_cseq_ST_st23_fsm_22);
    sensitive << ( ap_sig_1155 );

    SC_METHOD(thread_ap_sig_cseq_ST_st25_fsm_24);
    sensitive << ( ap_sig_987 );

    SC_METHOD(thread_ap_sig_cseq_ST_st26_fsm_25);
    sensitive << ( ap_sig_1061 );

    SC_METHOD(thread_ap_sig_cseq_ST_st27_fsm_26);
    sensitive << ( ap_sig_1138 );

    SC_METHOD(thread_ap_sig_cseq_ST_st2_fsm_1);
    sensitive << ( ap_sig_1080 );

    SC_METHOD(thread_ap_sig_cseq_ST_st30_fsm_29);
    sensitive << ( ap_sig_918 );

    SC_METHOD(thread_ap_sig_cseq_ST_st31_fsm_30);
    sensitive << ( ap_sig_801 );

    SC_METHOD(thread_ap_sig_cseq_ST_st33_fsm_32);
    sensitive << ( ap_sig_1126 );

    SC_METHOD(thread_ap_sig_cseq_ST_st35_fsm_34);
    sensitive << ( ap_sig_995 );

    SC_METHOD(thread_ap_sig_cseq_ST_st36_fsm_35);
    sensitive << ( ap_sig_1071 );

    SC_METHOD(thread_ap_sig_cseq_ST_st37_fsm_36);
    sensitive << ( ap_sig_1109 );

    SC_METHOD(thread_ap_sig_cseq_ST_st3_fsm_2);
    sensitive << ( ap_sig_946 );

    SC_METHOD(thread_ap_sig_cseq_ST_st40_fsm_39);
    sensitive << ( ap_sig_927 );

    SC_METHOD(thread_ap_sig_cseq_ST_st41_fsm_40);
    sensitive << ( ap_sig_809 );

    SC_METHOD(thread_ap_sig_cseq_ST_st43_fsm_42);
    sensitive << ( ap_sig_1097 );

    SC_METHOD(thread_ap_sig_cseq_ST_st45_fsm_44);
    sensitive << ( ap_sig_1003 );

    SC_METHOD(thread_ap_sig_cseq_ST_st46_fsm_45);
    sensitive << ( ap_sig_958 );

    SC_METHOD(thread_ap_sig_cseq_ST_st4_fsm_3);
    sensitive << ( ap_sig_819 );

    SC_METHOD(thread_ap_sig_cseq_ST_st5_fsm_4);
    sensitive << ( ap_sig_828 );

    SC_METHOD(thread_ap_sig_cseq_ST_st6_fsm_5);
    sensitive << ( ap_sig_1041 );

    SC_METHOD(thread_ap_sig_cseq_ST_st7_fsm_6);
    sensitive << ( ap_sig_1197 );

    SC_METHOD(thread_ch_phi_fu_469_p22);
    sensitive << ( ch_reg_465 );

    SC_METHOD(thread_dout0_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st41_fsm_40 );

    SC_METHOD(thread_dout0_o);
    sensitive << ( dout0_1_data_reg );

    SC_METHOD(thread_dout1_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st31_fsm_30 );

    SC_METHOD(thread_dout1_o);
    sensitive << ( dout1_1_data_reg );

    SC_METHOD(thread_dout2_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );

    SC_METHOD(thread_dout2_o);
    sensitive << ( dout2_1_data_reg );

    SC_METHOD(thread_dout3_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );

    SC_METHOD(thread_dout3_o);
    sensitive << ( dout3_1_data_reg );

    SC_METHOD(thread_exitcond_fu_512_p2);
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( addr_reg_454 );

    SC_METHOD(thread_grp_read_fu_132_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( r_req0 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( ap_sig_cseq_ST_st43_fsm_42 );

    SC_METHOD(thread_grp_read_fu_144_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( w_req0 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( ap_sig_cseq_ST_st37_fsm_36 );

    SC_METHOD(thread_grp_read_fu_174_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( r_req1 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st33_fsm_32 );

    SC_METHOD(thread_grp_read_fu_186_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( w_req1 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st27_fsm_26 );

    SC_METHOD(thread_grp_read_fu_216_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( r_req2 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st23_fsm_22 );

    SC_METHOD(thread_grp_read_fu_228_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( w_req2 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st17_fsm_16 );

    SC_METHOD(thread_grp_read_fu_258_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( r_req3 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( grp_read_fu_228_p2 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );

    SC_METHOD(thread_grp_read_fu_270_p2);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );
    sensitive << ( w_req3 );
    sensitive << ( grp_read_fu_258_p2 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( grp_read_fu_228_p2 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st7_fsm_6 );

    SC_METHOD(thread_mem_address0);
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st10_fsm_9 );
    sensitive << ( ap_sig_cseq_ST_st20_fsm_19 );
    sensitive << ( ap_sig_cseq_ST_st30_fsm_29 );
    sensitive << ( ap_sig_cseq_ST_st40_fsm_39 );
    sensitive << ( tmp_s_fu_524_p1 );
    sensitive << ( tmp_9_fu_529_p1 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( tmp_5_fu_534_p1 );
    sensitive << ( tmp_8_fu_539_p1 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( tmp_4_fu_544_p1 );
    sensitive << ( tmp_7_fu_549_p1 );
    sensitive << ( ap_sig_cseq_ST_st26_fsm_25 );
    sensitive << ( tmp_3_fu_554_p1 );
    sensitive << ( tmp_6_fu_559_p1 );
    sensitive << ( ap_sig_cseq_ST_st36_fsm_35 );
    sensitive << ( tmp_2_fu_564_p1 );

    SC_METHOD(thread_mem_ce0);
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st10_fsm_9 );
    sensitive << ( ap_sig_cseq_ST_st20_fsm_19 );
    sensitive << ( ap_sig_cseq_ST_st30_fsm_29 );
    sensitive << ( ap_sig_cseq_ST_st40_fsm_39 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st26_fsm_25 );
    sensitive << ( ap_sig_cseq_ST_st36_fsm_35 );

    SC_METHOD(thread_mem_d0);
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( din3_read_reg_585 );
    sensitive << ( din2_read_reg_598 );
    sensitive << ( din1_read_reg_611 );
    sensitive << ( din0_read_reg_624 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st26_fsm_25 );
    sensitive << ( ap_sig_cseq_ST_st36_fsm_35 );

    SC_METHOD(thread_mem_we0);
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( exitcond_fu_512_p2 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st26_fsm_25 );
    sensitive << ( ap_sig_cseq_ST_st36_fsm_35 );

    SC_METHOD(thread_r_ack0_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st43_fsm_42 );

    SC_METHOD(thread_r_ack0_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st43_fsm_42 );

    SC_METHOD(thread_r_ack0_o);
    sensitive << ( r_ack0_1_data_reg );

    SC_METHOD(thread_r_ack1_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st33_fsm_32 );

    SC_METHOD(thread_r_ack1_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st33_fsm_32 );

    SC_METHOD(thread_r_ack1_o);
    sensitive << ( r_ack1_1_data_reg );

    SC_METHOD(thread_r_ack2_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st23_fsm_22 );

    SC_METHOD(thread_r_ack2_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st23_fsm_22 );

    SC_METHOD(thread_r_ack2_o);
    sensitive << ( r_ack2_1_data_reg );

    SC_METHOD(thread_r_ack3_1_data_in);
    sensitive << ( grp_read_fu_258_p2 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );

    SC_METHOD(thread_r_ack3_1_vld_in);
    sensitive << ( grp_read_fu_258_p2 );
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );

    SC_METHOD(thread_r_ack3_o);
    sensitive << ( r_ack3_1_data_reg );

    SC_METHOD(thread_tmp_2_fu_564_p1);
    sensitive << ( addr0_0_data_reg );

    SC_METHOD(thread_tmp_3_fu_554_p1);
    sensitive << ( addr1_0_data_reg );

    SC_METHOD(thread_tmp_4_fu_544_p1);
    sensitive << ( addr2_0_data_reg );

    SC_METHOD(thread_tmp_5_fu_534_p1);
    sensitive << ( addr3_0_data_reg );

    SC_METHOD(thread_tmp_6_fu_559_p1);
    sensitive << ( addr0_0_data_reg );

    SC_METHOD(thread_tmp_7_fu_549_p1);
    sensitive << ( addr1_0_data_reg );

    SC_METHOD(thread_tmp_8_fu_539_p1);
    sensitive << ( addr2_0_data_reg );

    SC_METHOD(thread_tmp_9_fu_529_p1);
    sensitive << ( addr3_0_data_reg );

    SC_METHOD(thread_tmp_s_fu_524_p1);
    sensitive << ( addr_reg_454 );

    SC_METHOD(thread_w_ack0_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st37_fsm_36 );

    SC_METHOD(thread_w_ack0_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st37_fsm_36 );

    SC_METHOD(thread_w_ack0_o);
    sensitive << ( w_ack0_1_data_reg );

    SC_METHOD(thread_w_ack1_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st27_fsm_26 );

    SC_METHOD(thread_w_ack1_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st27_fsm_26 );

    SC_METHOD(thread_w_ack1_o);
    sensitive << ( w_ack1_1_data_reg );

    SC_METHOD(thread_w_ack2_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_228_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st17_fsm_16 );

    SC_METHOD(thread_w_ack2_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_228_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st17_fsm_16 );

    SC_METHOD(thread_w_ack2_o);
    sensitive << ( w_ack2_1_data_reg );

    SC_METHOD(thread_w_ack3_1_data_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_270_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st7_fsm_6 );

    SC_METHOD(thread_w_ack3_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st5_fsm_4 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_270_p2 );
    sensitive << ( ap_sig_cseq_ST_st2_fsm_1 );
    sensitive << ( ap_sig_cseq_ST_st7_fsm_6 );

    SC_METHOD(thread_w_ack3_o);
    sensitive << ( w_ack3_1_data_reg );

    SC_METHOD(thread_ap_NS_fsm);
    sensitive << ( ap_start );
    sensitive << ( ap_CS_fsm );
    sensitive << ( grp_read_fu_258_p2 );
    sensitive << ( ch_phi_fu_469_p22 );
    sensitive << ( grp_read_fu_270_p2 );
    sensitive << ( grp_read_fu_216_p2 );
    sensitive << ( grp_read_fu_228_p2 );
    sensitive << ( grp_read_fu_174_p2 );
    sensitive << ( grp_read_fu_186_p2 );
    sensitive << ( grp_read_fu_132_p2 );
    sensitive << ( grp_read_fu_144_p2 );
    sensitive << ( exitcond_fu_512_p2 );

    SC_THREAD(thread_hdltv_gen);
    sensitive << ( ap_clk.pos() );

    ap_CS_fsm = "0000000000000000000000000000000000000000000001";
    addr0_0_data_reg = "00000000";
    addr0_0_vld_reg = SC_LOGIC_0;
    dout0_1_data_reg = "00000000";
    dout0_1_vld_reg = SC_LOGIC_0;
    r_ack0_1_data_reg = "0";
    r_ack0_1_vld_reg = SC_LOGIC_0;
    w_ack0_1_data_reg = "0";
    w_ack0_1_vld_reg = SC_LOGIC_0;
    addr1_0_data_reg = "00000000";
    addr1_0_vld_reg = SC_LOGIC_0;
    dout1_1_data_reg = "00000000";
    dout1_1_vld_reg = SC_LOGIC_0;
    r_ack1_1_data_reg = "0";
    r_ack1_1_vld_reg = SC_LOGIC_0;
    w_ack1_1_data_reg = "0";
    w_ack1_1_vld_reg = SC_LOGIC_0;
    addr2_0_data_reg = "00000000";
    addr2_0_vld_reg = SC_LOGIC_0;
    dout2_1_data_reg = "00000000";
    dout2_1_vld_reg = SC_LOGIC_0;
    r_ack2_1_data_reg = "0";
    r_ack2_1_vld_reg = SC_LOGIC_0;
    w_ack2_1_data_reg = "0";
    w_ack2_1_vld_reg = SC_LOGIC_0;
    addr3_0_data_reg = "00000000";
    addr3_0_vld_reg = SC_LOGIC_0;
    dout3_1_data_reg = "00000000";
    dout3_1_vld_reg = SC_LOGIC_0;
    r_ack3_1_data_reg = "0";
    r_ack3_1_vld_reg = SC_LOGIC_0;
    w_ack3_1_data_reg = "0";
    w_ack3_1_vld_reg = SC_LOGIC_0;
    static int apTFileNum = 0;
    stringstream apTFilenSS;
    apTFilenSS << "sharedmem_sc_trace_" << apTFileNum ++;
    string apTFn = apTFilenSS.str();
    mVcdFile = sc_create_vcd_trace_file(apTFn.c_str());
    mVcdFile->set_time_unit(1, SC_PS);
    if (1) {
#ifdef __HLS_TRACE_LEVEL_PORT__
    sc_trace(mVcdFile, ap_clk, "(port)ap_clk");
    sc_trace(mVcdFile, ap_rst, "(port)ap_rst");
    sc_trace(mVcdFile, ap_start, "(port)ap_start");
    sc_trace(mVcdFile, ap_done, "(port)ap_done");
    sc_trace(mVcdFile, ap_idle, "(port)ap_idle");
    sc_trace(mVcdFile, ap_ready, "(port)ap_ready");
    sc_trace(mVcdFile, addr0, "(port)addr0");
    sc_trace(mVcdFile, din0, "(port)din0");
    sc_trace(mVcdFile, dout0_i, "(port)dout0_i");
    sc_trace(mVcdFile, dout0_o, "(port)dout0_o");
    sc_trace(mVcdFile, r_req0, "(port)r_req0");
    sc_trace(mVcdFile, r_ack0_i, "(port)r_ack0_i");
    sc_trace(mVcdFile, r_ack0_o, "(port)r_ack0_o");
    sc_trace(mVcdFile, w_req0, "(port)w_req0");
    sc_trace(mVcdFile, w_ack0_i, "(port)w_ack0_i");
    sc_trace(mVcdFile, w_ack0_o, "(port)w_ack0_o");
    sc_trace(mVcdFile, addr1, "(port)addr1");
    sc_trace(mVcdFile, din1, "(port)din1");
    sc_trace(mVcdFile, dout1_i, "(port)dout1_i");
    sc_trace(mVcdFile, dout1_o, "(port)dout1_o");
    sc_trace(mVcdFile, r_req1, "(port)r_req1");
    sc_trace(mVcdFile, r_ack1_i, "(port)r_ack1_i");
    sc_trace(mVcdFile, r_ack1_o, "(port)r_ack1_o");
    sc_trace(mVcdFile, w_req1, "(port)w_req1");
    sc_trace(mVcdFile, w_ack1_i, "(port)w_ack1_i");
    sc_trace(mVcdFile, w_ack1_o, "(port)w_ack1_o");
    sc_trace(mVcdFile, addr2, "(port)addr2");
    sc_trace(mVcdFile, din2, "(port)din2");
    sc_trace(mVcdFile, dout2_i, "(port)dout2_i");
    sc_trace(mVcdFile, dout2_o, "(port)dout2_o");
    sc_trace(mVcdFile, r_req2, "(port)r_req2");
    sc_trace(mVcdFile, r_ack2_i, "(port)r_ack2_i");
    sc_trace(mVcdFile, r_ack2_o, "(port)r_ack2_o");
    sc_trace(mVcdFile, w_req2, "(port)w_req2");
    sc_trace(mVcdFile, w_ack2_i, "(port)w_ack2_i");
    sc_trace(mVcdFile, w_ack2_o, "(port)w_ack2_o");
    sc_trace(mVcdFile, addr3, "(port)addr3");
    sc_trace(mVcdFile, din3, "(port)din3");
    sc_trace(mVcdFile, dout3_i, "(port)dout3_i");
    sc_trace(mVcdFile, dout3_o, "(port)dout3_o");
    sc_trace(mVcdFile, r_req3, "(port)r_req3");
    sc_trace(mVcdFile, r_ack3_i, "(port)r_ack3_i");
    sc_trace(mVcdFile, r_ack3_o, "(port)r_ack3_o");
    sc_trace(mVcdFile, w_req3, "(port)w_req3");
    sc_trace(mVcdFile, w_ack3_i, "(port)w_ack3_i");
    sc_trace(mVcdFile, w_ack3_o, "(port)w_ack3_o");
#endif
#ifdef __HLS_TRACE_LEVEL_INT__
    sc_trace(mVcdFile, ap_CS_fsm, "ap_CS_fsm");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st1_fsm_0, "ap_sig_cseq_ST_st1_fsm_0");
    sc_trace(mVcdFile, ap_sig_61, "ap_sig_61");
    sc_trace(mVcdFile, addr0_0_data_reg, "addr0_0_data_reg");
    sc_trace(mVcdFile, addr0_0_vld_reg, "addr0_0_vld_reg");
    sc_trace(mVcdFile, addr0_0_ack_out, "addr0_0_ack_out");
    sc_trace(mVcdFile, dout0_1_data_reg, "dout0_1_data_reg");
    sc_trace(mVcdFile, dout0_1_vld_reg, "dout0_1_vld_reg");
    sc_trace(mVcdFile, dout0_1_vld_in, "dout0_1_vld_in");
    sc_trace(mVcdFile, r_ack0_1_data_reg, "r_ack0_1_data_reg");
    sc_trace(mVcdFile, r_ack0_1_data_in, "r_ack0_1_data_in");
    sc_trace(mVcdFile, r_ack0_1_vld_reg, "r_ack0_1_vld_reg");
    sc_trace(mVcdFile, r_ack0_1_vld_in, "r_ack0_1_vld_in");
    sc_trace(mVcdFile, w_ack0_1_data_reg, "w_ack0_1_data_reg");
    sc_trace(mVcdFile, w_ack0_1_data_in, "w_ack0_1_data_in");
    sc_trace(mVcdFile, w_ack0_1_vld_reg, "w_ack0_1_vld_reg");
    sc_trace(mVcdFile, w_ack0_1_vld_in, "w_ack0_1_vld_in");
    sc_trace(mVcdFile, addr1_0_data_reg, "addr1_0_data_reg");
    sc_trace(mVcdFile, addr1_0_vld_reg, "addr1_0_vld_reg");
    sc_trace(mVcdFile, addr1_0_ack_out, "addr1_0_ack_out");
    sc_trace(mVcdFile, dout1_1_data_reg, "dout1_1_data_reg");
    sc_trace(mVcdFile, dout1_1_vld_reg, "dout1_1_vld_reg");
    sc_trace(mVcdFile, dout1_1_vld_in, "dout1_1_vld_in");
    sc_trace(mVcdFile, r_ack1_1_data_reg, "r_ack1_1_data_reg");
    sc_trace(mVcdFile, r_ack1_1_data_in, "r_ack1_1_data_in");
    sc_trace(mVcdFile, r_ack1_1_vld_reg, "r_ack1_1_vld_reg");
    sc_trace(mVcdFile, r_ack1_1_vld_in, "r_ack1_1_vld_in");
    sc_trace(mVcdFile, w_ack1_1_data_reg, "w_ack1_1_data_reg");
    sc_trace(mVcdFile, w_ack1_1_data_in, "w_ack1_1_data_in");
    sc_trace(mVcdFile, w_ack1_1_vld_reg, "w_ack1_1_vld_reg");
    sc_trace(mVcdFile, w_ack1_1_vld_in, "w_ack1_1_vld_in");
    sc_trace(mVcdFile, addr2_0_data_reg, "addr2_0_data_reg");
    sc_trace(mVcdFile, addr2_0_vld_reg, "addr2_0_vld_reg");
    sc_trace(mVcdFile, addr2_0_ack_out, "addr2_0_ack_out");
    sc_trace(mVcdFile, dout2_1_data_reg, "dout2_1_data_reg");
    sc_trace(mVcdFile, dout2_1_vld_reg, "dout2_1_vld_reg");
    sc_trace(mVcdFile, dout2_1_vld_in, "dout2_1_vld_in");
    sc_trace(mVcdFile, r_ack2_1_data_reg, "r_ack2_1_data_reg");
    sc_trace(mVcdFile, r_ack2_1_data_in, "r_ack2_1_data_in");
    sc_trace(mVcdFile, r_ack2_1_vld_reg, "r_ack2_1_vld_reg");
    sc_trace(mVcdFile, r_ack2_1_vld_in, "r_ack2_1_vld_in");
    sc_trace(mVcdFile, w_ack2_1_data_reg, "w_ack2_1_data_reg");
    sc_trace(mVcdFile, w_ack2_1_data_in, "w_ack2_1_data_in");
    sc_trace(mVcdFile, w_ack2_1_vld_reg, "w_ack2_1_vld_reg");
    sc_trace(mVcdFile, w_ack2_1_vld_in, "w_ack2_1_vld_in");
    sc_trace(mVcdFile, addr3_0_data_reg, "addr3_0_data_reg");
    sc_trace(mVcdFile, addr3_0_vld_reg, "addr3_0_vld_reg");
    sc_trace(mVcdFile, addr3_0_ack_out, "addr3_0_ack_out");
    sc_trace(mVcdFile, dout3_1_data_reg, "dout3_1_data_reg");
    sc_trace(mVcdFile, dout3_1_vld_reg, "dout3_1_vld_reg");
    sc_trace(mVcdFile, dout3_1_vld_in, "dout3_1_vld_in");
    sc_trace(mVcdFile, r_ack3_1_data_reg, "r_ack3_1_data_reg");
    sc_trace(mVcdFile, r_ack3_1_data_in, "r_ack3_1_data_in");
    sc_trace(mVcdFile, r_ack3_1_vld_reg, "r_ack3_1_vld_reg");
    sc_trace(mVcdFile, r_ack3_1_vld_in, "r_ack3_1_vld_in");
    sc_trace(mVcdFile, w_ack3_1_data_reg, "w_ack3_1_data_reg");
    sc_trace(mVcdFile, w_ack3_1_data_in, "w_ack3_1_data_in");
    sc_trace(mVcdFile, w_ack3_1_vld_reg, "w_ack3_1_vld_reg");
    sc_trace(mVcdFile, w_ack3_1_vld_in, "w_ack3_1_vld_in");
    sc_trace(mVcdFile, mem_q0, "mem_q0");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st11_fsm_10, "ap_sig_cseq_ST_st11_fsm_10");
    sc_trace(mVcdFile, ap_sig_786, "ap_sig_786");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st21_fsm_20, "ap_sig_cseq_ST_st21_fsm_20");
    sc_trace(mVcdFile, ap_sig_793, "ap_sig_793");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st31_fsm_30, "ap_sig_cseq_ST_st31_fsm_30");
    sc_trace(mVcdFile, ap_sig_801, "ap_sig_801");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st41_fsm_40, "ap_sig_cseq_ST_st41_fsm_40");
    sc_trace(mVcdFile, ap_sig_809, "ap_sig_809");
    sc_trace(mVcdFile, addr_1_fu_518_p2, "addr_1_fu_518_p2");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st4_fsm_3, "ap_sig_cseq_ST_st4_fsm_3");
    sc_trace(mVcdFile, ap_sig_819, "ap_sig_819");
    sc_trace(mVcdFile, grp_read_fu_258_p2, "grp_read_fu_258_p2");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st5_fsm_4, "ap_sig_cseq_ST_st5_fsm_4");
    sc_trace(mVcdFile, ap_sig_828, "ap_sig_828");
    sc_trace(mVcdFile, ch_phi_fu_469_p22, "ch_phi_fu_469_p22");
    sc_trace(mVcdFile, grp_read_fu_270_p2, "grp_read_fu_270_p2");
    sc_trace(mVcdFile, din3_read_reg_585, "din3_read_reg_585");
    sc_trace(mVcdFile, grp_read_fu_216_p2, "grp_read_fu_216_p2");
    sc_trace(mVcdFile, grp_read_fu_228_p2, "grp_read_fu_228_p2");
    sc_trace(mVcdFile, din2_read_reg_598, "din2_read_reg_598");
    sc_trace(mVcdFile, grp_read_fu_174_p2, "grp_read_fu_174_p2");
    sc_trace(mVcdFile, grp_read_fu_186_p2, "grp_read_fu_186_p2");
    sc_trace(mVcdFile, din1_read_reg_611, "din1_read_reg_611");
    sc_trace(mVcdFile, grp_read_fu_132_p2, "grp_read_fu_132_p2");
    sc_trace(mVcdFile, grp_read_fu_144_p2, "grp_read_fu_144_p2");
    sc_trace(mVcdFile, din0_read_reg_624, "din0_read_reg_624");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st10_fsm_9, "ap_sig_cseq_ST_st10_fsm_9");
    sc_trace(mVcdFile, ap_sig_900, "ap_sig_900");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st20_fsm_19, "ap_sig_cseq_ST_st20_fsm_19");
    sc_trace(mVcdFile, ap_sig_909, "ap_sig_909");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st30_fsm_29, "ap_sig_cseq_ST_st30_fsm_29");
    sc_trace(mVcdFile, ap_sig_918, "ap_sig_918");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st40_fsm_39, "ap_sig_cseq_ST_st40_fsm_39");
    sc_trace(mVcdFile, ap_sig_927, "ap_sig_927");
    sc_trace(mVcdFile, mem_address0, "mem_address0");
    sc_trace(mVcdFile, mem_ce0, "mem_ce0");
    sc_trace(mVcdFile, mem_we0, "mem_we0");
    sc_trace(mVcdFile, mem_d0, "mem_d0");
    sc_trace(mVcdFile, addr_reg_454, "addr_reg_454");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st3_fsm_2, "ap_sig_cseq_ST_st3_fsm_2");
    sc_trace(mVcdFile, ap_sig_946, "ap_sig_946");
    sc_trace(mVcdFile, exitcond_fu_512_p2, "exitcond_fu_512_p2");
    sc_trace(mVcdFile, ch_reg_465, "ch_reg_465");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st46_fsm_45, "ap_sig_cseq_ST_st46_fsm_45");
    sc_trace(mVcdFile, ap_sig_958, "ap_sig_958");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st15_fsm_14, "ap_sig_cseq_ST_st15_fsm_14");
    sc_trace(mVcdFile, ap_sig_979, "ap_sig_979");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st25_fsm_24, "ap_sig_cseq_ST_st25_fsm_24");
    sc_trace(mVcdFile, ap_sig_987, "ap_sig_987");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st35_fsm_34, "ap_sig_cseq_ST_st35_fsm_34");
    sc_trace(mVcdFile, ap_sig_995, "ap_sig_995");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st45_fsm_44, "ap_sig_cseq_ST_st45_fsm_44");
    sc_trace(mVcdFile, ap_sig_1003, "ap_sig_1003");
    sc_trace(mVcdFile, tmp_s_fu_524_p1, "tmp_s_fu_524_p1");
    sc_trace(mVcdFile, tmp_9_fu_529_p1, "tmp_9_fu_529_p1");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st6_fsm_5, "ap_sig_cseq_ST_st6_fsm_5");
    sc_trace(mVcdFile, ap_sig_1041, "ap_sig_1041");
    sc_trace(mVcdFile, tmp_5_fu_534_p1, "tmp_5_fu_534_p1");
    sc_trace(mVcdFile, tmp_8_fu_539_p1, "tmp_8_fu_539_p1");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st16_fsm_15, "ap_sig_cseq_ST_st16_fsm_15");
    sc_trace(mVcdFile, ap_sig_1051, "ap_sig_1051");
    sc_trace(mVcdFile, tmp_4_fu_544_p1, "tmp_4_fu_544_p1");
    sc_trace(mVcdFile, tmp_7_fu_549_p1, "tmp_7_fu_549_p1");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st26_fsm_25, "ap_sig_cseq_ST_st26_fsm_25");
    sc_trace(mVcdFile, ap_sig_1061, "ap_sig_1061");
    sc_trace(mVcdFile, tmp_3_fu_554_p1, "tmp_3_fu_554_p1");
    sc_trace(mVcdFile, tmp_6_fu_559_p1, "tmp_6_fu_559_p1");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st36_fsm_35, "ap_sig_cseq_ST_st36_fsm_35");
    sc_trace(mVcdFile, ap_sig_1071, "ap_sig_1071");
    sc_trace(mVcdFile, tmp_2_fu_564_p1, "tmp_2_fu_564_p1");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st2_fsm_1, "ap_sig_cseq_ST_st2_fsm_1");
    sc_trace(mVcdFile, ap_sig_1080, "ap_sig_1080");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st43_fsm_42, "ap_sig_cseq_ST_st43_fsm_42");
    sc_trace(mVcdFile, ap_sig_1097, "ap_sig_1097");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st37_fsm_36, "ap_sig_cseq_ST_st37_fsm_36");
    sc_trace(mVcdFile, ap_sig_1109, "ap_sig_1109");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st33_fsm_32, "ap_sig_cseq_ST_st33_fsm_32");
    sc_trace(mVcdFile, ap_sig_1126, "ap_sig_1126");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st27_fsm_26, "ap_sig_cseq_ST_st27_fsm_26");
    sc_trace(mVcdFile, ap_sig_1138, "ap_sig_1138");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st23_fsm_22, "ap_sig_cseq_ST_st23_fsm_22");
    sc_trace(mVcdFile, ap_sig_1155, "ap_sig_1155");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st17_fsm_16, "ap_sig_cseq_ST_st17_fsm_16");
    sc_trace(mVcdFile, ap_sig_1167, "ap_sig_1167");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st13_fsm_12, "ap_sig_cseq_ST_st13_fsm_12");
    sc_trace(mVcdFile, ap_sig_1184, "ap_sig_1184");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st7_fsm_6, "ap_sig_cseq_ST_st7_fsm_6");
    sc_trace(mVcdFile, ap_sig_1197, "ap_sig_1197");
    sc_trace(mVcdFile, ap_NS_fsm, "ap_NS_fsm");
#endif

    }
    mHdltvinHandle.open("sharedmem.hdltvin.dat");
    mHdltvoutHandle.open("sharedmem.hdltvout.dat");
}

sharedmem::~sharedmem() {
    if (mVcdFile) 
        sc_close_vcd_trace_file(mVcdFile);

    mHdltvinHandle << "] " << endl;
    mHdltvoutHandle << "] " << endl;
    mHdltvinHandle.close();
    mHdltvoutHandle.close();
    delete mem_U;
}

void sharedmem::thread_ap_clk_no_reset_() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
         esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_512_p2.read()))) {
        addr_reg_454 = addr_1_fu_518_p2.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st3_fsm_2.read())) {
        addr_reg_454 = ap_const_lv9_0;
    }
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_CS_fsm = ap_ST_st1_fsm_0;
    } else {
        ap_CS_fsm = ap_NS_fsm.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
         ((esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
           esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
           !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read())) || 
          (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
           esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
           esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0))))) {
        ch_reg_465 = ap_const_lv3_4;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                ((esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                  esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                  !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read())) || 
                 (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                  esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0))))) {
        ch_reg_465 = ap_const_lv3_3;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                ((esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                  esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                  !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read())) || 
                 (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                  esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                  esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0))))) {
        ch_reg_465 = ap_const_lv3_2;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                  !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read())) || 
                 (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                  esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0))))) {
        ch_reg_465 = ap_const_lv3_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st46_fsm_45.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                 esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0)) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
                 !esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_512_p2.read())) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st15_fsm_14.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st25_fsm_24.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st35_fsm_34.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st45_fsm_44.read()))) {
        ch_reg_465 = ap_const_lv3_0;
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_0, addr0_0_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr0_0_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr0_0_ack_out.read())))) {
        addr0_0_data_reg = addr0.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_0, addr1_0_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr1_0_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr1_0_ack_out.read())))) {
        addr1_0_data_reg = addr1.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_0, addr2_0_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr2_0_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr2_0_ack_out.read())))) {
        addr2_0_data_reg = addr2.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_0, addr3_0_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr3_0_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, addr3_0_ack_out.read())))) {
        addr3_0_data_reg = addr3.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()))) {
        din0_read_reg_624 = din0.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()))) {
        din1_read_reg_611 = din1.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()))) {
        din2_read_reg_598 = din2.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()))) {
        din3_read_reg_585 = din3.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dout0_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout0_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        dout0_1_data_reg = mem_q0.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dout1_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout1_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        dout1_1_data_reg = mem_q0.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dout2_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout2_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        dout2_1_data_reg = mem_q0.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dout3_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dout3_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        dout3_1_data_reg = mem_q0.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, r_ack0_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack0_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        r_ack0_1_data_reg = r_ack0_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, r_ack1_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack1_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        r_ack1_1_data_reg = r_ack1_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, r_ack2_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack2_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        r_ack2_1_data_reg = r_ack2_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, r_ack3_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, r_ack3_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        r_ack3_1_data_reg = r_ack3_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, w_ack0_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack0_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack0_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        w_ack0_1_data_reg = w_ack0_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, w_ack1_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack1_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack1_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        w_ack1_1_data_reg = w_ack1_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, w_ack2_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack2_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack2_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        w_ack2_1_data_reg = w_ack2_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, w_ack3_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack3_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, w_ack3_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        w_ack3_1_data_reg = w_ack3_1_data_in.read();
    }
}

void sharedmem::thread_addr0_0_ack_out() {
    addr0_0_ack_out = ap_const_logic_0;
}

void sharedmem::thread_addr1_0_ack_out() {
    addr1_0_ack_out = ap_const_logic_0;
}

void sharedmem::thread_addr2_0_ack_out() {
    addr2_0_ack_out = ap_const_logic_0;
}

void sharedmem::thread_addr3_0_ack_out() {
    addr3_0_ack_out = ap_const_logic_0;
}

void sharedmem::thread_addr_1_fu_518_p2() {
    addr_1_fu_518_p2 = (!addr_reg_454.read().is_01() || !ap_const_lv9_1.is_01())? sc_lv<9>(): (sc_biguint<9>(addr_reg_454.read()) + sc_biguint<9>(ap_const_lv9_1));
}

void sharedmem::thread_ap_done() {
    ap_done = ap_const_logic_0;
}

void sharedmem::thread_ap_idle() {
    if ((esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read()))) {
        ap_idle = ap_const_logic_1;
    } else {
        ap_idle = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_ready() {
    ap_ready = ap_const_logic_0;
}

void sharedmem::thread_ap_sig_1003() {
    ap_sig_1003 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(44, 44));
}

void sharedmem::thread_ap_sig_1041() {
    ap_sig_1041 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(5, 5));
}

void sharedmem::thread_ap_sig_1051() {
    ap_sig_1051 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(15, 15));
}

void sharedmem::thread_ap_sig_1061() {
    ap_sig_1061 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(25, 25));
}

void sharedmem::thread_ap_sig_1071() {
    ap_sig_1071 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(35, 35));
}

void sharedmem::thread_ap_sig_1080() {
    ap_sig_1080 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(1, 1));
}

void sharedmem::thread_ap_sig_1097() {
    ap_sig_1097 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(42, 42));
}

void sharedmem::thread_ap_sig_1109() {
    ap_sig_1109 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(36, 36));
}

void sharedmem::thread_ap_sig_1126() {
    ap_sig_1126 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(32, 32));
}

void sharedmem::thread_ap_sig_1138() {
    ap_sig_1138 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(26, 26));
}

void sharedmem::thread_ap_sig_1155() {
    ap_sig_1155 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(22, 22));
}

void sharedmem::thread_ap_sig_1167() {
    ap_sig_1167 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(16, 16));
}

void sharedmem::thread_ap_sig_1184() {
    ap_sig_1184 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(12, 12));
}

void sharedmem::thread_ap_sig_1197() {
    ap_sig_1197 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(6, 6));
}

void sharedmem::thread_ap_sig_61() {
    ap_sig_61 = esl_seteq<1,1,1>(ap_CS_fsm.read().range(0, 0), ap_const_lv1_1);
}

void sharedmem::thread_ap_sig_786() {
    ap_sig_786 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(10, 10));
}

void sharedmem::thread_ap_sig_793() {
    ap_sig_793 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(20, 20));
}

void sharedmem::thread_ap_sig_801() {
    ap_sig_801 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(30, 30));
}

void sharedmem::thread_ap_sig_809() {
    ap_sig_809 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(40, 40));
}

void sharedmem::thread_ap_sig_819() {
    ap_sig_819 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(3, 3));
}

void sharedmem::thread_ap_sig_828() {
    ap_sig_828 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(4, 4));
}

void sharedmem::thread_ap_sig_900() {
    ap_sig_900 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(9, 9));
}

void sharedmem::thread_ap_sig_909() {
    ap_sig_909 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(19, 19));
}

void sharedmem::thread_ap_sig_918() {
    ap_sig_918 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(29, 29));
}

void sharedmem::thread_ap_sig_927() {
    ap_sig_927 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(39, 39));
}

void sharedmem::thread_ap_sig_946() {
    ap_sig_946 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(2, 2));
}

void sharedmem::thread_ap_sig_958() {
    ap_sig_958 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(45, 45));
}

void sharedmem::thread_ap_sig_979() {
    ap_sig_979 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(14, 14));
}

void sharedmem::thread_ap_sig_987() {
    ap_sig_987 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(24, 24));
}

void sharedmem::thread_ap_sig_995() {
    ap_sig_995 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(34, 34));
}

void sharedmem::thread_ap_sig_cseq_ST_st10_fsm_9() {
    if (ap_sig_900.read()) {
        ap_sig_cseq_ST_st10_fsm_9 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st10_fsm_9 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st11_fsm_10() {
    if (ap_sig_786.read()) {
        ap_sig_cseq_ST_st11_fsm_10 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st11_fsm_10 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st13_fsm_12() {
    if (ap_sig_1184.read()) {
        ap_sig_cseq_ST_st13_fsm_12 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st13_fsm_12 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st15_fsm_14() {
    if (ap_sig_979.read()) {
        ap_sig_cseq_ST_st15_fsm_14 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st15_fsm_14 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st16_fsm_15() {
    if (ap_sig_1051.read()) {
        ap_sig_cseq_ST_st16_fsm_15 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st16_fsm_15 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st17_fsm_16() {
    if (ap_sig_1167.read()) {
        ap_sig_cseq_ST_st17_fsm_16 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st17_fsm_16 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st1_fsm_0() {
    if (ap_sig_61.read()) {
        ap_sig_cseq_ST_st1_fsm_0 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st1_fsm_0 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st20_fsm_19() {
    if (ap_sig_909.read()) {
        ap_sig_cseq_ST_st20_fsm_19 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st20_fsm_19 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st21_fsm_20() {
    if (ap_sig_793.read()) {
        ap_sig_cseq_ST_st21_fsm_20 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st21_fsm_20 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st23_fsm_22() {
    if (ap_sig_1155.read()) {
        ap_sig_cseq_ST_st23_fsm_22 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st23_fsm_22 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st25_fsm_24() {
    if (ap_sig_987.read()) {
        ap_sig_cseq_ST_st25_fsm_24 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st25_fsm_24 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st26_fsm_25() {
    if (ap_sig_1061.read()) {
        ap_sig_cseq_ST_st26_fsm_25 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st26_fsm_25 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st27_fsm_26() {
    if (ap_sig_1138.read()) {
        ap_sig_cseq_ST_st27_fsm_26 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st27_fsm_26 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st2_fsm_1() {
    if (ap_sig_1080.read()) {
        ap_sig_cseq_ST_st2_fsm_1 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st2_fsm_1 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st30_fsm_29() {
    if (ap_sig_918.read()) {
        ap_sig_cseq_ST_st30_fsm_29 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st30_fsm_29 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st31_fsm_30() {
    if (ap_sig_801.read()) {
        ap_sig_cseq_ST_st31_fsm_30 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st31_fsm_30 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st33_fsm_32() {
    if (ap_sig_1126.read()) {
        ap_sig_cseq_ST_st33_fsm_32 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st33_fsm_32 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st35_fsm_34() {
    if (ap_sig_995.read()) {
        ap_sig_cseq_ST_st35_fsm_34 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st35_fsm_34 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st36_fsm_35() {
    if (ap_sig_1071.read()) {
        ap_sig_cseq_ST_st36_fsm_35 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st36_fsm_35 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st37_fsm_36() {
    if (ap_sig_1109.read()) {
        ap_sig_cseq_ST_st37_fsm_36 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st37_fsm_36 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st3_fsm_2() {
    if (ap_sig_946.read()) {
        ap_sig_cseq_ST_st3_fsm_2 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st3_fsm_2 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st40_fsm_39() {
    if (ap_sig_927.read()) {
        ap_sig_cseq_ST_st40_fsm_39 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st40_fsm_39 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st41_fsm_40() {
    if (ap_sig_809.read()) {
        ap_sig_cseq_ST_st41_fsm_40 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st41_fsm_40 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st43_fsm_42() {
    if (ap_sig_1097.read()) {
        ap_sig_cseq_ST_st43_fsm_42 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st43_fsm_42 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st45_fsm_44() {
    if (ap_sig_1003.read()) {
        ap_sig_cseq_ST_st45_fsm_44 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st45_fsm_44 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st46_fsm_45() {
    if (ap_sig_958.read()) {
        ap_sig_cseq_ST_st46_fsm_45 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st46_fsm_45 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st4_fsm_3() {
    if (ap_sig_819.read()) {
        ap_sig_cseq_ST_st4_fsm_3 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st4_fsm_3 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st5_fsm_4() {
    if (ap_sig_828.read()) {
        ap_sig_cseq_ST_st5_fsm_4 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st5_fsm_4 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st6_fsm_5() {
    if (ap_sig_1041.read()) {
        ap_sig_cseq_ST_st6_fsm_5 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st6_fsm_5 = ap_const_logic_0;
    }
}

void sharedmem::thread_ap_sig_cseq_ST_st7_fsm_6() {
    if (ap_sig_1197.read()) {
        ap_sig_cseq_ST_st7_fsm_6 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st7_fsm_6 = ap_const_logic_0;
    }
}

void sharedmem::thread_ch_phi_fu_469_p22() {
    ch_phi_fu_469_p22 = ch_reg_465.read();
}

void sharedmem::thread_dout0_1_vld_in() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st41_fsm_40.read())) {
        dout0_1_vld_in = ap_const_logic_1;
    } else {
        dout0_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_dout0_o() {
    dout0_o = dout0_1_data_reg.read();
}

void sharedmem::thread_dout1_1_vld_in() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st31_fsm_30.read())) {
        dout1_1_vld_in = ap_const_logic_1;
    } else {
        dout1_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_dout1_o() {
    dout1_o = dout1_1_data_reg.read();
}

void sharedmem::thread_dout2_1_vld_in() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read())) {
        dout2_1_vld_in = ap_const_logic_1;
    } else {
        dout2_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_dout2_o() {
    dout2_o = dout2_1_data_reg.read();
}

void sharedmem::thread_dout3_1_vld_in() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read())) {
        dout3_1_vld_in = ap_const_logic_1;
    } else {
        dout3_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_dout3_o() {
    dout3_o = dout3_1_data_reg.read();
}

void sharedmem::thread_exitcond_fu_512_p2() {
    exitcond_fu_512_p2 = (!addr_reg_454.read().is_01() || !ap_const_lv9_100.is_01())? sc_lv<1>(): sc_lv<1>(addr_reg_454.read() == ap_const_lv9_100);
}

void sharedmem::thread_grp_read_fu_132_p2() {
    grp_read_fu_132_p2 = r_req0.read();
}

void sharedmem::thread_grp_read_fu_144_p2() {
    grp_read_fu_144_p2 = w_req0.read();
}

void sharedmem::thread_grp_read_fu_174_p2() {
    grp_read_fu_174_p2 = r_req1.read();
}

void sharedmem::thread_grp_read_fu_186_p2() {
    grp_read_fu_186_p2 = w_req1.read();
}

void sharedmem::thread_grp_read_fu_216_p2() {
    grp_read_fu_216_p2 = r_req2.read();
}

void sharedmem::thread_grp_read_fu_228_p2() {
    grp_read_fu_228_p2 = w_req2.read();
}

void sharedmem::thread_grp_read_fu_258_p2() {
    grp_read_fu_258_p2 = r_req3.read();
}

void sharedmem::thread_grp_read_fu_270_p2() {
    grp_read_fu_270_p2 = w_req3.read();
}

void sharedmem::thread_mem_address0() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st36_fsm_35.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_6_fu_559_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st26_fsm_25.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_7_fu_549_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_8_fu_539_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_9_fu_529_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_s_fu_524_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st40_fsm_39.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_2_fu_564_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st30_fsm_29.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_3_fu_554_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st20_fsm_19.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_4_fu_544_p1.read());
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read())) {
        mem_address0 =  (sc_lv<8>) (tmp_5_fu_534_p1.read());
    } else {
        mem_address0 = "XXXXXXXX";
    }
}

void sharedmem::thread_mem_ce0() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st20_fsm_19.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st30_fsm_29.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st40_fsm_39.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st26_fsm_25.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st36_fsm_35.read()))) {
        mem_ce0 = ap_const_logic_1;
    } else {
        mem_ce0 = ap_const_logic_0;
    }
}

void sharedmem::thread_mem_d0() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st36_fsm_35.read())) {
        mem_d0 = din0_read_reg_624.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st26_fsm_25.read())) {
        mem_d0 = din1_read_reg_611.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read())) {
        mem_d0 = din2_read_reg_598.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read())) {
        mem_d0 = din3_read_reg_585.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        mem_d0 = ap_const_lv8_0;
    } else {
        mem_d0 = "XXXXXXXX";
    }
}

void sharedmem::thread_mem_we0() {
    if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
          esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_512_p2.read())) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st26_fsm_25.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st36_fsm_35.read()))) {
        mem_we0 = ap_const_logic_1;
    } else {
        mem_we0 = ap_const_logic_0;
    }
}

void sharedmem::thread_r_ack0_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st43_fsm_42.read()))) {
        r_ack0_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st43_fsm_42.read())))) {
        r_ack0_1_data_in = ap_const_lv1_0;
    } else {
        r_ack0_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_r_ack0_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st43_fsm_42.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st43_fsm_42.read())))) {
        r_ack0_1_vld_in = ap_const_logic_1;
    } else {
        r_ack0_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_r_ack0_o() {
    r_ack0_o = r_ack0_1_data_reg.read();
}

void sharedmem::thread_r_ack1_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st33_fsm_32.read()))) {
        r_ack1_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st33_fsm_32.read())))) {
        r_ack1_1_data_in = ap_const_lv1_0;
    } else {
        r_ack1_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_r_ack1_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st33_fsm_32.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st33_fsm_32.read())))) {
        r_ack1_1_vld_in = ap_const_logic_1;
    } else {
        r_ack1_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_r_ack1_o() {
    r_ack1_o = r_ack1_1_data_reg.read();
}

void sharedmem::thread_r_ack2_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st23_fsm_22.read()))) {
        r_ack2_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st23_fsm_22.read())))) {
        r_ack2_1_data_in = ap_const_lv1_0;
    } else {
        r_ack2_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_r_ack2_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st23_fsm_22.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st23_fsm_22.read())))) {
        r_ack2_1_vld_in = ap_const_logic_1;
    } else {
        r_ack2_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_r_ack2_o() {
    r_ack2_o = r_ack2_1_data_reg.read();
}

void sharedmem::thread_r_ack3_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()))) {
        r_ack3_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read())))) {
        r_ack3_1_data_in = ap_const_lv1_0;
    } else {
        r_ack3_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_r_ack3_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read())))) {
        r_ack3_1_vld_in = ap_const_logic_1;
    } else {
        r_ack3_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_r_ack3_o() {
    r_ack3_o = r_ack3_1_data_reg.read();
}

void sharedmem::thread_tmp_2_fu_564_p1() {
    tmp_2_fu_564_p1 = esl_zext<64,8>(addr0_0_data_reg.read());
}

void sharedmem::thread_tmp_3_fu_554_p1() {
    tmp_3_fu_554_p1 = esl_zext<64,8>(addr1_0_data_reg.read());
}

void sharedmem::thread_tmp_4_fu_544_p1() {
    tmp_4_fu_544_p1 = esl_zext<64,8>(addr2_0_data_reg.read());
}

void sharedmem::thread_tmp_5_fu_534_p1() {
    tmp_5_fu_534_p1 = esl_zext<64,8>(addr3_0_data_reg.read());
}

void sharedmem::thread_tmp_6_fu_559_p1() {
    tmp_6_fu_559_p1 = esl_zext<64,8>(addr0_0_data_reg.read());
}

void sharedmem::thread_tmp_7_fu_549_p1() {
    tmp_7_fu_549_p1 = esl_zext<64,8>(addr1_0_data_reg.read());
}

void sharedmem::thread_tmp_8_fu_539_p1() {
    tmp_8_fu_539_p1 = esl_zext<64,8>(addr2_0_data_reg.read());
}

void sharedmem::thread_tmp_9_fu_529_p1() {
    tmp_9_fu_529_p1 = esl_zext<64,8>(addr3_0_data_reg.read());
}

void sharedmem::thread_tmp_s_fu_524_p1() {
    tmp_s_fu_524_p1 = esl_zext<64,9>(addr_reg_454.read());
}

void sharedmem::thread_w_ack0_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st37_fsm_36.read()))) {
        w_ack0_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st37_fsm_36.read())))) {
        w_ack0_1_data_in = ap_const_lv1_0;
    } else {
        w_ack0_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_w_ack0_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st37_fsm_36.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st37_fsm_36.read())))) {
        w_ack0_1_vld_in = ap_const_logic_1;
    } else {
        w_ack0_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_w_ack0_o() {
    w_ack0_o = w_ack0_1_data_reg.read();
}

void sharedmem::thread_w_ack1_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st27_fsm_26.read()))) {
        w_ack1_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st27_fsm_26.read())))) {
        w_ack1_1_data_in = ap_const_lv1_0;
    } else {
        w_ack1_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_w_ack1_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st27_fsm_26.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st27_fsm_26.read())))) {
        w_ack1_1_vld_in = ap_const_logic_1;
    } else {
        w_ack1_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_w_ack1_o() {
    w_ack1_o = w_ack1_1_data_reg.read();
}

void sharedmem::thread_w_ack2_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read()))) {
        w_ack2_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read())))) {
        w_ack2_1_data_in = ap_const_lv1_0;
    } else {
        w_ack2_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_w_ack2_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read())))) {
        w_ack2_1_vld_in = ap_const_logic_1;
    } else {
        w_ack2_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_w_ack2_o() {
    w_ack2_o = w_ack2_1_data_reg.read();
}

void sharedmem::thread_w_ack3_1_data_in() {
    if ((!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st7_fsm_6.read()))) {
        w_ack3_1_data_in = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
                 !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
                (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st7_fsm_6.read())))) {
        w_ack3_1_data_in = ap_const_lv1_0;
    } else {
        w_ack3_1_data_in =  (sc_lv<1>) ("X");
    }
}

void sharedmem::thread_w_ack3_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st2_fsm_1.read()) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && 
          !esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4)) || 
         (!esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st7_fsm_6.read())) || 
         (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st7_fsm_6.read())))) {
        w_ack3_1_vld_in = ap_const_logic_1;
    } else {
        w_ack3_1_vld_in = ap_const_logic_0;
    }
}

void sharedmem::thread_w_ack3_o() {
    w_ack3_o = w_ack3_1_data_reg.read();
}

void sharedmem::thread_ap_NS_fsm() {
    switch (ap_CS_fsm.read().to_uint64()) {
        case 1 : 
            if (!esl_seteq<1,1,1>(ap_start.read(), ap_const_logic_0)) {
                ap_NS_fsm = ap_ST_st2_fsm_1;
            } else {
                ap_NS_fsm = ap_ST_st1_fsm_0;
            }
            break;
        case 2 : 
            ap_NS_fsm = ap_ST_st3_fsm_2;
            break;
        case 4 : 
            ap_NS_fsm = ap_ST_st4_fsm_3;
            break;
        case 8 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_512_p2.read())) {
                ap_NS_fsm = ap_ST_st4_fsm_3;
            } else {
                ap_NS_fsm = ap_ST_st5_fsm_4;
            }
            break;
        case 16 : 
            if (esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_0)) {
                ap_NS_fsm = ap_ST_st5_fsm_4;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()))) {
                ap_NS_fsm = ap_ST_st39_fsm_38;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read()))) {
                ap_NS_fsm = ap_ST_st36_fsm_35;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_1) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read()))) {
                ap_NS_fsm = ap_ST_st40_fsm_39;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()))) {
                ap_NS_fsm = ap_ST_st29_fsm_28;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read()))) {
                ap_NS_fsm = ap_ST_st26_fsm_25;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_2) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read()))) {
                ap_NS_fsm = ap_ST_st30_fsm_29;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()))) {
                ap_NS_fsm = ap_ST_st19_fsm_18;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read()))) {
                ap_NS_fsm = ap_ST_st16_fsm_15;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_3) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read()))) {
                ap_NS_fsm = ap_ST_st20_fsm_19;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()))) {
                ap_NS_fsm = ap_ST_st9_fsm_8;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4) && esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read()))) {
                ap_NS_fsm = ap_ST_st6_fsm_5;
            } else if ((esl_seteq<1,3,3>(ch_phi_fu_469_p22.read(), ap_const_lv3_4) && !esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read()))) {
                ap_NS_fsm = ap_ST_st10_fsm_9;
            } else {
                ap_NS_fsm = ap_ST_st46_fsm_45;
            }
            break;
        case 32 : 
            ap_NS_fsm = ap_ST_st7_fsm_6;
            break;
        case 64 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_270_p2.read())) {
                ap_NS_fsm = ap_ST_st9_fsm_8;
            } else {
                ap_NS_fsm = ap_ST_st8_fsm_7;
            }
            break;
        case 128 : 
            ap_NS_fsm = ap_ST_st7_fsm_6;
            break;
        case 256 : 
            ap_NS_fsm = ap_ST_st15_fsm_14;
            break;
        case 512 : 
            ap_NS_fsm = ap_ST_st11_fsm_10;
            break;
        case 1024 : 
            ap_NS_fsm = ap_ST_st12_fsm_11;
            break;
        case 2048 : 
            ap_NS_fsm = ap_ST_st13_fsm_12;
            break;
        case 4096 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_258_p2.read())) {
                ap_NS_fsm = ap_ST_st15_fsm_14;
            } else {
                ap_NS_fsm = ap_ST_st14_fsm_13;
            }
            break;
        case 8192 : 
            ap_NS_fsm = ap_ST_st13_fsm_12;
            break;
        case 16384 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
            break;
        case 32768 : 
            ap_NS_fsm = ap_ST_st17_fsm_16;
            break;
        case 65536 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_228_p2.read())) {
                ap_NS_fsm = ap_ST_st19_fsm_18;
            } else {
                ap_NS_fsm = ap_ST_st18_fsm_17;
            }
            break;
        case 131072 : 
            ap_NS_fsm = ap_ST_st17_fsm_16;
            break;
        case 262144 : 
            ap_NS_fsm = ap_ST_st25_fsm_24;
            break;
        case 524288 : 
            ap_NS_fsm = ap_ST_st21_fsm_20;
            break;
        case 1048576 : 
            ap_NS_fsm = ap_ST_st22_fsm_21;
            break;
        case 2097152 : 
            ap_NS_fsm = ap_ST_st23_fsm_22;
            break;
        case 4194304 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_216_p2.read())) {
                ap_NS_fsm = ap_ST_st25_fsm_24;
            } else {
                ap_NS_fsm = ap_ST_st24_fsm_23;
            }
            break;
        case 8388608 : 
            ap_NS_fsm = ap_ST_st23_fsm_22;
            break;
        case 16777216 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
            break;
        case 33554432 : 
            ap_NS_fsm = ap_ST_st27_fsm_26;
            break;
        case 67108864 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_186_p2.read())) {
                ap_NS_fsm = ap_ST_st29_fsm_28;
            } else {
                ap_NS_fsm = ap_ST_st28_fsm_27;
            }
            break;
        case 134217728 : 
            ap_NS_fsm = ap_ST_st27_fsm_26;
            break;
        case 268435456 : 
            ap_NS_fsm = ap_ST_st35_fsm_34;
            break;
        case 536870912 : 
            ap_NS_fsm = ap_ST_st31_fsm_30;
            break;
        case 1073741824 : 
            ap_NS_fsm = ap_ST_st32_fsm_31;
            break;
        case 2147483648 : 
            ap_NS_fsm = ap_ST_st33_fsm_32;
            break;
        case 4294967296 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_174_p2.read())) {
                ap_NS_fsm = ap_ST_st35_fsm_34;
            } else {
                ap_NS_fsm = ap_ST_st34_fsm_33;
            }
            break;
        case 8589934592 : 
            ap_NS_fsm = ap_ST_st33_fsm_32;
            break;
        case 17179869184 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
            break;
        case 34359738368 : 
            ap_NS_fsm = ap_ST_st37_fsm_36;
            break;
        case 68719476736 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_144_p2.read())) {
                ap_NS_fsm = ap_ST_st39_fsm_38;
            } else {
                ap_NS_fsm = ap_ST_st38_fsm_37;
            }
            break;
        case 137438953472 : 
            ap_NS_fsm = ap_ST_st37_fsm_36;
            break;
        case 274877906944 : 
            ap_NS_fsm = ap_ST_st45_fsm_44;
            break;
        case 549755813888 : 
            ap_NS_fsm = ap_ST_st41_fsm_40;
            break;
        case 1099511627776 : 
            ap_NS_fsm = ap_ST_st42_fsm_41;
            break;
        case 2199023255552 : 
            ap_NS_fsm = ap_ST_st43_fsm_42;
            break;
        case 4398046511104 : 
            if (esl_seteq<1,1,1>(ap_const_lv1_0, grp_read_fu_132_p2.read())) {
                ap_NS_fsm = ap_ST_st45_fsm_44;
            } else {
                ap_NS_fsm = ap_ST_st44_fsm_43;
            }
            break;
        case 8796093022208 : 
            ap_NS_fsm = ap_ST_st43_fsm_42;
            break;
        case 17592186044416 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
            break;
        case 35184372088832 : 
            ap_NS_fsm = ap_ST_st5_fsm_4;
            break;
        default : 
            ap_NS_fsm =  (sc_lv<46>) ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
            break;
    }
}

void sharedmem::thread_hdltv_gen() {
    const char* dump_tv = std::getenv("AP_WRITE_TV");
    if (!(dump_tv && string(dump_tv) == "on")) return;

    wait();

    mHdltvinHandle << "[ " << endl;
    mHdltvoutHandle << "[ " << endl;
    int ap_cycleNo = 0;
    while (1) {
        wait();
        const char* mComma = ap_cycleNo == 0 ? " " : ", " ;
        mHdltvinHandle << mComma << "{"  <<  " \"ap_rst\" :  \"" << ap_rst.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"ap_start\" :  \"" << ap_start.read() << "\" ";
        mHdltvoutHandle << mComma << "{"  <<  " \"ap_done\" :  \"" << ap_done.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"ap_idle\" :  \"" << ap_idle.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"ap_ready\" :  \"" << ap_ready.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"addr0\" :  \"" << addr0.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"din0\" :  \"" << din0.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"dout0_i\" :  \"" << dout0_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"dout0_o\" :  \"" << dout0_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_req0\" :  \"" << r_req0.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_ack0_i\" :  \"" << r_ack0_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"r_ack0_o\" :  \"" << r_ack0_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_req0\" :  \"" << w_req0.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_ack0_i\" :  \"" << w_ack0_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"w_ack0_o\" :  \"" << w_ack0_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"addr1\" :  \"" << addr1.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"din1\" :  \"" << din1.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"dout1_i\" :  \"" << dout1_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"dout1_o\" :  \"" << dout1_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_req1\" :  \"" << r_req1.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_ack1_i\" :  \"" << r_ack1_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"r_ack1_o\" :  \"" << r_ack1_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_req1\" :  \"" << w_req1.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_ack1_i\" :  \"" << w_ack1_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"w_ack1_o\" :  \"" << w_ack1_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"addr2\" :  \"" << addr2.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"din2\" :  \"" << din2.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"dout2_i\" :  \"" << dout2_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"dout2_o\" :  \"" << dout2_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_req2\" :  \"" << r_req2.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_ack2_i\" :  \"" << r_ack2_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"r_ack2_o\" :  \"" << r_ack2_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_req2\" :  \"" << w_req2.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_ack2_i\" :  \"" << w_ack2_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"w_ack2_o\" :  \"" << w_ack2_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"addr3\" :  \"" << addr3.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"din3\" :  \"" << din3.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"dout3_i\" :  \"" << dout3_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"dout3_o\" :  \"" << dout3_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_req3\" :  \"" << r_req3.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"r_ack3_i\" :  \"" << r_ack3_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"r_ack3_o\" :  \"" << r_ack3_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_req3\" :  \"" << w_req3.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"w_ack3_i\" :  \"" << w_ack3_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"w_ack3_o\" :  \"" << w_ack3_o.read() << "\" ";
        mHdltvinHandle << "}" << std::endl;
        mHdltvoutHandle << "}" << std::endl;
        ap_cycleNo++;
    }
}

}

