SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
inject_map_info.h
Go to the documentation of this file.
1/*
2 © 2017 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_INJECTION_EXTENSION_INJECT_MAP_INFO_H
15#define SIMICS_SYSTEMC_INJECTION_EXTENSION_INJECT_MAP_INFO_H
16
17
18
23
24#include <string>
25
26namespace simics {
27namespace systemc {
28namespace injection {
29namespace extension {
30
32template <typename TPAYLOAD>
33class InjectMapInfo : public InjectBase<TPAYLOAD> {
34 public:
36
37 bool setValue(AttrDictParser *parser, const std::string &key,
38 attr_value_t *attr, TPAYLOAD *gp) override {
39 if (key == "") {
40 AttrDictParser p = parser->init(attr);
41 MapInfoParser info;
42 if (!p.parse(&info))
43 return false;
44
45 // The created extension is deleted in the InjectRegistry when the
46 // GP is deleted.
47 delete gp->set_extension(
49 return true;
50 }
51
52 return false;
53 }
54};
55
56} // namespace extension
57} // namespace injection
58} // namespace systemc
59} // namespace simics
60
61#endif
#define ATTR_DICT_PARSER_NAMESPACE(ns)
Definition: attr_dict_parser.h:32
Additional mapping information for the Simics io_memory access.
Definition: map_info_extension.h:29
Definition: attr_dict_parser.h:38
bool parse(ParserInterface *parser)
AttrDictParser init(const attr_value_t *attr)
Definition: inject_base.h:43
bool setValue(AttrDictParser *parser, const std::string &key, attr_value_t *attr, TPAYLOAD *gp) override
Definition: inject_map_info.h:37
types::map_info_t map_info_
Definition: map_info_parser.h:62
Definition: adapter.h:79