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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [Instructions/] [scUnUsedInstruction.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zhong
///////////////////////////////////////////////////////////////////////////////
2
// This program is free software; you can redistribute it and/or
3
// modify it under the terms of the GNU General Public License
4
// as published by the Free Software Foundation; either version 2
5
// of the License, or (at your option) any later version.
6
//
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU General Public License for more details.
11
//
12
// You should have received a copy of the GNU General Public License
13
// along with this program; if not, write to the Free Software
14
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
//////////////////////////////////////////////////////////////////////
16
 
17
///////////////////////////////////////////////////////////////////              
18
//          
19
//  Original Author: Allen Tao Zhong,
20
//  University of Electronic Science and Technology in China
21
//  email: zhong@opencores.org
22
//  info   This is a SystemC ARM model,I "stole" some codes from 
23
//       "swarm" , author Michael Dales (michael@dcs.gla.ac.uk)
24
// scUnUsedInstruction.h: interface for the scUnUsedInstruction class.
25
//
26
//////////////////////////////////////////////////////////////////////
27
#include "scTypes.h"
28
/* Unused arithmetic instruction */
29
typedef struct UAITAG
30
{
31
  uint32_t rm    : 4;
32
  uint32_t pad2  : 4;
33
  uint32_t rs    : 4;
34
  uint32_t rd    : 4;
35
  uint32_t rn    : 4;
36
  uint32_t op    : 2;
37
  uint32_t pad   : 6;
38
  uint32_t cond  : 4;
39
} UAI;
40
#define UAI_MASK    0x0FC000F0
41
#define UAI_SIG     0x00700090
42
 
43
 
44
/* Unused control instructions - there are 3 of these */
45
typedef struct UC1TAG
46
{
47
  uint32_t rm    : 4;
48
  uint32_t pad3  : 1;
49
  uint32_t op2   : 3;
50
  uint32_t rs    : 4;
51
  uint32_t rd    : 4;
52
  uint32_t rn    : 4;
53
  uint32_t pad2  : 1;
54
  uint32_t op    : 2;
55
  uint32_t pad   : 5;
56
  uint32_t cond  : 4;
57
} UCI1;
58
#define UCI1_MASK    0x0F900010
59
#define UCI1_SIG     0x01000000
60
 
61
typedef struct UC2TAG
62
{
63
  uint32_t rm    : 4;
64
  uint32_t pad4  : 1;
65
  uint32_t op2   : 2;
66
  uint32_t pad3  : 1;
67
  uint32_t rs    : 4;
68
  uint32_t rd    : 4;
69
  uint32_t rn    : 4;
70
  uint32_t pad2  : 1;
71
  uint32_t op    : 2;
72
  uint32_t pad   : 5;
73
  uint32_t cond  : 4;
74
} UCI2;
75
#define UCI2_MASK    0x0F900090
76
#define UCI2_SIG     0x01000010
77
 
78
typedef struct UC3TAG
79
{
80
  uint32_t imm   : 8;
81
  uint32_t rot   : 4;
82
  uint32_t rd    : 4;
83
  uint32_t rn    : 4;
84
  uint32_t pad2  : 1;
85
  uint32_t op    : 2;
86
  uint32_t pad   : 5;
87
  uint32_t cond  : 4;
88
} UCI3;
89
#define UCI3_MASK    0x0F900000
90
#define UCI3_SIG     0x03000000
91
 
92
 
93
/* Unused Load/Store Instruction */
94
typedef struct ULSTAG
95
{
96
  uint32_t rm    : 4;
97
  uint32_t pad4  : 1;
98
  uint32_t op2   : 2;
99
  uint32_t pad3  : 1;
100
  uint32_t rs    : 4;
101
  uint32_t rd    : 4;
102
  uint32_t rn    : 4;
103
  uint32_t ls    : 1;
104
  uint32_t wb    : 1;
105
  uint32_t b     : 1;
106
  uint32_t u     : 1;
107
  uint32_t p     : 1;
108
  uint32_t pad   : 3;
109
  uint32_t cond  : 4;
110
} ULSI;
111
#define ULSI_MASK    0x0E000090
112
#define ULSI_SIG     0x00000090
113
 
114
 
115
/* Unused Coprocessor Instruction */
116
typedef struct UCPITAG
117
{
118
  uint32_t offset : 8;
119
  uint32_t cpn    : 4;
120
  uint32_t crd    : 4;
121
  uint32_t rn     : 4;
122
  uint32_t x      : 1;
123
  uint32_t pad2   : 1;
124
  uint32_t op     : 2;
125
  uint32_t pad    : 4;
126
  uint32_t cond   : 4;
127
} UCPI;
128
#define UCPI_MASK    0x0F200000
129
#define UCPI_SIG     0x0C000000
130
 
131
 
132
/* Undefined instruction space */
133
typedef struct UDTAG
134
{
135
  uint32_t raw2 : 4;
136
  uint32_t pad2 : 1;
137
  uint32_t raw  : 20;
138
  uint32_t pad  : 3;
139
  uint32_t cond : 4;
140
} UNDEF;
141
#define UNDEF_MASK   0x0E000010
142
#define UNDEF_SIG    0x06000010
143
 
144
class scUnUsedInstruction
145
{
146
public:
147
        scUnUsedInstruction();
148
        virtual ~scUnUsedInstruction();
149
 
150
};

powered by: WebSVN 2.1.0

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