ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Public Attributes | Private Attributes | List of all members
etiss::interfaces::Delegate Class Reference

#include <Delegate.h>

Inheritance diagram for etiss::interfaces::Delegate:
Inheritance graph
[legend]
Collaboration diagram for etiss::interfaces::Delegate:
Collaboration graph
[legend]

Public Member Functions

 Delegate (ETISS_System &system, ETISS_CPU &cpu)
 
void syncTime (uint64_t time_ps)
 
etiss::int32 read (bool ibus, uint64_t &time_ps, uint64_t addr, uint8_t *buf, unsigned len)
 handles read operations. More...
 
etiss::int32 write (bool ibus, uint64_t &time_ps, uint64_t addr, uint8_t *buf, unsigned len)
 handles write operations. More...
 

Public Attributes

std::function< etiss::int32(bool, uint64_t &, uint64_t, uint8_t *, unsigned, bool &, bool &)> injectedRead
 if valid then this function will be called by read() instead of performing any action itself More...
 
std::function< etiss::int32(bool, uint64_t &, uint64_t, uint8_t *, unsigned, bool &, bool &)> redirectedWrite
 
std::function< void(bool injected, const uint64_t &time_ps, uint64_t addr, const uint8_t *buf, unsigned len)> snoopRead
 

Private Attributes

ETISS_Systemsystem
 
ETISS_CPUcpu
 

Detailed Description

Definition at line 76 of file Delegate.h.

Constructor & Destructor Documentation

◆ Delegate()

etiss::interfaces::Delegate::Delegate ( ETISS_System system,
ETISS_CPU cpu 
)

Definition at line 50 of file Delegate.cpp.

Member Function Documentation

◆ read()

etiss::int32 etiss::interfaces::Delegate::read ( bool  ibus,
uint64_t time_ps,
uint64_t  addr,
uint8_t buf,
unsigned  len 
)

handles read operations.

the time value will be increased by the time spend by the bus

Definition at line 66 of file Delegate.cpp.

References cpu, ETISS_CPU::cpuTime_ps, ETISS_System::dbg_read, ETISS_System::dread, etiss::FATALERROR, ETISS_System::handle, injectedRead, int32_t, ETISS_System::iread, etiss::log(), etiss::mm::NOERROR, snoopRead, system, and unlikely.

Here is the call graph for this function:

◆ syncTime()

void etiss::interfaces::Delegate::syncTime ( uint64_t  time_ps)

Definition at line 52 of file Delegate.cpp.

References cpu, ETISS_CPU::cpuTime_ps, etiss::FATALERROR, ETISS_System::handle, etiss::log(), ETISS_System::syncTime, and system.

Here is the call graph for this function:

◆ write()

etiss::int32 etiss::interfaces::Delegate::write ( bool  ibus,
uint64_t time_ps,
uint64_t  addr,
uint8_t buf,
unsigned  len 
)

handles write operations.

the time value will be increased by the time spend by the bus

Definition at line 124 of file Delegate.cpp.

References cpu, ETISS_CPU::cpuTime_ps, ETISS_System::dwrite, etiss::FATALERROR, ETISS_System::handle, int32_t, ETISS_System::iwrite, etiss::log(), etiss::mm::NOERROR, redirectedWrite, and system.

Here is the call graph for this function:

Member Data Documentation

◆ cpu

ETISS_CPU& etiss::interfaces::Delegate::cpu
private

Definition at line 80 of file Delegate.h.

Referenced by read(), syncTime(), and write().

◆ injectedRead

std::function<etiss::int32(bool , uint64_t & , uint64_t , uint8_t * , unsigned , bool & , bool & )> etiss::interfaces::Delegate::injectedRead

if valid then this function will be called by read() instead of performing any action itself

Definition at line 102 of file Delegate.h.

Referenced by read().

◆ redirectedWrite

std::function<etiss::int32(bool , uint64_t & , uint64_t , uint8_t * , unsigned , bool & , bool & )> etiss::interfaces::Delegate::redirectedWrite

Definition at line 105 of file Delegate.h.

Referenced by write().

◆ snoopRead

std::function<void(bool injected, const uint64_t &time_ps, uint64_t addr, const uint8_t *buf, unsigned len)> etiss::interfaces::Delegate::snoopRead

Definition at line 108 of file Delegate.h.

Referenced by read().

◆ system

ETISS_System& etiss::interfaces::Delegate::system
private

Definition at line 79 of file Delegate.h.

Referenced by read(), syncTime(), and write().


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