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

Subversion Repositories scarm

[/] [scarm/] [branches/] [release_0_1/] [src/] [scDP3.cpp] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 zhong
// scDP3.cpp: implementation of the scDP3 class.
2
//
3
//////////////////////////////////////////////////////////////////////
4
 
5
#include "scDP3.h"
6
 
7
//////////////////////////////////////////////////////////////////////
8
// Construction/Destruction
9
//////////////////////////////////////////////////////////////////////
10
 
11
scDP3::scDP3(uint32_t i)
12
{
13
  ir.rm=i;
14
  ir.pad3=i>>4;
15
  ir.type=i>>5;
16
  ir.pad2=i>>7;
17
  ir.rs=i>>8;
18
  ir.rd=i>>12;
19
  ir.rn=i>>16;
20
  ir.set=i>>20;
21
  ir.opcode=i>>21;
22
  ir.hash=i>>25;
23
  ir.pad=i>>26;
24
  ir.cond=i>>28;
25
 
26
}
27
 
28
scDP3::~scDP3()
29
{
30
 
31
}
32
const char* scDP3::kind_string = "DP3";
33
const char* scDP3::kind()
34
{
35
  return kind_string;
36
}
37
 
38
uint32_t scDP3::A()
39
{
40
  return ir.rn;
41
}
42
 
43
REGS scDP3::Rd()
44
{
45
  return REGS(ir.rd);
46
}
47
 
48
bool scDP3::is_imm()
49
{
50
  return false;
51
}
52
 
53
bool scDP3::is_rs()
54
{
55
  return true;
56
}
57
 
58
OPCODE scDP3::op()
59
{
60
  return OPCODE(ir.opcode);
61
}
62
 
63
COND scDP3::cond()
64
{
65
  return COND(ir.cond);
66
}
67
 
68
SHIFT scDP3::shift_type()
69
{
70
 return SHIFT(ir.type);
71
}
72
 
73
bool scDP3::is_shift()
74
{
75
 return true;
76
}
77
 
78
uint32_t scDP3::B()
79
{
80
  return ir.rm;
81
}
82
 
83
bool scDP3::is_ls()
84
{
85
 return false;
86
}
87
 
88
uint32_t scDP3::dist()
89
{
90
 return ir.rs;
91
}
92
 
93
bool scDP3::is_mult()
94
{
95
return false;
96
}
97
 
98
REGS scDP3::Rn()
99
{
100
 return REGS(ir.rn);
101
}
102
 
103
bool scDP3::pre()
104
{
105
return 0;
106
}
107
 
108
bool scDP3::load()
109
{
110
 return false;
111
}
112
 
113
bool scDP3::is_wb()
114
{
115
 return true;
116
}
117
 
118
bool scDP3::wb()
119
{
120
  return false;
121
}
122
 
123
bool scDP3::set()
124
{
125
 return ir.set;
126
}
127
 
128
bool scDP3::is_branch()
129
{
130
  return false;
131
}

powered by: WebSVN 2.1.0

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