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

# GENLIB\_ELM(3)

Creates a single element bus name for netlist

## NAME

GENLIB\_ELM - Creates a single element bus name for netlist

## SYNOPSYS

```
#include <genlib.h>
char ∗GENLIB_ELM(busname, index);
char ∗busname;
long index;
```

## PARAMETERS

- *busname*

  Common signal name for a bus

- *index*

  Index of the demanded signal belonging to the bus

## DESCRIPTION

*ELM* Creates a single element bus names valid for the genlib netlist functions that manipulate the signal, and/or connector, concept. They are:

**LOINS**(3)\
 **LOCON**(3)

The *index* argument gives the index of the name to be created.\
 This function has a constant equivalent, it means that if the *index* value is known at compilation time, one should better use, for readability purposes, the "\[n\]" construct.

## EXAMPLE

```
#include <genlib.h>
main()
{
int b = 0;
int e = 12;
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_LOFIG("mycell");
	/∗ define interface  ∗/
	GENLIB_LOCON(GENLIB_BUS("i", b, e), INPUT, BUS("sig", b, e);
	GENLIB_LOCON("o[2:0]", OUTPUT, "sigout[4:6]");
	/∗ Place an instance ∗/
	GENLIB_LOINS("model","instance", GENLIB_ELM("sig", e/2), "sigout[6]", EOL);
	/∗ Save all that on disk ∗/
	GENLIB_SAVE_LOFIG();
}
```

## SEE ALSO

[**genlib**(1)](/genlib/1.md), [**GENLIB\_BUS**(3)](/GENLIB_BUS/3.md).
