IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Research topics  >  Cell Broadband Engine technology  >  

IBM Assembly Visualizer for Cell Broadband Engine

A tool that provides a graphical user interface (GUI) for viewing the static analysis results of a Synergistic Processing Element (SPE) program and that enables safe, interactive hand-tuning of assembly.


Date Posted: May 10, 2007
Overview Requirements DownloadFAQsForum Reviews

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.
Back to top Back to top

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.
Back to top Back to top

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.

Back to top Back to top

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.

Back to top Back to top

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.

Back to top Back to top

6. Why didn't my some of my functions show up?

Make sure that the functions were not inlined.
Back to top Back to top

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.

  1. Save your modified assembly using the File > Save menu item.
  2. 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.
  3. Call make from the PPE directory in order to incorporate the new SPE binary into your overall program.
Back to top Back to top

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.
Back to top Back to top

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.


Cell Broadband Engine and Cell/B.E. are trademarks of Sony Computer Entertainment, Inc., in the United States, other countries, or both and are used under license therefrom.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
IBM is a trademark of IBM Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.

Back to top Back to top
View screenshots:
This screenshot of the tool shows how a fragment of code is scheduled.

Download now Download now

Related technologies

For platform(s):
Multi-Platform

For topics:
Cell Broadband Engine Architecture (CBEA), Cell Broadband Engine SDK, Compilers, Java technology, performance, visualization


 

    About IBM Privacy Contact