Advertisement
STANAANDREY

aha tcl

Jan 9th, 2025 (edited)
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. # Create and configure project
  2. project_new clock_project -overwrite
  3.  
  4. # Set device family and part
  5. set_global_assignment -name FAMILY "MAX 10"
  6. set_global_assignment -name DEVICE 10M50DAF484C7G
  7. set_global_assignment -name TOP_LEVEL_ENTITY clock_with_display
  8.  
  9. # Add source files
  10. set_global_assignment -name VERILOG_FILE ../verilog/control_code_sram.v
  11. set_global_assignment -name VERILOG_FILE ../verilog/stop_time_sram.v
  12. set_global_assignment -name VERILOG_FILE ../verilog/clock_control.v
  13. set_global_assignment -name VERILOG_FILE ../verilog/clock_divider.v
  14. set_global_assignment -name VERILOG_FILE ../verilog/seconds_counter.v
  15. set_global_assignment -name VERILOG_FILE ../verilog/minutes_counter.v
  16. set_global_assignment -name VERILOG_FILE ../verilog/hours_counter.v
  17. set_global_assignment -name VERILOG_FILE ../verilog/seven_segment_decoder.v
  18. set_global_assignment -name VERILOG_FILE ../verilog/clock_with_display.v
  19.  
  20. # Pin assignments for DE10-Lite
  21.  
  22. # Clock input (50MHz)
  23. set_location_assignment PIN_P11 -to clk_in
  24.  
  25. # Reset button (active low) - KEY0
  26. set_location_assignment PIN_B8 -to reset_n
  27.  
  28. # Control inputs using switches
  29. # SW0-SW2 for control_code
  30. set_location_assignment PIN_C10 -to control_code[0]
  31. set_location_assignment PIN_C11 -to control_code[1]
  32. set_location_assignment PIN_D12 -to control_code[2]
  33.  
  34. # SW9 for control_code_write_enable
  35. set_location_assignment PIN_F15 -to control_code_write_enable
  36.  
  37. # 7-segment display outputs
  38. # HEX0 (seconds ones)
  39. set_location_assignment PIN_C14 -to HEX0[0]
  40. set_location_assignment PIN_E15 -to HEX0[1]
  41. set_location_assignment PIN_C15 -to HEX0[2]
  42. set_location_assignment PIN_C16 -to HEX0[3]
  43. set_location_assignment PIN_E16 -to HEX0[4]
  44. set_location_assignment PIN_D17 -to HEX0[5]
  45. set_location_assignment PIN_C17 -to HEX0[6]
  46.  
  47. # HEX1 (seconds tens)
  48. set_location_assignment PIN_C18 -to HEX1[0]
  49. set_location_assignment PIN_D18 -to HEX1[1]
  50. set_location_assignment PIN_E18 -to HEX1[2]
  51. set_location_assignment PIN_B16 -to HEX1[3]
  52. set_location_assignment PIN_A17 -to HEX1[4]
  53. set_location_assignment PIN_A18 -to HEX1[5]
  54. set_location_assignment PIN_B17 -to HEX1[6]
  55.  
  56. # HEX2 (minutes ones)
  57. set_location_assignment PIN_B20 -to HEX2[0]
  58. set_location_assignment PIN_A20 -to HEX2[1]
  59. set_location_assignment PIN_B19 -to HEX2[2]
  60. set_location_assignment PIN_A21 -to HEX2[3]
  61. set_location_assignment PIN_B21 -to HEX2[4]
  62. set_location_assignment PIN_C22 -to HEX2[5]
  63. set_location_assignment PIN_B22 -to HEX2[6]
  64.  
  65. # HEX3 (minutes tens)
  66. set_location_assignment PIN_F21 -to HEX3[0]
  67. set_location_assignment PIN_E22 -to HEX3[1]
  68. set_location_assignment PIN_E21 -to HEX3[2]
  69. set_location_assignment PIN_C19 -to HEX3[3]
  70. set_location_assignment PIN_C20 -to HEX3[4]
  71. set_location_assignment PIN_D19 -to HEX3[5]
  72. set_location_assignment PIN_E17 -to HEX3[6]
  73.  
  74. # HEX4 (hours ones)
  75. set_location_assignment PIN_F18 -to HEX4[0]
  76. set_location_assignment PIN_E20 -to HEX4[1]
  77. set_location_assignment PIN_E19 -to HEX4[2]
  78. set_location_assignment PIN_J18 -to HEX4[3]
  79. set_location_assignment PIN_H19 -to HEX4[4]
  80. set_location_assignment PIN_F19 -to HEX4[5]
  81. set_location_assignment PIN_F20 -to HEX4[6]
  82.  
  83. # HEX5 (hours tens)
  84. set_location_assignment PIN_J20 -to HEX5[0]
  85. set_location_assignment PIN_K20 -to HEX5[1]
  86. set_location_assignment PIN_L18 -to HEX5[2]
  87. set_location_assignment PIN_N18 -to HEX5[3]
  88. set_location_assignment PIN_M20 -to HEX5[4]
  89. set_location_assignment PIN_N19 -to HEX5[5]
  90. set_location_assignment PIN_N20 -to HEX5[6]
  91.  
  92. # Project compilation settings
  93. set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
  94. set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
  95. set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
  96. set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 256
  97. set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
  98. set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
  99.  
  100. # Commit assignments
  101. export_assignments
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement