SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
process_stack_interface.h
Go to the documentation of this file.
1/*
2 © 2016 Intel Corporation
3
4 This software and the related documents are Intel copyrighted materials, and
5 your use of them is governed by the express license under which they were
6 provided to you ("License"). Unless the License provides otherwise, you may
7 not use, modify, copy, publish, distribute, disclose or transmit this software
8 or the related documents without Intel's prior written permission.
9
10 This software and the related documents are provided as is, with no express or
11 implied warranties, other than those that are expressly stated in the License.
12*/
13
14#ifndef SIMICS_SYSTEMC_PROCESS_STACK_INTERFACE_H
15#define SIMICS_SYSTEMC_PROCESS_STACK_INTERFACE_H
16
17#include <systemc>
18
19namespace simics {
20namespace systemc {
21
26 public:
28 // Pushes the current process on the stack so it can be waited on before
29 // returning from a simics2tlm gasket call. Push is typically called from a
30 // tlm2simics gasket before calling into Simics.
31 virtual void push() = 0;
32 // Pops the top process from the stack. Pop is typically called from a
33 // tlm2simics gasket after the call to Simics returns.
34 virtual void pop() = 0;
35 // Waits for the current process to become the top entry on the stack, in
36 // order to maintain a LIFO order of Simics interface function
37 // calls. Typically called from a simics2tlm gasket before exit/return.
38 virtual void waitForCurrentProcessOnTop() = 0;
39 // Unwinds the stack by running SystemC kernel to the next pending activity
40 // until the stack is empty. NOTE: it is not guaranteed that the stack will
41 // become empty with this approach. Processes that wait forever, or on each
42 // other in a dead-lock situation, will lock here (and this is
43 // expected). Typically called from the event callback to make sure more
44 // time is spent unwinding the stack. For transactions, there is already a
45 // loop that waits for the transaction to complete.
46 virtual void runUntilStackEmpty() = 0;
47 // Waits until current process can return from the function call, by
48 // invoking either waitForCurrentProcessOnTop() or runUntilStackEmpty()
49 // depending on the process kind that entered the current function where
50 // waitForExitCondition() was invoked.
52 sc_core::sc_curr_proc_kind enter_process_kind) = 0;
53};
54
55} // namespace systemc
56} // namespace simics
57
58#endif
The process stack helps maintain a LIFO order of function calls that cross the SystemC/Simics border,...
Definition: process_stack_interface.h:25
virtual void waitForExitCondition(sc_core::sc_curr_proc_kind enter_process_kind)=0
virtual ~ProcessStackInterface()
Definition: process_stack_interface.h:27
Definition: adapter.h:79