The Complete SPRLIB & ANNLIB

check_decr_ids

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

SYNOPSIS

int check_decr_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). Therefore, the function should be called with this parameter set to a value larger than the UNIT 's UnitId, e.g. UnitId + 1.
long prev_layer_id The layer ID previously encountered (for using the function recursively). Therefore, the function should be called with this parameter set to a value larger than the UNIT 's LayerId, e.g. LayerId + 1.

RETURNS

TRUE if there is an error in the order of the IDs, FALSE if not.

FUNCTION

The function checks whether the UNIT 's UnitId is larger than prev_unit_id and LayerId is larger than prev_layer_id. If so, it calls itself recursively for all units connected to its InLinks or returns FALSE if the UNIT is an output unit. If not, it returns TRUE.

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 input unit are checked.

SEE ALSO

check_net, check_units, check_links, check_conn_to_input, check_conn_to_output , check_incr_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