Jump to content

ralph.goergen

Members
  • Content count

    135
  • Joined

  • Last visited

  • Days Won

    27

ralph.goergen last won the day on April 6

ralph.goergen had the most liked content!

About ralph.goergen

  • Rank
    Advanced Member

Recent Profile Visitors

396 profile views
  1. Hi. The line you posted shows the wrong order of libs. They should be in opposite order of their dependencies, i.e. first systemc-ams the systemc. The same should be done for the object files. Some compilers expect the correct order for them as well. And are you sure that you compiled both libs (systemc and systemc-ams) with the same compiler and settings? Are you sure that there are no remainders of the gcc4.9 experiments in the libs? Regards Ralph
  2. Converting sc_signal<T1> to sc_signal<T2>

    Hi Roman, Why reference? Because handing over variabels as const reference should be default whenever you don't have a good reason to do something else. When a signal contains a complex data type and not only an int, you do not want to copy it with every read. From your example, I am not sure if I got your scenario well. So, returning a const reference is normally not a problem. It is the same as normal sc_signal does. If your problem is that '*host_ptr' changes without temp_val being updated, you need to get grip on its write or update method and implement a write-through to temp_val. And this leads you to implementing a channel. Actually you did implement something like a primitive channel. So, implementing a full primitive channel that allows to be bound to different types could help. But this requires some thoughts and effort. Or you do it the easy, classical way with an hierarchical conversion channel. I would not expect the performance impact of the additional method to be very critical. In some cases, the additional delta cycle can be more problematic, mainly when this affects the clock edge. In both cases, you can benefit from knowing the direction of data transfer and conversion and reduce effort in comparison to using normal signals. Greetings Ralph
  3. TLM 1.0 => TLM 2.0

    Hi. AFAIK, there is nothing like that. In TLM1 communication is based on fifos. In TLM2 it is sockets and transport calls. This is a big difference. TLM2 is conceptually different and not just a slight improvement over TLM1. What you need is a channel that does the conversion from fifo content to payload and transport calls. This is not straightforward and not possible in a generic way. Greetings
  4. Hi. Using -isystem is OK to specify includes. But the path you give it should point to your SystemC installation. Are the SystemC header files in the idrectory you specified? libs/systemc-2.3.1a/include This is alocal path relative to the location where you do the compiler call. Greetings Ralph
  5. systemC

    Dear Yosri, There are so many issues in your code that it is very hard to discuss and fix it in this forum. Please start with learning some basics about SystemC and C++ first. The following tutorial (I mentioned this already earlier) is good as a starting point: https://www.doulos.com/knowhow/systemc/tutorial/ Many people like the following book to learn more: http://www.springer.com/de/book/9780387699578 For more general C++, you can find hundrefs of books and tutorials in the internet. Greetings Ralph
  6. my first program systemC

    Hi. You can find a good starting point for SystemC at: https://www.doulos.com/knowhow/systemc/tutorial/ In general: in the sc_main function, you should first instantiate your modules and bind the ports. Then you should call sc_start. And, you should not call the process methods explicitly. Greetings Ralph
  7. Hi makiso, Please write down all the indexes (values of j) that will be considered in your nested loop (or use cout to print them). The you will see that you do not go through your array. Or consider using sc_vector and the vector based binding facilities to avoid this problem. Greetings Ralph
  8. Read Memory Acess Violation

    Hi. You cannot have C-style arrays of SystemC objects. This includes ports, modules, and *signals*. Use sc_vector instead. BTW: I think it should be possible to drop an sc_vector in an sc_vector to realize two dimensions. Greetings Ralph
  9. What is the scope of dont_initialize()?

    Hi. Ameya is right. See SystemC LRM (ieee1666) Section 5.2.15: [...] it is associated with the most recently created process instance [...] I.e.: ONE process created most recently before calling dont_initialize is not execute. BTW: No process is executed in the constructor. But all processes, that are not marked as dont_initialize, are evaluated once at simulation start. Greetings Ralph
  10. Hi Sumit. what you are doing here is a hierarchical module. foo is a member, i.e. a submodule of bar. They should not have the same name. If you want bar to be derived from foo, then derive bar from foo instead of sc_module. Then, you instantiation will work. If you want foo to be a submodule of bar, let the derivation as is but fix your initializer lists. You need to forward the name argument to the base class constructor in every class derived from sc_module, i.e. in bar as well. Furthermore, the submodule foo should not have the same name as its parent bar. // constructor Bar(sc_core::sc_module_name name) : sc_module(name) // forward name to base class constructor , foo("foo") // name submodule foo 'foo' { ... Or use the SC_CTOR macro that handles this for you. Greetings Ralph
  11. SystemC-2.3.1a clang build fail

    OK. Thanks. I now saw that there is a comparable guard expression in the sc_cor_pthread.cpp file. But I think changing this needs some more care and investigation. I forward this to the developer community. Greetings Ralph
  12. Hi, You have to forward the module name to the base class constructor: foo(sc_core::sc_module_name name) : sc_module(name) {} Or use SC_CTOR instead. Greetings Ralph
  13. SystemC-2.3.1a clang build fail

    Hi. There seems to be a problem with the '#if defined' expressions. MSYS gcc and clang define _WIN32, and in combination with using pthreads, SC_USE_PTHREADS is defined as well. Could you please evaluate possible fixes? E.g. adding '!defined(SC_USE_PTHREADS)' in line 33 of sc_cor_fiber.h? And could you please try with the public review version of SystemC 2.3.2 as well (http://www.accellera.org/downloads/drafts-review)? If this works, I can try to forward the issue to the SystemC developer working group. Greetings Ralph
  14. Hi. Did you set the time resolution? I think it defaults to pico seconds. See sc_set_time_resolution in the SystemC LRM (IEEE 1666) for details. Greetings Ralph
  15. How about using delta cycles? Their main reason is to bring determinism into concurrent systems. When you notify the event for the next delta cycle with e.notify(sc_core::SC_ZERO_TIME), then it will definitely see all transactions that happened in this delty cycle. Greetings Ralph
×