-
Notifications
You must be signed in to change notification settings - Fork 0
/
de1soc_top.sv
59 lines (48 loc) · 1.68 KB
/
de1soc_top.sv
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
module de1soc_top
(
// These are the board inputs/outputs required for all the ECE342 labs.
// Each lab can use the subset it needs -- unused pins will be ignored.
// Clock pins
input CLOCK_50,
// Seven Segment Displays
output [6:0] HEX0,
output [6:0] HEX1,
output [6:0] HEX2,
output [6:0] HEX3,
output [6:0] HEX4,
output [6:0] HEX5,
// Pushbuttons
input [3:0] KEY,
// LEDs
output [9:0] LEDR,
// Slider Switches
input [9:0] SW,
// VGA
output [7:0] VGA_B,
output VGA_BLANK_N,
output VGA_CLK,
output [7:0] VGA_G,
output VGA_HS,
output [7:0] VGA_R,
output VGA_SYNC_N,
output VGA_VS
);
// This generates a one-time ACTIVE-LOW asynchronous reset
// signal on powerup. You can use it for the Qsys system.
logic reset_n;
logic [1:0] reset_reg = 2'b00;
always_ff @ (posedge CLOCK_50) begin
reset_n <= reset_reg[0];
reset_reg <= {1'b1, reset_reg[1]};
end
soc soc_inst(
.clk_clk (CLOCK_50), // clk.clk
.hex0_export (HEX0), // hex0.export
.hex1_export (HEX1), // hex1.export
.hex2_export (HEX2), // hex2.export
.hex3_export (HEX3), // hex3.export
.leds_export (LEDR), // leds.export
.reset_reset_n (reset_n), // reset.reset_n
.switches_export (SW) // switches.export
);
endmodule