---
name: "GENLIB_LOCON"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/GENLIB_LOCON"
---

# GENLIB\_LOCON(3)

adds a logical connector to the current netlist figure

## NAME

GENLIB\_LOCON - adds a logical connector to the current netlist figure

## SYNOPSYS

```
#include <genlib.h>
void GENLIB_LOCON(connector, direction, signal);
char ∗connector, ∗signal;
char direction;
```

## PARAMETERS

- *connector*

  Name of the connector to be created in the current figure

- *direction*

  Indicates the connector behaviour regarding signals propagation

- *signal*

  Name of the signal on which the connector is linked

## DESCRIPTION

**LOCON** add a logical connector to the interface of the actual working figure. This connector is logicaly linked to the signal *signal*. The *direction* attribut may take the following values:

- **IN**

  as input.

- **OUT**

  as output.

- **INOUT**

  as input/output, like supplies or clock for example.

- **UNKNOWN**

  if one doesn't know what it is.

- **TRISTATE**

  as high impedance output.

- **TRANSV**

  as transciever. That means **TRISTATE** input plus output.

## ERROR

**"GENLIB\_LOCON impossible : missing GENLIB\_DEF\_LOFIG"**

No figure has been yet specified by a call to **DEF\_LOFIG**. So it isn't possible to add anything. you must call **DEF\_LOFIG** before any other netlist call.

**"GENLIB\_LOCON : Bad signal or connector bus name"**

A signal or connector, described under a bus form, has an illegal syntax.

- **"GENLIB\_LOCON : All LOCON should be defined befor any GENLIB\_LOINS"**

  A connector is added after instances. This is a methodological error. Only move your **LOCON** before the first **LOINS** in your code.

  **"GENLIB\_LOCON : different number of signals and connectors"**

  A bussed form of signal and connector has been used, but the width of the busses are not equal. This is an obvious error, check it.

  **"Illegal addlocon. Connector connector already exist in figure figname"**

  A connector name must be unique in a given figure at a given hierachy level.

## DIAGNOSTICS

Due to the **vti** file format, the direction of connectors is lost if one uses it as starting point of a netlist desciption. All the connectors have then the **UNKNOWN** direction.\
 Alliance and edif file format know only about **IN**, **OUT**, and **UNKNOWN**. Only vhdl format fully supports the whole thing.

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_LOFIG("mycell");
	/∗ define interface  ∗/
	GENLIB_LOCON("i", INPUT, "sig1");
	GENLIB_LOCON("o", OUTPUT, "sig2");
	/∗ Place an instance ∗/
	GENLIB_LOINS("model","instance", "sig1", "sig2", EOL);
	/∗ Save all that on disk ∗/
	GENLIB_SAVE_LOFIG();
}
```

## SEE ALSO

[**genlib**(1)](/genlib/1.md), [**GENLIB\_BUS**(3)](/GENLIB_BUS/3.md), [**GENLIB\_ELM**(3)](/GENLIB_ELM/3.md), [**GENLIB\_LOSIG**(3)](/GENLIB_LOSIG/3.md), [**GENLIB\_LOINS**(3)](/GENLIB_LOINS/3.md).
