C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
bank-type.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2022 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_TYPE_BANK_TYPE_H
17#define SIMICS_TYPE_BANK_TYPE_H
18
19#include <tuple>
20#include <vector>
21#include <unordered_map>
22#include <cstdint>
23
24#include "common-types.h"
25#include "register-type.h"
26
27namespace simics {
28
29/*
30 * Type alias represents a type containing bank information
31 *
32 * It is a tuple consists of following members,
33 *
34 * 1. A name of the bank. The name should follow the Simics naming rules
35 * 2. A human-readable description of the bank
36 * 3. The contained registers on the bank
37 */
38using bank_t = std::tuple<Name, Description, std::vector<register_t>>;
39
40/*
41 * Type alias represents a type for bank memory
42 *
43 * It is an unordered_map consists of following members,
44 *
45 * Key is byte offset relative to this bank,
46 * Value is a 8 bits integer
47 */
48using bank_memory_t = std::unordered_map<Offset, uint8_t>;
49} // namespace simics
50
51#endif
Definition: attr-value.h:23
std::unordered_map< Offset, uint8_t > bank_memory_t
Definition: bank-type.h:48
std::tuple< Name, Description, std::vector< register_t > > bank_t
Definition: bank-type.h:38