Corelis CAS-1000-I2C/E User Manual

I2c bus analyzer, exerciser, programmer, and tester
Table of Contents

Advertisement

Quick Links

CORELIS
1
CAS-1000-I2C/E
I2C Bus Analyzer, Exerciser, Programmer, and Tester
User's Manual
Corelis, Inc.
13100 Alondra Blvd. Cerritos, CA 90703
Telephone: 562.926.6727 • Fax: (562) 404-6196

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CAS-1000-I2C/E and is the answer not in the manual?

Questions and answers

Summary of Contents for Corelis CAS-1000-I2C/E

  • Page 1 CORELIS ™ CAS-1000-I2C/E I2C Bus Analyzer, Exerciser, Programmer, and Tester User’s Manual Corelis, Inc. 13100 Alondra Blvd. Cerritos, CA 90703 Telephone: 562.926.6727 • Fax: (562) 404-6196...
  • Page 3 CORELIS. This manual is a CORELIS proprietary document and may not be transferred to another party without the prior written permission of CORELIS. CORELIS assumes no responsibility for the use of or reliability of its software on equipment that is not furnished by CORELIS.
  • Page 4 The latest news, tips and updates on the Corelis bus analyzer hardware and software products can be found in the Corelis user forums. The forums are provided as a free service to our existing customers but an individual user name and password is required. To request an account, please visit forums.corelis.com/register.php...
  • Page 5: Table Of Contents

    Hardware Features ..........................4 Host Computer Requirements....................... 6 Chapter 2 Installation....................7 Installing the I2C Exerciser Application Software................8 CAS-1000-I2C/E Hardware Installation ....................17 Chapter 3 Getting Started..................23 Overview ..............................23 Tutorial – Using Demo Mode ....................... 23 Tutorial – Using Live Mode ........................74 Chapter 4 Connecting to a Target................
  • Page 6 Chapter 7 Serial EEPROM Programmer ..............166 Programmer Operations ........................167 Programmer Options.......................... 171 Programmer Window Reference ....................... 172 Chapter 8 Configuration and Preferences ............176 Configuration Manager ........................176 Preferences Dialog ..........................193 Using Project Files ..........................198 Calibration ............................200 Chapter 9 Third Party Application Interface ............
  • Page 7 Syntax Summary (Advanced Users Only)..................402 Built-In Script Editor........................... 406 Chapter 14 Glitch Pattern Injection ............... 415 Overview .............................. 415 Using the Glitch Pattern Editor ......................416 Adding Glitch Patterns to Master and Slave Emulation ..............421 Appendix A CAS-1000-I2C Hardware Reference ..........427 Hardware Specifications ........................
  • Page 8 List of Figures Figure 1. I C Bus Topology .......................... 1 Figure 2. Illustration of the CAS-1000-I2C ....................2 Figure 3. I2C Exerciser Installation Wizard ....................8 Figure 4. Windows Run Dialog........................9 Figure 5. License Agreement Screen......................9 Figure 6. Customer Registration Screen....................10 Figure 7.
  • Page 9 Figure 49. Monitor Window Timing Display....................49 Figure 50. Monitor Window Trace List Positioned on Cursor A Line ............50 Figure 51. Monitor Window Trace List Positioned on Cursor B Line ............51 Figure 52. Monitor Window Timing Display Showing Edges Zoomed in at Line 100 ........ 52 Figure 53.
  • Page 10 Figure 104. Input/Output Signals ......................101 Figure 105. Monitor Buffer Options ......................102 Figure 106. Monitor Window ........................103 Figure 107. Monitor Trace Listing ......................104 Figure 108. Monitor Timing Field ......................107 Figure 109. Timing Field Popup Menu ..................... 109 Figure 110.
  • Page 11 Figure 159. Filters Pane ........................... 179 Figure 160. Filter Definition Dialog (similar to Edit).................. 180 Figure 161. Symbols Pane ........................181 Figure 162. Symbol Definition Dialog....................... 182 Figure 163. SMBus Pane ......................... 183 Figure 164. SMBus Decoder File Dialog....................184 Figure 165.
  • Page 12 Figure 214. Editor File Menu ........................410 Figure 215. Editor Edit Menu ........................411 Figure 216. Editor Tool Bar ........................413 Figure 217. Glitch Pattern Editor Window ....................416 Figure 218. Glitch Injection Trigger Conditions ..................417 Figure 219. Default Glitch Pattern Setting....................418 Figure 220.
  • Page 13 List of Tables Table 1. Optional Interface Cables ....................... 7 Table 2. Flying Leads Serial Bus Connector Pin Assignments ..............91 Table 3. 4-Pin Crimp Cable Pin Assignments .................... 92 Table 4. Summary of available Trigger Components ................122 Table 5. Monitor Window Layout ......................134 Table 6.
  • Page 15 Introduction What this User’s Manual Covers This User’s Manual was designed to make using your CAS-1000-I2C™ analyzer and its software easier and more efficient. The manual contains easy to navigate tutorials and reference information that are presented in a logical progression. The following briefly summarizes each chapter: Chapter 1: Product Overview This chapter provides you with an introduction to the I...
  • Page 16 This chapter describes the features of the Glitch Pattern Injection which is used to inject glitches into the target I C bus. Appendix A: CAS-1000-I2C Hardware Reference This appendix presents a table comparing the features in different versions of Corelis bus analyzers as well as the physical and electrical specifications for the CAS-1000-I2C hardware. Introduction...
  • Page 17: Chapter 1 Product Overview

    Chapter 1 Product Overview CAS-1000-I2C/E™ Bus Analyzer and I2C Exerciser product overview Introduction to I C and SMBus The I C bus was developed by Philips for basic communication between devices. It has since evolved, increasing in performance and finding many new applications including data transfer and system-level command-and-control.
  • Page 18: Introduction To The Cas-1000-I2C

    National Instruments’ LabWindows/CVI and LabVIEW, or custom user-developed software. The CAS-1000-I2C/E also includes a JTAG controller that, when used with the optional Corelis ScanExpress software, can perform boundary-scan interconnect testing and in-system programming of flash memories and CPLDs.
  • Page 19: Software Toolset

    Motorola S-Record, Intel Hex, and a hex-text file format. Emulator Using the Emulator tool, the CAS-1000-I2C/E can be configured to emulate a master or slave device on the target I C bus. The behavior of the emulated device is controlled using a sophisticated scripting language that has a simplified C-language syntax.
  • Page 20: Hardware Features

    Hardware Features The main hardware features of the CAS-1000-I2C/E are described in the following sections. C Speed Support The CAS-1000-I2C operates using the Standard/Fast-mode/Fast-mode Plus protocol over its entire performance range for both monitoring and driving the bus (up to 5 MHz as a master, 1.9 MHz as a slave).
  • Page 21 The CAS-1000-I2C includes an IEEE-1149.1 JTAG Test Access Port (TAP). This port can be used to perform boundary-scan testing and in-system programming of flash, EEPROMs and CPLDs on the target system. The optional Corelis ScanExpress software is needed to enable the boundary-scan testing and in-system programming feature. This feature is mutually exclusive to the I C functionality and requires it to be put into the TAP mode.
  • Page 22: Host Computer Requirements

    Host Computer Requirements I2C Exerciser is a 32-bit Microsoft Windows®-based application which controls the CAS-1000-I2C. The PC on which it will be installed should meet the following minimum requirements: One available USB 2.0 Port Windows® XP (SP2), Windows® Vista, Windows® 7, or Windows® 8 3.2 GHz Pentium®...
  • Page 23: Chapter 2 Installation

    12” I C Target Interface Cable consisting of flying leads with test clips (Part# 15438-2) Corelis I2C Bus Analyzer, Exerciser, Programmer, and Tester CD-ROM containing the I2C Exerciser application, support software and example target test files Your application may require additional optional interface cables. Table 1 lists the optional target interface cables available from Corelis.
  • Page 24: Installing The I2C Exerciser Application Software

    Disable any memory resident virus checking software. The software may interfere with the installation process. Insert the Corelis I2C Exerciser CD-ROM into your CD drive. The installation program should start automatically and display the Welcome to the Installation Wizard screen as shown in Figure 3.
  • Page 25: Figure 4. Windows Run Dialog

    If the installation program does not automatically begin, go to the Windows Start Menu and select Start, then Run. The Run dialog box will appear as shown in Figure 4. Type “[D]:\setup.exe” where [D] is the CD-ROM drive letter. Click on the OK button to run the installation program. Figure 4.
  • Page 26: Figure 6. Customer Registration Screen

    Review the entire agreement, and if you agree, select I accept the terms of the license agreement, and then click on the Next button. The Customer Registration screen shown in Figure 6 will then be displayed. Figure 6. Customer Registration Screen Type in or change the Full Name and Organization as needed, then click on the Next button.
  • Page 27: Figure 7. Destination Folder Screen

    Accept the default installation folder, or customize your installation by selecting the Change button. It is strongly recommended that the application be installed in the default folder. Figure 7. Destination Folder Screen Click on the Next button, and the Select Program Folder screen shown in Figure 8 will be displayed. Installation...
  • Page 28: Figure 8. Select Program Folder Screen

    Select Anyone who uses this computer or Only for me. By default, the installer will place a shortcut icon for the I2C Exerciser on your desktop. If you do not wish this shortcut to be created, uncheck the checkbox on this screen. Figure 8.
  • Page 29: Figure 9. Completing The Installation Wizard Screen

    To change any installation parameters, click on the Back button. Otherwise, click on the Next button and the installation process will begin. Figure 9. Completing the Installation Wizard Screen The installer copies the program files to the specified folder and support files to the Windows system folders.
  • Page 30: Figure 10. Windows 7 Security Warning Pop-Up Window

    If you are running Windows 7 or Vista, the software installation may be interrupted by the operating system by displaying warning pop-up windows as shown in Figure 10. If this occurs, click on the Install this driver software anyway button to safely ignore the warnings and proceed with the installation. Figure 10.
  • Page 31: Figure 12. Software Installation Button On The Windows Xp Task Bar

    The warning pop up windows may be hidden behind the installation window. If this happens, the installation progress bar will stop updating and the installation may appear to be hung. Bring the warning pop up windows to the foreground by clicking on the Software Installation button on the Windows task bar as shown in Figure 12.
  • Page 32: Figure 13. Installation Completed Screen

    The Installation Completed screen shown in Figure 13 will appear to indicate that the installation is complete. Click on the Finish button to exit from the installation program. Figure 13. Installation Completed Screen Installation...
  • Page 33: Cas-1000-I2C/E Hardware Installation

    CAS-1000-I2C/E Hardware Installation The CAS-1000-I2C controller is a hot-plug USB device. You must first install the I2C Exerciser software before installing the CAS-1000-I2C controller. Drivers for the CAS-1000-I2C controller are installed with the I2C Exerciser software and not installing the software and drivers first may result in improper unit configuration and operation.
  • Page 34: Figure 15. Found New Hardware Wizard - Install Options (Windows Xp)

    5. The dialog shown in Figure 15 will pop up. Click on Install the software automatically (Recommended) and click on the Next button. Figure 15. Found New Hardware Wizard - Install Options (Windows XP) Installation...
  • Page 35: Figure 16. Windows Xp Logo Test Warning Pop-Up Window

    6. The Hardware Wizard will attempt to locate the driver that was installed with the I2C Exerciser software. Under Windows XP, a warning dialog box will pop up as shown in Figure 16. You can safely ignore the warning and continue the installation process by pressing the Continue Anyway button. Figure 16.
  • Page 36: Figure 17. Found New Hardware Wizard - Installation Complete (Windows Xp)

    7. After the necessary files are copied to the system, the dialog box shown in Figure 17 will appear indicating that the driver has been successfully installed. Figure 17. Found New Hardware Wizard – Installation Complete (Windows XP) Installation...
  • Page 37: Figure 18. Windows Device Manager (Windows Xp)

    Properties from the pop-up menu. Click on the Hardware tab and then click on the Device Manager button. An entry named Corelis CAS-1000-I2C - 04A1 should be listed in the Universal Serial Bus controllers section as shown in Figure 18.
  • Page 38 Installation...
  • Page 39: Chapter 3 Getting Started

    I2C Exerciser operation overview and tutorial Overview This chapter will quickly introduce you to the basic usage of the Corelis I2C Exerciser tool for viewing bus traffic via the CAS-1000-I2C. Although it is possible to explore the capabilities of this system on your own, working through this chapter is intended to give an immediate feel and appreciation for its ease of use and core functionality.
  • Page 40: Figure 19. Initial I2C Exerciser Warning Message When Cas-1000-I2C Is Not Initially Connected

    Step 1 – Start I2C Exerciser Start the I2C Exerciser application by opening the Windows Start menu, clicking on Programs (or All Programs), then clicking on the I2C Exerciser program group, and finally clicking on the I2C Exerciser entry. A splash screen will be displayed for a few seconds, and then the main I2C Exerciser window will appear with the Monitor window active.
  • Page 41: Figure 20. Tools Menu Demo Mode Selection

    Step 2 – Enable Demo mode Click on the Tools menu and verify that the Demo Mode menu item has a check mark next to it as shown below in Figure 20. This indicates that the program is in Demo Mode. If the CAS-1000-I2C was connected to the PC when you started I2C Exerciser, you will have to select this menu item to force the program into Demo Mode.
  • Page 42: Figure 22. Begin Monitor Data Collection

    Step 3 – Begin the Monitor Window Simulated Bus Activity Click on the Run Single tool bar button (represented by a green arrow) as shown in Figure 22 to begin Monitor data collection of the simulated bus activity. Figure 22. Begin Monitor Data Collection When the program is in Demo Mode and a Run command is invoked, an informational pop-up window as shown in Figure 23 will appear to remind you that the program is currently in Demo Mode.
  • Page 43: Figure 24. Run Status Tab

    When traffic collection begins, the Run Status tab on the Monitor Tools window will be displayed to show progress information as the trace buffer fills with simulated traffic. You may move or resize this window at any time to obtain a better view of the trace list lines and timing display as shown in Figure 24. Step-by-step color-highlighted progress milestones are provided in the Run Status tab.
  • Page 44: Figure 25. Monitor Window Centered On Trigger Line

    Step 4 – Close the Monitor Tools Window Click on the Monitor Tools window close button and the window will close allowing a full view of the Monitor window which shows a portion of the trace buffer content. If a user-specified trigger is encountered while acquiring bus traffic, the trace list will automatically be centered on the transaction that satisfied the trigger condition.
  • Page 45: Figure 26. Monitor Window Right-Click Pop-Up Menu

    Step 5 – View the Trace Data The Monitor window allows the user to examine the captured data in the trace buffer. A vertical scroll bar is available on the right edge of the screen for standard positioning of the lines in addition to use of the page-up and page-down keys.
  • Page 46: Figure 27. Monitor Window Trace List Positioned On Trigger Line

    While scrolling around the trace list data, you will notice that some lines are highlighted with special background colors and the Marker column may contain various indications such as Trigger, Cursor A, Cursor B, or Tagged. These markers are used to indicate special transactions of interest and will be described in more detail later.
  • Page 47: Figure 28. Monitor Window Right-Click Pop-Up Menu Selecting Trigger Settings

    To access the Trigger setup screen, right-click in the trace list area and select the Trigger… entry from the pop-up menu as shown in Figure 28. The Trigger dialog will appear as shown in Figure 29. Figure 28. Monitor Window Right-Click Pop-up Menu Selecting Trigger Settings The Trigger dialog allows the user to specify particular address, data value, and other miscellaneous event criteria which correspond to the bus transaction of interest.
  • Page 48: Figure 29. Configuration Manager Trigger Setup Screen

    In Demo mode, the trigger condition is fixed internally and this screen is non-functional. Click on the Close button to close this dialog. Figure 29. Configuration Manager Trigger Setup Screen Getting Started...
  • Page 49: Figure 30. Monitor Window Trace List Column Headings

    Transaction Line Columns The Monitor window trace list column headings are shown in Figure 30. A description of each column is provided below. Figure 30. Monitor Window Trace List Column Headings Line – Displays a sequential unique number for each bus transaction. Marker –...
  • Page 50: Figure 32. Go To Start Tool Bar Button

    R/W – Displays the read/write direction of data flow relative to the master (R = read from a slave, W = write toward a slave). NAK – Blank for normal ACK responses, or will indicate NAK when the cycle is not acknowledged. Error –...
  • Page 51: Figure 33. Monitor Window Trace List Showing Symbolic Address And Data Entries

    Figure 33. Monitor Window Trace List Showing Symbolic Address and Data Entries Getting Started...
  • Page 52: Figure 34. Configuration Manager Symbols Definition Screen

    Using the method previously described, right-click in the trace list area of the Monitor window and select the Symbols… pop-up menu entry. This will cause the Configuration Manager Symbols definition screen to be displayed as shown in Figure 34. This screen allows the user to add new symbol definition rules, and to edit or remove existing symbol definition rules.
  • Page 53: Figure 35. Symbol Definition Dialog

    Click on the Add button and the Symbol Definition dialog shown in Figure 35 will appear. In the Symbol field, type DAC which is an acronym for Digital-to-Analog Converter. In the Addr field, type 18. This will cause the string DAC to be displayed in the address column for any trace list entries with a 7-bit hex address of 18.
  • Page 54: Figure 36. Configuration Manager Symbols Definition Screen With Dac Symbol

    The Configuration Manager Symbols screen will now contain the newly added DAC entry as shown in Figure 36. Click on the Close button to close the Configuration Manager Symbols screen. Figure 36. Configuration Manager Symbols Definition Screen with DAC Symbol Getting Started...
  • Page 55: Figure 37. Monitor Window Trace List Showing New Dac Symbolic Address Entries

    With the trace list still showing the beginning of the Demo data, you will now see that lines 17 through 34 are now all displaying the symbol DAC in the address column instead of the raw address value of 18. Lines 46 through 50, lines 78 through 82, and lines 94 through 98 are similarly affected.
  • Page 56: Figure 38. Monitor Window Trace List Data Byte Column Right-Click Pop-Up Menu

    Right-clicking on the column headings of either the Addr or Data Byte column allows the user to toggle the symbolic translation on and off. Additionally, the pop-up menu allows selection of the numeric display format to either hexadecimal, binary, or decimal. These settings work independently for the Addr and Data Byte columns.
  • Page 57: Figure 39. Monitor Window Trace List Data Column With Symbols Disabled

    Figure 39. Monitor Window Trace List Data Column with Symbols Disabled Getting Started...
  • Page 58: Figure 40. Monitor Window Trace List Data Byte Column Right-Click Pop-Up Menu

    Right-click on the Data Byte column heading and select the Binary format menu entry as shown in Figure 40. Observe that the Data Byte column is now displaying values in binary format as shown in Figure 41. Figure 40. Monitor Window Trace List Data Byte Column Right-Click Pop-up Menu Figure 41.
  • Page 59: Figure 42. Monitor Window Trace List Data Byte Column Right-Click Pop-Up Menu

    Using the method just described, re-enable symbol translation and change the display format back to hexadecimal. The Data Byte column heading pop-up menu also allows the toggling of Compact Mode. This special mode displays all of the data bytes for each message on a single line in the trace list. Enable Compact Mode by right-clicking on the Data Byte column and select the Compact Mode entry as shown in Figure Figure 42.
  • Page 60: Figure 43. Monitor Window Trace List In Compact Mode

    The trace list data will be reformatted as shown in Figure 43. Some messages may contain more data bytes than will fit on the screen. When the display is in Compact Mode, clicking on any data transaction in the Data Byte column will cause a pop-up Data Bytes window to appear making it possible to view and scroll through all data in the selected message.
  • Page 61: Figure 44. Monitor Window Trace List In Compact Mode With Data Bytes Pop-Up Window

    Figure 44. Monitor Window Trace List in Compact Mode with Data Bytes Pop-up Window When you have finished viewing the trace list in Compact Mode, close the Data Bytes pop-up window. Then select the Normal Mode selection from the Data Bytes column heading menu to put the trace list display back into Normal mode.
  • Page 62: Figure 45. Monitor Window Trace List I/O 2 Right-Click Pop-Up Menu

    You can right-click on any column heading and select Hide Column to remove the selected column from the trace list display. This may be useful when the user is not interested in some of the data columns and hiding them can reduce screen clutter. Additionally, you can drag and drop column headings to change the order that the columns are displayed in.
  • Page 63: Figure 47. Monitor Window Trace List With Rearranged I/O Columns

    After hiding the I/O 2 column and repositioning the I/O 1 column, the Monitor window should now look like Figure 47. Figure 47. Monitor Window Trace List with Rearranged I/O Columns Getting Started...
  • Page 64: Figure 48. Trace Layout Dialog

    If you wish to unhide one or more previously hidden columns or wish to restore the column layout to its default state, right-click on any column heading and select the Trace Layout menu. The Trace Layout dialog will appear as shown in Figure 48 showing each column and whether or not it is visible. Click on the Default Column Layout button to restore the default column settings and then click on the Close button.
  • Page 65: Figure 49. Monitor Window Timing Display

    Timing Display The lower portion of the Monitor window contains a graphical representation of the I C bus signal transitions depicted as a timing diagram similar to a logic analyzer. A picture of the timing display is shown in Figure 49. It displays the actual state and edge times of the signals as they transitioned on the bus while conveying transactions.
  • Page 66: Figure 50. Monitor Window Trace List Positioned On Cursor A Line

    Notice the colored flags that are displayed just above the top Field row of the timing display. These flags indicate the locations of the Trigger marker and the Cursor markers. A cursor is a special marker that can be positioned in the timing display at various points of interest to allow time measurements between any two points.
  • Page 67: Figure 51. Monitor Window Trace List Positioned On Cursor B Line

    Now right-click in the trace list area of the Monitor window and select the Go to Cursor B pop-up menu entry. This will cause the trace list and timing display to reposition to the Cursor B line as shown in Figure 51.
  • Page 68: Figure 52. Monitor Window Timing Display Showing Edges Zoomed In At Line 100

    Notice that the time scale has been reduced from 50µs/div to 20µs/div and that the edges appear much larger now revealing more detail. Figure 52. Monitor Window Timing Display Showing Edges Zoomed in at Line 100 Getting Started...
  • Page 69: Figure 53. Monitor Window Timing Display Measuring The Time Between Cursors A & B

    The Interval A to B field always displays the calculated time difference between the position of Cursor A and Cursor B. Reposition Cursor A by clicking on the small green triangle on the left side of the Field row and, while holding the mouse button, down drag it over the last edge of the previous transaction as shown in Figure 53.
  • Page 70: Figure 54. Go To Start Tool Bar Button

    Step 6 – Find Operations Push the Go to Start tool bar button as shown in Figure 54 to bring the trace list view to the first entries in the trace listing. This will also cause the first line in the trace list to be highlighted. The Find function will now search for entries starting with the first entry all the way to the end of the trace buffer contents.
  • Page 71: Figure 55. Find Tool Bar Button

    Click on the Find tool bar button as shown in Figure 55 below. It will bring up the Find dialog shown in Figure 56. Figure 55. Find Tool Bar Button Figure 56. Find Dialog Getting Started...
  • Page 72 The Less button compacts this dialog to display only the four buttons on top to minimize any obscuring of the Monitor window. This is useful when you have configured the search parameters and want to repeat the same search query many times. While compacted, this button changes to More enabling the user to force the dialog back to its expanded format.
  • Page 73: Figure 57. Find A Data Value Of 2E

    Go to the start of the trace list using the Go to Start tool bar button as previously shown. Then in the Find window, enter the value 2E into the Data Byte Value field as shown in Figure 57. Figure 57. Find a Data Value of 2E Getting Started...
  • Page 74: Figure 58. Monitor Window Trace List Showing Find 2E Data Result

    Click on the Find Next button and the trace listing will go to the only line containing this data value which is on line 13 as shown in Figure 58. Figure 58. Monitor Window Trace List Showing Find 2E Data Result Getting Started...
  • Page 75: Figure 59. Find A Data Value Of 72

    Go to the start of the trace list using the Go to Start tool bar button as previously shown. Change the Data Byte Value field to 72 as shown in Figure 59. Click on the Tag All button and you will be prompted to clear all existing tags in the trace listing as shown in Figure 60.
  • Page 76: Figure 61. Matched Transactions Prompt

    When the search is complete, the pop-up window in Figure 61 will appear to notify you how many trace lines matched the search criteria. Click on the OK button and the trace list will display the first tagged line as shown in Figure 62. Lines 22 and 80 will be tagged since they contain the data value 72. Figure 61.
  • Page 77: Figure 63. Go To Tagged Row Tool Bar Button

    You can click on the Go to Tagged Row tool bar button, shown in Figure 63, to move to the second search result as shown in Figure 64. Repeatedly clicking on the Go to Tagged Row tool bar button will cause the trace list to alternate between the two tagged lines.
  • Page 78: Figure 65. Monitor Colors Preferences Screen

    Step 7 – Changing Preferences There are a number of user configurable preferences available from the Tools | Preferences menu entry. Right-click in the trace list and select Go to Cursor B from the pop-up menu. Select the Tools | Preferences menu entry and the Preferences dialog will appear. By default, this screen will be displaying the options on the Monitor Colors tab.
  • Page 79: Figure 66. Monitor Colors Preferences Screen Changing Cursor A Background Color

    Since Cursor A is visible in the trace list, we will change its background color to observe how these color configuration items work. Click on the Cursor A Background control and select the color Blue from the pop-up color picker as shown in Figure 66. Using the same method, click on the Cursor A Text control and select the color White from the pop-up color picker.
  • Page 80: Figure 67. Monitor Window With Updated Cursor A Colors

    After making these color changes, observe that the Cursor A line in the Monitor window trace list has immediately been painted with the newly selected colors as shown in Figure 67. All of the other items on the Monitor Colors tab can be similarly changed. Figure 67.
  • Page 81: Figure 68. Monitor Window With Updated Cursor A Colors

    The Color Scheme controls how trace line groupings are displayed. The options are no color, alternating color per line, or alternating color per message (address transaction and all conveyed data to/from that address). The default setting is Alternate color per message, but the user may prefer a different setting. Click on the Color Scheme control and select the Alternate color per row entry as shown in Figure 68.
  • Page 82: Figure 69. Monitor Window With Alternating Row Colors

    After changing the Color Scheme, observe the resulting effect as shown in Figure 69. Click on the Use Defaults button to reset all of the options on the Monitor Colors tab back to their default settings. Click on the Close button to close the Preferences screen. Figure 69.
  • Page 83: Figure 70. Monitor Window Trace List With The Trigger Line Centered

    Right-click in the trace list and select Go to | Trigger from the pop-up menu. Use the vertical scroll bar on the right side of the trace list to position the line containing the trigger into the middle of the window as shown in Figure 70.
  • Page 84: Figure 71. Monitor Options Preferences Screen

    Select the Tools | Preferences menu entry and the Preferences screen will appear. Click on the Monitor Options tab and move the Preferences screen to the middle of the Monitor window as shown in Figure 71. Figure 71. Monitor Options Preferences Screen Getting Started...
  • Page 85: Figure 72. Monitor Window Trace List With Trigger At Line Zero Numbering

    The Monitor Options tab allows configuration of other Monitor window display options. The Line Column option affects how the Line column in the trace list is displayed. When set to Starting from 1, the trace list rows will start at number one and increment sequentially. This is the default setting. When set to Trigger is line 0, the line containing the trigger will be zero, lines before the trigger will be negative, and lines after the trigger will be positive.
  • Page 86: Figure 73. Monitor Window Trace List With Trigger Is Time Zero Timestamps

    The Timestamp Start option operates in a similar fashion. When set to Starting from 0, timestamps will increment sequentially starting from the first trace list entry. This is the default setting. When set to Trigger is time 0, the line entry containing the trigger will have a timestamp of zero with lines before the trigger having a negative timestamp and lines after having a positive timestamp.
  • Page 87: Figure 74. Monitor Window Trace List With Relative Timestamps

    The Timestamp Display option affects how timestamps are calculated and displayed. When set to Absolute, the timestamp displayed for each entry is the absolute time relative to the start of bus traffic acquisition. This is the default setting. When set to Relative, the timestamp displayed for each entry is the elapsed time since the last transaction was recorded.
  • Page 88: Figure 75. Monitor Window Trace List Showing Addresses In Fe Mode

    Click on the Preferences screen Formats tab and position the screen to the right of the Monitor window as shown in Figure 75. The Formats tab controls how addresses in 7-bit mode will be displayed when shown in hex format. In FE mode, the LSB will always be zero and the 7-bits of address will be left-justified within the byte.
  • Page 89: Figure 76. Monitor Window Trace List Showing Addresses In 7F Mode

    Click on the 7F mode option and observe how the Addr column changes as shown in Figure 76. The addresses are effectively divided by two since the seven address bits are now displayed in a right-justified format within the byte. Click on the FE mode selection to return this setting to its default state. Click on the Close button to close the Preferences screen.
  • Page 90: Tutorial - Using Live Mode

    Tutorial – Using Live Mode By now you should have a firm grasp on the use of the I2C Exerciser’s Monitor window and basic bus tracing features. The following portion of this tutorial will provide you with an understanding of the use of the Debugger window which provides a facility for interactive communication with devices on the I C bus.
  • Page 91: Figure 79. Analyzer Supplied Mode Prompt

    When the I2C Exerciser is first used to interact with the bus in Live Mode (as you will do in the next step), it checks the electrical characteristics of the target bus to determine if there may be a possible conflict with the electrical settings of the current project.
  • Page 92: Figure 80. Debugger Window

    Step 2 – Send and Receive with Debugger Click on the Debugger icon in the shortcut bar on the far left side of the main window to open the Debugger window. Alternatively, you could select the Debugger entry from the Tools menu. The Debugger window will appear as shown in Figure 80 below.
  • Page 93: Figure 81. Byte Sent From The Debugger

    The text box in the bottom portion of the Send area is for entering debugger commands. An entry in this text box can be as simple as a single hexadecimal byte value to send. You can refer to the Interactive Debugger chapter later for more details on all of the commands.
  • Page 94: Figure 82. Receive Three Bytes In The Debugger

    Click on the Receive button now. The value FF will appear in the Receive area text box. Without a target attached to communicate with, this is the only value that should ever be received since the bus is floating high. Enter the number 3 in the Bytes field and then click on the Receive button again to tell the debugger to read three bytes.
  • Page 95: Figure 83. Capture Of Debugger Send

    Step 3 – Send While Monitoring In order to see the bus traffic that is being generated by the Debugger, you need to start the Monitor to collect data. Go to the Monitor window by clicking on its entry in the Shortcut Bar. Click on the Run Single button in the I2C Exerciser tool bar (indicated by the icon).
  • Page 96: Figure 84. Tutorial Script Loaded Into Debugger

    It is located in the “Demo” subfolder of the I2C Exerciser examples folder. For a default installation, this would be “C:\Corelis Examples\I2C Exerciser\Demo”. Find this subfolder and select the file named “tutorial.dcf” and then click on the Open button.
  • Page 97: Figure 85. Capture Of Debugger Script

    Click on the Send button to execute the script and the bytes sent will be echoed to the Receive area text box. Then return to the Monitor window to view the captured data. You will see in the trace list that the bytes were sent to various bus addresses as specified by the script.
  • Page 98: Figure 86. Set Discrete I/O Modes

    Step 4 – Manipulate Discrete I/O Signals Suppose that you want to use the I/O 1 and I/O 2 general purpose lines to stimulate a target device. To drive these signals, you must first set the discrete I/O modes to output. Open the Configuration Manager by clicking on its entry in the I2C Exerciser’s Tools menu and then click on the Settings tab.
  • Page 99: Figure 87. Debugger Discrete I/O Script

    Set the script to execute twice by entering a 2 in the Run field. Then click on the Send button to execute the script. The contents of the Debugger window should appear as shown in Figure 87 below. Click on the Monitor entry in the Shortcut Bar to return to the Monitor window.
  • Page 100: Figure 89. Debugger Close

    Step 5 – Close the Debugger Click on the Stop button in the I2C Exerciser tool bar (indicated by the icon) to stop the Monitor from collecting data. Return to the Run Status tab on the Monitor Tools window that was opened when data capturing started—you may have to restore it from minimized state if you had minimized it earlier.
  • Page 101: Figure 90. Smbus Raw Data

    “Demo” subfolder of the I2C Exerciser examples folder. For a default installation, this would be “C:\Corelis Examples\I2C Exerciser\Demo”. From the Monitor window, click on the File menu and then click on Open Trace Data… Note that there is also a tool bar button for this. Browse to the “Demo” folder mentioned above and select the file “tc74.tdf.”...
  • Page 102: Figure 91. Smbus Pane Before Associating Decoder File

    The raw data shown was collected while communicating with a simple temperature sensor (Microchip TC74 Tiny Serial Thermal Sensor). In order to understand the messages, you need to use an SMBus decoder file containing protocol information for this device. Click on the Tools menu and then click on Configuration Manager… Then click on the SMBus tab to display the SMBus configuration pane shown in Figure 91 below Figure 91.
  • Page 103: Figure 92. Smbus Decoder File Dialog With Tc74 Information

    “Decoder” subfolder of the I2C Exerciser examples folder. For a default installation, this would be “C:\Corelis Examples\I2C Exerciser\Decoder”. Browse to this folder and select the file named “tc74.smb.” Then click on the Select button and the File field of the SMBus Decoder File dialog window will be filled in.
  • Page 104: Figure 93. Switch To Smbus Mode

    Now back in the Monitor window, right-click in the Data Byte column heading and click on the SMBus Mode menu item as shown in Figure 93 below. SMBus messages in the Data Byte column will now be decoded for you as well as the device name in the Addr column as shown below in Figure 94. Figure 93.
  • Page 105: Figure 95. Decoded Smbus Message Tooltip

    placing your mouse pointer over the line 18 Data Byte column entry for several seconds as shown in Figure 95 below. Figure 95. Decoded SMBus Message ToolTip You can also open up a window containing the full decoded SMBus message by clicking on the Data Byte column entry.
  • Page 106 This completes the I2C Exerciser tutorial. Please refer to chapters 5 and on for more detailed information on the I2C Exerciser graphical user interface. Getting Started...
  • Page 107: Chapter 4 Connecting To A Target

    Chapter 4 Connecting to a Target CAS-1000-I2C analyzer connection instructions and pin assignments Connecting the I C Signals The CAS-1000-I2C connects to the target’s I C bus through the RJ45 socket on the front panel labeled Serial Bus. This connector provides access to the I C bus and discrete I/O signals.
  • Page 108: Figure 97. Rj45 Connector Pin Numbering

    Figure 97. RJ45 Connector Pin Numbering The 4-pin crimp cable connects to targets that have a 4-pin I C header compatible with the Philips demo board. The cable is designed to mate with Molex part number 22-23-2041 or equivalent. Table 3 shows the pin assignments of this cable.
  • Page 109: Interface Setup

    Interface Setup Aside from setting up the physical connections between the CAS-1000-I2C and the target I C bus, it is important to set up various configuration options in the I2C Exerciser application so that the CAS-1000- I2C is ready to interface properly with the bus and commence traffic collection and viewing with minimal complications.
  • Page 110: Figure 98. Configuration Manager

    Scenarios The following scenarios are presented to help you configure the CAS-1000-I2C analyzer to get it up and running in the shortest amount of time. Most setup options are found in the Settings pane of the Configuration Manager, as shown in Figure 98. The Configuration Manager can be opened from the I2C Exerciser’s menu bar by selecting Tools | Configuration Manager…...
  • Page 111: Figure 99. Analyzer Supplied Voltage Prompt

    Scenario 1: New/Changed Target A scenario such as this occurs when the I2C Exerciser is launched without a previously saved project file or if File | New Project is selected from the menu bar. Case 1: The target supplies its own pull-up voltage This is the most common case, and you usually need only verify that the intended pull-up voltage setting is correct so that appropriate bus signal thresholds are used.
  • Page 112: Figure 100. Configuration Manager Analyzer Supplied

    Click on the Yes button to allow the application to automatically switch to “Analyzer Supplied” from the “Target Supplied” setting and the Configuration Manager will open for you to review the new settings. Additionally, you can select the desired bus pull-up resistance and voltage, as well as change the settings described in Case 1 above.
  • Page 113 Auto Detect At any time, you may have the I2C Exerciser check for a voltage on the target bus and automatically pick recommended default electrical settings for you by clicking on the Auto Detect button in the Configuration Manager Settings pane. Scenario 2: Previously Tested Target This scenario occurs when you load a previously saved project file either during launch of the application or by selecting File | Open Project from the menu bar.
  • Page 114: Figure 101. Configuration Manager Settings Pane

    Setting Details All of the CAS-1000-I2C settings that are of principal concern when connecting to a target can be found in the Settings pane of the Configuration Manager, shown in Figure 101. This can be opened by pressing <F8> or selecting Tools | Configuration Manager from the menu bar, and then selecting the Settings tab.
  • Page 115: Figure 102. Bus Electrical Features

    Bus Electrical Features The Bus Electrical Features group, shown in Figure 102, specifies the electrical characteristics of the bus. Figure 102. Bus Electrical Features Voltage Source: Target Supplied – Specifies that the connected target I C bus has its own pull-up voltage supply. In this case, the target bus is self-sufficient and ready for use.
  • Page 116: Figure 103. Bus Drive And Monitoring Features

    Bus Drive and Monitoring Features The Bus Drive and Monitoring Features group of settings, shown in Figure 103, specify the clock rate, accelerated rising edge drive, collision detection, and high-speed mode options for the CAS-1000-I2C when it is driving the target bus. Figure 103.
  • Page 117: Figure 104. Input/Output Signals

    Input/Output Signals The discrete Input/Output signals (I/O 1 and I/O 2) augment the normal I C bus signals (SDA and SCL) to support sensing or stimulation of a connected target or to support synchronization with external instruments. They can be individually steered as outward or inward signals and mapped to the SMB connectors (AT1 and AT2) on the CAS-1000-I2C.
  • Page 118: Figure 105. Monitor Buffer Options

    Monitor Buffer Options Monitor Buffer Depth – The Monitor Buffer Depth setting, shown in Figure 105, allows the user to select the buffer depth specified by the number of transactions. This value indicates the number of transactions that occur before the monitor trace is considered to be full. Figure 105.
  • Page 119: Chapter 5 Bus Traffic Monitor

    Chapter 5 Bus Traffic Monitor Monitor window overview and component descriptions The Monitor window is the primary information display of the I2C Exerciser. Data that is passively collected from the target I C bus by the CAS-1000-I2C analyzer is presented in both a trace listing and a graphical timing representation.
  • Page 120: Trace Listing

    Trace Listing The trace listing, located in the top portion of the Monitor window, provides the fundamental presentation of traffic acquired from the target I C bus. Each row is considered to represent a transaction which describes a complete read/write address or data byte sequence that is conveyed over the bus. All of the transaction details are included as columns in the listing.
  • Page 121 Type – This column contains an identifier that indicates one of the two major classes of transactions:  Address – The I C bus transaction cycle during which a START or repeated START condition leads to the shifting of a transfer address for a target slave device and write or read qualifier onto the bus.
  • Page 122 I/O 1 – This column indicates the state of discrete I/O line 1 during the transaction. I/O 2 – This column indicates the state of discrete I/O line 2 during the transaction. Data Byte – This column indicates the data byte values conveyed to or from the target slave device by the transaction.
  • Page 123: Timing Field

    Timing Field The timing field located in the bottom portion of the Monitor window provides a graphical image of bus signal edge transitions over time. This information is similar to that acquired by logic analyzers, showing the state progression of clock (SCL) and data (SDA) signals. Figure 108 shows the Monitor timing field with its major components labeled.
  • Page 124  W/R – Designates the transfer direction indicator bit. During an address cycle, either a “W” is shown meaning that a master is writing data to a target slave device or an “R” is shown meaning that a master is reading data from a target slave device. Scale controls –...
  • Page 125: Figure 109. Timing Field Popup Menu

    Timing Field Popup Menu The Timing Field Popup Menu is accessed by right-clicking in the waveform area of the timing field window as shown in Figure 109. It provides various functions to help users to navigate and examine the waveform display. Figure 109.
  • Page 126: Monitor Configurations

    Monitor Configurations Various configuration options relevant to the Monitor Window can be specified by opening the Configuration Manager from the Tools menu. The Configuration Manager can be used to configure the Filters, Symbols, and SMBus features which are applicable to use of the Monitor Window. Filters A filter defines a class of transactions by specifying a set of particular transaction features.
  • Page 127: Figure 110. Filters Pane

    Figure 110. Filters Pane Filters can either define transactions that will be included in the trace listing or excluded from the trace listing. The radio buttons at the top of the dialog determine this selection or turn off filtering completely. The Include and Exclude selections each have their own separate set of filters which are displayed in the dialog’s list box.
  • Page 128: Figure 111. Filter Definition Dialog (Similar To Edit)

    Figure 111. Filter Definition Dialog (similar to Edit) Bus Traffic Monitor...
  • Page 129: Figure 112. Symbols Pane

    Symbols This dialog, shown in Figure 112, displays a list that can contain symbolic text strings along with associated parameters that specify the criteria which determine where the symbolic text will replace a numeric value in the trace listing and other related dialogs. This can be used to enhance the user readability of transactions.
  • Page 130: Figure 113. Symbol Definition Dialog

    Using the Add button beneath the list box, a new symbol can be defined and appended to the list. The Edit button allows alteration of an existing selected symbol definition. The Remove and Remove All buttons enable the deletion of a selected symbol definition or the entire list of symbol definitions. The Symbol Definition dialog that is displayed when using the Add or Edit buttons is shown in Figure 113.
  • Page 131: Figure 114. Smbus Pane

    SMBus This dialog, shown in Figure 114, shows a list of associations between bus addresses and SMBus devices. Device entries shaded gray are reserved by the SMBus Specification (v. 2.0). Those devices cannot be removed, but their associated addresses can be re-associated with a different device if necessary.
  • Page 132: Figure 115. Smbus Decoder File Dialog

    Each entry in the device list box contains the device name, bus address value, and the decoding file. The device name is the name of the SMBus device that is associated with the address value and will be displayed in the Address column of the trace listing. The bus address value specifies the slave address that is being associated.
  • Page 133: Monitor Preferences

    Monitor Preferences Preferences relevant to the Monitor Window can be selected by opening the Preferences dialog from the Tools menu. The Preferences dialog can be used to specify the monitor colors and other monitor options, as well as address format. Monitor Colors This pane enables altering of the colors of the trigger and cursor backgrounds and text in the trace listing.
  • Page 134 Trigger – Changes the text and background color of the Trigger trace listing Cursor A – Changes the text and background color of the cursor marked “A” in the Timing Field Cursor B – Changes the text and background color of the cursor marked “B” in the Timing Field Timing View –...
  • Page 135: Figure 117. Monitor Options Pane

    Monitor Options This pane enables the altering of preferences for the layout and style of data in the Monitor window. Figure 117. Monitor Options Pane Line Column – Sets the numbering of entries in the trace list to start from one at the first entry (default) or start from zero at the trigger, with earlier transactions being negative.
  • Page 136: Figure 118. Formats Pane

    Other Options – The first preference sets whether or not a prompt to save data pops up whenever the trace list will be cleared. The second preference allows the Timing display to be locked to the trace screen (on the first line), rather than aligning with the selected line. START Hold Time Checking –...
  • Page 137: Monitor Trigger

    Monitor Trigger A trigger defines a set of criteria to be compared against the transactions captured by the Monitor. When a match occurs, a trigger transaction marker will appear on the Monitor’s trace listing and the capturing process stops when the triggering transaction reaches a user-specified position in the buffer. In addition, a trigger out signal can be generated through one of the I/O lines when the match occurs so that external third-party tools can be triggered for further data capturing and analysis.
  • Page 138: Table 4. Summary Of Available Trigger Components

    There are two special states in the Trigger definition tree. START is the default state in which the state machine begins when I2C data collection begins. TRIGGER is the ending state, which causes the triggering actions to occur. Between the START and TRIGGER states, there are one or more intermediate states, which have conditional branches to check for matching events and perform actions accordingly.
  • Page 139 event condition at the current state of the Trigger state machine. Then actions specified in the matching IF/ELSE/THEN branch are executed. The following items are available criteria of an event and their possible values. If any of these conditions are not specified, they are considered as “don’t-care”. For example, if the TxType (transaction type) is not specified and an Address value of “A2”...
  • Page 140 Pulse IO – Generates a pulse signal to one of the I/O lines. The pulse can be either “ActiveHigh”, which generates a high and then low signal, or “ActiveLow”, which generates a low and then high signal. The width of the pulse is about 0.5 ms, and the typical delay between the actual trigger event on the bus and the trigger out pulse is approximately 1.6 ms.
  • Page 141: Figure 120. Trigger On Single Event

    Examples The following sections present some examples to describe how the components described in the previous sections can be integrated together to design various triggering sequences. Scenario 1) Trigger on Single Event Goal: Trigger when Event A occurs Figure 120. Trigger on Single Event START: [Action] Go to State 1;...
  • Page 142: Figure 121. Trigger On Repeated Single Event

    Scenario 2) Trigger on Repeated Single Event Goal: Trigger when Event A occurs 3 times in total Figure 121. Trigger on Repeated Single Event START: [Action] Set counter C1 = 3; [Action] Go to State 1; State 1: If C1 > 1 and Event A happens [Action] Decrement C1 by 1 and Stay at State 1 Else If C1 = 1 and Event A happens [Action] Go to TRIGGER;...
  • Page 143: Figure 122. Trigger On Sequence Of Multiple Events

    Scenario 3) Trigger on Sequence of Multiple Events (Not Necessarily Consecutive) Goal: Trigger when Event A occurs and then Event B occurs eventually Figure 122. Trigger on Sequence of Multiple Events START: [Action] Go to State 1; State 1: If Event A happens [Action] Go to State 2;...
  • Page 144: Figure 123. Trigger On Consecutive Sequence Of Events

    Scenario 4) Trigger on Consecutive Sequence of Events Goal: Trigger when Events A and B occurs consecutively Figure 123. Trigger on Consecutive Sequence of Events START: [Action] Go to State 1; State 1: If Event A happens [Action] Go to State 2; Else [Action] Do nothing;...
  • Page 145: Figure 124. Trigger Dialog

    Trigger Dialog The following is list of GUI components in Trigger dialog and their descriptions. Mode selection – Enable or disables the Trigger operation. The Trigger definition can be edited only when it is disabled. New… button – Launches the “Create New Trigger” dialog, which provides a list of Trigger templates that can be used as the basis for creating a new Trigger.
  • Page 146: Figure 125. Context Popup Menu On Trigger Definition Tree

    Designing a Trigger The Trigger feature is in design mode when the Disable Trigger (Design Mode) option is selected on the Trigger dialog. In this mode, if a node in the Trigger definition tree is right-clicked, a context popup menu will appear as shown in Figure 125.
  • Page 147: Figure 126. Create New Trigger Dialog

    In order to provide an easy starting point for designing a new trigger definition, the Create New Trigger dialog is provided. When the New button is clicked at the Trigger dialog, the dialog will appear as shown in Figure 126. This dialog lets you browse and select from sample templates, which can be used as the basis for creating a new trigger definition.
  • Page 148 Activating Trigger The Trigger feature is activated when the Enable Trigger option is selected at the Trigger dialog, and the Monitor is running. When I2C Exerciser is collecting bus data in Run Single mode and the Trigger is disabled, the capturing process will stop automatically once the buffer becomes full.
  • Page 149: Figure 127. Active Trigger Operation Status

    Figure 127. Active Trigger Operation Status Bus Traffic Monitor...
  • Page 150: Monitor Window Reference

    Monitor Window Reference The Monitor window, shown in Figure 128, can be opened using the either the Monitor entry in the Shortcut Bar or in the Tools menu. By default, the Monitor window is opened when the I2C Exerciser starts. Table 5 describes the numbered areas of the I2C Exerciser Monitor window. Figure 128.
  • Page 151: Figure 129. Monitor File Menu

    Monitor Menu Bar When the Monitor window is active, the Menu Bar provides accesses to relevant functions including File, Trace, Tools, Windows and Help. A description of each menu follows. Monitor File Menu The File menu shown in Figure 129 includes commands to load and save projects and trace data. The entries on this menu are described below.
  • Page 152: Figure 130. Monitor Trace Menu

    Monitor Trace Menu The Trace menu as shown in Figure 130 is used to access various trace buffer functions including run/stop control, buffer navigation, data layout and display formats, filter and trigger management setup, and clearing of trace data or line tags. These menu entries are described below. Figure 130.
  • Page 153: Figure 131. Trace | Execute Submenu

    Trigger… – Provides access to the Trigger dialog allowing the user to view or edit the trigger condition. The trigger defines conditions to mark a special transaction event in the trace buffer. The Trigger function is described earlier in this chapter. Symbols…...
  • Page 154: Figure 132. Run Status Tab On Monitor Tools Window

    Run Status Tab When the Monitor window is started via the Run or Run Repetitive command, the Run Status tab will appear to provide status about events and progress. If a Trigger is active, it will notify you when the trigger condition has been met.
  • Page 155: Figure 133. Trace | Go To Submenu

    Trace | Go To Submenu The Trace | Go To submenu shown in Figure 133 provides navigation control for the Monitor window trace buffer. Figure 133. Trace | Go To Submenu Trigger – Causes the quick positioning of visible trace lines to bring the Trigger into view at the top of the screen.
  • Page 156: Figure 134. Trace | View Submenu

    Trace | View Submenu The Trace | View submenu shown in Figure 134 provides data view mode control for the Monitor window Data Byte column. Figure 134. Trace | View Submenu Normal Mode – Causes the Data Byte column display to switch to the default Normal mode. When using Normal mode, the Data Byte column simply indicates the raw data byte values conveyed to or from a target slave device during a transaction, one byte per trace listing line.
  • Page 157: Figure 135. Monitor Find Dialog - Regular

    Find Function You can use the Find function to search for entries in the trace buffer matching user specified criteria. Figure 135 and Figure 136 show the regular and compact version of the Find dialog box. The regular (full- size) dialog allows the user to configure the various transaction search conditions, including don’t-care entries.
  • Page 158 Each of the Find window search criteria fields is described below. Type – Indicates that either an address or data transaction is being searched for. Select Any to specify “don’t-care.” Addr (Hex) – Specifies the address of interest. Select Any to specify “don’t-care”. If a 7-bit address is being entered, the hex address value should be entered properly according to the current “FE mode”...
  • Page 159: Figure 137. Trace Layout Dialog

    Trace Layout The Trace Layout dialog shown in Figure 137 controls which columns will be displayed in the trace listing. The dialog also allows you to restore the factory defaults for column widths, visibility, and order. Figure 137. Trace Layout Dialog Bus Traffic Monitor...
  • Page 160: Figure 138. Tools Menu

    Monitor Tools Menu The Tools menu shown in Figure 138 provides a path to the major application function windows. Figure 138. Tools Menu Monitor – Launches the Monitor window which provides acquisition and viewing of bus traffic transactions. Debugger – Launches the Debugger window which provides interactive sending and receiving of messages to and from the bus.
  • Page 161 Calibration – Launches an automated tool that calibrates the CAS-1000-I2C electrical outputs in order to improve analyzer supplied voltage source settings. Configuration Manager – Invokes the Configuration Manager window which allows the user to configure numerous system-wide settings including filters, symbols, SMBus, hardware options, and project files. Preferences –...
  • Page 162: Figure 139. Monitor Window Menu

    Help Topics – Invokes the I2C Exerciser online help system and displays a list of available help topics. Technical Support / Corelis Forum / Corelis on the Web – Opens support, forum, and Corelis Web page using the default Web browser.
  • Page 163: Figure 141. Monitor Tool Bar

    Monitor Tool Bar The Monitor Tool Bar shown in Figure 141 provides quick single-click access to commonly used commands in the Monitor window. Simply click on the tool bar button to perform the desired command. Table 6 describes the tool bar functions. Positioning the mouse cursor over each tool bar button will also display a pop-up “tooltip”...
  • Page 164: Table 6. Monitor Tool Bar Functions

    Icon Name Function Description Clear Trace Data Deletes all of the trace buffer contents and clears the trace list and timing display. If the current data has not yet been saved, you will be prompted to save it. This prompt can be disabled from the Tools | Preferences | Monitor Options screen.
  • Page 165 Bus Traffic Monitor...
  • Page 166: Chapter 6 Interactive Debugger

    Chapter 6 Interactive Debugger Debugger window overview and component descriptions The Debugger window provides a direct read/write interactive interface with the target I C bus. Unlike the Monitor window where the CAS-1000-I2C is passively monitoring the bus, the Debugger can be used to perform simple message transfers both to and from slave devices.
  • Page 167: Send Data

    Send Data The left side of the Debugger window contains controls for generating messages that write data to slave devices on the target I C bus. These controls are shown in Figure 143. Figure 143. Debugger Send Controls Addr – This field specifies the I C bus address of the target slave that is being written to.
  • Page 168 No Stop – This check box specifies whether a STOP condition is generated at the end of a message. When unchecked (default), the STOP condition is included after all of a message’s data bytes have been written. Checking this box causes the STOP condition to be omitted. Under the I C bus protocol, absence of the STOP condition means that a master is not yet done transmitting.
  • Page 169: Receive Data

    Receive Data The right side of the Debugger window contains controls for generating messages that read data from slave devices on the target I C bus. These controls are shown in Figure 144. Figure 144. Debugger Receive Controls Addr – This field specifies the I C bus address of the target slave that is being read from.
  • Page 170 read. Checking this box causes the STOP condition to be omitted. Under the I C bus protocol, absence of the STOP condition means that a master is not yet done transmitting. The previous data transfer can then be followed by a repeated START condition and another data transfer. This can be used to support some slave devices which require that the first data transfer specify the value of an offset register (or a command) and then the following data is read from (or written to) the device at that offset location.
  • Page 171: Debugger Script

    Debugger Script The large text area constituting the bottom portion of the Debugger’s Send controls is used to specify the byte values that are written to target slave devices. This text field also supports the use of special commands that can override the settings of the other Send controls as well as insert pauses in the message transmission sequence, manipulate the CAS-1000-I2C analyzer’s two discrete I/O lines, or activate Error Injection.
  • Page 172: Table 7. Debugger Script Keywords

    Keyword Example Description ADDRESS ADDRESS 3A Indicates that the send address should change to the 7-bit address specified by the following hex value parameter. This command modifies the value of the Send-side Addr combo box. Note that 7-bit I C addresses are represented as 8-bit hexadecimal values and their format is dependant on the current address mode setting (FE mode or 7F mode).
  • Page 173 Example Debugger Script Command Text File Below is an example debugger script that might be used to load an EEPROM with some values in part of its first page of memory and wiggle one of the discrete I/O signals while processing. // ADDRESS_MODE: FE // fill 24AA16 eeprom // page 0...
  • Page 174: Error Injection

    Error Injection The Debugger can be used to insert intentional errors into sent data. This feature is often used to cause C protocol violations on the bus in order to test the bus devices’ handling of error conditions and how well these devices recover from the errors.
  • Page 175: Table 8. Debugger Error Injection Keywords

    Keyword Description BAD_START_ADDR Causes the timing of the SDA and SCL edges to be reversed during conveyance of the START condition. NO_ACK_ADDR Causes the address cycle ACKnowledge bit to be skipped. NO_ACK_DATA Causes the data cycle ACKnowledge bit to be skipped. LONG_ADDR Lengthens the address cycle by causing one extra bit to be sent during the cycle (ie.
  • Page 176: Debugger Options

    Debugger Options The preferences relevant to the Debugger window can be specified by accessing the Debugger Options pane of the Preferences dialog. Open the Preferences dialog by pressing F7 or by selecting Preferences from the Tool menu. When the Preferences dialog appears, choose the Debugger Options tab, as shown in Figure 145.
  • Page 177 Echo Sent Data – If selected, data sent by the CAS-1000-I2C is echoed in the Receive-side text box along with all other incoming traffic during the send operation. This option is available only when the Track Transaction option is enabled. Abort Message if Address is NAK’d –...
  • Page 178: Debugger Window Reference

    Debugger Window Reference The Debugger window, shown in Figure 146, can be opened using the either the Debugger entry in the Shortcut Bar or in the Tools menu. Table 9 describes the numbered areas of the I2C Exerciser Debugger window. Figure 146.
  • Page 179: Figure 147. Debugger File Menu

    Debugger Menu Bar When the Debugger window is active, the Menu Bar contains entries relevant to the Debugger functions including File, Tools, Windows and Help. A description of each menu follows. Debugger File Menu The File menu shown in Figure 147 includes options to load and save projects and debugger command files as well as an option to save debugger data from the Debugger window’s Receive section.
  • Page 180: Figure 148. Debugger Tool Bar

    Debugger Window Menu The Window menu manages the various windows of I2C Exerciser and is identical to the Monitor Window Menu described in the Bus Traffic Monitor chapter. Debugger Help Menu The Help menu accesses the on-line help features and is identical to the Monitor Help Menu described in the Bus Traffic Monitor chapter.
  • Page 181 Interactive Debugger...
  • Page 182: Chapter 7 Serial Eeprom Programmer

    Chapter 7 Serial EEPROM Programmer Programmer Window Overview and component descriptions The Programmer Window provides an interface specifically tailored for convenient interaction with standard I C EEPROM devices on the target I C bus. It enables file-linked programming and viewing of the content of such devices.
  • Page 183: Programmer Operations

    Programmer Operations The Programmer window shown in Figure 149 can be accessed from the Tools | Programmer entry in the menu bar or from the Programmer icon in the shortcut bar. It allows the user to program most common I C EEPROM devices using a common data file format such as a Motorola S Record file, Intel Hex file, or a text file containing a list of hex values.
  • Page 184: Table 11. Programmer Function Descriptions

    Component Description Manufacturer combo box Specifies the manufacturer of the I C EEPROM device to be programmed. Most devices can be programmed as a “Generic” manufacturer device if they are compatible with the ATMEL 24xxXXX series of I C EEPROM devices. Type combo box Specifies the type of the EEPROM device to program.
  • Page 185: Figure 150. Programmer Read Window

    Read Button The Read button opens the Read Contents window shown in Figure 150. This allows the user to examine the memory content of the I2C EEPROM device without dumping the entire data to a file. The components of the Read Contents window are described Table 12.
  • Page 186: Figure 151. Programming Progress Window

    Program Button The Program button allows the user to program and verify the I2C EEPROM device. With a single click on the button, the I2C Exerciser will program the device using the specified data file. If the Preferences is set to verify after programming (see the Programmer Options section of this chapter), the I2C Exerciser will automatically verify that the data is written to the device by performing a read.
  • Page 187: Programmer Options

    Programmer Options The user can change Programmer options by accessing the Programmer Options pane of the Preferences dialog. To open the Preferences dialog, press F7 or select Preferences… from the Tools menu. Once the Preferences dialog appears, select the Programmer Options pane as shown in Figure 154.
  • Page 188: Programmer Window Reference

    Programmer Window Reference The Programmer window, shown in Figure 155, can be opened using the either the Programmer entry in the Shortcut Bar or in the Tools menu. Table 13 describes the numbered areas of the I2C Exerciser Programmer window. Figure 155.
  • Page 189: Figure 156. Programmer File Menu

    Programmer Menu Bar When the Programmer window is active, the Menu Bar contains entries relevant to the Programmer functions including File, Tools, Windows and Help. A description of each menu follows. Programmer File Menu The File menu shown in Figure 156 includes commands to load and save projects and programmer configuration files as well as a command to save a dump of the data from a device.
  • Page 190: Figure 157. Programmer Tool Bar

    Programmer Tools Menu The Tools menu provides a path to the major application function windows. This is identical to the Monitor Tools Menu selections in the Bus Traffic Monitor chapter. Programmer Window Menu The Window menu manages the various windows of I2C Exerciser and is identical to the Monitor Window Menu in the Bus Traffic Monitor chapter.
  • Page 191 Serial EEPROM Programmer...
  • Page 192: Chapter 8 Configuration And Preferences

    Chapter 8 Configuration and Preferences Configuration Manager and Preferences dialogs overview and component descriptions Configuration Manager The Configuration Manager allows the user to change the setting for the various tools provided by the I2C Exerciser in one easily accessible location. The user can access certain Configurations Manager tabs directly from some of the tools such as the Filters and Trigger toolbar in the Monitor window.
  • Page 193: Figure 158. Configuration Manager Dialog Panes (Settings Selected)

    The Configuration Manager dialog, shown in Figure 158, enables selection of various settings controlling the behavior of the CAS-1000-I2C/E and I2C Exerciser. The user can access the Configuration Manager using the Tools menu. The major features are grouped under separate panes of this dialog. These panes are listed in Table 15 and described on the following pages.
  • Page 194: Table 15. Configuration Manager Panes

    Function Description Filters Establishes the criteria for one or more filters that determine what transactions will be included or excluded from the trace listing. Symbols Establishes the criteria for transactions that will have their particular address or data byte value replaced by a specified text string symbol. SMBus Establishes the associations between bus addresses and SMBus devices using files containing SMBus decoding information.
  • Page 195: Figure 159. Filters Pane

    Figure 159. Filters Pane Filters can either define transactions that will be included in the trace listing or excluded from the trace listing. The radio buttons at the top of the dialog determine this selection or turn off filtering completely. The Include and Exclude selections each have their own separate set of filters which are displayed in the dialog’s list box.
  • Page 196: Figure 160. Filter Definition Dialog (Similar To Edit)

    Figure 160. Filter Definition Dialog (similar to Edit) Configuration and Preferences...
  • Page 197: Figure 161. Symbols Pane

    Symbols Pane This dialog, shown in Figure 161, displays a list that can contain symbolic text strings along with associated parameters that specify the criteria which determine where the symbolic text will replace a numeric value in the trace listing and other related dialogs. This can be used to enhance the user readability of transactions.
  • Page 198: Figure 162. Symbol Definition Dialog

    Using the Add button beneath the list box, a new symbol can be defined and appended to the list. The Edit button allows alteration of an existing selected symbol definition. The Remove and Remove All buttons enable the deletion of a selected symbol definition or the entire list of symbol definitions. The Symbol Definition dialog that is displayed when using the Add or Edit buttons is shown in Figure 162.
  • Page 199: Figure 163. Smbus Pane

    Figure 163. SMBus Pane Configuration and Preferences...
  • Page 200: Figure 164. Smbus Decoder File Dialog

    Each entry in the device list box contains the device name, bus address value, and the decoding file. The device name is the name of the SMBus device that is associated with the address value and will be displayed in the Address column of the trace listing. The bus address value specifies the slave address that is being associated.
  • Page 201: Figure 165. Settings Pane

    Settings Pane This dialog, shown in Figure 165, allows setting of the various electrical and bus features of the analyzer. There are some settings that depend on others and may be grayed out accordingly. All of the controls present in the Settings pane are detailed below. Figure 165.
  • Page 202 Target Supplied – Specifies that the connected target I C bus has its own pull-up voltage supply. In this case, the target bus is self-sufficient and ready for use. When this setting is selected, the Pull-up Resistance setting is disabled. Analyzer Supplied –...
  • Page 203 Accelerated Rising Edge Drive – In general, when a driver on the bus makes a positive signal transition, the rise-time is determined by the RC time-constant of the bus. The rise-time governs the upper limit on effective clock rates. When the CAS-1000-I2C drives the bus, it can apply a strong rising drive during the signal transition to overcome the RC time-constant, creating a rapid edge.
  • Page 204 will be prompted to overwrite them. While running, the Monitor Window displays the most recent 1M transactions of data, and the Run Status tab on the Monitor Tools window lists the name of the trace data file currently being logged to. After finishing capturing, you may double-click on the listed filenames to load the trace data to the Monitor Window.
  • Page 205: Figure 166. Files Pane

    Figure 166. Files Pane Target Slaves Pane Target Slaves Pane shown in Figure 167 contains a list of the slaves that exist on the target bus. These are a combination of user-entered and/or automatically detected slaves. The latter is collected by using the Auto-Detect button located on the left side, beneath the list of slaves.
  • Page 206: Figure 167. Target Slaves Pane

    Clicking on the Auto-Detect button will initiate an automatic sequence of read transactions for every valid (and non-emulated) I2C bus address. Devices that acknowledge the read transaction make their presence known. Any user-entered slaves that are in the list will have “YES” entered into their Verified columns if they are detected.
  • Page 207 Timing Skew Pane The Timing Skew feature enables the analyzer to adjust its waveforms when it communicates with the target using master emulation or the debugger. According to the options and values set in this pane, shown in Figure 168, the phase between SDA and SCL are caused to shift later or earlier than normal. This is a useful deviation from normal bus communications as a means of stressing a particular slave with regard to signal edge timings (such as setup and hold times).
  • Page 208: Figure 168. Timing Skew Pane

    Figure 168. Timing Skew Pane Configuration and Preferences...
  • Page 209: Preferences Dialog

    Preferences Dialog The Preferences Dialog allows the user to change the preferences for the various tools provided by the I2C Exerciser in one easily accessible location. The user can access the last used Preferences tab by using the Tools | Preferences menu command accessible from all windows. The user can use the Preferences dialog to set the preferences for the monitor colors, monitor options, debugger options, programmer options, and formats.
  • Page 210: Figure 170. Monitor Options Pane

    Monitor Options This pane enables the altering of preferences for the layout and style of data in the Monitor window. Figure 170. Monitor Options Pane Line Column – sets the numbering of entries in the trace list to start from one at the first entry (default) or start from zero at the trigger, with earlier transactions being negative.
  • Page 211: Figure 171. Debugger Options Pane

    Other Options – The first preference sets whether or not a prompt to save data pops up whenever the trace list will be cleared. The second preference allows the Timing display to be locked to the trace screen (on the first line), rather than aligning with the selected line. START Hold Time Checking –...
  • Page 212: Figure 172. Programmer Options Pane

    Programmer Options This pane enables setting of whether or not the Programmer performs a verification of written data after programming a device. Figure 172. Programmer Options Pane Configuration and Preferences...
  • Page 213: Figure 173. Formats Pane

    Formats This pane enables selection of how a 7 binary bit address representation is formatted for hexadecimal display (does not apply to 10-bit addresses or to non-hex representations such as symbolic). The FE format (default) shows the hexadecimal byte value with the 7 address bits left-justified in the byte. The 7F format shows the 7 address bits right-justified in the byte.
  • Page 214: Using Project Files

    Using Project Files When the I2C Exerciser saves and loads project files, it saves and loads all of your customized settings and preferences with these files. It is recommended that you become familiar with this feature and make use of it as much as possible. This functionality allows you to save an environment that you have set up for a particular target bus, debugging session, or test routine, and then load up that environment whenever needed.
  • Page 215: Figure 175. Title Bar For A Saved Project

    Once you have saved a project to a file, the title bar will display the current project file name as shown in Figure 175. Figure 175. Title Bar for a Saved Project The project settings are saved in a file with “.i2c” extension. Along with this main *.i2c file, several secondary files are created and associated with the project whenever you create a new project.
  • Page 216: Calibration

    Calibration The CAS-1000-I2C includes a calibration feature to fine-tune its electrical outputs since the pull-up voltage and resistance that it is able to provide to a target bus can vary from unit to unit or even across different host USB busses. Each installation of the I2C Exerciser maintains a separate collection of calibration data for every CAS-1000-I2C that it operates.
  • Page 217: Figure 179. Calibration Status

    Upon clicking the OK button, calibration will proceed through four steps: analyzer supplied bus voltages, discrete I/O line output voltages, SCL pull-up resistors, and SDA pull-up resistors. The progress of each step is reported in the Calibration Status window as shown in Figure 179. When all steps have completed successfully, the status window may be closed by clicking on the Done button as shown in Figure 180 and the calibrated CAS-1000-I2C is ready for use.
  • Page 218 Configuration and Preferences...
  • Page 219: Chapter 9 Third Party Application Interface

    Chapter 9 Third Party Application Interface Description of using the CAS-1000-I2C with third party software Overview The CAS-1000-I2C provides the ability to operate some of its features by using function calls from third party software. In this manner, such applications can access the connected I C bus of the target, including observing its traffic, interacting with it, and performing bus measurements.
  • Page 220: Dynamic Link Library (Dll)

    LabVIEW, Python, Microsoft Visual C++, and Visual Basic are provided in the I2C_DLL example folder, which is located at “C:\Corelis Examples\I2C Exerciser\I2C_DLL”. Note that the DLL is a 32-bit version and can be used with 32-bit versions of programs only.
  • Page 221: General Calling Sequence

    General Calling Sequence Certain DLL function calls are required to properly initiate, setup, operate, and shut down the CAS-1000- I2C. This sequence of calls is summarized as follows: I2C_InitHardware // required connection to PC USB port + loading logic and firmware I2C_LoadSetup // optional…...
  • Page 222: Function Reference

    Function Reference Function Description I2C_ConfigureDiscretes Overwrites several configuration parameters relating to configuring the two discrete I/O lines. I2C_DisableCollisionDetection Enables an analyzer mode which ignores bus collision conditions when it is driving the bus (Debugger Send or Master Emulation or Test). I2C_DisableTxTracking Turns off the transmission tracking feature.
  • Page 223: Table 17. I2C Dll Functions

    Function Description I2C_SetBusLowVoltageThreshold Overwrites configuration receiver low threshold voltage with provided value. I2C_SetBusPullupResistance Overwrites configuration pull-up resistor value for both bus signals with provided value. I2C_SetBusVoltageSource Selects the bus reference voltage source as either provided by the target or by the analyzer programmable level. I2C_SetClockRate Overwrites configuration SCL rate with provided value when the analyzer is driving the bus.
  • Page 224 I2C_ConfigureDiscretes Overwrites several configuration parameters related to driving the two discrete I/O lines. This includes setting each line’s direction, drive type (TTL or open-drain), SMB connector linkage and voltage level. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_ConfigureDiscretes ( int nDiscrete1Function, BOOL bDiscrete1DrivesSMB_AT1, int nDiscrete2Function, BOOL nDiscrete2InputFromSMB_AT2,...
  • Page 225 I2C_DisableCollisionDetection Enables an analyzer mode which ignores bus collision conditions when it is driving the bus. This may be useful for busses with overly slow rise-times. In such cases, the analyzer will not see its own high SDA drive level soon enough before deciding that another master is driving the bus and colliding with it.
  • Page 226 I2C_DisableTxTracking Turns off the transmission tracking feature. Removes delays between transactions. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_DisableTxTracking ( void ); Return Value: NULL if the initialization was successful, otherwise, a pointer to a string containing text with an error message.
  • Page 227 I2C_EnableTxTracking Turns on the transmission tracking feature. Adds delays between transactions. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_EnableTxTracking ( void ); Return Value: NULL if the initialization was successful, otherwise, a pointer to a string containing text with an error message.
  • Page 228 I2C_GetLastStatus Reports supplemental status of the most recent call to an API function. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_GetLastStatus ( void ); Return Value: The status string indicating the result of the most recent call to an API function, including any error messages.
  • Page 229 I2C_GetLastTransferStatus Reports supplemental status of the most recent call to I2C_Receive_Data or I2C_Send_Data. The event of an address cycle NAK is provided. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_GetLastTransferStatus ( void ); Return Value: NULL if there is no transfer status information, otherwise the string "ADDRESSNAK". Parameters: None.
  • Page 230 I2C_InitHardware Confirms that the CAS-1000-I2C is present and properly linked via its USB port. It initializes the hardware with logic and downloads the firmware, with all settings at factory default states. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_InitHardware ( void ); Return Value: NULL if the initialization was successful, otherwise, a pointer to a string containing text with an error message.
  • Page 231 I2C_InjectGlitch Injects previously loaded glitch pattern to the target bus immediately, without waiting for any armed trigger event. This function allows you to bypass the arming and triggering sequence of glitch injection. The I2C_LoadGlitch or I2C_ReloadGlitch function must be called prior to calling this function.
  • Page 232 I2C_LoadGlitch Loads the glitch pattern information from a glitch pattern file (*.gpf) to the CAS-1000. This function must be called prior to a glitch injection. Depending on the second parameter, the trigger will be armed immediately or armed during an I2C_SendData function call. The actual injection of the glitch happens when the armed trigger condition is met.
  • Page 233 I2C_LoadSetup Overwrites all settings from the referenced project (*.i2c) file. Following are the parameters being loaded. LowThresholdVoltageSetting, HighThresholdVoltageSetting, InterfaceSpeedSetting, TolerateSlowRiseTimes, DisableCollisionDetection, AnalyzerSuppliesBusVoltage, BusDriveVoltageSetting, BusDrivePullUpSetting, SlopeControlMode, BufferDepthSetting, Discrete1IOmode, Discrete1Drives_SMB_AT1, Discrete2IOmode, Discrete2InputSource, DiscreteVoltage, HiSpeedMode, TimingSkewMode, TimingSkewSetupTime, TimingSkewHoldTime, SMBusTimeout, Is8BitAddrFormat Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_LoadSetup ( char * szFilename );...
  • Page 234 I2C_MeasureBus Performs a specified measurement on the I C bus. The measured value is stored in the integer variable referenced by the pnData pointer. You can also use the I2C_GetLastStatus function following this call to get a string formatted measurement value, including the units and any error messages. NOTE: For the Slave Data Valid ACK Time (SlaveTvdACK) measurement, a read transaction with an ACK is required.
  • Page 235: Table 18. List Of I 2 C Bus Measurement Parameters

    Parameter Description Unit Measurement Type MasterTsuDAT Master Data Setup Time MASTER MasterTbuf Master Bus Free Time MASTER MasterFscl Master SCL Frequency MASTER MasterThi Master SCL High Period MASTER MasterTLo Master SCL Low Period MASTER MasterTrCL Master SCL Rise Time MASTER MasterTfCL Master SCL Fall Time MASTER...
  • Page 236 I2C_PulseDiscrete Pulses one of the discrete I/O signals low for a specified period of time, if it is configured as output. If discrete 1 is selected and it is configured as tied to the output trigger SMB, that signal will be operated instead of the line to the target.
  • Page 237 I2C_Random_Read Writes internal memory address of the slave device to read from, and then reads data from it. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_Random_Read ( int nAddress, int b10BitAddress, unsigned char * pMemAddrBytes, int nMemAddrLength, unsigned char * pReceiveData, int nDataCount, int bUseStopBits);...
  • Page 238 I2C_Receive_Data Launches a Receive operation as in the Debugger function, conveying data bytes from a given bus address and checking for its timely completion. This function may not return quickly (up to the timeout interval) depending on the time it takes to receive and confirm completion. Use the I2C_GetLastTransferStatus function following this call to determine if the address cycle got NAK’ed.
  • Page 239 I2C_Receive_Data_Q Reads data from the specified target and returns immediately without waiting for the read values, which will be stored in a queue for later retrieval. In order to retrieve the queued data, call I2C_Receive_Data_Q_Get function with matching QID. This function enables retrieving of the read data while avoiding the gaps between transactions.
  • Page 240 I2C_Receive_Data_Q_Get Retrieves queued data values stored from the previous I2C_Receive_Data_Q function call. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_Receive_Data_Q_Get ( int nQID, unsigned char * pReceiveData, int nDataCount); Return Value: Number of bytes retrieved. Parameters: nQID ID of the queue entry to be retrieved from the memory. pReceiveData A pointer to a block of memory where the receive data bytes are to be stored.
  • Page 241 I2C_ReloadGlitch Reloads previously loaded glitch pattern data to the CAS-1000. This function can be called in place of the I2C_LoadGlitch function if the glitch pattern file intended to be used has already been loaded by an earlier I2C_LoadGlitch function call. This function will reuse the glitch pattern data stored in the memory instead of reading it from the physical file.
  • Page 242 I2C_Send_Data Sends a message (ie. performs a write operation) to the specified target slave address. This function may not return quickly (up to the timeout interval) depending on the time it takes to send and confirm completion. Use the I2C_GetLastTransferStatus function following this call to determine if the address cycle got NAK’ed.
  • Page 243 I2C_SendData Sends a message (ie. performs a write operation) to the specified target slave address. This function may not return quickly (up to the timeout interval) depending on the time it takes to send and confirm completion. Use the I2C_GetLastStatus function following this call to determine if the address cycle got NAK’ed.
  • Page 244 I2C_SendDataPEC Sends a message (ie. performs a write operation) with a SMBus Packet Error Checking (PEC) byte to the specified target slave address. The PEC is a CRC-8 error-checking byte, calculated on all the message bytes (including addresses and read/write bits). The PEC is appended to the message as the last data byte.
  • Page 245 I2C_SenseDiscrete Reads the level of one of the discrete I/O signals. If discrete 2 is selected and it is configured as tied to the input trigger SMB, that signal will drive this function instead of the target signal. The configured direction of the signal has no effect here.
  • Page 246 I2C_SetBusDriveVoltage Overwrite configuration reference voltage with provided value. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_SetBusDriveVoltage ( char * szVoltage ); Return Value: NULL if I2C_InitHardware was never called, otherwise a pointer to a string containing the actual resulting reference voltage (closest available to requested). Parameters: szVoltage The string holding text of the new bus reference level as a floating-point decimal value in volts.
  • Page 247 I2C_SetBusHighVoltageThreshold Overwrite configuration high threshold voltage with provided value. This supports the hysteresis feature of the analyzer as it monitors the bus and improves noise immunity. If a bus signal is currently considered low, it must be sensed above this voltage before being switched to high by the analyzer. Note that for slow rising busses (high parasitic capacitance, with Accelerated Rising Edge Drive off), the rise time may limit the ability of a driver to achieve a desired clock rate (since the top of the pulse may not reach the high threshold before turning around again).
  • Page 248 I2C_SetBusLowVoltageThreshold Overwrite configuration low threshold voltage with provided value. This supports the hysteresis feature of the analyzer as it monitors the bus and improves noise immunity. If a bus signal is currently considered high, it must be sensed below this voltage before being switched to low by the analyzer. Note that for slow rising busses (high parasitic capacitance, with Accelerated Rising Edge Drive off), the rise time may limit the ability of a driver to achieve a desired clock rate (since the top of the pulse may not reach the high threshold before turning around again).
  • Page 249 I2C_SetBusPullupResistance Overwrite configuration pull-up resistors with provided value (same for both bus signals). Note that high pull-up values may increase the signal rise times impacting the bus monitoring function and affecting clock rate performance. This is also affected by Accelerated Rising Edge Drive and threshold values.
  • Page 250 I2C_SetBusVoltageSource Selects the bus reference voltage source as either provided by the target, or by the analyzer programmable level (the target pull-ups should be removed). Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_SetBusVoltageSource ( int nSource ); Return Value: 0 if I2C_InitHardware was never called, otherwise 1. Parameters: nSource 0 if target should drive the voltage (enter Target Supplied mode).
  • Page 251 I2C_SetClockRate Overwrite configuration SCL clock rate with the provided value. This is the rate at which the analyzer attempts to run when it drives the bus. Note that for slow rising busses (high parasitic capacitance, with Accelerated Rising Edge Drive off), the rise time may limit the ability of a driver to achieve a desired clock rate (since the top of the pulse may not reach the high threshold before turning around again).
  • Page 252 I2C_SetDiscrete Drives the level of one of the discrete I/O signals to the state passed in, if configured as output. If discrete 1 is selected and it is configured as tied to the output trigger SMB, that path will be operated instead of the line to the target.
  • Page 253 I2C_SetDiscreteVoltage Overwrite configuration TTL voltage level for the high state of the discrete I/O signals. Prototype: extern “C” __declspec(dllexport) char * _cdecl I2C_SetDiscreteVoltage ( char * szVoltage ); Return Value: NULL if I2C_InitHardware was never called, otherwise a pointer to a string containing the actual resulting voltage (closest available to requested).
  • Page 254 I2C_SetFEAddrFormat Defines the mode of byte representation used throughout the set of DLL commands for 7-bit addresses. That is, the 7 bits of the protocol address is always given in a byte, but these bits can be placed in the byte either left-justified where the LSB is zero (FE mode), or right-justified where the MSB is zero (7F mode).
  • Page 255 I2C_SetMonitorCallback Sets application-defined callback function for processing transaction data. This callback function is called whenever CAS-1000-I2C detects any new transactions on the target I2C bus. The callback function should perform minimal necessary work and return immediately to avoid overflowing of CAS- 1000-I2C buffer.
  • Page 256 9 8 7 Error Transaction Type: TxType[3:0] = 0x3 Summary of Error Codes: 00H: no error 01H: ADDR_ERR - Protocol violation found during address transaction 02H: START_ERR - START hold time violation (i.e. less than minimum hold time) 03H: DATA_ERR - Protocol violation found during data transaction 04H: reserved 05H: reserved 06H: reserved...
  • Page 257 I2C_SetRisingEdgeDriveMode Overwrite configuration rising edge drive setting with provided selection. When enabled and driving the bus, the analyzer will assert hard drivers on the bus momentarily, during signal rising edges. This should overcome parasitic capacitance on the bus resulting in fast rise-times. Prototype: extern “C”...
  • Page 258 I2C_SetTimingSkew Sets new timing skew parameters for the analyzer. Following execution of this function, the timing relationship between SCL and SDA during analyzer driven communications will be adjusted according to the provided settings. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_SetTimingSkew ( int nMode, int nTime );...
  • Page 259 I2C_ShutdownHardware Forces an orderly shutdown of the CAS-1000-I2C analyzer and its USB disconnection. This function must be invoked prior to any new I2C_InitHardware call, for trouble-free operation. Otherwise, the analyzer must be unplugged and re-plugged into the PC before being initialized again. This function may not return immediately, until the disconnection is complete.
  • Page 260 I2C_SlaveGetStatus Returns the current status of the slave specified. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_SlaveGetStatus ( int nID, int* pnAddr, int* pnStatus, int* pnLoops); Return Value: 1 if successful 0 if error occurred Call I2C_GetLastStatus function to get the result of the call in a string format, including an error message.
  • Page 261 I2C_SlaveStart Starts a slave emulation with specified parameters. This function takes a pointer to a data buffer in the memory and feeds the data to the slave device. You may not specify duplicate ID or address with any slaves currently running. Prototype: extern “C”...
  • Page 262 I2C_SlaveStartSDF Starts a slave emulation with specified parameters. This function takes a Slave Data File (SDF) as the source of input data and feeds it to the slave device. You may not specify duplicate ID or address with any slaves currently running. Prototype: extern “C”...
  • Page 263 I2C_SlaveStop Terminates the slave emulations specified by the ID number. Use this function to ensure the slave device is stopped before starting a new emulation session. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_SlaveStop ( int nID ); Return Value: 1 if successful 0 if error occurred Call I2C_GetLastStatus function to get the result of the call in a string format, including an error message.
  • Page 264 I2C_SlaveStopAll Terminates all slave emulations currently running. Use this function to ensure all slave emulations are stopped before starting a new test session. Prototype: extern “C” __declspec(dllexport) int _cdecl I2C_SlaveStopAll ( void ); Return Value: 1 if successful 0 if error occurred Call I2C_GetLastStatus function to get the result of the call in a string format, including an error message.
  • Page 265: Chapter 10 C Device Emulator

    Chapter 10 C Device Emulator Emulator window overview and component descriptions The Emulator tool enables exercising the I C bus by programmed interaction. In this mode the CAS-1000- I2C unit can be set to emulate either bus master or bus slave devices. Once set in emulation mode, the CAS-1000-I2C autonomously communicates as a virtual I C bus master and/or provides pre-programmed responses to external I...
  • Page 266 The Emulation tool enables configuring, launching, stopping, looping, and stepping these virtual devices. This includes assigning names, slave addresses, among other features, and attaching the appropriate controlling script or data file. C Device Emulator...
  • Page 267: Emulation Manager Window

    Emulation Manager Window The Emulation Manager window, shown in Figure 181, can be opened using either the Emulator entry on the Shortcut bar or in the Tools menu. Table 19 describes the numbered areas of the I2C Emulation Manager window. Figure 181.
  • Page 268: Figure 182. Emulator Manager Window

    Emulation Manager The Emulation Manager Window provides an overview of all emulated devices. Each line in the listing shows the features of an independent emulation item, under the column headings. Only one line may display the “Master” (and always has that name assigned). The other lines may include up to 10 emulated slaves, with user-defined names.
  • Page 269 The Emulation Manager window provides a list of emulated devices and the script or data files associated with them. Each emulated device contains the following column headings: Type – Specifies whether the device is a master or slave. Only one master device may be active at any given time.
  • Page 270: Figure 183. Add Emulated Device Dialog

    Emulated Devices List The user can manipulate the Emulated Devices List by using the Add, Edit, Remove, and Remove All buttons in the Emulation Manager. When using the Add button, the Add Emulated Device dialog is displayed as shown in Figure 183. Click on the Browse button to select the script or data file.
  • Page 271: Figure 184. Emulator Execute Menu

    Emulator Menu Bar When the Emulation Manager window is active, the Menu Bar contains entries relevant to the Emulator functions including File, Tools, Windows and Help. A description of each menu follows. Emulator File Menu The File menu includes options to load and save projects. These project-related entries are identical to those described in the Monitor File Menu section of the Bus Traffic Monitor chapter.
  • Page 272: Figure 185. Emulator Tool Bar

    Figure 185. Emulator Tool Bar Icon Name Function Description Executes all active devices. Aborts execution of all active devices. Stop Help Provides quick access to the online help topics. Table 20. Emulator Tool Bar Functions C Device Emulator...
  • Page 273: Emulated Master Window

    Emulated Master Window The Emulated Master window, shown in Figure 186, is displayed when the user clicks on the View button from the Emulation Manager window while a master device is selected or double-clicks the “File” column entry for a master device. The Emulated Master dialog displays the status of the selected script. The user can create breakpoints and edit the source code, as well as start and stop the execution of the device individually from within the Emulated Master dialog.
  • Page 274 Runs – Indicates the number of times that the script is set to run. If the script is to be repeated indefinitely, the text box will display, “Forever.” Current Run – Indicates the count of the current iteration. This value is incremented at the beginning of each script iteration.
  • Page 275: Figure 187. Emulated Master Source Popup Menu

    Emulated Master Source Popup Menu The Emulated Master Source Popup Menu is accessed by right-clicking in the Script Source area of the Emulated Master window. It enables manipulation of breakpoints and bookmarks as well as editing and execution operations. The menu is shown in Figure 187 followed by descriptions of the available commands.
  • Page 276 Toggle Breakpoint – Adds a breakpoint at a line or removes a breakpoint if one is already set. If the line is blank or contains only comments, the breakpoint will be applied to the next line of code. The <F9> keyboard shortcut will also invoke this command.
  • Page 277: Figure 188. Emulated Master File Menu

    Emulated Master Menu Bar When the Emulated Master window is active, the Menu Bar contains entries relevant to the Emulated Master functions including File, Edit, Execute, Breakpoint, Tools, Window, and Help. A description of each menu follows. Emulated Master File Menu In addition to facilitating the loading and saving of projects, the Emulated Master File menu shown in Figure 188 also enables the user to load and save script files.
  • Page 278: Figure 189. Emulated Master Edit Menu

    Emulated Master Edit Menu The Edit menu shown in Figure 189 provides commands that apply to the editing of the current script. Figure 189. Emulated Master Edit Menu Undo – Reverts a previously completed editing operation. Redo – Restores a previously undone editing operation. Cut –...
  • Page 279: Figure 190. Emulated Master Execute Menu

    Syntax Check – Checks the syntax of the current script without executing it. The result of the syntax check is displayed in a popup message box. If a syntax error is found, any line associated with the error will also be marked in the left-hand gutter. Note that some errors cannot be detected before execution, such as function calls with an invalid number of arguments or unexpected argument types.
  • Page 280: Figure 191. Emulated Master Breakpoint Menu

    Emulated Master Breakpoint Menu The Breakpoint menu shown in Figure 191 contains commands for the manipulation of breakpoints in the current script. Figure 191. Emulated Master Breakpoint Menu Toggle Breakpoint – Adds a breakpoint to the line at the current cursor location or removes a breakpoint if one is already set.
  • Page 281: Figure 192. Emulated Master Tool Bar

    Emulated Master Tool Bar The Emulated Master Tool Bar provides quick single-click access to commonly used commands in the Emulated Master window. Simply click the tool bar button to perform the specific command. The tool bar buttons are shown in Figure 192 and described in Table 21. Figure 192.
  • Page 282: Table 21. Emulated Master Tool Bar Functions

    Icon Name Function Description Undo Reverts a previously completed editing operation. Redo Restores a previously undone editing operation. Removes highlighted text and places a copy on the Windows clipboard. Copy Places a copy of highlighted text on the Windows clipboard. Paste Inserts text from the Windows clipboard.
  • Page 283: Emulated Slave Window

    Emulated Slave Window The Emulated Slave window, shown in Figure 193, is displayed when the user clicks on the View button from the Emulation Manager window while a slave device is selected or double-clicks the Emulation Manager’s “File” column entry for a slave device. A slave script simply contains a list of bytes to send in sequential order.
  • Page 284: Figure 194. Emulated Slave File Menu

    Emulated Slave Menu Bar When the Emulated Slave window is active, the Menu Bar contains entries relevant to the Emulated Slave functions including File, Tools, Window, and Help. A description of each menu follows. Emulated Slave File Menu In addition to facilitating the loading and saving of projects, the Emulated Slave File menu shown in Figure 194 also enables the user to load and save data files.
  • Page 285: Figure 195. Emulated Slave Edit Menu

    Emulated Slave Edit Menu The Edit menu shown in Figure 195 provides commands that apply to the editing of the current slave data file. Figure 195. Emulated Slave Edit Menu Undo – Reverts a previously completed editing operation. Redo – Restores a previously undone editing operation. Cut –...
  • Page 286: Figure 196. Emulated Slave Tool Bar

    Emulated Slave Tools Menu The Tools menu provides a path to the major application function windows. This is identical to the Monitor Tools Menu selections in the Bus Traffic Monitor chapter. Emulated Slave Window Menu The Window menu manages the various windows of I2C Exerciser and is identical to the Monitor Window Menu shown in the Bus Traffic Monitor chapter.
  • Page 287: Table 22. Emulated Slave Tool Bar Functions

    Icon Name Function Description Next Bookmark Moves the cursor to the next bookmarked line below the current cursor position. If there are no bookmarked lines below the cursor, the cursor will be moved to the first bookmarked line from the beginning of the file. Previous Bookmark Moves the cursor to the previous bookmarked line above the current cursor position.
  • Page 288: Emulated Slave Clock Stretching

    Emulated Slave Clock Stretching I2C bus protocol allows an addressed slave to delay its response to a bus master message by stretching the SCL clock signal just before the acknowledgement bit. This feature is supported by the CAS-1000 to enable users to test how well their master device works when the clock is stretched. When CAS-1000 is emulating a slave device, the clock period for the acknowledgement bit can be stretched up to 5.2 ms.
  • Page 289: Figure 197. Configuring Emulated Slave Device

    Figure 197. Configuring Emulated Slave Device 4. Start the slave emulation by pressing the F5 key. Click on the OK button if a warning comes up. 5. Start the Debugger tool by clicking on the Tools menu and selecting the Debugger menu item. Using the Debugger, send 3 bytes (e.g.
  • Page 291: Chapter 11 Script-Driven Bus Tester

    Chapter 11 Script-Driven Bus Tester Test window overview and component descriptions The Test window provides tools for testing of the target I C bus to make sure that it performs within desired limits. It is oriented around comprehensively evaluating the target I C bus and making a go/no-go decision about its performance characteristics.
  • Page 292: Test Window Reference

    Test Window Reference The Test window, shown in Figure 199, can be opened using either the Test entry on the Shortcut bar or in the Tools menu. Table 23 describes the numbered areas of the window. Figure 199. Test Window Component Description Menu Bar...
  • Page 293: Figure 200. Test Window

    Test Window Operations The Test window, shown in Figure 200, lists the script text file containing the scrollable Test program instructions which get executed to validate a target I C bus. This is similar to a master emulation file, but is focused on making a go/no-go decision about the target bus.
  • Page 294 Runs – The number in the dropdown menu indicates how many times to run the test. “Forever” indicates that the test will run indefinitely until stopped by the user. Current Run – Display the current iteration of the test. When the test is first loaded, the current run is 0. If the script is not currently running, it displays the last iteration executed before execution terminated.
  • Page 295 Left-hand Gutter – Displays line numbers and special line indicators such as breakpoint information for the test script. The following icons can appear: Indicates an enabled breakpoint. Indicates a disabled breakpoint. Indicates a bookmark. Indicates the next execution line. This can be seen when execution is paused, such as during single-step execution.
  • Page 296: Figure 201. Test Source Popup Menu

    Test Source Popup Menu The Test Source Popup Menu is accessed when the user right-clicks in the Script Source text area of the Test Window. It is the same as the source popup menu used in the Emulator and enables manipulation of breakpoints and bookmarks as well as editing and execution operations.
  • Page 297 Stop – Completely aborts script execution. Toggle Breakpoint – Adds a breakpoint at a line or removes a breakpoint if one is already set. If the line is blank or contains only comments, the breakpoint will be applied to the next line of code. The <F9> keyboard shortcut will also invoke this command.
  • Page 298: Figure 202. Test File Menu

    Test Menu Bar Test File Menu In addition to facilitating the loading and saving of projects, the Test File menu also enables the user to load and save script files. Because the Test script file is a plain text file, the program does not save the breakpoint locations when saving the script.
  • Page 299: Figure 203. Test Edit Menu

    Test Edit Menu The Edit menu shown in Figure 203 provides commands that apply to the editing of the current script. Figure 203. Test Edit Menu Undo – Reverts a previously completed editing operation. Redo – Restores a previously undone editing operation. Cut –...
  • Page 300: Figure 204. Test Execute Menu

    will also be marked in the left-hand gutter. Note that some errors cannot be detected before execution, such as function calls with an invalid number of arguments or unexpected argument types. Test Execute Menu The Execute menu shown in Figure 204 contains commands pertaining to running and stepping through the current script.
  • Page 301 Enable/Disable Breakpoint – Enables or disables the breakpoint at the line containing the cursor. If no breakpoint exists at that line, it will create an enabled breakpoint. Enable All – Enables all the existing breakpoints. Disable All – Disables all the existing breakpoints. Clear All –...
  • Page 302: Figure 206. Testtool Bar

    Test Tool Bar The Test Tool Bar provides quick single-click access to commonly used commands in the Test window. Simply click the tool bar button to perform the specific command. It is identical to the Master Emulator Tool Bar. The tool bar buttons are shown in Figure 206 and described in Table 24. Figure 206.
  • Page 303: Table 24. Test Tool Bar Functions

    Icon Name Function Description Clear All Removes all breakpoints from the script. Breakpoints Undo Reverts a previously completed editing operation. Redo Restores a previously undone editing operation. Removes highlighted text and places a copy on the Windows clipboard. Copy Places a copy of highlighted text on the Windows clipboard. Paste Inserts text from the Windows clipboard.
  • Page 305: Chapter 12 Parameters Scope

    Chapter 12 Parameters Scope Parameters Scope window overview and component descriptions The Parameters Scope window provides access to a variety of target I C bus measurements. Using this tool, electrical characteristics of the bus can be quickly collected along with the timing characteristics of target master or slave devices.
  • Page 306: Parameter Measurements

    Parameter Measurements The right side of the Parameters Scope window contains the listing of measurable parameters and the controls for taking measurements. This is shown in Figure 208. Figure 208. Parameters Scope Measurement Controls Parameter column – This column identifies the electrical or timing characteristic that is measured. The following can be measured: System Parameters Master Parameters...
  • Page 307 Actual – This column indicates the actual resultant value from the measurement. If this column entry is empty, then the parameter has not yet been measured. For timing characteristics, certain special measurement limitations apply. The CAS-1000-I2C analyzer has a 512 sample measurement buffer and runs at a sample rate of 50 MHz. This provides approximately 10 µs (10,000 ns) worth of analog data for measurement.
  • Page 308 The I2C Exerciser will display a reminder message box before taking these measurements. Slave parameters are measured by performing read transactions with the target slave. To complete successfully, these measurements require that the data provided by the target slave produce both rising and falling SDA edges during the data cycle.
  • Page 309 This indicates that measurements have completed and that at least one measurement result (displayed in the Actual column) has been labeled as “Failed” (in the Results column). Refer to the description of the Results column for details on what constitutes a pass or fail. Parameters Scope...
  • Page 310: Figure 209. Parameter Specification File Example

    Parameter Specification File There can be minimum and maximum values defined for each parameter which establishes a range of acceptable measurement results. These minimums and maximums are displayed in the Min and Max columns respectively. When “N/A” appears in the column entry, it indicates that there is no associated limit.
  • Page 311: Waveform Display

    Waveform Display The left side of the Parameters Scope window contains a waveform graph that enables various signal edge transitions to be viewed after measurements have been performed. Beneath the graph are controls allowing particular edge transitions to be captured and displayed without running the measurement operation.
  • Page 312 Graph – The graph displays the analog SDA and SCL signal data at a selected signal edge transition. Signals are drawn in the graph in the same color as in the Monitor window timing display. Refer to the Monitor Colors section of the Preferences dialog described in the Configuration and Preferences chapter. Waveform Trigger Setup controls –...
  • Page 313: Parameters Scope Window Reference

    Parameters Scope Window Reference Parameters Scope Menu Bar When the Parameters Scope window is active, the menu bar contains entries for File, Tools, Windows, and Help. These windows are similar to those described in the Monitor Menu Bar section of the Bus Traffic Monitor chapter.
  • Page 314 Parameters Scope...
  • Page 315: Chapter 13 Scripting Language

    Chapter 13 Scripting Language I2C Exerciser test scripting language reference Overview The I2C Exerciser application enables automatic programmed operations of the CAS-1000-I2C for several distinct behavior types, by reading user-provided text files. The types differ by their application, but share many common features. The syntax is generally of the same style and format, distinguished mainly by which commands they use.
  • Page 316: The Essential Syntax Elements

    The Essential Syntax Elements The various script command files are comprised of variables, statements (if, else, while, break, etc.), commands (built-in function calls; read/write the bus, etc.), operators (<, =, >=, etc.), calls to user defined functions, and comments. It is organized into callable functions, with the top entry level being the mandatory main() function.
  • Page 317 An array is a collection of objects of a single data type. The individual objections in the collection are accessed by their positions in the array. The expression in a bracket pair (“[]”) following an array variable denotes the index of an object in the array. The indexing is zero based and the size of array is non-predetermined.
  • Page 318 printf(“%d, “, arrInt1[i]); // prints out “17, 13, 11, 7, 5, 3, 2, 1, “ for (i=0; i<4; i++) arrFloat1[i] = (arrFloat2[i] + arrFloat2[i+1]) / 2.0; // calculate the middle values between items in “arrFloat2” and // store them to “arrFloat1” for (i=0;...
  • Page 319 integer_to_string integer_to_string_hex8 integer_to_string_hex32 integer_to_string_hex64 itoa itoa_h8 itoa_h32 itoa_h64 load_glitch load_parameters main measure_bus message_box pause print printf progress pulse_discrete rand random_integer receive_message reload_glitch return seed_random send_message send_message_PEC sense_discrete_level set_clock_rate set_discrete_level set_discrete_voltage set_high_voltage_threshold set_low_voltage_threshold set_pullup_resistance set_reference_voltage set_rising_edge_drive_mode set_timing_skew set_voltage_source SMBus_proc_call SMBus_proc_call_block SMBus_quick SMBus_read_block SMBus_read_byte SMBus_read_word...
  • Page 320 string_get_token_at string_hex_to_integer string_num_of_tokens string_substring string_to_float string_to_integer then while Statements The following statements are supported: if (expression) statement or block of statements elseif (expression) statement or block of statements else statement or block of statements while (expression) statement or block of statements statement or block of statements break;...
  • Page 321 statement or block of statements Operators There are four arithmetic, seven logical and five bitwise operators. The arithmetic ones are: Operator + sums two variables Operator – find difference between two numbers Operator * multiples two numbers Operator / divides two numbers Operator % yield reminder from the division of two numbers Operator ++...
  • Page 322: Example Script

    Legal Identifiers Legal identifiers are a sequence of letters and digits (no white-space), which comprise variables or function names. The first character must be a letter. The underscore _ counts as a letter. Identifiers are case sensitive, so “test” is considered a different identifier than “Test”. Built-in Constants TRUE: integer value 1 FALSE: integer value 0...
  • Page 323 strInBytes = receive_message(nAddr, FALSE, 5, TRUE); // display input bytes print(strInBytes); print("\n"); // does output match input?? if( !string_compare(strOutBytes, strInBytes) ) print("Match!\n\n"); else print("Mismatch!\n\n"); // update progress bar - done! progress(100); Scripting Language...
  • Page 324: Built-In Functions: Summary

    Built-in Functions: Summary The I2C Exerciser script language does not support the usage of the standard “C” libraries, nor does it allow importing of external libraries. Therefore, the following built-in functions are provided as a substitute. Function Description Converts a character into an integer value, which character_to_integer() represents the character’s ASCII code.
  • Page 325: Figure 186. Emulated Master Window

    Function Description i2c_write() Writes data to the specified target slave address. inject_glitch() Injects previously loaded glitch pattern to the target bus. int_array() Declares and initializes an array of integers. integer_to_character() Converts an ASCII code into a character. chr() integer_to_string() Converts integer decimal string...
  • Page 326 Function Description reload_glitch() Reloads previously loaded glitch pattern data to the CAS-1000. seed_random() Sets a starting point for the pseudorandom number generator. send_message() Sends a message (ie. performs a write operation) to the specified target slave address. send_message_PEC() Sends a message (ie. performs a write operation) with a SMBus Packet Error Checking (PEC) byte to the specified target slave address.
  • Page 327: Table 25. Built-In Scripting Functions

    Function Description Performs SMBus Block Read operation, which sends SMBus_read_block() a command and receives a block of data from a slave. SMBus_read_byte() Performs SMBus Read byte operation, which sends a command and receives a byte of data from a slave. Performs SMBus Read word operation, which sends SMBus_read_word() a command and receives a word of data from a...
  • Page 328: Built-In Functions: Detailed Descriptions

    Built-In Functions: Detailed Descriptions character_to_integer() / asc() Description: Converts a character into an integer value, which represents the character’s ASCII code. Used In: Master Emulation, Test Prototype: character_to_integer (strValue) asc(strValue) Example Call: strVal = "A"; nVal = character_to_integer (strVal); // nVal will be 65 nVal = asc("B");...
  • Page 329 compare_to_table() Description: Compares a specified value against a parameter from a specification table text file. An error message will be displayed if the parameter is not found in the file. The format for specification table files is described following the function details below. Used In: Test Prototype:...
  • Page 330 Specification Table Files Specification table files are simple text files based on the Windows .INI file format. They consist of a section label, “[main]”, followed by a list of variable names and assigned values. Comments can be included in the file by preceding text with a semicolon (“;”). The following is an example of a specification table file: ;...
  • Page 331 convert_to_ASCII() Description: Converts a string containing a list of bytes in hexadecimal format into a string of corresponding ASCII characters. This function is useful for translating and printing the string value returned by the "receive_message" function in ASCII character format. Used In: Master Emulation, Test Prototype:...
  • Page 332 delay() Description: Adds delay between transactions for the specified amount of microseconds. This function is effective only when the transaction tracking is disabled. To disable the transaction tracking, call the ‘disable_tx_tracking’ function. Used In: Master Emulation, Test Prototype: delay(nMicroseconds) Example Call: disable_tx_tracking();...
  • Page 333 disable_collision_detection() Description: Disables the Collision Detection mechanism, which allows the CAS-1000-I2C driving (emulating master) to proceed even on buses with slow-rising edges. Used In: Master Emulation, Test Prototype: disable_collision_detection(bDisable) Example Call: disable_collision_detection(1); //disables the collision detection Input Parameters: Integer indicating the disable/enable mode to be set. “1” for disable and “0” for bDisable: enable.
  • Page 334 disable_tx_tracking() Description: Turns off the transmission tracking feature, which tracks and verifies transactions generated by the analyzer. By default, the transaction tracking is enabled at the start of every script run session. You may use this function to turn off the feature. While the tracking is enabled, the read or write transaction generated by the CAS-1000 is tracked until the result is captured and returned by the Monitor.
  • Page 335 enable_tx_tracking() Description: Turns on the transmission tracking feature, which tracks and verifies transactions generated by the analyzer. By default, the transaction tracking is enabled at the start of every script run session. You may use the ‘disable_tx_tracking’ function to turn off the feature. While the tracking is enabled, the read or write transaction generated by the CAS-1000 is tracked until the result is captured and returned by the Monitor.
  • Page 336 exit() Description: Terminates execution of the script and passes an exit code back to the application. An exit code of zero indicates a “pass” condition and a non-zero exit code indicates a “fail” condition. Used In: Test Prototype: exit(nExitCode = 0) Used In: Master Emulation, Slave Emulation, Test Example Calls:...
  • Page 337 fclose() Description: Closes a file opened earlier. Used In: Master Emulation, Test Prototype: fclose(hFile) Example Call: myFile = fopen("C:\\temp\\output.txt", 0); // open file to overwrite fprintf(myFile, "AB CD 12 34"); // write string to file fclose(myFile); // close file Input Parameters: Handle of the file to close.
  • Page 338 fcloseall() Description: Closes all files opened earlier. Used In: Master Emulation, Test Prototype: fcloseall() Example Call: myFile1 = fopen("C:\\temp\\output1.txt", 0); // open file to overwrite fprintf(myFile1, "12 34 56 78"); // write string to file myFile2 = fopen("C:\\temp\\output2.txt", 0); // open file to overwrite fprintf(myFile2, "AA BB CC DD");...
  • Page 339 fendoffile() Description: Determines whether the end of a file has been reached during fgetline() function. It is typically used in combination with a loop. If the file has not been read, it will return 0. Used In: Master Emulation, Test Prototype: fendoffile(hFile) Example Call:...
  • Page 340 fgetline() Description: Reads in a line of text from a file. The fopen function must be called before using this function. The format for the value to be returned is similar to the standard C functions, fprintf() and fscanf(). Used In: Master Emulation, Test Prototype: fgetline(hFile, FormatString)
  • Page 341 float_array() Description: Declares and initializes an array of floating point numbers. Used In: Master Emulation, Test Prototype: float_array(f1, f2, ...) Example Call: arrFloat1 = float_array(); // declares a new array variable "arrFloat1" arrFloat2 = float_array(0.5, 1.0, 1.5, 2.0, 2.5); // declares a new array variable "arrFloat2" and // initializes the values of first five items printf("arrFloat2[3] = %.2f", arrFloat2[3]);...
  • Page 342 float_to_string() Description: Converts a floating point input to a decimal string representation of that floating point value. Used In: Master Emulation, Test Prototype: float_to_String(fValue) Example Call: fVal = 3.14; str = float_to_string(fVal); print(str); // print "3.14" Input Parameters: The value of the float to convert to a string. fValue: Return Value: A string containing the decimal representation of the input floating point value.
  • Page 343 fopen() Description: Opens a file for writing and reading. If the file does not exist, it will be created. If no path is specified, the file is assumed to be located in the local path of the script file. Used In: Master Emulation, Test Prototype: fopen(strFilename , bAppend = 1 )
  • Page 344 fprintf() Description: Writes a formatted string to the specified file. Used In: Master Emulation, Test Prototype: fprintf(hFile, FormatString, arg1, arg2, ... ) Example Call: nNum = 3; nAddr = 0x9A; myFile = fopen("c:\\temp\\output.txt"); fprintf(myFile, "Address number %d is: 0x%02X \n", nNum, nAddr); // string written to file: "Address number 3 is 0x9A \n"...
  • Page 345 i2c_random_read() Description: Writes internal memory address of the slave device, and then reads data from the slave device. Slave Addr Mem Addr Byte 1 … Mem Addr Byte N Slave Addr Data Byte 1 … Data Byte M I2C Random Read Protocol Used In: Master Emulation, Test Prototype:...
  • Page 346 Integer (TRUE or FALSE) indicating whether to abort the transaction when no bAbortOnNAK: salve acknowledges to the address sent out. This parameter is optional with the default value of FALSE. Integer (TRUE or FALSE) indicating whether to read an extra Packet Error bPEC: Checking (PEC) byte at the end of the message.
  • Page 347 i2c_read() Description: Reads data from the specified target slave address. Slave Addr Data Byte I2C Read Protocol Used In: Master Emulation, Test Prototype: i2c_read(nAddress, nByteCount, bStopBit=TRUE, b10BitAddr=FALSE, bAbortOnNAK=FALSE, bPEC=FALSE) Example Call: // read 10 bytes of data from slave with address "0x18" // and print out the data read or the error code nArrData = int_array();...
  • Page 348 An array of integers storing the block of data read from the slave. The array elements at index [1] through [N] represents the data bytes received, and the first element (index [0]) of the array represents the number of bytes or the error code returned as described below. Number of data bytes received.
  • Page 349 i2c_read_q() Description: Reads data from the specified target and returns immediately without waiting for the read values, which will be stored in a queue for later retrieval. In order to retrieve the queued data, call ‘i2c_read_q_get’ function with matching QID. This function enables retrieving of the read data while avoiding the gaps between transactions.
  • Page 350 printf("%02X ", nArrDataTemp[j]); else printf("None"); Input Parameters: ID of the queue entry in the memory to store the read values for later retrieval. nQID: Integer representing the address of the device to read from. nAddress: Integer representing the number of bytes to read. nByteCount: Integer (TRUE or FALSE) indicating whether to send the STOP bit at the end of bStopBit:...
  • Page 351 i2c_read_q_get() Description: Retrieves queued data values stored from the previous ‘i2c_read_q’function call. Used In: Master Emulation, Test Prototype: i2c_read_q_get(nQID) Example Call: // must disable tx tracking for queued READ disable_tx_tracking(); nAddr = 0x5C; nArrDataWrite = int_array(0xBF, 0x90); for (i=0; i<4; i++) // WRITE 2 bytes i2c_write(nAddr, 2, nArrDataWrite, FALSE);...
  • Page 352 ID of the queue entry to be retrieved from the memory. nQID: Return Value: An array of integers storing the block of data read from the slave. The array elements at index [1] through [N] represents the data bytes received, and the first element (index [0]) of the array represents the number of bytes or the error code returned as described below.
  • Page 353 i2c_write() Description: Writes data to the specified target slave address. Slave Addr Data Byte I2C Write Protocol Used In: Master Emulation, Test Prototype: i2c_write(nAddress, nByteCount, nArrBytes, bStopBit=TRUE, b10BitAddr=FALSE, bAbortOnNAK=FALSE, bPEC=FALSE) Example Call: // write 10 bytes of data stored in nArrData to slave with address "0x18" nArrData = int_array(1, 2, 3, 5, 7, 0x1, 0x11, 0x22, 0xC, 0xDD);...
  • Page 354 Transaction timed out. Failed to detect transaction from the bus on time. Scripting Language...
  • Page 355 inject_glitch() Description: Injects previously loaded glitch pattern to the target bus immediately, without waiting for any armed trigger event. This function allows you to bypass the arming and triggering sequence of glitch injection. The ‘load_glitch’ or ‘reload_glitch’ function must be called prior to calling this function. Used In: Master Emulation, Test Prototype:...
  • Page 356 int_array() Description: Declares and initializes an array of integers. Used In: Master Emulation, Test Prototype: Int_array(n1, n2, ...) Example Call: arrInt1 = int_array(); // declares a new array variable "arrInt1" arrInt2 = int_array(1, 2, 3, 5, 7, 11, 13, 17); // declares a new array variable "arrInt2"...
  • Page 357 integer_to_character() / chr() Description: Converts an ASCII code into a character. Used In: Master Emulation, Test Prototype: integer_to_character(nValue) chr(nValue) Example Call: nVal = 65; strVal = integer_to_character (nVal); // strVal will be "A" strVal = chr(66); // strVal will be "B" Input Parameters: ASCII code value to be converted into a character.
  • Page 358 integer_to_string() Description: Converts an integer to a decimal string representation of that integer. Used In: Master Emulation, Test Prototype: integer_to_string(nValue) Example Call: nVal = 253; str = integer_to_string(nVal); print(str); // print "253" Input Parameters: The value of the integer to convert to a string. nValue: Return Value: A string containing the decimal representation of the input integer value.
  • Page 359 integer_to_string_hex8() Description: Converts the integer input into a string containing the hex representation of the integer. The returned string will have exactly 2 hex digits. If the value passed in is larger than 0xFF, the least significant 8 bits are used. Used In: Master Emulation, Test Prototype:...
  • Page 360 integer_to_string_hex32() Description: Converts the integer input into a string containing the hex representation of the integer. The returned string will have exactly 8 hex digits. If the value passed in is larger than 0xFFFFFFFF, the least significant 32 bits are used. Used In: Master Emulation, Test Prototype:...
  • Page 361 integer_to_string_hex64() Description: Converts the integer input into a string containing the hex representation of the integer. The returned string will have exactly 16 hex digits. Used In: Master Emulation, Test Prototype: integer_to_string_hex64(nValue) Example Call: index = 1; address64 = integer_to_string_hex64(0xFFFFFFFF80020000+index); Input Parameters: The value of the integer to convert to a string nValue:...
  • Page 362 load_glitch() Description: Loads the glitch pattern information from a glitch pattern file (*.gpf) to the CAS-1000. This function must be called prior to a glitch injection. Depending on the second parameter, the trigger will be armed immediately or armed when the ‘ARM_GLITCH’ keyword is encountered during a ‘send_message’ operation.
  • Page 363 load_parameters() Description: Loads all of the hardware setup options from a specified project file. These options include those specified in the Settings pane of the I2C Exerciser Configuration Manager. Used In: Test Prototype: load_parameters(strProjFilePath); Example Call: load_parameters("C:\\MyProject.i2c"); //loads the parameters from file C:\MyProject.i2c Input Parameters: A string containing the project file to load parameters from...
  • Page 364 measure_bus() Description: Performs a specified measurement on the I C bus. Returns a string with the outcome, including units and any assumptions made (such as target assumed to be quiet). NOTE: For the Slave Data Valid ACK Time (SlaveTvdACK) measurement, a read transaction with an ACK is required.
  • Page 365 MasterSDALow: Master SDA Low Voltage MasterSCLLow: Master SCL Low Voltage MasterThdSTA: Master Start Hold Time MasterTsuSTA: Master Start Setup Time MasterTsuSTO: Master Stop Setup Time MasterThdDAT: Master Data Hold Time MasterTsuDAT: Master Data Setup Time MasterTbuf: Master Bus Free Time MasterFscl: Master SCL Frequency MasterThi: Master SCL High Period MasterTLo: Master SCL Low Period...
  • Page 366 message_box() Description: Displays a string to message box pop-up and causes script execution to wait for a user response. The message box can either provide an “OK” button or the “Yes” and “No” buttons. Used In: Test Prototype: message_box(strMessage, bYesNo = FALSE) Example Calls: answer = message_box("Do you want to start the test? ", TRUE);...
  • Page 367 pause() Description: Halts execution of script commands for the specified amount of milliseconds before continuing. Used In: Master Emulation, Test Prototype: pause(nMilliseconds) Example Call: pause(1000); //pause execution for 1 second Input Parameters: Integer indicating amount of time in milliseconds to pause. nMilliseconds: Return Value: None...
  • Page 368 print() Description: Echoes a specified string to the Test window or Emulated Master window. Used In: Master Emulation, Test Prototype: print(strOutput) Example Call: // send "Hello, world! " to the output window with a carriage return print("Hello, world!\n"); Input Parameters: String containing the text to echo.
  • Page 369 printf() Description: Echoes a formatted string to the Test window or Emulated Master window. The parameters for this function are similar to the standard C functions, printf() and sprintf(). Used In: Master Emulation, Test Prototype: printf(FormatString, arg1, arg2, ... ) Example Call: nNum = 3;...
  • Page 370 The Format String A format string consists of ordinary characters and also special conversion specifications. These conversion specifications are sequences that begin with the percent sign (“%”) followed by one or more of the following elements, in order: %[sign][padding][.precision]type 1) [sign] – An optional sign specifier, “+”, that forces a plus or minus sign to be included when a numeric argument is converted to a string.
  • Page 371 progress() Description: Updates the progress bar in the Test window or Emulated Master window by setting its percentage to a specified value. Used In: Master Emulation, Test Prototype: progress(nPercent) Example Call: progress(95); // set progress bar to 95% Input Parameters: Integer specifying the percentage to which the progress bar will be set.
  • Page 372 pulse_discrete() Description: Sets the specified discrete I/O line (if configured as an output) to the low state for a period of milliseconds before restoring it to the high state. Script execution will pause during this time period. Used In: Master Emulation, Test Prototype: pulse_discrete(nDiscreteNumber, nMilliseconds) Example Call:...
  • Page 373 random_integer() Description: Generates and returns a pseudorandom number. This function generates a pseudorandom integer in the range 0 to 32767. Use the ‘seed_random’ function to seed the pseudorandom-number generator before calling this function. Used In: Master Emulation, Test Prototype: random_integer(); Example Call: // print out 10 random numbers // between 0 and 32767...
  • Page 374 receive_message() Description: Receives a message (ie. performs a read operation) of specified length from the specified target slave address and returns it as a string of hexadecimal bytes. NOTE: Use the new ‘i2c_read’ function for an alternate and better way to read from target slaves. Used In: Master Emulation, Test Prototype:...
  • Page 375 reload_glitch() Description: Reloads previously loaded glitch pattern data to the CAS-1000. This function can be called in place of the ‘load_glitch’ function if the glitch pattern file intended to be used has already been loaded by an earlier ‘load_gltich’ function call. This function will reuse the glitch pattern data stored in the memory instead of reading it from the physical file.
  • Page 376 seed_random() Description: Sets a starting point for the ‘random_integer’ function. This function sets the starting point for generating a series of pseudorandom integers using the parameter value specified. If the optional parameter is not specified, an unsigned integer representation of the current time will be used instead. Call this function before using the ‘random_integer’...
  • Page 377 send_message() Description: Sends a message (ie. performs a write operation) to the specified target slave address. The message to be sent is formatted as a string of comma- or space-separated hexadecimal byte values and Error Injection keywords. NOTE: Use the new ‘i2c_write’ function for an alternate and better way to write to target slaves. Used In: Master Emulation, Test Prototype:...
  • Page 378 send_message_PEC() Description: Sends a message (ie. performs a write operation) with a SMBus Packet Error Checking (PEC) byte to the specified target slave address. The PEC is a CRC-8 error-checking byte, calculated on all the message bytes (including addresses and read/write bits). The PEC is appended to the message as the last data byte.
  • Page 379 sense_discrete_level() Description: Reads the state of the specified discrete I/O line. Used In: Master Emulation, Test Prototype: sense_discrete_level(nDiscreteNumber) Example Call: nStatus = sense_discrete_level(1); //read the status of discrete I/O signal 1 Input Parameters: Integer indicating the discrete line to sense (1 or 2). nDiscreteNumber: Return Value: An integer indicating the value detected: 0 for low and 1 for high.
  • Page 380 set_clock_rate() Description: Overwrites a new hardware setup value for the SCL clock rate of the analyzer when talking on the bus. Used In: Master Emulation, Test Prototype: set_clock_rate(strKilohertz) Example Call: set_clock_rate("30.5"); //set clock rate to 30.5 KHz Input Parameters: String containing the clock rate to set, in kilohertz. The string is presumed to strKilohertz: represent a floating point numerical value.
  • Page 381 set_discrete_level() Description: Sets the static state of the specified discrete I/O line. Used In: Master Emulation, Test Prototype: set_discrete_level(nDiscreteNumber, nState) Example Call: set_discrete_level(2, 0); //set discrete I/O signal 2 to low Input Parameters: Integer indicating the discrete line to set (1 or 2). nDiscreteNumber: Integer indicating the state to which the discrete will be set.
  • Page 382 set_discrete_voltage() Description: Sets a new TTL voltage level for the high state of the discrete I/O signals. When sensing inputs, the CAS- 1000 will also use this setting to automatically determine adequate signal threshold values. Used In: Master Emulation, Test Prototype: set_discrete_voltage(strVolts);...
  • Page 383 set_high_voltage_thresold() Description: Overwrites a new hardware setup value for the high threshold voltage of the analyzer for detecting signal levels. Used In: Master Emulation, Test Prototype: set_high_voltage_threshold(strVolts) Example Call: set_high_voltage_threshold("1.85"); //set the high threshold to 1.85 Volts Input Parameters: String containing the high level threshold in volts. The string is presumed to strVolts: represent a floating point numerical value.
  • Page 384 set_low_voltage_thresold() Description: Overwrites a new hardware setup value for the low threshold voltage of the analyzer for detecting signal levels. Used In: Master Emulation, Test Prototype: set_low_voltage_threshold(strVolts) Example Call: set_low_voltage_threshold("0.85"); //set the high threshold to 0.85 Volts Input Parameters: String containing the low level threshold in volts. The string is presumed to strVolts: represent a floating point numerical value.
  • Page 385 set_pullup_resistance() Description: Overwrites a new hardware setup value for the pull-up resistors for both SDA and SCL bus signals. The pull-up resistor value is relevant only in Analyzer Supplied mode. Used In: Master Emulation, Test Prototype: set_pullup_resistance(strOhms); Example Call: //make sure in analyzer supplied mode set_pullup_resistance("7400");...
  • Page 386 set_reference_voltage() Description: Overwrites a new hardware setup value for the reference voltage supplied to the bus in Analyzer Supplied mode. Used In: Master Emulation, Test Prototype: set_reference_voltage(strVolts); Example Call: //make sure in analyzer supplied mode set_reference_voltage("2.3"); //set voltage to 2.3 V Input Parameters: String containing the voltage to set.
  • Page 387 set_rising_edge_drive_mode() Description: Turns on or off the Accelerated Rising Edge Drive, which accelerates the rising edge when analyzer is driving the bus. Used In: Master Emulation, Test Prototype: set_rising_edge_drive_mode(nMode) Example Call: set_ rising_edge_drive_mode (1); //turns on the Rising Edge Drive Input Parameters: Integer indicating the on/off mode to be set.
  • Page 388 set_timing_skew() Description: Sets new timing skew parameters for the analyzer. Following execution of this function, the timing relationship between SCL and SDA during analyzer driven communications will be adjusted according to the provided settings. The new setting will remain in effect even after the script is completed. Used In: Master Emulation, Test Prototype:...
  • Page 389 set_voltage_source() Description: Sets the bus reference voltage source as either the target or the Analyzer. Used In: Master Emulation, Test Prototype: set_voltage_source(nSource) Example Call: set_voltage_source(1); //set the voltage source to be the Analyzer Input Parameters: Integer indicating the voltage source. “0” for the target, and “1” for the Analyzer. nSource: Return Value: configuration set successfully...
  • Page 390 SMBus_proc_call() Description: Performs SMBus Process Call operation, which sends a command with a word of data to a slave and receives a word of data back from the slave as the return value. Slave Addr Command Data Byte L Data Byte H …...
  • Page 391 Transaction error. Error occurred during operation. NACK. No acknowledgement received from slave. Transaction timed out. Failed to detect transaction from the bus on time. Scripting Language...
  • Page 392 SMBus_proc_call_block() Description: Performs SMBus Block Write – Block Read Process Call operation, which sends a command with a block of data to a slave and receives a block of data back from the slave as the return value. Slave Addr Command Byte Cnt=M Data Byte 1...
  • Page 393 // send command "0x04" and 4 bytes of data "0x0A, 0xBB, 0x12, 0x45" // to slave with address "0xA2", and then read a block of data and PEC // from the slave to be stored into array "nArrDataRet". // Print out the data received or the error code. nArrDataRet = SMBus_proc_call_block(0xA2, 0x04, 4, int_array(0x0A, 0xBB, 0x12, 0x45), TRUE);...
  • Page 394 SMBus_quick() Description: Performs SMBus Quick command operation, which sends a slave address with a R/W# bit. Slave Addr SMBus Quick Command Protocol Used In: Master Emulation, Test Prototype: SMBus_quick(nAddress, nRW) Example Call: // send a quick command to a slave with address "0x18" with R/W# bit = 1 SMBus_quick(0x18, 1);...
  • Page 395 SMBus_read_block() Description: Performs SMBus Block Read operation, which sends a command and receives a block of data from a slave. Slave Addr Command Slave Addr Byte Cnt=N … Data Byte 1 Data Byte 2 … Data Byte N SMBus Block Read Slave Addr Command Slave Addr...
  • Page 396 print(string_format("Error [%d]", nArrData[0])); Input Parameters: Integer representing the address of the device to read from. nAddress: Integer representing the command to be sent. The lowest 8 bits are used only. nCommand: Integer (TRUE or FALSE) indicating whether to read an extra Packet Error bPEC: Checking (PEC) byte at the end of the message.
  • Page 397 SMBus_read_byte() Description: Performs SMBus Read byte operation, which sends a command and receives a byte of data from a slave. Slave Addr Command Slave Addr Data Byte SMBus Read Byte Protocol Slave Addr Command Slave Addr Data Byte … SMBus Read Byte Protocol with PEC Used In: Master Emulation, Test Prototype:...
  • Page 398 SMBus_read_word() Description: Performs SMBus Read word operation, which sends a command and receives a word of data from a slave. Slave Addr Command Slave Addr Data Byte L … Data Byte H SMBus Read Word Protocol Slave Addr Command Slave Addr Data Byte L …...
  • Page 399 PEC Error. CRC-8 mismatch occurred. SMBus_receive_byte() Description: Performs SMBus Receive byte operation, which receives a byte of data from a slave. Slave Addr Data Byte SMBus Receive Byte Protocol Slave Addr Data Byte SMBus Receive Byte Protocol with PEC Used In: Master Emulation, Test Prototype: SMBus_receive_byte(nAddress, bPEC=FALSE)
  • Page 400 SMBus_send_byte() Description: Performs SMBus Send byte operation, which sends a byte of data/command to a slave. Slave Addr Data Byte SMBus Send Byte Protocol Slave Addr Data Byte SMBus Send Byte Protocol with PEC Used In: Master Emulation, Test Prototype: SMBus_send_byte(nAddress, nByte, bPEC=FALSE) Example Call: // send byte "0xAB"...
  • Page 401 SMBus_write_block() Description: Performs SMBus Block Write operation, which sends a command code and a block of data to a slave. Slave Addr Command Byte Cnt=N Data Byte 1 … Data Byte 2 … Data Byte N SMBus Block Write Slave Addr Command Byte Cnt=N Data Byte 1...
  • Page 402 NACK. No acknowledgement received from slave. Transaction timed out. Failed to detect transaction from the bus on time. Scripting Language...
  • Page 403 SMBus_write_byte() Description: Performs SMBus Write byte operation, which sends a command code and a byte of data to a slave. Slave Addr Command Data Byte SMBus Write Byte Protocol Slave Addr Command Data Byte SMBus Write Byte Protocol with PEC Used In: Master Emulation, Test Prototype:...
  • Page 404 SMBus_write_word() Description: Performs SMBus Write word operation, which sends a command code and a word of data to a slave. Slave Addr Command Data Byte L Data Byte H SMBus Write Word Protocol Slave Addr Command Data Byte L Data Byte H …...
  • Page 405 string_array() Description: Declares and initializes an array of strings. Used In: Master Emulation, Test Prototype: string_array(str1, str2, ...) Example Call: arrStrNames = string_array(); // declares a new array variable "arrStrNames" arrStrCities = string_array("New York", "LA", "Chicago", "Washington"); // declares a new array variable "arrStrCities" and // initializes the values of first four items printf("arrStrCities[3] = %s", arrStrCities[3]);...
  • Page 406 string_compare() Description: String comparison helper function. Its behavior is similar to the standard string comparison function of the C library, strcmp(). Returns 0 if two strings contain the same contents, -1 if the first string is lexicographically before the second, and 1 otherwise. Used In: Master Emulation, Test Prototype:...
  • Page 407 string_concatenate() Description: String concatenation helper function. Its behavior is somewhat similar to the standard string concatenation function of the C library, strcat(). Returns a new string containing the concatenation of the input strings. Used In: Master Emulation, Test Prototype: string_concatenate(str1, str2) Example Call: byte1 = byte8(0x40);...
  • Page 408 string_format() Description: Returns a string generated from a sequence of arguments and a special format string. The parameters for this function are similar to the standard C functions, printf() and sprintf(). Used In: Master Emulation, Test Prototype: string_format(FormatString, arg1, arg2, ... ) Example Call: nNum = 3;...
  • Page 409 The Format String A format string consists of ordinary characters and also special conversion specifications. These conversion specifications are sequences that begin with the percent sign (“%”) followed by one or more of the following elements, in order: %[sign][padding][.precision]type 5) [sign] – An optional sign specifier, “+”, that forces a plus or minus sign to be included when a numeric argument is converted to a string.
  • Page 410 string_get_token_at() Description: Parses a given string and returns the string token specified by the given index. This function is useful for retrieving the string data returned by the ‘receive_message’ function call. NOTE: Use the new ‘i2c_read’ function for an alternate and better way to read from target slaves and to process data.
  • Page 411 Return Values: The integer value representing the number of tokens in the given string. Scripting Language...
  • Page 412 string_hex_to_integer() Description: Converts a string hexadecimal representation of an integer into an integer output. Used In: Master Emulation, Test Prototype: string_hex_to_integer(strValue) Example Call: " " strVal = nVal = string_hex_to_integer(strVal); // an integer value of 165 in decimal is stored to nVal variable Input Parameters: The string hexadecimal representation to be converted to an integer.
  • Page 413 string_num_of_tokens() Description: Parses a given string and returns the total number word tokens separated by spaces. This function is useful for retrieving the string data returned by the ‘receive_message’ function call. NOTE: Use the new ‘i2c_read’ function for an alternate and better way to read from target slaves and to process data.
  • Page 414 Return Values: The integer value representing the number of tokens in the given string. Scripting Language...
  • Page 415 string_substring() Description: Substring search helper function. Its behavior is somewhat similar to the standard substring search function of the C library, strstr(). Scans a base string for the first occurrence of some substring. If not found, returns an empty string, otherwise returns a string starting with the first occurrence of the substring in the base string and ending with the remainder of the base string.
  • Page 416 string_to_float() Description: Coverts a string decimal representation of a floating point value into a floating point output. Used In: Master Emulation, Test Prototype: string_to_float(strValue) Example Call: strVal = "3.14"; fVal = string_to_float(strVal); Input Parameters: The string decimal representation to convert to a float. strValue: Return Value: The floating point value represented by the input string.
  • Page 417 string_to_integer() Description: Converts a string decimal representation of an integer into an integer output. Used In: Master Emulation, Test Prototype: string_to_integer(strValue) Example Call: strVal = "253"; nVal = string_to_integer(strVal); Input Parameters: The string decimal representation to convert to an integer. strValue: Return Value: The integer value represented by the input string.
  • Page 418: Syntax Summary (Advanced Users Only)

    Syntax Summary (Advanced Users Only) The following is a syntax summary of the I2C Exerciser scripting language. It is intended for those with advanced understanding of programming language construction, who wish to better understand the limits and structure of the I2C Exerciser scripting language. It is not necessary to understand the below information in order to write I2C Exerciser script files.
  • Page 419 & && asgnop: = type-specifier: byte string statement: compound-statement expression; if (expression) statement if (expression) else statement if (expression) elseif (expression) statement while (expression) statement do statement while ( expression ); break; continue; return; return expression; goto identifier; identifier: statement compound-statement: { declaration-list statement-list } declaration-list:...
  • Page 420 statement statement statement-list declaration: type-specifiers init-declarator-list; init-declarator-list: init-declarator init-declarator, init-declarator-list init-declarator: identifier = expression program: external-definition external-definition program external-definition: function-definition data-definition function-definition: type-specifier function-declarator function-body function-declarator: declarator (parameter-list) parameter-list: type-specifier identifier type-specifier identifier, parameter-list Scripting Language...
  • Page 421 function-body: type-decl-list function-statement function-statement: { declaration-list statement-list } data-definition: type-specifier init-declarator-list; Scripting Language...
  • Page 422: Built-In Script Editor

    Built-In Script Editor The Editor window provides an integrated tool for creating or updating script text files, with syntax cognizance assistance. The editor can support all three script types, including Master, Slave, and Test. Features of the Editor window include: ...
  • Page 423: Figure 211. Editor Window

    Editor Window Operations The Editor Window, shown in Figure 211, facilitates manipulating of script code and syntax checking. A Syntax Check button is available at all times in the Tool Bar allowing the script to be scanned through to locate any syntax errors. Since the script files being edited are completely in text format, they can be edited outside of this application, however, the user will not enjoy the benefit of the syntax assistance and color-coding when using an external text editor.
  • Page 424: Figure 212. Editor Popup Menu

    Editor Popup Menu The Editor Popup Menu is accessed by right-clicking in the text area of the Editor window. It enables manipulation of bookmarks as well as editing operations. The menu is shown in Figure 212 followed by descriptions of the available commands. Figure 212.
  • Page 425: Figure 213. I2C Exerciser Editor Window Layout

    Editor Window Reference The Editor tool, shown in Figure 213, can be opened from the Tools menu. Table 26 describes the numbered areas of this window. Figure 213. I2C Exerciser Editor Window Layout Component Description Menu Bar Contains the menu bar for the active Editor window. Tool Bar Provides quick single-click access to commonly used commands for the active Editor window.
  • Page 426: Figure 214. Editor File Menu

    Editor Menu Bar When the Editor window is active, the Menu Bar accesses functions, including File, Edit, Tools, Window and Help, tailored to the this screen. The last three menu items are identical to that of the Monitor windows, detailed in the Monitor section. Editor File Menu The File menu shown in Figure 214 includes options to load and save projects as well as script files.
  • Page 427: Figure 215. Editor Edit Menu

    Editor Edit Menu The Edit menu shown in Figure 215 provides commands that apply to the editing of the current script. Figure 215. Editor Edit Menu Undo – Reverts a previously completed editing operation. Redo – Restores a previously undone editing operation. Cut –...
  • Page 428 Syntax Check – Checks the syntax of the current script without executing it. The result of the syntax check is displayed in a popup message box. If a syntax error is found, any line associated with the error will also be marked in the left-hand gutter. Note that some errors cannot be detected before execution, such as function calls with an invalid number of arguments or unexpected argument types.
  • Page 429: Figure 216. Editor Tool Bar

    Editor Tool Bar The Editor Tool Bar provides quick single-click access to commonly used commands in the Editor window. Table 27 describes the tool bar functions. Figure 216. Editor Tool Bar Icon Name Function Description New File Opens a new, empty script into the Editor. All bookmarks are cleared.
  • Page 430: Table 27. Editor Tool Bar Icon Descriptions

    Icon Name Function Description Replace Opens a standard text replace dialog where the search text of interest is entered along with the replacement text. The current script is searched and any occurrences of the search text are substituted with the replacement text. Syntax Check Checks the syntax of the current script without executing it.
  • Page 431: Chapter 14 Glitch Pattern Injection

    Chapter 14 Glitch Pattern Injection Glitch Pattern Injection overview and descriptions Overview The Glitch Pattern Injection feature allows you to inject glitches into the normal flow of traffic by forcing the SDA and SCL signals to high or low levels. Using this tool, you can inject most simple to very complex glitch patterns onto the target bus.
  • Page 432: Using The Glitch Pattern Editor

    Using the Glitch Pattern Editor A glitch pattern consists of up to 1022 clock cycles worth of SDA and SCL levels. In addition, the triggering condition for glitch injection is also considered a part of the glitch pattern information. The Glitch Pattern Editor a very powerful and easy to use tool for creating and testing the glitch patterns interactively.
  • Page 433: Figure 218. Glitch Injection Trigger Conditions

    In addition to the glitch pattern itself, you must also specify the trigger condition for commencing the pattern injection. This condition consists of a bus cycle and/or an edge direction of the SDA or SCL signal. The edge direction parameter is only applicable for address and data cycles. You can define the triggering condition in the Glitch Injection Trigger Setup section of the window (5).
  • Page 434: Figure 219. Default Glitch Pattern Setting

    Figure 219. Default Glitch Pattern Setting 3. Now start the Monitor tool by pressing the F11 key. Click on the Yes and Close buttons if prompt for voltage settings. Minimize the Monitor Tools dialog. 4. In the Glitch Pattern Editor window, click on the Arm Trigger button to arm the trigger for glitch injection.
  • Page 435: Figure 221. Sda Low Glitch Waveform

    6. Now go back to the Glitch Pattern Editor window by selecting the Glitch Pattern Editor item from the Window menu. Click on the View Waveform button. Then you will see the actual shape of the glitch captured by the analyzer. Figure 221.
  • Page 436: Figure 222. Glitch Pattern Editor File Menu

    If you need to generate glitches through the Master or Slave Emulation, you will need to save the glitch pattern information you defined to a file. This can be done by using the file menu described below. Figure 222. Glitch Pattern Editor File Menu New Glitch Pattern File…...
  • Page 437: Adding Glitch Patterns To Master And Slave Emulation

    Therefore, depending on the triggering condition defined in the glitch pattern file (simple1.gpf), the glitch can be injected anywhere from the start bit to the stop bit of the message. main() load_glitch("C:\\Corelis Examples\\I2C Exerciser\\Samples\\simple1.gpf", TRUE); send_message(0x18, FALSE, "12 34 AB CD", TRUE); Glitch Pattern Injection...
  • Page 438 This type of injection is useful when you want to inject the glitch to a particular data byte within a message. main() load_glitch("C:\\Corelis Examples\\I2C Exerciser\\Samples\\simple1.gpf", FALSE); send_message(0x18, FALSE, "12 ARM_GLITCH 34 AB CD", TRUE); [Example 3] In the following example, the glitch pattern and the trigger are armed before the master receives the message.
  • Page 439 While this script is running, you can start the transactions between your target master and slave devices to test their behaviors when the glitches are injected. You can add variations to this example to create more complexity in timing and pattern. main() load_glitch("C:\\Corelis Examples\\I2C Exerciser\\Samples\\simple1.gpf", TRUE); while (TRUE) pause(500); reload_glitch(TRUE);...
  • Page 440 // case 1) Master Reading from Emulated Slave #glitch_pattern_file (C:\Corelis Examples\I2C Exerciser\Samples\simple1.gpf) ARM_GLITCH 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F...
  • Page 441 Glitch Pattern Injection...
  • Page 443: Appendix Acas-1000-I2C Hardware Reference

    Appendix A CAS-1000-I2C Hardware Reference Hardware Specifications Physical Mechanical 5.48 +/- 0.10 x 1.00 +/- 0.10 x 4.75 +/- 0.10 inches Dimensions – box Operating Environment Temperature 0°C to 55°C Relative Humidity 10% to 90%, non-condensing Storage Environment Temperature -40°C to 85°C USB Interface USB Connector Standard Type B Socket...
  • Page 444: Electrical Specifications

    Electrical Specifications Target I2C Signals Serial Bus Connector RJ45, AMP P/N 406549-1 (or equivalent) Prior to launching the I2C Exerciser application, both LEDs will be lit while plugged into a powered host PC. Once the application is running, the LEDs have the following meaning: Green LED –...
  • Page 445 Programmable SDA/SCL Reference Pull-up resistor (in Analyzer Supplied mode) starting at a Pull-up Resistors base approximate value of 250 ranging up to 50K ohms in an assortment of 64 values. Available values are 250, 1000, 1850, 2650, 3450, 4200, 5000, 5800, 6600, 7400, 8200, 9000, 9750, 10550, 11350, 12150, 12950, 13750, 14550, 15350, 16100, 16900, 17700, 18500, 19300, 20100, 20900, 21700, 22450, 23250, 24050, 24850, 25650, 26450, 27250,...
  • Page 446 - The CAS-1000-I2C/E supports SCL frequencies of up to 5 MHz, but actual performance may be limited due to target bus conditions, such as parasitic capacitance and pull-up resistance (rise-time). - Standard/Fast/Fast-mode Plus is supported for master emulation and monitoring up to 5MHz;...

Table of Contents