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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2015 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_AWARENESS_SC_PORT_CONNECTION_H
17#define SIMICS_SYSTEMC_AWARENESS_SC_PORT_CONNECTION_H
18
19
22
23#include <systemc>
24
25#include <map>
26#include <string>
27#include <utility>
28#include <vector>
29
30namespace simics {
31namespace systemc {
32namespace awareness {
33
40 public:
41 typedef std::pair<sc_core::sc_interface *, std::string> keytype;
42 typedef std::vector<sc_core::sc_port_base *> valuetype;
43
45 void init(sc_core::sc_object *object,
46 iface::SimulationInterface *simulation);
47 virtual std::vector<conf_object_t *> port_to_proxies();
48 virtual const char *if_typename();
49 virtual int max_number_of_proxies();
51
52 protected:
53 static std::map<keytype, valuetype> ports_;
54
55 private:
56 class Item {
57 public:
58 Item(sc_core::sc_interface *iface) // NOLINT[runtime/explicit]
59 : iface_(iface), port_(NULL) {}
60 Item(sc_core::sc_port_base *port) // NOLINT[runtime/explicit]
61 : iface_(NULL), port_(port) {}
62
63 sc_core::sc_interface* iface_;
64 sc_core::sc_port_base* port_;
65 };
66
67 int countLevels(sc_core::sc_object *object);
68 std::string extractStem(sc_core::sc_object *object);
69 conf_object_t *ifaceToObj(sc_core::sc_interface *iface);
70 bool compareStem(std::string stem, sc_core::sc_object *object);
71 std::vector<Item> bind_info_;
72 sc_core::sc_port_base *base_;
73 std::string base_typename_;
74 int max_number_of_proxies_;
75 iface::SimulationInterface *simulation_;
76};
77
78} // namespace awareness
79} // namespace systemc
80} // namespace simics
81
82#endif
Definition: sc_port_connection.h:39
static std::map< keytype, valuetype > ports_
Definition: sc_port_connection.h:53
void init(sc_core::sc_object *object, iface::SimulationInterface *simulation)
std::pair< sc_core::sc_interface *, std::string > keytype
Definition: sc_port_connection.h:41
std::vector< sc_core::sc_port_base * > valuetype
Definition: sc_port_connection.h:42
virtual std::vector< conf_object_t * > port_to_proxies()
Definition: sc_port_interface.h:27
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Definition: pci_bus_interface.h:24