Line 22... |
Line 22... |
|
|
#include <stdio.h>
|
#include <stdio.h>
|
|
|
/* Simulator configuration macros. Eventually this one will be a lot bigger. */
|
/* Simulator configuration macros. Eventually this one will be a lot bigger. */
|
|
|
#define MAX_ETHERNETS 4 /* Max. number of Ethernet MACs */
|
|
#define MAX_GPIOS 4 /* Max. number of GPIO modules */
|
#define MAX_GPIOS 4 /* Max. number of GPIO modules */
|
#define MAX_MEMORIES 16 /* Max. number of memory devices attached */
|
#define MAX_MEMORIES 16 /* Max. number of memory devices attached */
|
#define MAX_ATAS 4 /* Max. number of ATAS */
|
#define MAX_ATAS 4 /* Max. number of ATAS */
|
#define MAX_SBUF_LEN 256 /* Max. length of store buffer */
|
#define MAX_SBUF_LEN 256 /* Max. length of store buffer */
|
|
|
Line 39... |
Line 38... |
struct config {
|
struct config {
|
struct {
|
struct {
|
int enabled; /* Is tick timer enabled? */
|
int enabled; /* Is tick timer enabled? */
|
} tick;
|
} tick;
|
|
|
int nethernets;
|
|
struct {
|
|
unsigned long baseaddr;
|
|
int irq; /* IRQ of this device */
|
|
unsigned dma; /* Which controller is this ethernet "connected" to */
|
|
unsigned rtx_type; /* use file or socket interface */
|
|
unsigned tx_channel; /* DMA channel used for TX */
|
|
unsigned rx_channel; /* DMA channel used for RX */
|
|
char rxfile[STR_SIZE]; /* Filename for RX */
|
|
char txfile[STR_SIZE]; /* File for TX */
|
|
char sockif[STR_SIZE]; /* Socket Interface name ('lo', 'eth1',...) */
|
|
unsigned long base_vapi_id; /* VAPI id for this instance */
|
|
} ethernets[MAX_ETHERNETS];
|
|
|
|
int ngpios;
|
int ngpios;
|
struct {
|
struct {
|
unsigned long baseaddr; /* Base address */
|
unsigned long baseaddr; /* Base address */
|
int irq; /* IRQ of this device */
|
int irq; /* IRQ of this device */
|
unsigned long base_vapi_id; /* First VAPI ID. GPIO uses 8 consecutive IDs */
|
unsigned long base_vapi_id; /* First VAPI ID. GPIO uses 8 consecutive IDs */
|