max80.sdc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # -*- tcl -*-
  2. # Clock constraints
  3. # Note: round up
  4. create_clock -name "clock_48" -period 20.834ns [get_ports {clock_48}]
  5. # rtc_32khz is technically a clock, but it is treated as an input signal
  6. # generating strobes - Quartus gets confused about a clock that slow
  7. # create_clock -name "rtc_32khz" -period 30517.579ns [get_ports {rtc_32khz}]
  8. # Automatically constrain PLL and other generated clocks
  9. derive_pll_clocks
  10. # Automatically calculate clock uncertainty to jitter and other effects.
  11. derive_clock_uncertainty
  12. # Reset isn't actually a clock, but Quartus thinks it is
  13. create_generated_clock -name rst_n \
  14. -source [get_nets pll|*clk\[1\]] \
  15. [get_registers rst_n]
  16. # Reset is asynchronous with everything as far as we are concerned.
  17. set main_clocks [get_clocks pll|*]
  18. set_clock_groups -asynchronous \
  19. -group $main_clocks \
  20. -group [get_clocks rst_n]
  21. set sdram_out_clk [get_clocks pll|*|clk\[0\]]
  22. set sdram_clk [get_clocks pll|*|clk\[4\]]
  23. set cpu_clk [get_clocks pll|*|clk\[1\]]
  24. set vid_clk [get_clocks pll|*|clk\[2\]]
  25. set flash_clk [get_clocks pll|*|clk\[3\]]
  26. # SDRAM I/O constraints
  27. # set_max_skew -to [get_ports sr_*] 0.500ns
  28. set sr_data_out [remove_from_collection [get_ports sr_*] sr_clk]
  29. set sr_data_in [get_ports sr_dq\[*\]]
  30. set_max_skew -to [get_ports sr_*] 0.100ns
  31. set_output_delay -clock $sdram_clk 1.500ns [get_ports sr_clk]
  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:*]