bcpu.dot 537 B

123456789101112131415161718192021
  1. /* state diagram of the 1 bit bcpu cpu */
  2. digraph bcpu {
  3. reset -> fetch [label="start"]
  4. fetch -> execute
  5. fetch -> indirect [label="flag(IND) = '1'\n and op < 8"]
  6. fetch -> reset [label="flag(RST) = '1'"]
  7. fetch -> halt [label="flag(HLT) = '1'"]
  8. indirect -> operand
  9. operand -> execute
  10. execute -> advance
  11. execute -> store [label="op = 'store'"]
  12. execute -> load [label="op = 'load'"]
  13. execute -> fetch [label="(op = 'jumpz' and acc = 0)\n or op ='jump'"]
  14. store -> advance
  15. load -> advance
  16. advance -> fetch
  17. halt -> halt
  18. }