Jump to content

Elvis Shera

Members
  • Content Count

    23
  • Joined

  • Last visited

About Elvis Shera

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Stuttgart Area, Germany

Recent Profile Visitors

304 profile views
  1. Elvis Shera

    What is SystemC library special in?

    🙂 🙂 I have not notice this. Thank you Ameya
  2. Elvis Shera

    What is SystemC library special in?

    g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-27ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04) nm -C $SYSTEMC_HOME/lib-linux64/libsystemc.so | grep api_version 00000000000bef70 T sc_core::sc_api_version_2_3_3_cxx201402L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201402L(sc_core::sc_writer_policy) 00000000000bef70 T sc_core::sc_api_version_2_3_3_cxx201402L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201402L(sc_core::sc_writer_policy) 00000000003fb440 b sc_core::sc_api_version_2_3_3_cxx201402L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201402L(sc_core::sc_writer_policy)::default_writer_policy_config 00000000003fb444 b sc_core::sc_api_version_2_3_3_cxx201402L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201402L(sc_core::sc_writer_policy)::default_writer_policy_config_seen Thanks for looking at this, Elvis
  3. Elvis Shera

    What is SystemC library special in?

    I did that and it has at least improved the messaging. I also added the following lines: add_library(systemc SHARED IMPORTED) set_property(TARGET systemc PROPERTY IMPORTED_LOCATION "/home/Tools/SystemC/systemc-2.3.3/lib-linux64/libsystemc.so") now the problem i am seeing is the following: [100%] Linking CXX executable scapp CMakeFiles/scapp.dir/src/main.cpp.o: In function `__static_initialization_and_destruction_0(int, int)': /home/Tools/SystemC/systemc-2.3.3/include/sysc/kernel/sc_ver.h:182: undefined reference to `sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)' maybe for the more SystemC experts? Maybe the setup is not there yet as my sc project runs ok with the conventional make approach.
  4. Elvis Shera

    What is SystemC library special in?

    Hi Ameya, here is my file: ========================================================== cmake_minimum_required(VERSION 3.1) # setting this is required project(xor) # this sets the project name SET(TARGET_ARCH "linux64") set(CMAKE_PREFIX_PATH $ENV{SYSTEMC_HOME}) SET(SYSTEMC_INC_DIR "${CMAKE_PREFIX_PATH}/include") SET(SYSTEMC_LIB_DIR "${CMAKE_PREFIX_PATH}/lib-${TARGET_ARCH}") include_directories(${PROJECT_SOURCE_DIR}/inc ${SYSTEMC_INC_DIR}) file(GLOB SOURCES "src/*.cpp") set(CMAKE_CXX_STANDARD 11) # enable C++11 standard set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -c -Wall") add_executable(scapp ${SOURCES}) link_directories(${SYSTEMC_LIB_DIR}) target_link_libraries(scapp systemc) ========================================================== compilation works and it is finding the systemc include files but the linking not yet. As you can see from the error i get. c++: warning: CMakeFiles/scapp.dir/src/monitor.cpp.o: linker input file unused because linking not done you are using find_package in your example which suggest your entire installation of the systemc libraries has been done via cmake. In my case I have not followed the cmake approach hence the find_package is not working in my case.
  5. Elvis Shera

    What is SystemC library special in?

    Thanks Philipp, I already use Makefiles and these are ok. I also understand that via cmake build/install the cmake related configuration are generates so is easier then. My question goes in the direction of: If I don't use cmake to install systemC, how can I still use cmake for a systemc project ? I think I am almost done but the linking part is failing. The Makefile example I reported is already in use and working so the question is how do I translate that information for the Linker in an equivalent description for CMakeLists.txt? It should be trivial but it seems I am missing some steps..
  6. Elvis Shera

    What is SystemC library special in?

    in a manually made Makefile i have the following: # target architecture TARGET_ARCH = linux64 # specify paths SYSTEMC_INC_DIR = $(SYSTEMC_HOME)/include SYSTEMC_LIB_DIR = $(SYSTEMC_HOME)/lib-$(TARGET_ARCH) LDFLAGS = "-Wl,-rpath,$(SYSTEMC_LIB_DIR)" -L$(SYSTEMC_LIB_DIR) -lsystemc -lm the last taking care of the linking phase... I am new to cmake and I can see that is a nice build system but I am having a mental time to specify the same things in the CMakeLists.txt
  7. Elvis Shera

    What is SystemC library special in?

    What if the SystemC installation has not been done via Cmake? There must be a way to locate the libraries (given that systemc has been installed in a local directory) for the linking process. In that case what are the instruction to achieve this ?
  8. Elvis Shera

    SC_THREADS not starting?

    Ok. yes you are right... If I port the code back into the .h file it works... It also seems to be something wrong with the Makefile which is not compiling all the c sources. Maybe this is the real reason. Thanks for your help.
  9. Elvis Shera

    SC_THREADS not starting?

    why 2 declarations? I have a declaration inside the *.h file and the implementation in the .cpp file
  10. Elvis Shera

    SC_THREADS not starting?

    =============================================================================== #include <systemc.h> #include "stimuli.h" int sc_main(int argc, char* argv[]) { // signal connectivity sc_signal<bool> ASig, BSig; // clock signal is generated from the main in this case sc_clock clk("clk", 10, SC_NS, 0.5); // instance of stimuli block stimuli i_stim("Stimulus"); i_stim.A(ASig); i_stim.B(BSig); i_stim.clk(clk); // Tracing Waveforms sc_trace_file *Tf = sc_create_vcd_trace_file("traces"); Tf->set_time_unit(1, SC_NS); sc_trace(Tf, ASig , "A" ); sc_trace(Tf, BSig , "B" ); sc_trace(Tf, clk , "clk" ); // start simulation and run forever (until an sc_stop is called from some processes) sc_start(); // close tracefile sc_close_vcd_trace_file(Tf); // return 0 in case all is OK return 0; } =============================================================================== #include <systemc.h> #include <iostream> using namespace std; SC_MODULE(stimuli) { sc_out<bool> A, B; sc_in<bool> clk; void StimGen(void) {} SC_CTOR(stimuli) { cout << "Constructing Stimuli " << name() << endl; // indication of getting into elaboration phase SC_THREAD(StimGen); // this is like initial process in verilog and is invoked only once sensitive << clk.pos(); } }; =============================================================================== #include "stimuli.h" void stimuli::StimGen() { cout << "Stimuli check point - O" << endl; A.write(false); B.write(false); wait(); // wait() will suspend the proces, SC_THREAD in this case, save the sate and when the simulator will // resume the process it will continue execution after the wait statement. A.write(false); B.write(true); wait(); // wait 1 clock cycle - this is because the clock edge will resume the thread again A.write(true); B.write(false); wait(); // wait 1 clock cycle A.write(true); B.write(true); wait(); // wait 1 clock cycle sc_stop(); // stop the simulation } I am expecting that at least the checkpoint is displayed. Thanks for looking at this.
  11. Elvis Shera

    SC_THREADS not starting?

    This example is very close to the one in the Duolos website.: https://www.doulos.com/knowhow/systemc/tutorial/modules_and_processes/ For me it does not run either. I have tried to compile with --enable_pthread but still it does not compile. I am using SystemC-2.3.3 on ubuntu 18.04. my installation seems good. make check does give all test passing. Instead of SC_METHOD I am using SC_THREAD which is sensitive to the pos-edge of the clock. tracing the waveform I can see the clock is OK. However the SC_THREAD is not executed at all while I expect to at lest execute once. I have wait() statements in the StimGen() function but actually it does not matter as the first instruction is not print something which is not printed at all. Fundamental question here is: Are there reasons for a SC_THREAD to not be executed at all ? Elvis
  12. Ok, that solves the problem of compiling the sources. It is interesting that the same PoC would compile in one machine (RH6) and not compile (compile after the suggestions) in an ubuntu. The only thing which is different is the version of the g++ compiler which in RH6 is older. Are there other things to take into consideration? In addition, at the moment I am running an example which is working in RH6 but is not working on the newer Ubuntu (Simple low-pass filter).
  13. I will try that. Thank you. Question more for the @COSEDA folks. Any idea when we can download the new PoC?
  14. Hi, installing the SystemC-AMS Poc on a new machine with ubuntu-18.04 LTS. All other programs install without issues. SystemC also nicely installing and working. When I try to compile the SystemC-AMS now it gives me error: ========================================================================================================= make[6]: Entering directory '/home/elvis/mProgram/systemc-ams-2.1/src/scams/impl/predefined_moc/tdf' CXX sca_ct_delay_buffer.lo CXX sca_delay_buffer_base.lo CXX sca_tdf_ct_ltf_nd_proxy.lo sca_tdf_ct_ltf_nd_proxy.cpp: In member function 'void sca_tdf::sca_implementation::sca_ct_ltf_nd_proxy::setup_equation_system()': sca_tdf_ct_ltf_nd_proxy.cpp:292:2: error: 'memset' was not declared in this scope memset((void*) (num2_ltf), 0, new_memsize * sizeof(double)); //set all to zero ^~~~~~ sca_tdf_ct_ltf_nd_proxy.cpp:292:2: note: suggested alternative: 'wmemset' memset((void*) (num2_ltf), 0, new_memsize * sizeof(double)); //set all to zero ^~~~~~ wmemset sca_tdf_ct_ltf_nd_proxy.cpp:316:3: error: 'memcpy' was not declared in this scope memcpy((void*) num2_ltf, (void*) num_ltf, num_size * sizeof(double)); ^~~~~~ sca_tdf_ct_ltf_nd_proxy.cpp:316:3: note: suggested alternative: 'wmemcpy' memcpy((void*) num2_ltf, (void*) num_ltf, num_size * sizeof(double)); ^~~~~~ wmemcpy Makefile:491: recipe for target 'sca_tdf_ct_ltf_nd_proxy.lo' failed make[6]: *** [sca_tdf_ct_ltf_nd_proxy.lo] Error 1 ========================================================================================================= I get from other colleagues who try (also in other distributions having issues on the -AMS installation part (never on the SC part). Maybe the SC-AMS folks need to do some more testing over several environments. Does anyone have an understanding on my error? what can i do to fixed it? I have followed the guidelines (as in the other machines/distribution I used it)
  15. Elvis Shera

    SystemC-AMS vs RNM

    When it comes to modelling, you open the door to so many things. There are more options nowadays and It really depends on more things like: what effects/features you want your model to show? Is it a model for verification? is it for IP design? Is it a model you want to deliver to your customer? I don't believe there is one tool for everything. As usual, you need the right tool for the right task. Finally, it depends also on one modelling skills. While is common to talk about design and verification skills. It is also common to forget that modelling requires special skill-sets and understanding. RNM has been for me enough good on many occasions. However, depending on what you want to model it might not be anymore the right tool out there. Can you give an example of an IP you are trying to model and what kind of effects you want to model?
×