16#ifndef SIMICS_SYSTEMC_SIMULATION_H
17#define SIMICS_SYSTEMC_SIMULATION_H
21#include <simics/base/iface-call.h>
23#include <simics/devs/frequency.h>
24#include <simics/model-iface/event-delta.h>
25#include <simics/model-iface/co-execute.h>
66 virtual uint64
set_delta(conf_object_t *NOTNULL event_handler_obj,
67 const event_class_t *next_event_ec,
69 virtual uint64
get_delta(conf_object_t *NOTNULL event_handler_obj);
72 virtual double get()
const;
76 unsigned group_index);
106 int runDeltaPhaseNoStateCheck(
int count);
107 bool isPausePending();
108 bool hasPendingAsyncActivity()
const;
109 bool runSimulationNoCallHandleEvent(sc_core::sc_time t);
111 static void atSimulationStopped(lang_void *simulation, conf_object_t *obj);
112 static std::vector<conf_object_t*> instancesNotInCell(conf_object_t *cell);
113 static void onCellChange(lang_void *callback_data, conf_object_t *obj,
114 conf_object_t *old_cell, conf_object_t *new_cell);
117 struct InstanceTracker {
118 explicit InstanceTracker(conf_object_t *NOTNULL
object);
119 virtual ~InstanceTracker();
120 conf_object_t *object_;
122 static std::vector<conf_object_t*> instances_;
124 class YieldRequest :
public sc_core::sc_prim_channel {
126 YieldRequest(conf_object_t *engine,
const char* name)
127 :
sc_core::sc_prim_channel(name) {
128 INIT_IFACE(&execute_, execute, engine);
130 virtual void update(
void) {
132 CALL(execute_,
stop)();
134 IFACE_OBJ(execute) execute_;
137 ConfObjectRef simics_object_;
138 SimulationDeleter *simulation_deleter_;
141 sc_core::sc_time delta_time_;
142 IFACE_OBJ(event_handler) event_handler_;
143 concurrency_mode_t concurrency_mode_;
144 YieldRequest yield_request_;
146 InternalInterface *internal_;
147 InstanceTracker instance_tracker_;
Definition: internal_interface.h:25
Provides the interface to the SystemC kernel.
Definition: simulation.h:54
virtual void switch_mode(concurrency_mode_t mode)
sc_core::sc_simcontext * context() const
virtual std::vector< conf_object_t * > execution_group(unsigned group_index)
virtual uint64 get_delta(conf_object_t *NOTNULL event_handler_obj)
virtual void callHandleEvent()
virtual uint64 set_delta(conf_object_t *NOTNULL event_handler_obj, const event_class_t *next_event_ec, uint64 delta)
int runDeltaPhase(int count)
virtual void yield_request()
virtual concurrency_mode_t supported_modes()
void set_run_next_delta(const int &count)
virtual std::vector< conf_object_t * > serialized_memory_group(unsigned group_index)
virtual double get() const
virtual void message_pending()
ConfObjectRef simics_object() const
Simulation(ConfObjectRef o, InternalInterface *internal)
bool runSimulation(sc_core::sc_time t)
virtual concurrency_mode_t current_mode()
const std::vector< conf_object_t * > & instances() const
virtual void switch_out()
Simics concurrency group interface.
Definition: concurrency_group_interface.h:28
Simics concurrency mode interface.
Definition: concurrency_mode_interface.h:26
Definition: event_delta_interface.h:27
Simics execute control interface.
Definition: execute_control_interface.h:26
Definition: execute_interface.h:24
Definition: frequency_interface.h:26
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Definition: argument_registry.h:26
Definition: pci_bus_interface.h:24