SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Loading...
Searching...
No Matches
frequency_simics_adapter.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2018 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_FREQUENCY_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_FREQUENCY_SIMICS_ADAPTER_H
18
19#include <simics/devs/frequency.h>
22
23#include <string>
24#include <vector>
25
26namespace simics {
27namespace systemc {
28namespace iface {
29
31template<typename TBase, typename TInterface = FrequencyInterface>
32class FrequencySimicsAdapter : public SimicsAdapter<frequency_interface_t> {
33 public:
35 : SimicsAdapter<frequency_interface_t>(FREQUENCY_INTERFACE,
36 init_iface()) {
37 }
38
39 protected:
40 static double get(conf_object_t *obj) {
41 return adapter<TBase, TInterface>(obj)->get();
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 frequency_interface_t init_iface() {
50 frequency_interface_t iface = {};
51 iface.get = get;
52 return iface;
53 }
54};
55
56} // namespace iface
57} // namespace systemc
58} // namespace simics
59
60#endif
Definition: frequency_simics_adapter.h:32
static double get(conf_object_t *obj)
Definition: frequency_simics_adapter.h:40
FrequencySimicsAdapter()
Definition: frequency_simics_adapter.h:34
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