|Home > Plug-ins for Fast Models > PipelineModel > PipelineModel example|
This example shows how the
PipelineModel plug-in generates data. This example uses a single issue, 6-stage pipeline. The stages are Fetch, Decode, Issue, EX1, EX2, and WR.
0 1 2 3 4 5 6 7 8 9 10  ADD R1, R2, R3 IF ID IS X0 X1 WR  MUL R4, R1, R2 IF ID IS IS X0 X1 WR  ADD R5, R4, R6 IF ID ID IS IS X0 X1 WR  ADD R7, R8, R9 IF IF ID ID IS X0 X1 WR
In the instruction sequence shown, pipeline stalls are underlined. The following stalls occur:
PipelineModel plug-in uses the accumulated stalls for each instruction to
calculate the runtime latency as follows:
In this example, there are five stall cycles in total. At the end of the
PipelineModel plug-in uses the
accumulated stalls to produce a total cycle count. It uses the cycle count to determine
the final Cycles Per Instruction (CPI) or Instructions Per Cycle (IPC) value.