Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
badgeir
Posts: 13
Registered: ‎11-14-2011
0
Accepted Solution

digilents AC'97 driver Samples

Hi!

I have a question regarding the AC'97 demo for SDK that digilent has released.

 

I am wondering how the 32 bits samples Sample_L and Sample_R are built up?

Since the AC'97 codec samples are 18 bits two's compliment (as i have come to understand), i am not sure how the Xuint32 Samples are built up, and what the different bits in the 32 bit Xuint represent.

 

All help is apreciated!

Visitor
badgeir
Posts: 13
Registered: ‎11-14-2011
0

Re: digilents AC'97 driver Samples

btw, i am using the atlys spartan 6 board
Expert Contributor
joelby
Posts: 1,056
Registered: ‎10-05-2010
0

Re: digilents AC'97 driver Samples

I couldn't say for sure, but the values are probably either extended to 32 bits since there's no native 18-bit C type, or the upper bits are ignored completely. The easiest way to check would be to debug the test application and see what range the values fall within. If the top 14 bits are always zero, the values are probably just truncated. Sign extending them is probably desirable if you're manipulating the values in C code.

Visitor
badgeir
Posts: 13
Registered: ‎11-14-2011

Re: digilents AC'97 driver Samples

Thanks for the advice! =)

i found out eventually, i read som samples into hyper terminal, and found that the samples are extended.

So if the sample is negative, all the top 12 bits are all 1's, and if its positive, they are all zeroes. The two bottom bits also follow this pattern it seems, and the audio data only lies in bit nr 2 -20

Expert Contributor
joelby
Posts: 1,056
Registered: ‎10-05-2010
0

Re: digilents AC'97 driver Samples

Excellent! Well done with figuring it out, and thanks for reporting back.