Jump to content

katang

Members
  • Content count

    65
  • Joined

  • Last visited

About katang

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. katang

    Support for C++11/14 in SystemC 2.3.2

    Surely not, I emptied directory "build". The problem here is that I need to use some 3rd-party components. This error message comes up when I attempt to combine some of them with SystemC. BTW: if SystemC builds with any of the C++ standards, what is the reason of enforcing a certain standard? The rest of the world typically does not use it,and as I see, it causes several issues, and at least needs to understand and edit foreign packages, which without this enforcing cooperated perfectly? If you like, you can use compiler switch when configuring SystemC. If you like.
  2. katang

    Support for C++11/14 in SystemC 2.3.2

    In SystemC's CMakeLists.txt file I set set (CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to build all targets. Supported values are 98, 11, and 14.") In my own CMakeLists.txt file I set set(CMAKE_CXX_STANDARD "11") However, my system keeps telling In function `__static_initialization_and_destruction_0(int, int)': /usr/local/systemc-2.3.2/include/sysc/kernel/sc_ver.h:182: undefined reference to `sc_core::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)' I have a newly installed Ubuntu 18.04, and I attempted all variants and tips, for one and a half day. I give up and going back to the previous version.
  3. katang

    Build error with 2.3.2

    Is there any specific reason to test SystemC with a 15-years old standard? And, not testing if at least the "Hello World" can be built with, as given by the example setup test? I do not want either to hunt down and downgrade my sources updated for the new standard or find out if those strange link errors come from version mismatching or they are my own mistake. I have spent some hours with experimenting, then I returned to 2.3.1.
  4. katang

    Build error with 2.3.2

    In my CMake I have the line set(CMAKE_CXX_STANDARD 11) and I did not configure SystemC before building it. I will try to do so. BTW: If that version works with standard 11 only, why is it not preconfigured?
  5. I want to simulate a module, the input signal of which changes externally. In the object I have a port sc_in<int> Address; and in the constructor I have SC_THREAD(InputChanged); sensitive <<Address; dont_initialize(); and the method is void XXX:: InputChanged(void){ wait(SC_ZERO_TIME); // Be sure value asserted cerr << '@' << sc_time_stamp() << ' ' << Address<< endl; } In my testbench file I have sc_signal<int> Address; ... XXX->Address(Address); ... testbench_i->Address = 12; ... wait(150,SC_US); This latter instruction triggers execution of InputChanged, as I wanted. However, if I write out the value of the signal, it prints out the old value, until I precede it with a ' wait(SC_ZERO_TIME);' My questions: 1) at this point, the method is triggered signaling that the value of the input has changed, but reading the value results in the old value. How is it conceptually? (I understand that the effect of writing needs time, so it happens at the end of the delta cycle. But, why triggering of the member occurs earlier, immediately, and specially not synchronized with the change of the value? I myself expected to put ' wait(SC_ZERO_TIME);' after writing the signal, and that InputChanged() is triggered only after that.) 2) To circumvent the problem I used ' wait(SC_ZERO_TIME);' Is it acceptable, or I shall use some rise-time instead? Any better idea? (It is something like a noisy ADC, so reading the exact value is not so critical) 3) May it raise issues that I use SC_THREAD (beause of the wait()), triggered multiple times, rather than SC_METHOD
  6. katang

    Build error with 2.3.2

    Well, I was even not aware of that I am using standards. Even that I can mix them 🙂 BTW: I generated a new system, with the recent G++ and SystemC. I did not expect that I need to edit my source. Thanks for the hint
  7. katang

    Build error with 2.3.2

    It is something different. I am using CMake, i.e. used to work in the build/ subdirectory, with cmake ..; make. If I find difficulties like this, I clear all contents in build/, so I guess it is clean enough.
  8. katang

    sc_time_stamp().value(): bug or feature

    Well, the idea of the time resolution is clear, and it looks like I need to play with C++ formatting to get the result I want. I took the idea from the 'heartbeat' example, where the !period! defaults in this way to the time resolution, i.e. the signal (at least conceptually) changes there and back during the delta cycle.
  9. katang

    Build error with 2.3.2

    As I had difficulties with compiling Hello.cpp with 2.3.1, I have changed to 2.3.3 and attempted to build my app. With some of my application the process runs fine, but one of the presents with the message In function `__static_initialization_and_destruction_0(int, int)': /usr/local/systemc-2.3.2/include/sysc/kernel/sc_ver.h:182: undefined reference to `sc_core::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)' It seems to me that somewhere internally an undefined reference occurs. Am I right? (the build is OK with 2.3.1)
  10. In my program I define #define SCTIME_RESOLUTION 10,sc_core::SC_US and set sc_set_time_resolution(SCTIME_RESOLUTION); The lines are executed cerr << sc_time_stamp() << endl; cerr << sc_time_stamp().value() << endl; with the result 150 us 15 Is it bug (rest of the concept change) or feature (with long time support)? I guess it is the rest of the "default_time_unit" and is not completely what "time_resolution" means. For me a default time unit is what I want to see my time results expected in, and time resolution is what is considered for a delta cycle. In my case, I want to see the results in msecs, with two decimal digits, i.e. in steps of 0.01 ms. Is it possible to format it with SystemC? Especially, to format it with proper fields width for a table?
  11. katang

    A void value confusion

    You are both right. However, I would formulate the error message something like 'You are attempting to use a void value' and would print the location pointer at after the '*' rather than at the beginning of 'value'
  12. katang

    A void value confusion

    I am sorry, the '*' is obsolete here. The error message, however, is strange, I think.
  13. katang

    A void value confusion

    In my testbench void Dendrit_Set(int index, int value) { *mNeuron->dendrit[index].write(value);} protected: Neuron* mNeuron; I receive the error message error: void value not ignored as it ought to be { *mNeuron->dendrit[index].write(value);} ^ The relevant declaration/definition typedef sc_dt::sc_uint<DENDRIT_WIDTH> SC_DENDRIT_TYPE; SC_MODULE(Neuron) { // Ports sc_signal<SC_DENDRIT_TYPE > dendrit[NO_OF_DENDRITS]; What is wrong here? (I simple do not understand the error message)
  14. katang

    A SystemC installl problem on Ubuntu

    Thanks for all replies. In my other environments, I use 2.3.1. So I must upgrade this one or all the others.
  15. I made a new installation on Ubuntu 18.04, and followed instructions in https://howto.tech.blog/2016/11/27/installing-systemc-2-3-1/ Apparently it worked fine, but at the last step it gave the error message $ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello Hello.cpp -lsystemc -lm In file included from Hello.cpp:1:0: /usr/local/systemc-2.3.1//include/systemc.h:120:16: error: ‘std::gets’ has not been declared using std::gets; ^~~~ Is there an error in my install? (SystemC install seemed to run without error message)
×