10 measuring coverage, Measuring coverage – FUJITSU SOFTUNE F2 MC-16 User Manual

Page 140

Advertising
background image

126

CHAPTER 2 DEPENDENCE FUNCTIONS

2.2.10

Measuring Coverage

This emulator has the C0 coverage measurement function. Use this function to find what
percentage of an entire program has been executed.

Coverage Measurement Function

When testing a program, the program is executed with various test data input and the results are checked for

correctness. When the test is finished, every part of the entire program should have been executed. If any part

has not been executed, there is a possibility that the test is insufficient.

This emulator coverage function is used to find what percentage of the whole program has been executed. In

addition, details such as which addresses were not accessed can be checked.

This enables the measurement coverage range to be set and the access attributes to be measured.

To execute the C0 coverage, set a range within the code area and set the attribute to Code attribute. In

addition, specifying the Read/Write attribute and setting a range in the data area, permits checking the access

status of variables such as finding unused variables, etc.

Execution of coverage measurement is limited to the address space specified as the debug area.

Therefore, set the debug area in advance. However, the measurement attribute for coverage measurement can

be specified regardless of attributes of the debug area.

Coverage Measurement Procedures

The procedure for coverage measurement is as follows:

- Set range for coverage measurement:

SET COVERAGE

- Measuring coverage:

GO, STEP, CALL

- Displaying measurement result:

SHOW COVERAGE

Coverage Measurement Operation

The following operation can be made in coverage measurement:

- Load/Save of coverage data:

LOAD/COVERAGE, SAVE/COVERAGE

- Abortion and resume of coverage measurement:

ENABLE COVERAGE, DISABLE COVERAGE

- Clearing coverage data:

CLEAR COVERAGE

- Canceling coverage measurement range:

CANCEL COVERAGE

Note:

With MB2141 emulator, the code coverage is affected by a prefetch by the MCU. Note the prefetch
when using the COVERAGE function.

Advertising