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

Subversion Repositories scarm

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 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
// scSW1.h: interface for the scSW1 class.
24
//
25
//////////////////////////////////////////////////////////////////////
26
 
27
#if !defined(AFX_SCSW1_H__8C326334_AB49_11D6_BB1E_000000000000__INCLUDED_)
28
#define AFX_SCSW1_H__8C326334_AB49_11D6_BB1E_000000000000__INCLUDED_
29
 
30
#include "scBarrelShifter.h"    // Added by ClassView
31
#if _MSC_VER > 1000
32
#pragma once
33
#endif // _MSC_VER > 1000
34
 
35
#include "..\SRC\scARMInstruction.h"
36
#include "scTypes.h"    // Added by ClassView
37
#include "scRegisterFile.h"     // Added by ClassView
38
#include "scALU.h"      // Added by ClassView
39
const uint32_t SWT1_MASK =   0x0E000000;
40
const uint32_t SWT1_SIG  =   0x04000000;
41
class scSW1 : public scARMInstruction
42
{
43
 
44
/* Single word and unsigned byte transfer - again, two formats*/
45
typedef struct SW1TAG
46
{
47
  uint32_t imm   : 12;
48
  uint32_t rd    : 4;
49
  uint32_t rn    : 4;
50
  uint32_t ls    : 1;
51
  uint32_t wb    : 1;
52
  uint32_t b     : 1;
53
  uint32_t u     : 1;
54
  uint32_t p     : 1;
55
  uint32_t hash  : 1;
56
  uint32_t pad   : 2;
57
  uint32_t cond  : 4;
58
} SWT1;
59
 
60
        SWT1 ir;
61
        static const char* kind_string_l ;
62
        static const char* kind_string_s ;
63
public:
64
        bool set();
65
        bool is_branch();
66
        bool is_rs();
67
        bool is_ls();
68
 
69
        bool is_mult();
70
        REGS Rn();
71
        bool wb();
72
        bool load();
73
        bool pre();
74
        bool is_shift();
75
        uint32_t dist();
76
        SHIFT shift_type();
77
        COND cond();
78
        OPCODE op();
79
        bool is_imm();
80
        uint32_t B();
81
        REGS Rd();
82
        uint32_t A();
83
        const char* kind();
84
        scSW1(uint32_t);
85
        virtual ~scSW1();
86
 
87
};
88
 
89
#endif // !defined(AFX_SCSW1_H__8C326334_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.