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.