ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
#include <Delegate.h>
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_System & | system |
ETISS_CPU & | cpu |
Definition at line 76 of file Delegate.h.
etiss::interfaces::Delegate::Delegate | ( | ETISS_System & | system, |
ETISS_CPU & | cpu | ||
) |
Definition at line 50 of file Delegate.cpp.
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.
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.
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.
|
private |
Definition at line 80 of file Delegate.h.
Referenced by read(), syncTime(), and write().
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().
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().
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().
|
private |
Definition at line 79 of file Delegate.h.
Referenced by read(), syncTime(), and write().