Jump to content

maehne

Members
  • Content Count

    232
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by maehne

  1. maehne

    ELN Low pass filter

    Well, you will have to write a test bench, which provides your RC filter with some stimuli for transient simulation or sets up an AC analysis. However, I recommend you to have first a closer look to the fundamental concepts and ideas of SystemC AMS. A good introduction to SystemC AMS is provided by the SystemC AMS extensions User's Guide, which is part of the SystemC AMS extensions 1.0 release. Even though, this discusses only the features available sind SystemC AMS 1.0, it is a good start as SystemC AMS 2.0 and IEEE Std 1666.1 added mainly advanced features related to Dynamic TDF and bug fixes. Also, the SystemC AMS community pages provide some good links to introductory resources to get started with SystemC AMS.
  2. maehne

    tlm_fifo nb_peek

    Thanks for providing this feedback on the SystemC PoC implementation! It would help if you could share some more details about the exact error messages as well as a minimal self-contained example exposing the problem you are observing. Then, we may discuss the issue more seriously.
  3. Thanks for reporting this Aarm64-specific issue! I have forwarded it to the Language Working Group's bug tracker so that we can have a look. Support for Aarm64 in SystemC is relatively new. To help localise the source of the problem, could you try whether it helps to configure SystemC to use Pthreads instead of QuickThreads in addition to `--enable-debug --disable-optimize`?
  4. maehne

    SystemVerilog "program" scope

    It is up to the IEEE P1666 working group to decide, which currently experimental SystemC API features become official part of a future IEEE Std 1666 revision. The companies/people involved in the maintenance of the SystemC PoC simulator are also actively involved in this standardisation effort. The implementation of experimental features into the PoC implementation serve as a testbed to gain experience with them and collect feedback on their functionality, usability, and usefulness and real world applications. That is important input for the standardisation process.
  5. maehne

    A SystemC installl problem on Ubuntu

    If it is necessary for you to stick with SystemC 2.3.1, you can simply comment out the offending line in systemc.h. The function is nowhere used inside the proof-of-concept implementation of SystemC.
  6. Yes, this change in behaviour of SystemC 2.3.2 with respect to SystemC 2.3.1 is intentional to better conform to IEEE Std 1666-2011, which states in clause 6.4.4 about signal writes under the SC_MANY_WRITERS policy: This fix by @Philipp A Hartmann is documented in the RELEASENOTES of SystemC 2.3.2:
  7. maehne

    make check return fail

    @David Black: Did you yet find the time to attempt to fix the sem_init issue on macOS?
  8. maehne

    Static Analyzer Report of SystemC-2.3.2

    Thanks Sumit for reporting these issues! I have reported them to the Language Working Group so that we can try to fix them in the proof-of-concept implementation. Regards, Torsten
  9. maehne

    How SystemC kernel is implemented !!

    Regarding sc_simcontext, this class is not part of IEEE Std 1666-2011! It is an implementation artefact, which should not concern you as a user. The proof-of-concept implementation uses it for house-keeping and managing the global state of the simulation kernel.
  10. maehne

    How SystemC kernel is implemented !!

    If you are interested in the elaboration and simulation semantics of SystemC, have a look to clause 4 of IEEE Std 1666-2011. The simulation semantics are based on the discrete-event model of computation and employ the concept of delta cycles to achieve determinism of the simulation results. This is very close to other hardware description languages such as VHDL. Using your favourite search engine, you can find additional information such as the following two tutorials: John Moondanos "SystemC Tutorial" Federico Angiolini "SystemC Tutorial" which give a brief summary of these semantics and the core ideas of SystemC. Though, please take into account that both tutorials are 10+ years old, which means that certain aspects have evolved considerably. For a good introduction to SystemC, I suggest that you read a good book on the topic, such as "SystemC from the Ground Up" by David Black et al. To efficiently use SystemC, you have to master the core concepts of C++ first.
  11. maehne

    A SystemC installl problem on Ubuntu

    This issue has been fixed in the SystemC 2.3.2 release available from the Accellera website. The function std::gets was definitely removed in the C'11 standard and deprecated in the C++'11 standard so that recent compilers do not provide it anymore as its semantics constitutes a security risk due to buffer overflows.
  12. I am afraid, this is a question, which only @David Black or one of his co-authors of the book can answer. As far as I can remember, I could never find the advertised online material under the URL mentioned in the book. Nevertheless, I still consider it one of the best books on the topic of SystemC.
  13. maehne

    make check return fail

    Thanks for your analysis David! I have reported this issue to the SystemC Language Working Group.
  14. maehne

    fifo waveform tracing

    You need to be more precise in your problem description! You did not post the exact error message you might have obtained nor is your code example complete and self-contained. Therefore, any answer by us is mostly based on wild guessing. Please note that you will only actually see traces in your VCD files if actually events happened during your simulation. If your sc_module example constitutes your Design Under Verification, you are missing at least in the posted code snippet some stimuli generator, which would trigger any events. I suggest you that you get familiar with C++ and then start with a good introduction tutorial / book on SystemC before pursuing your own modeling attempts.
  15. maehne

    systemc-2.3.2 with C++17

    Hello Sumit, for compiling SystemC using CMake for C++'17, you will have to specify the C++ language standard version through the variable CMAKE_CXX_STANDARD. The value "17" is only supported since CMake 3.8. If you are still using an older version, this might explain your compilation problems. Enable verbose output for your build system to check which flags are effectively passed to your compiler. Passing the C++ standard version via the "-std=c++17" compiler switch ist more fragile when using CMake, as the latter might add conflicting additional flags. Regards, Torsten
  16. Let me be clear: You don't need to provide -DSCV_DISABLE_USING_NAMESPACES during the compilation of the SCV library itself. You only pass -DSCV_DISABLE_USING_NAMESPACES once you compile your application and link it to the SCV library.
  17. Hello Sumit, Do you mean that you specified -DSCV_DISABLE_USING_NAMESPACES explicitly when compiling the SCV library itself? The preprocessor definition SCV_DISABLE_USING_NAMESPACES is only meant for use in user applications, i.e., you need to pass when compiling your own code. See the RELEASENOTES section 2 for details. When we first prepared the SCV 2.0.1release, we didn't want to import the std namespace by default, but it caused too much trouble with existing code bases, which lead to this ugly method to opt out of it.
  18. maehne

    system c beginner

    First, make sure that you are proficient in C++ as SystemC is a C++ library, which makes extensively use of advanced C++ features! Then, read a good introductory book on SystemC. I am personally not familiar with the SystemC Primer so cannot judge it. I found the book "SystemC from the Ground Up" by David C. Black, Jack Donovan et al. very helpful to learn SystemC.
  19. Newer compiler versions usually are accompanied by a newer implementation of the standard library. This newer version might have been optimised to reduce side-effects when including a standard header, i.e., to only include definitions that are mandated by the standard and to reduce as much as possible the inclusion of other headers, which are only needed for the implementation of its functions. Another thing, which might affect you is that newer compilers might use a newer C++ standard by default, e.g., C++'14 or C++'11. SystemC 2.3.2 already contains functions, which make use of C++'11/14 features. If this is not the default C++ version for your compiler, you must make sure that SystemC AMS and your models get compiled with the same compiler flags, i.e., also against the same C++ version. Regarding your simple SystemC AMS example: You will have to provide more information, i.e., a minimum self-contained code example plus the compiler messages so that we may help you.
  20. The compilation issue, which you describe is not a platform-dependent issue. I guess that you are compiling the SystemC AMS 2.1 PoC against the later released SystemC 2.3.2 PoC implementation. The latter contains many bug fixes and clean-ups, one of which is according to the RELEASENOTES: The memset() and memcpy() are defined in the header <cstring>. This means that the issue can be easily fixed by adding "#include <cstring>" in line 41 of systemc-ams-2.1/src/scams/impl/predefined_moc/tdf/sca_tdf_ct_ltf_nd_proxy.cpp: #include "scams/impl/predefined_moc/tdf/sca_tdf_ct_ltf_nd_proxy.h" #include "scams/impl/core/sca_simcontext.h" #include "scams/impl/solver/util/sparse_library/linear_analog_solver.h" #include <cstring> // needed for memcpy() and memset() namespace sca_tdf { namespace sca_implementation { If you still have compilation errors, add the std:: namespace prefix to the calls of memset() and memcpy(). This issue will go away once COSEDA releases a new version of the SystemC AMS PoC, which does not rely anymore on the implicit inclusion of <cstring>, i.e., has been tested agains SystemC 2.3.2.
  21. As my quotes from the LRM show: It is not forbidden, but strongly discouraged. Therefore, a SystemC implementation may issue a warning if the module hierarchical is not respected, but it is not required to do so. The proof-of-concept implementation of SystemC currently doesn't do this.
  22. maehne

    define sc_main in VS 2017

    It is correct that your SystemC application compiles and runs correct if you leave the default entry point at main() and provide yourself only sc_main(). This is by design, as you can read up in clauses 4.2 and 4.3 of IEEE Std 1666-2011. Subclause 4.3.2 states: The SystemC library provides a main() function, which calls sc_elab_and_sim(), and which in turn then calls the sc_main(), which you have to provide to set up your model and control elaboration and simulation.
  23. Yes, in SystemC AMS, as in other analog/mixed-signal simulators, good precision usually requires the setting of a small enough simulation time step. As a rule of thumb, you should set the time step in a cluster of connected TDF/ELN/LSF modules such that the signal with the highest occurring spectral frequencies is sampled with at least 5 to 10 samples per period of the highest frequency for moderate accuracy and about 20 samples per period for good accuracy. Does your configured module time step respect this with respect to the cut-off frequency and selected input signal? For best simulation performance, you module srcs and sample should be connected via TDF ports and TDF signals and not via TDF<->DE converter ports and DE signals. Then, you can profit from the fact that the srcs and sample module will end up in the same static TDF schedule, which is executed by the SystemC AMS simulation kernel. I would also recommend that you don't include the SystemC/SystemC-AMS headers using <systemc.h> and <systemc-ams.h> as this pollutes the public namespace. Instead, prefer the recommended headers <systemc> and <systemc-ams>.
  24. maehne

    User Guide for systemc 2.3.2

    I totally agree that it would be great if the example code from the "SystemC: from the ground up" book would be made available again on the internet. It is best to ask @David Black for that as he is one of the authors of the book. By the way, the second edition of the book has its own homepage: http://scftgu.com/ Unfortunately, it doesn't provide an archive with the example code sources either.
  25. I suggest that you read in IEEE Std 1666-2011 the introduction to the socket concept in clause 10.4 and then the rules for: multi-sockets in clause 16.1.4.4 tlm_base_initiator_socket and tlm_base_target_socket in clause 13.2.4 of. ports in clause 5.12.4 exports in clause 5.13.4 Initiator sockets are derived from a port for interface method calls on the forward path and has an export for interface method calls on the backward path. For target sockets it is vice versa. Therefore, when you bind() sockets, the bind actually happens on the port and export. That's why the constraints on usage for ports and exports apply. For sc_port the following paragraph is relevant: For sc_export it is: Therefore, your example may not generate an error during compilation and elaboration, but may still disrespect the normal discipline of the module hierarchy.
×