views:

189

answers:

2

I have an application written in C for a Xilinx Microblaze core. However, the performance isn't quite what I want so I was considering rewriting some of the core functions in assembly. I'm having trouble figuring out how to get Xilinx Platform Studio to compile both into a single ELF file though.

How can I do it?

A: 
  1. Check if the compiler implements inline assembly. Try the asm() "function". Check that it supports variable referencing. If your compiler is GCC based, this is easy.
  2. You can always write raw assembler, assemble it, and link it into your application. You need to understand the ABI of your compiler to make compatible functions.
Yann Ramin
A: 

Did you profile where exactly the poor performance comes from? From my experience, core functions are quite fast, so your code is probably the source of the problem. Try compiling with optimization (-O3) or changing the cache size (if you use a cache).

Helltone