systemc: Implement the nonstandard halt function.
Change-Id: Ie9bd9db92a63169980230bc9a15e153d5609dd0b Reviewed-on: https://gem5-review.googlesource.com/c/12594 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -338,6 +338,8 @@ Process::run()
|
||||
reset = false;
|
||||
try {
|
||||
func->call();
|
||||
} catch(ScHalt) {
|
||||
std::cout << "Terminating process " << name() << std::endl;
|
||||
} catch(const ::sc_core::sc_unwind_exception &exc) {
|
||||
reset = exc.is_reset();
|
||||
_isUnwinding = false;
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
namespace sc_gem5
|
||||
{
|
||||
|
||||
class ScHalt
|
||||
{};
|
||||
|
||||
class Sensitivity
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -670,7 +670,8 @@ wait(double d, sc_time_unit u, const sc_event_and_list &eal)
|
||||
void
|
||||
halt()
|
||||
{
|
||||
warn("%s not implemented.\n", __PRETTY_FUNCTION__);
|
||||
::sc_core::wait();
|
||||
throw ::sc_gem5::ScHalt();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user