The 'Operations with Memory Blocks' dialog

Top  Previous  Next

The ChipProgUSB program allows complex operations with memory blocks. This dialog controls operations with blocks of data within one selected buffer or between different buffers.

Buffer_dump3

The dialog box splits in three columns. The Source parameters, shown in the left column, specify the source memory area for the operations shown in the middle column. The operation’s result will be placed in the area specified by the Destination shown in the right column. By default the destination is equal to the source space. Two operations – Fill and Search - do not require a destination address so the dialog disables the Destination radio button if these two operations are chosen.

 

 

Element of dialog

Description

Start Address
(of the Source)

The start address of the memory area in the selected Source buffer, to which the operation will be applied.

End Address
(of the Source)

The memory area’s end address. It can be set only for the Source. After the source address range is defined, the program automatically calculates the destination area’s end address.

Full Range
(of the Source)

Sets the start and end addresses equal to the entire address space of the selected target device.

Start Address
(of the Destination)

The start address of the memory area in the Destination buffer where the result of the chosen Operation will be placed to.

 

The following operations are available through this dialog. Each operation starts when you click OK in the dialog box. (see notes below).

Operation

Description

Fill with Value

Fills the source buffer with a value (or a sequence of values) specified in the text box at the right.

Search for Data

Searches the source memory area for a particular value (or a sequence of values) specified in the text box at the right.

Copy

Copies a specified area of memory to a new destination address. The block can be copied within the same address space or to another one.

Compare

Compares contents of the specified source and destination memory areas. The sizes of the source and destination areas are equal. If there’s a mismatch, the mismatch message box will require permission to continue the comparison.

Invert

Inverts the selected source area contents bit-wise and places the results in the destination area.

Calculate Checksum

Calculates the checksum, as a 32-bit value, for the source area of memory. The calculation is done by simple addition. See the note below.

Negate Result

If the box is checked then a checksum, calculated as a 32-bit value by simple addition, will be then subtracted from zero (this is a known method of the checksum calculation).

Write Result to Destination

If this box is checked a calculated 32-bit checksum will be written to the destination sub-level beginning at a specified destination Start Address. If this box is cleared the checksum will be displayed as a message only.

AND with Value

Performs bit-wise AND operation on the contents of the specified source memory locations with the operand specified in the text box on the right and places the results in the destination. See notes below.

OR with Value

Performs bit-wise OR operation on the contents of the specified source memory locations with the operand specified in the text box on the right and places the results in the destination.

XOR with Value

Performs bit-wise XOR operations on the contents of the specified source memory locations with the operand specified in the text box on the right and places the results in the destination.

 

 

Notes

1. The source and destination memory areas may overlap. But, since operations with memory blocks are carried out using a temporary intermediate buffer, the overlap does not corrupt the results.

2. The Copy and Compare commands use the blocks specified in the Source address space and the Destination address space.

3. The checksum is calculated as a 32-bit value by simple addition. If a memory space has byte organization, then 8-bit values will be added. If it has word organization then 16-bit values will be added.

4. Logical operations (AND, OR, XOR) are performed with the contents of the Source address space, while the operation result will be written to the Destination address space. The program takes care of converting the operands to the appropriate memory size for a selected type of memory (16-bit for the Prog, Data16, Reg and Stack memory, 8-bit for the Data8 memory).