Go to the source code of this file.
Functions | |
Memory * | mem_new (int gpwr_end, int io_reg_end, int sram_end, int xram_end) |
void | mem_construct (Memory *mem, int gpwr_end, int io_reg_end, int sram_end, int xram_end) |
void | mem_destroy (void *mem) |
void | mem_attach (Memory *mem, int addr, char *name, VDevice *vdev, int flags, uint8_t reset_value, uint8_t rd_mask, uint8_t wr_mask) |
VDevice * | mem_get_vdevice_by_addr (Memory *mem, int addr) |
VDevice * | mem_get_vdevice_by_name (Memory *mem, char *name) |
void | mem_set_addr_name (Memory *mem, int addr, 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_new0, class_overload_destroy(), mem_construct(), and mem_destroy(). |
|
Constructor for the memory object.
Definition at line 80 of file memory.c. References avr_error, avr_new0, and class_construct(). Referenced by mem_new(). |
|
Descructor for the memory object.
Definition at line 99 of file memory.c. References avr_free(), class_destroy(), and class_unref(). 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 130 of file memory.c. References avr_error, and class_ref(). |
|
Find the VDevice associated with the given address.
Definition at line 159 of file memory.c. Referenced by avr_core_add_ext_rd_wr(), and memstack_construct(). |
|
Find the VDevice associated with the given name.
Definition at line 169 of file memory.c. References avr_error, and dlist_lookup(). Referenced by avr_core_load_eeprom(). |
|
Reads byte from memory and sanity-checks for valid address.
Definition at line 212 of file memory.c. References avr_warning, and vdev_read(). |
|
Writes byte to memory and updates display for io registers.
Definition at line 247 of file memory.c. References avr_warning, display_io_reg(), and vdev_write(). |
|
Resets every device in the memory object.
Definition at line 284 of file memory.c. References vdev_reset(). Referenced by avr_core_reset(). |
|
Fetch the name and value of the io register (addr).
Definition at line 322 of file memory.c. References vdev_read(). Referenced by avr_core_io_display_names(). |
|
Dump all the various memory locations to a file descriptor in text format.
Definition at line 483 of file memory.c. Referenced by avr_core_dump_core(). |