SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
sc_port_connection.h
Go to the documentation of this file.
1/*
2 © 2015 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_AWARENESS_SC_PORT_CONNECTION_H
15#define SIMICS_SYSTEMC_AWARENESS_SC_PORT_CONNECTION_H
16
17
20
21#include <systemc>
22
23#include <map>
24#include <string>
25#include <utility>
26#include <vector>
27
28namespace simics {
29namespace systemc {
30namespace awareness {
31
38 public:
39 typedef std::pair<sc_core::sc_interface *, std::string> keytype;
40 typedef std::vector<sc_core::sc_port_base *> valuetype;
41
43 void init(sc_core::sc_object *object,
44 iface::SimulationInterface *simulation);
45 std::vector<conf_object_t *> port_to_proxies() override;
46 const char *if_typename() override;
47 int max_number_of_proxies() override;
49
50 protected:
51 static std::map<keytype, valuetype> ports_;
52
53 private:
54 class Item {
55 public:
56 Item(sc_core::sc_interface *iface) // NOLINT[runtime/explicit]
57 : iface_(iface), port_(NULL) {}
58 Item(sc_core::sc_port_base *port) // NOLINT[runtime/explicit]
59 : iface_(NULL), port_(port) {}
60
61 sc_core::sc_interface* iface_;
62 sc_core::sc_port_base* port_;
63 };
64
65 int countLevels(sc_core::sc_object *object);
66 std::string extractStem(sc_core::sc_object *object);
67 conf_object_t *ifaceToObj(sc_core::sc_interface *iface);
68 bool compareStem(std::string stem, sc_core::sc_object *object);
69 std::vector<Item> bind_info_;
70 sc_core::sc_port_base *base_;
71 std::string base_typename_;
72 int max_number_of_proxies_;
73 iface::SimulationInterface *simulation_;
74};
75
76} // namespace awareness
77} // namespace systemc
78} // namespace simics
79
80#endif
Definition: sc_port_connection.h:37
static std::map< keytype, valuetype > ports_
Definition: sc_port_connection.h:51
void init(sc_core::sc_object *object, iface::SimulationInterface *simulation)
std::pair< sc_core::sc_interface *, std::string > keytype
Definition: sc_port_connection.h:39
std::vector< sc_core::sc_port_base * > valuetype
Definition: sc_port_connection.h:40
std::vector< conf_object_t * > port_to_proxies() override
Definition: sc_port_interface.h:25
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
Definition: adapter.h:79