URL
https://opencores.org/ocsvn/scarm/scarm/trunk
[/] [scarm/] [trunk/] [src/] [scSW2.h] - Blame information for rev 10
Go to most recent revision |
Details |
Compare with Previous |
View Log
| Line No. |
Rev |
Author |
Line |
| 1 |
5 |
zhong |
// scSW2.h: interface for the scSW2 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_SCSW2_H__8C326334_AB49_11D6_BB1E_000000000000__INCLUDED_)
|
| 18 |
|
|
#define AFX_SCSW2_H__8C326334_AB49_11D6_BB1E_000000000000__INCLUDED_
|
| 19 |
|
|
|
| 20 |
|
|
#include "scALU.h" // Added by ClassView
|
| 21 |
|
|
#include "scBarrelShifter.h" // Added by ClassView
|
| 22 |
|
|
#if _MSC_VER > 1000
|
| 23 |
|
|
#pragma once
|
| 24 |
|
|
#endif // _MSC_VER > 1000
|
| 25 |
|
|
|
| 26 |
|
|
#include "..\SRC\scARMInstruction.h"
|
| 27 |
|
|
#include "scTypes.h" // Added by ClassView
|
| 28 |
|
|
#include "scRegisterFile.h" // Added by ClassView
|
| 29 |
|
|
const uint32_t SWT2_MASK = 0x0E000000;
|
| 30 |
|
|
const uint32_t SWT2_SIG = 0x06000000;
|
| 31 |
|
|
class scSW2 : public scARMInstruction
|
| 32 |
|
|
{
|
| 33 |
|
|
|
| 34 |
|
|
/* Single word and unsigned byte transfer - again, two formats*/
|
| 35 |
|
|
typedef struct SW2TAG
|
| 36 |
|
|
{
|
| 37 |
|
|
uint32_t rm : 4;
|
| 38 |
|
|
uint32_t pad2 : 1;
|
| 39 |
|
|
uint32_t type : 2;
|
| 40 |
|
|
uint32_t shift : 5;
|
| 41 |
|
|
uint32_t rd : 4;
|
| 42 |
|
|
uint32_t rn : 4;
|
| 43 |
|
|
uint32_t ls : 1;
|
| 44 |
|
|
uint32_t wb : 1;
|
| 45 |
|
|
uint32_t b : 1;
|
| 46 |
|
|
uint32_t u : 1;
|
| 47 |
|
|
uint32_t p : 1;
|
| 48 |
|
|
uint32_t hash : 1;
|
| 49 |
|
|
uint32_t pad : 2;
|
| 50 |
|
|
uint32_t cond : 4;
|
| 51 |
|
|
} SWT2;
|
| 52 |
|
|
|
| 53 |
|
|
SWT2 ir;
|
| 54 |
|
|
static const char* scSW2::kind_string_l ;
|
| 55 |
|
|
static const char* scSW2::kind_string_s ;
|
| 56 |
|
|
public:
|
| 57 |
|
|
bool set();
|
| 58 |
|
|
bool is_mult();
|
| 59 |
|
|
bool is_branch();
|
| 60 |
|
|
OPCODE op();
|
| 61 |
|
|
bool is_word();
|
| 62 |
|
|
bool is_ls();
|
| 63 |
|
|
REGS Rn();
|
| 64 |
|
|
bool load();
|
| 65 |
|
|
bool wb();
|
| 66 |
|
|
bool pre();
|
| 67 |
|
|
uint32_t dist();
|
| 68 |
|
|
bool is_rs();
|
| 69 |
|
|
bool is_shift();
|
| 70 |
|
|
COND cond();
|
| 71 |
|
|
SHIFT shift_type();
|
| 72 |
|
|
uint32_t B();
|
| 73 |
|
|
bool is_imm();
|
| 74 |
|
|
REGS Rd();
|
| 75 |
|
|
uint32_t A();
|
| 76 |
|
|
const char* kind();
|
| 77 |
|
|
scSW2(uint32_t);
|
| 78 |
|
|
virtual ~scSW2();
|
| 79 |
|
|
|
| 80 |
|
|
};
|
| 81 |
|
|
|
| 82 |
|
|
#endif // !defined(AFX_SCSW2_H__8C326334_AB49_11D6_BB1E_000000000000__INCLUDED_)
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.