FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6526 Discussions

Costas Loop - DSP Builder and ModelPrim blocks - Feedback problem

Altera_Forum
Honored Contributor II
1,324 Views

Hello Everyone, 

 

This is my first DSP Builder project and my first FPGA project. I have designed to the best of my knowledge a working costas loop in Simulink with ModelPrim blocks. The simulation in Simulink works the way I want. However when activating hardware generation I get a "Found insufficient delay attempting...". 

 

I have the feeling that this is related to the feedback loop in the model. If I remove the feedback it will generate. 

 

Is there an easy fix to make my loop work or should it be implemented differently without feedback ? (wouldn't be a Costas Loop anymore I guess). 

 

My second option would be to implement a squaring loop but I can't seem to find a way to divide my squared signal by two.... 

 

Any help would be appreciated. 

 

Attached is my model, sampled data of my signal and the Cos/Sine LUT. 

 

Thanks, 

Carl
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
505 Views

 

--- Quote Start ---  

Hello Everyone, 

 

This is my first DSP Builder project and my first FPGA project. I have designed to the best of my knowledge a working costas loop in Simulink with ModelPrim blocks. The simulation in Simulink works the way I want. However when activating hardware generation I get a "Found insufficient delay attempting...". 

 

I have the feeling that this is related to the feedback loop in the model. If I remove the feedback it will generate. 

 

Is there an easy fix to make my loop work or should it be implemented differently without feedback ? (wouldn't be a Costas Loop anymore I guess). 

 

My second option would be to implement a squaring loop but I can't seem to find a way to divide my squared signal by two.... 

 

Any help would be appreciated. 

 

Attached is my model, sampled data of my signal and the Cos/Sine LUT. 

 

Thanks, 

Carl 

--- Quote End ---  

 

 

I assume you have used loop filter in which case I am surprised that you don't have delay through the filter(due to latency). Anyway you can add registers in the feedback loop to add further delay to that of loop filter.  

You can't have costas loop without the feedback loop.
0 Kudos
Altera_Forum
Honored Contributor II
505 Views

 

--- Quote Start ---  

I assume you have used loop filter in which case I am surprised that you don't have delay through the filter(due to latency). Anyway you can add registers in the feedback loop to add further delay to that of loop filter.  

You can't have costas loop without the feedback loop. 

--- Quote End ---  

 

 

I tried with various delays wihtout success..... until I tried a much longer delay (64). It now works. 

 

Thanks for the reply, 

Carl
0 Kudos
Altera_Forum
Honored Contributor II
505 Views

Note that you can insert a sampleDelay in the feedback path, and click "minimum delay" Then you get the smallest delay that will close the loop. 

 

You can also reduce this number of delay by reducing your clockrate. 64 seems large for a kostas loop. Are you doing this floating point? 

 

 

--- Quote Start ---  

I tried with various delays wihtout success..... until I tried a much longer delay (64). It now works. 

 

Thanks for the reply, 

Carl 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
505 Views

Original version was floating point. Minimum delay (manual value) that closed the loop is around 32. 

Thanks for the "minimum delay" option info! 

 

Carl
0 Kudos
Reply