Advertisement
ypetremann

TIS-100 REFERENCE MANUAL

Jun 17th, 2015
9,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.83 KB | None | 0 0
  1. .TH "TIS\-100 - REFERENCE MANUAL" "" "" "" ""
  2. .P
  3. .nf
  4. _____ ___ ____ _ ___ ___
  5. |_ _|_ _/ ___| / |/ _ \\ / _ \\
  6. | | | |\\___ \\ _____| | | | | | | |
  7. | | | | ___) |_____| | |_| | |_| |
  8. |_| |___|____/ |_|\\___/ \\___/
  9.  
  10. \fBTESSELLATED INTELLIGENCE SYSTEM - REFERENCE MANUAL\fR
  11.  
  12. .P
  13. \fI
  14. M--
  15.  
  16. We are all still in shock here from Uncle Randy's
  17. sudden passing. While we wait on word from the
  18. examiner about the cause we are coping as best we
  19. can I've been occupying myself sorting through his
  20. things, especially his computers. Of course, I took one
  21. look in the garage and it all looks like a bunch of junk to
  22. me. I'll send some pictures when I get a chance.
  23.  
  24. For now, this is the machine that was set up on his
  25. workbench when he died. Maybe you'll be able to figure
  26. out what he was doing with it. He would've liked to
  27. know someone was going to finish his work.
  28.  
  29. Love,
  30. Aunt Doris.
  31. \fR
  32.  
  33. .SH "OVERVIEW"
  34.  
  35. The Tessellated Intelligence System is a massively parallel computerarchitecture comprised of non/uniformly interconnected heterogeneous nodes\. \fBThe Tessellated Intelligence System is ideal for applications requiring complex data stream processing, such as automated financial trading, bulk data collection, and civilian behavioral analysis\.\fR
  36.  
  37. .IP "Note" 2
  38. Notes like this one will appear in this manual to indicate scenarios requiring special attention and to refer to other documents that contain more information on a topic.
  39.  
  40. .SH "SYSTEM ARCHITECTURE AND ORGANIZATION"
  41.  
  42. The Tessellated Intelligence System consists of a large number of independent nodes connected on a local basis\. (Refer to the model-specific manual to find the precise node population counts present on a particular device\.) Node types can be broadly classified as processing or storage, with several variants within each category\.
  43. .P
  44. Generally, nodes are connected to up to four neighbors via ports\. Ports enable lightweight message/passing communication between nodes\. Communication over ports is coordinated by allowing either node to issue a read or write to a port and blocking until the request is filled by the corresponding node\.
  45.  
  46. .IP "Note" 2
  47. If two nodes issue the same communication command (read or write) on the connection between them, the nodes will deadlock and a hardware fault will occur. Refer to the separate document “Tessellated Intelligence System Best Practices r Patterns of Node Communication” for details on how to use ports effectively and safely.
  48.  
  49. .IP "Note" 2
  50. If a node issues a communication command and it is never fulfilled by the corresponding node, the node will deadlock and a hardware fault will occur. (Exceptions to this rule exist; refer to the documentation of specific node types for details.) Refer to the separate document “Tessellated Intelligence System Best Practices I Patterns of Node Communication” for details on how to use ports effectively and safely.
  51.  
  52. .IP "Note" 2
  53. This document does not describe timing or throughput for node communication operations or instructions, as these values vary by model and hardware revision. Refer to the model/specific manual for a detailed description of performance characteristics of a particular device.
  54.  
  55. .SH "NODE TYPE T20 - RESERVED"
  56.  
  57. .IP "Note" 2
  58. This node type identifier is restricted to specific models of the Tessellated Intelligence System and will not be described in this document. Documentation for node type T20 is distributed only with systems containing this node type. \fBUnauthorized requests for copies of documentation describing this node are reported to the state
  59. > security bureau, as required by law. \fI???\fR
  60.  
  61. .SH "NODE TYPE T21 - BASIC EXECUTION NODE"
  62. .SH " Architecture"
  63. The Basic Execution Node is responsible for coordinating the behavior of the Tessellated Intelligence System\. Processing can occur within the Basic Execution Node, or can be delegated to specialized processing and storage nodes\.
  64. .
  65. .P
  66. The Basic Execution Node executes a program specified in the Basic Execution Node Instruction Set\. A Basic Execution Node program specifies computational and communication operations to perform\. Operations are performed sequentially, beginning with the first instruction in the program\. \fBAfter executing the last instruction of the program, execution automatically continues to the first instruction\.\fR This behavior supports the common usage of Basic Execution Nodes, in which programs are written to operate in a continuous loop\.
  67. .
  68. .P
  69. In addition to the communication ports common to all Tessellated Intelligence System nodes, the Basic Execution Node contains a number of registers that are used in the execution of its program\. No additional memory is available on the Basic Execution Node; if additional storage is required, the node should coordinate with another Basic Execution Node or a storage node\.
  70. .
  71. .P
  72. All registers store integer values between \-999 and 999 (inclusive)\. The representation of register values is implementationrdefined, and knowledge of the representation is not required to program the Basic Execution Node\.
  73. .
  74. .SS "ACC"
  75. Type: Internal
  76. .
  77. .P
  78. Description: ACC is the primary storage register for a Basic Execution Node\. ACC is used as the implicit source or destination operand of many instructions, including arithmetic and conditional instructions\.
  79. .
  80. .SS "BAK"
  81. Type: Internal (non/addressable)
  82. .
  83. .P
  84. Description: BAK is temporary storage for values in ACC\. It is only accessible through the SAV and SWP instructions, and \fBcannot be read or written directly\fR\.
  85. .
  86. .SS "NIL"
  87. Type: Internal (special)
  88. .
  89. .P
  90. Description: Reading NIL produces the value zero\. Writing to NIL has no effect\. NIL can be used as a destination operand to execute an instruction for its side effects only, discarding the result\.
  91. .
  92. .SS "LEFT, RIGHT, UP, DOWN"
  93. Type: Port
  94. .
  95. .P
  96. Description: The four communication registers UP, DOWN, LEFT, and RIGHT correspond to the four ports that all Basic Execution Nodes use to communicate with topologically adjacent nodes\. Some ports will be disconnected on certain nodes within the hardware, and will block indefinitely if a READ or WRITE command is issued\. Refer to the interconnection diagram for the node to determine which ports are available for use\.
  97. .
  98. .SS "ANY"
  99. Type: Port (pseudoport)
  100. .
  101. .P
  102. Description: When ANY is used as the source of an instruction, the instruction will read the first value that becomes available on any port\. When ANY is used as the destination of an instruction, the result of the instruction will be sent to the first node that reads from any port on this node\.
  103. .
  104. .SS "LAST"
  105. Type: Port (pseudoport)
  106. .
  107. .P
  108. Description: LAST refers to the port last read or written using the ANY pseudoport\. It otherwise behaves identically to explicitly specifying a port\. Reading from or writing to LAST before it has been set by a successful read or write using the ANY pseudoport will result in implementation-defined behavior\. Refer to the separate document “Tessellated Intelligence System Best Practices I Patterns of Node Communication” for sample code demonstrating the use of the LAST pseudoport\.
  109. .
  110. .SH " Instruction Set"
  111. \fISRC\fR and \fIDST\fR instruction parameters may specify a port or internal register\. Any use of a port will block until the corresponding node connected to that port completes the communication by reading or writing a\' value\. Additionally, a \fISRC\fR parameter may be a literal integer value between \-999 and 999 (inclusive)\. BAK cannot be specified as a \fISRC\fR or \fIDST\fR operand\. The value of BAK is only accessible through special instructions SAV and SWP\. \fILABEL\fR parameters are arbitrary textual names used to specify jump targets within the program\.
  112. .
  113. .SS "Comments"
  114. Syntax: # COMMENT TEXT
  115. .
  116. .P
  117. Description: All text including and after the comment symbol (#) is ignored\.
  118. .
  119. .SS "Labels"
  120. Syntax: \fILABEL\fR:
  121. .
  122. .P
  123. Description: Labels are used to identify targets for jump instructions\. When used as a jump target, the instruction following the label will be executed next\.
  124. .
  125. .P
  126.  
  127. .
  128. .IP "Examples:" 4
  129.  
  130. LOOP : This label is on a line by itself\.
  131. L: MOV 8, ACC This label is on a line with another instruction
  132. .
  133. .fi
  134. .
  135. .IP "" 0
  136. .
  137. .SS "NOP"
  138. Syntax: NOP
  139. .
  140. .P
  141. Equivalent syntax: ADD NIL
  142. .
  143. .P
  144. Description: NOP is a pseudodnstruction that has no effect on the node’s internal state or communication ports\. NOP is automatically converted to the instruction ADD NIL\.
  145. .
  146. .SS "MOV"
  147. Syntax: MOV \fISRC\fR, \fIDST\fR
  148. .
  149. .P
  150. Description: \fISRC\fR is read and the resulting value is written to \fIDST\fR\.
  151. .
  152. .P
  153. .IP "Examples:" 4
  154. .
  155. .nf
  156.  
  157. MOV 8, ACC The literal value 8 is written to the ACC register\.
  158. MOV LEFT, RIGHT A value is read from the LEFT port, and then written to RIGHT\.
  159. MOV UP, NIL A value is read from the UP port and then discarded\.
  160. .
  161. .fi
  162. .
  163. .IP "" 0
  164. .
  165. .SS "SWP"
  166. Syntax: SWP
  167. .
  168. .P
  169. Description: The values of ACC and BAK are exchanged\.
  170. .
  171. .SS "SAV"
  172. Syntax: SAV
  173. .
  174. .P
  175. Description: The value of ACC is written to BAK\.
  176. .
  177. .SS "ADD"
  178. Syntax: ADD \fISRC\fR
  179. .
  180. .P
  181. Description: The value of \fISRC\fR is added to the value of ACC and the result is stored to ACC\.
  182. .
  183. .P
  184. .IP "Examples:" 4
  185. .
  186. .nf
  187.  
  188. ADD 16 The literal value 16 is added to the value in the ACC register\.
  189. ADD LEFT A value is read from the LEFT port, and then added to ACC\.
  190. .
  191. .fi
  192. .
  193. .IP "" 0
  194. .
  195. .SS "SUB"
  196. Syntax: SUB \fISRC\fR
  197. .
  198. .P
  199. Description: The value of \fISRC\fR is subtracted from the value of ACC and the result is stored to ACC\.
  200. .
  201. .P
  202. .IP "Examples:" 4
  203. .
  204. .nf
  205.  
  206. SUB 16 The literal value 16 is subtracted from the value in the ACC register\.
  207. SUB LEFT A value is read from the LEFT port, and then subtracted from ACC\.
  208. .
  209. .fi
  210. .
  211. .IP "" 0
  212. .
  213. .SS "NEG"
  214. Syntax: NEG
  215. .
  216. .P
  217. Description: The value of ACC is arithmetically negated\. A value of zero remains the same\.
  218. .
  219. .SS "JMP"
  220. Syntax: JMP \fILABEL\fR
  221. .
  222. .P
  223. Description: Transfer execution unconditionally\. The instruction after the label \fILABEL\fR will be executed next\.
  224. .
  225. .SS "JEZ"
  226. Syntax: JEZ \fILABEL\fR
  227. .
  228. .P
  229. Description: Transfer execution conditionally\. The instruction after the label \fILABEL\fR will be executed next if the value of ACC is zero\.
  230. .
  231. .SS "JNZ"
  232. Syntax: JNZ \fILABEL\fR
  233. .
  234. .P
  235. Description: Transfer execution conditionally\. The instruction after the label \fILABEL\fR will be executed next if the value of ACC is not zero\.
  236. .
  237. .SS "JGZ"
  238. Syntax: JGZ \fILABEL\fR 1
  239. .
  240. .P
  241. Description: Transfer execution conditionally\. The instruction after the label \fILABEL\fR will be executed next if the value of ACC is positive (greater than Zero)\.
  242. .
  243. .SS "JLZ"
  244. Syntax: JLZ \fILABEL\fR
  245. .
  246. .P
  247. Description: Transfer execution conditionally\. The instruction after the label \fILABEL\fR will be executed next if the value of ACC is negative (less than zero)\.
  248. .
  249. .SS "JRO"
  250. Syntax: JRO \fISRC\fR
  251. .
  252. .P
  253. Description: Transfer execution unconditionally\. The instruction at the offset specified by \fISRC\fR relative to the current instruction will be executed next\.
  254. .
  255. .P
  256. .IP "Examples:" 4
  257. .
  258. .nf
  259.  
  260. JRO 0 This instruction will be executed next, effectively halting execution\.
  261. JRO \-l The previous instruction will be executed next\.
  262. JRO 2 The next instruction will be skipped, executing the instruction following it\.
  263. \fBJRO ACC The next instruction to execute will be determined by the value in ACC\.\fR
  264. .
  265. .fi
  266. .
  267. .IP "" 0
  268. .
  269. .SH " Example Programs"
  270. The following sample program reads a sequence of values from the LEFT port, doubling each value read and writing that to the RIGHT port\. Because of the automatic looping behavior of the Basic Execution Node, it continues to the first instruction after executing the last instruction\.
  271. .
  272. .IP "" 4
  273. .
  274. .nf
  275.  
  276. MOV LEFT , ACC Read a value from the LEFT port into the ACC register\.
  277. ADD ACC Add the value in ACC to itself, doubling it\.
  278. MOV ACC , RIGHT Write the value in the ACC register to the RIGHT port\.
  279. .
  280. .fi
  281.  
  282. .P
  283. .
  284. .P
  285. The following sample program reads a sequence of values from the UP port, writing positive values to the RIGHT port and negative values to the LEFT port\. Zero values are discarded\.
  286. .
  287. .IP "" 4
  288. .
  289. .nf
  290.  
  291. START:
  292. MOV UP, ACC Read a value from the UP port into the ACC register\.
  293. JGZ POSITIVE If the value in ACC is greater than zero, jump to “POSITIVE”\.
  294. JLZ NEGATIVE If the value in ACC is less than zero, jump to “NEGATIVE”\.
  295. JMP START The value was neither positive nor negative, so jump to “START”\.
  296. POSITIVE:
  297. MOV ACC , RIGHT Write the value in the ACC register to the RIGHT port\.
  298. JMP START Jump to “START”\.
  299. NEGATIVE:
  300. MOV ACC , LEFT Write the value in the ACC register to the LEFT port\.
  301. JMP START Jump to “START”\.
  302. .
  303. .fi
  304. .
  305. .SH "NODE TYPE T30 - STACK MEMORY MODE"
  306. .
  307. .SH " Architecture"
  308. The Stack Memory Node enables read/write access to a large number of values according to a simple stackrbased communication protocol\. (Refer to the modelspecific manual to find the capacity of the Stack Memory Nodes on a particular device\.)
  309. .
  310. .SH " Communication Protocol"
  311. All interaction with the Stack Memory Node is performed through ports\. Writing to the Stack Memory Node adds the value to the top of the stack\. If the stack is full, the write will block until space becomes available\. Reading from the Stack Memory Node removes the top value from the stack and produces that value\. If the stack is empty, the read will block until a value is available\.
  312. .
  313. .P
  314. Stack Memory Nodes are typically connected to multiple other nodes, and can be used by any connected node\. Simultaneous reads and writes to a Stack Memory Node resolve in an undefined order, but each individual communication will behave according to the described communication protocol\. For more information on using storage nodes from multiple nodes effectively and predictably, refer to the separate document “Tessellated Intelligence System Best Practices r Patterns of Node Communication”\.
  315. .
  316. .SH "NODE TYPE T31 - RANDOM ACCESS MEMORY NODE"
  317.  
  318. .IP "Note" 2
  319. Note: The Random Access Memory Node is not yet available in standard Tessellated Intelligence System
  320. devices. Emulators and prototype hardware are available to interested users. The specification and behavior is
  321. not yet finalized and therefore is omitted from this document.
  322.  
  323. .P
  324. .nf
  325. \fITODO\fR
  326. \fI\- Figure out who sold TIS\-100 to swap meet dealer\fR
  327. \fI\- Rebuild signal multiplier\fR
  328. \fI\- Look for book of mico\-optimisation tips\fR
  329. \fI\- renew license plate tabs\fR
  330. .
  331. .SH "EMBEDDED INTERACTIVE DEBUGGER"
  332. .SH " Keyboard Shortcuts"
  333. .nf
  334. The interactive debugger contains the following keyboard shortcuts:
  335. Control\-Z:Undo last change
  336. Control\-Y: Redo last change
  337. Control\-X: Cut selected text to clipboard
  338. Control\-C: Copy selected text to clipboard
  339. Control\-V: Paste clipboard text
  340. Control\-Arrow: Navigate to the adjacent execution node
  341. F1: View instruction set quick reference
  342. \fBF2: View anti\-tamper certification status\fR \fI??\fR
  343. F5: Begin running the current program
  344. F6: Step or pause the current program
  345. .
  346. .SH " Breakpoints"
  347. To set a breakpoint, place an exclamation mark (D at the beginning of a line\. When a breakpoint is set, the program will be paused before that line is executed, allowing you to easily debug code that would be too tedious to step through one instruction at a time\.
  348. .
  349. .IP "" 4
  350. .
  351. .nf
  352.  
  353. MOV LEFT , ACC
  354. !ADD ACC The program will be paused before this instruction is executed\.
  355. MOV ACC , DOWN
  356. .
  357. .fi
  358. .
  359. .IP "" 0
  360. .
  361. .SH "VISUALIZATION MODULE"
  362. .SH " Visualization Module Usage"
  363. The TIS\-IOO contains a Visualization module that allows programs to programmatically create and display images\. The module contents can be modified by sending command sequences, which consist of the starting X coordinate, the starting Y coordinate, one or more color values, and a terminating negative value (often \-I)\. \fBThe coordinate system starts at (o, 0), which is located in the topleft of the display area\.\fR
  364. .
  365. .P
  366. The visualization module supports the following colors:
  367. .
  368. .nf
  369. 0: Black
  370. 1: Dark grey
  371. 2: Bright grey
  372. 3: White
  373. 4: Red
  374. .
  375. .SH " Visualization Module Resolution"
  376. The standard TIS\-100 visualization module is \fB30 characters wide and 18 characters tall\.\fR
  377. .
  378. .P
  379. The “image console sandbox” contains a larger visualization module that is 36 characters wide and 22 characters tall\.
  380. .
  381. .SH " Example Command Sequences"
  382. .
  383. .nf
  384.  
  385. 0,0,3,\-1 Draw a single white pixel in the topleft corner of the module‘s display\.
  386. 0,0,4,4,4,4,4,\-1 Draw a horizontal red line in the topleft corner of the module’s display\.
  387. .
  388. .fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement