OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc3/] [or1ksim/] [cpu/] [common/] [execute.h] - Blame information for rev 1690

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 cvs
/* execute.h -- Header file for architecture dependent execute.c
2
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20 1452 nogj
#if DYNAMIC_EXECUTION
21
#include "dyn_rec.h"
22
#endif
23
 
24 1432 nogj
struct cpu_state {
25
  /* General purpose registers. */
26
  uorreg_t reg[MAX_GPRS];
27
 
28
  /* Sprs */
29
  uorreg_t sprs[MAX_SPRS];
30
 
31
  /* Effective address of instructions that have an effective address.  This is
32
   * only used to get dump_exe_log correct */
33
  oraddr_t insn_ea;
34
 
35
  /* Is current instruction in execution in a delay slot? */
36
  int delay_insn;
37
 
38
  /* Program counter (and translated PC) */
39
  oraddr_t pc;
40
 
41
  /* Delay instruction effective address register */
42
  oraddr_t pc_delay;
43
 
44
  /* Decoding of the just executed instruction.  Only used in analysis(). */
45
  struct iqueue_entry iqueue;
46
 
47
  /* decoding of the instruction that was executed before this one.  Only used
48
   * in analysis(). */
49
  struct iqueue_entry icomplet;
50 1452 nogj
 
51
#if DYNAMIC_EXECUTION
52
  /* Current page in execution */
53
  struct dyn_page *curr_page;
54
 
55 1547 nogj
  /* Pointers to recompiled pages */
56
  struct dyn_page **dyn_pages;
57 1452 nogj
 
58 1687 nogj
  int32_t cycles_dec;
59
 
60 1452 nogj
  /* Micro operation queue.  Only used to speed up recompile_page */
61
  struct op_queue *opqs;
62
#endif
63 1432 nogj
};
64
 
65
extern struct cpu_state cpu_state;
66
 
67 50 lampret
#define CURINSN(INSN) (strcmp(cur->insn, (INSN)) == 0)
68
 
69 138 markom
/*extern machword eval_operand(char *srcoperand,int* breakpoint);
70
extern void set_operand(char *dstoperand, unsigned long value,int* breakpoint);*/
71 560 markom
void dumpreg();
72
inline void dump_exe_log();
73
inline int cpu_clock ();
74
void cpu_reset ();
75 1350 nogj
uorreg_t evalsim_reg(unsigned int regno);
76 1434 nogj
void setsim_reg(unsigned int regno, uorreg_t value);
77 2 cvs
 
78 1350 nogj
extern oraddr_t pcnext;
79 1308 phoenix
int depend_operands(struct iqueue_entry *prev, struct iqueue_entry *next);
80 1690 nogj
void exec_main(void);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.