home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10703 < prev    next >
Encoding:
Text File  |  1992-11-13  |  2.9 KB  |  64 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!news
  3. From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879)
  4. Subject: Re: MINIMUM instruction set
  5. Sender: news@news.uiowa.edu (News)
  6. Message-ID: <1992Nov13.171356.25166@news.uiowa.edu>
  7. Date: Fri, 13 Nov 1992 17:13:56 GMT
  8. References: <1992Nov13.113147.11856@odin.diku.dk>
  9. Nntp-Posting-Host: pyrite.cs.uiowa.edu
  10. Organization: University of Iowa, Iowa City, IA, USA
  11. Lines: 51
  12.  
  13. > So here is a challenge: design a machine that uses no more than 4 bits
  14. > per instruction (including operand fields), is Turing complete, not
  15. > terribly inefficient and which can be built using far less hardware
  16. > than current microprocessors. The latter would make it suitable for
  17. > massively parallel systems.
  18.  
  19. I proposed an idea that might help in my Computer Architecture News paper
  20. entitled "the Minimal CISC" (June 1988).  In that paper, I proposed a
  21. not-too inefficient machine using only 3 bits per instruction (operand
  22. fields included).  Here's a 4 bit per instruction improvement that's not
  23. half bad (you can do quite a bit better if you let some 4 bit instructions
  24. interpret the next nibble as a 4 bit operand:
  25.  
  26. Notation:  X = top word on stack
  27.            Y = word under top word on stack
  28.        push(t) -- push word with value T on stack
  29.        pop -- pop one word off stack
  30.  
  31. NOP    0000 No op                                \
  32. ZERO    0001 X := X << 1                           \
  33. ONE     0010 X := (X << 1) + 1                      | This much is exactly
  34. DUP     0011 push(X) (duplicates top word on stack) \ my minimal CISC
  35. STORE   0100 M[Y] := X; pop; pop;                   / instruction set.
  36. LOAD    0101 X := M[X];                             |
  37. SUB     0110 Y := Y-X; pop;                        /
  38. BNEG    0111 if Y<0 then PC := X; endif; pop; pop;/
  39. ZZERO    0000 X := X << 2;                         \
  40. OONE    0001 X := (X << 2) + 3;                    \
  41. PUSHZ   0010 push(0);                               |
  42. NEG     0011 X := -X;                               \
  43. AND     0100 Y := Y & X; pop;                       /
  44. CALL    0101 swap(PC,X);                            |
  45. BZERO   0110 if Y=0 then PC := X; endif; pop; pop; /
  46. BPOS    0111 if Y>0 then PC := X; endif; pop; pop;/
  47.  
  48. PUSHZ = DUP;DUP;SUB, but we add it for fast pushing of small constants;
  49. ZZERO = ZERO;ZERO, but we add it for faster pushing of constants;
  50. OONE  = ONE;ONE, but we add it for the same reason.
  51. NEG is added so that ADD can be done by the macro NEG;SUB;
  52. NEG allows one's complement with the macro NEG;PUSHZ;ONE;SUB;
  53. Unconditional branch is done with PUSHZ;{push address};BZERO;
  54.  
  55. If the word size is N bits, it takes N instructions, in the worst case,
  56. to push an N bit constant.  101010... is the worst case.
  57.  
  58. Instructions are packed 2 per byte, and labels must be word aligned.  NOP
  59. instructions are used to align labels to a word boundary.
  60.  
  61.                 Doug Jones
  62.                 jones@herky.cs.uiowa.edu
  63.  
  64.