Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by AmeyaVS

  1. AmeyaVS

    Behavioral XOR Gate with Delay

    Hello @re1418ma, You can look at this example: http://forums.accellera.org/topic/5678-clock-to-q-propagation-delay/?do=findComment&comment=13657 Or this one which shows how to add delay in full adder: http://forums.accellera.org/topic/5715-delaying-simulated-execution/?do=findComment&comment=13844 Hope it helps. Regards, Ameya Vikram Singh
  2. AmeyaVS

    Behavioral XOR Gate with Delay

    Hello @re1418ma, This has been already discussed before here: http://forums.accellera.org/topic/5715-delaying-simulated-execution/ Hope it helps and if you have further questions please feel to ask. Regards, Ameya Vikram Singh
  3. Hello @Philipp A Hartmann, It seems to be an issue with this test scenario.(systemc/1666-2011-compliance/living_dead_bug) I tried running the regression test suite on another system and except for this test, all the other tests passes. Regards, Ameya Vikram Singh
  4. Hello everyone, Has anyone faced issues with Linux Build for SystemC 2.3.2 configured with PThreads as the threading library backend? I have configured the SystemC library using the following command: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/apps/systemc-2.3.2 -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=OFF -DENABLE_PTHREADS=ON -DENABLE_PHASE_CALLBACKS=ON .. # Then followed by make # make check # and make install I having issues with the SystemC kernel getting stuck in deadlock. I am currently working on Ubuntu 18.04 using g++: g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Though I do not experience such issues with the QuickThreads back-end, but for now I need SystemC kernel with PThreads support. I have attached the back-trace of a minimal example/regression test from the test-suite which triggers this behavior:(systemc-regressions-2.3.2) TEST : systemc/1666-2011-compliance/living_dead_bug/living_dead_bug.cpp (11/871) Note: This behavior is also observed with SystemC 2.3.1a release. Best Regards, Ameya Vikram Singh SystemC.RaceCondition.GDB.BackTrace.txt
  5. Hello @Philipp A Hartmann, I have probably seen this behavior in other regression tests also. But currently I do not recall all of them, this one was the first one to deadlock. I will try to run the regression test-suite with individual tests and post the results whenever I get a chance. Thanks and Regards, Ameya Vikram Singh
  6. Hello @Philipp A Hartmann, Thank you for your reply. Unfortunately even after applying the changes the issue still persists. In-case you need more inputs do let me know. Thanks and Regards, Ameya Vikram Singh
  7. Hello @Roman Popov, It seems the issue is consistent with multiple different Linux OS with recent versions of GLIBC. From what I could figure out was the internal implementation for pthread mutex and condition variables have been updated. I will try to find the discussion on the same, but for now I think it would be better if someone from working group could also provide some insight into the issue. Regards, Ameya Vikram Singh
  8. AmeyaVS

    SystemC 2.3.2 on Ubuntu 18 and Eclipse

    Hello @RaviS, You can download the Latest Eclipse package from their website which does work on Ubuntu 18.04. Eclipse CDT download the package most pertinent to your system.(e.g. Ubuntu 64-bit download the Linux 64-Bit package.) The Eclipse IDE is very well supported on latest Linux Environments. Regards, Ameya Vikram Singh
  9. Hello @Roman Popov, I did try it on Ubuntu 16.04 with GCC 5.4.0, and currently I do not observe this behavior. Probably some regression in the base system, I will try to narrow it down once I get some time. I just wanted to give a heads-up in-case there is an issue with the SystemC kernel. Since, most of the application packaged on these Linux systems do get some form of regression testing. Regards, Ameya Vikram Singh
  10. AmeyaVS

    Build error with 2.3.2

    Hello @katang, Did you set the CXX_STANDARD in CMakeLists.txt? Here is an example: https://github.com/AmeyaVS/SystemC_ramblings/blob/master/src/01_SystemCTest/CMakeLists.txt Also while building SystemC 2.3.2 did you configure it with -DCMAKE_CXX_STANDARD=11? Hope it helps. Regards, Ameya Vikram Singh
  11. AmeyaVS

    Build error with 2.3.2

    Hello @katang, It seems you have mixed C++ standard in your build system. Please have a look here: Hope it helps. Ameya Vikram Singh
  12. AmeyaVS

    SystemC code running with testbench

    Hello @ssingh.codesupport, There are multiple issues here. It would really good if you can go through the following discussions and develop an understanding about the SystemC simulation workflow. In-case you still have questions you can post you queries here. Hope it helps. Regards, Ameya Vikram Singh
  13. AmeyaVS

    A void value confusion

    Hello @katang, The compiler message is quite right as mentioned by @Eyck. The Compiler sees the code something like this: void Dendrit_Set(int index, int value) { *(mNeuron->dendrit[index].write(value)); } Basically the operator precedence is at play here(refer here for more details). Compiler sees that you are trying to dereference a void type, since the write method of the sc_signal returns void. Hope it helps. Best Regards, Ameya Vikram Singh
  14. AmeyaVS

    A SystemC installl problem on Ubuntu

    Hello @katang, Is there a specific reason for using SystemC 2.3.1 release? This issue has already been fixed in the SystemC 2.3.2 release as mentioned by @maehne. Best Regards, Ameya Vikram Singh
  15. AmeyaVS

    VCD dump with Hierarchy systemc-2.3.2

    Hello @kjhyland, While adding signals using sc_trace did you provide the hierarchical names of the signals? Best Regards, Ameya Vikram Singh
  16. AmeyaVS

    make check return fail

    Hello @LookBad, Sorry, I don't have a macOS environment readily available with me. Maybe someone else might be able to help you with that, or better would be if you could use a Linux VM for exploration. Regards, Ameya Vikram Singh
  17. AmeyaVS

    How to update the signal writing with same value

    Hello @SANDESH M K, You are probably looking for sc_buffer<T>. sc_buffer will generate the event notification for every write performed. Hope it helps. Regards, Ameya Vikram Singh
  18. AmeyaVS

    make check return fail

    Hello @LookBad, Can you provide some environment details? e.g.: OS, Compiler version etc. Regards, Ameya Vikram Singh
  19. Hello @YashJ, It is expected behavior. Here is a brief explanation: //... // Find the inline comments: while(true){ wait(); //< Wait for default event sensitivty(static sensitive event!). In you case it is in.value_changed() cout<<"\nIN = "<<in.read()<<" TIME" <<sc_time_stamp()<<endl; inter.write(in.read()); //< Write to the inter signal -> which means schedule and event for updating the sc_signal. cout<<"\nInter before wait= "<<inter.read()<<endl; wait(10,SC_NS); //< Relinquish control to the SystemC scheduler -> perform evaluate and update phase for all event scheduled. (Change sensitivity to dynamic scheduled after 10 ns) out.write(inter.read()); //< inter has the new value assigned at 3 lines before this statement. cout<<"\nInter after wait= "<<inter.read()<<endl; cout<<"\nOUT = "<<out.read()<<" TIME" <<sc_time_stamp()<<endl; cout<<"\nIN when outed = "<<in.read()<<endl; } ///.... Hope it helps. Regards, Ameya Vikram Singh
  20. AmeyaVS

    SystemC basic tutorial and examples

    Hello @ajinkya_bankar, Can you let us know what all have you tried? and also, what is it you are looking at SystemC for RTL design or high-level modelling? Most of the examples though dated, require minimal changes to be fully functional, and you can quickly update them to Did you look at examples directory within the SystemC open source implementation available here. If you looking at SystemC RTL design then probably this book: SystemC Primer would be good though also a bit dated. In-case you are looking for using SystemC for high-level modelling your a find these references to be quite useful: SystemC: From Ground Up (Second Edition) SystemC Language Reference Manual(LRM) Hope these resources help. Regards, Ameya Vikram Singh
  21. Hello @sumit_tuwien, You can turn off the G++ extensions using the CMake command-line option: # Enable C++11 compilation flag # -DCMAKE_CXX_STANDARD=11 # Disable C++ Compiler Extensions # -DCMAKE_CXX_EXTENSIONS=OFF cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_INSTALL_PREFIX=<Path to install location> .. You can find a reference here. Can you also list the version and platform information of the tools you are using (clang, CMake, etc.)? Hope it helps. Regards, Ameya Vikram Singh
  22. AmeyaVS

    fifo example

    Hello @veeresh k, There are multiple issues in the sample code provided by you. Here are the heavily modified version: // main.cpp #include<systemc> //< Notice not systemc.h #include"head1.h" #include"head2.h" int sc_main(int argc, char* argv[]) { sc_core::sc_fifo<int> fifo(10); //< sc_core namespace specifier writer w("writer"); reader r("reader"); w.out(fifo); r.in(fifo); sc_start(1000, sc_core::SC_NS); //< Run simulation for a limited time since no stopping condition are provided upfront. Also time is also specified in sc_core namespace. return 0; } //head1.h // Notice the HEADER GUARD #ifndef HEAD1_H_ #define HEAD1_H_ // Changed the header file to systemc instead of systemc.h #include<systemc> SC_MODULE(reader) { // sc_fifo_in_if is a abstract class from which you cannot create an object. // sc_fifo_in is derived from the above class which actually implements the read method. sc_core::sc_fifo_in<int> in; void roperation() { int val; while (true) { wait(10, sc_core::SC_NS); // Time unit is defined in sc_core namespace. for (int i = 0; i <= 15; i++) { in.read(val); std::cout << val << std::endl; //< when using the systemc header you need to specify the std namespace. // Or you can use the statement after including all the header files: // using namespace std } } std::cout << "Availaible : " << in.num_available() << std::endl; //< Instead of num available it is num_available //< when using the systemc header you need to specify the std namespace. // Or you can use the statement after including all the header files: // using namespace std } SC_CTOR(reader) //< Your code mentions here writer the constructor name should be same as the class name. { SC_THREAD(roperation); //< Your code mentions woperation } }; #endif // HEAD1_H_ //head2.h // Refer the head1.h for similar details #ifndef HEAD2_H_ #define HEAD2_H_ #include<systemc> SC_MODULE(writer) { // Refer the head1.h for similar details sc_core::sc_fifo_out<int> out; void woperation() { int val = 0; while (true) { wait(10, sc_core::SC_NS); for (int i = 0; i <= 20; i++) { out.write(val++); } } } SC_CTOR(writer) { SC_THREAD(woperation); } }; #endif // HEAD2_H_ Here is a minimal makefile for building the example: CC=gcc CXX=g++ CXX_FLAGS= -g3 -Wall -c all: main.exe main.exe: main.o ${CXX} $< -o $@ -L${SYSTEMC_HOME}/lib-linux64 -L${SYSTEMC_HOME}/lib -lsystemc main.o: main.cpp head1.h head2.h ${CXX} ${CXX_FLAGS} -I${SYSTEMC_HOME}/include -o $@ $< clean: rm -rf main.o main.exe Note: For reference of the sc_fifo_in/out_if classes see here. For more details you can also refer to the SystemC LRM. Hope it helps. Regards, Ameya Vikram Singh
  23. AmeyaVS

    Systemc 2.3.2 Changes

    Hello @sumit_tuwien, You can find the necessary details from the SystemC sources. You can look into these files for more details: RELEASENOTES README NOTICE You can also compare the RELEASENOTES from previous releases. Regards, Ameya Vikram Singh
  24. Hello @vasu_c, Can you let us know what platform you are using for the AArch64 build? and also, if possible the ABI specifications of the GCC compiler as well? Thanks and Regards, Ameya Vikram Singh
  25. AmeyaVS

    clock generation in system c

    Hello @veeresh k, This example does not have a dedicated clock generator. // These statements are what driving the clock signal to with High time of 1 ns and low time of 1 ns. for (i=0;i<10;i++) { clock = 0; sc_start(1, SC_NS);// Run simulation for 1 ns. clock = 1; sc_start(1, SC_NS);// Run simulation for 1 ns. } What message you receive from the SystemC kernel refers to the timescale of 1 ps e.g.: Info: (I702) default timescale unit used for tracing: 1 ps You can get the SystemC API documentation for the sc_clock from here: SystemC sc_clock api reference. If you need a sample you can find a use-case reference here(though a little bit-dated): https://github.com/AmeyaVS/SystemC_ramblings/blob/ff1a111063842bfcd6f5de6bb3db74917dc6331c/src/03_fir/firsytemmain.cpp#L26 Hope it helps. Regards, Ameya Vikram Singh