iMPACT
Examples
There is a specific order in which commands must be executed. For example, you cannot program a part unless you first set the mode, issue the command to select the cable, and define a chain of at least one device.
Most users only need to perform six basic operations in their command (.cmd) file:
  1. Set the operating mode
  2. Set up the cable port
  3. Define the chain and assign files
  4. Program the device(s)
  5. Verify the device(s)
  6. Exit from the programming software
In this section, nine examples are shown. In each example, command sequences are shown first, then each command description follows. The number is attached to the left of the each command in the command sequences but this number is not part of the syntax. Refer to the number in the description section to see the detail of the command.
Command Sequence Example 1: Programming a JTAG Chain Containing Two FPGAs
1     setMode -bscan
2     setCable -p auto
3     addDevice -p 1 -file bitstream1.bit
4     addDevice -p 2 -file bitstream2.bit
5     program -v -p 1
6     program -v -p 2
7     saveCDF -file filename.cdf
8     quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT to automatically detect the cable. A Xilinx® programming cable must be connected to your computer.
  3. Adds a device to the first position in the JTAG chain, assigns the bitstream1.bit configuration file to the device.
  4. Adds a device to the second position in the JTAG chain, assigns the bitstream2.bit configuration file to the device.
  5. Programs and verifies the first device in the JTAG chain.
  6. Programs and verifies the second device in the JTAG chain.
  7. Saves the project (chain composition and assigned files) to filename.cdf.
  8. Exits iMPACT.
Command Sequence Example 2: Generating a PROM (.mcs) File
1     setMode -pff
2     setSubmode -pffserial
3     addPromDevice -p 1 -name xc18V04
4     addDesign -version 0 -name 0
5     addDeviceChain -index 0
6     addDevice -p 1 -file bitstream1.bit
7     generate -format mcs -fillvalue FF -output promfile1
8     quit
Description:
  1. Sets the operating mode for PROM file generation.
  2. Switches to the Slave Serial sub-mode of PROM File Generation mode.
  3. Adds a single XC18V04 PROM to position 1.
  4. Adds a single design set.
    The version and name need to be set to zero for a PROM file generation sequence, and only needs to be set once.
  5. Adds a single chain to the design set.
    The index needs to be set to zero for PROM file generation sequence, and only needs to be set once.
  6. Adds a device to the first position in the target chain and assigns the bitstream1.bit configuration file to the device.
  7. Generate promfile1.mcs. The PROM checksum is calculated based on the devices expected fill value. The default fill value for checksum calculations is FF, which corresponds to the erased state of the PROM.
  8. Exits iMPACT.
Command Sequence Example 3: Creating a Chain Consisting of: XC18V04 (programmed), Third Party Device (bypassed), XC18V04 (programmed), XC18V04 (bypassed with .bsd file)
1     setMode -bscan
2     setCable -p auto
3     addDevice -p 1 -sprom xc18V04 -file design1.mcs
4     addDevice -p 2 -file thirdparty.bsd
5     addDevice -p 3 -sprom xc18V04 -file design2.mcs
6     addDevice -p 4 -file xc18V04_vq44.bsd
7     program -e -v -p 1
8     program -e -v -p 3
9     saveCdf -file filename.cdf
10    quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT to automatically detect the cable. A Xilinx programming cable must be connected to your computer.
  3. Adds a Xilinx XC18V04 ISP PROM to the first position in the JTAG chain, assigns the design1.mcs PROM file to it. The specific PROM type (XC18V04) must be specified with the -sprom option when adding Xilinx PROM devices with a PROM programming file while using the addDevice command.
  4. Adds a third party device to the second position in the JTAG chain, assigns the thirdparty.bsd file to it. All non-Xilinx devices in the JTAG chain must be specified in this way.
  5. Adds a Xilinx XC18V04 ISP PROM to the third position in the JTAG chain, assigns the design2.mcs PROM file to it.
  6. Adds a Xilinx device to the fourth position in the JTAG chain, assigns the xc18V04_vq44.bsd file to it. Xilinx devices that are in the JTAG chain but require no programming actions may be bypassed by assigning the appropriate BSDL file. Xilinx BSDL files are provided in the $xilinx\<device>\data\ directory. For example, the xc18V04_vq44.bsd file is available at $xilinx\xc18V00\data\xc18V04_vq44.bsd.
  7. Erases, programs, and verifies the first device in the JTAG chain. All other devices are automatically bypassed by iMPACT.
  8. Erases, programs, and verifies the third device in the JTAG chain. All other devices are automatically bypassed by iMPACT.
  9. Saves the project (chain composition and assigned files) to filename.cdf.
  10. Exits iMPACT.
Command Sequence Example 4: Loading a CDF File and Programming a Device
1     setMode -bscan
2     setCable -p auto
3     loadCdf -file filename.cdf
4     program -p 2
5     quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT to automatically detect the cable. A Xilinx programming cable must be connected to your computer.
  3. Loads the filename.cdf file, which contains the chain composition and the required file associations for each device in the chain.
  4. Programs the second device in the JTAG chain.
  5. Exits iMPACT.
Command Sequence Example 5: Programming an 18V512 PROM with the PC IV cable
1     setMode -bscan
2     setCable -port lpt1
3     setCableSpeed -speed 5000000
4     addDevice -p 1 -sprom xc18V512 -file design1.mcs
5     program -e -p 1 -v
6     quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT that the programming cable is connected to LPT1. iMPACT automatically polls the cable to determine whether it is a PCIII or PCIV cable.
  3. Sets the cable TCK frequency for 5 MHz (5,000,000 Hz). This command is only valid for the PCIV cable.
  4. Adds a Xilinx XC18V512 ISP PROM to the first position in the JTAG chain, assigns the design1.mcs PROM file to it.
  5. Erases, programs and verifies the first device in the JTAG chain.
  6.  Exits iMPACT.
Command Sequence Example 6: Generating a System ACE CF (.ace) File
1     setMode -cf
2     addConfigDevice -size 134217728 -name XCCACE128-I
3     addCollection -name collection1
4     addDesign -version 0 -name rev0a
5     addDeviceChain -index 0
6     addDesign -version 1 -name rev1a
7     addDeviceChain -index 0
8     addCollection -name collection2
9     addDesign -version 0 -name rev0b
10    addDeviceChain -index 0
11    addDesign -version 1 -name rev1b
12    addDeviceChain -index 0
13    setCurrentDeviceChain -index 0
14    setCurrentCollection -collection collection1
15    setCurrentDesign -version 0
16    addDevice -position 1 -file design1a.bit
17    addDevice -position 2 -file design2a.bit
18    setCurrentDesign -version 1
19    addDevice -position 1 -file design3a.bit
20    addDevice -position 2 -file design4a.bit
21    setCurrentCollection -collection collection2
22    setCurrentDesign -version 0
23    addDevice -position 1 -file design1b.bit
24    addDevice -position 2 -file design2b.bit
25    setCurrentDesign -version 1
26    addDevice -position 1 -file design3b.bit
27    addDevice -position 2 -file design4b.bit
28    generate -active collection1
29    quit
Description:
  1. Sets the operating mode for System ACE CF file generation.
  2. Specifies the compact flash device size as 134217728 bits (128Mbit CF card), and the associated target CF device as the XCCACE128-I.
  3. Adds a collection named collection1.
  4. Adds a design to System ACE CF Configuration Address 0 (-version 0). Addresses 0-7 are permitted. The design name assigned to this address is rev0a.
  5. Adds a JTAG device chain. The -index switch needs to be set to '0' for System ACE CF file generation.
  6. Adds a design to System ACE CF Configuration Address 1 (-version 1).
    Addresses 0-7 are permitted. The design name assigned to this address is rev1a.
  7. Adds a JTAG device chain.
    The -index switch needs to be set to '0'for System ACE CF file generation.
  8. Adds a collection named collection2.
  9. Adds a design to System ACE CF Configuration Address 0 (-version 0).
    Addresses 0-7 are permitted. The design name assigned to this address is rev0b.
  10. Adds a JTAG device chain.
    The -index switch needs to be set to '0' for System ACE CF file generation.
  11. Adds a design to System ACE CF Configuration Address 1 (-version 1). Addresses 0-7 are permitted. The design name assigned to this address is rev1b.  
  12. Adds a JTAG device chain.
    The -index switch needs to be set to '0' for System ACE CF file generation.
  13. Sets the current device chain index to 0.
    The index needs to be set to 0 for a System ACE CF file generation sequence, and only needs to be set once.
  14. Sets the current collection to collection 1.
    Subsequent addDevice commands are directed to this collection.
  15. Sets the current design version to 0.  
    Subsequent addDevice commands are directed to this design version.
  16. Adds design1a.bit to the first position in the current device chain for the current version (set in step 15) in the current collection (set in step 14).
  17. Adds design2a.bit to the second position in the current device chain for the current version (set in step 15) in the current collection (set in step 14).
  18. Sets the current design version to 1.  
    Subsequent addDevice commands are directed to this design version.
  19. Adds design3a.bit to the first position in the current device chain for the current version (set in step 18) in the current collection (set in step 14).
  20. Adds design4a.bit to the second position in the current device chain for  the current version (set in step 18) in the current collection (set in step 14).
  21. Sets the current collection to collection2.
    Subsequent addDevice commands are directed to this collection.
  22. Sets the current design version to 0.  
    Subsequent addDevice commands are directed to this design version.
  23. Adds design1b.bit to the first position in the current device chain for the current version (set in step 22) in the current collection (set in step 21).
  24. Adds design2b.bit to the second position in the current device chain for the current version (set in step 22) in the current collection (set in step 21).
  25. Sets the current design version to 1.  
    Subsequent addDevice commands are directed to this design version.
  26. Adds design3b.bit to the first position in the current device chain for the current version (set in step 25) in the current collection (set in step 21).
  27. Adds design4b.bit to the first position in the current device chain for the current version (set in step 25) in the current collection (set in step 21).
  28. Generates a .ace file for each design set created: rev0a, rev1a, rev0b, and rev1b.
    The -path switch can be used to specify where to store the created collection of files.
    The -active switch defines which collection is the active collection as defined in the xilinx.sys file created in the top level of the project directory.
  29. Exits iMPACT.
Command Sequence Example 7: Programming a System ACE MPM Device
1     setMode -bscan
2     setCable -port lpt1
3     addDevice -p 1 -file mpm_design.mpm -mpm xccacem64
4     program -e -p 2 -v
5     quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT that the programming cable is connected to LPT1.
    iMPACT automatically polls the cable to determine whether it is a PCIII or PCIV cable.
  3. Adds a Xilinx System ACE MPM device to the first position in the JTAG chain and assigns the mpm_design.mpm file to it. Specifies a System ACE MPM64 device.
    Note System ACE MPM and System ACE SC are comprised of two devices: an XC18v01 and a XCV50E. iMPACT recognizes this and automatically adds two devices to the JTAG chain for every MPM that is added with the addDevice command. If other devices are added in the JTAG chain after the MPM, their position should account for the fact that MPM occupies two JTAG positions (for example, the next position in this chain is position 3: addDevice -p 3 ...).
  4. Erases, programs, and verifies the MPM device. All operations performed on a System ACE MPM device should be directed at the second of the two positions occupied by System ACE MPM (in this example, position 2).
  5. Exits iMPACT.
Command Sequence Example 8: Generating a Two Device XCF00P Platform Flash PROM Design Revision Set of Files (.mcs and .cfi) with Two Revisions
1     setMode -pff
2     setSubmode -pffversion
3     addPromDevice -position 1 -name xcf32p
4     addPromDevice -position 2 -name xcf32p
5     addCollection -name test
6     addDesign -version 0 -name 0000
7     addDeviceChain -index 0
8     setCurrentDesign -version 0
9     addDevice -position 1 -file bitstream1a.bit
10    addDevice -position 2 -file bitstream2a.bit
11    addDesign -version 1 -name 1000
12    addDeviceChain -index 0
13    setCurrentDesign -version 1
14    addDevice -position 1 -file bitstream1b.bit
15    addDevice -position 2 -file bitstream2b.bit
16    generate -format mcs -fillvalue FF
17    quit
Description:
  1. Sets the operating mode for PROM file generation.
  2. Switches to the XCF00P Platform Flash PROM Design Revisioning Support sub-mode of the PROM file generation mode.
  3. Adds a single XCF32P PROM to position 1.
  4. Adds a single XCF32P PROM to position 2.
  5. Sets design revision name to "test"
  6. Adds design revision 0.
  7. Adds a single chain to design revision 0.
    The index needs to be set to zero for the PROM file generation sequence.
  8. Sets the current design revision to 0.
    Subsequent addDevice commands are directed to this design revision.
  9. Adds bitstream1a.bit to the first position in the current design revision (set in step 8).
  10. Adds bitstream2a.bit to the second position in the current design revision (set in step 8).
  11. Adds design revision 1.
  12. Adds a single chain to design revision 1.
    The index needs to be set to zero for the PROM file generation sequence.
  13. Sets the current design revision to 1.
    Subsequent addDevice commands are directed to this design revision.
  14. Adds bitstream1b.bit to the first position in the current design revision (set in step 13).
  15. Adds bitstream2b.bit to the second position in the current design revision (set in step 13).
  16. Generate test_0.mcs and test_0.cfi, using the "test" name specified in addCollection (line 5). The PROM checksum is calculated based on the devices expected fill value. The default fill value for checksum calculations is FF, which corresponds to the erased state of the PROM. The -path switch can be used to specify where to store the created PROM files.
  17. Exits iMPACT.
Command Sequence Example 9: Programming a Two Device XCF00P Platform Flash PROM Design Revision Set with Two Revisions Using the PC IV Cable
1     setMode -bscan
2     setCable -port lpt1
3     setCableSpeed -speed 5000000
4     addDevice -p 1 -sprom xcf32p -file test_0.mcs
5     addDevice -p 2 -sprom xcf32p -file test_1.mcs
6     Program -p 1 2 -defaultVersion 0 -ver 0 erase verify -ver 1 erase verify
7     quit
Description:
  1. Sets the operating mode for Boundary-Scan (JTAG).
  2. Tells iMPACT that the programming cable is connected to LPT1. iMPACT automatically polls the cable to determine whether it is a PCIII or PCIV cable.
  3. Sets the cable TCK frequency for 5 MHz (5,000,000 Hz). This command is only valid for the PCIV cable.
  4. Adds a Xilinx XCF32P ISP PROM to the first position in the JTAG chain, and assigns the test_0.mcs PROM file to it. The test_0.cfi file residing in the corresponding file location is automatically associated with test_0.mcs.
  5. Adds a Xilinx XCF32P ISP PROM to the second position in the JTAG chain, and assigns the test_1.mcs PROM file to it. The test_1.cfi file residing in the corresponding file location is automatically associated with test_1.mcs.
  6. Erases, programs and verifies both XCF32P devices in the JTAG chain with the default design revision set to zero. (See the program batch command definition for additional programming options available for the XCF00P Platform Flash PROM.)
  7. Exits iMPACT.

© Copyright 1995–2013, Xilinx® Inc. All rights reserved.