NAME

splitter - create unit to split a

splitter1 - single input field

PROTOTYPES

unitptr splitter( int ni, ...)

unitptr splitter1( int *fdesc, unitptr dest)

ARGUMENTS

int ni
number of input fields and pins of input fields
...
field dimensions of fields 0..ni-1
int *fdesc
array containing argument parameters n, n0..nk.
unitptr dest
- not documented in source --

RETURN VALUE:

unitptr u
pointer to newly created unit

INTERFACE OF CREATED UNIT:

X_in[n]:
input field 0
out_0[n0]:
output field 0 with n0 pins.
...
out_k[nk]:
output field k with nk pins.

DESCRIPTION:

Creates a unit with one input field of n pins and k+1 output fields of n0,n1,n2...nk fields, resp. The purpose of this unit is to split a single field into k subfields with the specified pin numbers n0..nk. The correspondence between subfield pins and pins of the input field is such that the sequence of pins of output fields 0,1..k in their natural order corresponds with the sequence of pins of the input field. For correct operation, ABS(n)=ABS(n0)+ABS(n1)+...ABS(nk) must be obeyed. In the first variant, the argument parameters n,n0..nk are specified with a variable length argument list, in the second variant, an integer array fdesc[]=(n,n0..nk) is used. A particular use of this unit is to provide connections between packed and unpacked fields. To this end, the pin numbers of those fields that later shall become connected to packed fields must be given with an additional minus sign. The created unit becomes a subunit of unit dest.

EXAMPLE:


    u1 = splitter(-1000,1000,ROOT);
    u2 = splitter(1000,-900,-50,50,ROOT);

The first call creates a unit with one packed input field of 1000 pins and one unpacked output field of 1000 pins, i.e. this unit will transform the output of a packed output field of 1000 pins into the output of an unpacked field of the same number of pins. The second call creates a unit which splits an unpacked field of 1000 pins into two packed fields of 900 and 50 pins, resp., and into one unpacked field con- taining the remaining 50 pins.

FILE:

nst_util

SEE ALSO:

split_multi, merger, merge_multi

FILE

/local/homes/rhaschke/nst7/man/../o.linx86_64//../nstsrc/nst_stdr.c