hlslibs / matchlib_connections

Matchlib Connections Library - latency insensitive channels (from NVlabs/matchlib/connections)
Other
35 stars 9 forks source link

Bugs in connections.h #2

Open matthew-mx opened 4 months ago

matthew-mx commented 4 months ago

Hello, I have met some bugs at connections.h:4971

#ifdef CONNECTIONS_SIM_ONLY
      driver = 0;
      //SC_METHOD(do_bypass);
      declare_method_process(do_bypass_handle, sc_gen_unique_name("do_bypass"), SC_CURRENT_USER_MODULE, do_bypass);
      this->sensitive << _DATNAMEIN_ << this->_VLDNAMEIN_ << this->_RDYNAMEOUT_;
#endif

However, in the newest systemC, the func is defined as this:

void
sc_module::declare_method_process( sc_entry_func func, const char* name )
{
    sc_process_handle handle =
      simcontext()->create_method_process( name, false, func, this, 0 );
    sensitive << handle;
    sensitive_pos << handle;
    sensitive_neg << handle;
}

Moreover, do_bypass_handle and SC_CURRENT_USER_MODULE are not declared. Thanks!

matthew-mx commented 4 months ago

I find old version of systemC matches connections.h

#define declare_method_process(handle, name, host_tag, func)        \
    {                                                           \
        ::sc_core::sc_process_handle handle =                      \
        sc_core::sc_get_curr_simcontext()->create_method_process( \
        name,  false, SC_MAKE_FUNC_PTR( host_tag, func ), \
        this, 0 ); \
        this->sensitive << handle;                                        \
        this->sensitive_pos << handle;                                    \
        this->sensitive_neg << handle;                                    \
    }