SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
simulation_interface_proxy.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_SIMULATION_INTERFACE_PROXY_H
15#define SIMICS_SYSTEMC_SIMULATION_INTERFACE_PROXY_H
16
18
19#include <systemc>
20
21namespace simics {
22namespace systemc {
23
26 public:
27 SimulationInterfaceProxy() : simulation_(NULL) {
28 }
29
31 simulation_ = simulation;
32 }
33
34 // SimulationInterface
35 int runDeltaPhase(int count) override {
36 return simulation_->runDeltaPhase(count);
37 }
38 bool runSimulation(sc_core::sc_time t) override {
39 return simulation_->runSimulation(t);
40 }
41 void stopSimulation() override {
42 return simulation_->stopSimulation();
43 }
44 sc_core::sc_simcontext *context() const override {
45 return simulation_->context();
46 }
47 ConfObjectRef simics_object() const override {
48 if (simulation_) {
49 return simulation_->simics_object();
50 } else {
51 return nullptr;
52 }
53 }
54
55 private:
56 iface::SimulationInterface *simulation_;
57};
58
59} // namespace systemc
60} // namespace simics
61
62#endif
Interface to the SystemC simulation.
Definition: simulation_interface_proxy.h:25
SimulationInterfaceProxy()
Definition: simulation_interface_proxy.h:27
bool runSimulation(sc_core::sc_time t) override
Definition: simulation_interface_proxy.h:38
void stopSimulation() override
Definition: simulation_interface_proxy.h:41
sc_core::sc_simcontext * context() const override
Definition: simulation_interface_proxy.h:44
void setSimulation(iface::SimulationInterface *simulation)
Definition: simulation_interface_proxy.h:30
ConfObjectRef simics_object() const override
Definition: simulation_interface_proxy.h:47
int runDeltaPhase(int count) override
Definition: simulation_interface_proxy.h:35
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
virtual sc_core::sc_simcontext * context() const =0
virtual bool runSimulation(sc_core::sc_time t)=0
virtual ConfObjectRef simics_object() const =0
Definition: adapter.h:79