XMOS Development Workflow Tips?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
stephencwelch
Member++
Posts: 18
Joined: Sat Feb 02, 2013 4:59 am

XMOS Development Workflow Tips?

Post by stephencwelch »

I'm getting to a point in my XMOS development where code complexity and organization are becoming big issues. My general algorithm development strategy begins in Octave/MATLAB, where I do the majority of my testing and tuning, and then generally implement on XMOS after I'm happy with the results. I am able to do integer math in Octave, making the transition slightly less painful. However, as complexity grows, I find myself spending more and more time trying to figure what the hell is happening in Octave that isn't happening on my chip.

I assume it will be 3-5 more years until someone figures out a robust/efficient way of just throwing Octave/Matlab/Python code onto a DSP chip, so until then I'm curious to see what kind of solutions people have developed for managing workflow in this context. I've considered using .oct/.mex files as a way to call C functions from Octave, but this would of course not include any XC functionality. What would be really slick is if I could interface the XMOS simulator from Octave somehow.

Does anyone have wisdom to share on this topic? I'm really curious to hear what has/hasn't worked when developing across high and low-level languages. Thanks!


User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm

Post by Berni »

Well you don't have to compile it in to XC and run it on the acual chip. Just write the program as a regular 32bit windows executable and run it on your own PC. Just make sure you only use standard C librarys so that when you copy your code in to your xmos project it will still compile fine. As long as both systems are 32bit and match in endian then C code should run identically on both.

But if you want to have your calculations run fast then its best to just code it from scratch to make sure everything is done efficiently