 |
Title: | Custom register configuration in visionProbe, visionIce II, Wind Power ICE, Wind River Probe and Wind River ICE |
| SPR: | N/A | Patch: | N/A |
| Host: | All | Architecture: | All | BSP: | N/A | Product: | visionPROBE II Version: All |
|
| | | |
Problem Description |
This tech tip is for Hardware-, Firmware-, and Software engineers who
work with Registers in microprocessors, microcontrollers, or peripheral
devices.
In order to use visionICE / visionPROBE / Wind Power ICE / Wind
River ICE / Wind River Probe tools with targets where the tools do not
have a predefined register list, you need to establish the register
list by using a text editor and the commands detailed in this note.
Target-specific register setup is supported by visionICE
II, visionPROBE, Wind Power ICE, Wind River Probe and Wind
River ICE. Older visionICE I emulators allow the setup of a
list of "Custom" registers and do not allow the creation of new
register groups. For information on the use of custom
registers with the visionIce I, please refer to tech tip entitled
Custom register configuration in visionIce I. |
| Problem Solution | First, an example from existing register definition files:
REM SC CONFIGURATION: First, erase all existing registers:
SC GRP ERASE
SCGA
GEN SCR FFB00000 4006A300 /r SCGA
GEN SSR FFB00004 0A80042F
SCGA
GEN PLLCR
FFB00008 06000000 SCGA
GEN SOFTSR FFB0000C 00000000 /no_in
SCGA
MPC107_PCI VENDOR 00000000 1057 /r(nwf)
/w(nwf) /r /ua:1 /lendian
SCGA MPC107_PCI ADDR_00 00000000 80000000 /wo /hide /w /ua:0 /lendian
SCGA MPC107_PCI ID
00000002 0004 /r(nwf) /w(nwf)
/r /ua:1 /lendian
SCGA MPC107_PCI ADDR_02 00000000 80000002 /wo /hide /w /ua:0 /lendian
SCGA
MPC107_PCI PCICMD 00000000 0004 /r(nwf)
/w(nwf) /ua:1 /lendian
SCGA MPC107_PCI ADDR_04 00000000 80000004 /wo /hide /w /ua:0 /lendian
The following pages describe the command syntax as well as additional commands for register definition in emulator firmware.
SCGA <GroupName> <RegisterName> <Address> <Data> [ <options> ? ]
This command adds <registername> register to the
<groupname> register group. If the group does not exist, it will
be created. Current emulator firmware supports up to 32 groups with a
total of 960 registers.
General SCGA Options :
/cpur register is a CPU core register (i.e SPR, or other non-memory mapped register).
SCGA SIM_MMU SIM_IBATOL 4014 00000004 /cpur
This example creates a new group, SIM_MMU. This example also
features read/write definition of the PowerPC core bat array register
located at address 0x4014. The register definitions for the 82xx
processor are defined on page 5. By Default, newly created groups are
disabled. To enable the group utilize the CF GRP command.
/hide : Register will not be visible during an SC or DR command except SC/SCG UPLOAD.
/lendian little endian register. This will work only on
target CPUs able to switch between little endian and big endian mode.
/memr register is a memory mapped register (default for self-defined registers).
/no_in register will not be set on target during an emulator IN sequence.
/r , /rw : Read Only and Read/Write Flags. Default is /rw
/Sz:B , /Sz:W , /Sz:L , /Sz:D Allows to force the
size of the register: Byte (8 bits), Word (16 bits), Long (32 bits),
Double (64 bits). Default register size is determined by the amount of
characters used to specify the default value.
/va_dr used on anchor register to make them available on DR command ( IMMR on powerpc ).
/w , /rw : Write Only, and Read/Write Flags. Default is /rw
/wo : Defines a fixed value register. It will not be affected by an SCT copy command.
/w(nwf) : write cycle ( next write first ) :
indicate that to write a value to this register, you need to write the
following register value to the target first. example : SCGA MPC_PCI PCICMD 80000CFC 0600 /w(nwf) /r(nwf) SCGA MPC_PCI ADDR_04 80000CF8 04000080 /wo /hide
This example features read/write definition of a PCICMD register ( like in MPC107 / MPC 106 ).
In order to access this PCICMD register on the PCI-bus controller, a write to the ADDR_04 ?register? is required first.
/r(nwf) : read cycle ( next write first
). This is similar to the /w(nwf) option, it allows to read
the register by writing to the next ?register? first.
/w(nwa) : write cycle ( next write after ) : indicates
that to write a value to this register, you need to write the next
register value to the target afterwards.
Advanced SCGA options ( Wind River internal use only ):
/ua:<x> , /sa:<x> emulator-internal options
?set anchor? and ?use anchor?. An anchor is used as reference/base
address on which to attach registers. These are emulator-internal
options for use with an anchor as reference, the maximum amount of
available anchors is 8. Please note that an anchor may rely
on emulator-internal subroutines. Anchors are CPU-specific and there
shall be no application code on the anchor address you want to use.
/ue:<x> emulator-internal option
The associated register will use an emulator-internal ?extended
function? to obtain/set it's target content. The extended functions are
CPU-dependant, please consult the factory when using these
functions.
/tp1:<x> emulator-internal temporary register <x> +1.
/tm1:<x> emulator-internal temporary register <x> - 1.
/tld:<x> emulator-internal temporary register <x> load from emulator register default value.
/tclr:<x> clear emulator-internal temporary register <x>.
These advanced options require intimate knowledge of available
emulator-internal functions. Please do not use unless you are advised
to do so.
SCGD <groupname>
Delete all registers in the group <groupname>. The group itself remains available.
SCGD <groupname> <registername>
Delete the register <registername> located in the group <groupname>
SC GRP ERASE
Erase all groups and all registers contained in those groups. Does
not erase architecture defined core-registers, which are contained in
firmware.
SC GRP ERASE <groupname>
Erase group <groupname> and all the registers contained within.
SC INIDUMP Upload all registers like the register window .ini file as it is used by visionCLICK.
SCG UPLOAD SCG UPLOAD FULL
Upload all registers and output extra information, include < optional fields > described in the SCGA command.
Adding option ?full? to SCG UPLOAD -> SCG UPLOAD FULL will
output information with emulator information /f0:xxxxxxxx /f1:xxxxxxxx.
Those 2 fields contain all flag values in hexadecimal form.
PJ UPLOAD
Upload all registers and emulator configuration information. |
|
|
|