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
RV64IMACFDArchSpecificImp.h
Go to the documentation of this file.
1
11#ifndef ETISS_RV64IMACFDArch_RV64IMACFDARCHSPECIFICIMP_H_
12#define ETISS_RV64IMACFDArch_RV64IMACFDARCHSPECIFICIMP_H_
13
22private:
23 const unsigned gprid_;
24public:
26 : Field(parent,
27 std::string("X")+etiss::toString(gprid),
28 std::string("X")+etiss::toString(gprid),
29 R|W,
30 8
31 ),
32 gprid_(gprid)
33 {}
34
35 RegField_RV64IMACFD(etiss::VirtualStruct & parent, std::string name, unsigned gprid)
36 : Field(parent,
37 name,
38 name,
39 R|W,
40 8
41 ),
42 gprid_(gprid)
43 {}
44
46
47protected:
48 virtual uint64_t _read() const {
50 }
51
52 virtual void _write(uint64_t val) {
53 etiss::log(etiss::VERBOSE, "write to ETISS cpu state", name_, val);
55 }
56};
57
59public:
61 : Field(parent,
62 "instructionPointer",
63 "instructionPointer",
64 R|W,
65 8
66 )
67 {}
68
70
71protected:
72 virtual uint64_t _read() const {
73 return (uint64_t) ((ETISS_CPU *)parent_.structure_)->instructionPointer;
74 }
75
76 virtual void _write(uint64_t val) {
77 etiss::log(etiss::VERBOSE, "write to ETISS cpu state", name_, val);
78 ((ETISS_CPU *)parent_.structure_)->instructionPointer = (etiss_uint64) val;
79 }
80};
81
82#endif
static __inline__ uint64_t
Definition arm_cde.h:31
uint64_t etiss_uint64
Definition types.h:96
Generated on Thu, 24 Oct 2024 10:16:12 +0200.
virtual void _write(uint64_t val)
override this function to implement writes in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA
RegField_RV64IMACFD(etiss::VirtualStruct &parent, std::string name, unsigned gprid)
virtual uint64_t _read() const
override this function to implement reads in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA
RegField_RV64IMACFD(etiss::VirtualStruct &parent, unsigned gprid)
a Field instance represents e.g.
static const int W
write flag
Field(VirtualStruct &parent, const std::string &name, const std::string &prettyname, int flags, size_t width, size_t bitwidth=0)
const std::string name_
name of the field.
VirtualStruct & parent_
reference to parent virtual struct
static const int R
read flag
abstract representation of an module of a simulation which could be a embedded device of the cpu of a...
pcField_RV64IMACFD(etiss::VirtualStruct &parent)
virtual uint64_t _read() const
override this function to implement reads in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA
virtual void _write(uint64_t val)
override this function to implement writes in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition Benchmark.h:53
@ VERBOSE
Definition Misc.h:130
void log(Verbosity level, std::string msg)
write log message at the given level.
Definition Misc.cpp:125
STL namespace.
basic cpu state structure needed for execution of any cpu architecture.
Definition CPU.h:89
Generated on Thu, 24 Oct 2024 10:16:12 +0200.
Definition RV64IMACFD.h:16