All Activity

This stream auto-updates   

  1. Yesterday
  2. Currently I am working on G++ 5.4.0 and have tried setting the -std=c++98 and -std=c++03 and have observed no observable changes in the build library. But changing from one system to other resulted in SystemC library failing to build in one of the environments. I would recommend building the SystemC library without the "-std=c++03" compiler flag as you might get into some issues later when mixing other C++ libraries together while building System models. The make check is currently failing due to usage of shell script variables starting with numbers in the SystemC library which has been fixed in newer releases of the bash shell. Regards, Ameya Vikram Singh
  3. Hi I am able to run Hello.cpp and other simple programs - but when try for the code below I added sc_signal< sc_int<4> > a,b,sum; to my .cpp , i am getting the following issue during linking time `sc_dt::sc_int_base::print(std::ostream&) const': /usr/local/systemc-2.3/include/sysc/datatypes/int/sc_int_base.h:865: undefined reference to `sc_dt::sc_int_base::to_string[abi:cxx11](sc_dt::sc_numrep, bool) const' collect2: error: ld returned 1 exit status Makefile.rules:150: recipe for target 'a.x' failed My code is pasted below #include "systemc.h" SC_MODULE(tff_async_reset){ sc_in <bool> data,clk,reset; sc_out <bool> q; bool q_l; void atff(){ if({ q_l = 0; } else if( { q_l = !q_l; } q.write(q_l); } SC_CTOR(tff_async_reset) { SC_METHOD (atff); sensitive << reset; sensitive << clk.pos(); } }; int sc_main(int argc , char* argv[]) { sc_signal< sc_int<4> > a,b,sum; sc_signal<bool> clk; return(0); } I use the below command for compiling/linking g++ -g -Wall -pedantic -Wno-long-long -Werror -L. -L.. -L /usr/local/systemc-2.3/lib-linux64/ -Wl,-rpath=/usr/local/systemc-2.3/lib-linux64 -o a.x tff_async_reset.o -lsystemc -lm If I remove the line sc_signal< sc_int<4> > a,b,sum; the above command passes Any help ? rgds bijoy
  4. Yes you seem to be right, with the missing or broken libraries: I do have another openSUSE Tumbleweed system on my notebook, which does the latest c++ compiler and libraries. I tried these following steps trying to build a new systemc installation: g++ -v: gcc version 6.2.1 20161209 [gcc-6-branch revision 243481] (SUSE Linux) 1. I set CXX variable: export CXX="g++ -std=c++03" 2. ../configure 3. make 4. make install 5. make check Although, I still have these 10 test errors. Though I have set CXX with std=c++03, he still do not wanted to accept std::gets. So I have commented it out. When I set the LD_LIBRARY_PATH and SYSTEMC_HOME and I can compile the coursework test program. So please tell me: Does the -std=c++03 with the latest c++ version has no effect? Best regards Ahmed
  5. Last week
  6. I don't have C++11 features. Can I still go with custom creator approach.
  7. Are you using the same compiler with which you have built the SystemC library? If yes, then probably the compiler is currently non-functional or you'll need some dependency packages which is currently missing from your system. Can you do a search for the file on your system for the mentioned shared library:, probably under the path: /usr/lib/gcc/ or something similar? Currently on my system I am able to build the example code without any issues. Regards, Ameya Vikram Singh
  8. So now I try the program from my course. After setting the systemc_home variable, I get this error during compilation: ahmed@linux-la5e:~/Dropbox/TU-Berlin/SEES_WS1617/systemc/test/a> make g++ -I /home/ahmed/systemc-2.3.1a/include -L /home/ahmed/systemc-2.3.1a/lib-linux64 -o main main.o -lsystemc -lm g++: fatal error: -fuse-linker-plugin, but not found compilation terminated. make: *** [Makefile:22: main] Error 1 ahmed@linux-la5e:~/Dropbox/TU-Berlin/SEES_WS1617/systemc/test/a> The output of g++ -v is ahmed@linux-la5e:~/Dropbox/TU-Berlin/SEES_WS1617/systemc/test/a> g++ -v Using built-in specs. COLLECT_GCC=g++ Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++ --disable-checking --disable-bootstrap --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl= --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.8 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.8.0 20130218 [trunk revision 196121] (SUSE Linux) ahmed@linux-la5e:~/Dropbox/TU-Berlin/SEES_WS1617/systemc/test/a> I uploaded the program.
  9. Hi. If you want to pass arguments to the constructor of the elements of an sc_vector, you need a custom creator. See SystemC LRM IEEE:1666 Section 8.5.5 for details and examples. A very easy way to realize custom creator by using a Lambda function is presented here: Greetings Ralph
  10. Hello, Sorry for misunderstanding the problem. But your problem seems to be too similar to the topic discussed here. Specifically the comments: Regards, Ameya Vikram Singh
  11. Hello, _size is not the size of sc_vector which I am already setting by passing S. _size is the size of buffer inside each sc_fifo. sc_fifo constructor takes size argument and I don't know how to pass that argument.
  12. It seems you are using the sc_vector<>.init method incorrectly. As per the source from sc_vector.h you are trying to pass _size as a function pointer (Creator function). Can you make modifications from: explicit my_chnl(sc_module_name nm, unsigned _size = 4) : sc_channel(nm), fifos("FIFO") to: explicit my_chnl(sc_module_name nm, unsigned _size = 4) : sc_channel(nm), fifos("FIFO", _size) Also sc_fifo is template class what type are you specializing it to? If you are creating to a vector of sc_fifo of int datatype your declaration should be: sc_vector<sc_fifo<unsigned int> > fifos; //vectors of fifos Regards, Ameya Vikram Singh
  13. I created vector of fifos: sc_vector<sc_fifo> fifos; and in my constructor: template <unsigned S> class my_chnl : public my_chnl_if, public sc_channel { sc_vector<sc_fifo> fifos; //vectors of fifos //----------------------------------------------------------- public: //----------------------------------------------------------- //constructor //----------------------------------------------------------- explicit my_chnl(sc_module_name nm, unsigned _size = 4) : sc_channel(nm), fifos("FIFO") { fifos.init(S, _size); } ..... I am getting compile error saying that include/sysc/utils/sc_vector.h:634: error: \u2018c\u2019 cannot be used as a function If I do fifos.init(S), it works, but I get default size of 16. How do I set custom size? Any help? Thanks
  14. ok thank you so far!
  15. It would be better that you go ahead with your assignments. Try some simple examples see if they are building and the simulation is progressing. In case you hit any other issue you can post the details here. Regards, Ameya Vikram Singh
  16. Ok let's recapitulate: I have tried several times compiling with different compiler versions 6.x and 4.8. With flags like export CXX="g++ -std=c++03" I always get these fails: ============================================================= 10 of 21 tests failed Please report to ============================================================= When I do these changes: File: config/ Change the following line (line: 49) from: TESTNAME=`dirname "${TEST}" | sed "s:[^A-Za-z0-9_\@]:_:g" ` to: TESTNAME=`dirname "${TEST}" | sed "s:[^A-Za-z_\@]:_:g" ` All tests are passed. When I try running the regression test suit -I do not know if there are some passes- after I see asome hundred failed tests stop it. So what is the current status, can I program in systemc or do I need regard something?
  17. make check: =================== All 11 tests passed ===================
  18. I don't have the test files on hand to double-check, but IIRC I believe it gets turned negative during the overflow step (called by cast, in turn called by sc_fxnum::sc_fxnum). Bear in mind that I'm new to SystemC, so I don't have a clear idea of what behaviours are expected or vice-versa.
  19. Hi Jonas, for now, this is a known leak (as stacks from statically created processes are currently deliberately not deleted) and allocations from sc_core::sc_cor_pkg_*::create should be suppressed. (Dynamically created threads are not affected, so it is not a "real" leak). Greetings from Duisburg, Philipp
  20. Hi Joshua, This could then indeed be a bug. I would expect that (sc_fix)(uint)-1 is a positive value? You say, that this is not the case? Thanks, Philipp
  21. It seems the problem lies in the script which prematurely stops execution due to setting up of Shell Script variable names starting with numbers. @donpalavi can you try to make following changes to the following file in the systemc-2.3.1a source code: File: config/ Change the following line (line: 49) from: TESTNAME=`dirname "${TEST}" | sed "s:[^A-Za-z0-9_\@]:_:g" ` to: TESTNAME=`dirname "${TEST}" | sed "s:[^A-Za-z_\@]:_:g" ` This should temporarily resolves the SystemC unit test cases failures. As for the C++'03 you can try setting the CXX environment variable like this: export CXX="g++ -std=c++03" Regards, Ameya Vikram
  22. Hi uwe, Thanks for your reply. Please find my replies: - i am trying to take the issue to incisiv team. My intention to ask here was to familiarize with any similarity anyone has faced i tried to use while loop but the issue seems to persist. I am trying different solutions to see if i am able to get ahead. I will update if i found a way. Thanks, Shubham Verma
  23. Can you or someone please explain me, how do I compile systemc explicitly with the C++'03 standard? I think that should solve the matter than. And I can do my course work.
  24. I am now at 100. test case and every one have failed yet.
  25. Thanks for the clarification. Yes i need to go through the LRM to check for right usage.
  26. Strangely enough I am also facing make check issues under Cygwin (64-Bit) but earlier I didn't face any issues, will need to narrow down recent package updates. With g++ -v: Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible Thread model: posix gcc version 5.4.0 (GCC) @donpalavi you can download the systemc-regressions test suite from: or directly download from: Then follow these steps to run the systemc-regressions test suite: export SYSTEMC_HOME="<path_to_your_SystemC_installation>" tar xf systemc-regressions-2.3.1a.tar.gz cd systemc-regressions-2.3.1a/ cd scripts/ # Run the script with -arch configuration: # This command will run the entire test suite with SystemC and TLM test cases. # e.g.: ./ -arch linux64 systemc tlm # linux64: For 64-bit linux systems. # linux: For 32-bit linux systems. # cygwin: For 32-bit Cygwin Environment. # cygwin64: For 64-Bit Cygwin Environment. ./ -arch linux64 systemc tlm Wait for the test cases to build and verify the results(It will take some time as there are close to 858 test cases.) Currently in my environment 15 Test Cases under SystemC are failing and under TLM none of the test cases fail. Regards, Ameya Vikram Singh
  27. sv should be supported too in hal. typically hal is more focused on rtl code. /uwe
  1. Load more activity