Jump to content

kid123

Members
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

kid123 last won the day on February 25 2016

kid123 had the most liked content!

About kid123

  • Rank
    Member
  • Birthday 05/22/1994

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

371 profile views
  1. thanks Alan very much. Can you tell me how to combine a RTL and TLM style code in a design, please? I was pretty vague about it
  2. Hi all, Help me a problem, please. I'm working with example on site https://www.doulos.com/knowhow/systemc/tlm2/tutorial__3/ , I have tried generating a vcd file but it's error 1>------ Build started: Project: routing, Configuration: Debug Win32 ------ 1>Build started 06-Mar-16 16:10:45. 1>InitializeBuildStatus: 1> Touching "Debug\routing.unsuccessfulbuild". 1>ClCompile: 1> main.cpp 1>c:\users\giahuy\dropbox\tlm\example\routing\routing\routing\main.cpp(1): warning C4005: 'SC_INCLUDE_DYNAMIC_PROCESSES' : macro redefinition 1> command-line arguments : see previous definition of 'SC_INCLUDE_DYNAMIC_PROCESSES' 1>c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\kernel\sc_macros.h(40): warning C4180: qualifier applied to function type has no meaning; ignored 1>c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\kernel\sc_macros.h(48): warning C4180: qualifier applied to function type has no meaning; ignored 1>c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\kernel\sc_macros.h(68): warning C4180: qualifier applied to function type has no meaning; ignored 1>c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\datatypes\bit\sc_bit_proxies.h(90): warning C4180: qualifier applied to function type has no meaning; ignored 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\datatypes\bit\sc_bit_proxies.h(144) : see reference to class template instantiation 'sc_dt::sc_bitref_r<X>' being compiled 1>c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\datatypes\bit\sc_bit_proxies.h(96): warning C4180: qualifier applied to function type has no meaning; ignored 1>c:\users\giahuy\dropbox\tlm\example\routing\routing\routing\initiator.h(30): warning C4806: '|' : unsafe operation: no value of type 'sc_core::sc_inout<bool>::data_type' promoted to type 'int' can equal the given constant 1>c:\users\giahuy\dropbox\tlm\example\routing\routing\routing\main.cpp(48): error C2259: 'sc_core::sc_trace_file' : cannot instantiate abstract class 1> due to following members: 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,const char **)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(141) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_lv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(132) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(131) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(129) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(128) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(127) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(126) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_unsigned &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(124) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_signed &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(123) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_uint_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(122) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_int_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(121) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const double &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(120) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const float &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(119) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::uint64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(117) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::int64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(116) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(115) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(114) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(113) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(112) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(111) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(110) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(109) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(108) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_logic &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(106) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bit &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(105) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const bool &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(104) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::write_comment(const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(146) : see declaration of 'sc_core::sc_trace_file::write_comment' 1> 'void sc_core::sc_trace_file::set_time_unit(double,sc_core::sc_time_unit)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(156) : see declaration of 'sc_core::sc_trace_file::set_time_unit' 1> 'void sc_core::sc_trace_file::cycle(bool)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(161) : see declaration of 'sc_core::sc_trace_file::cycle' 1>c:\users\giahuy\dropbox\tlm\example\routing\routing\routing\main.cpp(49): error C2259: 'sc_core::sc_trace_file' : cannot instantiate abstract class 1> due to following members: 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,const char **)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(141) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_lv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(132) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(131) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(129) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(128) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(127) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(126) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_unsigned &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(124) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_signed &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(123) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_uint_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(122) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_int_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(121) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const double &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(120) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const float &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(119) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::uint64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(117) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::int64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(116) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(115) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(114) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(113) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(112) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(111) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(110) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(109) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(108) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_logic &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(106) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bit &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(105) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const bool &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(104) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::write_comment(const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(146) : see declaration of 'sc_core::sc_trace_file::write_comment' 1> 'void sc_core::sc_trace_file::set_time_unit(double,sc_core::sc_time_unit)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(156) : see declaration of 'sc_core::sc_trace_file::set_time_unit' 1> 'void sc_core::sc_trace_file::cycle(bool)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(161) : see declaration of 'sc_core::sc_trace_file::cycle' 1>c:\users\giahuy\dropbox\tlm\example\routing\routing\routing\main.cpp(50): error C2259: 'sc_core::sc_trace_file' : cannot instantiate abstract class 1> due to following members: 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,const char **)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(141) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_lv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(132) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bv_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(131) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(129) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxnum &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(128) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval_fast &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(127) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_fxval &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(126) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_unsigned &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(124) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_signed &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(123) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_uint_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(122) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_int_base &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(121) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const double &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(120) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const float &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(119) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::uint64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(117) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::int64 &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(116) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(115) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(114) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(113) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(112) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned long &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(111) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned int &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(110) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned short &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(109) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const unsigned char &,const std::string &,int)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(108) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_logic &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(106) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const sc_dt::sc_bit &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(105) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::trace(const bool &,const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(104) : see declaration of 'sc_core::sc_trace_file::trace' 1> 'void sc_core::sc_trace_file::write_comment(const std::string &)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(146) : see declaration of 'sc_core::sc_trace_file::write_comment' 1> 'void sc_core::sc_trace_file::set_time_unit(double,sc_core::sc_time_unit)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(156) : see declaration of 'sc_core::sc_trace_file::set_time_unit' 1> 'void sc_core::sc_trace_file::cycle(bool)' : is abstract 1> c:\users\giahuy\dropbox\systemc\systemc-2.3.1\src\sysc\tracing\sc_trace.h(161) : see declaration of 'sc_core::sc_trace_file::cycle' 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.49 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" #include "Initiator.h" #include "Memory.h" #include "Router.h" unsigned int Memory::mem_nr = 0; int sc_main(int argc, char* argv[]) { Initiator* initiator; Router<4>* router; Memory* memory[4]; initiator = new Initiator("initiator"); router = new Router<4>("router"); for (int i = 0; i < 4; i++) { char txt[20]; sprintf(txt, "memory_%d", i); memory[i] = new Memory(txt); } // Bind sockets initiator->socket.bind( router->target_socket ); for (int i = 0; i < 4; i++) router->initiator_socket[i]->bind( memory[i]->socket ); sc_signal<bool> a, b, c, d; sc_time t(100, SC_PS); initiator->a(a); initiator->b(; initiator->c(c); //memory.d(d); sc_trace_file *wf = sc_create_vcd_trace_file("and2"); sc_trace_file(wf, initiator->a, "a"); sc_trace_file(wf, initiator->b, "b"); sc_trace_file(wf, initiator->c, "c"); //sc_trace_file(wf, memory.d, "d"); a.write(0); b.write(0); sc_start(t); a.write(0); b.write(1); sc_start(t); a.write(1); b.write(0); sc_start(t); a.write(1); b.write(1); sc_start(t); a.write(0); b.write(0); sc_start(); return 0; } #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" struct Initiator: sc_module { tlm_utils::simple_initiator_socket<Initiator> socket; sc_in<bool> a, b; sc_out<bool> c; SC_CTOR(Initiator) : socket("socket") { SC_THREAD(thread_process); sensitive << a << b; } void thread_process() { int data; c.write(a.read()&b.read()); data = 0xFF000000 | (c | 0x30); tlm::tlm_generic_payload* trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(10, SC_NS); //int i = 5000; //int data; tlm::tlm_command cmd = tlm::TLM_WRITE_COMMAND; //if (cmd == tlm::TLM_WRITE_COMMAND) data = 0xFF000000 | i; trans->set_command( cmd ); trans->set_address( 300 ); trans->set_data_ptr( reinterpret_cast<unsigned char*>(&data) ); trans->set_data_length( 4 ); trans->set_streaming_width( 4 ); // = data_length to indicate no streaming trans->set_byte_enable_ptr( 0 ); // 0 indicates unused trans->set_dmi_allowed( false ); // Mandatory initial value trans->set_response_status( tlm::TLM_INCOMPLETE_RESPONSE ); // Mandatory initial value socket->b_transport( *trans, delay ); // Blocking transport call if ( trans->is_response_error() ) { char txt[100]; sprintf(txt, "Error from b_transport, response status = %s", trans->get_response_string().c_str()); SC_REPORT_ERROR("TLM-2", txt); } cout << " i = " << hex << 300 << " , data = " << hex << data << endl; } }; #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" template<unsigned int N_TARGETS> struct Router: sc_module { tlm_utils::simple_target_socket<Router> target_socket; tlm_utils::simple_initiator_socket_tagged<Router>* initiator_socket[N_TARGETS]; SC_CTOR(Router) : target_socket("target_socket") { target_socket.register_b_transport(this, &Router::b_transport); for (unsigned int i = 0; i < N_TARGETS; i++) { char txt[20]; sprintf(txt, "socket_%d", i); initiator_socket[i] = new tlm_utils::simple_initiator_socket_tagged<Router>(txt); } } virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay ) { sc_dt::uint64 address = trans.get_address(); sc_dt::uint64 masked_address; unsigned int target_nr = decode_address( address, masked_address); trans.set_address( masked_address ); ( *initiator_socket[target_nr] )->b_transport( trans, delay ); cout << "address = " << address << " , masked_adress = " << masked_address << " , target_nr = " << target_nr <<endl; } inline unsigned int decode_address( sc_dt::uint64 address, sc_dt::uint64& masked_address ) { unsigned int target_nr = static_cast<unsigned int>( (address >> 6) & 0x3 ); masked_address = address & 0xFF; return target_nr; } inline sc_dt::uint64 compose_address( unsigned int target_nr, sc_dt::uint64 address) { return (target_nr << 8) | (address & 0xFF); } }; #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" struct Memory: sc_module { tlm_utils::simple_target_socket<Memory> socket; enum { SIZE = 256 }; const sc_time LATENCY; SC_CTOR(Memory) : socket("socket"), LATENCY(10, SC_NS) { socket.register_b_transport(this, &Memory::b_transport); for (int i = 0; i < SIZE; i++) mem[i] = 0xAA000000; } virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay ) { tlm::tlm_command cmd = trans.get_command(); sc_dt::uint64 adr = trans.get_address() / 4; unsigned char* ptr = trans.get_data_ptr(); unsigned int len = trans.get_data_length(); unsigned char* byt = trans.get_byte_enable_ptr(); unsigned int wid = trans.get_streaming_width(); if (adr >= SIZE) { trans.set_response_status( tlm::TLM_ADDRESS_ERROR_RESPONSE ); return; } if (byt != 0) { trans.set_response_status( tlm::TLM_BYTE_ENABLE_ERROR_RESPONSE ); return; } if (len > 4 || wid < len) { trans.set_response_status( tlm::TLM_BURST_ERROR_RESPONSE ); return; } wait(delay); delay = SC_ZERO_TIME; if ( cmd == tlm::TLM_READ_COMMAND ) memcpy(ptr, &mem[adr], len); else if ( cmd == tlm::TLM_WRITE_COMMAND ) memcpy(&mem[adr], ptr, len); trans.set_response_status( tlm::TLM_OK_RESPONSE ); cout << " ptr = " << hex << ptr << " , adr = " << hex << adr << " , mem[" << adr << "] = " << mem_nr << " , " << hex << mem[1] <<" "<< mem[2] << " " << mem[3] << endl; } //int d; int mem[SIZE]; static unsigned int mem_nr; };
  3. Hi all, I just have started with TLM 2.0. I'm trying complete doulos's example but it's fails. I have 2 modules: Initiator and Memory. I want to transmit "data" from Initiator throught Memory, but "trans.get_data_ptr" is fails. I have printed "&data" and "ptr" into monitor but ptr is nothing. #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" #include "Initiator.h" #include "Memory.h" SC_MODULE(Top) { Initiator *initiator; Memory *memory; SC_CTOR(Top) { // Instantiate components initiator = new Initiator("initiator"); memory = new Memory ("memory"); // One initiator is bound directly to one target with no intervening bus // Bind initiator socket to target socket initiator->socket.bind( memory->socket ); } }; int sc_main(int argc, char* argv[]) { Top top("top"); sc_start(); return 0; } #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" struct Initiator: sc_module { // TLM-2 socket, defaults to 32-bits wide, base protocol tlm_utils::simple_initiator_socket<Initiator> socket; SC_CTOR(Initiator) : socket("socket") // Construct and name socket { SC_THREAD(thread_process); } void thread_process() { // TLM-2 generic payload transaction, reused across calls to b_transport tlm::tlm_generic_payload* trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(10, SC_NS); // Generate a random sequence of reads and writes tlm::tlm_command cmd = tlm::TLM_WRITE_COMMAND; if (cmd == tlm::TLM_WRITE_COMMAND) data = 0; // Initialize 8 out of the 10 attributes, byte_enable_length and extensions being unused trans->set_command( cmd ); trans->set_address( 1 ); trans->set_data_ptr( reinterpret_cast<unsigned char*>(&data) ); trans->set_data_length( 1 ); trans->set_streaming_width( 1 ); // = data_length to indicate no streaming trans->set_byte_enable_ptr( 0 ); // 0 indicates unused trans->set_dmi_allowed( false ); // Mandatory initial value trans->set_response_status( tlm::TLM_INCOMPLETE_RESPONSE ); // Mandatory initial value socket->b_transport( *trans, delay ); // Blocking transport call // Initiator obliged to check response status and delay if ( trans->is_response_error() ) SC_REPORT_ERROR("TLM-2", "Response error from b_transport"); cout << " data = " << &data << endl; // Realize the delay annotated onto the transport call wait(delay); } // Internal data buffer used by initiator with generic payload bool data; }; #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" // Target module representing a simple memory struct Memory: sc_module { // TLM-2 socket, defaults to 32-bits wide, base protocol tlm_utils::simple_target_socket<Memory> socket; enum { SIZE = 256 }; SC_CTOR(Memory) : socket("socket") { // Register callback for incoming b_transport interface method call socket.register_b_transport(this, &Memory::b_transport); // Initialize memory with random data for (int i = 0; i < SIZE; i++) mem[i] = 0xAA000000 | (rand() % 256); } // TLM-2 blocking transport method virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay ) { tlm::tlm_command cmd = trans.get_command(); sc_dt::uint64 adr = trans.get_address(); unsigned char* ptr = trans.get_data_ptr(); unsigned int len = trans.get_data_length(); unsigned char* byt = trans.get_byte_enable_ptr(); unsigned int wid = trans.get_streaming_width(); // Obliged to check address range and check for unsupported features, // i.e. byte enables, streaming, and bursts // Can ignore DMI hint and extensions // Using the SystemC report handler is an acceptable way of signalling an error if (adr >= sc_dt::uint64(SIZE) || byt != 0 || len > 4 || wid < len) SC_REPORT_ERROR("TLM-2", "Target does not support given generic payload transaction"); // Obliged to implement read and write commands if ( cmd == tlm::TLM_READ_COMMAND ) memcpy(&ptr, &mem[adr], len); else if ( cmd == tlm::TLM_WRITE_COMMAND ) memcpy(&mem[adr], &ptr, len); // Obliged to set response status to indicate successful completion trans.set_response_status( tlm::TLM_OK_RESPONSE ); cout << " ptr = " << ptr << endl; } int mem[SIZE]; };
  4. thanks Alan for help me, my problem is converted "char" type at *ptr argument into "bool" type at d argument for my vcd file I'll try thank you very much
  5. I have solved some errors. I have done function "do_and" in Initiator but I have not transmited the value of "c" from Initiator through Memory. Help me, please
  6. Hi Alan, I want to transmit the value of 'c' in Initiator through Memory, but the attributes of payload transaction only have "set_data_ptr", I don't know what to do, can you help me, please? I sorry because I'm a beginer
  7. Hi Alan, I have bound the socket in sc_main: initiator.socket(memory.socket); #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" #include "Initiator.h" #include "Memory.h" int sc_main(int argc, char* argv[]) { Initiator initiator("initiator"); Memory memory("memory"); sc_time t(100, SC_PS); sc_signal<bool> a,b,c,d; initiator.socket(memory.socket); initiator.a(a); initiator.b(; initiator.c(c); memory.d(d); sc_trace_file *wf= sc_create_vcd_trace_file("and2"); sc_trace(wf, initiator.a, "a"); sc_trace(wf, initiator.b, "b"); sc_trace(wf, initiator.c, "c"); sc_trace(wf, memory.d, "d"); a.write(0); b.write(0); sc_start(t); a.write(0); b.write(1); sc_start(t); a.write(1); b.write(0); sc_start(t); a.write(1); b.write(1); sc_start(t); a.write(0); b.write(0); sc_start(t); sc_stop(); sc_close_vcd_trace_file(wf); return 0; } And I added an infinite loop inside my do_and thread, but it still fails And if I add the code if ( trans->is_response_error() ) SC_REPORT_ERROR("TLM-2", "Response error from b_transport"); into Initiator, it is error as below #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" struct Initiator: sc_module { tlm_utils::simple_initiator_socket<Initiator> socket; sc_in<bool> a,b; sc_out<bool> c; SC_CTOR(Initiator) : socket("socket") { SC_THREAD(do_and); sensitive << a << b; } void do_and() { while(true) { c.write(a.read()&b.read()); tlm::tlm_generic_payload* trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(10, SC_NS); tlm::tlm_command cmd = tlm::TLM_WRITE_COMMAND; trans->set_command( cmd ); trans->set_address(0); trans->set_data_ptr( reinterpret_cast<unsigned char*>(&c) ); trans->set_data_length( 4 ); trans->set_streaming_width( 4 ); // = data_length to indicate no streaming trans->set_byte_enable_ptr( 0 ); // 0 indicates unused trans->set_dmi_allowed( false ); // Mandatory initial value trans->set_response_status( tlm::TLM_INCOMPLETE_RESPONSE ); // Mandatory initial value socket->b_transport( *trans, delay ); // Blocking transport call //Initiator obliged to check response status and delay if ( trans->is_response_error() ) SC_REPORT_ERROR("TLM-2", "Response error from b_transport"); } } }; regards, Huy
  8. Hi Alan, I very happy when I receive your feedback. I had fixed it, but it is run improperly. It does not perform the fuction "and" in Initiator and does not transmit result from Initiator throught Memory #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" #include "Initiator.h" #include "Memory.h" int sc_main(int argc, char* argv[]) { Initiator initiator("initiator"); Memory memory("memory"); sc_time t(100, SC_PS); sc_signal<bool> a,b,c,d; initiator.a(a); initiator.b(; initiator.c(c); memory.d(d); sc_trace_file *wf= sc_create_vcd_trace_file("and2"); sc_trace(wf, initiator.a, "a"); sc_trace(wf, initiator.b, "b"); sc_trace(wf, initiator.c, "c"); sc_trace(wf, memory.d, "d"); a.write(0); b.write(0); sc_start(t); a.write(0); b.write(1); sc_start(t); a.write(1); b.write(0); sc_start(t); a.write(1); b.write(1); sc_start(t); a.write(0); b.write(0); sc_start(t); sc_stop(); sc_close_vcd_trace_file(wf); return 0; } #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" struct Initiator: sc_module { tlm_utils::simple_initiator_socket<Initiator> socket; sc_in<bool> a,b; sc_out<bool> c; SC_CTOR(Initiator) : socket("socket") { SC_THREAD(do_and); sensitive << a << b; } void do_and() { c.write(a.read()& b.read()); tlm::tlm_generic_payload* trans = new tlm::tlm_generic_payload; sc_time delay = sc_time(10, SC_NS); tlm::tlm_command cmd = tlm::TLM_WRITE_COMMAND; trans->set_command( cmd ); trans->set_address(0); trans->set_data_ptr( reinterpret_cast<unsigned char*>(&c) ); trans->set_data_length( 4 ); trans->set_streaming_width( 4 ); // = data_length to indicate no streaming trans->set_byte_enable_ptr( 0 ); // 0 indicates unused trans->set_dmi_allowed( false ); // Mandatory initial value trans->set_response_status( tlm::TLM_INCOMPLETE_RESPONSE ); // Mandatory initial value socket->b_transport( *trans, delay ); // Blocking transport call // Initiator obliged to check response status and delay //if ( trans->is_response_error() ) //SC_REPORT_ERROR("TLM-2", "Response error from b_transport"); } }; #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" // Target module representing a simple memory struct Memory: sc_module { sc_out<bool> d; enum { SIZE = 256 }; int mem[SIZE]; tlm_utils::simple_target_socket<Memory> socket; SC_CTOR(Memory) : socket("socket") { socket.register_b_transport(this, &Memory::b_transport); } // TLM-2 blocking transport method virtual void b_transport( tlm::tlm_generic_payload& trans, sc_time& delay ) { tlm::tlm_command cmd = trans.get_command(); sc_dt::uint64 adr = trans.get_address() / 4; unsigned char* ptr = trans.get_data_ptr(); unsigned int len = trans.get_data_length(); unsigned char* byt = trans.get_byte_enable_ptr(); unsigned int wid = trans.get_streaming_width(); // Obliged to check address range and check for unsupported features, // i.e. byte enables, streaming, and bursts // Can ignore DMI hint and extensions // Using the SystemC report handler is an acceptable way of signalling an error if (adr >= sc_dt::uint64(SIZE) || byt != 0 || len > 4 || wid < len) SC_REPORT_ERROR("TLM-2", "Target does not support given generic payload transaction"); // Obliged to implement read and write commands if ( cmd == tlm::TLM_READ_COMMAND ) memcpy(ptr, &mem[adr], len); else if ( cmd == tlm::TLM_WRITE_COMMAND ) memcpy(&mem[adr], ptr, len); d.write(mem[adr]); } };
  9. thank Alan for your interest, I've fixed it but it still fails Error: (E100) port specified outside of module: port 'simple_initiator_socket_0' (sc_port_base) In file: ..\..\src\sysc\communication\sc_port.cpp:231 And if I remove these lines of code: tlm_utils::simple_initiator_socket<Initiator> socket1; tlm_utils::simple_target_socket<Memory> socket2; initiator.socket(socket1); memory.socket(socket2); It is an error: Error: (E109) complete binding failed: port not bound: port 'top.memory.port_0' (sc_out) In file: ..\..\src\sysc\communication\sc_port.cpp:231 #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" #include "tlm_utils/simple_initiator_socket.h" #include "tlm_utils/simple_target_socket.h" #include "Initiator.h" #include "Memory.h" struct Top : public sc_module { Initiator *initiator; Memory *memory; SC_CTOR(Top) { initiator = new Initiator("initiator"); memory = new Memory ("memory"); initiator->socket.bind( memory->socket ); } }; int sc_main(int argc, char* argv[]) { Top top("top"); Initiator initiator("initiator"); Memory memory("memory"); sc_time t(100, SC_PS); sc_signal<bool> a,b,c,d; tlm_utils::simple_initiator_socket<Initiator> socket1; tlm_utils::simple_target_socket<Memory> socket2; initiator.socket(socket1); memory.socket(socket2); initiator.socket(memory.socket); initiator.a(a); initiator.b( ; initiator.c(c); memory.d(d); sc_trace_file *wf= sc_create_vcd_trace_file("and2"); sc_trace(wf, initiator.a, "a"); sc_trace(wf, initiator.b, "b"); sc_trace(wf, initiator.c, "c"); sc_trace(wf, memory.d, "d"); a.write(0); b.write(0); sc_start(t); a.write(0); b.write(1); sc_start(t); a.write(1); b.write(0); sc_start(t); a.write(1); b.write(1); sc_start(t); a.write(0); b.write(0); sc_start(t); sc_stop(); sc_close_vcd_trace_file(wf); return 0; } regards, Huy
  10. Hi all, I just working with TLM systemC, I'm trying to complete a simple example, but I got a error: Error: (E100) port specified outside of module: port 'simple_target_socket_0_port_0' (sc_port_base) In file: ..\..\src\sysc\communication\sc_port.cpp:231 Help me in the shortest time, please. My codes is attached below . Thansk all and sorry because my english is not good Initiator.txt Memory.txt main.txt
×
×
  • Create New...