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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [Instructions/] [scARMSWI.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
23
// scARMSWI.h: interface for the scARMSWI class.
24
//
25
//////////////////////////////////////////////////////////////////////
26
 
27
 
28
 
29
#include "scARMInstruction.h"
30
/* Single word and unsigned byte transfer - again, two formats*/
31
typedef struct SW1TAG
32
{
33
  uint32_t imm   : 12;
34
  uint32_t rd    : 4;
35
  uint32_t rn    : 4;
36
  uint32_t ls    : 1;
37
  uint32_t wb    : 1;
38
  uint32_t b     : 1;
39
  uint32_t u     : 1;
40
  uint32_t p     : 1;
41
  uint32_t hash  : 1;
42
  uint32_t pad   : 2;
43
  uint32_t cond  : 4;
44
} SWT1;
45
 
46
typedef struct SW2TAG
47
{
48
  uint32_t rm    : 4;
49
  uint32_t pad2  : 1;
50
  uint32_t type  : 2;
51
  uint32_t shift : 5;
52
  uint32_t rd    : 4;
53
  uint32_t rn    : 4;
54
  uint32_t ls    : 1;
55
  uint32_t wb    : 1;
56
  uint32_t b     : 1;
57
  uint32_t u     : 1;
58
  uint32_t p     : 1;
59
  uint32_t hash  : 1;
60
  uint32_t pad   : 2;
61
  uint32_t cond  : 4;
62
} SWT2;
63
#define  SWT_MASK    0x0C000000
64
#define  SWT_SIG     0x04000000
65
/* Software interrupt */
66
typedef struct SWITAG
67
{
68
  uint32_t val  : 24;
69
  uint32_t pad  : 4;
70
  uint32_t cond : 4;
71
} SWI;
72
#define SWI_MASK    0x0F000000
73
#define SWI_SIG     0x0F000000
74
 
75
class scARMSWI : public scARMInstruction
76
{
77
public:
78
        scARMSWI();
79
        virtual ~scARMSWI();
80
 
81
};

powered by: WebSVN 2.1.0

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