Jump to content

bogdan.tabacaru88

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. thank you Milind for sending me the files! I have attached them now (testcode.zip). I hope the files work. I have not gotten around to test them. Personally I gave the book 1 star on Amazon and I believe it needs a lot of rework until it could become reader appropriate. I hope that future revisions will be better (if any).
  2. Hi Milind, Thank you for your reply. I have found this post yesterday. My problem is that I cannot extract the information inside the .tgz file. I tried zip (windows & unix), gzip and tar -xzf The error that I am receiving is that it's not a valid archive. Were you maybe able to extract the archive? Kind Regards, Bogdan
  3. Hi everyone, I have just started working with SystemC-AMS. I have installed the systemcams-1.0.tar package from www.systemc-ams.org . As reference I am using the examples from the book: http://www.amazon.de/SystemC-SystemC-AMS-Practice-2-3-ebook/dp/B00F8HSYF8 SystemC and SystemC-AMS in Practice: SystemC 2.3, 2.2 and SystemC-AMS 1.0 from Amal Banerjee (Autor), Balmiki Sur (Autor) I am trying to run their first example from the book and I find myself stuck at compiling. Here is the part that is giving me a hard time: #include <systemc-ams> #include "commonsrcs.h" //<-- doesn't exist #include "gendatatrace.h" //<-- doesn't exist #include <cstdlib> #include <cstring> #include <iostream> //<-- was not written in original example using namespace std; //<-- was not written in original example int sc_main (int argc, char **argv) { double amplitude; double frequency; if (argc < 3) { cout<<"Insufficient input parameters ..."<<endl; cout<<"give <amplitude> and <frequency> arguments to output file"<<endl; exit(0); } sca_tdf::sca_signal<double> sigin0; sca_tdf::sca_signal<double> sigout0; amplitude = strtod(argv[1], NULL); frequency = strtod(argv[2], NULL); sinsrc sin_src ("sin_src"); //<-- cannot be referenced due to commonsrcs.h not being found tracedoublecombo trdbl ("tr_nd"); //<-- cannot be referenced due to gendatatrace.h not being found sin_src.sigout(sigin0); //<-- cannot be referenced due to error above sin_src.amplitude = amplitude; //<-- cannot be referenced due to error above sin_src.frequency = frequency; //<-- cannot be referenced due to error above trdbl.in1(sigin0); //<-- cannot be referenced due to error above trdbl.in2(sigout0); //<-- cannot be referenced due to error above sc_core::sc_start(100.0, sc_core::SC_MS); sc_core::sc_stop(); return 0; } The compiler version I am using is: gcc version 4.1.2 20080704 The compilation output is: g++ \ -I. -I/home/tabacaru/systemc-2.3.0/include -I/home/tabacaru/systemc-ams-1.0/include \ -L. -L/home/tabacaru/systemc-2.3.0/lib-linux64 -L/home/tabacaru/systemc-ams-1.0/lib-linux64 \ -o butter butter.cpp \ -lsystemc-ams -lsystemc -lm butter.cpp:2:80: error: commonsrcs.h: No such file or directory butter.cpp:3:80: error: gendatatrace.h: No such file or directory butter.cpp: In function 'int sc_main(int, char**)': butter.cpp:28: error: 'sinsrc' was not declared in this scope butter.cpp:28: error: expected `;' before 'sin_src' butter.cpp:29: error: 'tracedoublecombo' was not declared in this scope butter.cpp:29: error: expected `;' before 'trdbl' butter.cpp:31: error: 'sin_src' was not declared in this scope butter.cpp:35: error: 'trdbl' was not declared in this scope I am sure I am doing something wrong, however I do not know what exactly. I already installed the systemc-ams-1.0 package twice and I still get the same problem. Any feedback regarding the 2 header files (commonsrcs.h and gendatatrace.h) would be much appreciated. If you know another package from an official/mirror web-page I would be happy for a link. Thank you in advance. Bogdan
  4. Hi everyone, I have just started working with SystemC-AMS. I have installed the systemcams-1.0.tar package from www.systemc-ams.org . As reference I am using the examples from the book: http://www.amazon.de/SystemC-SystemC-AMS-Practice-2-3-ebook/dp/B00F8HSYF8 SystemC and SystemC-AMS in Practice: SystemC 2.3, 2.2 and SystemC-AMS 1.0 from Amal Banerjee (Autor), Balmiki Sur (Autor) I am trying to run their first example from the book and I find myself stuck at compiling. Here is the part that is giving me a hard time: #include <systemc-ams> #include "commonsrcs.h" //<-- doesn't exist #include "gendatatrace.h" //<-- doesn't exist #include <cstdlib> #include <cstring> #include <iostream> //<-- was not written in original example using namespace std; //<-- was not written in original example int sc_main (int argc, char **argv) { double amplitude; double frequency; if (argc < 3) { cout<<"Insufficient input parameters ..."<<endl; cout<<"give <amplitude> and <frequency> arguments to output file"<<endl; exit(0); } sca_tdf::sca_signal<double> sigin0; sca_tdf::sca_signal<double> sigout0; amplitude = strtod(argv[1], NULL); frequency = strtod(argv[2], NULL); sinsrc sin_src ("sin_src"); //<-- cannot be referenced due to commonsrcs.h not being found tracedoublecombo trdbl ("tr_nd"); //<-- cannot be referenced due to gendatatrace.h not being found sin_src.sigout(sigin0); //<-- cannot be referenced due to error above sin_src.amplitude = amplitude; //<-- cannot be referenced due to error above sin_src.frequency = frequency; //<-- cannot be referenced due to error above trdbl.in1(sigin0); //<-- cannot be referenced due to error above trdbl.in2(sigout0); //<-- cannot be referenced due to error above sc_core::sc_start(100.0, sc_core::SC_MS); sc_core::sc_stop(); return 0; } The compiler version I am using is: gcc version 4.1.2 20080704 The compilation output is: g++ \ -I. -I/home/tabacaru/systemc-2.3.0/include -I/home/tabacaru/systemc-ams-1.0/include \ -L. -L/home/tabacaru/systemc-2.3.0/lib-linux64 -L/home/tabacaru/systemc-ams-1.0/lib-linux64 \ -o butter butter.cpp \ -lsystemc-ams -lsystemc -lm butter.cpp:2:80: error: commonsrcs.h: No such file or directory butter.cpp:3:80: error: gendatatrace.h: No such file or directory butter.cpp: In function 'int sc_main(int, char**)': butter.cpp:28: error: 'sinsrc' was not declared in this scope butter.cpp:28: error: expected `;' before 'sin_src' butter.cpp:29: error: 'tracedoublecombo' was not declared in this scope butter.cpp:29: error: expected `;' before 'trdbl' butter.cpp:31: error: 'sin_src' was not declared in this scope butter.cpp:35: error: 'trdbl' was not declared in this scope I am sure I am doing something wrong, however I do not know what exactly. I already installed the systemc-ams-1.0 package twice and I still get the same problem. Any feedback regarding the 2 header files (commonsrcs.h and gendatatrace.h) would be much appreciated. If you know another package from an official/mirror web-page I would be happy for a link. Thank you in advance. Bogdan
×