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

Subversion Repositories scarm

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zhong
// scARMInstruction.h: interface for the scARMInstruction class.
2
//
3
//////////////////////////////////////////////////////////////////////
4
#ifndef INSTRUCTIONS_H
5
#define INSTRUCTIONS_H
6
 
7
#include"scTypes.h"
8
#include ".\components\Registers\scRegisterFile.h"
9
#include ".\components\BarrelShifter\scBarrelShifter.h"
10
#include ".\components\ALU\scALU.h"
11
// used to package the different behavoir of the different instruciton.
12
const uint32_t V_FLAG=0x10000000;
13
const uint32_t C_FLAG=0x20000000;
14
const uint32_t Z_FLAG=0x40000000;
15
const uint32_t N_FLAG=0x80000000;
16
 
17
const uint32_t CZ_FLAGS=0x60000000;
18
const uint32_t NV_FLAGS=0x90000000;
19
 
20
 
21
 
22
///////////////////////////////
23
// Defines the types for ARM instructions. For each instruction I've 
24
// defined the bitfield typedef and a mask/signiture for testing if 
25
// an instruction is of that type.
26
/////////////////////////////////
27
 
28
/* General instruction */
29
typedef union ITAG
30
{
31
  uint32_t raw;
32
 //  BRANCH   branch;
33
} INST;
34
 
35
 
36
class scARMInstruction
37
{
38
 
39
private:
40
        virtual void Decode(uint32_t nI);
41
        // used in stages of EX, MEM  and WB
42
        //virtual void exe();
43
        //virtual void mem();
44
        //virtual void wb();
45
public:
46
        virtual scARMInstruction* Create(uint32_t);
47
        scARMInstruction();
48
 
49
        virtual ~scARMInstruction();
50
 
51
public:
52
COND get_cond(uint32_t nI);
53
 
54
};
55
#endif

powered by: WebSVN 2.1.0

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