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

# GENLIB\_DEF\_PHINS(3)

define a new reference instance

## NAME

GENLIB\_DEF\_PHINS - define a new reference instance

## SYNOPSYS

```
#include <genlib.h>
void GENLIB_DEF_PHINS(instancename);
char ∗instancename;
```

## PARAMETERS

- *instancename*

  Defines the instance called *instancename* as the new "reference instance"

## DESCRIPTION

**DEF\_PHINS** define the new "reference instance", used as starting point in the relative placement functions of genlib. It's regarding the **abutment** **box** of the instance *instancename* that the next instance is going to be placed, if using the appropriate functions. Notice that the more recently placed instance becomes automaticaly the "reference instance", if  **DEF\_PHINS** isn't called.

## ERRORS

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

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

**"instance instancename doesn't exist in current figure"**

The instance *instancename* hasn't currently been placed in the figure, so it's impossible do to any placement from it.

## EXAMPLE

```
#include <genlib.h>
main()
{
	/∗ Create a figure to work on  ∗/
	GENLIB_DEF_PHFIG("cell");
	/∗ Place an instance ∗/
	GENLIB_PLACE("model","i1", NOSYM,0L,0L);
	GENLIB_PLACE("model","i2", NOSYM,120L,40L);
	GENLIB_DEF_PHINS("i1");
	GENLIB_PLACE_TOP("model2", "i3", NOSYM);
	GENLIB_DEF_AB(0, 0, 0, 0);
	/∗ Save all that on disk ∗/
	GENLIB_SAVE_PHFIG();
}
```

## SEE ALSO

[**genlib**(1)](/genlib/1.md), [**GENLIB\_PLACE**(3)](/GENLIB_PLACE/3.md), [**GENLIB\_PLACE\_TOP**(3)](/GENLIB_PLACE_TOP/3.md), [**GENLIB\_PLACE\_RIGHT**(3)](/GENLIB_PLACE_RIGHT/3.md), [**GENLIB\_PLACE\_LEFT**(3)](/GENLIB_PLACE_LEFT/3.md), [**GENLIB\_PLACE\_BOTTOM**(3)](/GENLIB_PLACE_BOTTOM/3.md), [**GENLIB\_SC\_PLACE**(3)](/GENLIB_SC_PLACE/3.md), [**GENLIB\_SC\_TOP**(3)](/GENLIB_SC_TOP/3.md), [**GENLIB\_SC\_RIGHT**(3)](/GENLIB_SC_RIGHT/3.md), [**GENLIB\_SC\_LEFT**(3)](/GENLIB_SC_LEFT/3.md), [**GENLIB\_SC\_BOTTOM**(3)](/GENLIB_SC_BOTTOM/3.md).
