Skip to content

Commit f13aa2f

Browse files
updating rel/25.1.0 sources
1 parent 10f86f2 commit f13aa2f

File tree

552 files changed

+167089
-8854
lines changed

Some content is hidden

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

552 files changed

+167089
-8854
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ There are three variants of the NiosV core:
2525

2626
The following table contains the list of the designs on Agilex 5 FPGA E-Series 065B Premium Development Kit
2727

28-
| # | Nios V core | Design name | Description |
28+
| No # | Design Name Prefix (Nios V core) | Design Name Suffix (Functions) | Description |
2929
| - | --- | ------ | ----------- |
30-
| 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) |
31-
| 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) |
32-
| 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) |
33-
| 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) |
34-
| 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) |
35-
| 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) |
36-
| 7 | Nios V/m | Nios V/m Baseline Golden Hardware Reference Design (GHRD) | This design demonstrates the baseline Golden Hardware Reference Design (GHRD) for a Nios V/m processor with basic bare minimum peripherals required for any application execution <br>[Design details](niosv_m/niosv_m_baseline_ghrd/docs/Agilex_5_FPGA_NiosV_m_Processor_baseline_ghrd_on_Agilex_5_FPGA.pdf)
30+
| 1 | Nios V/m | Nios V/m Baseline Golden Hardware Reference Design (GHRD) | This design demonstrates the baseline Golden Hardware Reference Design (GHRD) for a Nios V/m processor with basic bare minimum peripherals required for any application execution <br>[Design details](niosv_m/niosv_m_baseline_ghrd/docs/NiosV_m_Processor_baseline_ghrd_on_Agilex_5_FPGA.md)
31+
| 2 | Nios V/g | Nios V/g TinyML LiteRT | This design demonstrates the TinyML application using LiteRT for microcontrollers software with Nios® V/g processor<br>[Design details](niosv_g/tinyml_liteRT/docs/Nios_Vg_Processor_TinyML_Design_on_Agilex_5_FPGA.md) |
32+
| 3 | Nios V/c | Nios V/c Helloworld OCM Memory test Design | This design prints a simple Hello World message and performs a simple OCM memory test<br>[Design details](niosv_c/niosv_c_helloworld_ocm_mem_test/docs/Nios_Vc_Processor_Helloworld_OCM_Memory_Test_Design_on_Agilex_5_FPGA.md) |
3733

3834

3935
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)
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
## Introduction
2+
3+
### Nios V/c Helloworld OCM Memory test Design Overview
4+
5+
This design prints a simple Hello World message and performs a simple OCM memory test for the Agilex™ 5 FPGA E-Series 065B Premium Development Kit.
6+
7+
### Prerequisites
8+
9+
- Agilex™ 5 FPGA E-Series 065B Premium Development Kit, ordering code DK- A5E065BB32AES1. Refer to the board documentation for more information about the development kit.
10+
- Mini and Micro USB Cable. Included with the development kit.
11+
- Host PC with 64 GB of RAM. Less will be fine for only exercising the binaries, and not rebuilding the design.
12+
13+
### Release Contents
14+
15+
#### Binaries
16+
- Prebuilt binaries are located [here](https://github.com/altera-fpga/agilex5e-nios-ed/blob/rel/25.1.0/niosv_c/niosv_c_helloworld_ocm_mem_test/ready_to_test).
17+
- The sof and elf files required to run the design can be found in "ready_to_test" folder
18+
- Program the sof and download the elf file on board
19+
20+
### Nios® V/c Helloworld OCM Memory test Design Archiecture
21+
This example design includes a Nios® V/c processor connected to the On Chip RAM-II, JTAG UART IP, Parallel-IO and System ID peripheral core. The objective of the design is to accomplish data transfer between the processor and soft IP peripherals.
22+
23+
![Block Diagram](https://github.com/altera-fpga/agilex5e-nios-ed/blob/rel/25.1.0/niosv_c/niosv_c_helloworld_ocm_mem_test/img/hello_world_ocm.png)
24+
25+
#### Nios® V/c Processor
26+
- Microcontroller- Balanced (For interrupt driven baremetal and RTOS code)
27+
- Nios® V/c processor is highly customizable and can be tailored to meet specific application requirements, providing flexibility and scalability in embedded system designs.
28+
29+
#### IP Cores
30+
The following IPs are used in this Platform Designer component of the design:
31+
- Nios® V/c soft processor core
32+
33+
- On Chip RAM-II
34+
35+
- JTAG UART
36+
37+
- Parallel-IO
38+
39+
- System ID
40+
41+
- Clock Bridge, Reset Controller
42+
43+
44+
### Hardware Setup
45+
46+
Refer to [Agilex™ 5 FPGA Premium Development Kit User Guide](https://www.intel.com/content/www/us/en/docs/programmable/814550.html) to setup the hardware connection.
47+
48+
49+
### Address Map Details
50+
51+
#### Nios V Address Map
52+
|Address Offset |Size (Bytes) |Peripheral | Description|
53+
|-|-|-|-|
54+
|0x0000_0000|1MB|On-Chip RAM|To store application|
55+
|0x0010_0008|8|JTAG UART|Communication between a host PC and the Nios V processor system|
56+
|0x0010_0000|8|System ID|Hardware configuration system ID (0x000000a5)|
57+
||||
58+
59+
60+
## User Flow
61+
62+
There are two ways to test the design based on use case.
63+
64+
<h5> User Flow 1: Testing with Prebuild Binaries.</h5>
65+
66+
<h5> User Flow 2: Testing Complete Flow.</h5>
67+
68+
|User Flow|Description|Required for [User flow 1](#user-flow-1-testing-with-prebuild-binaries)|Required for [User flow 2](#user-flow-2-testing-complete-flow)|
69+
|-|-|-|-|
70+
|Environment Setup|[Tools Download and Installation](#tools-download)|Yes|Yes|
71+
|Compilation|Hardware compilation|No|Yes|
72+
||Software compilation|No|Yes|
73+
|Programing|Program Hardware Binary SOF|Yes|Yes|
74+
||Program Software Image ELF|Yes|Yes|
75+
|Testing|Open JTAG UART Terminal|Yes|Yes|
76+
||Run simulation|Yes|Yes|
77+
||||
78+
79+
### Environment Setup
80+
81+
#### Tools Download and Installation
82+
1. Quartus Prime Pro
83+
84+
- Download the Quartus® Prime Pro Edition software version 25.1 from the FPGA Software Download Center webpage of the Intel website. Follow the on-screen instructions to complete the installation process. Choose an installation directory that is relative to the Quartus® Prime Pro Edition software installation directory.
85+
- Set up the Quartus tools in the PATH, so they are accessible without full path.
86+
```console
87+
export QUARTUS_ROOTDIR=~/intelFPGA_pro/25.1/quartus/
88+
export PATH=$QUARTUS_ROOTDIR/bin:$QUARTUS_ROOTDIR/linux64:$QUARTUS_ROOTDIR/../qsys/bin:$PATH
89+
```
90+
91+
### Compilation
92+
93+
#### Hardware Compilation
94+
- Invoke the `quartus_py` shell in the terminal
95+
- Run the following command in the terminal from top level project directory:
96+
97+
```console
98+
quartus_py ./scripts/build_sof.py
99+
```
100+
101+
- The quartus tool will compile the design and generate the output files
102+
103+
#### Software Compilation
104+
Note: Clean the app build project before regenerating elf
105+
- To create software app, run the following commands in the terminal:
106+
```console
107+
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
108+
niosv-app --bsp-dir=sw/bsp --app-dir=sw/app --srcs=sw/app/main.c
109+
niosv-shell
110+
cmake -S ./sw/app -B sw/app/build -G "Unix Makefiles"
111+
make -C sw/app/build
112+
elf2hex sw/app/build/app.elf -b 0x0 -w 32 -e 0xfffff hw/onchip_mem.hex -r4
113+
```
114+
115+
### Programing
116+
Note: Reduce the JTAG clock frequency to 6MHz using the following command, before programming the sof file
117+
```console
118+
jtagconfig --setparam 1 JtagClock 6M
119+
```
120+
121+
#### Program Hardware Binary SOF
122+
- Program the generated sof and then download the elf file on the board
123+
124+
```console
125+
quartus_pgm --cable=1 -m jtag -o 'p;ready_to_test/top.sof'
126+
```
127+
128+
### Testing
129+
130+
#### Open JTAG UART Terminal
131+
- Verify the output on the terminal by using the following command in the terminal:
132+
133+
```console
134+
juart-terminal -d 1 -c 1 -i 0
135+
```
136+
137+
#### Running simulation
138+
Simulation is enabled for this design where the memory is initialized with the application hex. Use the following commands to run the simulation:
139+
```console
140+
cp ./sw/app/build/onchip_mem.hex ./qsys_top_tb/qsys_top_tb/sim/mentor
141+
cd hw/qsys_top_tb/qsys_top_tb/sim/mentor/
142+
vsim &
143+
source msim_setup.tcl
144+
ld_debug
145+
run -all
146+
```
-16 Bytes
Binary file not shown.
17.8 KB
Binary file not shown.

niosv_c/niosv_c_helloworld_ocm_mem_test/sources/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# Agilex 5 FPGA - Nios V/c Helloworld OCM Memory test Design
2+
3+
Nios® V/c Processor-based Helloworld and OCM memory test example design
4+
5+
## Description
6+
7+
This design prints a simple Hello World message and performs a simple OCM memory test for the Agilex™ 5 FPGA E-Series 065B Premium Development Kit.
8+
9+
![image](https://github.com/altera-fpga/agilex5e-nios-ed/blob/rel/25.1.0/niosv_c/niosv_c_helloworld_ocm_mem_test/img/hello_world_ocm.png)
10+
11+
## Project Details
12+
13+
- **Title**: Agilex 5 FPGA- Nios V/c Helloworld OCM Memory test Design
14+
- **Source**: Github
15+
- **Design Support**: SCTH
16+
- **Family**: Agilex 5
17+
- **Quartus Version**: 25.1.0
18+
- **Development Kit**: Agilex 5 FPGA E*Series 065B Premium Development Kit DK*A5E065BB32AES1
19+
- **Device Part**: A5ED065BB32AE6SR0
20+
- **Design Package**: agilex5_niosv_c_helloworld_ocm_mem_test.zip
21+
- **Category**: Helloworld
22+
- **URL**: https://github.com/altera-fpga/agilex5e-nios-ed/tree/rel/25.1.0/niosv_c/niosv_c_helloworld_ocm_mem_test
23+
- **downloadURL**:https://github.com/altera-fpga/agilex5e-nios-ed/releases/download/25.1-v1.0/agilex5_niosv_c_helloworld_ocm_mem_test.zi-
24+
25+
## Documentation
26+
27+
- **Title**: Design Document
28+
- **URL**: https://github.com/altera-fpga/agilex5e-nios-ed/blob/rel/25.1.0/niosv_c/niosv_c_helloworld_ocm_mem_test/docs/Nios_Vc_Processor_Helloworld_OCM_Memory_Test_Design_on_Agilex_5_FPGA.md
29+
30+
# Getting Started
31+
32+
Vendor: Altera
33+
34+
135
1. Directory structure
236
2. Using existing files (sof and elf) to run on hardware
337
3. Building the design from scratch

niosv_c/niosv_c_helloworld_ocm_mem_test/sources/hw/ip/presets/niosv_c_agilex5.qprs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
kind="intel_niosv_c"
77
version="All"
88
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"
9+
board="Agilex 5 FPGA E-Series 065B Premium Development Kit DK-A5E065BB32AES1"
1010
preset_category="NiosV">
1111
<parameter name="resetOffset" value="0" />
1212
<parameter name="enableECCLite" value="false" />

niosv_c/niosv_c_helloworld_ocm_mem_test/sources/hw/top.sdc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# (C) 2001-2025 Altera Corporation. All rights reserved.
2+
# Your use of Altera Corporation's design tools, logic functions and other
3+
# software and tools, and its AMPP partner logic functions, and any output
4+
# files from any of the foregoing (including device programming or simulation
5+
# files), and any associated documentation or information are expressly subject
6+
# to the terms and conditions of the Altera Program License Subscription
7+
# Agreement, Altera IP License Agreement, or other applicable
8+
# license agreement, including, without limitation, that your use is for the
9+
# sole purpose of programming logic devices manufactured by Altera and sold by
10+
# Altera or its authorized distributors. Please refer to the applicable
11+
# agreement for further details.
12+
13+
114
# (C) 2001-2024 Intel Corporation. All rights reserved.
215
# Your use of Intel Corporation's design tools, logic functions and other
316
# software and tools, and its AMPP partner logic functions, and any output

niosv_c/niosv_c_helloworld_ocm_mem_test/sources/scripts/build_sof.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# (C) 2001-2025 Altera Corporation. All rights reserved.
2+
# Your use of Altera Corporation's design tools, logic functions and other
3+
# software and tools, and its AMPP partner logic functions, and any output
4+
# files from any of the foregoing (including device programming or simulation
5+
# files), and any associated documentation or information are expressly subject
6+
# to the terms and conditions of the Altera Program License Subscription
7+
# Agreement, Altera IP License Agreement, or other applicable
8+
# license agreement, including, without limitation, that your use is for the
9+
# sole purpose of programming logic devices manufactured by Altera and sold by
10+
# Altera or its authorized distributors. Please refer to the applicable
11+
# agreement for further details.
12+
13+
114
####################################################################################
215
# Python code to generate the .sof file from qsys and qpf tcl files
316

@@ -74,6 +87,14 @@
7487
logfile.write(line)
7588
generate_ip.wait()
7689

90+
91+
# Generate hex file
92+
app_creation = subprocess.Popen(["niosv-shell < scripts/niosv_app_creation.sh"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT,shell= True)
93+
for line in app_creation.stdout:
94+
logfile.write(line)
95+
app_creation.wait()
96+
97+
7798
# Synthesis
7899
quartus_sync = subprocess.Popen(["quartus_syn","{}".format(qpf_dir)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT,cwd=cwd_1)
79100
for line in quartus_sync.stdout:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# (C) 2001-2025 Altera Corporation. All rights reserved.
2+
# Your use of Altera Corporation's design tools, logic functions and other
3+
# software and tools, and its AMPP partner logic functions, and any output
4+
# files from any of the foregoing (including device programming or simulation
5+
# files), and any associated documentation or information are expressly subject
6+
# to the terms and conditions of the Altera Program License Subscription
7+
# Agreement, Altera IP License Agreement, or other applicable
8+
# license agreement, including, without limitation, that your use is for the
9+
# sole purpose of programming logic devices manufactured by Altera and sold by
10+
# Altera or its authorized distributors. Please refer to the applicable
11+
# agreement for further details.
12+
13+
14+
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
15+
niosv-app --bsp-dir=sw/bsp --app-dir=sw/app --srcs=sw/app/main.c
16+
cmake -S ./sw/app -B sw/app/build
17+
make -C sw/app/build
18+
elf2hex sw/app/build/app.elf -b 0x0 -w 32 -e 0xfffff hw/onchip_mem.hex -r4
19+
# cp -rf hw/onchip_mem.hex hw/qsys_top_tb/qsys_top_tb/sim/mentor/

0 commit comments

Comments
 (0)