XDE with simulator: how to stream data to the device?

Technical questions regarding the XTC tools and programming with XMOS.
FBergemann
Member
Posts: 8
Joined: Sun Aug 14, 2011 10:19 am

XDE with simulator: how to stream data to the device?

Post by FBergemann »

How can i stream data to a simulated device in XDE?
Let's say i want to stream a string and return the reversed sequence of characters (as an example).
Or to make it more intersting:
Pass a line of a picture (2^N pixels) to the device and return the fast fourier transform (FFT) result for this.
- thanks!
regards,
Frank


ale500
Respected Member
Posts: 259
Joined: Thu Sep 16, 2010 9:15 am

Post by ale500 »

Using the plug-in api to the simulator (Chapter 12 of Tools User Guide) may provide a working mechanism to feed data to a simulated program. If your code has some algorithms developed in C, they can be easily tested using a test-bench on your PC (running native) without the xmos simulator, though.
FBergemann
Member
Posts: 8
Joined: Sun Aug 14, 2011 10:19 am

Post by FBergemann »

Hi,

i don't get it from the spec.
Could you please provide a very simple demo program, preferable with manual (linux) invocation of
XMOS/DevelopmentTools/11.2.2/bin/ executables for compilation and launching?
E.g. i can start my XDE build artifact with
XMOS/DevelopmentTools/11.2.2/bin/xsim Ring/Debug/Ring_Debug.xe
It executes. But it complains with:
Warning: Unable to load XN file: xn:9 Error: XN11099 Package type "XS1-G4B-FB512" cannot be resolved to a package file.
I see no option for 'xsim' to pass to it the XMOS/DevelopmentTools/11.2.2/configs/XS1-G4B-FB512.xn(?!)
And how can i next start a program in simulator and another one for plugin API - both communicating with each other?
Just a simple 'echo' example would be highly appreciated.
- many thanks!
best regards,
Frank
ale500
Respected Member
Posts: 259
Joined: Thu Sep 16, 2010 9:15 am

Post by ale500 »

Could you please try the example in scr/plugins ? it ties two pins together. As I see it, using channels may be a little bit more difficult, but with the api you can write to memory.