Skip to content

Commit 207ffd2

Browse files
committed
Init commit
0 parents  commit 207ffd2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10832
-0
lines changed

DE1_SoC.sv

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// op-level module that defines the I/Os for the DE-1 SoC board
2+
// Outputs to VGA monitor
3+
// Outputs score to 7-Seg displays (HEX)
4+
// Uses buttons for left and right paddle movements
5+
// Uses switches for settings (Color mode, AI, Speed, Reset)
6+
7+
module DE1_SoC (CLOCK_50, HEX0, HEX1, HEX2, HEX3, HEX4, HEX5, KEY, LEDR, SW, VGA_HS, VGA_VS, VGA_R, VGA_B, VGA_G, VGA_CLK, VGA_BLANK_N, VGA_SYNC_N);
8+
9+
input CLOCK_50;
10+
11+
wire [31:0] clk;
12+
parameter whichClock = 15;
13+
clock_divider cdiv (CLOCK_50, clk);
14+
15+
//VGA outputs
16+
output VGA_HS, VGA_VS, VGA_CLK, VGA_BLANK_N,VGA_SYNC_N;
17+
output [7:0] VGA_R, VGA_B, VGA_G;
18+
19+
output [6:0] HEX0, HEX1, HEX2, HEX3, HEX4, HEX5;
20+
output reg [9:0] LEDR;
21+
input [3:0] KEY;
22+
input [9:0] SW;
23+
24+
assign HEX2 = 7'b1111111;
25+
assign HEX3 = 7'b1111111;
26+
assign LEDR[0] = SW[0];
27+
28+
pong dosome (.clk(clk[0]), .reset(SW[9]), .VGA_HS, .VGA_VS, .VGA_R, .VGA_G(VGA_G), .VGA_B(VGA_B), .KEY, .SW(SW[8:0]), .HEX5, .HEX4, .HEX1, .HEX0, .VGA_BLANK_N, .VGA_SYNC_N, .VGA_CLK);
29+
endmodule
30+
31+
// divided_clocks[0] = 25MHz, [1] = 12.5Mhz, ... [23] = 3Hz, [24] = 1.5Hz, [25] = 0.75Hz, ...
32+
module clock_divider (clock, divided_clocks);
33+
input clock;
34+
output [31:0] divided_clocks;
35+
reg [31:0] divided_clocks;
36+
37+
initial
38+
divided_clocks = 0;
39+
40+
always @(posedge clock)
41+
divided_clocks = divided_clocks + 1;
42+
endmodule

DE1_SoC_files/DE1_SoC.pti_db_list.ddb

296 Bytes
Binary file not shown.

DE1_SoC_files/DE1_SoC.qpf

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -------------------------------------------------------------------------- #
2+
#
3+
# Copyright (C) 1991-2014 Altera Corporation. All rights reserved.
4+
# Your use of Altera Corporation's design tools, logic functions
5+
# and other software and tools, and its AMPP partner logic
6+
# functions, and any output files from any of the foregoing
7+
# (including device programming or simulation files), and any
8+
# associated documentation or information are expressly subject
9+
# to the terms and conditions of the Altera Program License
10+
# Subscription Agreement, the Altera Quartus II License Agreement,
11+
# the Altera MegaCore Function License Agreement, or other
12+
# applicable license agreement, including, without limitation,
13+
# that your use is for the sole purpose of programming logic
14+
# devices manufactured by Altera and sold by Altera or its
15+
# authorized distributors. Please refer to the applicable
16+
# agreement for further details.
17+
#
18+
# -------------------------------------------------------------------------- #
19+
#
20+
# Quartus II 64-Bit
21+
# Version 14.0.0 Build 200 06/17/2014 SJ Web Edition
22+
# Date created = 09:58:47 September 09, 2014
23+
#
24+
# -------------------------------------------------------------------------- #
25+
26+
QUARTUS_VERSION = "14.0"
27+
DATE = "09:58:47 September 09, 2014"
28+
29+
# Revisions
30+
31+
PROJECT_REVISION = "DE1_SoC"

0 commit comments

Comments
 (0)