SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
sc_memory_profiler_simics_adapter.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_IFACE_SC_MEMORY_PROFILER_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_SC_MEMORY_PROFILER_SIMICS_ADAPTER_H
18
21
22#include <systemc-interfaces.h>
23
24#include <string>
25#include <vector>
26
27namespace simics {
28namespace systemc {
29namespace iface {
30
31template<typename TBase, typename TInterface = ScMemoryProfilerInterface>
33 : public SimicsAdapter<sc_memory_profiler_interface_t> {
34 public:
36 : SimicsAdapter<sc_memory_profiler_interface_t>(
37 SC_MEMORY_PROFILER_INTERFACE, init_iface()) {}
38
39 protected:
40 static attr_value_t allocations(conf_object_t *obj) {
41 return adapter<TBase, TInterface>(obj)->allocations();
42 }
43
44 private:
45 std::vector<std::string> description(conf_object_t *obj,
46 DescriptionType type) {
47 return descriptionBase<TBase, TInterface>(obj, type);
48 }
49 sc_memory_profiler_interface_t init_iface() {
50 sc_memory_profiler_interface_t iface = {};
51 iface.allocations = allocations;
52 return iface;
53 }
54};
55
56} // namespace iface
57} // namespace systemc
58} // namespace simics
59
60#endif // SIMICS_SYSTEMC_IFACE_SC_MEMORY_PROFILER_SIMICS_ADAPTER_H
Definition: sc_memory_profiler_simics_adapter.h:33
ScMemoryProfilerSimicsAdapter()
Definition: sc_memory_profiler_simics_adapter.h:35
static attr_value_t allocations(conf_object_t *obj)
Definition: sc_memory_profiler_simics_adapter.h:40
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:47
DescriptionType
Definition: description_interface.h:25
Definition: pci_bus_interface.h:24