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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [scSWI.h] - Blame information for rev 6

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

Line No. Rev Author Line
1 5 zhong
// scSWI.h: interface for the scSWI class.
2
/*                            -------------------
3
    begin                : Oct 2 2002
4
    copyright            : (C) 2002 UESTC
5
    author               : Zhong Tao
6
    email                : zhong@opencores.org
7
 ***************************************************************************/
8
 
9
/***************************************************************************
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 ***************************************************************************/
17
#if !defined(AFX_SCSWI_H__8C326336_AB49_11D6_BB1E_000000000000__INCLUDED_)
18
#define AFX_SCSWI_H__8C326336_AB49_11D6_BB1E_000000000000__INCLUDED_
19
 
20
#include "scTypes.h"    // Added by ClassView
21
#if _MSC_VER > 1000
22
#pragma once
23
#endif // _MSC_VER > 1000
24
 
25
#include "..\SRC\scARMInstruction.h"
26
#include "scRegisterFile.h"     // Added by ClassView
27
#include "scALU.h"      // Added by ClassView
28
#include "scBarrelShifter.h"    // Added by ClassView
29
const uint32_t SWI_MASK  =  0x0F000000;
30
const uint32_t SWI_SIG  =   0x0F000000;
31
//enum VECTOR {V_RESET = 0x00, V_UNDEF = 0x04, V_SWI = 0x08, V_PABORT = 0x0C, 
32
//           V_DABORT = 0x10, V_IRQ = 0x18, V_FIQ = 0x1C};
33
const uint32_t V_SWI=0x08;
34
class scSWI : public scARMInstruction
35
{
36
/* Software interrupt */
37
typedef struct SWITAG
38
{
39
  uint32_t val  : 24;
40
  uint32_t pad  : 4;
41
  uint32_t cond : 4;
42
} SWI;
43
 
44
SWI ir;
45
  static const char* kind_string;
46
public:
47
        void function();
48
        bool wb();
49
        SHIFT shift_type();
50
        bool set();
51
        bool is_mult();
52
        bool load();
53
        bool is_set();
54
        bool is_shift();
55
        bool is_rs();
56
        bool is_ls();
57
        uint32_t dist();
58
        bool is_branch();
59
        bool is_imm();
60
        REGS Rn();
61
        bool pre();
62
        COND cond();
63
        OPCODE op();
64
        uint32_t B();
65
        uint32_t A();
66
        REGS Rd();
67
        const char* kind();
68
        scSWI(uint32_t);
69
        virtual ~scSWI();
70
 
71
};
72
 
73
#endif // !defined(AFX_SCSWI_H__8C326336_AB49_11D6_BB1E_000000000000__INCLUDED_)

powered by: WebSVN 2.1.0

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