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

# scapin(1)

## NAME

- scapin - Scan path insertion

  ## SYNOPSIS

- ***scapin \[-VRB\] \[-P file\] Input\_name Path\_name Output\_name***

  ## DESCRIPTION

**SCAPIN** ***is an automatic scan path generator for gate level netlists.*** **SCAPIN** ***inserts a scan path in the netlist*** **Input\_name** ***and drives***  ***a new netlist*** **Output\_name*****.*** ***This scan path contains all registers specified in the file*** **Path\_name*****.path*** ***(see below for the exact syntax).*** **SCAPIN** ***adds also 3 new connectors in the netlist: scan\_in, scan\_out and*** ***scan\_test in order to control the scan path.*** ***Eventually*** **SCAPIN** ***adds an output buffer before the output connector*** ***scan\_out (option -B).***\

## ENVIRONMENT VARIABLES

- [***MBK\_WORK\_LIB***(1)](/MBK_WORK_LIB/1.md)

  indicates the path to the read/write directory for the session.\

- [***MBK\_IN\_LO***(1)](/MBK_IN_LO/1.md)

  indicates the input netlist file format.\

- [***MBK\_OUT\_LO***(1)](/MBK_OUT_LO/1.md)

  indicates the output netlist file format.\

- ***SCAPIN\_PARAM\_NAME***

  indicates the location of a parameter file (with extention .scapin) containing the properties (ports name, models name etc ...) of all cells needed for the scan path insertion.  (see below for the exact syntax)\

## OPTIONS

- ***-V***

  Sets verbose mode on. Each step is displayed on the standard output.

- ***-R***

  All registers of the scan path are replaced by an equivalent scannable register cell (called reg-mux).  (With the default option a simple multiplexor is added just before all registers of the scan path).

- ***-B***

  Adds an output buffer before the output connector scan\_out.

- ***-P file***

  Specifies a parameter file (with extention .scapin) containing the properties of all cells needed for the scan path insertion. (see below for the exact syntax)

  ```
  # Example of .scapin file
  BEGIN_MUX
  MUX_MODEL        mx2_x2
  MUX_SEL          cmd
  MUX_INPUT_SEL    i1
  MUX_INPUT_NSEL   i0
  MUX_VDD          vdd
  MUX_VSS          vss
  MUX_OUTPUT       q
  END_MUX
  BEGIN_REG
  REG_MODEL        sff1_x4
  REG_CLK          ck
  REG_INPUT        i
  REG_VDD          vdd
  REG_VSS          vss
  REG_OUTPUT       q
  REG_MUX          mx2_x2
  REG_REG_MUX      sff2_x4
  END_REG
  BEGIN_REG_MUX
  REG_MUX_MODEL        sff2_x4
  REG_MUX_SEL          cmd
  REG_MUX_INPUT_SEL    i1
  REG_MUX_INPUT_NSEL   i0
  REG_MUX_CLK          ck
  REG_MUX_VDD          vdd
  REG_MUX_VSS          vss
  REG_MUX_OUTPUT       q
  REG_MUX_MUX          mx2_x2
  REG_MUX_REG          sff1_x4
  END_REG_MUX
  BEGIN_BUF
  BUF_MODEL            buf_x2
  BUF_INPUT            i
  BUF_VDD              vdd
  BUF_VSS              vss
  BUF_OUTPUT           q
  END_BUF
  ```

- ***Path\_name***

  Specifies a parameter file (with extention .path) containing an ordered list of all instances (registers) of the scan path. It contains also the name of the 3 connectors scan\_in, scan\_out and scan\_test. (see below for the exact syntax)

  ```
  # Example of .path file
  BEGIN_PATH_REG
  cs_0
  cs_1
  cs_2
  END_PATH_REG
  BEGIN_CONNECTOR
  SCAN_IN      scin
  SCAN_OUT     scout
  SCAN_TEST    test
  END_CONNECTOR
  ```

## SEE ALSO

[**MBK\_IN\_LO**(1)](/MBK_IN_LO/1.md). [**MBK\_OUT\_LO**(1)](/MBK_OUT_LO/1.md). [**MBK\_WORK\_LIB**(1)](/MBK_WORK_LIB/1.md).
