Advertisement
KipIngram

22V10 Computer - Data Stack Design

Sep 27th, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. =============================================================================================================
  2.  
  3. DATA STACK
  4.  
  5. Instruction Mapping
  6. +-------+--------+-------+------+
  7. | op | | op | |
  8. +-------+--------+-------+------+ 22V10
  9. | 00000 | sub | 10000 | swap | +---------+
  10. | 00001 | or | 10001 | -rot | clk -|1 24|- vcc
  11. | 00010 | xor | 10010 | jz | op0 -|2 23|- addr // system address bus
  12. | 00011 | add | 10011 | over | op1 -|3 22|- ds6
  13. | 00100 | nip | 10100 | ret | op2 -|4 21|- ds4
  14. | 00101 | >r | 10101 | rot | op3 -|5 20|- ds2
  15. | 00110 | drop | 10110 | !a+ | op4 -|6 19|- ds0
  16. | 00111 | and | 10111 | ! | nls -|7 18|- ds1
  17. | 01000 | lshift | 11000 | r> | nms -|8 17|- ds3
  18. | 01001 | rshift | 11001 | r@ | n8 -|9 16|- ds5
  19. | 01010 | lrot | 11010 | @a+ | ext0 -|10 15|- data // system data bus
  20. | 01011 | rrot | 11011 | @b+ | ext1 -|11 14|- rs0 // top return stack element
  21. | 01100 | jmp | 11100 | dup | gnd -|12 13|- alu // arithmetic logic unit output
  22. | 01101 | not | 11101 | loop | +---------+
  23. | 01110 | @ | 11110 | lit |
  24. | 01111 | <> | 11111 | tuck |
  25. +-------+--------+-------+------+
  26.  
  27. ds0 := ds0 * ((jmp+nip+dup+ret) + (loop+tuck) + and*ds1)
  28. + ~ds0 * (not)
  29. + ds1 * ((drop+!a+) + (swap+-rot+jz+over) + >r)
  30. + ds2 * ((rot+!))
  31. + nls * ((lshift+lrot)) // Only lrot for LSB
  32. + nms * ((rshift+rrot)) // Only rrot for MSB
  33. + n8 * (<>)
  34. + alu * ((sub+or+xor+add))
  35. + dat * ((@a++@b+) + (lit+@))
  36. + rs0 * ((r>+r@));
  37.  
  38. ds1 := ds0 * ((r>+r@+@a++@b+) + dup + over + swap + lit + rot)
  39. + ds1 * ((lshift+rshift+lrot+rrot+jmp+not+@+<>) + ret + (loop+tuck))
  40. + ds2 * ((sub+or+xor+add+nip+>r+drop+and) + jz + -rot + !a+)
  41. + ds3 * (!);
  42.  
  43. ds2 := ds0 * (-rot + tuck)
  44. + ds1 * ((r>+r@+@a++@b+) + dup + over + lit + rot)
  45. + ds2 * ((lshift+rshift+lrot+rrot+jmp+not+@+<>) + (ret+swap) + loop)
  46. + ds3 * ((sub+or+xor+add+nip+>r+drop+and) + jz + !a+)
  47. + ds4 * (!);
  48.  
  49. dsi := ds- * ((r>+r@+@a++@b+) + (dup+tuck) + over + lit)
  50. + dsi * ((lshift+rshift+lrot+rrot+jmp+not+@+<>) + (ret+rot+-rot+swap) + loop)
  51. + ds+ * ((sub+or+xor+add+nip+>r+drop+and) + (jz+!a+))
  52. + ds++ * (!);
  53.  
  54. data = ds0*/op0 + ds1*op0, enable on op4*/op3*op2*op1;
  55. addr = ds0, enable on !;
  56.  
  57. // For depth extension, use the dsi equation for ds0, ds1, and ds2 as well. The dat, rs0, and alu
  58. // connections are no longer required, so level extension can provide ten additional elements each.
  59. //
  60. // Connect ext0 and ext1 of the deepest level to ds0 and ds1, respectively, of the top level.
  61.  
  62. =============================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement