Line 58... |
Line 58... |
int chip_select; /* Needed by memory controller; specifies chip
|
int chip_select; /* Needed by memory controller; specifies chip
|
* select number for this memory area. */
|
* select number for this memory area. */
|
int valid; /* This bit reflect the memory controler valid bit */
|
int valid; /* This bit reflect the memory controler valid bit */
|
FILE *log; /* log file if this device is to be logged, NULL otherwise */
|
FILE *log; /* log file if this device is to be logged, NULL otherwise */
|
|
|
uint32_t (*readfunc)(oraddr_t);
|
uint32_t (*readfunc)(oraddr_t, void *);
|
void (*writefunc)(oraddr_t, uint32_t);
|
void (*writefunc)(oraddr_t, uint32_t, void *);
|
/* private data */
|
/* private data */
|
unsigned long misc;
|
void *priv_dat;
|
};
|
};
|
|
|
extern struct iqueue_entry iqueue[20];
|
extern struct iqueue_entry iqueue[20];
|
extern struct iqueue_entry icomplet[20];
|
extern struct iqueue_entry icomplet[20];
|
extern oraddr_t pc;
|
extern oraddr_t pc;
|
Line 110... |
Line 110... |
/* Register read and write function for a memory area.
|
/* Register read and write function for a memory area.
|
addr is inside the area, if addr & addr_mask == addr_compare
|
addr is inside the area, if addr & addr_mask == addr_compare
|
(used also by peripheral devices like 16450 UART etc.) */
|
(used also by peripheral devices like 16450 UART etc.) */
|
void register_memoryarea_mask(oraddr_t addr_mask, oraddr_t addr_compare,
|
void register_memoryarea_mask(oraddr_t addr_mask, oraddr_t addr_compare,
|
uint32_t size, unsigned granularity, unsigned mc_dev,
|
uint32_t size, unsigned granularity, unsigned mc_dev,
|
uint32_t (readfunc)(oraddr_t),
|
uint32_t (readfunc)(oraddr_t, void *),
|
void (writefunc)(oraddr_t, uint32_t));
|
void (writefunc)(oraddr_t, uint32_t, void *),
|
|
void *dat);
|
|
|
/* Register read and write function for a memory area.
|
/* Register read and write function for a memory area.
|
Memory areas should be aligned. Memory area is rounded up to
|
Memory areas should be aligned. Memory area is rounded up to
|
fit the nearest 2^n aligment.
|
fit the nearest 2^n aligment.
|
(used also by peripheral devices like 16450 UART etc.)
|
(used also by peripheral devices like 16450 UART etc.)
|
If mc_dev is 1, this means that this device will be checked first for match
|
If mc_dev is 1, this means that this device will be checked first for match
|
and will be accessed in case in overlaping memory spaces.
|
and will be accessed in case in overlaping memory spaces.
|
Only one device can have this set to 1 (used for memory controller) */
|
Only one device can have this set to 1 (used for memory controller) */
|
void register_memoryarea(oraddr_t addr, uint32_t size, unsigned granularity,
|
void register_memoryarea(oraddr_t addr, uint32_t size, unsigned granularity,
|
unsigned mc_dev, uint32_t (readfunc)(oraddr_t),
|
unsigned mc_dev, uint32_t (readfunc)(oraddr_t, void *),
|
void (writefunc)(oraddr_t, uint32_t));
|
void (writefunc)(oraddr_t, uint32_t, void *),
|
|
void *dat);
|
|
|
/* Finds the memory area for the address and adjust the read and write delays for it. */
|
/* Finds the memory area for the address and adjust the read and write delays for it. */
|
void adjust_rw_delay(oraddr_t memaddr, unsigned int delayr, unsigned int delayw);
|
void adjust_rw_delay(oraddr_t memaddr, unsigned int delayr, unsigned int delayw);
|
|
|
/* Check if access is to registered area of memory. */
|
/* Check if access is to registered area of memory. */
|
Line 136... |
Line 138... |
char *generate_time_pretty (char *dest, long time_ps);
|
char *generate_time_pretty (char *dest, long time_ps);
|
|
|
/* Returns 32-bit values from mem array. */
|
/* Returns 32-bit values from mem array. */
|
uint32_t eval_insn(oraddr_t, int *);
|
uint32_t eval_insn(oraddr_t, int *);
|
|
|
void simmem_write_word(oraddr_t addr, uint32_t value);
|
|
|
|
uint32_t simmem_read_word(oraddr_t addr);
|
|
|
|
uint32_t eval_direct32(oraddr_t addr, int *breakpoint, int through_mmu, int through_dc);
|
uint32_t eval_direct32(oraddr_t addr, int *breakpoint, int through_mmu, int through_dc);
|
|
|
void set_direct32(uint32_t addr, uint32_t value, int *breakpoint, int through_mmu, int through_dc);
|
void set_direct32(uint32_t addr, uint32_t value, int *breakpoint, int through_mmu, int through_dc);
|
|
|
/* Temporary variable to increase speed. */
|
/* Temporary variable to increase speed. */
|