Jump to content

maehne

Members
  • Content Count

    315
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by maehne

  1. You are apparently not debugging the compiled executable, but the C++ source file `main.cpp`. Check the manual of Eclipse CDT on how to configure the IDE for debugging a built program. If I remember correctly (haven't used Eclipse) for some time, it should suffice to right-click on the executable in the project navigator pane and select from the context menu "Execute and debug program" or something similar.

  2. For analogue signal traces, the tabular trace file format is better suited. Creating them is very similar to VCD trace files. You just need to use sca_util::sca_create_tabular_trace_file() and sca_util::sca_close_tabular_trace_file() to respectively open/close these trace files. The typical file extension is ".dat". These trace files can be easily imported in gnuplot, Octave, MATLAB, Excel, and other mathematical tools for plotting / post-processing. Check out IEEE Std. 1666.1-2016 clause 9.1 for details. Tracing is also discussed in Section 6.2 of the SystemC AMS User's Guide.

  3. The cause for the empty VCD file is probably due that you call at the end the wrong closing function sca_close_tabular_trace_file(tfp_vcd) instead of the correct one sca_close_vcd_trace_file(tfp_vcd). As Martin Barnasconi wrote, VCD files are not well suited for tracing TDF, LSF, and ELN signals, because these signals tend to change at each time step. VCD is best suited for discrete event signals.

  4. You don't provide a minimal self-contained code example that exposes your problem. This complicates for an external the analysis of your problem. Also, a plot of the relevant signals would help to understand better, what wrong behaviour you are observing. Anyway, the calculation of the sine argument for x1 and x2 look suspicious to me: The "+" in front of 100 and 200 should probably be a "*" so that it corresponds to the general form of a wave equation x = A * sin(omega * t + phi).

    Also, it is wasteful to recalculate the amplitudes and frequencies in param_gen at each time step. If frequency and phase change discretely with a fixed time step, you may consider to use TDF's multirate feature by simply setting the source outputs in the func block to a much higher rate. Alternatively, you may convert your param_gen block to a SystemC module and use sca_tdf::sca_de::sca_in<double> converter ports for free_in and amp_in. In case you later plan to change amplitude and frequency continuously at the time step used for the wave output, this won't be possible though.

  5. How about connecting all your nodes via the fifos to your communication manager? Then, the communication manager can internally manage how to route data received from the nodes based on your scenario? This would keep the structure of the model static while the actual communication paths change over the course of simulation.

  6. To fix the issue, you can simply create a symbolic link lib-linux64, which points to lib, inside your SystemC installation directory /home/computation/Desktop/systemc-2.3.3-install using:

    cd /home/computation/Desktop/systemc-2.3.3-install
    ln -s lib lib-linux64

    The experimental CMake-based build system distributed with SystemC provides to this end the setting INSTALL_LIB_TARGET_ARCH_SYMLINK. If enabled (default is OFF), the symlink is automatically created during installation of the SystemC library. Ideally, all SystemC-related libraries would provide a CMake-based build system, which would detect SystemC based on the created configuration files. However, this still requires some improvements to SystemC's CMake files to update them to modern CMake conventions and then equivalent enhancements to the build systems of the other libraries. This is a considerable amount of work, we are currently lacking resources for.

  7. Directly editing the Makefiles generated by the GNU autotools is not recommended. You have to set it prior before doing "configure" to ensure the sources are correctly set up.  As C++'11 support is marked as experimental for g++ 5.2.0, it is well possible that its C++ standard library implementation is not complete. I recommend you to try with a more recent C++ compiler, which defaults to C++'11 or later. The accompanying README and INSTALL documents of the libraries list on which platforms the libraries were tested including compiler versions.

  8. GCC 5.2.0 is an old compiler that still defaults to C++'98 even though it contains experimental support for C++'11. "std::enable_if" was introduced in C++'11. Therefore, it may work if you recompile all your SystemC-related libraries and applications with explicitly turned on support for C++'11 by adding "-std=gnu++11" as command line argument to the compiler calls. Most reliable is probably by setting the CXX environment variable.

×
×
  • Create New...