Jump to content

ralph.goergen

Members
  • Content Count

    145
  • Joined

  • Last visited

  • Days Won

    30

Everything posted by ralph.goergen

  1. Hi. To my impression, the explanation of the callbacks could be more clear about multiple callbacks for one stage. I could not find an explicit statement that is should be possible to register more thean one callback to a single stage. It is mentioned that 'callbacks are invoked in order of registration' which implies having more than one. Mentioning it explicitly could avoid misunderstandings. Greetings Ralph
  2. Hi. While reading through the LRM in the CCI review release, I observed some typos and minor issues. They might be known already, but I wanted to mention them here for completeness. 1. missing '_' in listings The underscore character is not printed in some of the names of types and methods in some listings, e.g. in Section 5.4.1 class cci_originator, 5.4.2 cci_param_if, ... 2. missing ';' in listing in Section 5.4.2.1 No semicolon at end of second line in the get_cci_value listing 3. NULL vs. nullptr Since C++11 is presumed as minimum supported standard, nullptr could be used instead of NULL Greetings Ralph
  3. Hi. I think that the explanation of setting values with password could be improved. void cci_param_if::set_cci_value(const cci_value &, const void* pwd, const cci_originator& orig); There are some statements saying that 'Writes to a locked parameter are rejected'. But with the pwd overload of set_cci_value, it is possible to write to a locked parameter without being rejected. The LRM should be more clear about this: Will the param be unlocked temporarily or not? If not, user needs to be aware that write callbacks can occur and latest originator can change even in locked state. Another aspect is reset: Should it be allowed to reset a locked param without password? Greetings Ralph
  4. ralph.goergen

    LRM: Typos and minor issues

    at 1.: additional investigation showed that the '_' is there but not visible in all pdf viewers. '_' visible in Okular (linux) and MS Word '_' invisible in Adobe Akrobat Reader and Akrobat pro
  5. ralph.goergen

    cannot understand error

    Hi. I guess it is the same as before. The implicit conversion from a signal to the type of the inner value is not supported correctly by the HLS library you are using. The following should help again: T v = v2.read(); Greetings Rlaph
  6. ralph.goergen

    cannot understand error

    Hi. Seems as if the compiler is confused by too many implicit casts. Could you try explicit read: XMT_datareg=data_bus.read(); Should save one implicit conversion and might help. Actual root cause could be in the _ap_sc stuff (synthesizer internals?). Greetings Ralph
  7. ralph.goergen

    Delta Cycle and concurrency

    Hi. Maybe you should have a look at SystemC AMS. It offers the TDF (timed data flow) model of computation. It follows the data flow concept, i.e. you have a cluster of blocks; the solver defines an order of evaluation of each block; and in every time step, the blocks (or modules) are evaluated in that order. The output of one block is immediately visible at the input of the following block. Greetings Ralph
  8. Hi. This seems to be related to SystemC in general and not to UVM. sc_start() - without argument - starts the simulation until there is no activity anymore. No activity means no more events in the event queue. sc_clock generates new events all the time because the value changes independent from everything else in your design. As a result, the event queue will never be empty and the simulation never stops. (For completemess: the simulation ends as well when the maximum time is reached, i.e. the maximum time value that can be represented by sc_time). Normally, there are two ways to stop simulation, either by calling sc_start with a argument or by calling sc_stop. The first has been mentioned already by AmeyaVS. It runs the simulation for the given time and stops. The second can be done for instance from a testbench thread, e.g. from a sequencer when all sequences are done. Greetings Ralph
  9. Hi. Normally the initiator is considered as owner of the payload, i.e. he should take care of allocating and de-allocating it. The target should decide how to use the data. If the target wants to keep it/store it, the target should make a copy of the data. In that sense, the transaction is completed when b_transport returns because the initiator transfered it to the target and the target had a chance to handle it. A benefit of this is that you do not need dynamic allocation of the buffer buf. Greetings Ralph
  10. ralph.goergen

    SC_CTOR initialization error ???

    Hi. You cannot do an array or a std::vector of SystemC modules. Both would require a default constructor which is not available for sc_modules. Use sc_vector instead. See Section 8.5 in the SystemC LRM (IEEE 1666:2011). Regards Ralph
  11. 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
  12. ralph.goergen

    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
  13. ralph.goergen

    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
  14. 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
  15. ralph.goergen

    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
  16. ralph.goergen

    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
  17. 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
  18. ralph.goergen

    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
  19. ralph.goergen

    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
  20. 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
  21. ralph.goergen

    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
  22. 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
  23. ralph.goergen

    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
  24. 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
  25. 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
×