SourcePoint Intel Help
Table of Contents
- Using Help
- Contacting ASSET InterTech
- Introduction to SourcePoint
- SourcePoint Environment
- SourcePoint Overview
- SourcePoint Parent Window Introduction
- SourcePoint Icon Toolbar
- File Menu
- File Menu - Project Menu Item
- File Menu - Layout Menu Item
- File Menu - Program Menu Item
- File Menu - Macro Menu Item
- File Menu - Print Menu Items
- File Menu - Update Emulator Flash Menu Item
- File Menu - Program Target Device Menu Item
- File Menu - Other Menu Items
- Edit Menu
- View Menu
- Processor Menu
- Options Menu
- Options Menu - Preferences Menu Item
- Options Menu - Target Configuration Menu Item
- Options Menu - Load Target Configuration File Menu Item
- Options Menu - Save Target Configuration File Menu Item
- Options Menu - Emulator Configuration Menu Item
- Options Menu - Emulator Connection Menu Item
- Options Menu - Emulator Reset Menu Item
- Options Menu - Confidence Tests Menu Item
- Window Menu
- Help Menu
- How To -- SourcePoint Environment
- Add Emulator Connections
- Configure Custom Macro Icons
- Configure Autoloading Macros
- Display Text on the Icon Toolbar
- Edit Icon Groups to Customize Your Toolbars
- Modify a Defined Memory Region
- Refresh SourcePoint Windows
- Save a Program
- Start SourcePoint With Command Line Arguments
- Use the New Project Wizard
- Verify Emulator Network Connections
- SourcePoint Overview
- Breakpoints Window
- Breakpoints Window Overview
- How To - Breakpoints
- Code Window
- Command Window
- Command Window Overview
- Confidence Tests Window
- Confidence Tests Window Overview
- Descriptors Tables Window
- Descriptors Tables Window Overview
- How To - Descriptors
- Devices Window
- Devices Window Overview
- How To - Devices Window
- Log Window
- Log Window Overview
- Memory Window
- Memory Window Overview
- How To - Memory Window
- Page Translation Window
- Page Translation Windows Overview
- PCI Devices Window
- PCI Devices Window Overview
- How To - PCI Devices Window
- Registers Window
- Registers Window Overview
- How To - Registers
- Symbols Windows
- Symbols Window Overview
- How To - Symbols Window
- Trace Window
- Trace Window Overview
- How To - Trace Window
- Advanced
- Viewpoint Window
- Viewpoint Window Overview
- Watch Window
- Watch Window Overview
- How To - Watch Window
- Technical Notes
- Descriptor Cache: Revealing Hidden Registers
- UEFI Framework Debugging
- Memory Casting
- Microsoft PE Format Support in SourcePoint
- Multi-Clustering
- Python/CScripts
- OpenIPC Integration, Installation and Usage
- Registers Keyword Table
- SourcePoint Licensing
- Stepping
- Symbols Textsym Format
- Target Configuration
- Using Bookmarks
- Which Processor Is Which
- Getting Started with DbC
- SourcePoint Command Language
- Overview
- Commands and Control Variables
- aadump
- abort
- abs
- acos
- advanced
- asin
- asm
- asmmode
- atan
- atan2
- autoconfigure
- base
- bell (beep)
- bits
- break
- breakall
- cachememory
- cause
- Character Functions
- clock
- continue
- cos
- cpubreak commands
- cpuid_eax
- cpuid_ebx
- cpuid_ecx
- cpuid_edx
- createprocess
- cscfg, local_cscfg
- csr
- ctime
- cwd
- dbgbreak commands
- defaultpath
- #define
- define
- definemacro
- deviceconfigure
- devicelist
- devicescan
- disconnect
- displayflag
- do while
- dos
- dport
- drscan
- edit
- editor
- emubreak, emuremove, emudisable, emuenable
- emulatorstate
- encrypt
- error
- eval
- evalprogramsymbol
- execution point ($)
- exit
- exp
- fc
- fclose
- feof
- fgetc
- fgets
- first_jtag_device
- flist
- flush
- fopen
- for
- forward
- fprintf
- fputc
- fputs
- fread
- fseek
- ftell
- fwrite
- getc
- getchar
- getnearestprogramsymbol
- getprogramsymboladdress
- gets
- globalsourcepath
- go
- halt
- help
- homepath
- idcode
- if
- include
- invd
- irscan
- isdebugsymbol
- isem64t
- isprogramsymbol
- isrunning
- issleeping
- issmm
- itpcompatible
- jtagchain
- jtagconfigure
- jtagdeviceadd
- jtagdeviceclear
- jtagdevices
- jtagscan
- jtagtest
- keys
- last
- last_jtag_device
- left
- libcall
- license
- linear
- list, nolist
- load
- loadbreakpoints
- loadlayout
- loadproject
- loadtarget
- loadwatches
- log, nolog
- log10
- loge
- logmessage
- macropath
- Memory Access
- messagebox
- mid
- msgclose
- msgdata
- msgdelete
- msgdr
- msgdump
- msgir
- msgopen
- msgreturndatasize
- msgscan
- msr
- num_activeprocessors
- num_all_devices
- num_devices
- num_jtag_chains
- num_jtag_devices
- num_processors
- num_uncore_devices
- openipc
- pause
- physical
- port
- pow
- print cycles
- printf
- proc
- processorcontrol
- processorfamily
- processormode
- processors
- processortype
- projectpath
- putchar
- puts
- rand
- readsetting
- reconnect
- Register Access
- reload
- reloadproject
- remove
- reset
- restart
- return
- right
- runcontroltype
- safemode
- save
- savebreakpoints
- savelayout
- savewatches
- selectdirectory
- selectfile
- shell
- show
- sin
- sizeof
- sleep
- softbreak, softremove, softdisable, softenable
- sprintf
- sqrt
- srand
- step
- stop
- strcat
- strchr
- strcmp
- strcpy
- _strdate
- string [ ] (index into string)
- strlen
- _strlwr
- strncat
- strncmp
- strncpy
- strpos
- strstr
- _strtime
- strtod
- strtol
- strtoul
- _strupr
- swbreak
- switch
- swremove
- tabs
- tan
- tapdatashift
- tapstateset
- targpower
- targstatus
- taskattach
- taskbreak, taskremove, taskdisable, taskenable
- taskend
- taskgetpid
- taskstart
- tck
- time
- uncoreconfigure
- uncorescan
- #undef
- unload
- unloadproject
- upload
- use
- verify
- verifydeviceconfiguration
- verifyjtagconfiguration
- version
- viewpoint
- vpalias
- wait
- wbinvd
- while
- windowrefresh
- wport
- writesetting
- yield
- yieldflag
Trace Hub Metadata
The Trace Hub metadata is one or more XML files used by SourcePoint to format and display Trace Hub trace data. ย It includes information about the masters and channels in a system. ย This includes names, display formats, and system-wide settings. ย
The metadata is used for display purposes only. ย It is not required to decompress the Trace Hub trace stream. ย If metadata is not present, hex values will be displayed for master and channel names, and ASCII will be the default display format.
Following is a description of the different sections contained in the metadata file(s):
Files Section
The Trace Hub metadata can be contained in a single XML file, or multiple XML files. ย The files section is used to specify additional metadata files to process. ย File paths can be absolute or relative to the location of the top level file. ย There is no limit to the levels of file nesting.
Following is an example of nested metadata files. ย The top level file (specified in the Trace Hub Configuration tab) includes two additional files:
<files>
ย ย ย ย <file name="SKL ports1.xml"/>
ย ย ย ย <file name="C:\Users\harry\Documents\Project files\SKL ports2.xml"/>
</files>
ย
Settings section
The Settings element contains system-wide settings. ย These settings apply to all masters and channels in the system.
<settings>
ย ย ย ย <setting name="mark terminates message" value="false"/>
ย ย ย ย <setting name="newline terminates message" value="false"/>
ย ย ย ย <setting name=โpayload nibbles swappedโ value="true"/>
ย ย ย ย <setting name="master/channel display base" value="decimal"/>
</settings>
ย
Messages are made up of multiple Trace Hub data packets. ย Data packets can be โmarkedโ to indicate message boundaries. ย Whether a marked packet contains the first byte(s) of a message, or the last byte(s) of a message, depends on the software generating the messages. ย
The โmark terminates messageโ attribute is used to inform SourcePoint how marks are to be interpreted. ย If the "mark terminates message" setting is set to true, marks terminate a message. ย If the "mark terminates message" attribute is set to false, marks begin a message.
Newlines can be implied to terminate ASCII messages. ย If the "newline terminates message" attribute is true then newlines end a message. ย If messages contained multiple lines, then this setting should be set to false.
The โpayload nibbles swappedโ attribute needs to be set on certain early Trace Hub implementations.
The โmaster/channel display baseโ attribute controls the display base of master and channel numbers. ย The default is โhexโ.
Masters Section
The masters element defines the masters and channels in a system. ย These include master names, channel names, and display formats. ย Following are two simple master definitions:
<masters>
ย ย ย ย <master id="0x74" name="P1" format="ASCII">
ย ย ย ย ย ย ย ย ย ย <channels>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x43" name="Norwegian"/>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x45" name="Blue"/>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x4a" name="Parrot"/>
ย ย ย ย ย ย ย ย ย </channels>
ย ย ย ย </master>
ย ย ย ย <master id="0x75" name="P2" format="ASCII">
ย ย ย ย ย ย ย ย ย ย <channels>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x20" name="Walter"/>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x21" name="White"/>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x22" name="Heisenberg" format="hex"/>
ย ย ย ย ย ย ย ย ย ย </channels> ย
ย ย ย ย </master>
</masters>
ย
The first master corresponds to master number 0x74 (master numbers are dependent on the target hardware). ย The metadata file associates the name โP1โ with master number 0x74. ย When data from this master is displayed in the Trace view, โP1โ will be displayed instead of 0x74.
There are 3 channels defined for master P1 (usually there would be many more). ย Channel numbers are dependent on the software generating the Trace Hub trace data. ย The metadata associates the name โBlueโ with channel number 0x45. ย Without the metadata file, the Trace view will display the master and channel as 74:45. ย With the metadata file, the Trace view will display the master and channel as P1:Blue.
Each individual channel can have its own display format (more on display formats later). ย If all channels in a master use the same display format, then the format can be specified at the master level. ย This is the case for master P1 which specifies a display format of โASCIIโ for all channels.
If most channels in a master are one display format, and a few channels are a different display format, then the display format can be overridden at the channel level. ย This is the case for channel 0x22 in master P2. ย Instead of displaying ASCII data, hex data will be displayed.
Display Formats
The following display format are supported:
ASCII. ย Data packets are collected and displayed as a single ASCII string. ย Strings are delimited by data markers, flag packets, null characters or optionally newline characters.
Example: format="ASCII"
Hex. ย Each Trace Hub data packet is displayed as a single hex value. ย The Size attribute specifies the display size.
Example: format="hex" size="32"
Tabular Hex. ย Data packets are collected and displayed as tabular hex data. ย The Columns and Size fields are used for formatting. ย Tabular data is delimited by either data markers or flag packets.
Example: format="tabular hex" columns="16"
Hosted Printf. ย Similar to ASCII string display, but SourcePoint performs the printf. See Hosted_Printf for more information.
Example: format="hosted printf"
Table Printf. ย Similar to ASCII string display, but SourcePoint performs the printf. See Table_Printf for more information.
Example: format="table printf"
Bitfields. Displays a value as a series of bit fields rather than as a single hex value. ย See Bit_Fields for more information.
Example: format="bit field" ย template="myBitData"
Display Format Usage
Display formats can be specified at two different levels: per master, or per channel. ย This design is meant to minimize the size of the metadata. ย
Example ย - Most channels of a master display ASCII data, but a few display hex data. Set the master display format to ASCII, and override the default at the channel level.
Note: ย This design does not allow a single channel to use a mix of display formats. ย If this is desired, then a pair of channels should be allocated.
Bit Fields
Bit fields display an 8, 16, 32 or 64-bit value as a series of bit fields rather than as a single hex value. ย There are two ways to specify a bit field definition. ย It can be entered in the channel definition, or if there are multiple channels that share the same bit field format, it can be entered as a bit field template, and referenced by name.
Example 1 โ Bit field definition in channel definition
The following defines 3 bit fields in a 32-bit value. ย The start attribute indicates the starting bit position for the field. ย The size attribute specifies the size in bits of the field.
<channel id="0x26" name="blue" format="bit field">
ย ย ย ย <bitfields size="32" format="a=%04X, b=%02X, c=%02X">
ย ย ย ย ย ย ย ย <bitfield start="16" size="16"/>
ย ย ย ย ย ย ย ย <bitfield start="0" size="8"/>
ย ย ย ย ย ย ย ย <bitfield start="8" size="8"/>
ย ย ย ย </bitfields>
</channel>
ย
The bit field display format is defined by a user-specified printf format string (format above). The arguments to printf are the bit fields in the order they appear in the metadata. ย Assuming a 32-bit hex value of 0x12345678, the output will look like this:
ย
a=1234, b=78, c=56
Example 2 โ Bit field definition from a bit field template
The following example generates the same output as Example 1, but uses a bit field template. ย The bit fields are defined once (in the bit field templates section), and a name is assigned to the template (in this case myBitData). ย The channel definition then references the bit field template by name.
<channel id="0x26" name="blue" format="bit field" template="myBitData"/>
ย
<bitfieldtemplates>
ย ย ย ย <bitfields name="myBitData" size="32" format="a=%04X, b=%02X, c=%02X">
ย ย ย ย ย ย ย ย <bitfield start="16" size="16"/>
ย ย ย ย ย ย ย ย <bitfield start="0" size="8"/>
ย ย ย ย ย ย ย ย <bitfield start="8" size="8"/>
ย ย ย ย </bitfields>
</bitfieldtemplates>
ย
Enumerations
Enumerations are used to show strings instead of values in bit fields. ย In the following example there are two enumerations defined: โanimalsโ and โpeopleโ. ย In the bit field definition, the second field specifies that the value is to be displayed using the โanimalsโ enumeration.
<bitfields size="32" format="a=%04X, b=%s, c=%02X">
ย ย ย <bitfield start="16" size="16"/>
ย ย ย <bitfield start="0" size="8" enumeration="animals"/>
ย ย ย <bitfield start="8" size="8"/>
</bitfields>
ย
<enumerations>
ย ย ย ย <enumeration name="animals">
ย ย ย ย ย ย ย ย <item name="cat" value="0x78"/>
ย ย ย ย ย ย ย ย <item name="dog" value="0x44"/>
ย ย ย ย </enumeration>
ย ย ย ย <enumeration name="people">
ย ย ย ย ย ย ย ย <item name="bob" ย ย value="0"/>
ย ย ย ย ย ย ย ย <item name="carol" value="1"/>
ย ย ย ย ย ย ย ย <item name="ted" ย ย value="2"/>
ย ย ย ย ย ย ย ย <item name="alice" value="3"/>
ย ย ย ย </enumeration>
ย </enumerations>
ย
Assuming a 32-bit hex value of 0x12345678, the display will look like this ("cat" displayed instead of "78"):
a=1234, b=cat, c=56
Hosted Printf - Normal
The Hosted Printf display format specifies that SourcePoint should perform the printf rather than target software. ย This is accomplished by emitting the address of the printf format string, and the printf arguments as data packets. ย This greatly reduces the number of bytes traced. ย
For example, the following printf call generates 28 bytes of trace data if the printf is performed by target software. ย Using Hosted Printf results in only 12 bytes of trace data.
printf("index = %2d, value = %08X", _nIndex, _nValue)
An additional advantage of Hosted Printf is the decreased processing time for target software to generate the message. ย Rather than executing potentially millions of printfs (which may be thrown away if the trace buffer wraps), the printfs are performed just-in-time by SourcePoint as they are displayed.
Note: Hosted printf requires changes to target software generating the Trace Hub data. ย Contact ASSET InterTech for more information.
ย
Note: Hosted printf can only be used on systems where the program traced is either still in memory, or loaded into the SourcePoint (SourcePoint needs access to the original printf format string).
Hosted Printf โ Table-based
Table-based Hosted Printf is identical to normal Hosted Printf except the format strings come from tables in the metadata. ย Rather than the address of the format string being emitted with the trace data, a key value is generated instead. ย The key can be 8, 16, 32 or 64 bits.
Following is an example of a format string table and how to use it:
<master id="0x77" name="Table" format="ASCII">
ย ย ย ย ย ย <channels>
ย ย ย ย ย ย ย ย ย ย <channel id="0x20" name="Printf" format="Table printf" table="table1"/>
ย ย ย ย ย ย </channels> ย
</master>
ย
<messagetables>
ย ย ย ย ย <messagetable name="table1">
ย ย ย ย ย ย ย ย ย <message id="0x1000" format="This is test 1: %08X"/>
ย ย ย ย ย ย ย ย ย <message id="0x20000000123" format="This is test 2: %016llX"/>
ย ย ย ย ย ย ย ย ย <message id="0x3000" format="This is test 3"/>
ย ย ย ย ย </messagetable>
ย </messagetables>
ย
Trace View Coloring
Masters and Channels can be displayed in different colors in the Trace view (background colors only). ย To display all channels in a particular master with the same color, a color attribute is specified at the master level. ย To display an individual channel with a different color, specify the color at the channel level.
ย
Up to eight different colors can be used. ย These colors are shared with the eight different colors used in processor trace display. ย Press Colors in the Trace Display Settings dialog to access these color settings. ย The colors are labelled Processor 0 โ Processor 7. ย If a color is not specified, then the default color (labelled TraceHub) will be used. ย
ย
Following is an example of specifying colors. ย All channels within the master use color 2, except for channel 22, which uses color 3.
ย
<master id="0x78" name="SVEN" format="Hosted printf" color="2">
ย ย ย ย ย ย ย ย ย ย <channels>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x20" name="Parrot"/>
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x21" name="Blue"/> ย ย ย ย ย ย ย ย ย ย ย ย ย
ย ย ย ย ย ย ย ย ย ย ย ย ย ย <channel id="0x22" name="Spam" color="3"/> ย ย ย ย ย ย ย ย
ย ย ย ย </channels> ย
ย ย ย ย </master>
ย
ย ย ย ย