A-Circuit Tutorial

THE GRAPHICAL INTERFACE

The purpose of the interface  is to let the user:

• draw the circuit;
• select the type of problem to solve (simulation/abduction/glich-detection/max delay) and the program will automatically compute the solution(s);
• display the results in a user-friendly way.
When drawing the circuit, the user is allowed to add gates to the circuit, to connect gates to each other with wires and to delete  gates and wires. Figure 1 shows a snapshot of the interface. The circuit is displayed in the Circuit Window, while the ToolBox Window contains buttons for each of the above operations.

EXAMPLE

Let's follow the steps to draw the following circuit: Figure 2

1. Run the interface by typing on the command line:
1.
% /usr/local/bin/ACircuit

Two windows will appear on the screen:

2. Draw a gate.

3. First, using the mouse, select the type of gate you want to draw from the buttons on the ToolBox Window.
Next, click inside the Circuit Window on the position where you want the gate to appear.
A dialog box will appear requesting:
(1) the number of input pins of the gate (if it allows different number of input pins), and
(2) the delay associated to the gate.
At this point, the gate will be given an automatically generated name and will be shown in the Circuit Window.

To draw NOT gate g1 from figure 2 perform the following actions:

1. Click on the Not button of the ToolBox Window.
2. Click inside the Circuit Window at the position where you want the gate to appear.
3. Enter delay=1 (note: the number of pins is not requested because NOT gates have only one input pin).
Similarly, draw gates g2 and g3.

4. Connect gates.

5. To connect the output of a gate to the input of another gate: first click on the Wire button in the ToolBox Window, next click on the output pin of the first gate in the CircuitWindow, finally click on the input pin of the second gate in the same window. Then, the wire connecting those gates appears in the Circuit Window.

Let's draw the wire connecting the output of g1 and the topmost input pin of g3 from figure 2 Perform the following actions:

1. Click on the Wire button of the ToolBox Window.
2. Click, inside the CircuitWindow, on the output pin of g1.
3. Click on the topmost input pin of g3.
Similarly, connect g2 with g3.

Now that the circuit's drawing is complete (see its picture here), we are ready to select a problem to solve.

1. SIMULATING THE CIRCUIT

2. In order to select the simulation problem, click the Simulation option of the Problem menu in the CircuitWindow.

The simulation of the circuit will be performed for the time interval from 0 to an upper bound called "lasttime".
You will be requested to enter the following information:

• value of constant "lasttime";
• signal values to be applied to the inputs of the circuit and the time they should be applied.

• It is possible to apply different signal values at different times on each input of the circuit.
In this case, the interaction with the program proceeds by asking the user to enter the following data:
1. signal value of an input I of the circuit;
2. time this signal value is applied;
then, the program asks if there are other signal values to be applied at different times on I.
If the signal value does not change throughout the duration of the simulation, answer NO,
and proceed by entering data for the next input of the circuit.
Otherwise, enter the new signal value and time of its application to I, until all changes on I have been described.

Once all data have been entered, the simulation is computed and the results are displayed as follows:
• the CircuitWindow shows the signal values present on each wire of the circuit at time=lasttime.

• It is possible to see the signal values in the circuit, at each moment of time covered by the simulation,
by dragging the horizontal scrollbar located at the lower-right corner of the CircuitWindow;
• a new window - the AnalyzerWindow - appears, showing the time analysis of the circuit.

• The time analysis represents the evolution of the circuit's input and output signal values.

Click here to see sample snapshots of the CircuitWindow and of the AnalyzerWindow for the above circuit.

3. ABDUCING INPUT SIGNALS OF THE CIRCUIT

4. To select the abduction problem, click the Abduction option of the Problem menu in the CircuitWindow.

Currently, we have only the static case of abduction of input signals available. This means that once a signal value is applied to an input wire W at time T, then no other values can be applied to this input wire in a future moment of time.

The system will require that you enter:

• value of constant "lasttime";
• signal value(s) that should be present on the output(s) of the circuit at moment of time="lasttime".

Given the above data, the program abduces the input signal values for the circuit and the solution is presented in the following way:

• the CircuitWindow shows the signal values present on each wire of the circuit at time="lasttime". It is possible to see the evolution of signal values in the circuit, the same way as in the simulation problem, by dragging the horizontal scrollbar located at the lower-right corner of the CircuitWindow.
• the AnalyzerWindow shows the timing diagram of all signal values of the circuit.

Since it is possible to produce the desired output from different combinations of input signal values, the program may generate multiple solutions. If this is the case, by dragging the vertical scrollbar located on the right side of the CircuitWindow you can browse through the different solutions.

Click here to see a snapshot of the CircuitWindow and the AnalyzerWindow for the above circuit when

• "lasttime" = 5;
• output signal to be present at output wire was entered equal to 1.

5. GLITCH-DETECTION

6. The glitch-detection problem is selected by clicking the Glitch-detection option of the Problem menu in the CircuitWindow.

As in the simulation case, you are requested to enter the value of "lasttime". Then, the program checks if glitches can appear in the circuit outputs under single transitions of the input values. A dialog box is displayed showing whether the circuit is glitch free or if a glitch was detected. In the last case, the occurrence of a glitch on an output can be seen in the AnalyzerWindow.

If glitches occur for different transitions on the inputs, it is possible to browse through the situations, in which a glitch appears, by dragging the vertical scrollbar located on the right side of the CircuitWindow.

Here are some snapshots showing the detection of a glitch in a circuit.

7. MAX DELAY OF CIRCUIT

8. The topological critical delay of a circuit corresponds to the maximum delay it would take for signals to stabilize at output gates. Maximum delay of a circuit is the computation of the topological critical delay of the circuit. Option Max delay is available on the Problem menu in the CircuitWindow.

Once this option is chosen, the system will compute the maximum delay of the circuit and the value computed will be then displayed on a dialog box (see an example here.)