Line 1... |
Line 1... |
/* config.h -- Simulator configuration header file
|
/* sim-config.h -- Simulator configuration header file
|
Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
|
Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
|
|
|
This file is part of OpenRISC 1000 Architectural Simulator.
|
This file is part of OpenRISC 1000 Architectural Simulator.
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
Line 23... |
Line 23... |
#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_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_SBUF_LEN 256 /* Max. length of store buffer */
|
#define MAX_SBUF_LEN 256 /* Max. length of store buffer */
|
|
|
#define EXE_LOG_HARDWARE 0 /* Print out RTL states */
|
#define EXE_LOG_HARDWARE 0 /* Print out RTL states */
|
#define EXE_LOG_SIMPLE 1 /* Executed log prints out dissasembly */
|
#define EXE_LOG_SIMPLE 1 /* Executed log prints out dissasembly */
|
#define EXE_LOG_SOFTWARE 2 /* Simple with some register output*/
|
#define EXE_LOG_SOFTWARE 2 /* Simple with some register output*/
|
Line 216... |
Line 215... |
int profile; /* Whether profiling was enabled */
|
int profile; /* Whether profiling was enabled */
|
int mprofile; /* Whether memory profiling was enabled */
|
int mprofile; /* Whether memory profiling was enabled */
|
} simcmd;
|
} simcmd;
|
|
|
struct {
|
struct {
|
unsigned long ifea; /* Instruction fetch effective address */
|
|
unsigned long lea; /* Load effective address */
|
|
unsigned long sea; /* Store effective address */
|
|
unsigned long ld; /* Load data */
|
|
unsigned long sd; /* Store data */
|
|
unsigned long lsea; /* Load/Store effective address */
|
|
long long instructions; /* Instructions executed */
|
long long instructions; /* Instructions executed */
|
long long reset_instructions;
|
long long reset_instructions;
|
|
|
int stalled;
|
int stalled;
|
int hazardwait; /* how many cycles were wasted because of hazards */
|
int hazardwait; /* how many cycles were wasted because of hazards */
|
Line 319... |
Line 312... |
void (*sec_end)(void *));
|
void (*sec_end)(void *));
|
|
|
extern struct config_section *cur_section;
|
extern struct config_section *cur_section;
|
#define CONFIG_ERROR(s) {fprintf (stderr, "ERROR: config.%s:%s\n", cur_section->name, s); if (runtime.sim.init) exit (1);}
|
#define CONFIG_ERROR(s) {fprintf (stderr, "ERROR: config.%s:%s\n", cur_section->name, s); if (runtime.sim.init) exit (1);}
|
|
|
/* FIXME: These will disapeer... */
|
/* FIXME: These will disapeer one day... */
|
void change_device ();
|
|
void end_device ();
|
|
extern int current_device;
|
|
|
|
/* FIXME: These will disapeer with the above... */
|
|
void reg_mc_sec(void);
|
void reg_mc_sec(void);
|
void reg_uart_sec(void);
|
void reg_uart_sec(void);
|
void reg_dma_sec(void);
|
void reg_dma_sec(void);
|
void reg_memory_sec(void);
|
void reg_memory_sec(void);
|
void reg_debug_sec(void);
|
void reg_debug_sec(void);
|