The levels command can be used to obtain an approximation of the number of levels of logic between inputs and clocked elements, between clocked elements and between clocked elements and outputs. Since a linked design is essentially a synthesized design mapped to generic gates, X-Amin can perform a trace of all logic paths through the design to determine the levels of logic involved in the combinational logic networks. The logic level information can be used to ball-park a maximum operating speed of the design if approximate gate timing is available.
For example, given the following HDL code:
module comp1 (clk, rst, a, b, ld1, ld2, z);
input clk, rst, a, b, ld1, ld2;
output z;
reg d;
always @(posedge clk or posedge rst)
if (!rst)
d <= 0;
else if (ld1)
d <= a & b;
else if (ld2)
d <= a | b;
else
d <= a ^ b;
assign z = d;
endmodule
The levels report would be:
> levels Levels to 'd' from: a = 6 b = 6 a = 6 b = 6
Levels to 'z' from: d = 0
levels Command
Levels analysis can only be run using the 'levels' command entered in the GUI Command Entry box or on the command line in command-line mode. The 'levels' command format is:
SYNTAX (void) levels [-from <sig>] [-to <sig>] <sig>
(void) levels [-max|-min|-all] [<namespace>...]
ARGUMENTS -from <sig> Perform level computations starting from <sig>.
-to <sig> Perform level computations terminating at <sig>.
<sig> Perform level computations for the specified sig nal.
-max|-min|-all -max reports paths with the most number of levels. -min reports path with the fewest number of levels. -all reports all paths.
<namespace> Perform level computations on the specified names pace(s). If no namespaces are specified, perform computations on the current scope.