Line 15... |
Line 15... |
|
|
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
#ifndef _CONFIG_H_
|
|
#define _CONFIG_H_
|
|
|
#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_UARTS 4 /* Max. number of UARTs simulated */
|
#define MAX_UARTS 4 /* Max. number of UARTs simulated */
|
#define MAX_DMAS 4 /* Max. number of DMA controllers */
|
#define MAX_DMAS 4 /* Max. number of DMA controllers */
|
#define MAX_ETHERNETS 4 /* Max. number of Ethernet MACs */
|
#define MAX_ETHERNETS 4 /* Max. number of Ethernet MACs */
|
#define MAX_MEMORIES 16 /* Max. number of memory devices attached */
|
#define MAX_MEMORIES 16 /* Max. number of memory devices attached */
|
|
|
#define NONE 0
|
|
#define VIRTUAL 1
|
|
#define PHYSICAL 2
|
|
|
|
#define STR_SIZE (256)
|
#define STR_SIZE (256)
|
|
|
struct config {
|
struct config {
|
struct {
|
struct {
|
int tagtype;
|
|
} dc;
|
|
|
|
struct {
|
|
int tagtype;
|
|
} ic;
|
|
|
|
struct {
|
|
int enabled; /* Is tick timer enabled? */
|
int enabled; /* Is tick timer enabled? */
|
int irq; /* IRQ of this device */
|
int irq; /* IRQ of this device */
|
} tick;
|
} tick;
|
|
|
int clkcycle_ns; /* Clock cycle in nanoseconds */
|
int clkcycle_ns; /* Clock cycle in nanoseconds */
|
Line 123... |
Line 114... |
int entrysize; /* DTLB entry size */
|
int entrysize; /* DTLB entry size */
|
int ustates; /* number of DTLB usage states */
|
int ustates; /* number of DTLB usage states */
|
} dmmu;
|
} dmmu;
|
|
|
struct {
|
struct {
|
|
int tagtype;
|
|
int enabled; /* Whether instruction cache is enabled */
|
|
int nways; /* Number of IC ways */
|
|
int nsets; /* Number of IC sets */
|
|
int blocksize; /* IC entry size */
|
|
int ustates; /* number of IC usage states */
|
|
} ic;
|
|
|
|
struct {
|
|
int tagtype;
|
|
int enabled; /* Whether data cache is enabled */
|
|
int nways; /* Number of DC ways */
|
|
int nsets; /* Number of DC sets */
|
|
int blocksize; /* DC entry size */
|
|
int ustates; /* number of DC usage states */
|
|
} dc;
|
|
|
|
struct {
|
unsigned long upr; /* Unit present register */
|
unsigned long upr; /* Unit present register */
|
unsigned long ver, rev; /* Version register */
|
unsigned long ver, rev; /* Version register */
|
int superscalar; /* superscalara analysis */
|
int superscalar; /* superscalara analysis */
|
int hazards; /* dependency hazards analysis */
|
int hazards; /* dependency hazards analysis */
|
int dependstats; /* dependency statistics */
|
int dependstats; /* dependency statistics */
|
Line 192... |
Line 201... |
void read_script_file (char *filename);
|
void read_script_file (char *filename);
|
|
|
/* Executes set sim command. Returns nonzero if error. */
|
/* Executes set sim command. Returns nonzero if error. */
|
void set_config_command (char *s);
|
void set_config_command (char *s);
|
|
|
No newline at end of file
|
No newline at end of file
|
|
#endif
|
|
|
No newline at end of file
|
No newline at end of file
|