-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop.v
91 lines (76 loc) · 2.54 KB
/
top.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// ============================================================================
// Ver :| Author :| Mod. Date :| Changes Made:
// V1.0 :| George Totolos :| 08/22/2016:| Initial Revision
// ============================================================================
//=======================================================
// This code is generated by Terasic System Builder
//=======================================================
`define ENABLE_ADC_CLOCK
`define ENABLE_CLOCK1
`define ENABLE_CLOCK2
`define ENABLE_SDRAM
`define ENABLE_HEX0
`define ENABLE_HEX1
`define ENABLE_HEX2
`define ENABLE_HEX3
`define ENABLE_HEX4
`define ENABLE_HEX5
`define ENABLE_KEY
`define ENABLE_LED
`define ENABLE_SW
`define ENABLE_VGA
`define ENABLE_ACCELEROMETER
`define ENABLE_ARDUINO
`define ENABLE_GPIO
module top(
`ifdef ENABLE_CLOCK1
input MAX10_CLK1_50,
`endif
//////////// SEG7: 3.3-V LVTTL //////////
`ifdef ENABLE_HEX0
output reg [7:0] HEX0,
`endif
`ifdef ENABLE_HEX1
output reg [7:0] HEX1,
`endif
`ifdef ENABLE_HEX2
output reg [7:0] HEX2,
`endif
`ifdef ENABLE_HEX3
output reg [7:0] HEX3,
`endif
`ifdef ENABLE_HEX4
output reg [7:0] HEX4,
`endif
`ifdef ENABLE_HEX5
output reg [7:0] HEX5,
`endif
//////////// KEY: 3.3 V SCHMITT TRIGGER //////////
`ifdef ENABLE_KEY
input [1:0] KEY,
`endif
//////////// LED: 3.3-V LVTTL //////////
`ifdef ENABLE_LED
output [9:0] LEDR,
`endif
//////////// SW: 3.3-V LVTTL //////////
`ifdef ENABLE_SW
input [9:0] SW
`endif
);
nios2 u0 (
.clk_clk (MAX10_CLK1_50), // clk.clk
.reset_reset_n (1'b1), // reset.reset_n
.led_external_connection_export (ledFromNios[9:0]), // led_external_connection.export
.switch_external_connection_export (SW[9:0]), // switch_external_connection.export
.hex0_external_connection_export (HEX0), // hex0_external_connection.export
.hex5_external_connection_export (HEX5), // hex5_external_connection.export
.hex4_external_connection_export (HEX4), // hex4_external_connection.export
.hex3_external_connection_export (HEX3), // hex3_external_connection.export
.hex2_external_connection_export (HEX2), // hex2_external_connection.export
.hex1_external_connection_export (HEX1), // hex1_external_connection.export
.button_external_connection_export (~KEY[1:0]) // button_external_connection.export
);
wire [9:0] ledFromNios;
assign LEDR[9:0] = ledFromNios[9:0];
endmodule