The NEON instruction set provides parallel computation without threads, but also requires a new way of thinking for developers, which takes time to master. The most efficient way to learn is observing and modifying the behaviour of small code snippets. However, running and debugging these code snippets requires a full development environment, which might not be available anywhere. Investigating new ideas or demonstrating these ideas to others might be difficult when the environment is not available. The solution to address this limitation is the NEVADA simulator that we developed at the University of Szeged which is capable of running NEON code snippets inside any web browser, and offers debugger-like features which allows close inspection of the executed code.
NEVADA models a simplified ARM CPU with NEON and ARM registers, and a linear memory space is available for loading and storing further data. The whole machine state can be saved and restored later, which is useful for sharing code snippets. The state can also be saved as a link, so the saved code snippets can be embedded inside any webpage. The user interface of NEVADA resembles a simplified debugger, which allows modifying any register or memory content, and provides various execution modes like step-by-step execution. These features make NEVADA an excellent tool for learning and practicing coding in NEON.
In the followings we demonstrate the capabilities of the NEVADA simulator for running NEON code. First, let's choose a NEON snippet like this one, which swaps the red and blue channels. First, the simulator is needed to be initialized with some NEON code and data as seen below or just click here to load this program
The initialization itself is simple; the instructions are copied into the Code box, and some data to the Working Memory box. These changes are marked as red boxes in the picture:
Our instruction sequence consists of 3 instructions. Let's execute them one-by-one. After the first step, the data from the memory is loaded into the NEON registers which are turned to green:
The next instruction swaps d0 and d2 NEON registers:
And the last one writes back the data to a different location pointed by r1 ARM register.
Executing a code snippet is as simple as shown above. If you are interested in seeing other examples running in NEVADA simulator you can take a look into the three built-in examples on the webpage http://szeged.github.com/nevada/
Currently NEVADA aims to fully support the rich NEON instruction set, but later, depending on the success of the simulator, other instructions might be added. We hope all of you will enjoy using NEVADA for learning and working with NEON. All feedback is warmly welcome!
Other posts from Zoltan Herczeg:
Using ARM NEON to accelerate Scalable Vector Graphics in webkit by up to 4x
ARM welcomes its wealth of Partners in the ARM Connected Community (CC) to submit guest blogs to be published on our multiple community blogs. If interested in participating please submit email inquiries to Tell.Us@arm.com.
The ARM Connected Community (CC) is an extensive ecosystem covering all aspects of ARM processor-based design, from chip implementation through to system and device design. The CC provides a platform for collaborative innovation, with multiple types of forums for members to work with one another, and with customers, to solve industry challenges, all with the purpose of enabling designers to focus on differentiating features and an accelerated time-to-market for ARM powered solutions.
0 Comments On This Entry
Please log in above to add a comment or register for an account
Search My Blog
Coding Using NEON Technology
on May 21 2013 08:57 AM
on May 08 2013 06:15 PM
New Platform Bring-Up with ARM® Development Studio 5 (DS-5™)
on Apr 30 2013 09:55 AM
如何利用全志安卓4.0 HDMI Dongle进行ARM DS-5 Streamline性能分析
on Apr 26 2013 10:50 AM
DS-5 Streamline Performance Analyzer on Allwinner Android 4.0 HDMI Dongle
on Apr 25 2013 04:58 PM