ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
PTEFormat.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
6
12#include "etiss/mm/PTEFormat.h"
13
14namespace etiss
15{
16namespace mm
17{
18
19void PTEFormat::AddBitField(std::string name, uint32_t begin, uint32_t end)
20{
21 if ((begin + 1) > pte_len_)
22 {
23 pte_len_ = begin + 1;
24 }
25 format_map_.insert(std::make_pair(name, std::make_pair(begin, end)));
26}
27
28void PTEFormat::DumpBitFild(std::string name)
29{
30 using std::cout;
31 using std::endl;
32 PTEFormatMap::iterator itr = format_map_.find(name);
33 if (itr != format_map_.end())
34 {
35 cout << "Bit Field Name : [" << itr->first << "] Position: [" << std::dec << itr->second.first << ","
36 << std::dec << itr->second.second << "]" << endl;
37 return;
38 }
39 cout << "Bit Field Name : [" << name << "] not founded" << endl;
40 return;
41}
42
44{
45 using std::cout;
46 using std::endl;
47 cout << "-------PTE Format Details------" << endl;
48 for (PTEFormatMap::iterator itr = format_map_.begin(); itr != format_map_.end(); ++itr)
49 {
50 cout << "Bit Field Name : [" << itr->first << "] Position: [" << itr->second.first << "," << itr->second.second
51 << "]" << endl;
52 }
53 return;
54}
55
56} // namespace mm
57} // namespace etiss
static __inline__ uint32_t
Definition arm_cde.h:25
void DumpBitFild(std::string name)
Dump the details of the bit field according to given name.
Definition PTEFormat.cpp:28
void Dump()
Dump the details of the whole PTE format.
Definition PTEFormat.cpp:43
void AddBitField(std::string name, uint32_t begin, uint32_t end)
Called only by PTEFormatBuilder.
Definition PTEFormat.cpp:19
PTEFormatMap format_map_
Definition PTEFormat.h:63
forwards: include/jit/*
Definition Benchmark.h:17