BDD Plot Diagram

The BDD Plot Diagram depicts the logical structure of a combinational signal or signals. BDD (Boolean Decision Diagram) structures are the basis for all logical analysis functions within X-Amin. BDD Diagrams are valuable in understanding the combinational network of a signal. Note that some combinational structures can explode into large BDD diagrams. In these cases it may be necessary to generate diagrams for individual bits of a signal rather than the entire signal.

BDD structures of multiple signals can be combined on one diagram to show where the logic diverges in the network. This is valuable when trying to determine why 2 signals (or two versions of one signal) are determined not to be logically equivalent (see the compare command).

An example BDD Diagram is shown below.

Note that BDD Plot Diagrams can only be generated for linked signals.

The bddplot command provides options to control how BDD Plot diagrams are generated. However, the bddplot command defaults are usually sufficient, so X-Amin provides a Quick BDD Plot function.

To perform a Quick Flow on a particular signal, select the component in the Components Window, then select the signal in the Signals window and press the right mouse button. On the Signals popup menu, select BddPlot.

To set the bddplot command options when generating a BDD Plot Diagram, select the component in the Components Window, the signal in the Signals Window and use the Diagram menu (Diagram->BddPlot...) or the BddPlot icon in the Diagram toolbar. The BDD Plot Diagram Options dialog will appear:

Restrict: If the expression to be plotted has large input vectors driving it, the plot can become needlessly large. This control will automatically restrict to 0 those inputs whose width is greater than the value set, effectively removing them from the plot. Any user defined restrictions will not be overridden. A value of 0 for restrict will prevent any signals from being auto-restricted.

Use Hierarchical Names: Enabling this control causes X-Amin to use heirarchical names in the plot.

Output in text format: Enabling this control causes X-Amin to output the plot in text format in the log window rather than creating an BDD Plot Window.

Title: Specifies the BDD Plot Diagram title. Windows are identified by their titles which must be unique. The default title is the signal name.

 

bddplot Command

BDD plot diagrams can also be generated using the bddplot command entered in the GUI Command Entry box or on the command line in command-line mode. The bddplot command format is:

SYNTAX
 (void) bddplot
   [-merge]
   [-hier]
   [-text]
   [-title <title>]
   [-trans|-ps]
   <expression> [<expression>...]
   
ARGUMENTS
 -merge Merge bdds from multiple expressions onto one dia­
   gram
 -hier Use hierarchical names in the diagram


 -restrict <#>
If the expression to be plotted has large input
vectors driving it, the plot can become needlessly
large. -restrict will automatically restrict inputs
whose width is greater than <#> to 0, effectively
removing them from the plot. Any user defined
restrictions on <expression> will not be overrid­
den. A value of 0 for <#> will prevent any signals
from being auto-restricted. The default for
-restrict is 0.
 -text In GUI mode, output results as text, not in a BDD
   Plot Window. Ignored in command-line mode.
 -title <title>
   Use <title> for the diagram title
 -trans|-ps
   -trans plots the transition bdd, -ps plots the pre­
   sent-state bdd. The default is -ps.
 <expression> [<expression>...]
   List of expressions to plot the bdds from.
   

Interpreting a BDD Plot Diagram

The oval symbols, or logic nodes, in the diagram represent a signal within the component. The rectangle symbols represent the terminal state of the logic function, either a '1' or a '0'. The top-most logic node (no input edges) is the start of the logic function and is labeled with two names. The first name is the target of the logic function, the second is a signal name in the first term of the function.

Each logic node has two output edges. One edge represents the logic path taken when that signal is a '1'. The other represents the logic path taken when that signal is '0'. Each path is drawn in the same color as the terminal state. In the above example, '0' paths are blue (the terminal '0' state color), '1' paths are red (the terminal '1' state color).

To determine the logic function, simply start at a top-most logic node and follow the path to a terminal state. In the above example, if the '0', or blue, paths are followed from the top-most ('d') node, the logic equation is:

d = ~a & ~ld & ~rst = 0

The logic function for d = 1 (i.e. all the paths that lead to the '1' terminal state) would be:

d = (a & b & ld & rst) | (a & b & ~ld & rst & d) | (~a & ~ld & rst & d) | (a & ~b & ~ld & rst & d) = 1 

Which can, of course, be reduced to:

d = rst & (d | (ld & a & b))

BDD Plot Diagram Customizations

The BDD Plot Preferences page (Edit->Preferences or the Preferences icon in the Edit toolbar) provides numerous controls for configuring the appearance of BDD Plot Diagrams. The BDD Plot Preferences page is partitioned into 2 categories: General and Symbols.

The BDD Plot General preferences page, shown below, controls the diagram layout and symbol style.

Orientation: BDD Plot diagrams can be oriented Left-to-Right or Top-to-Bottom

Filled Symbols: Select this control to produce solid color BDD symbols.

Shadowed Symbols: Select this control to produce a shadowing or 3-D effect on the BDD symbols.

Horizontal Spacing: The number entered in this control specifies the horizontal distance between BDD symbols.

Vertical Spacing: The number entered in this control specifies the vertical distance between BDD symbols.

 

The BDD Plot Symbols preferences page, shown below, controls the colors of the BDD symbols.

To change a symbol color, simply select the color button which will invoke the color dialog. From the color dialog select the desired color.