1ADDLOSIG(3)                  MBK LOGICAL FUNCTIONS                 ADDLOSIG(3)
2
3
4

NAME

6       addlosig - create a logical signal
7

SYNOPSIS

9       #include "mlo.h"
10       losig_list ∗addlosig(ptfig, index, namechain, type)
11       lofig_list ∗ptfig;
12       long index;
13       chain_list ∗namechain;
14       char type;
15

PARAMETERS

17       ptfig               Pointer to the figure in which the signal should be
18                           added
19
20       index               Signal index
21
22       namechain           List of names of the signal
23
24       type                Signal type
25

DESCRIPTION

27       addlosig creates a new signal, and adds  it  to  the  list  of  signals
28       pointed  to  by  ptfig->LOSIG.  The new signal is added in front of the
29       list, and becomes itself the list head.
30       The type parameter can take two values :
31
32              EXTERNAL            The signal is attached to at least one  con‐
33                                  nector of the figure.
34
35              INTERNAL            The  signal  is only attached to instance or
36                                  transistor connector.
37       The index and type arguments fill the INDEX  and  TYPE  fields  of  the
38       losig(3) structure. The index is the signal identifier, so it should be
39       unique at a given hierarchical level.
40       The namechain argument is a list of names, given in a chain_list.   See
41       chain(3) for details.
42

RETURN VALUE

44       addlosig returns a pointer to the newly created signal.
45

ERRORS

47       "∗∗∗  mbk  error  ∗∗∗ addlosig impossible signal index already exist in
48       figure ptfig->NAME"
49              The index is already used in an other signal, and since it's the
50              signal identifier, it can't be.
51

EXAMPLE

53       #include "mlo.h"
54       losig_list ∗merge_and_create(pt, s0, s1) /∗ merge two signal in a third ∗/
55       lofig_list ∗pt;
56       losig_list ∗s0, ∗s1;
57       {
58       chain_list ∗c;
59       losig_list ∗s;
60       long max_index;
61          /∗ merge names ∗/
62          for (c = s0->NAMECHAIN; c; c = c->NEXT)
63             s1->NAMECHAIN = addchain(s1->NAMECHAIN, c);
64          /∗ find maximum index ∗/
65          for (s = pt->LOSIG; s; s = s->NEXT)
66             if (max_index < s->INDEX)
67                max_index = s->INDEX;
68          s = addlosig(pt, ++max_index, s1->NAMECHAIN,
69                s0->TYPE == EXTERNAL || s1->TYPE == EXTERNAL ?
70                EXTERNAL : INTERNAL);
71          dellosig(pt, s0);
72          dellosig(pt, s1);
73          return s;
74       }
75

SEE ALSO

77       mbk(1), lofig(3), losig(3), getlosig(3), dellosig(3).
78
79
80
81
82
83
84ASIM/LIP6                       October 1, 1997                    ADDLOSIG(3)
Impressum