generated clocks or derived clocks "... without an associated clock assignment"
During my first steps with simple example designs on an experiment board I often use a clock derived from a hardware clock (input pin) by simple division.
Quartus then always recognizes the slower signal as clock without "an associated clock assignment". The circuit works though, but the warnings certainly have their purpose. Unfortunately, even after hours of reading endless "SDC" file manuals and dozens of examples, I have not found a solution to this, surely trivial, problem.
A simple, one module project, for instance:
module myI2C(
input CLOCK_50,
input [1:0] KEY,
);
wire reset_n;
wire I2C_CLK; //my clock
//counter
reg [6:0] I2CCLK;
always@(posedge CLOCK_50) I2CCLK <= I2CCLK + 1'b1;
assign reset_n = KEY[0];
assign I2C_CLK = I2CCLK[6]; //MSB of the counter
always @ (posedge I2C_CLK or negedge reset_n)
begin
// …
End
…
endmodule
... results when compiling completely with the warning:
„Warning (332060): Node: I2CCLK[6] was determined to be a clock but was found without an associated clock assignment.”
The SDC file of the project always contains:
create_clock -name CLOCK50 -period 20.000ns [get_ports CLOCK_50]
derive_pll_clocks
derive_clock_uncertainty
I have tried it with various additions. But they always make things worse! For example:
create_generated_clock -name I2CnCLK -source CLOCK50 -divide_by 128 [get_nets I2C_CLK]
results in:
Critical Warning (332049): Ignored create_generated_clock at myI2C.sdc … Argument <targets> is an empty collection
Can anyone here maybe help me?
Jan
Thanks for the quick reply!
The .sdc file was of course already in the Project. Otherwise, I would not have seen the critical warning(332049) for my malformed “create_generated_clock“ command, right?
But I found the solution! Your mention of the "Timing Analyzer" made me re-read its manual, especially about the “create_generated_clock“ command! The command must be correctly stated for my example above:
create_generated_clock -name any_name -source [get_ports {CLOCK_50}] -divide_by 128 [get_pins {I2CCLK[6]|q}]With this, the warning (332060) disappears and also the results of the "Timing Analyzer" become more plausible!
Best regards,
Jan