report.tex 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. \documentclass[10pt,a4paper,titlepage,oneside]{article}
  2. \usepackage{LabProtocol}
  3. \exercise{Exercise I}
  4. % enter your data here
  5. \authors{
  6. Norbert Tremurici, Matr. Nr. 11907086 \par
  7. {\small e11907086@student.tuwien.ac.at} \par
  8. }
  9. \begin{document}
  10. \maketitle
  11. %████████╗ █████╗ ███████╗██╗ ██╗ ██╗
  12. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ███║
  13. % ██║ ███████║███████╗█████╔╝ ╚██║
  14. % ██║ ██╔══██║╚════██║██╔═██╗ ██║
  15. % ██║ ██║ ██║███████║██║ ██╗ ██║
  16. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝
  17. \Task{Structural modeling}
  18. \begin{qa}{Create a screenshot showing the top level design in the RTL netlist viewer!}
  19. \begin{figure}[h!]
  20. \centering
  21. \includegraphics[width=1.0\linewidth]{img/netlist.pdf}
  22. \caption{RTL netlist viewer screenshot}
  23. \end{figure}
  24. \end{qa}
  25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  26. %████████╗ █████╗ ███████╗██╗ ██╗ ██████╗
  27. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ╚════██╗
  28. % ██║ ███████║███████╗█████╔╝ █████╔╝
  29. % ██║ ██╔══██║╚════██║██╔═██╗ ██╔═══╝
  30. % ██║ ██║ ██║███████║██║ ██╗ ███████╗
  31. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══════╝
  32. \Task{Seven Segment Display I}
  33. \begin{qa}{Are the \textsf{hex*} signals high or low-active? Explain what that means!}
  34. When choosing how to represent logical high and logical low values, signals can be defined to be active low or active high. For active high signals, a '1' encodes a logical high and a '0' encodes a logical low. For active low signals, the opposite applies, a '0' encodes a logical high and a '1' encodes a logial low.
  35. It can be inferred from the manual of the specific device used in our lab course that the seven segment display is low-active. This means that only segments that have a '0' signal will light up. This is also why the "empty" seven segment display is assigned a bit vector "1111111".
  36. \end{qa}
  37. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  38. %████████╗ █████╗ ███████╗██╗ ██╗ ██████╗
  39. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ╚════██╗
  40. % ██║ ███████║███████╗█████╔╝ █████╔╝
  41. % ██║ ██╔══██║╚════██║██╔═██╗ ╚═══██╗
  42. % ██║ ██║ ██║███████║██║ ██╗ ██████╔╝
  43. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝
  44. \Task{Behavioral Simulation}
  45. \begin{qa}{SRAM write access}
  46. \begin{center}
  47. \begin{tabular}{lc}
  48. \hline
  49. Question & Answer \\
  50. \hline\hline
  51. Absoulte (simulation) time of the first write access$^{*}$ & 1710 ns \\
  52. Accessed SRAM addresses (first 4 write operations) & 0x00 0x01 0x02 0x02 \\
  53. Measure the SRAM timing parameter $t_{WC}$ (see datasheet) & 60 ns\\\hline
  54. \end{tabular}
  55. \footnotesize{$^{*}$ Take the point in time where the address for the write operation is applied.}
  56. \end{center}
  57. \begin{figure}[h!]
  58. \centering
  59. \includegraphics[width=1.0\linewidth]{img/timing-parameter.png}
  60. \caption{Simulation showing the first 4 write operations to the SRAM with markers indicating the SRAM timing parameter $t_{WC}$}
  61. \end{figure}
  62. \end{qa}
  63. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  64. \begin{qa}{Serial port interface of the LCD driver IC (Consult the LCD manual to answer the following questions)}
  65. \begin{figure}[h!]
  66. \centering
  67. \includegraphics[width=1.0\linewidth]{img/sclk-signal.png}
  68. \caption{Screenshot showing the data transmission on the serial port interface of the LCD driver IC with markers indicating the period of the $sclk$ signal.}
  69. \end{figure}
  70. \begin{center}
  71. \begin{tabular}{lc}
  72. \hline
  73. Question & Answer \\\hline\hline
  74. What frequency did you measure for the $sclk$ signal? & 1.3 MHz \\
  75. What is the maximum allowed frequency? & 2 MHz \\\hline
  76. \end{tabular}
  77. \end{center}
  78. Hint: Should your simulation show ``zero-width spikes'' on some signal traces, you can simply ignore them.
  79. \end{qa}
  80. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  81. \begin{qa}{What is the purpose of the transmission on the serial interface to the LCD? Explain what is transmitted and why!}
  82. The serial interface is used to transmit image values in order to make image data accessible to the FPGA.
  83. \end{qa}
  84. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  85. %████████╗ █████╗ ███████╗██╗ ██╗ ██╗ ██╗
  86. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ██║ ██║
  87. % ██║ ███████║███████╗█████╔╝ ███████║
  88. % ██║ ██╔══██║╚════██║██╔═██╗ ╚════██║
  89. % ██║ ██║ ██║███████║██║ ██╗ ██║
  90. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝
  91. \Task{Postlayout Simulation}
  92. \begin{qa}{Use a postlayout simualtion to measure the different delays on the \textsf{hex\{6-7\}} signals.}
  93. \begin{center}
  94. \begin{tabular}{lc}
  95. \hline
  96. Interval & Time \\ \hline\hline
  97. Duration between the first and the last bit toggling & 3121 ps \\
  98. Time between the last active clock edge and stabilization & 13170 ps \\\hline
  99. \end{tabular}
  100. \end{center}
  101. \begin{figure}[h!]
  102. \centering
  103. \includegraphics[width=1.0\linewidth]{img/hex6to7.png}
  104. \caption{Screenshot showing the interval measurements with markers}
  105. \end{figure}
  106. \end{qa}
  107. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  108. %████████╗ █████╗ ███████╗██╗ ██╗ ███████╗
  109. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝
  110. % ██║ ███████║███████╗█████╔╝ ███████╗
  111. % ██║ ██╔══██║╚════██║██╔═██╗ ╚════██║
  112. % ██║ ██║ ██║███████║██║ ██╗ ███████║
  113. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══════╝
  114. \Task{Testbench Design}
  115. \begin{qa}{PRNG simulation}
  116. \begin{center}
  117. \begin{tabular}{ll}
  118. \hline\hline
  119. My matriculation number & 11907086 \\
  120. My matriculation number modulo $15$ & 11 \\
  121. $n_a$ & 192 \\
  122. $n_b$ & 207 \\
  123. Minimum period & 7 \\
  124. Maximum period & 64897 \\\hline
  125. \end{tabular}
  126. \end{center}
  127. \end{qa}
  128. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  129. \begin{qa}{Bonus Task: SRAM reads}
  130. \begin{figure}[h!]
  131. \centering
  132. %\includegraphics[width=1.0\linewidth]{path}
  133. \dummyimage
  134. \caption{Simulation showing a read operation performed by the \textsf{lcd\_graphics\_controller}}
  135. \end{figure}
  136. \end{qa}
  137. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  138. %████████╗ █████╗ ███████╗██╗ ██╗ ██████╗
  139. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝
  140. % ██║ ███████║███████╗█████╔╝ ███████╗
  141. % ██║ ██╔══██║╚════██║██╔═██╗ ██╔═══██╗
  142. % ██║ ██║ ██║███████║██║ ██╗ ╚██████╔╝
  143. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝
  144. \Task{N64 Controller}
  145. \begin{qa}{Simulation of two complete button state transmission frames}
  146. \begin{center}
  147. \begin{tabular}{ll}
  148. \hline\hline
  149. My matriculation number & 11907086 \\
  150. My matriculation number modulo $2^{16}$ & 0xB00E \\
  151. $b_0$: hex, ({A},{B},{Select},{Start},{$\uparrow$},{$\downarrow$},{$\leftarrow$},{$\rightarrow$}) & 0xB0 (1,0,1,1,0,0,0,0) \\
  152. $b_1$: hex, ({A},{B},{Select},{Start},{$\uparrow$},{$\downarrow$},{$\leftarrow$},{$\rightarrow$}) & 0x0E (0,0,0,0,1,1,1,0) \\\hline
  153. \end{tabular}
  154. \end{center}
  155. \begin{figure}[h!]
  156. \centering
  157. \includegraphics[width=1.0\linewidth]{img/nes-transmissions.png}
  158. \caption{Screenshot(s) showing both the transmissions with markers showing the clock period of $nes\_clk$}
  159. \end{figure}
  160. \end{qa}
  161. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  162. \begin{qa}{Analyse the resource usage of your \textsf{nes\_controller}!}
  163. \centering
  164. \begin{tabular}{l|ll}
  165. \hline
  166. & LC Combinationals & LC Registers \\ \hline\hline
  167. Absolute number & 54 & 32 \\
  168. \% of whole design & 1.26 & 1.33 \\
  169. \% of whole FPGA resources & 0.05 & 0.03 \\ \hline
  170. \end{tabular}
  171. \end{qa}
  172. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  173. %████████╗ █████╗ ███████╗██╗ ██╗ ███████╗
  174. %╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝ ╚════██║
  175. % ██║ ███████║███████╗█████╔╝ ██╔╝
  176. % ██║ ██╔══██║╚════██║██╔═██╗ ██╔╝
  177. % ██║ ██║ ██║███████║██║ ██╗ ██║
  178. % ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝
  179. \Task{Seven Segment Display II}
  180. \begin{qa}{Include the state graph of the state machine you designed and briefly explain how it works.}
  181. The FSM starts at state \texttt{IDLE}. During this state it is determined (by comparing the \texttt{player\_points} and \texttt{points\_lock} signals) whether a point jump of 25 of more points occured and this value is propagated via the signal high-active \texttt{blink}. Besides determining the value of \texttt{blink}, the signal \texttt{player\_points} is monitored for change, so long as \texttt{player\_points} does not change the state does not change. Once it does however, the next state is determined by how many \texttt{player\_points} there are: if our four segments cannot display the current score, we automatically visit state \texttt{DISPLAY\_OVERFLOW}, which renders a special sequence \texttt{----} upon returning to \texttt{IDLE} unconditionally. Note that from the task description it is not clear whether a blink should be possible in this special overflow state, so it was specified that there is no blinking when overflowing.
  182. If there was no overflow, we enter a sequence of counting states \texttt{DISPLAY\_\{0-3\}} that count the digits via subtraction. At the end, depending on the signal \texttt{blink} we choose whether to proceed with state \texttt{WAIT\_NOBLINK} or \texttt{WAIT\_INTERVAL}. The former is an intermediary state to copy the results of the counting process to the seven-segment displays (as the values aren't ready yet during state \texttt{DISPLAY\_1}), the latter initiates a blinking protocol defined by two constants. A cycle count \texttt{BLINK\_INTERVAL} specifies how many clock cycles to wait until blinking and a count \texttt{BLINK\_COUNT} specifies how often to repeat this process. Once this protocol is over, the digits are copied to the seven-segment display one last time before we return to \texttt{IDLE}.
  183. \begin{figure}[h!]
  184. \centering
  185. \includegraphics[width=0.75\linewidth]{img/fsm-task7.png}
  186. \caption{FSM state graph}
  187. \end{figure}
  188. \end{qa}
  189. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  190. \begin{qa}{Seven Segment Display Simulation Screenshot}
  191. \begin{center}
  192. \begin{tabular}{ll}
  193. \hline\hline
  194. My matriculation number & 11907086 \\
  195. My matriculation number modulo $500$ & 86 \\
  196. \textsf{player\_points} value for the testbench & 1320 \\ \hline
  197. \end{tabular}
  198. \end{center}
  199. \begin{figure}[h!]
  200. \centering
  201. \includegraphics[width=1.0\linewidth]{img/ssd-conversion.png}
  202. \caption{Simulation showing the conversion}
  203. \end{figure}
  204. \end{qa}
  205. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  206. \begin{qa}{Bonus Task: Animation Simulation}
  207. \begin{figure}[h!]
  208. \centering
  209. \includegraphics[width=1.0\linewidth]{img/animation.png}
  210. \caption{Simulation showing all animation steps}
  211. \end{figure}
  212. \end{qa}
  213. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  214. \end{document}