Jump to content

aarone

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by aarone

  1. Ameya, the `tracefile->set_time_unit() is already set to 1ps resolution. The problem is probably in the code itself (2 different assignments in the same method). Still, I need to find where that happens. regards
  2. Hello, I get multiple such warnings during a long simulation: Warning: (W713) multiple VCD tracing cycles with the same time detected: units count: 548880661 Waveform viewers will only show the states of the last one. Use `tracefile->set_time_unit(double, sc_time_unit);' to increase the time resolution. I have 2 questions: Is there any way to get a hint which are the signals that are toggling at the same time? Is there any way to suppress the warnings? (until I solve this, the repetitive warnings make my log file to explode...) Regards, Aaron
  3. In a Windows environment (with MSVC), I had no issue to place a breakpoint and debug sc_simcontext.cpp (or any other SC kernel file), so I can guess you compiled part of the SC kernel with debug info while other files w/o it. All you need is to make sure you build it all with debug flag set. Hope this helps, Aaron
  4. I see... I couldn't figure out where that 'wait' came form... Thanks Philipp!
  5. Hi, the code below throws the exception: Error: (E519)wait() is only allowed in SC_THREADs and SC_CTHREADs : in SC_METHODs use next_trigger() instead In file : ..\..\src\sysc\kernel\sc_wait.cpp:92 Although I understand that a spawned method qualifies as a thread, I tried to replace the wait call with next_trigger and still get the same exception at runtime. Thanks in advance, Aaron // main.cpp #include <systemc> #include "my_module.h" using namespace sc_core; int sc_main(int argc, char* argv[]) { my_module my_module_i("my_module_i"); sc_start(); return 0; } // my_module.h #ifndef MY_MODULE_H #define MY_MODULE_H #include <systemc> SC_MODULE(my_module) { my_module(sc_core::sc_module_name nm); void my_thread(void); }; #endif // my_module.cpp #include <iostream> using std::cout; using std::endl; #define SC_INCLUDE_DYNAMIC_PROCESSES #include <systemc> using namespace sc_core; #include "my_module.h" SC_HAS_PROCESS(my_module); my_module::my_module(sc_module_name nm) : sc_module(nm) { try { SC_FORK sc_spawn(sc_bind(&my_module::my_thread, this), "my-thread") SC_JOIN } catch (const sc_report& x){ cout << "Ooppss..." << endl; cout << x.what() << endl; throw; } } void my_module::my_thread(void) { cout << "INFO: spawned thread " << sc_get_current_process_handle().name() << " @ " << sc_time_stamp() << endl; wait(10, SC_NS); // next_trigger(10, SC_NS); }
  6. BTW, how do you insert so nicely formatted code into the posts here? Thanks, Aaron
  7. Thanks Kartik, I see that now. I was missing the using namespace sc_core; in the header file before use of sc_module_name. Thanks, Aaron
  8. Hi guys! I'm new to SystemC and still trying to figure out basic stuff. In preparation to pass some arguments to a constructor, I'm looking how to replace the SC_CTOR macro. In the code below, the "SC_CTOR(my_module);" line works well but when I comment it out and replace by direct constructor declaration "my_module(sc_module_name nm);" it doesn't compile. I'll appreciate any hint. Thanks, Aaron --------------------------------------------- // main.cpp #include <systemc> #include "my_module.h" using namespace sc_core; int sc_main(int argc, char* argv[]) { my_module my_module_i("my_module_i"); sc_start(); return 0; } // my_module.h #ifndef MY_MODULE_H #define MY_MODULE_H #include <systemc> SC_MODULE(my_module) { // this constructor works SC_CTOR(my_module); // this constructor doesn't work //my_module(sc_module_name nm); };//endclass #endif // my_module.cpp #include <iostream> using std::cout; using std::endl; #include <systemc> #include "my_module.h" using namespace sc_core; SC_HAS_PROCESS(my_module); my_module::my_module(sc_module_name nm) : sc_module(nm) { cout << "Hello world" << endl; }
  9. NP, the name is indeed Aaron :-) No, that is not the problem I had (which was due to un-taring the package in Windows before using it in Linux). For your issue, check that you have g++ installed and you run > setenv CXX g++ Hope this helps...
  10. Yes, probably the problem was that I untar'd with Windows's winzip. I removed all and unpacked again, and the configure script run properly. Thanks Ralph!
  11. Hi Ralph, yes, the program is executable. Running with sh I get: > sh ../configure : command not found16: ../configure: line 31: syntax error near unexpected token `newline' './configure: line 31: ` ;; > Thanks, Aaron
  12. Hi Ralph, yes, to both questions. Thanks, Aaron
  13. Hi!, I'm trying to install SystemC by following the INSTALL doc instructions. > mkdir objdir > cd objdir > setenv CXX g++ > ../configure ../configure: Command not found. > There is no information about which command is not found. XTERM_SHELL=/usr/intel/pkgs/tcsh/6.15.00/bin/tcsh HOSTTYPE=x86_64 MACHTYPE=x86_64-suse-linux HOSTYPE=x86-64_linux_sles11 VER=sles11 Thanks in advance!
×
×
  • Create New...