-
Notifications
You must be signed in to change notification settings - Fork 0
/
Reference.tex
269 lines (225 loc) · 9.03 KB
/
Reference.tex
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
\documentclass{article}
\usepackage[a4paper, left=0.5in, right=0.5in, top=0.5in, bottom=0.5in]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{caption}
\usepackage{hyperref}
\begin{document}
\section*{SingleCycleImplementation}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{SingleCycleImplementation/SingleCycle.png}
\caption*{FIGURE 4.24 The simple control and datapath are extended to handle the jump instruction.}
\end{center}
\end{figure}
\begin{itemize}
\item Single Cycle
\item No pipelining
\item Not Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld|, \verb|beq| and \verb|b|.
\end{itemize}
\section*{PipelinedImplementation1}
\subsection*{Project 1}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{PipelinedImplementation1/Implementation1_pro1.png}
\caption*{FIGURE 4.17 The simple datapath with the control unit.}
\end{center}
\end{figure}
\begin{itemize}
\item Single Cycle
\item Simple Pipelined
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld| and \verb|beq|.
\item No Hazard Mangement.
\end{itemize}
\subsection*{Project 2}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{PipelinedImplementation1/Implementation1_pro2.png}
\caption*{FIGURE 4.51 The pipelined datapath of Figure 4.46, with the control signals connected to the control portions of the pipeline registers.}
\end{center}
\end{figure}
\begin{itemize}
\item Single Cycle
\item Simple Pipelined (same as Project 1 but with seperate blocks)
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld| and \verb|beq|.
\item No Hazard Mangement.
\end{itemize}
\section*{PipelinedImplementation2}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.4]{PipelinedImplementation2/PipelinedVersion_Forwarding.png}
\caption*{FIGURE 4.56 The datapath modifi ed to resolve hazards via forwarding.}
\end{center}
\end{figure}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{PipelinedImplementation2/PipelinedVerson_Forward2.png}
\caption*{FIGURE 4.57 A close-up of the datapath in Figure 4.54 shows a 2:1 multiplexor, which has been added to select the signed immediate as an ALU input.}
\end{center}
\end{figure}
\begin{itemize}
\item Single Cycle
\item Piplined with Forwarding for Data Hazard
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld| and \verb|beq|.
\item Data Hazard between stages (see below).
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{PipelinedImplementation2/PipelineingEg.png}
\caption*{FIGURE 4.53 The dependences between the pipeline registers move forward in time, so it is possible to supply the inputs to the ALU needed by the AND instruction and OR instruction by forwarding the results found in the pipeline registers}
\end{center}
\end{figure}
\item Also, added another forwarding(see below) from writeback to execution.
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.35]{PipelinedImplementation2/PipelinedVersion_Forwarding_Mod.png}
\end{center}
\end{figure}
\end{itemize}
\section*{Note}
\quad Left till forwarding in \textbf{Computer Organization and Design MIPS Edition The HardwareSoftware Interface (The Morgan Kaufmann Series in Computer Architecture and Design) by David A. Patterson, John L. Hennessy (z-lib.org).pdf} - Haven't implemented stallls - Pg no. 313.
\section*{MultiCycleImplementation}
\subsection*{Project 1}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.75]{MultiCycleImplementation/TexFiles/MultiCycle1.pdf}
\caption*{\textbf{Removed the Data register as already data's are registerd from memory}}
\end{center}
\end{figure}
\begin{itemize}
\item Multi Cycle
\item No data Hazard
\item No Control Hazard
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld| and \verb|beq|.
\item Uses FSM
\item Shrinked from Single Cycle
\end{itemize}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=1]{MultiCycleImplementation/TexFiles/SD1.pdf}
\caption*{\textbf{Added a new dummy state for }\textit|beq|}
\end{center}
\end{figure}
\subsection*{Project 2}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.74]{MultiCycleImplementation/TexFiles/MultiCycle2.pdf}
\caption*{\textbf{added Support for Jump instruction}}
\end{center}
\end{figure}
\begin{itemize}
\item Multi Cycle
\item No data Hazard
\item No Control Hazard
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld|, \verb|beq| and \verb|j|.
\item Uses FSM
\item Shrinked from Single Cycle
\end{itemize}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=1]{MultiCycleImplementation/TexFiles/SD2.pdf}
\caption*{\textbf{Added a new dummy state for }\textit|j|}
\end{center}
\end{figure}
\subsection*{Project 3}
\begin{itemize}
\item Multi Cycle
\item No data Hazard
\item No Control Hazard
\item Synthesizable
\item Supports \verb|add|, \verb|sub|, \verb|sw|, \verb|ld|, \verb|beq|,\verb|j| and \verb|addi|.
\item Uses FSM
\item Shrinked from Single Cycle
\end{itemize}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.8]{MultiCycleImplementation/TexFiles/SD3.pdf}
\caption*{\textbf{Added a new dummy state for }\textit|addi|}
\end{center}
\end{figure}
\subsection*{References}
\begin{itemize}
\item \href{https://syssec.ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/system-security-group-dam/education/Digitaltechnik_14/21_Architecture_MultiCycle.pdf}{L1}
\item \href{https://nptel.ac.in/courses/106/102/106102062/#downloads}{L2}
\item \href{https://www.cs.fsu.edu/~zwang/files/cda3101/Fall2017/Lecture6_cda3101.pdf}{L3}
\end{itemize}
\section*{MultiCycleImplementation\_NewOnes}
\subsection*{Project 1}
\begin{itemize}
\item Added support for "and, or, nor".
\end{itemize}
\subsection*{Project 2}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.7]{MultiCycleImplementation_NewOnes/TexFiles/MultiCylcle_NewOnes2.pdf}
\caption*{Changed ALUsrc A Mux}
\end{center}
\end{figure}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.8]{MultiCycleImplementation_NewOnes/TexFiles/SD2.pdf}
\caption*{\textbf{Added support for addi, and ori,sll, srl}}
\end{center}
\end{figure}
\begin{itemize}
\item Modified controller FSM add immediate to general immediate.
\item Modified DataPath to have shfit based operation (ALU is included with shift operations with operand reversed).
\item Replaced 2x1 mux of ALUSrcA with 4x1 mux with the third input being the 5bit value of immediate.
\item Modified controller FSM to incorporate shift operation with R type instruction.
\item Added support for "addi, andi, ori, sll and srl".
\end{itemize}
\subsection*{Project 3}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.7]{MultiCycleImplementation_NewOnes/TexFiles/MultiCycle_NewOnes3.pdf}
\caption*{Added support for bneq}
\end{center}
\end{figure}
\begin{itemize}
\item Modified Data Path to incorporate "bne" by adding Branch\_neq signal form controller and AND with $\overline{isZero}$ which is ORred with PCWrite.
\item Modifed FSM to have both "beq" and "bne" in same \verb|BRANCH| state.
\end{itemize}
\section*{MultiCycleImplementation\_NewOnes2}
\subsection*{Project 1}
\begin{itemize}
\item Added support for "jr"
\item By modifiying FSM to uses a state where one operator is the register rs, and other operator is 0 (see instructions) and code.
\item The address must be in 4 aligned.
\item Note: Also jr will jump to address +4 value.
\end{itemize}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.7]{MultiCycleImplementation_NewOnes2/TexFiles/SD1.pdf}
\caption*{\textbf{Added support for jr}}
\end{center}
\end{figure}
\subsection*{Project 2}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.7]{MultiCycleImplementation_NewOnes2/TexFiles/MultiCycle_NewOnes2.pdf}
\caption*{Added support for jal}
\end{center}
\end{figure}
\begin{itemize}
\item Added support for "jal" -- stored pc+4 in \$ra and jump to the location.
\item Modified FSM to have extra states for jal
\item Modifed DataPath by changing the write register mux to 4x1.
\end{itemize}
\subsubsection*{State Diagram}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.7]{MultiCycleImplementation_NewOnes2/TexFiles/SD2.pdf}
\caption*{\textbf{Added support for jal}}
\end{center}
\end{figure}
\end{document}