GENSCAN(1)

NAME

genscan - scan path generator

SYNOPSIS

genscan source target [options]

DESCRIPTION
genscan is an automatic scan architecture generator for gate level netlists. The input netlist must be a sequential one with no scan-path or a complete and unique scan-path.genscan can add a full or a partial scan-path.
1/ input netlist
The source file describes the input net-list.
genscan supports sequential D flip-flop based net-lists. For this release the input netlist must be a gate level netlist. The netlist format can be : structural VHDL, EDIF, or ALLIANCE internal format according to the environment variable MBK_IN_LO.
2/ output netlist
The generated file containing the netlist with scan_path will have the name target. The output format is defined by the environment variable MBK_OUT_LO.
The scan-path architecture generation can be used in two ways. The first method consists of changing all the D flip-flop instances of the netlist with scannable ones to build a scan-path . The second one, consist on changing the order of an existant scan-path .
Some new signals may be added to the circuit interface. For sequential circuits with no scan-path we have three new signals, a scan input, a scan output, and a test signal. The test is used to select the scan-path mode or the functional mode. For sequential circuits with already existing scan-path or already declared scan signals no signals are added.
A full or a partial scan-path can be added to a sequential netlist , the optiona -s ScanOrder file gives the way in which memory cells will be ordered in the scan-path. The order of the scan_path can be specified using the register identifiers (instance name), if the registers names are indexed using the underscore character and a number ( for example : register_12 ), the order is the growing way of the registers index. The scan-path default order is the random one.

OPTIONS

-n  use the declared scan_out as the output of the scan chain. This option is useful if the output of the last DFF of the scan chain is a primary output.

-s ScanOrderFile
    A user scan-path order can be specified using the ScanOrderFile file. This file gives the memory cells instances names and the order in wich they will appear in the scan-path. If this file is not specified a full scan-path is added to the netlist with a register index based order or a random order. The ScanOrderFile is a text file in which each line contains one memory cell instance name. The first instance ( top of the file) will be connected to scan input signal and the last instance (bottom of the file) will be connected to scan out signal.

ENVIRONMENT
genscan relies on the proper setting of the following environment variables. The first set of environment variables sets the MBK environment. The second set gives the names of special signals if they exist or if they must be added on the interface.The last set of environment variables give the names of D flip-flop and scannable D flip-flop models.

MBK_CATA_LIB(1)
    gives the path to the cell libraries.

MBK_WORK_LIB(1)
    furnishes the path to the working directory.

MBK_IN_LO(1)
    indicates the input structural file format.

MBK_OUT_LO(1)
    indicates the output structural file format.

SCIN
    scan input connector of the netlist.

SCOUT
    scan output connector of the netlist.

TEST
    test and functional mode selection connector.This variable is defined by the signals name.

CLOCK
    netlist clock input.

DFF D flip-flop model name and its interface organization( ModelName : DataIn : Clock : DataOut).

SCAN_DFF
    scannable D flip-flop model name and its interface organization( ModelName : DataIn : ScanIn : ScanEnable : Clock : DataOut). The test signal is connected to the ScanEnable input.

EXAMPLES
To use genscan, some environment variables must be set :
If the ALLIANCE format is used, the user must have the following environment:
MBK_CATA_LIB =/labo/cells/sclib
MBK_IN_LO =vst
MBK_OUT_LO =vst
MBK_WORK_LIB =.
MBK_VDD =vdd
MBK_VSS =vss
According to the netlist we have for example the following environement variables:
SCIN =scin
SCOUT =scout
TEST =test
CLOCK =clk
For using sclib library we have:
DFF =ms_y:i:l:t
SCAN_DFF =ms2_y:di:si:se:l:t
The command line to be executed for adding a scan-path architecture with a default order to the circuit called, for example, "automate" is:

genscan automate automate_scan
    The input netlist will be the file automate.vst
    The resulting file will be automate_scan.vst

genscan ctrl ctrl_scan -s order
    This command allows to add a scan path to the circuit called ctrl with the order defined by the input file order , the result netlist is ctrl_scan.The content of the file order is:
           state_0
           state_2
           state_1
           state_3
    The memory cell state_0 will be the first cell in the scan-path and the cell satate_3 is the last one.

SEE ALSO
mbkenv(3).

DIAGNOSTICS
1/ Model ... not found !!
The model defined by an environment variable doesn't exist in the library.
2/ Connector names discrepency on model ...
When the connectors names of a defined model ( defined by the environment variable) are different from those of the model in the library.
3/ Can't extract scan-path
There is no active path between scan input and scan output signals.