Jump to content

maehne

Members
  • Content Count

    249
  • Joined

  • Last visited

  • Days Won

    31

maehne last won the day on November 1 2018

maehne had the most liked content!

3 Followers

About maehne

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Burgdorf, Switzerland

Recent Profile Visitors

1,634 profile views
  1. maehne

    SystemC 2.3.3 Msys2 and MinGW64 compile problem

    Your calls to the configure script don't include the option --prefix to specify the destination directory for installation. This is strongly recommended as the SystemC installation layout does not match well with the standard Unix directory layout for a conflict-free installation. Personally, I prefer to install SystemC on Unix-like platforms to /opt/systemc-2.3.3 (or similar). After make install, you can make sure that the include and lib-* directory below the prefix contains the necessary files. When building against this SystemC version, you will have to pass the proper include and linker flags. I recommend that you read the INSTALL and RELEASENOTES files, which are part of the SystemC PoC implementation. You may also consider to use the experimental CMake-based build system instead of the autotools.
  2. maehne

    primitive port that responds to sensitivity ???

    Before implementing your own ports and attempting to modify the SystemC code, you should first get familiar with the basic concepts and capabilities of SystemC. I suggest that you read a good introductory text to SystemC, e.g., "SystemC from the Ground Up" by David Black et al. That said, your requirement description seems to indicate that you could achieve the wanted functionality by using simply the standard SystemC ports and signals: One instance of sc_core::sc_out<T> in some module, which drives the global signal of type sc_core::sc_signal<T> that is bound to it during elaboration. And n port instances of sc_core::sc_in<T> bound to the same signal. You can then make some SC_METHOD or SC_THREAD in the module which instantiates one or several of this in ports to be sensitive to changes on this/these ports.
  3. The SystemC libraries and their associated headers are usually not installed into the standard locations (/usr/lib/ and /usr/include/), where they would be found automatically by the compiler and linker. Instead, they are typically installed into their own directory hierarchy, e.g., below /opt/systemc-2.3.1/. Therefore, you need to indicate their location explicitly to the compiler and linker by passing the appropriate flags, e.g.: $ c++ -o my_tb my_tb.cpp -I/opt/systemc-2.3.1/include -L/opt/systemc-2.3.1/lib-linux -lsystemc Due to this, you also usually include the SystemC header using #include "systemc" to indicate that it is not a standard system header. I suggest that you first test your SystemC installation by compiling, linking, and running a pure SystemC example (e.g., the single-file simple_perf example, which is distributed as part of the SystemC PoC implementation in the directory examples/sysc/simple_perf/). From your questions, it seems that you are not particularly familiar with C++ and the associated toolchains. I would recommend that you first learn about them before focusing on SystemC and then Nigram.
  4. maehne

    SystemC 2.3.0 with main()

    Either you as the library author or the user of that library will need to provide at least an empty implementation of sc_main() to satisfy the linker. There is no way around it. I would like to also suggest that you update your SystemC installation to the latest version 2.3.3.
  5. maehne

    Checking ports for power estimations

    value_changed_event() returns a constant reference to an sc_core::sc_event. A SystemC method or thread can be made sensitive to that event to get activated each time the corresponding sc_event gets notified. Easiest would be to connect your sc_signals to matching sc_in port of a dedicated module, which sets up the method or thread responsible for counting your bit changes. I recommend that you read a good introduction to the basic concepts of SystemC, e.g., David C. Black et al. "SystemC from the Ground Up", 2nd ed. The SystemC elaboration and simulation semantics are also described in clause 4 of the freely available IEEE Std 1666-2011. If you are not yet much familiar with C++ itself, it might be a good idea to get first familiar with the fundamental concepts of C++ first.
  6. The implementation of the TLM proof-of-concept library depends on SystemC. Therefore, you will need to link your application, which makes use of TLM, to the SystemC library. You can check it yourself by looking into the corresponding TLM headers: They include headers that are part of the SystemC implementation. Furthermore, the TLM implementation is not anymore header-only. The compiled .cpp implementation files are directly linked into the SystemC library file.
  7. maehne

    2.3.3 CMake bug

    Thanks for reporting this bug! I forwarded it to the SystemC Language Working Group, so that it can be fixed for the next release of the SystemC proof-of-concept library.
  8. @AvritSase: Your answer is unrelated to the issue discussed in this thread.
  9. Glad I could help! You have grasped the idea correctly.
  10. To achieve activation of your TDF controller only once per 5 activations of the valve and water tank modules, you will need to assign in addition to the time step also consistent rates to the TDF ports. E.g., you could assign to the TDF controller outputs command and threshold a rate of 5. Then, the connected valve and water tank modules will be activated 5 times per activation of the controller. As then the water tank will also output 5 times a water level sample to be read by the controller module, you will also need to assign a rate of 5 to the controller's input port. At this point, the TDF cluster is still not schedulable, as you have a feedback loop, which requires the insertion of a proper number of delay samples to achieve causality. To this end, you could, e.g., assign a delay of 5 to the controller input. For better understanding of the basic concepts of TDF modeling, I strongly suggest that you read at least the section 2.1 "Modeling fundamentals" of the SystemC AMS User's Guide available from the Accellera website.
  11. @Martin Barnasconi is of course right about that there is no SCA_ELN_MODULE macro defined in the SystemC AMS standard, as it is currently not possible to define own primitive ELN modules. Personally, I prefer to avoid the use of preprocessor macros in C++ as much as possible -- especially when a fully equivalent concise proper C++ syntax exist. In the context of SystemC (AMS) the macros SC_MODULE, SCA_TDF_MODULE, SC_CTOR, and SCA_CTOR obfuscate in my humple opinion more the code than they help to render SystemC models more readable. Your class LifELN is very probably a class derived from sc_core::sc_module (SC_MODULE) and which contains the netlist of your ELN model (i.e., a circuit of ELN primitives). The time step needs to be set always on at least one instance of a primitive SystemC AMS module, which is part of a cluster of connected SystemC AMS primitive modules. Therefore, your second approach: is the correct one.
  12. I have forwarded your issue to @karsten from COSEDA Technologies, as he is the principal author of the SystemC AMS PoC implementation.
  13. Thanks for reporting these compilation issues! These will need to get addressed by the COSEDA Technologies GmbH with a new SystemC AMS release. In the meantime, you can fix the compilation issue by replacing: pobj->sca_name() with this->name() The calls to memcpy() and memset() need to get prefixed with the std:: namespace prefix. The "register" storage class specifiers can be safely removed. If I see it correctly, they are only remaining in file scams/impl/analysis/ac/sca_ac_domain_entity.cpp.
  14. You seem to use the right approach of using an SC_MODULE to describe the structure of your circuit of ELN primitives. The macros SCA_ELN_MODULE and SCA_TDF_MODULE are exclusively used to define primitive modules in the respective MoCs, which describe the behaviour of the primitive, but not their inner structure. The statement from the SystemC AMS LRM regarding setting the time step refers to the set_timestep() member function, which is offered by all SystemC AMS primitive modules. To keep my models flexible, I tend to prefer to set the time step from the test bench or top level module by calling the set_timestep() member function of one of the accessible primitive AMS modules in that scope, i.e., usually a stimuli source. E.g., if you have instantiated a sca_eln:sca_vsource src1("src1", 2.0); you would call src1.set_timestep(10.0, sc_core::SC_US); to set the time step of the module src1 and the connected ELN cluster to 10 us. I hope that this answers your primary question. I definitely recommend you to read the SystemC AMS User's Guide to get a better insight into the fundamental concepts of SystemC AMS. It is an unfortunate situation that it is currently so hard to find as it is only provided as a bundled download together with the outdated Accellera SystemC AMS 1.0 standard. You can download it from the Accellera's SystemC standards page, where it is listed as "AMS 1.0" in the "Previous releases" section. The statements from this User's Guide are still relevant. It only lacks discussion of the advanced Dynamic TDF modelling features, which were added in SystemC AMS 2.0 and are also part of IEEE Std 1666.1-2016. Unfortunately, efforts to update the user's guide to the current SystemC AMS standard version got stalled due to lack of time of the involved people in the working group.
  15. maehne

    tlm_socket_base_if

    Thanks for the clarification and feedback on the fix suggested by Philipp!
×