Skip to content

Commit 58fb2e2

Browse files
committed
Initial commit
0 parents  commit 58fb2e2

58 files changed

Lines changed: 19743 additions & 0 deletions

Some content is hidden

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

.github/workflows/lint.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright 2022 ETH Zurich and University of Bologna.
2+
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
3+
# SPDX-License-Identifier: SHL-0.51
4+
5+
# Author: Tim Fischer <fischeti@iis.ee.ethz.ch>
6+
7+
name: lint
8+
9+
on: [push, pull_request]
10+
11+
env:
12+
BENDER: ./bender
13+
14+
jobs:
15+
16+
###############
17+
# Check Clean #
18+
###############
19+
check-clean:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.9'
26+
cache: 'pip'
27+
- name: Install Bender
28+
run: make bender
29+
- name: Python Requirements
30+
run: pip install -r requirements.txt
31+
- name: Check clean make targets
32+
run: |
33+
make -B update-regs
34+
make clean
35+
git status && test -z "$(git status --porcelain)"
36+
37+
###############
38+
# Check Stale #
39+
###############
40+
check-stale:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v3
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: '3.9'
47+
cache: 'pip'
48+
- name: Install Bender
49+
run: make bender
50+
- name: Python Requirements
51+
run: pip install -r requirements.txt
52+
- name: Check clean makefile
53+
run: |
54+
make -B update-regs
55+
git status && test -z "$(git status --porcelain)"
56+
57+
################
58+
# Verible Lint #
59+
################
60+
lint:
61+
runs-on: ubuntu-latest
62+
needs: [check-clean, check-stale]
63+
steps:
64+
- uses: actions/checkout@v3
65+
- uses: chipsalliance/verible-linter-action@main
66+
with:
67+
paths: |
68+
./src
69+
exclude_paths: |
70+
./src/regs
71+
extra_args: "--waiver_files util/verible.waiver"
72+
github_token: ${{ secrets.GITHUB_TOKEN }}
73+
fail_on_error: true
74+
reviewdog_reporter: github-check
75+
76+
#################
77+
# Check License #
78+
#################
79+
check-licence:
80+
runs-on: ubuntu-latest
81+
needs: [check-clean, check-stale]
82+
steps:
83+
- uses: actions/checkout@v2
84+
- uses: actions/setup-python@v2
85+
with:
86+
python-version: 3.9
87+
- name: Install requirements
88+
run: pip install -r requirements.txt
89+
- name: Check license
90+
run: util/check-license

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.bender
2+
*.ini
3+
transcript
4+
*.wlf
5+
vsim.log
6+
*.vstf
7+
*.log
8+
scripts/compile_vsim.tcl
9+
work*
10+
!.github/workflows
11+
gf12
12+
Bender.lock
13+
tsmc65-test
14+
tsmc65
15+
bender
16+
AN.DB
17+
bin
18+
scripts/compile_vcs.sh
19+
ucli.key
20+
vc_hdrs.h
21+
scripts/compile_vcs.log
22+
.dvt

.gitlab-ci.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Copyright 2022 ETH Zurich and University of Bologna.
2+
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
3+
# SPDX-License-Identifier: SHL-0.51
4+
5+
# Author: Tim Fischer <fischeti@iis.ee.ethz.ch>
6+
7+
variables:
8+
VSIM: 'questa-2021.3-kgf vsim'
9+
VCS: 'vcs-2020.12 vcs'
10+
VLOGAN: 'vcs-2020.12 vlogan'
11+
12+
stages:
13+
- build
14+
- test
15+
16+
build_vsim:
17+
stage: build
18+
script:
19+
- make clean
20+
- make compile_questa VSIM="${VSIM}" WORK=work-vsim
21+
artifacts:
22+
expire_in: 1 week
23+
paths:
24+
- work-vsim
25+
26+
build_vsim_single_channel:
27+
stage: build
28+
script:
29+
- make clean
30+
- make compile_questa VSIM="${VSIM}" SINGLE_CHANNEL=1 WORK=work-vsim-single-channel
31+
artifacts:
32+
expire_in: 1 week
33+
paths:
34+
- work-vsim-single-channel
35+
36+
build_vcs_axi:
37+
stage: build
38+
script:
39+
- make clean
40+
- make bin/serial_link_axi.vcs TB_DUT=tb_axi_serial_link VCS="${VCS}" WORK=work-vcs
41+
artifacts:
42+
expire_in: 1 week
43+
paths:
44+
- bin/serial_link_axi.vcs*
45+
46+
build_vcs_ch_calib:
47+
stage: build
48+
script:
49+
- make clean
50+
- make bin/serial_link_ch_calib.vcs TB_DUT=tb_ch_calib_serial_link VCS="${VCS}" WORK=work-vcs
51+
artifacts:
52+
expire_in: 1 week
53+
paths:
54+
- bin/serial_link_ch_calib.vcs*
55+
56+
build_vcs_single_channel:
57+
stage: build
58+
script:
59+
- make clean
60+
- make bin/serial_link_single_channel.vcs TB_DUT=tb_axi_serial_link VCS="${VCS}" SINGLE_CHANNEL=1 WORK=work-vcs-single-channel
61+
artifacts:
62+
expire_in: 1 week
63+
paths:
64+
- bin/serial_link_single_channel.vcs*
65+
66+
run_vsim_axi:
67+
stage: test
68+
needs:
69+
- build_vsim
70+
script:
71+
- echo "Running AXI test with R/W [$NUM_READS_1,$NUM_WRITES_1] <-> [$NUM_READS_2,$NUM_WRITES_2]"
72+
- make run TB_DUT=tb_axi_serial_link WORK=work-vsim RUN_ARGS="+NUM_READS_1=$NUM_READS_1 +NUM_WRITES_1=$NUM_WRITES_1 +NUM_READS_2=$NUM_READS_2 +NUM_WRITES_2=$NUM_WRITES_2"
73+
variables:
74+
TEST_LENGTH: 1000
75+
parallel:
76+
matrix:
77+
- NUM_READS_1: [0, $TEST_LENGTH]
78+
NUM_WRITES_1: [0, $TEST_LENGTH]
79+
NUM_READS_2: [0, $TEST_LENGTH]
80+
NUM_WRITES_2: [0, $TEST_LENGTH]
81+
timeout: 15 minutes
82+
83+
run_vsim_ch_calib:
84+
stage: test
85+
needs:
86+
- build_vsim
87+
script:
88+
- echo "Running Channel Calibration test with [$NUM_FAULTS, $NUM_FAULTS]"
89+
- make run TB_DUT=tb_ch_calib_serial_link WORK=work-vsim RUN_ARGS="+NUM_FAULTS_1=$NUM_FAULTS +NUM_FAULTS_2=$NUM_FAULTS"
90+
parallel:
91+
matrix:
92+
- NUM_FAULTS: [0, 3, 7]
93+
timeout: 15 minutes
94+
95+
run_vsim_single_channel:
96+
stage: test
97+
needs:
98+
- build_vsim_single_channel
99+
script:
100+
- echo "Running test with single channel instance"
101+
- make run TB_DUT=tb_axi_serial_link WORK=work-vsim-single-channel
102+
timeout: 15 minutes
103+
104+
run_vcs_axi:
105+
stage: test
106+
needs:
107+
- build_vcs_axi
108+
script:
109+
- echo "Running AXI test with R/W [$NUM_READS_1,$NUM_WRITES_1] <-> [$NUM_READS_2,$NUM_WRITES_2]"
110+
- bin/serial_link_axi.vcs +permissive -exitstatus +NUM_READS_1=$NUM_READS_1 +NUM_WRITES_1=$NUM_WRITES_1 +NUM_READS_2=$NUM_READS_2 +NUM_WRITES_2=$NUM_WRITES_2 +permissive-off
111+
variables:
112+
TEST_LENGTH: 1000
113+
parallel:
114+
matrix:
115+
- NUM_READS_1: [0, $TEST_LENGTH]
116+
NUM_WRITES_1: [0, $TEST_LENGTH]
117+
NUM_READS_2: [0, $TEST_LENGTH]
118+
NUM_WRITES_2: [0, $TEST_LENGTH]
119+
timeout: 15 minutes
120+
121+
run_vcs_ch_calib:
122+
stage: test
123+
needs:
124+
- build_vcs_ch_calib
125+
script:
126+
- echo "Running Channel Calibration test with [$NUM_FAULTS, $NUM_FAULTS]"
127+
- bin/serial_link_ch_calib.vcs +permissive -exitstatus +NUM_FAULTS_1=$NUM_FAULTS +NUM_FAULTS_2=$NUM_FAULTS +permissive-off
128+
parallel:
129+
matrix:
130+
# TODO: Check why CI fails with 7 faults in VCS
131+
# - NUM_FAULTS: [0, 3, 7]
132+
- NUM_FAULTS: [0, 3]
133+
timeout: 15 minutes
134+
135+
run_vcs_single_channel:
136+
stage: test
137+
needs:
138+
- build_vcs_single_channel
139+
script:
140+
- echo "Running test with single channel instance"
141+
- bin/serial_link_single_channel.vcs
142+
timeout: 15 minutes

Bender.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright 2022 ETH Zurich and University of Bologna.
2+
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
3+
# SPDX-License-Identifier: SHL-0.51
4+
5+
package:
6+
name: serial_link
7+
authors:
8+
- "Tim Fischer <fischeti@iis.ee.ethz.ch>"
9+
- "Manuel Eggimann <meggimann@iis.ee.ethz.ch>"
10+
- "Thomas Benz <tbenz@iis.ee.ethz.ch>"
11+
- "Paul Scheffler <paulsc@iis.ee.ethz.ch>"
12+
13+
dependencies:
14+
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.28.0 }
15+
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.38.0 }
16+
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.3.8 }
17+
18+
export_include_dirs:
19+
- src/axis/include
20+
21+
sources:
22+
files:
23+
24+
# Configuration Registers
25+
- src/regs/serial_link_reg_pkg.sv
26+
- src/regs/serial_link_reg_top.sv
27+
- src/regs/serial_link_single_channel_reg_pkg.sv
28+
- src/regs/serial_link_single_channel_reg_top.sv
29+
30+
# Parametrization
31+
- src/serial_link_pkg.sv
32+
33+
# Abstraction Layers
34+
- src/channel_allocator/stream_chopper.sv
35+
- src/channel_allocator/stream_dechopper.sv
36+
- src/channel_allocator/channel_despread_sfr.sv
37+
- src/channel_allocator/channel_spread_sfr.sv
38+
- src/channel_allocator/serial_link_channel_allocator.sv
39+
- src/serial_link_network.sv
40+
- src/serial_link_data_link.sv
41+
- src/serial_link_physical.sv
42+
43+
# Serial Link Wrapper
44+
- src/serial_link.sv
45+
46+
# Wrapper for Occamy
47+
- src/serial_link_occamy_wrapper.sv
48+
49+
- target: synthesis
50+
files:
51+
- src/serial_link_synth_wrapper.sv
52+
53+
- target: simulation
54+
files:
55+
- test/axi_channel_compare.sv
56+
- test/tb_axi_serial_link.sv
57+
- test/tb_ch_calib_serial_link.sv
58+
- test/tb_stream_chopper.sv
59+
- test/tb_stream_chopper_dechopper.sv
60+
- test/tb_channel_allocator.sv

CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Global owners
2+
* @fischeti
3+
4+
# Channel Allocator
5+
# TODO: activate for release
6+
# src/channel_allocator @meggiman

0 commit comments

Comments
 (0)