Skip to content
STIMSMITH

Data forwarding path testing

Concept WIKI v1 · 6/1/2026

Data forwarding path testing is a pipeline-verification technique that exercises forwarding-path combinations during hazard-oriented instruction-sequence generation. In the cited PATARA framework, it is used to validate pipeline hazard detection mechanisms by building dependent instruction sequences, optionally inserting non-interfering filler instructions, and explicitly testing forwarding on both source operands.

Overview

Data forwarding path testing is a verification technique for pipelined processors that checks whether forwarding-path combinations are exercised correctly during hazard-oriented execution. In the cited PATARA framework, it is presented as an extension for validating pipeline hazard detection mechanisms by making full use of the data forwarding paths, including both source operands.

Test-sequence construction

In PATARA, the required sequence length depends on the number of pipeline stages. The cited example states that a 6-stage pipeline needs a sequence of 4 consecutive instructions for full coverage. The instructions in the sequence are randomly selected according to instruction type.

Sequence generation uses PATARA's regular interleaving approach: the initial data value is forwarded from one test instruction to the next. This creates the intended data dependency across the sequence and allows forwarding behavior to be observed systematically.

Filler instructions and hazard-state coverage

PATARA can also insert random filler instructions into the generated sequence. These fillers are chosen so that they do not interfere with the dependency chain of the test sequence. Their purpose is to exercise additional forwarding situations and hazard-state switches beyond the basic dependent sequence.

Testing both source operands

The cited work highlights a limitation of a regular test case: the focus register is normally placed in the first source operand, while the second source operand carries random data and may be either a register or an immediate. Under that setup, forwarding hazard detection does not adequately test the forwarding path to the second source operand.

To address this, PATARA swaps the positions of the focus value and the random value during generation. This allows forwarding hazard detection to be tested on both source operands. The probability of performing this operand swap is configurable in the framework.

In PATARA

Within PATARA, data forwarding path testing is part of the framework's hazard-oriented test-generation extensions. It complements generated dependent instruction sequences by increasing forwarding-path coverage and by checking operand-position combinations that would otherwise be missed.

CITATIONS

5 sources
5 citations
[1] In PATARA, data forwarding path testing is used as an extension to validate pipeline hazard detection mechanisms by checking full use of forwarding paths on both source operands. A Self-Testing Framework for Verification and Validation of a RISC-V-Based System with a Co-processor | International Journal of Parallel Programming | Springer Nature Link
[2] The needed instruction-sequence length depends on pipeline depth; the cited example says a 6-stage implementation needs 4 consecutive instructions for full coverage. A Self-Testing Framework for Verification and Validation of a RISC-V-Based System with a Co-processor | International Journal of Parallel Programming | Springer Nature Link
[3] PATARA generates these sequences using a regular interleaving approach in which the initial data is forwarded from one test instruction to the next one. A Self-Testing Framework for Verification and Validation of a RISC-V-Based System with a Co-processor | International Journal of Parallel Programming | Springer Nature Link
[4] Random filler instructions may be inserted as long as they do not interfere with the test sequence's data dependency, enabling coverage of additional hazard state switches. A Self-Testing Framework for Verification and Validation of a RISC-V-Based System with a Co-processor | International Journal of Parallel Programming | Springer Nature Link
[5] Regular test cases emphasize the first source operand, so PATARA swaps the focus and random values to test forwarding on the second source operand as well; the swap probability is configurable. A Self-Testing Framework for Verification and Validation of a RISC-V-Based System with a Co-processor | International Journal of Parallel Programming | Springer Nature Link