quartus fuer windows:
[hwmod.git] / quartus / project.tcl
1 package require ::quartus::project
2
3 set need_to_close_project 0
4 set make_assignments 1
5
6 # Check that the right project is open
7 if {[is_project_open]} {
8         if {[string compare $quartus(project) "calc"]} {
9                 puts "Project calc is not open"
10                 set make_assignments 0
11         }
12 } else {
13         # Only open if not already open
14         if {[project_exists calc]} {
15                 project_open -revision calc calc
16         } else {
17                 project_new -revision calc calc
18         }
19         set need_to_close_project 1
20 }
21
22 # Make assignments
23 if {$make_assignments} {
24         set_global_assignment -name FAMILY Stratix
25         set_global_assignment -name DEVICE EP1S10F672C6
26         set_global_assignment -name EDA_SIMULATION_TOOL "ModelSim (VHDL)"
27         set_global_assignment -name EDA_OUTPUT_DATA_FORMAT VHDL -section_id eda_simulation
28         set_global_assignment -name USE_GENERATED_PHYSICAL_CONSTRAINTS OFF -section_id eda_blast_fpga
29         set_global_assignment -name MISC_FILE "calc.dpf"
30         set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
31         set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED WITH WEAK PULL-UP"
32         set_global_assignment -name RESERVE_ASDO_AFTER_CONFIGURATION "AS INPUT TRI-STATED"
33
34         set_global_assignment -name TOP_LEVEL_ENTITY calc
35         set_global_assignment -name VHDL_FILE ../../src/gen_pkg.vhd
36         set_global_assignment -name VHDL_FILE ../../src/calc.vhd
37         set_global_assignment -name VHDL_FILE ../../src/alu.vhd
38
39         set_location_assignment PIN_N3 -to sys_clk
40         set_location_assignment PIN_AF17 -to sys_res_n
41
42         set_global_assignment -name FMAX_REQUIREMENT "33.33 MHz" -section_id sys_clk
43         set_instance_assignment -name CLOCK_SETTINGS sys_clk -to sys_clk
44
45         set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
46         set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region"
47         set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
48         set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
49         set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
50
51         # Commit assignments
52         export_assignments
53
54         # Close project
55         if {$need_to_close_project} {
56                 project_close
57         }
58 }