systemc: Implement sc_pause, sc_stop, and re-sc_start-ing.
authorGabe Black <gabeblack@google.com>
Tue, 17 Jul 2018 07:09:59 +0000 (00:09 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 5 Sep 2018 06:08:22 +0000 (06:08 +0000)
commit91a6b128198515a7a29ee766715c9a1fe1bf7b0c
tree22980516f87d12af1df372ddfabe57e45f4acc5a
parent746c1eaa72dbce46899459f988336485190897c2
systemc: Implement sc_pause, sc_stop, and re-sc_start-ing.

This change further modifies the scheduler to implement the sc_pause
and sc_stop functions, and to ensure that calling sc_start again works.
Also, some small changes were made to how processes and contexts are
hooked up. Now, rather than checking whether a process is running to
determine wether it started on its own or needs to be started manually,
there's a bool which explicitly tracks whether it needs this step. The
problem was that once a thread finished, it wasn't considered running
any more. In that case it had run but finished, but that was
indistinguishable from it needing to run but not having been started.

Change-Id: I3aefb5493f91d9efa1a1382586196339b67925fe
Reviewed-on: https://gem5-review.googlesource.com/12031
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/core/process.cc
src/systemc/core/process.hh
src/systemc/core/process_types.hh
src/systemc/core/sc_main.cc
src/systemc/core/scheduler.cc
src/systemc/core/scheduler.hh