Go to the source code of this file.
Functions | |
Memory * | mem_new (void) |
void | mem_construct (Memory *mem) |
void | mem_destroy (void *mem) |
void | mem_attach (Memory *mem, VDevice *dev) |
VDevice * | mem_get_vdevice_by_addr (Memory *mem, int addr) |
VDevice * | mem_get_vdevice_by_name (Memory *mem, char *name) |
uint8_t | mem_read (Memory *mem, int addr) |
void | mem_write (Memory *mem, int addr, uint8_t val) |
void | mem_reset (Memory *mem) |
void | mem_io_fetch (Memory *mem, int addr, uint8_t *val, char *buf, int bufsiz) |
void | mem_dump_core (Memory *mem, FILE *f_core) |
This module provides functions for reading and writing to simulated memory. The Memory class is a subclass of AvrClass.
Definition in file memory.c.
|
Allocates memory for a new memory object. Definition at line 66 of file memory.c. References avr_new, class_overload_destroy(), mem_construct(), and mem_destroy(). Referenced by avr_core_construct(). |
|
Constructor for the memory object. Definition at line 80 of file memory.c. References avr_error, and class_construct(). Referenced by mem_new(). |
|
Descructor for the memory object. Definition at line 93 of file memory.c. References class_destroy(), and dlist_delete_all(). Referenced by mem_new(). |
|
Attach a device to the device list. Devices that are accessed more often should be attached last so that they will be at the front of the list. A default virtual device can be overridden by attaching a new device ahead of it in the list. Definition at line 114 of file memory.c. References avr_error, and dlist_add_head(). Referenced by memstack_construct(). |
|
Find the VDevice associated with the given address. Definition at line 129 of file memory.c. References dlist_lookup(), and vdev_addr_cmp(). Referenced by mem_io_fetch(), mem_read(), and mem_write(). |
|
Find the VDevice associated with the given name. Definition at line 138 of file memory.c. References dlist_lookup(), and vdev_name_cmp(). Referenced by avr_core_add_ext_rd_wr(), avr_core_get_sizes(), and avr_core_load_eeprom(). |
|
Reads byte from memory and sanity-checks for valid address.
References avr_warning, mem_get_vdevice_by_addr(), and vdev_read(). |
|
Writes byte to memory and updates display for io registers.
References avr_warning, display_io_reg(), mem_get_vdevice_by_addr(), and vdev_write(). |
|
Resets every device in the memory object.
References dlist_iterator(). Referenced by avr_core_reset(). |
|
Fetch the name and value of the io register (addr).
References mem_get_vdevice_by_addr(), port_ext_disable(), port_ext_enable(), vdev_get_name(), vdev_get_reg_name(), and vdev_read(). Referenced by avr_core_io_display_names(). |
|
Dump all the various memory locations to a file descriptor in text format.
Referenced by avr_core_dump_core(). |