Forum Discussion
Altera_Forum
Honored Contributor
17 years ago --- Quote Start --- Thanks for the replays.You are probably right..FvM do you have any idea on how i can implement the AGC you mentioned.there is a same idea its called Automatic scaling function in a work according to this link http://rfdesign.com/mag/604rfdf4.pdf if you have time take a look! --- Quote End --- Hi Xristos, I actually indicated in an above post a bit about automatic scaling mentioned in your document. It multiplies the num by 2^n and the denum by 2^-m without defining n,m. First you don't need AGC as this is meant for amplitude scaling against a variable input signal. In your case we are looking for phase measurement. All you need is scale and get the division right.(imagine the input signal as just different frequencies with same amplitude, though some advice clipping this swing) I believe yur document people mean the following for n,m of automatic scaling: (remember all values are positive) look for the location of MSB that equals '1' in the 32 bit wide num and denum. then shift num value until you get this '1' in bit(31). Similarly shift the denum towrds LSB until this '1' is at bit(16). Now divide and ignore the remainder. You should get a signal that swings across 16 bits. Personally I don't see any relevance of using the denum. After all we are forcing it to 1 on the 16 bits though its fraction is left over on the other 16 bits infront, either way it works(ignoring denum or not).