SourcePoint AMD 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
- Viewpoint Window
- Viewpoint Window Overview
- Watch Window
- Watch Window Overview
- How To - Watch Window
- Technical Notes
- 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
- ctime
- cwd
- dbgbreak commands
- defaultpath
- #define
- define
- definemacro
- deviceconfigure
- devicescan
- disconnect
- displayflag
- do while
- dos
- dport
- drscan
- edit
- editor
- 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
- jtagchain
- jtagconfigure
- jtagdeviceadd
- jtagdeviceclear
- jtagdevices
- jtagscan
- jtagtest
- keys
- last
- last_jtag_device
- left
- 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
- 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
- #undef
- unload
- unloadproject
- upload
- unlock
- use
- verify
- verifydeviceconfiguration
- verifyjtagconfiguration
- version
- viewpoint
- vpalias
- wait
- wbinvd
- while
- windowrefresh
- wport
- writesetting
- yield
- yieldflag
Memory Access
Display and modify memory.
Syntax
To display memory:
ย ย ย [[px]] data-type addr-spec [display-base]
To modify memory:
ย ย ย [[px]] data-type addr-spec = {expr[,...] | data-type addr-spec | debug-var-array}
To fill memory:
ย ย ย [[px]] data-type destination-range = expr
To copy memory:
ย ย ย [[px]] data-type destination-range = data-type source-range
Where:
[px] |
is the viewpoint override, including punctuation ( [ ] ), specifying that the viewpoint is temporarily set to processor x of the boundary scan chain. ย The processor can be specified as px (where x is the processor ID), or an alias you have defined for a given processor ID. ย ALL cannot be used as a viewpoint override. |
data-type |
specifies the data type used to access memory (e.g., ord1, ord2, ord4, etc.). For more information, see Data Types. |
expr |
specifies a number or an expression. You can enter more than one expression by using a comma as a separator. |
addr-spec |
{addr | addr-range} |
addr |
specifies an address. For more information, see Memory Access: Addresses, found later in this topic. |
addr-range |
is an address range. ย There are two ways to specify a range: addr1 to addr2 or addr length expr. |
destination-range |
is a range of memory to write. |
source-range |
is a range or memory to read. |
addr1 to addr2 |
specifies a range of memory beginning with address addr1 and including address addr2. Addr2 must be greater than addr1. |
addr length expr |
specifies a range of memory beginning with address addr1. ย The range includes a number of items (specified by expr). |
expr |
specifies a number or an expression. You can enter more than one expression by using a comma as a separator. |
debug-var-array |
is an array of debug variables to write to memory (e.g., ord4 data[10]). |
display-base |
specifies a temporary override of the current display base (bin | oct | dec | hex). |
Discussion
For memory read commands, the requested data is displayed in the current base (specified by the base control variable), unless an override is specified. Addresses are always displayed in hexadecimal. If the data-type is ord1 (or byte), the ASCII representation of the data is shown on the right-hand side of the screen with non-printing characters displayed as a period.
Memory is read using the viewpoint processor unless a processor override is specified.
For a memory copy command, the source and destination ranges may not overlap, and the destination range must be equal to or greater than the source range. If the destination range is larger, the source data are repeated to fill the destination range of memory.
The data-type size is the resolution used for copy or fill. Only complete data items are written to the destination, and the source and destination data-types must match.
You can also use memory access commands in an expression. For example, define ord4 var1 = byte 100hp takes the value at location 100hp, translates it to an ord4, and puts in a debug variable name var1.
When a memory access operation is part of an expression, ranges of addresses are not allowed.
Note: If verify=true, the emulator reads back what is written.
Example 1
To display a byte of memory:
Command input:
int1 20000h
Result:
42H
Example 2
To write 32 bits of memory at address 100:
Command input:
ord4 100 = 12345678
ord4 100
Result:
12345678H
Example 3
To set a debug variable from 4 bytes of memory at addr 1000p:
Command input:
define ord4 myData = ord4 1000p
Example 4
To fill a range of memory with a single value and then display the range:
Command input:
ord1 100h length 20h = 30h
ord1 100h length 20h
Result:
00000100 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
00000110 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
Example 5
To copy a range of memory:
Command input:
ord1 200h length 20h = 42
ord1 100h length 10h = ord1 200h length 10h
ord1 100h length 10h
Result:
00000100 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
Example 6
To write a repeating sequence of values and display the new values:
Command input:
ord2 700h length 5t = 1,2,3
ord2 700h length 5t
Result:
00000700 0001 0002 0003 0001 0002
Example 7
To copy a value from one memory location to another and read the new value:
Command input:
ord1 200hp = ord1 100hp
ord1 200hp
Result:
42H "B"
Example 8
To copy the contents of a file to target memory at address 0:
Command input:
define ord4 file1
define ord4 nItemsRead
define ord1 buf[1000]
define ptr pMem = 0
ย
file1 = fopen("test.dat", "r")
while (feof(file1) == 0)
{
ย ย ย nItemsRead = fread(buf, file1)
ย ย ย ord1 pMem length nItemsRead = buf
ย ย ย pMem += nItemsRead
}
fclose(file1)
Example 9
To copy the first 50 bytes of an array to target memory at address 0:
Command input:
define ord1 buf[1000]
define ptr pMem = 0
ord1 pMem length 50 = buf ย ย ย ย ย ย ย // copy first 50 bytes
Example 10
To copy target memory beginning at address 1000h into an nstring variable (note that memory is read until a terminating null character is found, or until 1000 characters have been read):
Command input:
define nstring filename = nstring 1000h
filename
ย
Result:
"c:\doc\test.txt"
ย
Memory Access: Addresses
This section describes addresses used for memory access commands.
Syntax
expr [ p ]
Where:
expr |
specifies a number or an expression that will evaluate to a virtual address . |
p |
causes an address to be interpreted as a physical address. |
Discussion
Use memory access commands to access memory in the target system. ย When the <addr> option appears in the syntax guide, enter an appropriate address, pointer debug variable, or an expression that evaluates to an address.
The emulator supports physical and virtual addressing. It assumes that numeric addresses are virtual unless overridden by a "p" (without quotation marks) suffix for physical address.
Virtual Address
A virtual address is the default emulator address type. The Memory Management Unit allows an address to be mapped to a different physical address. This is frequently used to manage physical memory allocation, as in the case where memory allocation of multiple processes with potentially conflicting address mappings is needed.
Physical Address
A physical address is the address used as an index into physical memory.
Related Topics:
ย
ย