2
0

max80.sdc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # -*- tcl -*-
  2. # Clock constraints
  3. # Input master clock for all PLLs
  4. create_clock -name "clock_48" -period 20.834ns [get_ports {clock_48}]
  5. derive_pll_clocks
  6. # Handle both the RTC input clock and the internal workaround
  7. # The internal workaround clock should still be treated an asynchronous
  8. create_clock -name "rtc_32khz" -period 30517.578ns [get_ports {rtc_32khz}]
  9. create_clock -name "ctr_32khz" -period 30517.578ns [get_registers {ctr_32khz}]
  10. set_clock_groups -asynchronous -group {rtc_32khz}
  11. set_clock_groups -asynchronous -group {ctr_32khz}
  12. # Automatically calculate clock uncertainty to jitter and other effects.
  13. derive_clock_uncertainty
  14. # Reset isn't actually a clock, but Quartus thinks it is
  15. create_generated_clock -name rst_n \
  16. -source [get_nets pll|*clk\[1\]] \
  17. [get_registers rst_n]
  18. # Reset is asynchronous with everything as far as we are concerned.
  19. set main_clocks [get_clocks pll|*]
  20. set_clock_groups -asynchronous \
  21. -group $main_clocks \
  22. -group [get_clocks rst_n]
  23. set sdram_out_clk [get_clocks pll|*|clk\[0\]]
  24. set sdram_clk [get_clocks pll|*|clk\[4\]]
  25. set cpu_clk [get_clocks pll|*|clk\[1\]]
  26. set vid_clk [get_clocks pll|*|clk\[2\]]
  27. set flash_clk [get_clocks pll|*|clk\[3\]]
  28. # SDRAM I/O constraints
  29. set sr_data_out [remove_from_collection [get_ports sr_*] sr_clk]
  30. set sr_data_in [get_ports sr_dq\[*\]]
  31. set_max_skew -to $sr_data_out 0.100ns
  32. set_input_delay -clock $sdram_clk 0.500ns $sr_data_in
  33. # Anything that feeds into a synchronizer is by definition
  34. # asynchronous, but encode it as allowing multicycle of one
  35. # clock, to limit the possible skew (but it is of course not possible
  36. # to eliminate it...)
  37. set synchro_inputs [get_registers *|synchronizer:*|qreg0*]
  38. set_multicycle_path -from [all_clocks] -to $synchro_inputs \
  39. -start -setup 2
  40. set_multicycle_path -from [all_clocks] -to $synchro_inputs \
  41. -start -hold 1
  42. set_multicycle_path -from $sdram_clk -to $sdram_out_clk \
  43. -start -setup 2
  44. set_multicycle_path -from $sdram_clk -to $sdram_out_clk \
  45. -start -hold 0
  46. # Don't report signaltap clock problems...
  47. set_false_path -to [get_registers sld_signaltap:*]