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

# GENLIB\_PHSEG(3)

place a physical segment in the current figure at absolute coordinates

## NAME

GENLIB\_PHSEG - place a physical segment in the current figure at absolute coordinates

## SYNOPSYS

```
#include <genlib.h>
void GENLIB_PHSEG(layer, width, name, x1, y1, x2, y2)
char layer;
long width;
char ∗name;
long x1, y1, x2, y2;
```

## PARAMETERS

- *layer*

  Layout layer of the segment

- *width*

  Width of the segment

- *name*

  Name to be given to the segment

- *x1, y1, x2, y2*

  Coordinates of the segment's end points in the current figure

## DESCRIPTION

**PHSEG** adds a segment in the current layout cell, at the specified coordinates, with the given attributs. The *layer* argument can take the following legal values :

- **NWELL**

  - **PWELL**

  - **NTIE**

  - **PTIE**

  - **NDIF**

  - **PDIF**

  - **NTRANS**

  - **PTRANS**

  - **POLY**

  - **ALU1**

  - **ALU2**

  - **ALU3**

  - **TPOLY**

  - **TALU1**

  - **TALU2**

  - **TALU3**

  The name argument needs not to be specified, since one usually doesn't need to give a segment a name. To do so, just type "" as name.

## ERRORS

**"GENLIB\_PHSEG impossible : missing GENLIB\_DEF\_PHFIG"**

No figure has been yet specified by a call to **DEF\_PHFIG**. So it isn't possible to place an instance inside it. you must call **DEF\_PHFIG** before any other layout action.

**"illegal addphseg : x1, y1, x2, y2"**

A symbolic segment must be either vertical or horizontal, so either *x1 = x2*, or *y1 = y2*.

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_PHFIG("cell");
	/∗ Put a segment ∗/
	GENLIB_PHSEG(ALU1, 1, "", 0L, 0L, 12L, 0L);
	/∗ Save that on disk ∗/
	GENLIB_SAVE_PHFIG();
}
```

## SEE ALSO

[**genlib**(1)](/genlib/1.md), [**GENLIB\_DEF\_PHFIG**(3)](/GENLIB_DEF_PHFIG/3.md), [**GENLIB\_SAVE\_PHFIG**(3)](/GENLIB_SAVE_PHFIG/3.md), [**GENLIB\_COPY\_UP\_SEG**(3)](/GENLIB_COPY_UP_SEG/3.md), **GENLIB\_THRU\_H**(3), **GENLIB\_THRU\_CON\_H**(3), **GENLIB\_THRU\_V**(3), **GENLIB\_THRU\_CON\_V**(3), [**GENLIB\_WIRE1**(3)](/GENLIB_WIRE1/3.md), [**GENLIB\_WIRE2**(3)](/GENLIB_WIRE2/3.md), [**GENLIB\_WIRE3**(3)](/GENLIB_WIRE3/3.md).
