debug.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <html>
  2. <head>
  3. <title>Debugging subcircuits</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1>Debugging subcircuits</h1>
  7. <p>As you test larger circuits, you will likely find bugs. To nail down
  8. what's going wrong, exploring what's going on in the subcircuits while
  9. running the overall circuit can help. To enter the subcircuit's state, you can
  10. use any of three different techniques. The most straightforward is probably
  11. to view the simulation hierarchy by clicking the second icon in the explorer
  12. pane's upper toolbar (<img src="../../../../en/icons/projsim.gif" width="16" height="16">), or by selecting
  13. "View Simulation Tree" from the Project menu. This switches
  14. the explorer pane so that it shows the hierarchy of subcircuits being simulated.</p>
  15. <center><img src="../../../../en/img-guide/subcirc-hierarchy.png" width="393" height="285"></center>
  16. <p>Double-clicking an element in this hierarchy will display what is happening
  17. inside that subcircuit.</p>
  18. <p>The second way you can enter a subcircuit is to bring up its popup menu
  19. by right-clicking or control-clicking it, and then choosing the View option.</p>
  20. <center><img src="../../../../en/img-guide/subcirc-4-delve.png" width="393" height="285"></center>
  21. <p>And the third way is to first ensure the Poke Tool is selected
  22. and then click the subcircuit you want to enter;
  23. a magnifying glass will appear over the subcircuit's center, and
  24. double-clicking the magnifying glass will enter
  25. the subcircuit's state.</p>
  26. <p>In any case, once you enter the subcircuit, you'll see that the pins' values
  27. in the subcircuit match the values being sent through them from the containing
  28. circuit.</p>
  29. <center><img src="../../../../en/img-guide/subcirc-2-delve.png" width="393" height="285"></center>
  30. <p>While in the subcircuit, you are allowed to alter the circuit. If the
  31. changes affect any of the subcircuit's outputs, they are propagated into the
  32. containing circuit. One exception: The subcircuit inputs are determined based on
  33. the values coming into the circuit from the supercircuit, so it doesn't make
  34. sense to toggle those values. If you attempt to poke a subcircuit's input,
  35. a dialog will pop up asking, <q>The pin is tied to the supercircuit state.
  36. Create a new circuit state?</q> Clicking No will cancel the toggle request,
  37. while clicking Yes will create a copy of the viewed state,
  38. divorced from the outer circuit, with the input pin toggled.</p>
  39. <p>Once you have completed viewing and/or editing, you can return to the parent circuit
  40. either by double-clicking the parent circuit in the explorer pane, or via the Go Out
  41. To State submenu of the Simulate menu.</p>
  42. <p><strong>Next:</strong> <a href="library.html">Logisim libraries</a>.</p>
  43. </body>
  44. </html>