How can I use PIP Channels to set up a UUT for test?
Here are two examples of how to use the PIP channel(s) to set up a UUT for test:
1. Create a manual test and insert it in the batch file:
This method works well if you always run the tests as part of a batch routine, but this approach fails if you run individual tests, because the PIP will be reset at the end of the test.
Within a batch execution you can avoid resetting PIP between tests in the batch sequence using the "NoInit PIP;" command:
NoInit PIP; -- avoid resetting PIP in between tests within this sequence TEST 'PIP initialization'; TEST 'Infrastructure'; if exitcode <> 0 then STOP; end; TEST 'interconnection';<br>
The following CASLAN code for "PIP initialization.CAS" test shows an example for how to set up the PIP channel;
PROGRAM 'PIP initialization'; -- test program name (place holder for real name) BEGIN MODE PIP1 outenable; -- activate PIP1 block (all PIP1.x signals are outputs now) OUT PIP1, 00000001b; -- drive PIP1.0 high END.<br>
2. Control PIP at the beginning of each test:
You can either manually add code at the beginning of a test program ( MODE and OUT commands shown in "PIP initialization.CAS", for example) or you can have CASCON add such code automatically to ATPG tests; the letter is a more convenient and consistent method, but it works only for automatically generated tests (for manually written tests you'd still need to add the code yourself).
To automatically add code to an ATPG test, you'd use the CASLAN section within the EGS file (use the Global EGS for the project if you want the code to be added to all ATPG tests in this project). Following is an example EGS file with a CASLAN section that defines the source code to be added to the ATPG test:
(BScanModifications -- ... left blank in this example )<br>
(NonBScan -- ... left blank in this example )<br>
(DEVICES -- ... left blank in this example )<br>
(CASLAN -- (DCL VAR vKey : 16;) -- EXAMPLE2: Declare an 16 bit variable -- (BEGIN -- EXAMPLE2: Code is inserted at the beginning of the CASLAN file -- WriteLn('Close switch SW1!');) -- EXAMPLE2: Write message to the screen -- (FINALIZE -- EXAMPLE2: Code is inserted at the end of the CASLAN file -- Write('Press ENTER to continue');) -- EXAMPLE2: Write message to the screen (BEGIN -- code PIP-Code-1 inserted automatically based on global EGS CASLAN setup: -- assuming PIP1.0 is connected to JTAG_EN signal on U4 MODE PIP1 outenable; -- activate PIP1 block (all PIP1.x signals are outputs now) OUT PIP1, 00000001b; -- drive PIP1.0 high in order to enable JTAG for U4 -- end of inserted PIP-Code-1 ) )<br>