Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Elvis Shera

    What is SystemC library special in?

    🙂 🙂 I have not notice this. Thank you Ameya
  4. AmeyaVS

    What is SystemC library special in?

    Hello @Elvis Shera, The G++ Compiler 7.3.0 by default enables C++14, and your SystemC library is build using C++14 standard. You can change the line in your CMakeLists.txt to be: set(CMAKE_CXX_STANDARD 14) # enable C++14 standard and it should work now. Hope this helps. Regards, Ameya Vikram Singh
  5. 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
  6. AmeyaVS

    What is SystemC library special in?

    Hello @Elvis Shera, It seems your SystemC library has been build with different C++ standard flag. Can you post the output of following commands?: # Compiler version you are using g++ -v # Library Properties: nm -C $SYSTEMC_HOME/lib-linux64/libsystemc.so | grep api_version Regards, Ameya Vikram Singh
  7. 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.
  8. AmeyaVS

    What is SystemC library special in?

    Hello @Elvis Shera, It seems the following line seems suspicious: The compiler flag -c is only required by gcc to create object files from translation units. Here's a quote from gcc documentation: For example, the -c option says not to run the linker. Then the output consists of object files output by the assembler. Try removing the option -c and try again. CMake would already handle the scenario internally. Hope this helps. Regards, Ameya Vikram Singh
  9. 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.
  10. AmeyaVS

    What is SystemC library special in?

    Hello @Elvis Shera, Can you post the CMakeLists.txt you have for your example? It would be easier to suggest a solution. But If you want to take a look at minimal example of using CMake throughout for SystemC library, as well as building models you can have a look here: https://github.com/AmeyaVS/SystemC_ramblings/tree/master/src/01_SystemCTest Though to be honest it has been sometime since I have updated these, but basic concept are same. Hope it helps. Regards, Ameya Vikram Singh
  11. Yesterday
  12. 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..
  13. Philipp A Hartmann

    What is SystemC library special in?

    SystemC supports pkg-config as well and generates a corresponding systemc.pc file. Of course, you still need to have the systemc.pc file somewhere in your PKG_CONFIG_PATH. For manual Makefiles, you can check the templates in examples/build-unix as a starting point. Greetings from Duisburg, Philipp
  14. 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
  15. Roman Popov

    What is SystemC library special in?

    In that case you will have to specify library paths manually.
  16. Last week
  17. 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 ?
  18. Roman Popov

    SC_THREADS not starting?

    This is definition: void StimGen(void) {} Declaration should look like this: void StimGen(void);
  19. 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.
  20. Elvis Shera

    SC_THREADS not starting?

    why 2 declarations? I have a declaration inside the *.h file and the implementation in the .cpp file
  21. Roman Popov

    SC_THREADS not starting?

    Your code is wrong, you should get a compiler error, because you have two definitions for stimuli::StimGen. My guess is that you have not added stimuli.cpp to your project file. So it is just ignored. As a result you have empty process void StimGen(void) { /*Do nothing*/}
  22. 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.
  23. Roman Popov

    SC_THREADS not starting?

    Can you provide a complete source code?
  24. 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
  25. DavidLarson

    Validating IPXact

    For 1: You can use the schema files provided by Accellera. Run them with xmllint. For 2: No. Pretty sure there isn't an open-source tool to do that for you.
  26. DavidLarson

    Referencing the memoryMap of a sub-component

    Forget my last question. I believe I figured it out. Now to figure out how to put hdl_paths in a hierarchy....
  27. David Black

    libsystemc-2.3.3.so cannot open shared object file

    Please show results of: ls -l $SYSTEMC_HOME/lib-linux64/
  28. I've been using various types of calling uvm_sequences while developing sequences and every approach works. But I've a doubt what is the best one to be used when compared between using uvm_create, uvm_send and start_item, finish_item. In either cases the type and amount of control on the transactions is the same. Can anyone help me in understanding the differences better? Are there any guidelines to choose a specific style of coding for a given requirement? Thanks
  29. Hello @kallooran, Try setting the environment variable LD_LIBRARY_PATH as mentioned below: export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib-linux64 # or this if the library containing the libsystemc.so is under $SYSTEMC_HOME/lib # export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib Also what is the command line used to build the project? (Example as mentioned below) # e.g.: # Compilation $ g++ -Wall -g -I$SYSTEMC_HOME/include -c main.cpp # Linking $ g++ main.o -L$SYSTEMC_HOME/lib-linux64 -o sim -lsystemc Hope it helps. Regards, Ameya Vikram Singh
  1. Load more activity
×