Jump to content

Philipp A Hartmann

Members
  • Content Count

    510
  • Joined

  • Last visited

  • Days Won

    122

Everything posted by Philipp A Hartmann

  1. Hi Ameya, thanks for testing. As said before, unfortunately I cannot reproduce this on my end. I would need more details on the current behavior: The backtrace looks like there is something broken during model teardown. Have you seen other cases? Are all simulations with processes hanging in a similar way? (e.g. can you provide a full regression result?) Greetings from Duisburg, Philipp
  2. Hi Ameya, I currently don't have access to such new Linux platforms, but I may have a suspicion about a potential root cause. Can you please check, if it helps to change the sc_process_b::delete_process function in src/sysc/kernel/sc_process.cpp as follows: // if ( this != sc_get_current_process_b() ) if ( NULL == sc_get_current_process_b() ) Thanks and Greetings from Duisburg, Philipp
  3. This example still uses the positional binding feature of SystemC, which is deprecated as per IEEE Std. 1666 (see Annex C (h), emphasis mine): hth, Philipp
  4. The full data length is independent of the word length. The rules for DATAWORD are defined by the standard as follows (see 14.20.3): From your example below, you seem to be using four byte word, so "unsigned" (or uint32_t) could be a used as a DATAWORD parameter.
  5. Hi Khushi, the best is to look up the definition in the IEEE 1666-2011 standard, section 14.20(.3). The different conversion functions have different constraints associated with them, allowing for more performant implementations for the _word, _aligned, and _single specializations. The _generic one covers arbitrary cases. The DATAWORD template parameter allows for optimizations as well (and endianness is always specific to the notion of a word). Hope that helps, Philipp
  6. Hi Ivan, instead of referring to the very old 2.01. LRM, I suggest to check the IEEE Std. 1666-2011 for SystemC, which could can download at no cost (sponsored by Accellera) via https://standards.ieee.org/findstds/standard/1666-2011.html. This document includes the normative answers to all of your questions. Yes, see section 5.10.8 of the aforementioned standard. Kind of, yes. This is called "time out", see section 4.2(.1) of the standard. The order to execution of processes in the runnable queue is entirely implementation-defined. See section 4.2.1.2. Hope that helps, Philipp Disclaimer: I haven't checked all of your post for correctness and focused on the questions instead. .
  7. Hi Sumit, I re-checked the LLVM issue and it now refers to C++ CWG issue #7 (http://www.open-std.org/Jtc1/sc22/wg21/docs/cwg_closed.html#7), which clearly describes our situation here and shows that the current implementation of tlm_req_rsp_channel<...> is invalid C++ in SystemC (even though only Clang rejects it so far). Without changing the inheritance pattern, the only fix would be to add "friend" declarations to all (indirect) virtual base classes of tlm_put_get_impl<...>, including sc_interface. This is not an option, so I think the internal implementation of the tlm_req_rsp_channel<...> needs to be refactored to avoid the private virtual inheritance. I have opened an issue in the SystemC Language WG bug tracker for this. Greetings from Duisburg, Philipp
  8. SystemC 2.3.2 has been tested successfully with C++03, C++11, C++14 (and even C++17) with various compilers. As mentioned in this thread, the selected C++ standard needs to match between the library build and the application build. This is enforced by the linker error you see. If you continue to run into these errors, make sure to build the SystemC library with the matching C++ standard selection compared to your application (see INSTALL or cmake/INSTALL_USING_CMAKE how to do that).
  9. The 'CMAKE_CXX_STANDARD' is specific to cmake. When you use automake/configure, you can configure the build by passing the '-std=c++11' flag directly to the configure call: ../configure ... 'CXXFLAGS=-std=c++11' Hope that helps, Philipp
  10. SystemC 2.3.2 works fine with C++03, you just need to configure the C++ standard consistently between your application and the library build. In the (experimental) SystemC Cmake build setup, the selection always defaults to C++03, regardless of the default of the compiler. In your application build, you might not explicitly set the C++ standard on the command-line, giving you a different default version from your compiler. The behavior of the SystemC CMake setup could be improved here. Greetings from Duisburg, Philipp
  11. Hi all, you may want to try the attached sc_semaphore.h (requires C++11 to avoid the use of sem_init on MacOS). Hope that helps, Philipp sc_host_semaphore.h
  12. It should be fine to use wait(n) in SC_THREADs (with static sensitivity) as well?
  13. For your particular use case, you can just pass in the clock signal directly: SC_CTHREAD(test_cthread, clkgen); // posedge by default for CTHREADs If you need a negedge triggered process, you can also write the equivalent SC_THREAD instead: SC_THREAD(test_cthread); sensitive << clkgen.negedge_event(); dont_initialize(); Allowing plain events for CTHREAD sensitivity was probably just never needed.
  14. There is an example for catching and re-throwing an sc_unwind_exception in IEEE 1666-2011, clause 5.6.6.6. Hope that helps, Philipp
  15. Hi all, Both sc_get_current_process_b() and get_parent() are non-standard functions that may or may not be supported by (future) versions of your SystemC implementation. I recommend to only use standard IEEE 1666-2011 APIs instead: x sc_core::sc_get_current_process_handle().get_parent_object()->name() x sc_core::sc_get_current_process_handle().name() Greetings from Duisburg, Philipp
  16. For example, the missing operator delete was added in C++14 only (quoting from http://en.cppreference.com/w/cpp/memory/new/operator_delete) : void operator delete ( void* ptr, std::size_t sz ); (5) (since C++14) void operator delete[]( void* ptr, std::size_t sz ); (6) (since C++14)
  17. Yes. Most likely, because your clang-7 installation uses an incompatible C++ standard library. /Philipp
  18. Hi Sumit, can you please share some details on your remark that "it does not compile with -std=c++17"? For me, the SystemC 2.3.2 library and examples compile and run fine with GCC 6.3 and -std=c++17 (no 6.2 installation at hand here). Your linker errors look like you're missing the (matching) C++ runtime libraries in your linker call. Do you configure clang to use libc++ instead of libstdc++? Can you link any other C++ library built with GCC 6.2 to an application built with Clang 7? I would expect that this issue is not specific to SystemC and I would recommend to stick to a single compiler for all artifacts in your application, including SystemC. Hope that helps, Philipp
  19. You can have a look at examples/tlm/common/include/models in the Accellera proof-of-concept implementation for an example interconnect model. Hope that helps, Philipp
  20. The purpose of the initialize() function of the signal ports is to set the value of the bound signal at the beginning of the simulation through the given port.
  21. For hierarchical point-to-point binding, just use plain tlm_initiator/target_sockets on the parent module. You can keep using (tagged) convenience sockets at the leaves. Hope that helps, Philipp
  22. I don't see anything wrong with the code, but I don't have access to this platform. The aarch64 platform support has been contributed newly in SystemC 2.3.2 and has only been tested with GCC 4.5.0 so far. Can you provide more more details about the crash? (e.g. backtrace, build logs for library and application - including all command-line invocations, ...) Do you see any compiler warnings during the library/model build? Does it help to switch to the pthreads-based process implementation (../configure --enable-pthreads ...)? Greetings from Duisburg, Philipp
  23. You cannot bind sockets with different payload classes, as the interfaces are templated over the protocol traits, which include the payload and phase types. So integrating this third-party model would require an adapter in your case. Many use cases can be implemented with (ignorable) extensions, which will avoid this incompatibility and integration burden. As a result, you don't have to write/use a custom adapters, interconnect models, tool integrations, etc. For maximum interoperability with models and tools, you want to follow the (base-protocol) conventions as closely as possible, even for custom protocols. See the different TLM-2.0 compliance categories (IEEE 1666-2011, 9.1). Hope that helps, Philipp
×
×
  • Create New...