Home    Bloggers    Messages    Webinars    Resources   
Tw  |  Fb  |  In  |  Rss
Mike Field

Switching FPGA Internal Clock Frequencies On-the-Fly

Mike Field
Page 1 / 5   >   >>
Tobias
Tobias
2/12/2013 12:20:47 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly

Hi Hamster, thanks for your help. You really like to look into these Xilinx databases, great.

Sure, constraining false paths is a solution. The drawback is the runtime and I would love to have a more natural solution to a common problem.

When you generate n clocks by a DLL, they are most likely async. They are definitely async if they have different periods like 60MHz and 70MHz as in the given example.

So I was wondering why Xilinx assumes the clocks have valid paths by default. Shouldn't it be the case, that you have to constrain it if they are sync, instead of painfully define them as asyc – which is most likely case. A simple button in the GUI might do the job.

It would be just convenient to specify the input clock, specify the periods of the output clock in the GUI and that's it, without false paths settings. If you want to have them sync, then add some constrains.

(If I have 2 sync. clocks, I would prefer a functional solution (clock gating) instead of running them through the PLL with 2 clock trees.)

The phase alignment option in the clocking wizard doesn't make a change.

The current solution is that I don't constrain the input clock. Instead I constrain the output clocks of the PLL individually. I looks good during the flow, although the Constraint Generator complains about it when rereading the ucf. I still assume there is a nice solution for this.

 

Cheers, Tobi

50%
50%
hamster
hamster
2/11/2013 12:35:38 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
Hi Tobais, I'm pretty weak on constraints - (it sort of reflects the Constraints Users guide documentation, which is very sparse).

Yes, you have to treat any domain crossings as being completely async unless you know exactly what multi/div ratios you will be using, but anything other a simple  integer ratio might as well be async.

The trick is to add a Timing Ignore ('TIG') constraint. Examples can be found at http://www.xilinx.com/support/answers/2449.htm, but it always takes me ages to get the "from/to" expressions just right. 

50%
50%
JezmoSSL
JezmoSSL
2/10/2013 12:50:54 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
...and what ive done is modified your camera driver code to allow arbitary mapping between the frame buffer memory and the VGA driver so you can do tricks like point the camera at a mirrored ball and then remap the frame buffer to give a linear 'panorama' type view.

 

 

 






50%
50%
JezmoSSL
JezmoSSL
2/10/2013 4:14:14 AM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
just as a slight diversion, your ov7670 camera module could be used to drive the HDMI as the 7670 produces YCrCb data.

 As an aside for anyone not familar the releationship between RGB and YCrCb colour space is

R=Y +1.402(Cr)

G=Y-0.34414(Cb) - 0.71414(Cr)

B=Y+1.772(Cb)

and the way its transmitted by the camera means that the data is slightly compressed, but there is room for fun with colour space converters, and you can get a simple black and white image just from the Y component.

50%
50%
Tobias
Tobias
1/29/2013 6:31:21 AM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly

Hi Hamster and all, may I ask you a clocking question?

It looks as if you can generate 2 asynchronous clocks with the clock wizard (let's say a 60MHZ and a 70MHz clock from a 50MHz source). If this not possible, than sorry for my question and my understanding of the clock wizard GUI is false. I know it would be a challenge for the circuit. But if this is possible, why do I get timing reports for paths between registers of these 2 obviously asynchronous clock domains. How can I avoid it then, defining it as asynchronous, geeee ?

Thanks a lot, cheers, Tobias

50%
50%
JezmoSSL
JezmoSSL
1/27/2013 5:53:14 AM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
I found the problem, register 0x9D needs to be set to 0x01, and registers 0x15 and 0x16 get set twice.

in fact you can break it in all kinds of interesting ways by playing with the register settings, I think the register setting has got to be a bit more sophistimicated, the hdmi transmitter doesnt cope well with being told to wake up when its already awake.

50%
50%
JezmoSSL
JezmoSSL
1/27/2013 4:29:37 AM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
There is something very odd going on, first there are colour components in the test bar patterns, which vary everytime you restart the code.Secondly the bar patterns dont match what you would expect, and the standard linux disribution drives the hdmi with standard RGB quite happily.

I suggest there is some misunderstanding on how to drive the HDMI transmitter.I will investigate at some point today 

50%
50%
hamster
hamster
1/26/2013 9:26:02 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
Newer vesion uploaded, with debug code that allows the first 3 switches control the pixel values.

Can at least get a greyscale bar to display now!

50%
50%
hamster
hamster
1/26/2013 9:20:32 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
After banging my head against a brick wall I have found what is going on...

The D0 through D15 ports are actually connected to D8 through D23 on the transmitter. Verified this on the schematics too - a big thanks to the designer & documentation authors

RGB input is not possible. :-(

(yes, and make "initial_pause" 22 bits, to have about a 200ms pause before sending).

Will upload a newer version soon, that uses the only possible colourspace :-(

 

50%
50%
JezmoSSL
JezmoSSL
1/26/2013 1:41:36 PM
User Rank
Blogger
Re: Switching FPGA Internal Clock Frequencies On-the-Fly
Mike I had a play with your hdmi driver, and it has some issues , I am not convinced that the spi driver is correct partly because of the tri-stating of the driver screwing with the data being sent to the hdmi controller, and the initial wait is too short, I haven't had much time to explore these, at least it meets timing :)

50%
50%
Page 1 / 5   >   >>
More Blogs from Mike Field
Over the past few days I have managed to create quite a few designs using the Xilinx Memory Interface Generator (MIG) and they all seem to work.
If I were an evil genius working on a plan for world domination (with regard to enterprise-level data storage solutions) I would be seriously considering building my design around a Zynq All Programmable SoC.
I would like to present to fellow readers of All Programmable Planet a new technique that I have invented to serialize data within the FPGA's main fabric at 1.5Gb/s.
It's time to look at the receiver portion of the link. After a few false starts, Mike Field has found what looks to be a workable design.
As with most things, my feeling is that there is no better way to understand high-speed serial links than to implement one from the ground up, so that is what I've set out to do.
flash poll
follow us on twitter
follow Xilinx on twitter
like us on facebook
like Xilinx on facebook
All Programmable Planet     About Us     Contact Us     Help     Register     Twitter     Facebook     RSS