Name
loglib - Logical Library Maintenance
Synopsis
loglib loglibfile libraryfile
Description
The
loglib utility program compiles an ASCII text file containing the relationship between logical symbols and physical parts into a Design DataBase (DDB) file. The information transferred by
loglib includes assignment of SCM symbols to layout parts, logical to physical pin mapping, pin/gate swap definitions, predefined power supply pins, fixed part attributes, etc. This information is required by the
Packager for translating logical net lists (generated by SCM) into physical net lists (processed by the layout system), and it is also required by
for transferring net list changes (pin/gate swap, part name changes) from the layout to the schematic circuit.
loglib accepts the loglib file name
loglibfile
as first argument.
loglibfile
is an ASCII file containing logical library part definitions. This file must have an extension of
.def
but this extension must not be included with the command line.
loglib accepts the layout library file name
libraryfile
as second argument. This file must have an extension of
.ddb
but this extension must not be included with the command line. The
libraryfile
is expected to be in BAE DDB (Design DataBase) format and should contain the layout part definitions.
Usage
The
loglib utility program must be used to update the logical library whenever a new SCM symbol is added to the library or when an SCM symbol and/or a layout part definition has been modified in a way that changes the relationship between them (e.g., change of a pin name). Usually the SCM symbol is the first to be designed (or edited). Then the layout part will be defined (if not yet existing). Finally, the loglib file is created and the logical library definitions herein are translated to the layout library using the
loglib program.
Input File Format
Start Data, End Data, Comments
The
loglib input file format must start with the keyword
LOGLIB
and must end with the keyword
END.
. Commentary text can be placed between
/*
and
*/
.
part Command
The
part
command is applied for assigning an SCM symbol to a layout symbol. The formal syntax of the
part
command is:
part <llname> : <plname>
where
<llname>
is the logical library name (i.e., the name of the SCM symbol) and
<plname>
is the physical library name (i.e., the layout package type). Keyword
default
can optionally be set before
<plname>
to enable different (non-default) layout package assignment by setting a value for the
$plname
attribute at the corresponding SCM symbol:
part <llname> : default <plname>
The
part
also supports alternate package type definitions which can be assigned during part placement in the Layout system. The
part
command syntax for defining alternate package types is:
part <llname> : [default] <plname>[,<plname>,...,<plname>]
where
<llname>
specifies the name of the SCM symbol, and the
<plname>
entries specify the list of valid part package types. The first
<plname>
entry is used as default package type. The subsequent
<plname>
entries define the list of alternate package types for the corresponding part. Alternate part package types can be assigned using the
function during part placement in the
Layout Editor. The sequence of the alternate package type menu entries provided by the
function corresponds with the sequence of
<plname>
entries specified with the
part
command. Note however that any package type assignment defined with
$plname
attribute settings override
assignments.
The
class
keyword can be used to assign the part to a part class:
part <llname> : class <partclassname> [default] <plname>
Part class assignments are used by the
Packager to check whether alternate part definition assignments through the
$rlname
(Requested Logical Library Name) attribute are permitted.
The following
part
command format is used for deleting part assignments from the logical library:
delete part <llname> ;
The
part
command provides special format
part <llname> : virtual ;
which does not reference any physical part. This is applied to avoid errors when symbols have been used in the schematic that don't relate to parts in the PCB (e.g., company logos, drawing borders, etc.). This format is also used for setting net attributes (see below).
The
part
command also allows for the definition of pure logical parts by using the keyword
logical
as in
part <llname> : logical ...
Logical parts do not have a physical package assignment and can be used for generating logical (e.g., EDIF) net lists for PLD and/or LCA design.
Some parts have elements that require different symbols, for example relays. The symbol for the relay's coil is very different from that of the contacts and springsets and these may well need to appear on different sheets of the schematics. One symbol is chosen to be the main symbol and given a logical library name whilst the other symbols are given other logical library names. The relationship between the symbols is defined using the keywords
mainpart
and
subpart
as in
part <mainllname> : mainpart <plname>
:
part <subllname> : subpart <mainllname>
Note that the
subpart
definition provides a link to the logical library name of the
mainpart
(<mainllname>
) instead of a
<plname>
. This feature can also be applied for providing power supply symbols.
The relationship between the pin names in the SCM symbol and the pin names in the physical part definition could be 1:1. I.e., the pin names of a resistor could be
1
and
2
and these could translate to
1
and
2
in the physical part. In this case only the relationship between the names of the SCM symbol and the physical part need to be defined as in
part <llname> : <plname> ;
where the semicolon is used to complete the
part
command. In most cases however additional information is required (such as pin/gate swap definitions, fixed part attributes, power supply pins, etc.) with must be provided with part
<commands>
as in
part <llname> : <plname> { <commands> }
net Command
The
net
command is used to define pins that don't appear in the symbol but need to be connected to particular signals or nets (e.g., power supply pins). The
net
command syntax is
net "<netname>" : ( <pinlist> ) ;
where
<netname>
is the signal or net name to connect and
<pinlist>
is a list of the physical pins (separated by commas) connected to the net. Each pin name containing special characters must be enclosed with quotes.
By preceding the net name with a dollar sign
($
), the
net
command allows for the definition of net name attributes as in
net "$<netname>" : ( <pinlist> ) ;
With this feature it is possible to assign a part-specific power supply by assigning a variable net name attribute value (such as
vcc
or
+5v
) for the net name attribute (e.g.,
$powernet
) to the desired SCM symbol/part of the SCM sheet.
In some cases more than one pin is connected to a particular signal but only one connection is desired in the symbol. The syntax of the
net
command for defining internal pin connections is:
net internal : ( <pinlist> ) ;
where
<pinlist>
is a list of physical pin names (separated by commas) that are to be linked together but only one of these pins needs to appear in the SCM symbol.
bus Command
The
bus
command allows busses to be defined directly on a symbol making multiple connections a single operation. The formal syntax of the
bus
command is:
bus ( <buspinlist> ) ;
where
<buspinlist>
defines a list of bus connection pins
<buspin>
(separated by commas) in the SCM symbol. Subsequently
pin
and/or
xlat
commands (see below) can be applied to define bus signals using special pin name specifications as in
"<buspin>.<bussignal>"
where
<buspin>
is the name of a pin in the
<buspinlist>
and
<bussignal>
is one of the signal connections on that bus pin.
pin Command
The
pin
command is used to define SCM symbol pin names. This command is not normally required since the pin list can be defined with the
xlat
command as well. It is mainly used to provide additional information in cases where 1:1 pin mapping applies, i.e., where the pin names otherwise can not be shown in the loglib file. The formal syntax of the
pin
command:
pin ( <pinlist> ) ;
where
<pinlist>
contains a list of pin names defined on the SCM symbol.
The
<startpin>-<endpin>[:<step>]
pin name range pattern can be used for specifying pin lists. This allows for definitions such as
pin(a1-a4);
for
pin(a1,a2,a3,a4)
or
pin(c2-c10:2)
for
pin(c2,c4,c6,c8,c10)
. It is also possible to include multiple pin name ranges such as
pin(a1-a32,b1-b2,c1-c32)
within a single command. Pin name range patterns are only pin list aliases, the system still saves and displays (function
) the complete pin name lists.
The
pin none ;
suppresses automatic 1:1 assignments of symbol to layout pins for missing pin
commands to allows for, e.g., the definition of mainpart
symbols without pins for general use.
xlat Command
The
xlat
command is used to define the relationship between the logical pin names and the physical pin names. It can be used to translate one set of logical pin names to one or more sets of physical pin names, i.e., the
xlat
command is used to define the logical gates of a physical part. The formal syntax of the
xlat
command is:
xlat ( <lplist> ) to ( <pplist> )
or ( <pplist> ) or ... or ( <pplist> ) ;
where
<lplist>
is a list of the logical pin names on the SCM symbol and
<pplist>
are the corresponding physical pin lists. The logical pin name set can translate to more than one physical pin name set to provide gate definition features. The number and sequence of the pin name definitions must match.
xlat
commands with alternations (i.e.
xlat
s with
or
options for gate specifications) automatically introduce cross-part gate
swap
definitions if no explicit
swap internal
command is defined with the corresponding part.
swap Command
The
swap
command defines the way in which pins and gates can be swapped when working in the layout system. I.e., the definitions stored with the
swap
command is used by the BAE layout system to check whether particular pin/gate swaps are allowed or not. The formal syntax of the
swap
command is:
swap <swapdefinition> ;
where
<swapdefinition>
defines the relationship between pins and gates. These definitions use brackets to identify the swap hierarchy as in
( Part Swap ) |
([ Pin Group Swap ]) |
([( Gate Swap )]) |
([(( Pin Swap ))]) |
where the square brackets can be omitted if no pin group exists. Optionally, the
internal
keyword can follow the
swap
keyword to forbid swaps between different parts.
newattr Command
The
newattr
command enables information to be included in the physical net list data that can subsequently be extracted with
Bartels User Language or the
userlist utility program. It sets up user-definable attributes associated with the physical part. These fixed library attributes could be for such information as cost, company part number, internal stock number, etc. The formal syntax of the
newattr
command is:
newattr "$<attname>" = "<attvalue>" ;
where
<attname>
is a user-defined attribute name and
<attvalue>
is the attribute value assigned to the attribute of the corresponding part. Attribute value assignments can be shown in the BAE layout system by defining the
"$<attname>"
text on the corresponding layout part (e.g., on a documentary layer).
The
newattr
command optionally allows for the definition and assignment of pin-specific attributes as in
newattr "$<attname>" = "<attvalue>" to ( <pplist> ) ;
This feature can be used for specifying arbitrary pin-specific attributes such as pin types or pin fanouts for electronic rule checks (ERC) or for generating net list interfaces to simulators such as PSpice.
The
Packager evaluates
$pintype
pin attribute settings to perform electrical rule checks (ERC). It is recommended to assign fixed ERC pin types through the logical symbol/part definitions. The following pin type attribute value settings are supported:
$pintype | Pin Type |
in | Input Pin |
out | Output Pin |
bidi | Bi-directional Pin |
anl | Analog Pin |
sup | Power Supply Pin |
The ERC issues a warning message such as
Net 'netname' has only inputs!
if a net with one or more input pins has no (normal, bi-directional or power supply) output pin. A warning message such as
Driver collision on net 'netname'!
is issued if a normal output pin is connected to another output pin, a bi-directional pin or a power supply pin.
The syntax of the
newattr
command also allows for the
assignment of variant-specific attributes by specifying a comma-separated variant number after the attribute name quotes. This allows for the assignment of different fixed attributes to different predefined project variants such as
110 Volt
and
230 Volt
or
deutsch
and
english
.
newattr
attribute values without variant number specification are assigned to the default/base variant.
The
newattr
command can be used to trigger automatic ID attribute value generation by the
Packager through the assignment of
?id?
,
?symid?extension
and
?partid?extension
values.
?id?
creates consecutive ID values (id1
,
id2
etc.). The
?symid?extension
and
?partid?extension
values append the specified extension with underscore to the schematic symbol name and/or layout part name
(?partid?diffpair1
results in
ic1_diffpair1
, ic2_diffpair1
, etc.). Automatic ID generation is useful if a
newattr
command refers to multiple pins, as this allows to create a reference between pins as required for differential pair indication.
The
newattr
command accepts special
!unique!
attribute value settings which prompt the
Packager to assign gates to layout parts with matching
!unique!
attribute values only. The
swap
commands adhere to such assignments and swap gates only between layout parts with matching
!unique!
attribute values. I.e., the
!unique!
setting can be used to control the packaging of gates with different attribute values without using
$rpname
attributes. This is useful for certain part types such as resistor arrays:
part ra_so16r : so16r {
newattr "$val" = "!unique!";
pin (1-16);
swap internal (
(( 1,16)),(( 2,15)),(( 3,14)),(( 4,13)),
(( 5,12)),(( 6,11)),(( 7,10)),(( 8, 9))
);
}
The following example illustrates the application of the
!unique!
value in the definition of an opamp with power supply assignents through attribute values:
part op_lm324 : dil14 {
pin (/i,i,o);
net "$vplus" : (4);
net "$vminus" : (11);
newattr "$vplus" = "!unique!";
newattr "$vminus" = "!unique!";
xlat (/i, i, o)
to ( 2, 3, 1)
or ( 6, 5, 7)
or ( 9,10, 8)
or (13,12,14);
swap internal ((2,3,1),(6,5,7),(9,10,8),(13,12,14));
}
netattr Command
The
netattr
command can be used for the design of special SCM symbols for setting net attributes. The formal syntax of the
netattr
command is:
netattr <netatt> "$<attname>" : ( <pinlist> ) ;
where
<netatt>
is the name of the net attribute,
<attname>
is the name of the part attribute to be mapped to the net attribute, and
<pinlist>
is the list of logical pin names. Arbitrary net attribute names can be set with
<netatt>
, but the following keywords have special meaning for the control of the Autorouting process:
routwidth | net-specific routing width (in mm units) |
powwidth | pin-specific routing width (in mm units) for the signals and/or pins defined with the net command (see above) |
mindist | net-specific minimum clearance (in mm units) |
priority | net-specific routing priority (in positive integer units; the greater the value the higher the priority) |
The
route.ddb
SCM library file is provided with the
AutoEngineer.
route.ddb
contains virtual SCM symbols for setting net attribute values. The corresponding loglib file
(route.def
) includes the following definitions:
loglib
part att_rw : virtual
{
pin (x);
netattr routwidth "$val" : (x);
}
part att_pw : virtual
{
pin (x);
netattr powwidth "$val" : (x);
}
part att_md : virtual
{
pin (x);
netattr mindist "$val" : (x);
}
part att_pr : virtual
{
pin (x);
netattr priority "$val" : (x);
}
end.
With each of the above listed net attribute symbols a pin named
x
and a net attribute is defined. Net attribute setting then is applied by connecting the desired net to the net attribute symbol's pin and setting the corresponding attribute value.
With arbitrary user-specific net attribute definitions additional net information can be processed for special purposes. Such net attributes can be used for controlling the layout process (maximum/minimum allowed trace length, parallel routing restrictions, layer assignments, etc.) or they can be evaluated for subsequent simulator processes, run-time analysis, checking ECL/EMC rules, etc. Tools for accessing and evaluating user-specific net attributes can be provided with
Bartels User Language programs.
The
netattr
command can be used to trigger automatic ID attribute value generation by the
Packager through the assignment of
?id?
,
?symid?extension
and
?partid?extension
values.
?id?
creates consecutive ID values
(id1
,
id2
etc.). The
?symid?extension
and
?partid?extension
values append the specified extension with underscore to the schematic symbol name and/or layout part name
(?partid?diffpair1
results in
ic1_diffpair1
, ic2_diffpair1
, etc.). Automatic ID generation is useful if a
netattr
command refers to multiple nets, as this allows to create a reference between nets as required for differential pair indication.
call Command
The
call
command is used for hierarchical SCM design in order to assign SCM blocks to SCM symbols for later reference on SCM sheet level. The formal syntax of the
call
command is:
call <blockname> ;
where
<blockname>
is the name of the SCM block, and the corresponding part must be defined
virtual
. The block symbol pins are assigned to the name-corresponding module ports of the SCM block.
architecture Command
The
architecture
command can be used to define
virtual
logical parts consisting of different arbitrarily connected SCM symbols and/or layout parts. The formal syntax of the
architecture
command is:
architecture { <partlist> }
<partlist>
contains the list of used symbols with comma-separated pin lists in parenthesis, where each pin specification has the following format:
<pinname:connection>
<connection>
can be the name of a pin of the
<architecture>
symbol. A connection to a global net can be established with
<net netname>
.
<net & intnetname>
or
<& intnetname>
specifications can be used to refer to a local net of the
<architecture>
symbol.
Examples
Loglib file
example.def
containing two part definitions:
loglib
/* Example Loglib File */
part 74ls00 : dil14, so14
{
newattr "$partnumber" = "A-NAND-X11B82";
newattr "$pintype" = "in" to (1,2,4,5,9,10,12,13);
newattr "$pintype" = "out" to (3,6,8,11);
newattr "$pintype" = "sup" to (7,14);
pin (a,b,y);
net "vcc" : (14);
net "$groundnetname" : (7);
xlat ( a, b, y)
to ( 1, 2, 3)
or ( 4, 5, 6)
or (13,12,11)
or (10, 9, 8);
swap (((1,2),3),((4,5),6),((13,12),11),((10,9),8));
}
part tx27 : default sot23;
part tr_bc547 : class "npn-transistor" default to92
{
pin (e,b,c);
xlat (e,b,c)
to (1,2,3);
}
end.
The example above shows the definition of the gate
74ls00
which can be packed up to 4 times into a single
dil14
package. The logical pins (a,b,y) can be assigned to either of the pin sets (1,2,3), (4,5,6), (13,12,11) or (10,9,8). Within the layout system, this package type assignment can be changed to
so14
. A fixed attribute named
partnumber
has been assigned with attribute value
A-NAND-X11B82
. A fixed pin-specific attribute named
pintype
is assigned to each pin, thus designating the pin type to be either
in
(input pin),
out
(output pin) or
sup
(supply pin, i.e., power or ground). Pin 14 of the
dil14
package is a pre-defined power supply pin on signal
vcc
, whilst pin 7 can be connected to a signal net by assigning the desired net name (such as
vss
) to the
$groundnetname
attribute of the
74ls00
symbol on SCM level. The
swap
command is applied to define the following pin/gate swaps:
Pin Swap: (1,2) and/or (4,5) and/or (13,12) and/or (10,9)
Gate Swap: (1,2,3) with (4,5,6) or (13,12,11) or (10,9,8)
Part Swap: (1,2,3,4,5,6,13,12,11,10,9,8)
The example loglib file above also contains the
tx27
and
tr_bc547
part definitions.
tx27
is assigned to default
sot23
package with 1:1 pin mapping. The
tr_bc547
definition includes an assignment to part class
npn-transistor
.
To compile loglib file
example.def
and store the result to DDB file
mylib.ddb
:
> loglib example mylib
The following example illustrates the use of
mainpart
and
subpart
for assigning different SCM symbols (relay part with two contacts and one coil) to the same package:
loglib
/* Relays part */
part rel2 : mainpart dilrel
{
xlat (a,b) to (1,7) or (8,14);
swap ((1,7),(8,14));
}
part rel2sub : subpart rel2
{
xlat (p,m) to (2,6);
}
end.
The following example shows the definition of part
buspart
with busses
b1
and
b2
including the bus signals
0
,
1
,
2
and
3
(the corresponding SCM symbol must have pins
b1
and
b2
defined for connecting and tapping the bus):
loglib
/* Bus part definition */
part buspart : sot8
{
bus (b1,b2);
xlat (b1.0,b1.1,b1.2,b1.3) to (1,2,3,4);
xlat (b2.0,b2.1,b2.2,b2.3) to (5,6,7,8);
}
end.
The following example illustrates how to define a virtual part for hierarchical circuit design. This applies for the assignment of SCM symbol
dff
to SCM block
dff
with pin names
s
,
r
,
q
and
/q
referring to the module ports defined on the corresponding SCM hierarchy block element/sheet:
loglib
/* Hierarchical D-Flip-Flop */
part dff : virtual
{
pins (s,r,q,/q);
call dff;
}
end.
The following example shows a synthetically generated symbol definition. The
delay
SCM symbol consists of four internally connected
74ls04
inverters.
loglib
/* Synthetically generated Inverter/Delay Circuit */
part delay : virtual
{
pin (in,out);
architecture
{
part "74ls04" (a:in,y:&connect1);
part "74ls04" (a:&connect1,y:&connect2);
part "74ls04" (a:&connect2,y:&connect3);
part "74ls04" (a:&connect3,y:out);
}
}
end.
Files
The symbol and part library directory installed with the
Bartels AutoEngineer software contains the
loglib(*.def
) files for alle SCM library files. All
loglib files of the software are already compiled into the
laylib.ddb
layout library file.
See also
Packager.
The functionality for compiling Logical Library definitions is also implemented through the
con_compileloglib User Language system function.
Diagnosis
The error messages issued by
loglib are intended to be self-explanatory.
Warnings
Input file identifiers such as part names, pin names or net names containing special characters
(-
,
+
,
/
,
(
,
=
, ...) must be enclosed in single-quotes or double-quotes.
The
Packager copies logical library definitions from the specified layout library to the project file when first referenced. Certain SCM or layout symbol modifications from the project file such as pin name changes must be reflected by a logical library definition update. I.e.,
loglib must be applied to the project file if the original logical library definition has already been transferred to the project file during an earlier
Packager run. The
Packager issues error messages such as
Part not found in library!
,
Part not defined!
or
Pin not found!
loglib definitions are wrong or missing.