larger fifo for shift register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

i am trying to work with a 5Mbit/sec serial input and load it into a cyclic buffer i created in code. later in processing the data is sent over USB.
My problem is the FIFO depth. the code is just not fast enough to do something useful with the data and come back in time to prevent the  over flow. 

   

is there a way to chain fifo's ? would writing in verilog help ?

   

(i am using the CY8CKIT-059 PSOC5LP)

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The two FIFOs are hardware and 4 entries deep and can be chained to form an 8 entry deep FIFO.

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Assaf,

   

it should be possible to utilize the ShiftReg component for buffering incoming data and off-loading it to RAM with DMA for further processing. I have no example of ShiftReg-DMA-RAM, but here are links to a similar task (RAM-DMA-ShiftReg). 

   

http://www.cypress.com/forum/psoc-5-device-programming/dma-shift-register

   

http://www.cypress.com/forum/psoc-5-device-programming/issues-dma-16bit-shiftreg

   

 

   

useful DMA links

   

http://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-d...

   

http://www.cypress.com/documentation/application-notes/an84810-psoc-3-and-psoc-5lp-advanced-dma-topi...

0 Likes
Anonymous
Not applicable

Thanks Bob,Odissey1 

   

Bob - could this be extended and chained to another UDB to add more depth? 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am quite sure that FIFO cannot be extended in depth.

   

Using DMA as a double buffer could be a solution without (much) CPU overhead, Could be a pain in the a.. because Verilog is difficult to debug and DMA for PSoC5 tends to be complicated. But a rough estimation comes to > 3 MByte/s @ a 60MHz PSoC5 which would serve your requirements for speed easily. You even may use a second DMA channel for USB transmission.

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Assaf, as an alternative, it is easy to chain 8x 32-bit Shift Registers, producing 256-bit deep serial buffer (pic. shows only half). The drawback is that all UDBs will be spared. With DMA only one shift reg will be sufficient.

   

   

 

   

0 Likes