Frank Poppen Posted July 6, 2017 Report Share Posted July 6, 2017 My SystemC-Code is using messages of severity "Error" to intentionally throw exceptions. Suddenly I realize that no longer exceptions are thrown. Analyzing this issue, I targeted the function in my code "scv_random::seed_monitor_on(true, "../../Source/seedfile.txt");" to be the cause of this. For my current scenario I screwed up the path to the "seedfile.txt" which results in an error in "seed_monitor_on()". In this "seed_monitor_on()" calls the following: cannot_open_seed_file() -> message() -> set_actions(SCV_ERROR,SCV_LOG|SCV_DISPLAY|SCV_CACHE_REPORT) Conclusion at it seems to me: In case of a file not found "seed_monitor_on()" removes throwing off exception ("SC_THROW") in ALL(!) cases of messages with severity "Error". I would consider this to be an unwanted global side effect and probably a bug. Or? maehne 1 Quote Link to comment Share on other sites More sharing options...
maehne Posted July 8, 2017 Report Share Posted July 8, 2017 Dear Frank, Thanks for reporting this issue! I have reported your issue to the SystemC Verification Working Group. I agree with you that scv_message should not tamper with the default actions for error/fatal messages. I checked the SCV code base by following your track. The actual setting of the default actions happens at the first call to _scv_message::setup() in src/scv/scv_report.cpp lines 96 and 97. By removing these two lines and recompiling/reinstalling SCV, you should be able to fix this issue. Best regards, Torsten Maehne Quote Link to comment Share on other sites More sharing options...
Stephan Gerth Posted July 10, 2017 Report Share Posted July 10, 2017 Hi Frank, thanks for reporting, I've implemented a patch following Torstens recommendation in the working groups repository. This will be included in the next release which will be alongside SystemC 2.3.2. Quote Link to comment Share on other sites More sharing options...
Frank Poppen Posted August 4, 2017 Author Report Share Posted August 4, 2017 Great, thank you for taking care of this issue. Quote Link to comment Share on other sites More sharing options...
Frank Poppen Posted September 1, 2017 Author Report Share Posted September 1, 2017 Not sure if I should have opened another topic. Decided to continue here. It seems that this type of "tampering with default actions" is more deeply distributed throughout SCV. My testcases intentionally (at least I accept it) trigger an scv_random_error -> "RANDOM_OUT_OF_ORDER_SEED". This ends up in a call to _scv_message::setup() where I find in line scv_report.cpp::97 the following: scv_report_handler::set_actions(SCV_FATAL,SCV_LOG|SCV_DISPLAY|SCV_CACHE_REPORT); Once again the default behavior is changed and I'm wondering here why my fatal messages do not end the simulation as expected. Quote Link to comment Share on other sites More sharing options...
maehne Posted October 16, 2017 Report Share Posted October 16, 2017 On 1.9.2017 at 9:03 AM, Frank Poppen said: Not sure if I should have opened another topic. Decided to continue here. It seems that this type of "tampering with default actions" is more deeply distributed throughout SCV. My testcases intentionally (at least I accept it) trigger an scv_random_error -> "RANDOM_OUT_OF_ORDER_SEED". This ends up in a call to _scv_message::setup() where I find in line scv_report.cpp::97 the following: scv_report_handler::set_actions(SCV_FATAL,SCV_LOG|SCV_DISPLAY|SCV_CACHE_REPORT); Once again the default behavior is changed and I'm wondering here why my fatal messages do not end the simulation as expected. Sorry for the late reply! I just saw that this post now. The lines containing scv_report_handler::set_actions(...) in the _scv_message::setup() member function implemented in scv_report.cpp were removed by @StS as suggested in my post from 2017-08-08. So you just stumbled again over the same issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.