Defining Groups

A group is treated as a collection of nodes and acted upon as one unit. A group name can be specified with a single-range group name, dual-range group name, or sequential group name format.

In Boolean equations, a group can be set equal to a Boolean expression, another group, a single node, VCC, GND, 1, or 0. In each case, the value of the group is different. The Options Statement can be used to specify whether the lowest numbered bit of the group is the MSB, the LSB, or either.

NOTE Once a group has been defined, [] is a shorthand way of specifying an entire range. For example, a[4..1] can also be denoted by a[]; similarly, b[5..4][3..2] can be represented by b[][].

The group1.tdf file shows simple Boolean expressions that define multiple groups.

CONSTANT MAX_WIDTH = 1+2+3-3-1;  % MAX_WIDTH = 2 %
   a[1..2], use_exp_in[1+2-2..MAX_WIDTH]    : INPUT;
   d[1..2], use_exp_out[1+2*2-4..MAX_WIDTH] : OUTPUT;
   dual_range[5..4][3..2]                   : OUTPUT;
   d[] = a[] + B"10";
   use_exp_out[] = use_exp_in[];
   dual_range[][] = VCC;

In this example, the Options Statement is used to specify that the rightmost bit of each group is the MSB, and a 1 (decimal) is added to group a[]. If 00 is applied to input a[], the result of this sample program is d[] == 1 (decimal). The groups use_exp_in[] and use_exp_out[] show how constants and arithmetic expressions can be used to delimit group ranges.

The following examples illustrate group usage:

Back to Top

- Altera -


Created by chm2web html help conversion utility.