Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by olá

  1. Hey everybody, I'm now working with the new systemc-ams-2.1 on Linux. I had problems to generate a correct executable. Can I still use the following to compile a cpp file? <user_system_prompt> g++ -I. -I/<directory_path_to_SystemC_2.3.0>/include –I<directory_path_to_SystemC_AMS 1.0>/include -L. –L/<directory_path_to_SystemC_2.3.0>/lib-linux -L/<directory_path_to_SystemC_AMS 1.0>/lib-linux -o sim text.cpp -lsystemc-ams -lsystemc -lm Or do you have already written a general makefile appropriate for the use with AMS? Thanks for answers in advance.
  2. Thank you very much. Before, I tried to only use the bash for compiling the file. I was able to compile HelloWorld.cpp. My current beginner's project compiles, but the signals are not connected. Thus, their is no exchange between the modules. Probably, my faults are quite obvious but their is no person in my environment having knowledge in SystemC. So, in the following are the .cpp file and the command to compile. Is the .cpp file faulty, the bash command or both of them? Thanks for your time and answer. ---------------------- $ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME /lib-linux -Wl,-rpath=$SYSTEMC_HOME/lib-linux -o sc_main sc_main.cpp -lsystemc -lm -------------------- #include <systemc.h> SC_MODULE( stimuli_pressure_mech ) { sc_out<double> force_out; sc_out<double> area_out; void stimuli_pressure_mech_process(); SC_CTOR(stimuli_pressure_mech) { std::cout << std::endl << "Hallo stimuli" << std::endl; SC_METHOD(stimuli_pressure_mech_process); } }; void stimuli_pressure_mech::stimuli_pressure_mech_process() { double force_mech = 1; double area = 5; // while(1){ std::cout << "force_mech: " << force_mech << ",\t" << "area: " <<area << std::endl; force_out.write(force_mech); area_out.write(area); //wait(); //} } SC_MODULE( pass_on_impulse ) { sc_in<double> force_in; sc_in<double> area_in; // sc_out<double> energy_air_out; void pass_on_impulse_process(); SC_CTOR( pass_on_impulse ) { std::cout << std::endl << "Hallo pass_on_impulse" << std::endl; SC_METHOD(pass_on_impulse_process); sensitive << force_in << area_in; } }; void pass_on_impulse::pass_on_impulse_process() { const double MATERIAL_CONST = 1.2; double area; double force; double energy_air; //while ( true ) { cout << "force_in: " << force_in << endl; force = force_in.read(); area = area_in.read(); energy_air = force * MATERIAL_CONST; cout << "force: " << force << endl; cout << "area: " << area << endl; // energy_out.write( energy_air ); cout << "Output pass on impulse: " << energy_air; // wait(); //} } int sc_main(int argc, char *argv[]) { //deactivate warnings sc_core::sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated",sc_core::SC_DO_NOTHING ); sc_signal<double> force_main; sc_signal<double> area_main; stimuli_pressure_mech *S; pass_on_impulse *PI; S = new stimuli_pressure_mech("stimuli_pressure_mech"); S->force_out(force_main); S->area_out(area_main); S->stimuli_pressure_mech_process(); PI = new pass_on_impulse("pass_on_impulse"); PI->force_in(force_main); PI->area_in(area_main); PI->pass_on_impulse_process(); //sc_start(200); return 0; }
  3. Hallo everybody, I'm working with SystemC in Linux. Unfortunately, I'm a beginner in writing makefiles. Is their anyone who has already written a makefile for systemc.h? Thanks in advance.
  4. Hey everybody, I'm still new with SystemC. So I'm referring to the first steps: Using Ubuntu I had now problems installing SystemC and getting succesful regression tests. However, my regression tests in Windows with VS2015 and VS2017 ended with 4% or 0%. I've used Cygwin to build the library. Do you have any idea which could have caused the low percentage? What would happen, if I use systemc in this case? Thank you very much for you answer in advance.
  • Create New...