Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

141 profile views

haase's Achievements


Member (1/2)



  1. Thank you for your fat reply. I think some uninitialized variables could be the problem. I trying to check this, but this is really hard, because the code is quite big now. Is there a easy way to test such things automatically? Thank you for the links, i will a look at it.
  2. Dear all, i am designing a network simulator where a lot of messages are flying around. For logging and debugging the states of the modules and the simulation i use the sc_report_handler class. In main.cpp i set the following options: sc_report_handler::set_verbosity_level(verbosity); sc_report_handler::set_log_file_name("out.log"); sc_report_handler::set_actions(SC_INFO, SC_LOG); sc_report_handler::set_actions(SC_WARNING, SC_LOG); verbosity is a variable passed from a configuration file. In my files/modules etc i have usually code like this to print into the log file: std::stringstream ss; ss << this->name() << " some message, maybe with variables like x: " << x; SC_REPORT_INFO_VERB(msgId, ss.str().c_str(), sc_core::SC_DEBUG); I use the stringstream to format like i want and set the verbosity. I have a lot Before i start the simulation i read a configuration file with lots of parameters. There is also the verbosity level inside: # Verbosity level # None, Low, Medium, High, Full, Debug verbosity = None In my code i have several SC_REPORT_INFO_VERB commands with different verbosity levels, so that i can track different information on my needs for debugging. Now to my problem/question: Depending on the verbosity i get different simulation results. How the sc_report_handler can affect the simulation? Maybe i am doing something wrong, bit this behavious is really confusing for me. Thank you very much.
  3. Hi Ralph, thanks for your reply. I also recognized that this function is private, so i did the workaround making this function public. This fast solution is for the moment ok, but not as long term option. I know that is not a good solution, but it is a qick dirty fix. I have an old SystemC Library(ReChannelv2 from 2007) where this call is used and i want to use this library(the library is not compiling yet). For now i have not the resources to refactor the old library to the newer C++(11 or 14) and SystemC(2.3.3) standard. Also it is an external library, so it is hard to get in and understand how the implementation is done in detail. In theory, i only want to use it ๐Ÿ˜‰ This library is i would say something which wrapped extra stuff around the systemc classes to model reconfiguration during runtime. If i check the SystemC version 2.2, there was this function public, so it was allowed to use this function. Why is this dangerous now? What changed between these two version? Best regards, Julian
  4. Hello, i have the following piece of code not compiling: #include <systemc.h> int sc_main(int argc, char* argv[]){ sc_signal<bool> my_signal_bool; sc_reset* my_reset; my_reset = my_signal_bool.is_reset(); return 0; } I get this error: In file included from /usr/local/systemc-2.3.3/include/sysc/communication/sc_buffer.h:34:0, from /usr/local/systemc-2.3.3/include/systemc:79, from /usr/local/systemc-2.3.3/include/systemc.h:219, from ../src/playground.cpp:12: /usr/local/systemc-2.3.3/include/sysc/communication/sc_signal.h: In function โ€˜int sc_main(int, char**)โ€™: /usr/local/systemc-2.3.3/include/sysc/communication/sc_signal.h:472:23: error: โ€˜sc_core::sc_reset* sc_core::sc_signal<bool, POL>::is_reset() const [with sc_core::sc_writer_policy POL = (sc_core::sc_writer_policy)0u]โ€™ is private virtual sc_reset* is_reset() const; ^ ../src/playground.cpp:95:37: error: within this context my_reset = my_signal_bool.is_reset(); ^ make: *** [src/playground.o] Error 1 src/subdir.mk:18: recipe for target 'src/playground.o' failed "make all" terminated with exit code 2. Build might be incomplete. I have installed SystemC 2.3.3 and using Eclipse CDT under Ubunut 16.04. How i can resolve this error? Best regards, Julian
  • Create New...