ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PTEFormat.cpp
Go to the documentation of this file.
1
50#include "etiss/mm/PTEFormat.h"
51
52namespace etiss
53{
54namespace mm
55{
56
57void PTEFormat::AddBitField(std::string name, uint32_t begin, uint32_t end)
58{
59 if ((begin + 1) > pte_len_)
60 {
61 pte_len_ = begin + 1;
62 }
63 format_map_.insert(std::make_pair(name, std::make_pair(begin, end)));
64}
65
66void PTEFormat::DumpBitFild(std::string name)
67{
68 using std::cout;
69 using std::endl;
70 PTEFormatMap::iterator itr = format_map_.find(name);
71 if (itr != format_map_.end())
72 {
73 cout << "Bit Field Name : [" << itr->first << "] Position: [" << std::dec << itr->second.first << ","
74 << std::dec << itr->second.second << "]" << endl;
75 return;
76 }
77 cout << "Bit Field Name : [" << name << "] not founded" << endl;
78 return;
79}
80
82{
83 using std::cout;
84 using std::endl;
85 cout << "-------PTE Format Details------" << endl;
86 for (PTEFormatMap::iterator itr = format_map_.begin(); itr != format_map_.end(); ++itr)
87 {
88 cout << "Bit Field Name : [" << itr->first << "] Position: [" << itr->second.first << "," << itr->second.second
89 << "]" << endl;
90 }
91 return;
92}
93
94} // namespace mm
95} // 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:66
void Dump()
Dump the details of the whole PTE format.
Definition PTEFormat.cpp:81
void AddBitField(std::string name, uint32_t begin, uint32_t end)
Called only by PTEFormatBuilder.
Definition PTEFormat.cpp:57
PTEFormatMap format_map_
Definition PTEFormat.h:99
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition Benchmark.h:53