Jump to content

Roman Popov

  • Posts

  • Joined

  • Last visited

  • Days Won


Roman Popov last won the day on September 7 2020

Roman Popov had the most liked content!

Profile Information

  • Location
    .Hillsboro, Oregon

Recent Profile Visitors

2,009 profile views

Roman Popov's Achievements

Advanced Member

Advanced Member (2/2)



  1. Do you have SystemC compiled as DLL? Otherwise you have same issue as described here : https://forums.accellera.org/topic/6540-inserting-existing-software-into-tlm-frame/
  2. Many commercial SystemC tools have SystemC-specific profilers measuring runtimes of SC processes. On Windows I usually use Visual Studio built-in profiler. I don't have experience with profiling on Linux.
  3. In general, you can use profiler tool to understand where hotspots are. Your code snippet is incomplete, so it is impossible to say anything.
  4. Each shared library or executable has its own copy of static variables. So, if part of your application links SystemC dynamically, and other part links SystemC statically, the result is that you have 2 conflicting SystemC kernels in your application. So you have two options: - Use shared SystemC library everywhere - Use static linking everywhere
  5. Well, compiler error is self-explanatory. I see this particular issue is fixed even in SystemC 2.3.0
  6. SystemC 2.2 is quite old, may be incompatible with modern compilers. Why not to use SystemC 2.3.3 ?
  7. I see at least 1 bug in code sample: for (auto val : var.read()) here you create copies of vector elements on a stack of your function. And then pass references to them into SystemC kernel. So those will be dangling references one you return from your sc_trace overload. Change to: for (auto & val : var.read())
  8. Compiler already shown you where is the error and how to fix it. SystemC is a C++ library, you will need to learn C++ and get comfortable with g++ compiler before digging into SystemC.
  9. VCS invokes g++ automatically. But this is correct, sc_main is missing.
  10. This is correct, you cannot trace dynamic data structure. This is not even a SystemC limitation, but limitation of VCD waveform dump in general. VCD does not allow to add/remove signals to waveform dynamically. So usually you have two options : 1) If maximum capacity is known in advance and is small, you can create your own "list" that utilizes statically sized array as a storage: template<typename T> struct my_list_item { bool has_value = false; T value; } template<typename T, size_t MAX_SIZE> class my_list { std::array<my_list_item, MAX_SIZE> storage; // ... } 2) If maximum size is large or unknown, but it is sufficient for you to trace only head and tail of the list, you can have a copy of tail and head that is updated on every push and pop: class my_list { std::list<T> storage; my_list_item head_copy; my_list_item tail_copy; //... custom push pop }
  11. Looks like XY problem to me. If you need pointer to event, use pointer.
  12. Interesting, I'm not an expert in CMake, but even with existing CMakeLists.txt when I build my application SystemC include directory is recognized automatically as system headers: And as a result I don't receive any warnings about issues in SystemC headers.
  13. You forgot ";" here: using namespace std;
  14. Then I have no idea. Set breakpoint on this report and analyze why it gets there. From my perspective your code sample should work without Warnings.
  15. I've reproduced the issue on Centos7. Preliminary it looks like a misuse of mprotect on memory allocated with new. So as a workaround commenting out stack protection section should work. Since I don't have enough linux system programming expertise I will bring it to accellera wg discussion before submitting a fix to systemc repo. Thanks a lot for reporting this and spending your time on investigation!
  • Create New...