Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into eth_simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
P-Miranda committed Jun 3, 2024
2 parents 82ff8ee + d25da1c commit d7147be
Show file tree
Hide file tree
Showing 118 changed files with 3,179 additions and 1,520 deletions.
89 changes: 47 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,13 @@ on:
workflow_dispatch:

jobs:
lib:
runs-on: self-hosted
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: run LIB test
run: nix-shell --run "cd submodules/LIB; ./scripts/test.sh test"

uart:
runs-on: self-hosted
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: run uart test
run: make -C submodules/UART test

cache:
runs-on: self-hosted
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: run simulation test
run: make -C submodules/CACHE sim-test
- name: run fpga test
run: make -C submodules/CACHE fpga-test


pc-emul:
runs-on: self-hosted
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: run test
Expand All @@ -75,7 +40,7 @@ jobs:
needs: [ pc-emul ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: run test
Expand All @@ -85,10 +50,10 @@ jobs:
runs-on: self-hosted
timeout-minutes: 60
if: ${{ !cancelled() }}
needs: [ pc-emul ]
needs: [ simulation ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: init mem and no ext mem
Expand All @@ -100,25 +65,65 @@ jobs:
runs-on: self-hosted
timeout-minutes: 90
if: ${{ !cancelled() }}
needs: [ pc-emul ]
needs: [ simulation ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: init mem and no ext mem
run: make fpga-run BOARD=AES-KU040-DB-G INIT_MEM=1 USE_EXTMEM=0
- name: no init mem and ext mem
run: make fpga-run BOARD=AES-KU040-DB-G INIT_MEM=0 USE_EXTMEM=1

lib:
runs-on: self-hosted
timeout-minutes: 5
if: ${{ !cancelled() }}
needs: [ cyclonev ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: run LIB test
run: nix-shell --run "cd submodules/LIB; ./scripts/test.sh test"

uart:
runs-on: self-hosted
timeout-minutes: 5
if: ${{ !cancelled() }}
needs: [ lib ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: run uart test
run: make -C submodules/UART test

cache:
runs-on: self-hosted
timeout-minutes: 20
if: ${{ !cancelled() }}
needs: [ cyclonev ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: run simulation test
run: make -C submodules/CACHE sim-test
- name: run fpga test
run: make -C submodules/CACHE fpga-test
doc:
runs-on: self-hosted
timeout-minutes: 60
if: ${{ !cancelled() }}
needs: [ cyclonev ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: doc test
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CORE := iob_soc

SIMULATOR ?= icarus
SYNTHESIZER ?= yosys
BOARD ?= CYCLONEV-GT-DK

DISABLE_LINT:=1
Expand All @@ -10,6 +11,7 @@ include submodules/LIB/setup.mk
INIT_MEM ?= 1
USE_EXTMEM ?= 0


ifeq ($(INIT_MEM),1)
SETUP_ARGS += INIT_MEM
endif
Expand All @@ -34,7 +36,7 @@ sim-run:
sim-test:
nix-shell --run 'make clean setup INIT_MEM=1 USE_EXTMEM=0 && make -C ../$(CORE)_V*/ sim-run SIMULATOR=icarus'
nix-shell --run 'make clean setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-run SIMULATOR=verilator'
nix-shell --run 'make clean setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-run SIMULATOR=verilator'
nix-shell --run 'make clean setup INIT_MEM=1 USE_EXTMEM=0 && make -C ../$(CORE)_V*/ sim-run SIMULATOR=verilator'

fpga-run:
nix-shell --run 'make clean setup INIT_MEM=$(INIT_MEM) USE_EXTMEM=$(USE_EXTMEM) && make -C ../$(CORE)_V*/ fpga-fw-build BOARD=$(BOARD)'
Expand All @@ -47,7 +49,7 @@ fpga-test:
make clean setup fpga-run BOARD=AES-KU040-DB-G INIT_MEM=0 USE_EXTMEM=1

syn-build: clean
nix-shell --run "make setup && make -C ../$(CORE)_V*/ syn-build"
nix-shell --run 'make setup && make -C ../$(CORE)_V*/ syn-build SYNTHESIZER=$(SYNTHESIZER)'

doc-build:
nix-shell --run 'make clean setup && make -C ../$(CORE)_V*/ doc-build'
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,25 @@ export RMAC_ADDR=000000000000
export IOB_CONSOLE_PYTHON_ENV=/opt/pyeth3/bin/python
```

You could also set those variables in the `config_build.mk` file of the build directory.
You could also set those variables in the build directory's `config_build.mk` file.

# Acknowledgements

First of all, we acknowledge all the volunteer contributors for all their valuable pull requests, issues, and discussions.

The work has been partially performed in the scope of the A-IQ Ready project, which receives funding within Chips Joint Undertaking (Chips JU) - the Public-Private Partnership for research, development, and innovation under Horizon Europe – and National Authorities under grant agreement No. 101096658.

The A-IQ Ready project is supported by the Chips Joint Undertaking (Chips JU) - the Public-Private Partnership for research, development, and innovation under Horizon Europe – and National Authorities under Grant Agreement No. 101096658.

![image](https://github.com/IObundle/iob-soc/assets/5718971/78f2a3ee-d10b-4989-b221-71154fe6e409) ![image](https://github.com/IObundle/iob-soc/assets/5718971/d57e0430-bb60-42e3-82a3-c5b6b0417322)


This project provides the basic infrastructure to other projects funded through the NGI Assure Fund, a fund established by NLnet
with financial support from the European Commission's Next Generation Internet program under the aegis of DG Communications Networks, Content, and Technology.

<table>
<tr>
<td align="center" width="50%"><img src="https://nlnet.nl/logo/banner.svg" alt="NLnet foundation logo" style="width:50%"></td>
<td align="center"><img src="https://nlnet.nl/image/logos/NGIAssure_tag.svg" alt="NGI Assure logo" style="width:50%"></td>
</tr>
</table>
71 changes: 33 additions & 38 deletions document/tsrc/presentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,26 @@

\begin{frame}{Outline}
\begin{center}
\begin{itemize}
\item Introduction
\item Project setup
\item Instantiate an IP core in your SoC
\item Write the software to drive the new peripheral
\item Simulate IOb-SoC
\item Run IOb-SoC on an FPGA board
\item Conclusion
\end{itemize}
\begin{columns}[onlytextwidth]
\column{0.5\textwidth}
\begin{itemize}
\item Introduction
\item Project setup
\item Instantiate a RISC-V CPU in IOb-SoC
\item Instantiate an IP core in your SoC
\item Write the software to drive the IP core
\item Simulate IOb-SoC
\item Run IOb-SoC on an FPGA board
\item Conclusion
\end{itemize}
\column{0.5\textwidth}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{bd.pdf}
\caption{IOb-SoC block diagram}
\label{fig:my_label}
\end{figure}
\end{columns}
\end{center}
\end{frame}

Expand All @@ -91,10 +102,10 @@
\begin{frame}{Project setup}
\begin{center}
\begin{itemize}
\item Use a Linux real or virtual machine (see the README file to download a VM)
\item Make sure a {\bf stable} version of the open source Icarus Verilog simulator (\url{iverilog.icarus.com}) is installed locally or on some remote server
\item Make sure you have FPGA build tools installed locally or on some remote server
\item Make sure you have an FPGA board attached to your Linux machine or to some remote server
\item Use a Linux real or virtual machine (see the README file to download a VM)
\item Install {\tt nix-shell} to deal with dependencies, especially open-source simulators such as {\tt iverilog} or {\tt verilator}
\item Commercial EDA tools must be installed locally or on some remote server (Vivado, Quartus, Cadence, etc)
\item FPGA boards must be attached to your Linux machine or to some remote server
\item Set up {\bf ssh} access key to GitHub (\url{github.com}) (using https will ask for your password many times)
\item Follow the instructions in the IOb-SoC repository's README file to clone the repository and install the tools
\end{itemize}
Expand All @@ -104,31 +115,15 @@

\begin{frame}{Instantiate an IP core in your SoC}
\begin{itemize}
\item The Timer IP core at \url{github.com/IObundle/iob-timer.git} is used here as an example
\item Add the Timer IP core repository as a git submodule of your IOb-SoC clone repository:\\
{\tt \tiny git submodule add [email protected]:IObundle/iob-timer.git submodules/TIMER}
\item Update the Timer IP core submodules:\\
{\tt \tiny git submodule update ----init ----recursive}
\item Add the Timer IP core to the list of peripherals in the {\tt ./config.mk} file:\\
{\tt PERIPHERALS:=UART {\em TIMER}}
\item Add {\tt TIMER\_DIR} to the {\tt submodule peripherals} list in the {\tt ./config.mk} file:\\
{\tt \tiny TIMER\_DIR=\$(ROOT\_DIR)/submodules/TIMER}
\end{itemize}
\end{frame}

\begin{frame}{Instantiate an IP core in your SoC}
\begin{itemize}
\item Include the Timer IP core {\tt hardware.mk} file in {\tt ./hardware.mk} file:\\
{\tt \tiny include \$(TIMER\_DIR)/hardware/hardware.mk}
\item Include the Timer IP core {\tt embedded.mk} file in {\tt ./firmware/Makefile} file:\\
{\tt \tiny include \$(TIMER\_DIR)/software/embedded/embedded.mk}
\item An IP core can be integrated into IOb-SoC if it provides the following files:
\begin{itemize}
\item CORE\_REPO/hardware/hardware.mk
\item CORE\_REPO/software/embedded/embedded.mk
\item CORE\_REPO/software/pc-emul/pc-emul.mk
\end{itemize}
\item Study these files and its references in the Timer IP core repository.
\item The Timer IP core in {\tt submodules/LIB/hardware/modules/iob-timer} is used here as an example
\item Add a symbolic link to the Timer IP core directory:\\
{\tt \tiny ln -s n {\tt submodules/LIB/hardware/modules/iob-timer submodules/TIMER}}
\item Add the Timer IP core to the list of peripherals in the {\tt iob\_soc.py} file:\\
{\tt peripherals = {\em TIMER}}
\item Add the IP core special connections in the {\tt iob\_soc.py} file:\\
{\tt peripheral\_portmap = {\em ...}}
\item Include the Timer IP core in the submodules list in the {\tt iob\_soc.py} file:\\
{\tt submodules\_list += iob\_timer}
\end{itemize}
\end{frame}

Expand Down
Loading

0 comments on commit d7147be

Please sign in to comment.