Skip to content

Commit

Permalink
Merge pull request #623 from P-Miranda/merge-if_gen-main
Browse files Browse the repository at this point in the history
merge(main); Merge main into if_gen
  • Loading branch information
jjts authored Nov 6, 2023
2 parents 7c097f6 + 369fa08 commit 72b72dc
Show file tree
Hide file tree
Showing 94 changed files with 1,251 additions and 1,014 deletions.
178 changes: 53 additions & 125 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,172 +14,102 @@ concurrency:
on:
push:
branches: '*'
# Don't forget to require approval for all outside collaborators
pull_request:
branches: '*'
# Allow manual workflow runs
workflow_dispatch:

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

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: clean
run: make clean
- name: setup
run: nix-shell --run "make setup"
- name: pc-emul test
run: make -C ../iob_soc_V* pc-emul-test

verilator:
- name: run LIB test
run: nix-shell --run "cd submodules/LIB; ./scripts/test.sh test"

uart:
runs-on: self-hosted
timeout-minutes: 30
# run even if previous job failed
if: ${{ !cancelled() }}
# run after indicated job
needs: [ pc-emul ]

timeout-minutes: 5

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# Init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup init_mem
run: nix-shell --run "make setup"
- name: verilator test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=verilator"
# No init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup
run: nix-shell --run "make setup INIT_MEM=0"
- name: verilator test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=verilator"
# Init mem and Ext mem
- name: clean
run: nix-shell --run "make clean"
- name: setup init_mem ext_mem
run: nix-shell --run "make setup INIT_MEM=1 USE_EXTMEM=1"
- name: verilator test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=verilator"
# No init mem and Ext mem
- name: clean
run: nix-shell --run "make clean"
- name: setup ext_mem
run: nix-shell --run "make setup INIT_MEM=0 USE_EXTMEM=1"
- name: verilator test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=verilator"

icarus:
- name: run uart test
run: make -C submodules/UART test

cache:
runs-on: self-hosted
timeout-minutes: 90
timeout-minutes: 5

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


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

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: run test
run: make pc-emul-test

simulation:
runs-on: self-hosted
timeout-minutes: 30
# run even if previous job failed
if: ${{ !cancelled() }}
needs: [ pc-emul ]

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# Init mem
- name: clean
run: make clean
- name: setup init_mem
run: nix-shell --run "make setup"
- name: icarus test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=icarus"
# No init mem - Disabled because it takes too long and is already checked by verilator
#- name: clean
# run: make clean
#- name: setup
# run: nix-shell --run "make setup INIT_MEM=0"
#- name: icarus test
# run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=icarus"
# Init mem and Ext mem
- name: clean
run: make clean
- name: setup init_mem ext_mem
run: nix-shell --run "make setup INIT_MEM=1 USE_EXTMEM=1"
- name: icarus test
run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=icarus"
# No init mem and Ext mem - Disabled because it takes too long and is already checked by verilator
#- name: clean
# run: make clean
#- name: setup ext_mem
# run: nix-shell --run "make setup INIT_MEM=0 USE_EXTMEM=1"
#- name: icarus test
# run: nix-shell --run "make -C ../iob_soc_V* sim-test SIMULATOR=icarus"
- name: run test
run: nix-shell --run "make sim-test"

cyclonev:
runs-on: self-hosted
timeout-minutes: 60
if: ${{ !cancelled() }}
needs: [ icarus, verilator ]
needs: [ pc-emul ]

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# Init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup init_mem
run: nix-shell --run "make setup"
- name: cyclonev test
run: make -C ../iob_soc_V* fpga-test BOARD=CYCLONEV-GT-DK
# No init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup
run: nix-shell --run "make setup INIT_MEM=0"
- name: cyclonev test
run: make -C ../iob_soc_V* fpga-test BOARD=CYCLONEV-GT-DK
# No init mem and Ext mem
- name: clean
run: nix-shell --run "make clean"
- name: setup ext_mem
run: nix-shell --run "make setup INIT_MEM=0 USE_EXTMEM=1"
- name: cyclonev test
run: make -C ../iob_soc_V* fpga-test BOARD=CYCLONEV-GT-DK
- name: init mem and no ext mem
run: make fpga-run BOARD=CYCLONEV-GT-DK INIT_MEM=1 USE_EXTMEM=0
- name: no init mem and ext mem
run: make fpga-run BOARD=CYCLONEV-GT-DK INIT_MEM=0 USE_EXTMEM=1


aes-ku040:
runs-on: self-hosted
timeout-minutes: 90
if: ${{ !cancelled() }}
needs: [ icarus, verilator ]
needs: [ pc-emul ]

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# Init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup init_mem
run: nix-shell --run "make setup"
- name: ku040 test
run: make -C ../iob_soc_V* fpga-test BOARD=AES-KU040-DB-G
# No init mem
- name: clean
run: nix-shell --run "make clean"
- name: setup
run: nix-shell --run "make setup INIT_MEM=0"
- name: ku040 test
run: make -C ../iob_soc_V* fpga-test BOARD=AES-KU040-DB-G
# No init mem and Ext mem
- name: clean
run: nix-shell --run "make clean"
- name: setup ext_mem
run: nix-shell --run "make setup INIT_MEM=0 USE_EXTMEM=1"
- name: ku040 test
run: make -C ../iob_soc_V* fpga-test BOARD=AES-KU040-DB-G

- 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

doc:
runs-on: self-hosted
timeout-minutes: 60
Expand All @@ -190,9 +120,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: clean
run: nix-shell --run "make clean"
- name: setup
run: nix-shell --run "make setup"
- name: doc test
run: nix-shell --run "make -C ../iob_soc_V* doc-test"


62 changes: 40 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
CORE := iob_soc

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

DISABLE_LINT:=1
export DISABLE_LINT

INIT_MEM ?= 1
include submodules/LIB/setup.mk

clean:
rm -rf ../$(CORE)_V*
INIT_MEM ?= 1
USE_EXTMEM ?= 0

setup:
python3 -B ./$(CORE).py INIT_MEM=$(INIT_MEM) USE_EXTMEM=$(USE_EXTMEM)

pc-emul-run:
nix-shell --run 'make clean setup && make -C ../$(CORE)_V*/ pc-emul-run'

pc-emul-test:
nix-shell --run 'make clean setup && make -C ../$(CORE)_V*/ pc-emul-test'

sim-build: clean setup
make -C ../$(CORE)_V*/ sim-build SIMULATOR=$(SIMULATOR)

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

sim-test:
make clean && make setup && make -C ../$(CORE)_V*/ sim-test
make clean && make setup INIT_MEM=0 && make -C ../$(CORE)_V*/ sim-test SIMULATOR=verilator
make clean && make setup USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-test
make clean && make setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-test SIMULATOR=verilator
nix-shell --run 'make clean setup INIT_MEM=1 USE_EXTMEM=0 && make -C ../$(CORE)_V*/ sim-test SIMULATOR=icarus'
nix-shell --run 'make clean setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-test SIMULATOR=verilator'
nix-shell --run 'make clean setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ sim-test 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)'
make -C ../$(CORE)_V*/ fpga-run BOARD=$(BOARD)

fpga-test:
make clean && make setup && make -C ../$(CORE)_V*/ fpga-test
make clean && make setup INIT_MEM=0 && make -C ../$(CORE)_V*/ fpga-test
make clean && make setup INIT_MEM=0 USE_EXTMEM=1 && make -C ../$(CORE)_V*/ fpga-test

test-all:
make clean && make setup && make -C ../$(CORE)_V*/ pc-emul-test
#make sim-test SIMULATOR=icarus
make sim-test SIMULATOR=verilator
make fpga-test BOARD=CYCLONEV-GT-DK
make fpga-test BOARD=AES-KU040-DB-G
make clean && make setup && make -C ../$(CORE)_V*/ doc-test

.PHONY: sim-test fpga-test test-all
make clean setup fpga-run BOARD=CYCLONEV-GT-DK INIT_MEM=1 USE_EXTMEM=0
make clean setup fpga-run BOARD=CYCLONEV-GT-DK INIT_MEM=0 USE_EXTMEM=1
make clean setup fpga-run BOARD=AES-KU040-DB-G INIT_MEM=1 USE_EXTMEM=0
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"

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

doc-test:
nix-shell --run 'make clean setup && make -C ../$(CORE)_V*/ doc-test'


test-all: pc-emul-test sim-test fpga-test doc-test


.PHONY: setup sim-test fpga-test doc-test test-all
Loading

0 comments on commit 72b72dc

Please sign in to comment.