scheduler.cc (13186:1ebc6c729311) | scheduler.cc (13188:7af408b60cac) |
---|---|
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 --- 314 unchanged lines hidden (view full) --- 323 status(StatusOther); 324} 325 326void 327Scheduler::runUpdate() 328{ 329 status(StatusUpdate); 330 | 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 --- 314 unchanged lines hidden (view full) --- 323 status(StatusOther); 324} 325 326void 327Scheduler::runUpdate() 328{ 329 status(StatusUpdate); 330 |
331 Channel *channel = updateList.getNext(); 332 while (channel) { 333 channel->popListNode(); 334 channel->update(); 335 channel = updateList.getNext(); | 331 try { 332 Channel *channel = updateList.getNext(); 333 while (channel) { 334 channel->popListNode(); 335 channel->update(); 336 channel = updateList.getNext(); 337 } 338 } catch (...) { 339 throwToScMain(); |
336 } 337} 338 339void 340Scheduler::runDelta() 341{ 342 status(StatusDelta); | 340 } 341} 342 343void 344Scheduler::runDelta() 345{ 346 status(StatusDelta); |
343 while (!deltas.empty()) 344 deltas.front()->run(); | 347 348 try { 349 while (!deltas.empty()) 350 deltas.front()->run(); 351 } catch (...) { 352 throwToScMain(); 353 } |
345} 346 347void 348Scheduler::pause() 349{ 350 status(StatusPaused); 351 kernel->status(::sc_core::SC_PAUSED); 352 runOnce = false; --- 73 unchanged lines hidden (view full) --- 426} 427 428void 429Scheduler::throwToScMain(const ::sc_core::sc_report *r) 430{ 431 if (!r) 432 r = reportifyException(); 433 _throwToScMain = r; | 354} 355 356void 357Scheduler::pause() 358{ 359 status(StatusPaused); 360 kernel->status(::sc_core::SC_PAUSED); 361 runOnce = false; --- 73 unchanged lines hidden (view full) --- 435} 436 437void 438Scheduler::throwToScMain(const ::sc_core::sc_report *r) 439{ 440 if (!r) 441 r = reportifyException(); 442 _throwToScMain = r; |
443 status(StatusOther); |
|
434 scMain->run(); 435} 436 437void 438Scheduler::scheduleStop(bool finish_delta) 439{ 440 if (stopEvent.scheduled()) 441 return; --- 55 unchanged lines hidden --- | 444 scMain->run(); 445} 446 447void 448Scheduler::scheduleStop(bool finish_delta) 449{ 450 if (stopEvent.scheduled()) 451 return; --- 55 unchanged lines hidden --- |