Benutzung der Kommandozeile
Subsections:
Substituting libraries
Other verification options
Testing multiple files
Logisim includes basic support for executing circuits from the command-line. This is intended both to help with scripted verification of circuit designs and to help instructors perform automated testing of students' solutions.
We'll start by seeing how to execute a circuit from the command line. For our example, we'll suppose we've built the below circuit in a file named adder-test.circ. It uses a two-bit adder as a subcircuit and iterates using a counter through all 16 possible inputs to it.
After this circuit has been built, we then execute Logisim from the command line,
providing the filename of the project
and the -tty
option with the table
parameter.
java -jar logisim-filename.jar adder-test.circ -tty table
Without bringing up any windows, Logisim loads the circuit and begins to execute it,
ticking any clocks as fast as it can while completing the propagation between each tick.
After each propagation is completed, Logisim loads the current values of the output pins;
if any have changed from the previous propagation,
then all values are displayed in tab-delimited format.
If there is an output pin labeled with the special word halt
,
its output is not displayed — but once the pin's value reaches 1 after
a propagation is completed, Logisim ends the simulation.
For our example, Logisim displays the table below. Because we have two output pins corresponding to the two inputs a and b into the two-bit adder, these outputs are included as the first two columns of the output. And there is another output pin corresponding to the two-bit adder's output, so it is the third column. The columns are ordered left-to-right according to the top-down ordering within the circuit.
00 00 000 01 00 001 10 00 010 11 00 011 00 01 001 01 01 010 10 01 011 11 01 100 00 10 010 01 10 011 10 10 100 11 10 101 00 11 011 01 11 100 10 11 101 11 11 110
Next: Substituting libraries.