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

# GENLIB\_PHVIA(3)

place a physical via in the current figure at absolute coordinates

## NAME

GENLIB\_PHVIA - place a physical via in the current figure at absolute coordinates

## SYNOPSYS

```
#include <genlib.h>
void GENLIB_PHVIA(type, x, y)
char type;
long x, y;
```

## PARAMETERS

- *type*

  Type of the contact to be made

- *x, y*

  Absolute coordinates of the via

## DESCRIPTION

**PHVIA** adds a via in the current layout cell, at the specified coordinates. The *type* argument may take the following legal values:

- **CONT\_POLY**

  links **POLY** and **ALU1**

- **CONT\_DIF\_N**

  links **NDIF** and **ALU1**

- **CONT\_DIF\_P**

  links **PDIF** and **ALU1**

- **CONT\_BODY\_N**

  links **NTIE** and **ALU1**

- **CONT\_BODY\_P**

  links **PTIE** and **ALU1**

- **CONT\_VIA**

  links **ALU1** and **ALU2**

- **CONT\_VIA2**

  links **ALU2** and **ALU3**

- **C\_X\_N**

  corner for L-shaped (and S-shaped) N transistor

- **C\_X\_P**

  corner for L-shaped (and S-shaped) P transistor

## ERRORS

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

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

**"illegal addphvia : type is XX  at** *x, y***"**

The *type* parameter does not have a legal value, but *XX*.

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_PHFIG("cell");
	.
	/∗ Put a via ∗/
	GENLIB_PHVIA(CONT_VIA, 12L, 10L);
	.
	.
	GENLIB_DEF_AB(0L, 0L, 0L, 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\_PLACE\_VIA\_REF**(3)](/GENLIB_PLACE_VIA_REF/3.md).
