Analog Line Coverage Circuit for Microcontroller Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for line coverage testing in software are expensive, complex, and require significant user interaction, especially when testing low-cost microcontrollers used in embedded systems, and they often necessitate additional external equipment like oscilloscopes and digital counters, making them unsuitable for quick time-to-market microcontrollers.

Innovation Solution

An analog line coverage circuit integrated into a microcontroller, comprising a decoder, program memory, logic control, buffers, bin cell circuitry, a multiplexer, digital-to-analog converter, and counter, which determines how many times each program memory location is accessed during testing, providing a digital output signal without the need for external equipment, thereby reducing cost and complexity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If known testing methods use instruments connected to processor locations with external equipment like oscilloscopes and digital counters, then line coverage testing can be performed, but device complexity and cost increase significantly

Engineering Contradiction:
Improveline coverage testing capabilityVSAvoidtesting system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges the line coverage testing functionality directly into the microcontroller by integrating a test logic unit that couples to the program memory bus. This consolidation eliminates the need for external instruments like oscilloscopes and digital counters, reducing device complexity while maintaining measurement precision for line coverage testing.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a test logic unit as an intermediary component that interfaces between the program memory and external testing equipment. This mediator captures bus transactions internally and generates test data output, simplifying the overall testing system by eliminating the need for complex external instrumentation while preserving accurate line coverage measurement capability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If known testing methods require additional external equipment and control software, then line coverage data can be collected, but cost and system complexity increase

Engineering Contradiction:
Improveline coverage data collectionVSAvoidmanufacturing cost
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The patent combines line coverage testing functionality within the microcontroller itself through an integrated test logic unit. This internal integration eliminates the need for expensive external equipment and control software, reducing manufacturing costs while maintaining accurate line coverage data collection capability.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The test logic unit performs line coverage testing autonomously by monitoring program memory bus transactions and generating test data output without requiring external control software. This self-service capability reduces system cost by eliminating the need for additional external equipment while preserving measurement precision.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If traditional line coverage testing methods are used, then code coverage can be measured, but user interaction and testing complexity increase

Engineering Contradiction:
Improvecode coverage measurementVSAvoiduser interaction requirement
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The test logic unit automatically monitors program memory bus transactions and generates line coverage test data without requiring significant user interaction. This automated self-service approach maintains accurate code coverage measurement while dramatically reducing the complexity of operation and user involvement needed.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The test logic unit provides automatic feedback by monitoring bus transactions and generating test data output that indicates line coverage status. This feedback mechanism enables accurate code coverage measurement while minimizing user interaction, as the system autonomously tracks and reports testing results.

Inventive Principle:
Principle #23Feedback

Applied Scientific Principles

This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.

Function Achieved in This Case

The analog line coverage circuit enables efficient determination of line coverage with minimal user interaction and reduced costs, optimizing firmware code and memory usage while being suitable for low-cost microcontrollers, thus facilitating quicker development and testing.

Implementation Method 1

a digital-to-analog converter, and counter

Methodology Applied
Scientific EffectDigital-to-analog conversion:

Data Source

PatentUS9153346B2Code coverage circuitry
Publication Date: 2015.10.06 NXP USA INC
  • US9153346B2 patent drawing
  • US9153346B2 patent drawing
  • US9153346B2 patent drawing

AI summary

A method with a circuit that includes a memory (130) coupled to an analog line coverage circuit (104). The analog line coverage circuit includes a plurality of buffers (151-154) in which each buffer is coupled to one memory location of the memory, a plurality of bin cells (161-164) in which each bin cell is coupled to a buffer, a multiplexer (170), each input terminal of which is coupled to a bin cell, and an analog-to-digital converter (180) coupled to the multiplexer and to an output terminal of the analog line coverage circuit. The analog line coverage circuit stores an analog voltage that is representative of a number of occasions that a memory location is accessed, and outputs a signal indicative thereof. A processor (102), coupled to the memory and to the analog line coverage circuit, enables the analog line coverage circuit when the processor is in a debug mode.