FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5952 Discussions

Costas Loop - DSP Builder and ModelPrim blocks - Feedback problem

Altera_Forum
Honored Contributor II
915 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
96 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.
Altera_Forum
Honored Contributor II
96 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
Altera_Forum
Honored Contributor II
96 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 ---  

Altera_Forum
Honored Contributor II
96 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
Reply