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

# GENLIB\_PHREF(3)

place a physical reference in the current figure at absolute coordinates

## NAME

GENLIB\_PHREF - place a physical reference in the current figure at absolute coordinates

## SYNOPSYS

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

## PARAMETERS

- *type*

  Type of the reference to be added

- *name*

  Name of the reference

- *x, y*

  Absolute coordinates of the reference

## DESCRIPTION

**PHREF** adds a reference in the current layout cell, at the specified coordinates. A reference is an object that allows to symbolicaly name a point for futur use by the designer. They have been mainly used in the past to *program* decoders, in order to obtain many cells from a unique cell.

The *type* argument may take the two following legal values:

- **ref\_con**

  for virtual connectors, see **dpr**(1) for details.

- **ref\_ref**

  for any other need from the designer.

## ERRORS

**"GENLIB\_PHREF 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 reference inside it. you must call **DEF\_PHFIG** before any other layout action.

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_PHFIG("cell");
	.
	/∗ Put a reference ∗/
	GENLIB_PHREF("ref_con", "in_a[0]", 102L, 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\_CON\_REF**(3)](/GENLIB_PLACE_CON_REF/3.md), [**GENLIB\_PLACE\_SEG\_REF**(3)](/GENLIB_PLACE_SEG_REF/3.md), [**GENLIB\_PLACE\_VIA\_REF**(3)](/GENLIB_PLACE_VIA_REF/3.md).
