-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathE.C
More file actions
109 lines (97 loc) · 2.27 KB
/
E.C
File metadata and controls
109 lines (97 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include <iostream>
#include <iomanip>
#include <cstdint>
#include <cstddef>
#include "RegisterFile.h"
#include "Instructions.h"
#include "PipeRegField.h"
#include "PipeReg.h"
#include "E.h"
#include "Status.h"
/*
* E constructor
*
* initialize the E pipeline register
*
*/
E::E()
{
stat = new PipeRegField(SAOK);
icode = new PipeRegField(INOP);
ifun = new PipeRegField(FNONE);
valC = new PipeRegField();
valA = new PipeRegField();
valB = new PipeRegField();
dstE = new PipeRegField(RNONE);
dstM = new PipeRegField(RNONE);
srcA = new PipeRegField();
srcB = new PipeRegField();
}
/* return the stat pipeline register field */
PipeRegField * E::getstat()
{
return stat;
}
/* return the icode pipeline register field */
PipeRegField * E::geticode()
{
return icode;
}
/* return the ifun pipeline register field */
PipeRegField * E::getifun()
{
return ifun;
}
/* return the valC pipeline register field */
PipeRegField * E::getvalC()
{
return valC;
}
/* return the valA pipeline register field */
PipeRegField * E::getvalA()
{
return valA;
}
/* return the valB pipeline register field */
PipeRegField * E::getvalB()
{
return valB;
}
/* return the dstE pipeline register field */
PipeRegField * E::getdstE()
{
return dstE;
}
/* return the dstM pipeline register field */
PipeRegField * E::getdstM()
{
return dstM;
}
/* return the srcA pipeline register field */
PipeRegField * E::getsrcA()
{
return srcA;
}
/* return the srcB pipeline register field */
PipeRegField * E::getsrcB()
{
return srcB;
}
/*
* dump
*
* outputs the current values of the E pipeline register
*/
void E::dump()
{
dumpField("E: stat: ", 1, stat->getOutput(), false);
dumpField(" icode: ", 1, icode->getOutput(), false);
dumpField(" ifun: ", 1, ifun->getOutput(), false);
dumpField(" valC: ", 16, valC->getOutput(), false);
dumpField(" valA: ", 16, valA->getOutput(), true);
dumpField("E: valB: ", 16, valB->getOutput(), false);
dumpField(" dstE: ", 1, dstE->getOutput(), false);
dumpField(" dstM: ", 1, dstM->getOutput(), false);
dumpField(" srcA: ", 1, srcA->getOutput(), false);
dumpField(" srcB: ", 1, srcB->getOutput(), true);
}