Skip to content

Commit b5a2b6e

Browse files
committed
HPS enhanced 25.1 release src
0 parents  commit b5a2b6e

File tree

834 files changed

+684063
-0
lines changed

Some content is hidden

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

834 files changed

+684063
-0
lines changed

.gitmodules

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[submodule "poky"]
2+
path = src/sw/poky
3+
url = https://git.yoctoproject.org/git/poky
4+
branch = styhead
5+
[submodule "meta-intel-fpga"]
6+
path = src/sw/meta-intel-fpga
7+
url = https://git.yoctoproject.org/git/meta-intel-fpga
8+
branch = styhead
9+
[submodule "meta-intel-fpga-refdes"]
10+
path = src/sw/meta-intel-fpga-refdes
11+
url = https://github.com/altera-opensource/meta-intel-fpga-refdes.git
12+
branch = styhead
13+
[submodule "meta-openembedded"]
14+
path = src/sw/meta-openembedded
15+
url = https://git.openembedded.org/meta-openembedded
16+
branch = styhead
17+
[submodule "meta-clang"]
18+
path = src/sw/meta-clang
19+
url = https://github.com/kraj/meta-clang.git
20+
branch = styhead
21+
[submodule "meta-virtualization"]
22+
path = src/sw/meta-virtualization
23+
url = https://git.yoctoproject.org/git/meta-virtualization
24+
branch = styhead

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Agilex 5e HPS Enhanced System Example Design
2+
3+
HPS Enhanced System Example Design is for Altera 5e System On Chip (SoC) FPGA. It works together with a complete solution to boot Uboot and Linux with Altera SoC Development board.
4+
5+
This example design demonstrates the following system integration between Hard Processor System (HPS) and FPGA IPs:
6+
- Hard Processor System enablement and configuration
7+
- HPS Peripheral and I/O (eg, NAND, SD/MMC, EMAC, USB, SPI, I2C, UART, and GPIO)
8+
- HPS Clock and Reset
9+
- HPS FPGA Bridge and Interrupt
10+
- HPS EMIF configuration
11+
- System integration with FPGA IPs
12+
- SYSID
13+
- Programmable I/O (PIO) IP for controlling DIPSW, PushButton, and LEDs)
14+
- FPGA On-Chip Memory
15+
- Ethernet IP
16+
- Fabric EMIF
17+
18+
Build scripts are organized according to the Intel SoC FPGA Family:
19+
Enhanced GSRD for Intel Quartus Prime Pro Edition
20+
21+
## Build Steps:
22+
Refer to the README in repective folder for build steps.
23+
24+
## Repository Structure
25+
26+
- Directory Structure used in this example design
27+
```bash
28+
|--- src
29+
| |--- hw
30+
| |--- sw
31+
```
32+
33+
## Project Details
34+
- **Family**: Agilex 5 E-Series
35+
- **Quartus Version**: 25.1.0 Pro Edition
36+
- **Development Kit**: Agilex 5 FPGA E-Series 065B Premium Development Kit DK-A5E065BB32AES1
37+
- **Device Part**: A5ED065BB32AE6SR0
38+
39+
## Getting Started
40+
Follow the steps below to build the design
41+
- [HW Build Readme](src/hw/README.md)
42+
- [SW Build Readme](src/sw/README.md)
43+
44+
Enhanced GSRD Wiki
45+
- [Wiki](https://github.com/altera-innersource/applications.fpga.soc.agilex5e-ed-gsrd-enhanced/wiki)

altera_license.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Copyright 2024-2025 Altera Corporation
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, except as set forth below,
4+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software;
7+
8+
If a file contained in this Software includes separate license text or a header file with license terms, those terms will supersede this agreement for purposes of that file only, all files without a separate agreement are subject to this agreement;
9+
10+
The Software must be used solely for design and implementation on an Altera product;
11+
12+
You must not use the Software or devices you configure using this Software to violate any internationally recognized human right; and
13+
14+
The Software may be subject to export controls under applicable government laws and regulations, including those of the U.S. You must:
15+
a) comply with applicable laws and regulations and obtain any necessary authorizations;
16+
b) not export, import, or transfer the materials to any prohibited or sanctioned country, person, or entity; or
17+
c) use the materials for the development, design, manufacture, or production of nuclear, missile, chemical, or biological weapons.
18+
19+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+
Governing Law and Jurisdiction. If you are in the Americas, U.S. and Delaware law governs all disputes arising out of or relating to this agreement without regard to conflict-of-laws principles. The state and federal
23+
courts in Wilmington, Delaware will have exclusive jurisdiction over any dispute arising out of or relating to this agreement. If you are in Europe or Africa, the laws of England and Wales govern all matters arising
24+
out of or relating to this agreement without regard to conflict-of-laws principles. The courts in England will have exclusive jurisdiction over any dispute arising out of or relating to this agreement. If you are in
25+
Asia or Australia, Singapore law governs all disputes arising out of or relating to this agreement without regard to conflict-of-laws principles. The courts in Singapore will have exclusive jurisdiction over any dispute
26+
arising out of or relating to this agreement. You and Intel consent to personal jurisdiction and venue in the courts designated for your location. If you are in China, Hong Kong law governs all disputes arising out of or
27+
relating to this agreement without regard to conflict-of-laws principles. Any dispute arising out of or relating to this agreement will be subject to arbitration by the Hong Kong International Arbitration Centre, this
28+
arbitration agreement will be governed by Hong Kong law, and the seat and location of proceedings will be Hong Kong. The current rules of the HKIAC will apply, except that the arbitration will be referred to a sole
29+
arbitrator and the proceedings will be conducted in English. The Arbitral Tribunal may only award monetary damages and may not award injunctive relief or any remedy that requires a party to license any intellectual
30+
property rights. Regardless of the above or your location, claims for misappropriation of trade secrets and breach of confidentiality obligations may also be brought in any court that has jurisdiction over the parties
31+
if the relief sought is limited to injunctive or other nonmonetary relief. The parties exclude the application of the United Nations Convention on Contracts for the International Sale of Goods (1980).
32+
33+

src/hw/Makefile

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
2+
THIS_MK_ABSPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
3+
THIS_MK_DIR := $(dir $(THIS_MK_ABSPATH))
4+
5+
# Enable pipefail for all commands
6+
SHELL=/bin/bash -o pipefail
7+
8+
# Enable second expansion
9+
.SECONDEXPANSION:
10+
11+
# Clear all built in suffixes
12+
.SUFFIXES:
13+
14+
NOOP :=
15+
SPACE := $(NOOP) $(NOOP)
16+
COMMA := ,
17+
HOSTNAME := $(shell hostname)
18+
19+
##############################################################################
20+
# Environment check
21+
##############################################################################
22+
23+
24+
##############################################################################
25+
# Configuration
26+
##############################################################################
27+
PROJECT_DIR_ABS := $(abspath $(THIS_MK_DIR))
28+
29+
# Name of all the revisions
30+
PROJECT_NAME :=
31+
REVISION_NAMES :=
32+
33+
include $(THIS_MK_DIR)/project_config.mk
34+
ifeq ($(PROJECT_NAME),)
35+
$(error PROJECT_NAME is not defined in project_config.mk)
36+
endif
37+
ifeq ($(REVISION_NAMES),)
38+
$(error REVISION_NAMES is not defined in project_config.mk)
39+
endif
40+
41+
# Set defaults
42+
INSTALL_ROOT ?= $(THIS_MK_DIR)
43+
ARCHIVE_NAME ?= $(PROJECT_NAME)
44+
##############################################################################
45+
# Set default goal before any targets. The default goal here is "test"
46+
##############################################################################
47+
DEFAULT_TARGET := test
48+
49+
.DEFAULT_GOAL := default
50+
.PHONY: default
51+
default: $(DEFAULT_TARGET)
52+
53+
54+
##############################################################################
55+
# Makefile starts here
56+
##############################################################################
57+
58+
# Initialize variables
59+
ALL_TARGET_STEM_NAMES =
60+
ALL_PREP_TARGETS =
61+
ALL_IP_UPGRADE_TARGETS =
62+
ALL_BUILD_TARGETS =
63+
ALL_SW_BUILD_TARGETS =
64+
ALL_TEST_TARGETS =
65+
ALL_INSTALL_SOF_TARGETS =
66+
67+
# Define function to create targets
68+
define create_targets_on_revisions
69+
ALL_TARGET_STEM_NAMES += $(strip $(1))
70+
ALL_PREP_TARGETS += $(addsuffix -prep,$(strip $(1)))
71+
ALL_IP_UPGRADE_TARGETS += $(addsuffix -ip-upgrade,$(strip $(1)))
72+
ALL_BUILD_TARGETS += $(addsuffix -build,$(strip $(1)))
73+
ALL_SW_BUILD_TARGETS += $(addsuffix -sw-build,$(strip $(1)))
74+
ALL_TEST_TARGETS += $(addsuffix -test,$(strip $(1)))
75+
ALL_INSTALL_SOF_TARGETS += $(addsuffix -install-sof,$(strip $(1)))
76+
77+
$(strip $(1))-prep : output_files/prep-$(strip $(1)).done
78+
79+
$(strip $(1))-ip-upgrade: pre-prep | output_files
80+
flock --verbose output_files/ipupgrade.lock quartus_sh --ip_upgrade $(PROJECT_NAME) -revision $(strip $(1))
81+
82+
$(strip $(1))-generate-design :
83+
84+
$(strip $(1))-package-design : $(INSTALL_ROOT)/$(ARCHIVE_NAME).zip
85+
86+
$(strip $(1))-build : output_files/$(strip $(1)).sof
87+
88+
$(strip $(1))-sw-build :
89+
90+
$(strip $(1))-test : $(strip $(1))-build
91+
$(strip $(1))-install-sof : output_files/$(strip $(1)).sof | $(INSTALL_ROOT)
92+
cp $$< $(INSTALL_ROOT)/$(ARCHIVE_NAME)-$(strip $(1)).sof
93+
endef
94+
95+
# Create all targets
96+
$(foreach revision,$(REVISION_NAMES),$(eval $(call create_targets_on_revisions,$(revision))))
97+
98+
###############################################################################
99+
# UTILITY TARGETS
100+
###############################################################################
101+
102+
output_files $(INSTALL_ROOT):
103+
mkdir -p $@
104+
105+
output_files/pre-prep.done: | output_files
106+
# Write protect QPF so it doesn't get modified when switching revisions
107+
chmod a-w $(PROJECT_NAME).qpf
108+
touch $@
109+
110+
output_files/prep-%.done: output_files/pre-prep.done | output_files
111+
chmod a-w $(PROJECT_NAME).qpf
112+
flock --verbose output_files/ipgenerate.lock quartus_ipgenerate top -c $* --synthesis=verilog
113+
#flock --verbose output_files/ipgenerate.lock quartus_ipgenerate top -c $* --simulation=verilog --synthesis=verilog
114+
#ip-setup-simulation --quartus-project=top --revision=$* --output-directory=sim_setup_$*
115+
touch $@
116+
117+
.PHONY: pre-prep
118+
pre-prep: output_files/pre-prep.done
119+
120+
$(INSTALL_ROOT)/$(ARCHIVE_NAME).zip: pre-prep | $(INSTALL_ROOT)
121+
# Validate metadata in the README.md
122+
quartus_sh --validate_metadata -file README.md -strict
123+
rm validate_metadata_log.txt
124+
zip -r $@ * -x .gitignore "output_files/*" "qdb/*" "dni/*" "tmp-clearbox/*"
125+
126+
.PHONY: package-design
127+
package-design: $(INSTALL_ROOT)/$(ARCHIVE_NAME).zip
128+
129+
.PHONY: generate-design
130+
generate-design: pre-prep
131+
132+
.PHONY: ip-upgrade
133+
ip-upgrade: $(ALL_IP_UPGRADE_TARGETS)
134+
135+
.PHONY: prep
136+
prep: $(ALL_PREP_TARGETS)
137+
138+
output_files/%.sof: output_files/prep-%.done
139+
quartus_syn top -c $*
140+
quartus_fit top -c $*
141+
quartus_sta top -c $* --mode=finalize
142+
quartus_asm top -c $*
143+
quartus_pow top -c $*
144+
mv $*.qptc output_files/$*.qptc
145+
146+
# Clean all files
147+
.PHONY: clean
148+
clean :
149+
rm -rf output_files qdb tmp-clearbox dni
150+
151+
# Deep clean using git
152+
.PHONY: dev-clean
153+
dev-clean :
154+
git clean -dfx .
155+
156+
# Build all revisions
157+
.PHONY: build
158+
build : $(ALL_BUILD_TARGETS)
159+
160+
# Run all tests
161+
.PHONY: test
162+
test : $(ALL_TEST_TARGETS)
163+
164+
.PHONY: print-targets
165+
print-targets:
166+
$(info $(ALL_TARGET_STEM_NAMES))
167+
168+
###############################################################################
169+
# SW Build Targets
170+
###############################################################################
171+
-include $(THIS_MK_DIR)/swbuild_config.mk
172+
173+
# Build all SW projects
174+
.PHONY: sw-build
175+
sw-build : $(ALL_SW_BUILD_TARGETS)
176+
177+
###############################################################################
178+
# HELP
179+
###############################################################################
180+
.PHONY: help
181+
help:
182+
$(info GHRD Build)
183+
$(info Project Directory : $(PROJECT_DIR_ABS))
184+
$(info Prep Targets : $(ALL_PREP_TARGETS))
185+
$(info Build Targets : $(ALL_BUILD_TARGETS))
186+
$(info Test Targets : $(ALL_TEST_TARGETS))
187+
$(info Software Build Targets : $(ALL_SW_BUILD_TARGETS))

0 commit comments

Comments
 (0)