Forum Discussion

Fromhell777's avatar
Fromhell777
Icon for New Contributor rankNew Contributor
5 years ago

Change clock propagation through multiplexers

When reading though the Quartus documentation I noticed that when a mux is present on the clock network both clocks are propagated through and kept related.

The proposed solution is to use the "create_generated_clock" statement in the SDC file on the mux output for both input clocks.

For example when you have two input clocks that you want to have in the same clock group like this:

______
clk_a -----| |
| mux |----- output
clk_b -----|_____|

create_clock -name clock_a -period 10 [get_ports clk_a]
create_clock -name clock_b -period 10 [get_ports clk_b]
create_generated_clock -name clock_a_mux -source [get_ports clk_a] \
	[get_pins clk_mux|mux_out]
create_generated_clock -name clock_b_mux -source [get_ports clk_b] \
	[get_pins clk_mux|mux_out] -add
set_clock_groups -exclusive -group {clock_a clock_a_mux clock_b clock_b_mux}

set_false_path -from [get_clocks "clock_a_mux"] \
-to [get_clocks "clock_b_mux"]
set_false_path -from [get_clocks "clock_b_mux"] \
-to [get_clocks "clock_a_mux"]

But is it possible to have this as the default behavior with a setting?

When you have a couple of muxes after each other in the design the amount of constraints really explodes.

It is almost impossible to go over all these cases in a large design.

When this behavior could be changed this would simplify the constraint process.

If Quartus was also smart enough to analyze if clocks after muxes could be related or not, this would also simplify a lot of things.

For example when you have 2 muxes, both with the clk_a and clk_b as input.
And these 2 muxes have the same selector. Quartus could detect that clock_a_mux0 can never be active at the same time as clock_b_mux1.

This saves the user from incorporating all these cases in their constraints.

Does Quartus do this kind of analysis?

7 Replies