Skip to content

Commit

Permalink
Merge pull request #53 from arturum1/master
Browse files Browse the repository at this point in the history
Fix ci.yml; Rename sources; Update submodules.
  • Loading branch information
PedroAntunes178 authored Oct 27, 2023
2 parents 5eb49b9 + 5eeb09e commit 28e13a4
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 37 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
push:
branches:
- master
- python-setup
# Don't forget to require approval for all outside collaborators
pull_request:
branches: '*'
Expand All @@ -29,7 +28,6 @@ jobs:
timeout-minutes: 30
# run even if previous job failed
if: ${{ !cancelled() }}
# run after indicated job

steps:
- uses: actions/checkout@v3
Expand All @@ -47,7 +45,6 @@ jobs:
timeout-minutes: 30
# run even if previous job failed
if: ${{ !cancelled() }}
# run after indicated job

steps:
- uses: actions/checkout@v3
Expand All @@ -73,12 +70,8 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: clean
run: nix-shell --run "make clean"
- name: setup ext_mem
run: nix-shell --run "make setup RUN_LINUX=0 INIT_MEM=0"
- name: cyclonev test
run: make -C ../iob_soc_o* fpga-test BOARD=CYCLONEV-GT-DK
run: make fpga-run RUN_LINUX=0 INIT_MEM=0 BOARD=CYCLONEV-GT-DK

aes-ku040-baremetal:
runs-on: self-hosted
Expand All @@ -92,18 +85,14 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: clean
run: nix-shell --run "make clean"
- name: setup ext_mem
run: nix-shell --run "make setup RUN_LINUX=0 INIT_MEM=0"
- name: ku040 test
run: make -C ../iob_soc_o* fpga-test BOARD=AES-KU040-DB-G
run: make fpga-run RUN_LINUX=0 INIT_MEM=0 BOARD=AES-KU040-DB-G

doc:
runs-on: self-hosted
timeout-minutes: 60
if: ${{ !cancelled() }}
needs: [ cyclonev-baremetal, aes-ku040-baremetal, cyclonev-linux, aes-ku040-linux ]
needs: [ cyclonev-baremetal, aes-ku040-baremetal ]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "submodules/LIB"]
path = submodules/LIB
url = [email protected]:IObundle/iob-lib.git
[submodule "submodules/VEXRISCV"]
path = submodules/VEXRISCV
url = [email protected]:IObundle/iob-vexriscv.git
Expand Down
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
CORE := iob_soc_opencryptolinux

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

DISABLE_LINT:=1

include submodules/LIB/setup.mk
LIB_DIR:=submodules/IOBSOC/submodules/LIB
include $(LIB_DIR)/setup.mk

INIT_MEM ?= 1
RUN_LINUX ?= 1
Expand All @@ -15,18 +19,23 @@ ifeq ($(RUN_LINUX),1)
SETUP_ARGS += RUN_LINUX
endif

setup:
make build-setup SETUP_ARGS="$(SETUP_ARGS)"

sim-test:
# IOb-SoC-Opencryptolinux only supports USE_EXTMEM=1
#make clean && make setup && make -C ../iob_soc_opencryptolinux_V*/ sim-test
#make clean && make setup INIT_MEM=0 && make -C ../iob_soc_opencryptolinux_V*/ sim-test
make clean && make setup USE_EXTMEM=1 && make -C ../iob_soc_opencryptolinux_V*/ sim-test
make clean && make setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../iob_soc_opencryptolinux_V*/ sim-test

fpga-run:
nix-shell --run 'make clean setup INIT_MEM=$(INIT_MEM) USE_EXTMEM=$(USE_EXTMEM) RUN_LINUX=$(RUN_LINUX) && make -C ../$(CORE)_V*/ fpga-fw-build BOARD=$(BOARD)'
make -C ../$(CORE)_V*/ fpga-run BOARD=$(BOARD)

fpga-test:
# IOb-SoC-Opencryptolinux only supports USE_EXTMEM=1
#make clean && make setup && make -C ../iob_soc_opencryptolinux_V*/ fpga-test
#make clean && make setup INIT_MEM=0 && make -C ../iob_soc_opencryptolinux_V*/ fpga-test
make clean && make setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../iob_soc_opencryptolinux_V*/ fpga-test
make clean setup fpga-run INIT_MEM=0 USE_EXTMEM=1

test-all:
make clean && make setup && make -C ../iob_soc_opencryptolinux_V*/ pc-emul-test
Expand Down
1 change: 1 addition & 0 deletions default.nix
1 change: 1 addition & 0 deletions hardware/src/arbiter.v
2 changes: 1 addition & 1 deletion hardware/src/iob_soc_opencryptolinux.v
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ module iob_soc_opencryptolinux #(



boot_ctr #(
iob_soc_opencryptolinux_boot_ctr #(
.DATA_W(UART0_DATA_W),
.ADDR_W(UART0_ADDR_W)
) boot_ctr (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
`timescale 1 ns / 1 ps

module boot_ctr #(
module iob_soc_opencryptolinux_boot_ctr #(
parameter ADDR_W = 0,
parameter DATA_W = 0,
parameter STRB_W = (DATA_W / 8)
Expand Down
1 change: 1 addition & 0 deletions hardware/src/priority_encoder.v
20 changes: 14 additions & 6 deletions iob_soc_opencryptolinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import shutil

from mk_configuration import update_define
from verilog_tools import inplace_change

from iob_soc import iob_soc
from iob_vexriscv import iob_vexriscv
from iob_uart16550 import iob_uart16550
from iob_plic import iob_plic
from iob_clint import iob_clint
from iob_uart import iob_uart
from iob_spi import iob_spi
from iob_spi_master import iob_spi_master
from axil2iob import axil2iob
from iob_reset_sync import iob_reset_sync

Expand Down Expand Up @@ -41,8 +42,8 @@ def _create_instances(cls):
parameters={"N_SOURCES": "32", "N_TARGETS": "2"},
)
)
if iob_spi in cls.submodule_list:
cls.peripherals.append(iob_spi("SPI0", "SPI master peripheral"))
if iob_spi_master in cls.submodule_list:
cls.peripherals.append(iob_spi_master("SPI0", "SPI master peripheral"))

@classmethod
def _create_submodules_list(cls, extra_submodules=[]):
Expand Down Expand Up @@ -89,9 +90,16 @@ def _post_setup(cls):
if os.path.isfile(src_file):
shutil.copy2(src_file, dst)

dst = f"{cls.build_dir}/hardware/src"
src_file = f"{__class__.setup_dir}/hardware/src/axi_interconnect.v"
shutil.copy2(src_file, dst)
# If RUN_LINUX is not set, use 3000000 baud in simulation
for arg in sys.argv[1:]:
if arg == "RUN_LINUX":
break
else:
inplace_change(
os.path.join(cls.build_dir, "hardware/simulation/bsp.vh"),
"define BAUD 115200",
"define BAUD 3000000",
)

@classmethod
def _setup_confs(cls, extra_confs=[]):
Expand Down
1 change: 0 additions & 1 deletion shell.nix

This file was deleted.

2 changes: 1 addition & 1 deletion submodules/CLINT
Submodule CLINT updated 3 files
+0 −3 .gitmodules
+1 −1 iob_clint.py
+0 −1 submodules/LIB
2 changes: 1 addition & 1 deletion submodules/IOBSOC
Submodule IOBSOC updated 434 files
1 change: 0 additions & 1 deletion submodules/LIB
Submodule LIB deleted from 17aaab
2 changes: 1 addition & 1 deletion submodules/PLIC
Submodule PLIC updated 3 files
+0 −3 .gitmodules
+1 −1 iob_plic.py
+0 −1 submodules/LIB
2 changes: 1 addition & 1 deletion submodules/UART16550
2 changes: 1 addition & 1 deletion submodules/VEXRISCV
Submodule VEXRISCV updated 2 files
+0 −3 .gitmodules
+0 −1 submodules/LIB

0 comments on commit 28e13a4

Please sign in to comment.