Simulation
The Basics
The Simulation of Circuits in Klogic is based on Steps. There is no unit to measure these steps, but you can
adjust the time, wich has to be gone, before the next step is executed. On every step, the signal states of every
Device and wire is calculated and finally displayed. To change the time between the steps, you can move the slider
at the toolbar or goto the Options menu and choose "Global Settings".
The time between steps is not guaranteed, and it isn't important for the calculation of the results of your cicuit,
so (depending of your cpu-power) the steps could be executed faster or slower as the setting you have made.
All Devices have a tunable delay. A delay of "1" means that the incoming signal are processed with a delay of one
simulation step. The default value for the delay is "1". If you use Oscillators with a switch-time smaller than the
sum over all Delays, you should be aware of undfined signal states especially in backtraced circuits. You can
turn off all Delay effects by increasing the burst value in the Options/Global Settings Dialog. So each Device is
claculated n times within each step, where n is the value to wich you have set the burst value.
Single Step Mode
The single Step mode allows to process your circuit step by step, without any flow. To enter the Single Step Mode,
press the "1" Button at the toolbar next to the slider. Now, every time you press this Button again, the next
step of the simulation is executed. Alternatively you can press the "s" Key on your Keyboard or select "Step through"
form the Simulation Menu." The single step mode is usefull if something is wrong with your circuit. It can help
you to figure out how a specific signal is processed, expecially in larger, more complex circuits, when it isn't
possible to follow a signal through the devices in "normal" simulation.
To exit from single step mode to the default simualtion, you can select "simulation" at the "simulation" menu,
press the "N" Button at the toolbar next to the slider or press the "M" Key on your Keyboard.
Multiple Step Mode
This is the default mode of klogic. All steps of a simulation are executed with the predefined step rate you
set in Options/Global Settings, or with the slider. At this mode the simulation will never stop, the steps are
calculated permanently.
The Simulation Graph
The most left Button of the Simulation Toolbar (the toolbar with the slider) shows/hides the Simulation Graph.
Here you can see the signal flow of your Devices. The Graph is either displayed for the current subcircuit or
the main circuit. The Graph shows only Output signals, so Devices without any Outputs as LED's, are not displayed.
The mainly used unit in the Graph,wich is shown at its table is "simualtion steps".
To compare events there are two cursors. If you haven't moved them before, you can find them at the left border
of the Graph. Use your mouse to drag them around.
To remove the Graph, just press the Grpah-Button again, press the "g"Key or select "show graph" from the
simulation menu.
Subcircuits have their own Graph, just open the graph while you are in a sub-circuit.
Equatations
The Simulation Menu has another feature wich can be useful while debugging circuits. Just select "show equatations"
from the simulation menu. Klogic the tries to display your circuit as formulas. You can have a look at the
corresponding Karnaugh diagram of your circuit, create an equatation device with the same properties of your circuit
and some other nice features. But be aware, some of the features seem to be not 100% stable if you use them on
complex and/or large circuits. So, save your circuit before you experiment with the "equatation-dialog" or
if you want to modify it using some features like "substitute","tidy up" and "create subcircuit". If you want to
know the meaning of the symbols in the equatations, have a look at the "equatation-device" Documentation.