Hi,I'm trying to port Speex encoder unit on a Nios 2 system. I managed to compile the code and upload it to the device. The only thing is that, using either the floating point or the fixed point operating mode, the result obtained are different from the ones obtained on Debian, using the exact same code(the code is from the user manual, the encode section, without any additions). The system I'm using has a NIOS2/f processor, and I'm using a Rs232 uart to communicate with a computer so i can collect the data. Has anyone tried this? If not, do you have any ideas about this problem? Regards, Alex
Dunno - but I'd try to sort out the fixed point/integer version.It is much more likely to give matching results and will run a lot faster (less slowly) than the FP version. You might have to resort to printing some intermediate values...
Currently I'm working on the fixed point version, but, as I wrote before, the differences exist on this version to. I have some problems following the code-line, because I have little experience in this job-line ( in this moment I can't say for sure that I identified correctly the main encoding function, or if that encoding function is the first function called in the encoding routine , because they are using pointers to functions).
I forgot to mention that the differences are evolving, to say so. The length for the encoded packet is the same, but the containing data are wrong. In the first packet, only 4/15 Bytes are different, but that number increases.After decoding this, I'm obtaining a nice white noise.:(
Well, you want to find the first divergence - everything beyond that isn't worth looking for.Might be something really silly - like failing to get the test data initialised properly, or the stack hitting the heap!
I also thought that the problem is in the memory size(stack overflow) but then I encountered another problem.The actual structure of the nios is cpu+pio+jtag+uart+onchip memory (4kB ) used for reset and exception vector + onchip memory (256 kB ) for code and data. If I try to modify the size of the second RAM ( +/-) or if I try to use the external RAM I get the "verify failed" error when uploading the code.
Thanks, I managed to make it upload on the external RAM ( the problem was that in the generated SOPC system wasn't linked the output clock signal to the RAM, so I connected it manually).But overall, the Speex still doesn't work, so I concluded that there is no stack overflow problem :(