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