21.13.1.77 write_lsram

Description

This tcl command writes a word into the specified large TPSRAM location.

TPSRAM block has aspect ratio of 512x40 (ECC disabled) and 512x33 (ECC enabled). SmartDebug enhanced the physical block view to read and write as 40-bit and 33-bit data. The write value is more than the size of integer and hence provided a new parameter -tpsramValue to accommodate the changes

Write onto TPSRAM physical block → 40-bit wide or 33-bit wide for PF and 18-bit wide or 36-bit wide for RTG4

Physical block
write_lsram [-deviceName "device name"] \
            -name {physical block name} \
            -offset {offset value} \
            -value {integer value} \
            [-tpsramValue "TPSRAM physical block word value"]
Logical block
write_lsram [-deviceName "device name"] \
            -logicalBlockName {block name} \
            -port {port name} \
            -offset {offset value} \
            -logicalValue {hexadecimal value}

Arguments

ParameterTypeDescription

deviceName

string

Optional user-defined device name. The device name is not required if there is only one device in the current configuration, or a device has already been selected using the set_debug_device command.

name

string

Specifies the name for the target block.

logicalBlockName

string

Specifies the name of the user defined memory block.

port

string

Specifies the port of the memory block selected. Can be either Port A or Port B.

offset

integer

Offset (address) of the target word within the memory block.

logicalValue

hexadecimal

Specifies the hexadecimal value to be written to the memory block. Size of the value is equal to the width of the output port selected.

value

integer

Word to be written to the target location. Depending on the configuration of memory blocks, the width can be 1, 2, 5, 10, or 20 bits.

This is an integer, which minimum value is 0 and may go up to depending on the size of each location}

tpsramValue

integer

integer value, minimum value is 0 to (2^N - 1) where N is number of bits configured.

PolarFire , PolarFire Soc and RTG4 only.

Return TypeDescription
NoneNone

Error Codes

Error CodeDescription

None

Parameter 'param_name' is not defined. Valid command formatting is'write_lsram [-deviceName "device name"] [-name "LSRAM block name"] [-logicalBlockName "USRAM user defined block name"] [-port "LSRAM port name"] [-offset "integer value"] [-logicalValue "LSRAM block word value"] [-value "integer value"] [-tpsramValue "TPSRAM physical block word value"]'.

None

Parameter 'name' has illegal value

None

Missing argument. Must specify '-name' or '-logicalBlockName'.

None

Parameter 'logicalValue' has illegal value.

None

Error write LSRAM block PF_DPSRAM_C0_0/PF_DPSRAM_C0_0: Target memory block should first be read before write..

None

Parameter 'logicalBlockName' has illegal value.

None

LSRAM block cannot be read. Use phyical block option to read.

None

RAM port name must be specified.

None

Parameter 'port' has illegal value.

None

Port port_name is an invalid Port name.

None

Parameter 'file' has illegal value Parameter 'tpsramValue' has illegal value.

None

Parameter 'value' has illegal value.

None

value: Invalid argument value: 'value' (expecting integer value).

None

Parameter 'offset' has illegal value.

None

offset: Invalid argument value: 'value' (expecting integer value).

None

Active probe value must be specified.

Supported Families

PolarFire
PolarFire SoC
SmartFusion 2
IGLOO 2
RTG4

Example

This example writes a value of 69905 to the physical block of device PolarFire in the "PF_DPSRAM_C0_0/INST_RAM1K20_IP" with an offset of 3:
write_lsram -name {PF_DPSRAM_C0_0/INST_RAM1K20_IP} \
            -offset 3 -value 69905
write_lsram -logicalBlockName {PF_DPSRAM_C0_0/PF_DPSRAM_C0_0} \
            -port {Port B} -offset {1} -logicalValue {0xA} \
            -tpsramValue 300

See Also

  • read_lsram