Forum Discussion
Altera_Forum
Honored Contributor
15 years agoGood points made dsl/BadOmen. I ended up rewriting the function so it only contains the math/recursive operators and no calls to external functions.
BadOmen: You're quite right about the use of malloc. Unfortunately in the case of my software, it is a necessary evil :) I have written a custom "array management" library in C which handles all the pointer allocation and error-catches if the desired array cannot be allocated (ie. a NULL pointer is returned). I'm processing dynamic 'chunks' of data received over TCP/IP on a Altera DE2 board - this data is comprised of single integer values, and more complex multidimensional integer arrays of variable length. I have written a custom library also which permits the transmission/reception of arrays between a Windows application transmitting over Winsock sockets, and Nichestack running on the Nios uCPU. Have added an additional handshaking layer which allows synchronisation between the two machines - usefully when you transferring a large multi-dim array ie. 50x10x20! Will post back soon on my progressing optimising my processing algorithm w/C2H.