Date Posted: May 10, 2007
Update: March 11, 2008 Version 1.1 fixes scheduling inaccuracies with ORX, HBRP, NOP, LNOP, and double-precision instructions; and it adds support for the Cell-eDP architecture.
Tab navigation
- 1. How do I generate assembly to send to IBM® Assembly Visualizer for Cell Broadband Engine™?
- 2. When I try to run the Assembly Visualizer, Java™ returns a bunch of errors.
- 3. What do all the rows and columns mean?
- 4. What do all the colors mean?
- 5. How do I reorder the assembly?
- 6. Why didn't my some of my functions show up?
- 7. How do I turn the results of my editing session into an executable?
- 8. When I move one instruction, why do some other instructions move as well?
- 9. Why does my program run more slowly after I edited it and eliminated a bunch of pipeline stalls?
1. How do I generate assembly to send to IBM® Assembly Visualizer for Cell Broadband Engine™?
Go to the directory where you usually build your SPE program and type SPU_TIMING=1 make foo.s, but replace foo with the name of your program.
2. When I try to run the Assembly Visualizer, Java™ returns a bunch of errors.
Make sure that you have a Java level of at least 6 installed. Also note that GNU Java (gij) is not supported at this time because it does not currently support Swing.
3. What do all the rows and columns mean?
Instructions from the even (compute) pipeline are listed along the far left column, and instructions from the odd pipeline are listed along the far right column. If a single row contains both an even and odd instruction, it means that a dual issue will successfully take place.
The vertical x's represent clock cycles. A column of x's correspond to the cycles consumed by the instruction that is in the same row as the first x. Successive cycles of the even pipeline form a diagonal towards the lower right, and the odd pipeline forms a diagonal towards the lower left. The two diagonals meet in the middle and then wrap back around. Veteran spu_timing users know that a well-tuned program forms a steep diagonal line from the upper left to the lower right. In the Assembly Visualizer, a good program instead forms steep V shapes towards the center.4. What do all the colors mean?
Stalls are colored in bright red and are denoted with a pipe symbol (|) instead of an x.
If you select an instruction with the mouse, it will be highlighted in black. The chain of dependencies preceding and proceeding that instruction are then highlighted in light red. The first previous instruction that can legally swapped with the current one is shown in green, and the next swappable instruction is shown in blue. If you attempt an illegal swap, it will not be allowed. Branch targets are in yellow, and branches to subroutines are in brown.5. How do I reorder the assembly?
You can attempt to move an instruction by selecting the instruction, pressing ALT, and using the up and down arrow keys.
If a move would destroy the correctness of the progam, it will not be allowed. Such illegal moves usually arise because it would violate a register dependency, but it can also arise if you try to move an instruction to the other side of a branch instruction.6. Why didn't my some of my functions show up?
Make sure that the functions were not inlined.
7. How do I turn the results of my editing session into an executable?
The precise steps you must take for this will vary depending on your
Makefile
configuration; therefore, the following is a high-level description.
- Save your modified assembly using the File > Save menu item.
- Send your compiler the assembly in the place of the *.c or *.cpp file. If you cut and paste foo.s in place of foo.c in the compiler command that your Makefile generates, it should work. This action will generate a foo.o object file, so running
make
now should invoke only the linker and other post-compilation steps. Your modified assembly should now be successfully integrated into the SPE binary.
make
from the PPE directory in order to incorporate the new SPE binary into your overall program.
8. When I move one instruction, why do some other instructions move as well?
Changing the instruction order also changes the locations where no-ops should be inserted in order to maximize the number of dual issues. The Assembly Visualizer recalculates the locations where no-ops should be inserted every time an instruction is moved; therefore, you may see several instructions move because new no-ops were inserted or deleted.
9. Why does my program run more slowly after I edited it and eliminated a bunch of pipeline stalls?
Some subtle compiler optimization has probably been invalidated. Although an effort has been made to get Assembly Visualizer to preserve these optimizations, some are simply impractical to enforce on an assembly level without the original source code. Please revert to the original assembly.
