Skip to content

Commit 55cfb0e

Browse files
Merge pull request #1 from altera-fpga/24.3-rel
updating agilex5 source files for 24.3 release
2 parents f027553 + 5f5a7a8 commit 55cfb0e

File tree

97 files changed

+274749
-2
lines changed

Some content is hidden

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

97 files changed

+274749
-2
lines changed

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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, 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:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software;
6+
7+
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;
8+
9+
The Software must be used solely for design and implementation on an Altera product;
10+
11+
You must not use the Software or devices you configure using this Software to violate any internationally recognized human right; and
12+
13+
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. 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.
14+
15+
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 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 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 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 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 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 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 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 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 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).

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
# agilex5e-nios-ed
2-
Nios V Processor example designs targeting Altera Agilex 5 Development Kits
1+
# Nios V Example Designs Repository
2+
3+
This repository contains the Nios V Example designs based on Agilex™ 5 FPGA E-Series 065B Premium Development Kit
4+
5+
Development Kit product page- https://www.intel.com/content/www/us/en/products/details/fpga/development-kits/agilex/a5e065b-premium.html
6+
7+
The following table contains the list of Acronyms that the user may come across in the design details
8+
9+
| Acronym | Expansion |
10+
| --- | ------ |
11+
| DMA | Direct Memory Access |
12+
| OCM | On-Chip Memory |
13+
| PIO | Parallel I/O |
14+
| RTOS | Real Time Operating System |
15+
16+
There are three variants of the NiosV core:
17+
18+
a. Nios V/m core - Microcontroller- Balanced (For interrupt driven baremetal and RTOS code)
19+
20+
b. Nios V/g core - General-Purpose Processor- High Performance (For interrupt driven baremetal and RTOS code)
21+
22+
c. Nios V/c core - Compact Microcontroller- Smallest (For non-interrupt driven baremetal code)
23+
24+
25+
The following table contains the list of the designs on Agilex 5 FPGA E-Series 065B Premium Development Kit
26+
27+
| # | Nios V core | Design name | Description |
28+
| - | --- | ------ | ----------- |
29+
| 1 | Nios V/m | Nios V/m DMA OCM Design | This design demonstrates the transaction between the Nios® V processor with DMA and OCM core<br>[Design details](niosv_m/niosv_m_dma_ocm/docs/Agilex™_5_FPGA_Nios®V_m_Processor_DMA_OCM_design.pdf) |
30+
| 2 | Nios V/m | Nios V/m Helloworld OCM Memory test Design | Nios® V/m Processor-based Helloworld example design<br>[Design details](niosv_m/niosv_m_helloworld_ocm_mem_test/docs/Agilex™_5_FPGA_Helloworld_and_OCM_test_design_on_Nios®V_m_Processor.pdf) |
31+
| 3 | Nios V/m | Nios V/m PIO Design |This design demonstrates the transaction between the Nios® V processor and the Parallel Input/Output (PIO) core<br>[Design details](niosv_m/niosv_m_pio/docs/Agilex™_5_FPGA_Nios®V_m_Processor_PIO_LED_Toggle_Design.pdf) |
32+
| 4 | Nios V/g | Nios V/g Helloworld Design | Nios® V/g Processor-based Helloworld example design<br>[Design details](niosv_g/niosv_g_helloworld/docs/Agilex™_5_FPGA_Nios®V_g_Processor_Helloworld_Design.pdf) |
33+
| 5 | Nios V/g | Nios V/g OCM Memory Tese Design | Nios® V/g Processor-based OCM memory test example design<br>[Design details](niosv_g/niosv_g_ocm_mem_test/docs/Agilex™_5_FPGA_Nios®V_g_Processor_OCM_test_Design.pdf) |
34+
| 6 | Nios V/c | Nios V/c Helloworld OCM Memory test Design | Nios® V/c Processor-based Helloworld and OCM memory test example design<br>[Design details](niosv_c/niosv_c_helloworld_ocm_mem_test/docs/Agilex™_5_FPGA_Helloworld_and_OCM_test_design_on_Nios®V_c_Processor.pdf) |
35+
36+
37+
Refer to the documents in the following link for More information on the Nios V Processor core - [https://www.intel.com/content/www/us/en/support/programmable/support-resources/support-centers/nios-v-support.html ](https://www.intel.com/content/www/us/en/support/programmable/support-resources/support-centers/nios-v-support.html#introtext_1506028531_1693475107)

niosv_c/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This directory contains the following example designs based on the Nios V/c core:
2+
3+
a. Nios V/c helloworld OCM design
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This directory contains the following folders:
2+
3+
1. Docs- Document capturing the details of the example design
4+
5+
2. img- block diagram of the example design
6+
7+
3. ready_to_test- binary files which can be programmed on the board and tested. Refer to the README.md in the sources folder for the steps
8+
9+
4. sources- Files needed to create the design
10+
48.9 KB
Loading
301 KB
Binary file not shown.
1.9 MB
Binary file not shown.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
1. Directory structure
2+
2. Using existing files (sof and elf) to run on hardware
3+
3. Building the design from scratch
4+
5+
a. Required directory structure
6+
7+
b. Use of build_sof.py to compile the design
8+
9+
c. Steps to create the bsp and build software sources
10+
11+
d. Hardware Validation
12+
13+
4. Running simulation
14+
15+
### 1. Directory Structure:
16+
17+
The directory structure is explained below:
18+
19+
- hw - necessary hardware files (.qpf, .qsf, .sv, .v, .ip) of the design
20+
21+
- sw - This folder contains software application files
22+
23+
- scripts - This folder consists of scripts to build the design
24+
25+
26+
### 2. Using existing files to run the design on hardware
27+
28+
- The sof and elf files required to run the design can be found in "ready_to_test" folder
29+
30+
- Refer the Hardware validation section (3.d) for the steps
31+
32+
### 3. Building the design from scratch
33+
34+
The steps to build the project from scratch are mentioned below:
35+
36+
a. Required directory structure
37+
- The top-level project folder should have directory structure as mentioned in Section 1 (Directory Structure).
38+
39+
b. Using build_sof.py to compile the design
40+
- Invoke the quartus_py shell in the terminal
41+
42+
- Run the following command in the terminal from top level project directory:
43+
```
44+
quartus_py ./scripts/build_sof.py
45+
```
46+
- The quartus tool will compile the design and generate the output files
47+
48+
c. Creating the bsp, build software sources and download elf
49+
- To create software app, run the following commands in the terminal:
50+
51+
- Clean the app build project before regenerating elf
52+
```
53+
niosv-bsp -c --quartus-project=hw/top.qpf --qsys=hw/qsys_top.qsys --type=hal --script=sw/bsp-update-small-driver.tcl sw/bsp/settings.bsp
54+
niosv-app --bsp-dir=sw/bsp --app-dir=sw/app --srcs=sw/app/main.c
55+
niosv-shell
56+
cmake -S ./sw/app -B sw/app/build -G "Unix Makefiles"
57+
make -C sw/app/build
58+
elf2hex sw/app/build/app.elf -b 0x0 -w 32 -e 0x9ffff sw/app/build/onchip_mem.hex -r4
59+
```
60+
61+
d. Hardware Validation
62+
- Program the generated sof file on the board
63+
```
64+
quartus_pgm --cable=1 -m jtag -o 'p;ready_to_test/top.sof'
65+
```
66+
- Reduce the JTAG clock frequency to 6MHz before programming the application .elf file on the board.
67+
```
68+
jtagconfig --setparam 1 JtagClock 6M
69+
```
70+
- Verify the output on the terminal by using the following command in the terminal:
71+
```
72+
juart-terminal -d 1 -c 1 -i 0
73+
```
74+
75+
### 4. Running simulation
76+
77+
Simulation is enabled for this design where the memory is initialized with the application hex. Use the following commands to run the simulation:
78+
79+
- Generate Testbench from Platform Designer. Generate -> Generate Testbench System
80+
```
81+
cp ./sw/app/build/onchip_mem.hex ./qsys_top_tb/qsys_top_tb/sim/mentor
82+
cd hw/qsys_top_tb/qsys_top_tb/sim/mentor/
83+
vsim &
84+
source msim_setup.tcl
85+
ld_debug
86+
run -all
87+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ip>
3+
<presets version="12.1">
4+
<preset
5+
name="niosv_c_agilex5"
6+
kind="intel_niosv_c"
7+
version="All"
8+
description="preset for niosv compact core"
9+
board="Intel Agilex 5 FPGA E-Series DK A5E065BB32AES1 Premium Development Kit,Intel Agilex 5 FPGA E-Series DK A5E065BB32AES1 Premium Development Kit"
10+
preset_category="NiosV">
11+
<parameter name="resetOffset" value="0" />
12+
<parameter name="enableECCLite" value="false" />
13+
<parameter name="numGpr" value="32" />
14+
<parameter name="useResetReq" value="false" />
15+
<parameter name="resetSlave" value="intel_onchip_memory_0.axi_s1" />
16+
</preset>
17+
</presets>
18+
</ip>

0 commit comments

Comments
 (0)