Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create and configure project
- project_new clock_project -overwrite
- # Set device family and part
- set_global_assignment -name FAMILY "MAX 10"
- set_global_assignment -name DEVICE 10M50DAF484C7G
- set_global_assignment -name TOP_LEVEL_ENTITY clock_with_display
- # Add source files
- set_global_assignment -name VERILOG_FILE ../verilog/control_code_sram.v
- set_global_assignment -name VERILOG_FILE ../verilog/stop_time_sram.v
- set_global_assignment -name VERILOG_FILE ../verilog/clock_control.v
- set_global_assignment -name VERILOG_FILE ../verilog/clock_divider.v
- set_global_assignment -name VERILOG_FILE ../verilog/seconds_counter.v
- set_global_assignment -name VERILOG_FILE ../verilog/minutes_counter.v
- set_global_assignment -name VERILOG_FILE ../verilog/hours_counter.v
- set_global_assignment -name VERILOG_FILE ../verilog/seven_segment_decoder.v
- set_global_assignment -name VERILOG_FILE ../verilog/clock_with_display.v
- # Pin assignments for DE10-Lite
- # Clock input (50MHz)
- set_location_assignment PIN_P11 -to clk_in
- # Reset button (active low) - KEY0
- set_location_assignment PIN_B8 -to reset_n
- # Control inputs using switches
- # SW0-SW2 for control_code
- set_location_assignment PIN_C10 -to control_code[0]
- set_location_assignment PIN_C11 -to control_code[1]
- set_location_assignment PIN_D12 -to control_code[2]
- # SW9 for control_code_write_enable
- set_location_assignment PIN_F15 -to control_code_write_enable
- # 7-segment display outputs
- # HEX0 (seconds ones)
- set_location_assignment PIN_C14 -to HEX0[0]
- set_location_assignment PIN_E15 -to HEX0[1]
- set_location_assignment PIN_C15 -to HEX0[2]
- set_location_assignment PIN_C16 -to HEX0[3]
- set_location_assignment PIN_E16 -to HEX0[4]
- set_location_assignment PIN_D17 -to HEX0[5]
- set_location_assignment PIN_C17 -to HEX0[6]
- # HEX1 (seconds tens)
- set_location_assignment PIN_C18 -to HEX1[0]
- set_location_assignment PIN_D18 -to HEX1[1]
- set_location_assignment PIN_E18 -to HEX1[2]
- set_location_assignment PIN_B16 -to HEX1[3]
- set_location_assignment PIN_A17 -to HEX1[4]
- set_location_assignment PIN_A18 -to HEX1[5]
- set_location_assignment PIN_B17 -to HEX1[6]
- # HEX2 (minutes ones)
- set_location_assignment PIN_B20 -to HEX2[0]
- set_location_assignment PIN_A20 -to HEX2[1]
- set_location_assignment PIN_B19 -to HEX2[2]
- set_location_assignment PIN_A21 -to HEX2[3]
- set_location_assignment PIN_B21 -to HEX2[4]
- set_location_assignment PIN_C22 -to HEX2[5]
- set_location_assignment PIN_B22 -to HEX2[6]
- # HEX3 (minutes tens)
- set_location_assignment PIN_F21 -to HEX3[0]
- set_location_assignment PIN_E22 -to HEX3[1]
- set_location_assignment PIN_E21 -to HEX3[2]
- set_location_assignment PIN_C19 -to HEX3[3]
- set_location_assignment PIN_C20 -to HEX3[4]
- set_location_assignment PIN_D19 -to HEX3[5]
- set_location_assignment PIN_E17 -to HEX3[6]
- # HEX4 (hours ones)
- set_location_assignment PIN_F18 -to HEX4[0]
- set_location_assignment PIN_E20 -to HEX4[1]
- set_location_assignment PIN_E19 -to HEX4[2]
- set_location_assignment PIN_J18 -to HEX4[3]
- set_location_assignment PIN_H19 -to HEX4[4]
- set_location_assignment PIN_F19 -to HEX4[5]
- set_location_assignment PIN_F20 -to HEX4[6]
- # HEX5 (hours tens)
- set_location_assignment PIN_J20 -to HEX5[0]
- set_location_assignment PIN_K20 -to HEX5[1]
- set_location_assignment PIN_L18 -to HEX5[2]
- set_location_assignment PIN_N18 -to HEX5[3]
- set_location_assignment PIN_M20 -to HEX5[4]
- set_location_assignment PIN_N19 -to HEX5[5]
- set_location_assignment PIN_N20 -to HEX5[6]
- # Project compilation settings
- set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
- set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
- set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
- set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 256
- set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
- set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
- # Commit assignments
- export_assignments
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement