The Complete SPRLIB & ANNLIB

check_incr_ids

- check whether unit and layer IDs increase when running from input to output (LOCAL)

SYNOPSIS

int check_incr_ids (unit, prev_unit_id, prev_layer_id)

ARGUMENTS

UNIT *unit A pointer to a UNIT structure.
long prev_unit_id The unit ID previously encountered (for using the function recursively).
long prev_layer_id The layer ID previously encountered (for using the function recursively).

RETURNS

TRUE if there is an error in the order of the ID's, FALSE if not.

FUNCTION

The function checks whether the UNIT 's UnitId is smaller than prev_unit_id and LayerId is smaller than prev_layer_id. If so, it calls itself recursively for all units connected to its OutLinks or returns FALSE if the UNIT is an output unit. If not, it returns TRUE. Since the function is recursive, the first call has to be made with a prev_unit_id which is smaller than unit->UnitId, e.g. unit->UnitId - 1. The same goes for the prev_layer_id.

NOTE

This function is used by check_ff_net through check_order_ids. The function may be quite time-consuming for large networks, since all paths from unit to an output unit are checked.

SEE ALSO

check_net, check_units, check_links, check_conn_to_input, check_conn_to_output , check_decr_ids, check_order_ids, check_ff_net , check_all_network

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998