SDC file for clock creation

gahelton

Newbie level 4
Joined
May 8, 2023
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
88
I'm sorry, but I'm about at my wits end. I have been trying to create clocks for an FPGA design so that I can verify timing constraints.

I've tried some many iterations and followed examples with very limited success. Below is a block diagram for my system.

Ultimately, I need to create a clock (32MHZ) to inject into FPGA signal "clock", and a clock (20MHZ) to inject into FPGA signal "clock_alu", both for the purpose of verifying time constraints.



====================================================
This is my latest iteration of the portion of the SDC file that is supposed to create these clocks. I am not as concerned about the uFROM_CLOCK right now.

Code:
set sdc_version 1.7
set_time_format -unit ns -decimal_places 6

########  Clock Constraints  ########

create_clock -name { CLK_64M }  -period 15.625000 [ get_ports CLK_64M ]
create_clock -name { clock } -period 31.250000 [ get_pins { clock_pll/GLA } ]
create_clock -name { clock_alu } -period 41.666667 [ get_pins clock_pll/GLB } ]


create_clock  -name { uFROM_CLOCK } -period 100.000 -waveform { 0.000 50.000  }  { \
fpga_core_1/inst_ufrom_interface1/reg_ufrom_clock:Q  }
====================================================
Looking at the clock summary from the log file

========================================================

It appears as if "clock" and "clock_alu" are being created, but they are not being assigned to the proper port/pin/net in the design. Instead, the tool is "inferring" the GLA and GLB clocks out of the PLL, and are not using the clocks that I've defined.

I've tried using get_ports, get_pins, I've tried using absolute paths like fpga_core_1/fpga_io_ring_1/clock_pll_1/pll/GLA -or- fpga_core_1.fpga_io_ring_1.clock_pll_1.pll.GLA.
I've also tried versions without the instance numbers like fpga_core.fpga_io_ring. etc, etc.

If tried variant after variant, with no success so far.

=========================================================

Also, at one point, I had a line in the SDC file that said that "clock" and "clock_alu" were async to each other, and not to check timing between them, but I have lost it along the way.

Any help would be greatly appreciated.

Thanks
 
Last edited by a moderator:

You only need to define base clcok i.e. clk_64M.
add to it: derive pll clocks (the tool knows what PLL is doing)
 

You only need to define base clcok i.e. clk_64M.
add to it: derive pll clocks (the tool knows what PLL is doing)
Hi Kaz1,

Thank you for the reply. I tried the "derive_pll_clocks" option with no success.

It doesn't give me a warning, but it doesn't work either.

====================================================================
This was the sdc file.
Code:
set sdc_version 1.7
set_time_format -unit ns -decimal_places 6
########  Clock Constraints  ########
create_clock -name { CLK_64M }  -period 15.625000 [ get_ports CLK_64M ] derive_pll_clocks
#create_clock -name { clock } -period 31.250000 [ get_pins { clock_pll/GLA } ]
#create_clock -name { clock_alu } -period 41.666667 [ get_pins clock_pll/GLB } ]
I am using the Altera/Microsemi/Microchip Libero-Synopsys tool sets, and I cannot find anything about derive_pll_clocks in their literature. I did find it in the Intel docs. Microchip may not support this option.

======================================================================
Here is the clock summary report.
=========================================================================

The Microsemi Libero documents describe the "create_generated_clock" command which can setup multipliers and divisors to simulate a PLL. But I was confused about the -source option. The -source option allows you to set the input pin to the PLL, but how do you specify the frequency of the clock that goes into that pin ?

Still searching.
 
Last edited by a moderator:

Use the create_clock command for the clock that is input from the board to the FPGA (i.e. clk_64M).
Use the create_generated_clock command for all clocks generated from the PLL, i.e. at the output of PLL (i.e. GLA and GLM).
 

Cookies are required to use this site. You must accept them to continue using the site. Learn more…