Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
7 years ago

Encoder for dsd audio stream in SDIF-3 format, VHDL - help a newbie

Hello folks,

I'm a newbie in VHDL programming.

I'm trying to achieve SDIF-3 encoding from a dsd datastream coming off from an A-D conversion chip.

The dsd stream from the chip features two independent channels (L&R) data flow, plus a bitclock line.

The SDIF-3 coding scheme (see pic below), states that the channel coding splits each original bit in a 2 'semi-bit' pattern, by double the original bitclock rate.

IE: if the original bit on the source is '0', the pattern must include the original value+it's inverted, so '0-1',

if the bit value of the source stream is '1', the pattern is '10', and so on...

I was thinking of using a double-edge triggering to do the frequency doubling of the output stream, so that at the rising edge, the encoder outputs the first semi-bit value, then on the falling edge, the encoder outputs the inverted semi-bit to complete the pattern.

Please see the image attached below about the official coding scheme for this format.

I'm not sure if the code is correct, even if it is possible to do it that way.

Unfortunately I have lack of knowledge on how to simulate this.

Any help, suggestion, greatly appreciated. My code attached...

Thank you in advance! :)

12 Replies