Simple FIFO to I2S CPLD, for MCU players / reclocking - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 5th November 2007, 01:58 AM   #1
diyAudio Member
 
Join Date: Nov 2006
Default Simple FIFO to I2S CPLD, for MCU players / reclocking

I used dsPIC at "Ultimate Source" project,
ultimate source
Then I could make small WAV file player working with genuine 11.288MHz/44.1kHz/16bit.

But I'm not satisfied because it is straitjacketed to dsPIC.
I searched threads and google to look for simple I2S generator, but can't find (I'm not good at google?).

Attached is veeery simplified I2S generator.
It only needs 8 bit width FIFO, CPLD, and 11.288MHz.

Principle "no wisdom / foolish simple"
(1) 6bit counter, generates 64 states. (same as I2S 64clock/frame)
States are L01-L32,R33-R64.
(2) CPLD generates READ# pulse when FIFO is ready, at state R45,47,49,51. store data to registers.
When FIFO is not ready, Registers filled with 0x00.
(3) CPLD outputs LRCK, SCK, SD.
SD is selected from register bit, by state.
So if data is ready, it generates 44.1kHz/16bit I2S signal, and data is not available, just generates 0000000 I2S.

Requirement for MCU
It has some "receiving" interface > 176.4KB/s.
It can write FIFO, 8bit parralel, at least > 176.4KB/s. order is Left lower, Left Upper, Right lower, Right Upper.
Byte Order is same as WAV file format.

Requirement for FIFO: almost nothing. just 8 bit or more, 4 word or more.

I will post VHDL code if it works. (will be tested by FTDI FT245R)
Attached Files
File Type: pdf fifotoi2s.pdf (13.4 KB, 624 views)
  Reply With Quote
Old 5th November 2007, 04:59 AM   #2
diyAudio Member
 
Join Date: Nov 2006
Attached contains schematic and Board image.
Attached Files
File Type: zip sch and board.zip (46.9 KB, 346 views)
  Reply With Quote
Old 6th November 2007, 06:24 AM   #3
diyAudio Member
 
Join Date: Nov 2006
very long time no see, VHDL.
On simulation it looks like generating correct LRCK/SCK/SD.
Can anyone inspect / simulate attached bush-league code?
Attached Files
File Type: txt main.vhd.txt (7.0 KB, 248 views)
  Reply With Quote
Old 6th November 2007, 09:52 AM   #4
diyAudio Member
 
blu_line's Avatar
 
Join Date: Jan 2002
Location: The Netherlands
One remark.
RST is an active low signal. Call it RSTN or RST_N to make this known to others.

RTL simulation is correct !

Would you like to have the TB ?

What about post place and route ?

grtz

Simon
  Reply With Quote
Old 6th November 2007, 02:31 PM   #5
diyAudio Member
 
Join Date: Nov 2006
Thank you for responce. here is mapping result. what is TB?

Device Used: XC9572-10-PC44
Fitting Status: Successful

************************* Mapped Resource Summary **************************

Macrocells,Product Terms,Block,Registers,Pins
Used/Tot,Used/Tot,Used/Tot,Used/Tot,Used/Tot
49 /72 ( 68%),113 /360 ( 31%),108/144 ( 75%),42 /72 ( 58%), 15 /34 ( 44%)
  Reply With Quote
Old 6th November 2007, 03:53 PM   #6
diyAudio Member
 
Join Date: Oct 2001
Location: .
Testbench

So what exactly is this thing supposed to do ?
  Reply With Quote
Old 6th November 2007, 05:43 PM   #7
diyAudio Member
 
Join Date: Nov 2006
Attached contains current VHD, UCF, TestBench, Report.
(ISE Simulator)

>blu_line
Maybe you have better test-bench than me!

>rfbrw
this thing does "FIFO to I2S" that's all.
I can not find this kind of simple device in diyaudio / google (maybe already exists but I can not find).

this thing simplify digital audio playback.
almost any micro processer can be used for audio playback.
Linux player just send FIFO and forget, to play music.
DAC DIYer can make re-clocking easy.

application, with accurate I2S output
small hard-disk player
yet another AirPort Express / squeezebox
handy SD-Card player
USB FIFO(FT245R) Playback device (I will try it)
Attached Files
File Type: zip main.zip (9.6 KB, 223 views)
  Reply With Quote
Old 6th November 2007, 06:02 PM   #8
diyAudio Member
 
Join Date: Oct 2001
Location: .
I take it you feed it 8 bit words at a certain rate and it creates 16 bit left and right audio data.
  Reply With Quote
Old 6th November 2007, 06:59 PM   #9
diyAudio Member
 
Join Date: Nov 2006
Board, Parts were already ordered. maybe I can try this weekend or next.
  Reply With Quote
Old 12th November 2007, 12:37 AM   #10
diyAudio Member
 
Join Date: Nov 2006
Wave shows SD and LRCK. I think it is working like I thought, and lower photo, CS4334 test dac is playing Bach.
(wave form is not clean, LRCK is gated or output / not latched. maybe LRCK/SCK/SD should be re-sampled..)

I wrote simple sample source (read wav / send blocks to FIFO) and there are still noize, by FIFO underrun. I will think later.

Anyone please try same way with more powerful device.
I think Cypress EZ-FX2 (480Mbps) and larger CPLD can play 24/192, 4-way data for multi-amplifier. much cheaper than RME/Lynx.
Attached Images
File Type: jpg testing.jpg (92.2 KB, 1401 views)
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decoder output: how jittery, worth reclocking? And "double" reclocking hollowman Digital Source 0 17th July 2009 02:39 PM
cdm12 fifo digital out purer Digital Source 1 31st March 2007 08:18 PM
Using large buffer FIFO on SPDIF fed DAC wa2ise Digital Source 8 2nd February 2006 04:43 PM
CPLD based DIY Pre-Amp and display Kit (PGA2310) solomon2773 Swap Meet 0 3rd June 2005 06:12 AM
CPLD vs. uC for PGA2310 ajm8372 Solid State 6 20th January 2004 11:40 PM


New To Site? Need Help?

All times are GMT. The time now is 12:50 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2