Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

TCL command to check for clock assignment

Hi,

I'm looking for a TCL command to find if a given port/pin has already been assigned a clock with create_clock/create_generated_clock.

Cheers.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This is not quite what you are asking, but I typically use the .sdc syntax:

    
    set ports 
    if { == 1} {
    	set clkin_50MHz_period 20
    	set name clkin_50MHz
    	puts "  ==> S4GXDK: constrain clock $name"
    	create_clock                    
    		-period $clkin_50MHz_period 
    		-name $name 
    	set_clock_groups -exclusive -group $name
    }
    

    This checks to see if a clock has been used in a design, and if it has, then assigns a default clock contraint, and group.

    Cheers,

    Dave