§ Главное

Ссылка на загрузку шаблона
Компилятор и IDE: Quartus 9.1 SP2
  • update.bat
  • marsohod2.v
  • marsohod2.qsf
  • marsohod2.qpf
  • .gitignore
  • vga.v
  • pll.v

§ Команда обновления MIF (update.bat)

Запуск этой команды позволяет быстро обновить MIF-файлы без перекомпиляции проекта.
1@echo off
2quartus_cdb marsohod2 -c marsohod2 --update_mif
3quartus_asm --read_settings_files=on --write_settings_files=off marsohod2 -c marsohod2

§ marsohod2.v

1module marsohod2(
2
3    /* ----------------
4     * Archectural Marsohod2
5     * ---------------- */
6
7    // CLOCK    100 Mhz
8    input   wire        clk,
9
10    // LED      4
11    output  wire [3:0]  led,
12
13    // KEYS     2
14    input   wire [1:0]  keys,
15
16    // ADC      8 bit
17    output  wire        adc_clock_20mhz,
18    input   wire [7:0]  adc_input,
19
20    // SDRAM
21    output  wire        sdram_clock,
22    output  wire [11:0] sdram_addr,
23    output  wire [1:0]  sdram_bank,
24    inout   wire [15:0] sdram_dq,
25    output  wire        sdram_ldqm,
26    output  wire        sdram_udqm,
27    output  wire        sdram_ras,
28    output  wire        sdram_cas,
29    output  wire        sdram_we,
30
31    // VGA
32    output  wire [4:0]  vga_red,
33    output  wire [5:0]  vga_green,
34    output  wire [4:0]  vga_blue,
35    output  wire        vga_hs,
36    output  wire        vga_vs,
37
38    // FTDI (PORT-B)
39    input   wire        ftdi_rx,
40    output  wire        ftdi_tx,
41
42    /* ----------------
43     * Extension Shield
44     * ---------------- */
45
46    // USB-A    2 pins
47    inout   wire [1:0]  usb,
48
49    // SOUND    2 channel
50    output  wire        sound_left,
51    output  wire        sound_right,
52
53    // PS/2     keyb / mouse
54    inout   wire [1:0]  ps2_keyb,   // ps2_keyb[0] = DAT,   ps2_mouse[0] = DAT
55    inout   wire [1:0]  ps2_mouse   // ps2_keyb[1] = CLK,   ps2_mouse[0] = CLK
56);
57// --------------------------------------------------------------------------
58
59pll PLL(
60
61    .clk        (clk),          // Входящие 100 Мгц
62    .locked     (locked),       // 1 - готово и стабильно
63    .c0         (clock_25),     // 25,0 Mhz
64    .c1         (clock_12),     // 12,0 Mhz
65    .c2         (clock_6),      //  6,0 Mhz
66    .c3         (clock_50)      // 50,0 Mhz
67);
68
69vga VGA
70(
71    // Опорная частота
72    .CLOCK (clock_25),
73
74    // Выходные данные
75    .VGA_R  (vga_red[4:1]),
76    .VGA_G  (vga_green[5:2]),
77    .VGA_B  (vga_blue[4:1]),
78    .VGA_HS (vga_hs),
79    .VGA_VS (vga_vs)
80);
81
82endmodule

§ marsohod2.qsf

1set_global_assignment -name FAMILY "Cyclone III"
2set_global_assignment -name DEVICE EP3C10E144C8
3set_global_assignment -name TOP_LEVEL_ENTITY marsohod2
4set_global_assignment -name ORIGINAL_QUARTUS_VERSION "9.1 SP2"
5set_global_assignment -name PROJECT_CREATION_TIME_DATE "11:30:40  JULY 19, 2017"
6set_global_assignment -name LAST_QUARTUS_VERSION "9.1 SP2"
7set_global_assignment -name USE_GENERATED_PHYSICAL_CONSTRAINTS OFF -section_id eda_blast_fpga
8set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
9set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
10set_global_assignment -name NOMINAL_CORE_SUPPLY_VOLTAGE 1.2V
11set_global_assignment -name VERILOG_FILE marsohod2.v
12set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
13set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
14set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
15set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region"
16set_global_assignment -name MISC_FILE "marsohod2.dpf"
17set_global_assignment -name TIMEQUEST_MULTICORNER_ANALYSIS ON
18set_global_assignment -name TIMEQUEST_DO_CCPP_REMOVAL ON
19set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
20set_global_assignment -name RESERVE_ALL_UNUSED_PINS_WEAK_PULLUP "AS INPUT TRI-STATED"
21set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "2.5 V"
22set_location_assignment PIN_79 -to led[3]
23set_location_assignment PIN_83 -to led[2]
24set_location_assignment PIN_84 -to led[1]
25set_location_assignment PIN_85 -to led[0]
26set_location_assignment PIN_23 -to keys[0]
27set_location_assignment PIN_22 -to keys[1]
28set_location_assignment PIN_100 -to adc_input[0]
29set_location_assignment PIN_99 -to adc_input[1]
30set_location_assignment PIN_98 -to adc_input[2]
31set_location_assignment PIN_91 -to adc_input[3]
32set_location_assignment PIN_90 -to adc_input[4]
33set_location_assignment PIN_89 -to adc_input[5]
34set_location_assignment PIN_87 -to adc_input[7]
35set_location_assignment PIN_88 -to adc_input[6]
36set_location_assignment PIN_25 -to clk
37set_location_assignment PIN_86 -to adc_clock_20mhz
38set_location_assignment PIN_128 -to vga_blue[4]
39set_location_assignment PIN_129 -to vga_blue[3]
40set_location_assignment PIN_132 -to vga_blue[2]
41set_location_assignment PIN_133 -to vga_blue[1]
42set_location_assignment PIN_135 -to vga_blue[0]
43set_location_assignment PIN_144 -to vga_red[4]
44set_location_assignment PIN_1 -to vga_red[3]
45set_location_assignment PIN_2 -to vga_red[2]
46set_location_assignment PIN_3 -to vga_red[1]
47set_location_assignment PIN_7 -to vga_red[0]
48set_location_assignment PIN_136 -to vga_green[5]
49set_location_assignment PIN_137 -to vga_green[4]
50set_location_assignment PIN_138 -to vga_green[3]
51set_location_assignment PIN_141 -to vga_green[2]
52set_location_assignment PIN_142 -to vga_green[1]
53set_location_assignment PIN_143 -to vga_green[0]
54set_location_assignment PIN_127 -to vga_hs
55set_location_assignment PIN_126 -to vga_vs
56set_location_assignment PIN_60 -to sdram_addr[0]
57set_location_assignment PIN_64 -to sdram_addr[1]
58set_location_assignment PIN_65 -to sdram_addr[2]
59set_location_assignment PIN_66 -to sdram_addr[3]
60set_location_assignment PIN_46 -to sdram_addr[4]
61set_location_assignment PIN_49 -to sdram_addr[5]
62set_location_assignment PIN_50 -to sdram_addr[6]
63set_location_assignment PIN_51 -to sdram_addr[7]
64set_location_assignment PIN_52 -to sdram_addr[8]
65set_location_assignment PIN_53 -to sdram_addr[9]
66set_location_assignment PIN_59 -to sdram_addr[10]
67set_location_assignment PIN_54 -to sdram_addr[11]
68set_location_assignment PIN_55 -to sdram_bank[0]
69set_location_assignment PIN_58 -to sdram_bank[1]
70set_location_assignment PIN_30 -to sdram_dq[15]
71set_location_assignment PIN_31 -to sdram_dq[14]
72set_location_assignment PIN_32 -to sdram_dq[13]
73set_location_assignment PIN_33 -to sdram_dq[12]
74set_location_assignment PIN_34 -to sdram_dq[11]
75set_location_assignment PIN_38 -to sdram_dq[10]
76set_location_assignment PIN_39 -to sdram_dq[9]
77set_location_assignment PIN_42 -to sdram_dq[8]
78set_location_assignment PIN_71 -to sdram_dq[7]
79set_location_assignment PIN_72 -to sdram_dq[6]
80set_location_assignment PIN_73 -to sdram_dq[5]
81set_location_assignment PIN_74 -to sdram_dq[4]
82set_location_assignment PIN_75 -to sdram_dq[3]
83set_location_assignment PIN_76 -to sdram_dq[2]
84set_location_assignment PIN_77 -to sdram_dq[1]
85set_location_assignment PIN_80 -to sdram_dq[0]
86set_location_assignment PIN_68 -to sdram_cas
87set_location_assignment PIN_44 -to sdram_clock
88set_location_assignment PIN_70 -to sdram_ldqm
89set_location_assignment PIN_67 -to sdram_ras
90set_location_assignment PIN_43 -to sdram_udqm
91set_location_assignment PIN_69 -to sdram_we
92set_location_assignment PIN_111 -to sound_left
93set_location_assignment PIN_112 -to sound_right
94set_location_assignment PIN_103 -to usb[1]
95set_location_assignment PIN_104 -to usb[0]
96set_location_assignment PIN_113 -to ps2_keyb[1]
97set_location_assignment PIN_114 -to ps2_keyb[0]
98set_location_assignment PIN_115 -to ps2_mouse[1]
99set_location_assignment PIN_119 -to ps2_mouse[0]
100set_location_assignment PIN_24 -to ftdi_rx
101set_location_assignment PIN_28 -to ftdi_tx
102set_global_assignment -name VECTOR_WAVEFORM_FILE marsohod2.vwf
103set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
Дополнительно сюда можно вписать еще вот это
1set_global_assignment -name CYCLONEII_RESERVE_NCEO_AFTER_CONFIGURATION "USE AS REGULAR IO"
2set_global_assignment -name RESERVE_DATA0_AFTER_CONFIGURATION "USE AS REGULAR IO"
3set_global_assignment -name RESERVE_DATA1_AFTER_CONFIGURATION "USE AS REGULAR IO"
4set_global_assignment -name RESERVE_FLASH_NCE_AFTER_CONFIGURATION "USE AS REGULAR IO"
5set_global_assignment -name FORCE_CONFIGURATION_VCCIO ON
Это сделает возможным использование некоторых пинов для второго USB на шилде.

§ marsohod2.qpf

1QUARTUS_VERSION = "9.1"
2DATE = "11:30:40 July 19, 2017"
3PROJECT_REVISION = "marsohod2"

§ .gitignore

1db
2incremental_db
3simulation
4timing
5*.rpt
6*.summary
7*.sof
8*.done
9*.pin
10*.qws
11*.bak
12*.smsg
13*.qws
14*.vcd
15*.qqq
16*.jic
17*.map
18*.qqq
19undo_redo.txt
20PLLJ_PLLSPE_INFO.txt