sim_peripheral.h Source File
|
yasimavr
|
Loading...
Searching...
No Matches
sim_peripheral.h
Go to the documentation of this file.
Definition sim_cycle_timer.h:41
Definition sim_ioreg.h:69
virtual uint8_t ioreg_read_handler(reg_addr_t addr, uint8_t value)=0
virtual uint8_t ioreg_peek_handler(reg_addr_t addr, uint8_t value)=0
virtual void ioreg_write_handler(reg_addr_t addr, const ioreg_write_t &data)=0
Definition sim_logger.h:91
Peripheral(const Peripheral &)=delete
Device * device() const
Access to the device. It is null before init() is called.
Definition sim_peripheral.h:381
void clear_ioreg(reg_addr_t addr, bitmask_t bm=0xFF)
Definition sim_peripheral.h:462
void write_ioreg(reg_addr_t addr, bitmask_t bm, uint8_t value)
Definition sim_peripheral.cpp:160
Logger & logger()
Logging object associated with this peripheral.
Definition sim_peripheral.h:387
void add_ioreg(const regmask_t &rm, IORegister::BitMode bitmode=IORegister::RW)
Definition sim_peripheral.h:392
Peripheral & operator=(const Peripheral &)=delete
ctl_id_t id() const
Unique identifier of the peripheral.
Definition sim_peripheral.h:375
void set_ioreg(reg_addr_t addr, bitmask_t bm=0xFF)
Definition sim_peripheral.h:447
bit spec structure. Represent a field in a I/O register. It works the same as bitmask_t except used b...
Definition sim_types.h:287
constexpr uint8_t shift_and_mask(uint8_t value) const
Transform the field value to its true representation and position in the 8-bits of the register.
constexpr uint8_t extract(uint8_t reg) const
Extract the field value and shift right by the LSB.
Definition sim_types.h:431
constexpr uint8_t extract(uint8_t reg) const
Extract the field value and shift right by the LSB.
constexpr uint8_t shift_and_mask(uint8_t value) const
Transform the field value to its true representation and position in the 8-bits of the register.
Representation of a ID internally represented as a 64-bits integer but can be initialised with a stri...
Definition sim_types.h:627
Definition sim_types.h:495
const T * find_reg_config_p(const std::vector< T > &v, uint64_t reg_value)
Definition sim_peripheral.h:268
int find_reg_config(const std::vector< T > &v, uint64_t reg_value)
Definition sim_peripheral.h:257
Definition sim_peripheral.h:489
uint8_t reset
Reset value of the I/O register.
Definition sim_peripheral.h:491
regmask_t reg
Address and mask of the I/O register.
Definition sim_peripheral.h:490
unsigned short cycles
Number of cycles to be consumed, only for write (SPM) requests and if result>=0.
Definition sim_peripheral.h:232
uint16_t data
Value [to write to/read from] the NVM.
Definition sim_peripheral.h:228
signed char result
Result of the request : >0:success, 0:ignored, <0:error/refused.
Definition sim_peripheral.h:230
mem_addr_t addr
Address to write/read (in the appropriate block address space)
Definition sim_peripheral.h:226
int nvm
Memory block being written/read : -1 if unknown/irrelevant, otherwise one of AVR_NVM enumeration valu...
Definition sim_peripheral.h:224
unsigned char kind
Kind of request : 0:write (SPM), 1:read (LPM)
Definition sim_peripheral.h:222
Definition sim_peripheral.h:252
Definition sim_peripheral.h:237
Definition sim_ioreg.h:39
Generated by