Advertisement
paullongtine

BRISC rev3

Jul 16th, 2013
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. Instruction set:
  2. Types:
  3. Type is the way the instruction is being handled inside the CPU.
  4.  
  5. A Type: Standard C=A+B, value returned will be from the ALU and therefore acessable by everything on the Main Data Buss.
  6. B Type: Used to load a piece of data onto the GPR's, but not be loaded onto any other register.
  7. C Type: Used when branching, No piece of data is being manipulated and saved.
  8. D Type: Used when reading from the B output of the GPR's to another mass of memory
  9.  
  10. Operations:
  11. 0000-ADD - Add A and B, Save in C - A Type
  12. 0001-IOR - OR A and B, Save in C - A Type
  13. 0010-AND - AND A and B, Save in C - A Type
  14. 0011-XOR - XOR A and B, Save in C - A Type
  15. 0100-++v - 1 + A + B, Save in C - A Type
  16. 0101-NOR - NOR A and B, Save in C - A Type
  17. 0110-NAND - NAND A and B, Save in C - A Type
  18. 0111-XNOR - XNOR A and B, Save in C - A Type
  19. 1000-A!=B - Compare if A != B, Return Bool - C Type
  20. 1001-A>=B - Compare if A >= B, Return Bool - C Type
  21. 1010-True - Returns True - C Type
  22. 1011-rsft - Right shifts B - B Type
  23. 1110-Halt - stops the computer
  24. 1111-Sub - Subtract A and B, Save in C - A Type
  25. Argument C:
  26. | # | Name |-| Type // Note
  27. 0000-null
  28. 0001-Set MMIO 01 - A Type
  29. 0010-Set MMIO 10 - A Type
  30. 0011-Set MMIO 11 - A Type
  31. 0100-Push Stack - A Type
  32. 0101-Set GPR 01 - A Type
  33. 0110-Set GPR 10 - A Type
  34. 0111-Set GPR 11 - A Type
  35. 1000-Set JMP - A Type // can be used in unconditional jump
  36. 1001-JMP if True - C Type // If there is no comparative operation, This will return True if the COUT is on
  37. 11xx-Load Imm - B Type
  38. Argument A:
  39. | # | Name |-| Type // Note
  40. 0000-null - Null
  41. 0001-Read MMIO 01 - B Type
  42. 0010-Read MMIO 10 - B Type
  43. 0011-Read MMIO 11 - B Type
  44. 0100-Pop Stack - A Type
  45. 0101-Read GPR 01 - A Type
  46. 0110-Read GPR 10 - A Type
  47. 0111-Read GPR 11 - A Type
  48. 1XXX-RAM Write - D Type
  49. Argument B:
  50. | # | Name |-| Type // Note
  51. 0000-null - Null
  52. 0100-Read STK - A Type
  53. 0101-Read GPR 01 - A Type
  54. 0110-Read GPR 10 - A Type
  55. 0111-Read GPR 11 - A Type
  56. 1XXX-RAM Read - B Type
  57.  
  58. Terminology:
  59. MMIO = Memory Mapped I/O; I/O Mapped like memory
  60. GPR = General Purpose Register, the registers linked directly to the ALU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement