ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RegField_RV32IMACFD Class Reference

Generated on Wed, 08 May 2024 17:36:07 +0200. More...

#include <RV32IMACFDArchSpecificImp.h>

Inheritance diagram for RegField_RV32IMACFD:
Inheritance graph
[legend]
Collaboration diagram for RegField_RV32IMACFD:
Collaboration graph
[legend]

Public Member Functions

 RegField_RV32IMACFD (etiss::VirtualStruct &parent, unsigned gprid)
 
 RegField_RV32IMACFD (etiss::VirtualStruct &parent, std::string name, unsigned gprid)
 
virtual ~RegField_RV32IMACFD ()
 
- Public Member Functions inherited from etiss::VirtualStruct::Field
 Field (VirtualStruct &parent, const std::string &name, const std::string &prettyname, int flags, size_t width, size_t bitwidth=0)
 
 Field (VirtualStruct &parent, const std::string &name, const std::string &prettyname, int flags, size_t width, bool virtual_enabled, std::function< uint64_t()> lread, std::function< void(uint64_t)> lwrite, size_t bitwidth=0)
 
virtual ~Field ()
 
uint64_t read () const
 function to read bits/a value from the Field. More...
 
void write (uint64_t)
 function to write bits/a value to the Field. More...
 
bool applyBitflip (unsigned position, uint64_t fault_id)
 function to write a bitflip to a field More...
 
bool applyAction (const etiss::fault::Fault &f, const etiss::fault::Action &a, std::string &errormsg)
 advanced fault injection. Field must have the A flag to use this. More...
 
void signalWrite ()
 this function should be called if the listener flag is set and the field changed without using the write() function. More...
 
FieldsetDeleteP (std::function< void(Field *)> del)
 
FieldsetDelete (std::function< void(Field *)> del)
 
bool addListener (Listener *listener, std::shared_ptr< Listener > ref=nullptr)
 
void removeListener (Listener *listener, std::shared_ptr< Listener > ref=nullptr)
 

Protected Member Functions

virtual uint64_t _read () const
 override this function to implement reads in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA More...
 
virtual void _write (uint64_t val)
 override this function to implement writes in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA More...
 
- Protected Member Functions inherited from etiss::VirtualStruct::Field
virtual bool _applyBitflip (unsigned position, uint64_t fault_id)
 override this function to implement bitflip applying to a field More...
 
virtual bool _applyAction (const etiss::fault::Fault &f, const etiss::fault::Action &a, std::string &errormsg)
 override this function to implement advanced action handling More...
 

Private Attributes

const unsigned gprid_
 

Additional Inherited Members

- Public Types inherited from etiss::VirtualStruct::Field
enum  AccessMode { VIRTUAL , LAMBDA , PREFER_LAMBDA }
 defines how a field should perform reads/writes. More...
 
- Public Attributes inherited from etiss::VirtualStruct::Field
VirtualStructparent_
 reference to parent virtual struct More...
 
const std::string name_
 name of the field. More...
 
const std::string prettyname_
 alternative/human readable name of the field. More...
 
const int flags_
 read write flags as specified by the static const int parameters of Field: R,W,L More...
 
const size_t width_
 width in bytes (rounded up if neccessary) More...
 
const size_t bitwidth_
 width in bits More...
 
const AccessMode accessMode_
 
std::function< bool(unsigned position, uint64_t fault_id)> lapplyBitflip
 if this function is set the the default implementation of applyBitflip will use it More...
 
std::function< void(Field *)> delete_
 
- Static Public Attributes inherited from etiss::VirtualStruct::Field
static const int R = 1
 read flag More...
 
static const int W = 2
 write flag More...
 
static const int RW = R | W
 flags to signal that a field supports read and write operations More...
 
static const int L = 4
 supports listener plugins; used for etiss::RegisterDevicePlugins to determine access to a variable/field More...
 
static const int F = 8
 supports fault injection/tracing More...
 
static const int A = 16
 supports advanced fault injection/tracing with the applyAction function More...
 
static const int P = 32
 private field: this flag indicates that this field is an implementation specific field that e.g. More...
 
- Protected Attributes inherited from etiss::VirtualStruct::Field
std::function< uint64_t()> lread
 set this function for reads in case of AccessMode::LAMBDA / AccessMode::PREFER_LAMBDA More...
 
std::function< void(uint64_t)> lwrite
 set this function for writes in case of AccessMode::LAMBDA / AccessMode::PREFER_LAMBDA More...
 

Detailed Description

Generated on Wed, 08 May 2024 17:36:07 +0200.

This file contains the architecture specific header for the RV32IMACFD core architecture.

WARNING: This file contains user-added code, be mindful when overwriting this with generated code!

VirtualStruct for RV32IMACFD architecture to faciliate register acess

VirtualStruct enables user to access certain register via their name without knowning ETISS hierarchy of a core. Further fiels might be needed to enable gdbserver etc.

Definition at line 21 of file RV32IMACFDArchSpecificImp.h.

Constructor & Destructor Documentation

◆ RegField_RV32IMACFD() [1/2]

RegField_RV32IMACFD::RegField_RV32IMACFD ( etiss::VirtualStruct parent,
unsigned  gprid 
)
inline

Definition at line 25 of file RV32IMACFDArchSpecificImp.h.

◆ RegField_RV32IMACFD() [2/2]

RegField_RV32IMACFD::RegField_RV32IMACFD ( etiss::VirtualStruct parent,
std::string  name,
unsigned  gprid 
)
inline

Definition at line 35 of file RV32IMACFDArchSpecificImp.h.

◆ ~RegField_RV32IMACFD()

virtual RegField_RV32IMACFD::~RegField_RV32IMACFD ( )
inlinevirtual

Definition at line 45 of file RV32IMACFDArchSpecificImp.h.

Member Function Documentation

◆ _read()

virtual uint64_t RegField_RV32IMACFD::_read ( ) const
inlineprotectedvirtual

override this function to implement reads in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA

Reimplemented from etiss::VirtualStruct::Field.

Definition at line 48 of file RV32IMACFDArchSpecificImp.h.

References gprid_, etiss::VirtualStruct::Field::parent_, etiss::VirtualStruct::structure_, and uint64_t.

◆ _write()

virtual void RegField_RV32IMACFD::_write ( uint64_t  )
inlineprotectedvirtual

override this function to implement writes in case of AccessMode::VIRTUAL / AccessMode::PREFER_LAMBDA

Reimplemented from etiss::VirtualStruct::Field.

Definition at line 52 of file RV32IMACFDArchSpecificImp.h.

References gprid_, etiss::log(), etiss::VirtualStruct::Field::name_, etiss::VirtualStruct::Field::parent_, etiss::VirtualStruct::structure_, and etiss::VERBOSE.

Here is the call graph for this function:

Member Data Documentation

◆ gprid_

const unsigned RegField_RV32IMACFD::gprid_
private

Definition at line 23 of file RV32IMACFDArchSpecificImp.h.

Referenced by _read(), and _write().


The documentation for this class was generated from the following file: