1LOADLOFIG(3)             MBK LOGICAL UTILITY FUNCTIONS            LOADLOFIG(3)
2
3
4

NAME

6       loadlofig - load a new logical cell model from disk
7

SYNOPSIS

9       #include "mlo.h"
10       void loadlofig(ptfig, figname, mode)
11       lofig_list ∗ptfig;
12       char ∗figname;
13       char mode;
14

PARAMETERS

16       ptfig               Pointer to an allocated but empty lofig
17
18       figname             Name of the figure to be loaded
19
20       mode                Loading mode
21

DESCRIPTION

23       loadlofig  fills  the  lofig pointed to by ptfig with the contents of a
24       disk file called figname. The loading mode may be either 'A', then  the
25       entire  content  is  parsed,  or 'P' then only connectors and extrernal
26       signals are loaded in memory, or 'C', that loads the "complement" of an
27       already  partially  loaded  cell in order to keep the same pointer when
28       accessing the same file.
29       The loadlofig(3) function in fact performs a call to a  parser,  chosen
30       by  the MBK_IN_LO(1) environment variable. The directories searched for
31       the file are first the one sets by MBK_WORK_LIB(1)  and  then,  in  the
32       described  order,  the  ones set by MBK_CATA_LIB(1).  See MBK_IN_LO(1),
33       MBK_WORK_LIB(1), MBK_CATA_LIB(1) and mbkenv(3) for details.
34

ERRORS

36       Some errors resulting from a call to loadlofig are due to the  parsers,
37       and are prefixed by the parser format (pf).
38       "∗∗∗ mbk error ∗∗∗ not supported logical input format 'xxx'"
39              The environment variable MBK_IN_LO is not set to a legal logical
40              format.
41       "∗∗∗ mbk error ∗∗∗ pfloadlofig : could not open file figname"
42              No file called figname.ext, where ext is the file format  exten‐
43              sion, has been found in the directories set by the environment.
44       "∗∗∗  mbk  error  ∗∗∗  pfloadlofig  :  syntax error line x parsing fig‐
45       name.ext"
46              Either the file has been corrupted and its syntax is not  legal,
47              or there is a bug in the given parser.
48

EXAMPLE

50       #include "mlo.h"
51       lofig_list ∗get_the_lofig(figname, mode)
52       char ∗figname;
53       char mode;
54       {
55       lofig_list ∗pt;
56          for (pt = HEAD_LOFIG; pt; pt = pt->NEXT) /∗ scan figure list ∗/
57             if (!strcmp(pt->NAME, figname))
58                break;
59          if (!pt) { /∗ figure doesn't exist ∗/
60             pt = addlofig(figname);
61             pt->MODE = mode == 'A' ? mode : 'P';
62             loadlofig(pt, figname, pt->MODE);
63             return pt;
64          }
65          if (ptfig->MODE != 'A') { /∗ figure exists interface only ∗/
66             if (mode == 'A') {
67                pt->MODE = 'A';
68                loadlofig(pt, figname, 'C');
69                return pt;
70             } else
71                return pt;
72          } else /∗ figure exists interface and body ∗/
73             return pt;
74       }
75

SEE ALSO

77       mbk(1),  mbkenv(3),  lofig(3),  addlofig(3),  getlofig(3), dellofig(3),
78       savelofig(3),    flattenlofig(3),    rflattenlofig(3),    MBK_IN_LO(1),
79       MBK_WORK_LIB(1), MBK_CATA_LIB(1).
80
81
82
83
84
85
86ASIM/LIP6                       October 1, 1997                   LOADLOFIG(3)
Impressum