amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Determine frequency of Cyclone V clock

Open Lunaphied opened this issue 3 years ago • 3 comments

This needs to actually be measured on real hardware, value is not well documented.

Lunaphied avatar Dec 13 '21 10:12 Lunaphied

The Cyclone-V handbook says:

If you use the internal oscillator, you can choose a 12.5, 25, 50, or 100 MHz clock under the Device and Pin Options dialog box, in the Configuration page of the Intel Quartus Prime software.

It's not entirely clear where this adds a divider in the clocking path, so this needs to be checked.

whitequark avatar Dec 13 '21 10:12 whitequark

The setting in question controls set_global_assignment -name ACTIVE_SERIAL_CLOCK FREQ_{100,50,25,12_5}MHZ, which I think controls the oscillator frequency when loading bitstreams from flash.

More specifically: it changes the OPTION_REG_EXTERNAL_CLK_SPI part of bitstream Option RAM to 001 (100MHz) / 011 (50MHz) / 101 (25MHz) / 111 (12.5MHz). (this has been added to Mistral, since it was overlooked)

I think one would need to manually instantiate a cyclonev_oscillator block.

Ravenslofty avatar Dec 13 '21 12:12 Ravenslofty

It seems that AN 496 documents the Cyclone V internal oscillator at 100 MHz maximum. This is... still incredibly vague but it's better than nothing.

Ravenslofty avatar Nov 13 '22 12:11 Ravenslofty