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