scheduler.cc (13312:a7685ffbead8) | scheduler.cc (13317:36c574a4036e) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#include "systemc/core/scheduler.hh" 31 32#include "base/fiber.hh" 33#include "base/logging.hh" 34#include "sim/eventq.hh" 35#include "systemc/core/kernel.hh" | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#include "systemc/core/scheduler.hh" 31 32#include "base/fiber.hh" 33#include "base/logging.hh" 34#include "sim/eventq.hh" 35#include "systemc/core/kernel.hh" |
36#include "systemc/ext/core/messages.hh" |
|
36#include "systemc/ext/core/sc_main.hh" 37#include "systemc/ext/utils/sc_report.hh" 38#include "systemc/ext/utils/sc_report_handler.hh" 39#include "systemc/utils/report.hh" 40#include "systemc/utils/tracefile.hh" 41 42namespace sc_gem5 43{ --- 63 unchanged lines hidden (view full) --- 107void 108Scheduler::initPhase() 109{ 110 for (Process *p = initList.getNext(); p; p = initList.getNext()) { 111 p->popListNode(); 112 113 if (p->dontInitialize()) { 114 if (!p->hasStaticSensitivities() && !p->internal()) { | 37#include "systemc/ext/core/sc_main.hh" 38#include "systemc/ext/utils/sc_report.hh" 39#include "systemc/ext/utils/sc_report_handler.hh" 40#include "systemc/utils/report.hh" 41#include "systemc/utils/tracefile.hh" 42 43namespace sc_gem5 44{ --- 63 unchanged lines hidden (view full) --- 108void 109Scheduler::initPhase() 110{ 111 for (Process *p = initList.getNext(); p; p = initList.getNext()) { 112 p->popListNode(); 113 114 if (p->dontInitialize()) { 115 if (!p->hasStaticSensitivities() && !p->internal()) { |
115 SC_REPORT_WARNING( 116 "(W558) disable() or dont_initialize() called on " 117 "process with no static sensitivity, it will be " 118 "orphaned", p->name()); | 116 SC_REPORT_WARNING(sc_core::SC_ID_DISABLE_WILL_ORPHAN_PROCESS_, 117 p->name()); |
119 } 120 } else { 121 p->ready(); 122 } 123 } 124 125 runUpdate(); 126 runDelta(); --- 352 unchanged lines hidden (view full) --- 479 // sc_report instead if it's not a type we recognize/can handle. 480 throw; 481 } catch (const ::sc_core::sc_report &) { 482 // It's already a sc_report, so nothing to do. 483 throw; 484 } catch (const ::sc_core::sc_unwind_exception &) { 485 panic("Kill/reset exception escaped a Process::run()"); 486 } catch (const std::exception &e) { | 118 } 119 } else { 120 p->ready(); 121 } 122 } 123 124 runUpdate(); 125 runDelta(); --- 352 unchanged lines hidden (view full) --- 478 // sc_report instead if it's not a type we recognize/can handle. 479 throw; 480 } catch (const ::sc_core::sc_report &) { 481 // It's already a sc_report, so nothing to do. 482 throw; 483 } catch (const ::sc_core::sc_unwind_exception &) { 484 panic("Kill/reset exception escaped a Process::run()"); 485 } catch (const std::exception &e) { |
487 SC_REPORT_ERROR("uncaught exception", e.what()); | 486 SC_REPORT_ERROR( 487 sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, e.what()); |
488 } catch (const char *msg) { | 488 } catch (const char *msg) { |
489 SC_REPORT_ERROR("uncaught exception", msg); | 489 SC_REPORT_ERROR( 490 sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, msg); |
490 } catch (...) { | 491 } catch (...) { |
491 SC_REPORT_ERROR("uncaught exception", "UNKNOWN EXCEPTION"); | 492 SC_REPORT_ERROR( 493 sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, 494 "UNKNOWN EXCEPTION"); |
492 } 493 } catch (const ::sc_core::sc_report &r) { 494 ::sc_core::sc_report_handler::set_handler(old_handler); 495 return r; 496 } 497 panic("No exception thrown in reportifyException."); 498} 499 500} // namespace sc_gem5 | 495 } 496 } catch (const ::sc_core::sc_report &r) { 497 ::sc_core::sc_report_handler::set_handler(old_handler); 498 return r; 499 } 500 panic("No exception thrown in reportifyException."); 501} 502 503} // namespace sc_gem5 |