other.html 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <html>
  2. <head>
  3. <title>Other verification options</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1>Other verification options</h1>
  7. <p>There are a some additional options related to command-line execution.</p>
  8. <h2>The <tt>-load</tt> command-line parameter</h2>
  9. <p>A more complex circuit might include a RAM component that needs to
  10. be loaded with a program in order for the circuit to have anything to do.
  11. You can specify a memory image file at the command line, which will be loaded
  12. into any RAM component in the circuit before simulation begins.
  13. (This does not work when loading the GUI - it is only for command-line execution.)</p>
  14. <blockquote><tt>java -jar logisim-filename.jar cpu.circ -tty table -load mem-image.txt</tt></blockquote>
  15. <p>The order of the parameters is not important (except the <tt>table</tt>
  16. parameter must be immediately after <tt>-tty</tt>, and the memory image's filename
  17. must be immediately after <tt>-load</tt>).
  18. The memory image file should be in
  19. <a href="../mem/menu.html">Logisim's memory image format</a>.</p>
  20. <p>Logisim searches for RAM recursively, so this will still work if RAM is
  21. nested within a subcircuit.
  22. There is no way, though, to distinguish different RAM components:
  23. Logisim will attempt to load the same file into every RAM that it can find.</p>
  24. <h2>Options for the <tt>-tty</tt> parameter</h2>
  25. <p>In our examples thus far, we've always used <q><tt>-tty&nbsp;table</tt></q>
  26. to indicate that a table of output values should be displayed. You can
  27. customize the behavior in other ways by listing one or more options,
  28. separated by commas. For instance, you might write
  29. <q><tt>-tty&nbsp;table,halt,speed</tt></q>,
  30. and the program will perform all three behaviors listed below.
  31. (The order in which they are listed does not matter.)</p>
  32. <dl>
  33. <dt><tt>halt</tt></dt>
  34. <dd><p>After the simulation ends, a one-line message is displayed explaining
  35. why the simulation ended. Error conditions - such as a detected oscillation -
  36. are displayed in any case.</p></dd>
  37. <dt><tt>speed</tt></dt>
  38. <dd><p>If you use <tt>speed</tt> in conjunction with <q><tt>-tty</tt></q>,
  39. then after completing the simulation Logisim will display a summary of
  40. how quickly the circuit was simulated, such as:</p>
  41. <blockquote><tt>714 Hz (509 ticks in 712 milliseconds)</tt></blockquote>
  42. <p>Note that displaying information during the simulation
  43. makes the simulation go much slower. As just one comparison, the same circuit and image
  44. ran at 714&nbsp;Hz above with just the <tt>speed</tt> option
  45. but 490&nbsp;Hz with the <tt>table</tt> option as well.</p></dd>
  46. <dt><tt>stats</tt></dt>
  47. <dd><p>Shows a tab-delimited table containing statistics about components
  48. used by the top-level <q>main</q> circuit in the project. The table includes
  49. four columns:</p>
  50. <ul>
  51. <li>Unique: The number of times that component appears in the circuit's hierarchy,
  52. where each subcircuit within the hierarchy is counted only once.</li>
  53. <li>Recursive: The number of times that component appears in the circuit's hierarchy,
  54. where we count each subcircuit as many times as it appears in the hierarchy.</li>
  55. <li>Component: The name of the component.</li>
  56. <li>Library: The name of the library from which the component came.</li>
  57. </ul>
  58. <p>The distinction between <q>Unique</q> and <q>Recursive</q> is explained
  59. further under <q><a href="../menu/project.html">Project menu</a></q> section.
  60. If the file uses circuits from a loaded Logisim library, those components are
  61. considered to be <q>black boxes</q>: The contents of the library's circuits are
  62. not included in the unique and recursive counts.</p>
  63. <p>(This feature can be useful for instructors who assign students to build
  64. projects using a subset of Logisim's libraries.)</p></dd>
  65. <dt><tt>table</tt></dt>
  66. <dd><p>(as already discussed)</p></dd>
  67. <dt><tt>tty</tt></dt>
  68. <dd><p>Any TTY components send their output to the display (standard output),
  69. and any information typed at the keyboard is sent to all Keyboard components
  70. in the circuit.
  71. These components are included even if they are nested deeply
  72. in the subcircuit hierarchy.</p></dd>
  73. <p><strong>Next:</strong>&nbsp;<a href="multi.html">Testing multiple files</a>.</p>
  74. </body>
  75. </html>