8-appendix.tex 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. % !TeX root = index.tex
  2. \subsection{Processor instruction set tables}\label{subsec:instruction_sets}
  3. \arrayrulecolor{black}
  4. \begin{longtable}[h!]{| l | p{.70\textwidth} | c |}
  5. \caption{Instruction set for RISC processor. * Required immediate size in bytes}
  6. \label{tab:risc_instructions}\\
  7. \hline
  8. \rowcolor[rgb]{0.82,0.82,0.82}
  9. Instr. & Description & I-size *\\\hline
  10. \endhead
  11. \arrayrulecolor{black}\hline
  12. \endfoot
  13. \multicolumn{3}{|c|}{
  14. \cellcolor[rgb]{0.7,0.7,1}\textit{2 register instructions}} \\\hline
  15. \arrayrulecolor[rgb]{0.82,0.82,0.82}
  16. MOVE & Copy value from one register to other & 0 \\\hline
  17. ADD & Arithmetical addition & 0 \\
  18. SUB & Arithmetical subtraction & 0 \\
  19. AND & Logical AND & 0 \\
  20. OR & Logical OR & 0 \\
  21. XOR & Logical XOR & 0 \\
  22. MUL & Arithmetical multiplication & 0 \\
  23. DIV & Arithmetical division (inc. modulo) & 0 \\
  24. \arrayrulecolor{black}\hline
  25. \multicolumn{3}{|c|}{
  26. \cellcolor[rgb]{0.7,0.7,1}\textit{1 register instructions}} \\
  27. \hline\arrayrulecolor[rgb]{0.82,0.82,0.82}
  28. COPY0 & Copy intimidate to a register 0 & 1 \\
  29. COPY1 & Copy intimidate to a register 1 & 1 \\
  30. COPY2 & Copy intimidate to a register 2 & 1 \\
  31. COPY3 & Copy intimidate to a register 3 & 1 \\\hline
  32. ADDC & Arithmetical addition with carry bit& 0 \\
  33. ADDI & Arithmetical addition with immediate & 1 \\
  34. SUBC & Arithmetical subtraction with carry bit & 0 \\
  35. SUBI & Arithmetical subtraction with immediate & 1 \\\hline
  36. ANDI & Logical AND with immediate & 1 \\
  37. ORI & Logical OR with immediate & 1 \\
  38. XORI & Logical XOR with immediate & 1 \\\hline
  39. CI0 & Replace intimidate value byte 0 for next instruction & 1 \\
  40. CI1 & Replace intimidate value byte 1 for next instruction & 1 \\
  41. CI2 & Replace intimidate value byte 2 for next instruction & 1 \\\hline
  42. SLL & Shift left logical & 1 \\
  43. SRL & Shift right logical & 1 \\
  44. SRA & Shift right arithmetical & 1 \\\hline
  45. LWHI & Load word (high byte) & 3 \\
  46. SWHI & Store word (high byte, reg. only) & 0 \\
  47. LWLO & Load word (low byte) & 3 \\
  48. SWLO & Store word (low byte, stores high byte reg.) & 3 \\\hline
  49. INC & Increase by 1 & 0 \\
  50. DEC & Decrease by 1 & 0 \\
  51. GETAH& Get ALU high byte reg. (only for MUL \& DIV \& ROL \& ROR) & 0 \\
  52. GETIF& Get interrupt flags & 0 \\\hline
  53. PUSH & Push to stack & 0 \\
  54. POP & Pop from stack & 0 \\
  55. COM & Send/Receive to/from com. block & 1 \\\hline
  56. BEQ & Branch on equal & 3 \\
  57. BGT & Branch on greater than & 3 \\
  58. BGE & Branch on greater equal than & 3 \\
  59. BZ & Branch on zero & 2 \\
  60. \arrayrulecolor{black}\hline
  61. \multicolumn{3}{|c|}{
  62. \cellcolor[rgb]{0.7,0.7,1}\textit{0 register instructions}
  63. } \\
  64. \hline\arrayrulecolor[rgb]{0.82,0.82,0.82}
  65. CALL & Call function, put return to stack & 2 \\
  66. RET & Return from function & 0 \\
  67. JUMP & Jump to address & 2 \\
  68. RETI & Return from interrupt & 0 \\
  69. INTRE& Set interrupt entry pointer & 2 \\\hline
  70. \end{longtable}
  71. \arrayrulecolor{black}
  72. \begin{longtable}[h!]{| l | p{0.8\textwidth} |}
  73. \caption{Instructions for OISC processor.}
  74. \label{tab:oisc_instructions}\\
  75. \hline
  76. \rowcolor[rgb]{0.82,0.82,0.82}
  77. Name & Description \\\hline
  78. \endhead
  79. \arrayrulecolor{black}\hline
  80. \endfoot
  81. \multicolumn{2}{|c|}{
  82. \cellcolor[rgb]{0.7,0.7,1}\textit{Destination Addresses}} \\\hline
  83. \arrayrulecolor[rgb]{0.82,0.82,0.82}
  84. ACC0 & Set ALU source A accumulator \\
  85. ACC1 & Set ALU source B accumulator \\\hline
  86. BR0 & Set Branch pointer register (low byte) \\
  87. BR1 & Set Branch pointer register (high byte) \\
  88. BRZ & If source value is 0, set program counter to branch pointer \\\hline
  89. STACK& Push value to stack \\
  90. MEM0 & Set Memory pointer register (low byte) \\
  91. MEM1 & Set Memory pointer register (middle byte) \\
  92. MEM2 & Set Memory pointer register (high byte) \\
  93. MEMHI& Save high byte to memory at memory pointer \\
  94. MEMLO& Save low byte to memory at memory pointer \\\hline
  95. COMA & Set communication block address register \\
  96. COMD & Send value to communication block \\\hline
  97. REG0 & Set general purpose register 0 \\
  98. REG1 & set general purpose register 1 \\
  99. \arrayrulecolor{black}\hline
  100. \multicolumn{2}{|c|}{
  101. \cellcolor[rgb]{0.7,0.7,1}\textit{Source Addresses}} \\\hline
  102. \arrayrulecolor[rgb]{0.82,0.82,0.82}
  103. NULL & Get constant 0 \\
  104. ALU0 & Get value at ALU source A accumulator \\
  105. ALU1 & Get value at ALU source B accumulator \\\hline
  106. ADD & Get Arithmetical addition of ALU sources \\
  107. ADDC & Get Arithmetical addition carry \\
  108. ADC & Get Arithmetical addition of ALU sources and carry \\\hline
  109. SUB & Get Arithmetical subtraction of ALU sources \\
  110. SUBC & Get Arithmetical subtraction carry \\
  111. SBC & Get Arithmetical subtraction of ALU sources and carry \\\hline
  112. AND & Get Logical AND of ALU sources \\
  113. OR & Get Logical OR of ALU sources \\
  114. XOR & Get Logical XOR of ALU sources \\\hline
  115. SLL & Get ALU source A shifted left by source B \\
  116. SRL & Get ALU source A shifted right by source B \\
  117. ROL & Get rolled off value from previous SLL instance \\
  118. ROR & Get rolled off value from previous SRL instance \\\hline
  119. MULLO& Get Arithmetical multiplication of ALU sources (low byte) \\
  120. MULHI& Get Arithmetical multiplication of ALU sources (high byte) \\
  121. DIV & Get Arithmetical division of ALU sources \\
  122. MOD & Get Arithmetical modulo of ALU sources \\\hline
  123. EQ & Check if ALU source A is equal to source B \\
  124. GT & Check if ALU source A is greater than source B \\
  125. GE & Check if ALU source A is greater or equal to source B \\
  126. NE & Check if ALU source A is not equal to source B \\
  127. LT & Check if ALU source A is less than source B \\
  128. LE & Check if ALU source A is less or equal to to source B \\\hline
  129. BR0 & Get Branch pointer register value (low byte) \\
  130. BR1 & Get Branch pointer register value (high byte) \\
  131. PC0 & Get Program counter value (low byte) \\
  132. PC1 & Get Program counter value (high byte) \\\hline
  133. MEM0 & Get Memory pointer register value (low byte) \\
  134. MEM1 & Get Memory pointer register value (middle byte) \\
  135. MEM2 & Get Memory pointer register value (high byte) \\
  136. MEMHI& Load high byte from memory at memory pointer \\
  137. MEMLO& Load low byte from memory at memory pointer \\\hline
  138. STACK& Pop value from stack \\
  139. ST0 & Get stack address value (low byte) \\
  140. ST1 & Get stack address value (high byte) \\
  141. COMA & Get communication block address register value \\
  142. COMD & Read value from communication block \\\hline
  143. REG0 & Get value from general purpose register 0 \\
  144. REG1 & Get value from general purpose register 1 \\
  145. \end{longtable}
  146. \pagebreak
  147. \subsection{Glossary}\label{subsec:glossary}
  148. \textbf{CISC (Comprex Instruction Set Computer)} refers to a computer architecture that follows philosophy of implementing many instructions that can process complex functions.\\
  149. \textbf{RISC (Reduced Instruction Set Computer)} refers to a computer architecture that follows philosophy of keeping fewer common instructions and execute complex functions in software. In this report it is commonly used to refer to the developed RISC processor.\\
  150. \textbf{OISC (One Instruction Set Computer)} computer architecture that has only a single instruction. As know as Ultimate RISC. In this report it is commonly used to refer to the developed OISC processor.\\
  151. \textbf{TTA (Transport Triggered Architecture)} type of processor that does not have control block and data is directly control by the internal transport buses.\\
  152. \textbf{VLIW (Very Long Instruction Word)} refers to instructions set that encodes multiple parallel operations into a single instruction.\\
  153. \textbf{MIPS (Microprocessor without Interlocked Pipelined Stages)} is a specific RISC architecture developed by MIPS Technologies, Inc.\\
  154. \textbf{ALU (Arithmetic Logic Unit)} processor part that is responsible for the mathematical operations performed upon data.\\
  155. \textbf{RAM (Random Access Memory)} refers so dynamic volatile processor memory.\\
  156. \textbf{ROM (Read Only Memory)} refers to memory that stores program instructions.\\
  157. \textbf{FPGA (Field Programmable Gate Array)} a chip or device that can be configured to have any digital circuit within its limits.\\
  158. \textbf{HDL (Hardware Description Language)} Language used to code digital circuit behaviour. SystemVerilog specifically was used throughout this project.\\
  159. \textbf{PLL (Phase-Locked Loop)} a control system and a circuit which is commonly used to control singal phase, frequency, duty cycle and other parameters.\\
  160. \textbf{Architecture} refers to processor functioning principles, general operation and its instruction set.\\
  161. \textbf{Microarchitecture} refers to digital logic that is used to implement a computer architecture.
  162. \pagebreak
  163. \subsection{Unconventional diagram notation}\label{subsec:notation}
  164. This is a short explanation of unconventional digital logic notation and symbols used in this report diagrams. Note that notations in diagram are only to represents logical operation and not how it is implemented on circuit level. This means that an adder symbol may be implemented either as ripple carry or carry look ahead adder.
  165. \begin{figure*}[bh]
  166. \centering
  167. \includegraphics[scale=0.4]{../resources/symbols/wires.eps}
  168. \caption{(A) represents a single connecting wire; (B) represents a bus with width of 8; (C) represents a bus branching. Left side connects two 4 bit buses at indexes 0-3 and 4-7. Right side connects two buses, 2bit and 5bit viewing from top to bottom and a single wire that takes index 7.}
  169. \vspace{1cm}
  170. \includegraphics[scale=0.4]{../resources/symbols/eq.eps}
  171. \caption{This represents an equality operation. It sets output flag to high of both input bus values are equal.}
  172. \vspace{1cm}
  173. \includegraphics[scale=0.4]{../resources/symbols/ops.eps}
  174. \caption{(A) represents an adder that takes two inputs from left side and output results to bus on the right; (B) represents adder with a single input being a constant shown as decimal number in the centre of symbol; (C) repesents same adder as A, except with carry out flag at the right bottom; (D) represents multiplication circuit with two inputs at the left and two outputs at the right. As multiplication produces twice the width result than input, top output is higher word and bottom output is lower word.}
  175. \end{figure*}