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