From ACT_XOVER.SPN, rda instruction with -1 coefficient

Algorithm development and general DSP issues

Moderator: frank

Post Reply
eeh6174
Posts: 2
Joined: Fri May 25, 2007 8:56 am

From ACT_XOVER.SPN, rda instruction with -1 coefficient

Post by eeh6174 »

First of all the FV-1 is REALLY neat! I'm having a blast playing with the default effects on the eval board.

Anyway, this may be a newbie question but, I'm having a little trouble digesting the algorithm in the ACT_XOVER.SPN file that relates to the tweeter delay. Specifically, if one considers the code snippet from the file:

;write to delay (for tweeter) and get delayed output:

wra del1,1 ;write fp value to del1
rda del1,-1 ;subtract FP value from real value
wra del2,0 ;write error value to del2

rda del1+del,1 ;read delayed FP value
rda del2+del,1 ;add delayed error value
wrax delout,0 ;wrtie value to delay output register.

The second line of code: "rda del1,-1" seems to me, after executing the line immediately above it, would always result in 0 in the ACC.

My logic is: if del1 contained 500 and ACC = 500 (from the previous instruction), then 500 * (-1) = -500, then -500 + 500 = 0.

Or, is there something I am completely missing here? Also, the comments refer to a "floating point" and "real" values, which actually confuses me more. I thought ALL of the data is floating point, so what is mean't by "real"?. I've looked through the instruction set manual, and other examples of code on the website just to check myself. But, what is really going on here? :?
Press to test... Release to detonate
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

When a value is written to delay RAM, it goes through a floating point conversion. As a result a little resolution can be lost. What is happening here is that the value is written to delay RAM then read back and subtracted from the original value. Any error due to the floating point conversion is then saved in del2.

The core of the FV-1 is fixed point, not floating point but delay RAM is floating point and anytime you go from fixed to floating there is the possibility of loss of LSBs. Usually this is not an issue but in cases where it is you can find the error and save it then call it back when you read back from delay RAM.
Frank Thomson
Experimental Noize
eeh6174
Posts: 2
Joined: Fri May 25, 2007 8:56 am

Post by eeh6174 »

Thanks, Frank. I finally dug up the explanation (after your kind response) under the heading of "Delay DRAM" on page 18 of the SPINAsm FV-1 instruction set manual. I should have read the instructions first, duh! :oops:

This chip would be a real candidate for a simulator and/or compiler. If I only had the time...
Press to test... Release to detonate
Post Reply