SYNOPSYS
#include "mph.h" void rflattenphfig(ptfig, concat, catal) phfig_list *ptfig; char concat; char catal;
PARAMETERS
- ptfig
- Pointer to a physical figure
- concat
- Name generation mode
- catal
- End level choice
DESCRIPTION
rflattenphfig recursivly flattens all the instances of the figure pointed to by ptfig.The concat argument can take either the value YES in which case the name of the objects comming from instances are named insname'X'objectname, where 'X' is the caracter set int the MBK_SEPAR(1) environment variable, or the value NO, and then the object name remains inchanged. This is quite dangerous since name unicity is no more warrantied, and may cause the flatten to fail. See MBK_SEPAR(1), mbkenv(3) and concatname(3) for details.
The catal argument may be set to NO, in which case flattening stops at the transistor level, all hierachies and instances have desapeard, only terminal elements remains. If set to YES, flattening stops when it encounters an instance model beeing present in the catalog file, set by the MBK_CATAL_NAME(1) environment variable. See MBK_CATAL_NAME(1) and incatalog(3) for details.
ERRORS
No errors can directly result from a call to rflattenphfig, but since it uses many other mbk functions, it may be a good error starting point.EXAMPLE
#include "mph.h" void flatten_my_amd2901() { phins_list *pt; pt = getphfig("my_amd2901", 'A'); rflattenphfig(pt, YES, YES); pt->NAME = "my_flattened_amd2901"; savephfig(pt); }