-
Notifications
You must be signed in to change notification settings - Fork 11
246 lines (213 loc) · 15.7 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: IP_Catalog Workflow
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
IP_Catalog_Ubuntu:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Clone Raptor_Tools
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule update --init Raptor_Tools
- name: Install dependencies
run:
bash .github/install_ubuntu_dependencies_build.sh
- name: Show shell configuration
run: |
env
which cmake && cmake --version
which make && make --version
#which python3 && python3 --version
#pipenv --version
- name: Create Virtual ENV
shell: bash
run: |
cd Raptor_Tools/python_tools
make build && cd build && make
- name: Sanity Check
shell: bash
run: |
gen_list=`find $GITHUB_WORKSPACE/rapidsilicon/ip -type f -iname "*_gen.py"`
cd Raptor_Tools/python_tools/build/share/envs/litex/bin
excluded_ips=("on_chip_memory" "axil_quadspi" "ahb2axi_bridge" "axi2ahb_bridge" "axi2axilite_bridge" "axis_width_converter" "i2c_master" "axil_ethernet")
simulation_list=( "axi fifo" "dsp_generator" "axi_ram" "axi2axilite_bridge" "fifo_generator" "axis_ram_switch" "axis_switch" "axis_broadcast" "axis_uart" "axis_adapter" "i2c_master" "i2c_slave")
#fix ethernet ip
for n in $gen_list
do
./python3 $n --build --json-template
ip_name=$(basename "${n%_gen.py}")
echo $ip_name
#file_path=$(find /home/runner/work/IP_Catalog/IP_Catalog/Raptor_Tools/python_tools/build/share/envs/litex/bin -type f -name $ip_name"_wrapper.v")
file_path=$(find /home/runner/work/IP_Catalog/IP_Catalog/Raptor_Tools/python_tools/build/share/envs/litex/bin -type f -iname "${ip_name}_wrapper_v1_0.v" -o -iname "${ip_name}_wrapper_v2_0.v" -o -iname "${ip_name}_wrapper_v1_0.sv" -o -iname "${ip_name}_wrapper_v2_0.sv" -o -iname "${ip_name}_v1_0.v" -o -iname "${ip_name}_v2_0.v" | head -n 1)
# Check if the IP name is in the excluded_ips array
if [[ " ${simulation_list[@]} " =~ " $ip_name " ]]; then
dir_path=`dirname $file_path`
echo $dir_path
make -C "$dir_path/../sim/"
fi
if [[ ! " ${excluded_ips[@]} " =~ " $ip_name " ]]; then
if [[ -n "$file_path" ]]; then
echo "Success! IP RTL generated"
echo $file_path
echo "Input path assignment"
#echo $input_path
echo "Dir path assignment"
echo $dir_path
# Append "sim" to the directory path
sim_path="$dir_path/../sim/"
#cd /home/runner/work/IP_Catalog/IP_Catalog/Raptor_Tools/python_tools/build/share/envs/litex/bin/rapidsilicon/ip/axi_crossbar/v1_0/axi_crossbar_wrapper/src/../sim/
#make
#dir_path=`dirname $file_path`
#echo $dir_path
#make -C "$dir_path/../sim/"
else
echo "IP RTL wrapper not generated. Exiting."
exit 1
fi
else
echo "Skipping wrapper check for $ip_name"
fi
file_path=""
done
- name: Test IP Generation
run: |
cd Raptor_Tools/python_tools/build/share/envs/litex/bin
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_dpram/v1_0/axi_dpram_gen.py --data_width=32 --addr_width=8 --build-name=dpram_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_ram/v1_0/axi_ram_gen.py --data_width=32 --addr_width=8 --build-name=ram_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_register/v1_0/axi_register_gen.py --data_width=64 --addr_width=32 --build-name=register_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_gpio/v1_0/axil_gpio_gen.py --data_width=32 --addr_width=8 --build-name=gpio_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_uart16550/v1_0/axil_uart16550_gen.py --addr_width=8 --data_width=32 --build-name=uart_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_cdma/v1_0/axi_cdma_gen.py --addr_width=8 --data_width=32 --build-name=cdma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_cdma/v2_0/axi_cdma_gen.py --axi_data_width=32 --axi_addr_width=32 --build-name=cdma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_dma/v1_0/axi_dma_gen.py --axi_data_width=32 --axi_addr_width=8 --build-name=dma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_fifo/v1_0/axi_fifo_gen.py --data_width=32 --addr_width=64 --build-name=fifo --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_adapter/v1_0/axis_adapter_gen.py --s_data_width=32 --build-name=adapter --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_fifo/v1_0/axis_fifo_gen.py --depth=2048 --data_width=32 --build-name=fifo --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_pipeline_register/v1_0/axis_pipeline_register_gen.py --data_width=32 --build-name=reg --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_uart/v1_0/axis_uart_gen.py --data_width=8 --build-name=uart --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/i2c_master/v1_0/i2c_master_gen.py --build-name=i2c --build-dir=./test_dir --write_fifo=1 --write_addr_fifo_width=5 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/i2c_slave/v1_0/i2c_slave_gen.py --data_width=32 --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/priority_encoder/v1_0/priority_encoder_gen.py --width=7 --build-name=encoder --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/vexriscv_cpu/v1_0/vexriscv_cpu_gen.py --build-name=vexriscv_wrap --build-dir=./ --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_interconnect/v1_0/axi_interconnect_gen.py --data_width=32 --addr_width=64 --s_count=7 --m_count=4 --build-name=interconnect_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_interconnect/v1_0/axil_interconnect_gen.py --data_width=32 --addr_width=64 --s_count=5 --m_count=2 --build-name=interconnect_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_crossbar/v1_0/axil_crossbar_gen.py --data_width=32 --addr_width=64 --s_count=5 --m_count=6 --build-name=crossbar_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_crossbar/v1_0/axi_crossbar_gen.py --data_width=32 --addr_width=32 --s_count=7 --m_count=4 --build-name=crossbar_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_broadcast/v1_0/axis_broadcast_gen.py --data_width=1024 --m_count=8 --build-name=broadcast --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi2axilite_bridge/v1_0/axi2axilite_bridge_gen.py --data_width=256 --addr_width=8 --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_quadspi/v1_0/axil_quadspi_gen.py --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/ocla/v1_0/ocla_gen.py --build-name=ocla_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_async_fifo/v1_0/axi_async_fifo_gen.py --data_width=32 --fifo_depth=64 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_async_fifo/v1_0/axis_async_fifo_gen.py --data_width=32 --depth=64 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/on_chip_memory/v1_0/on_chip_memory_gen.py --data_width=36 --write_depth=1024 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/io_configurator/v1_0/io_configurator_gen.py --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/ethernet_mac/v1_0/ethernet_mac_gen.py --build
#--------------------------CentOS------------------------------------
centos7-gcc:
name: IP_Catalog_centos
runs-on: ubuntu-latest
container:
image: centos:7
defaults:
run:
shell: bash
steps:
- name: Install latest Git
run: |
cd /opt && curl -L -o yumvault.tar.gz https://github.com/os-fpga/post_build_artifacts/releases/download/v0.2/yumvaultn.tar.gz && tar xvzf yumvault.tar.gz && ls -l && mv etc/yum.repos.d/Custom.repo /etc/yum.repos.d
yum-config-manager --disable base extras updates
yum update -y
rm -f /etc/yum.repos.d/Custom.repo
yum-config-manager --enable C7.9.2009-extras C7.9.2009-updates C7.9.2009-base
yum install -y openssh-server openssh-clients
yum remove -y git*
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y git
- name: Checkout code
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git init $GITHUB_WORKSPACE
git remote add origin https://github.com/$GITHUB_REPOSITORY
git remote -v
git config --local gc.auto 0
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +${{ github.sha }}:refs/remotes/pull/${{ github.event.pull_request.number }}/merge
git checkout --progress --force refs/remotes/pull/${{ github.event.pull_request.number }}/merge
else
git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
git checkout origin/$GITHUB_REF_NAME
fi
git log -1 --format='%H'
- name: Clone Raptor_Tools
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule update --init Raptor_Tools
- name: Install GCC & CMake
run:
bash .github/install_centos_dependencies_build.sh
- name: Show shell configuration
run: |
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
which cmake && cmake --version
which make && make --version
#which python3 && python3 --version
#pipenv --version
- name: Create Virtual ENV
shell: bash
run: |
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
cd Raptor_Tools/python_tools
make build && cd build && make
- name: Sanity Check
shell: bash
run: |
gen_list=`find $GITHUB_WORKSPACE/rapidsilicon/ip -type f -iname "*_gen.py"`
cd Raptor_Tools/python_tools/build/share/envs/litex/bin
for n in $gen_list
do
./python3 $n --build --json-template
done
- name: Test IP Generation
run: |
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
cd Raptor_Tools/python_tools/build/share/envs/litex/bin
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_dpram/v1_0/axi_dpram_gen.py --data_width=32 --addr_width=8 --json-template --build-name=dpram_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_ram/v1_0/axi_ram_gen.py --data_width=32 --addr_width=8 --json-template --build-name=ram_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_register/v1_0/axi_register_gen.py --data_width=64 --addr_width=32 --json-template --build-name=register_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_gpio/v1_0/axil_gpio_gen.py --data_width=32 --addr_width=8 --json-template --build-name=gpio_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_uart16550/v1_0/axil_uart16550_gen.py --addr_width=8 --data_width=32 --json-template --build-name=uart_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_cdma/v1_0/axi_cdma_gen.py --addr_width=8 --data_width=32 --json-template --build-name=cdma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_cdma/v2_0/axi_cdma_gen.py --axi_data_width=32 --axi_addr_width=32 --json-template --build-name=cdma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_dma/v1_0/axi_dma_gen.py --axi_data_width=32 --axi_addr_width=8 --json-template --build-name=dma --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_fifo/v1_0/axi_fifo_gen.py --data_width=32 --addr_width=64 --json-template --build-name=fifo --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_adapter/v1_0/axis_adapter_gen.py --s_data_width=32 --json-template --build-name=adapter --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_fifo/v1_0/axis_fifo_gen.py --depth=2048 --data_width=32 --json-template --build-name=fifo --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_pipeline_register/v1_0/axis_pipeline_register_gen.py --data_width=32 --json-template --build-name=reg --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_uart/v1_0/axis_uart_gen.py --data_width=8 --json-template --build-name=uart --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/i2c_master/v1_0/i2c_master_gen.py --json-template --build-name=i2c --build-dir=./test_dir --write_fifo=1 --write_addr_fifo_width=5 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/i2c_slave/v1_0/i2c_slave_gen.py --data_width=32 --json-template --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/priority_encoder/v1_0/priority_encoder_gen.py --width=7 --json-template --build-name=encoder --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/vexriscv_cpu/v1_0/vexriscv_cpu_gen.py --json-template --build-name=vexriscv_wrap --build-dir=./ --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_interconnect/v1_0/axi_interconnect_gen.py --data_width=32 --addr_width=64 --s_count=7 --m_count=4 --json-template --build-name=interconnect_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_interconnect/v1_0/axil_interconnect_gen.py --data_width=32 --addr_width=64 --s_count=5 --m_count=2 --json-template --build-name=interconnect_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_crossbar/v1_0/axil_crossbar_gen.py --data_width=32 --addr_width=64 --s_count=5 --m_count=6 --json-template --build-name=crossbar_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_crossbar/v1_0/axi_crossbar_gen.py --data_width=32 --addr_width=32 --s_count=7 --m_count=4 --json-template --build-name=crossbar_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_broadcast/v1_0/axis_broadcast_gen.py --data_width=1024 --m_count=8 --json-template --build-name=broadcast --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi2axilite_bridge/v1_0/axi2axilite_bridge_gen.py --data_width=256 --addr_width=8 --json-template --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axil_quadspi/v1_0/axil_quadspi_gen.py --json-template --build-name=wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/ocla/v1_0/ocla_gen.py --build-name=ocla_wrapper --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axi_async_fifo/v1_0/axi_async_fifo_gen.py --data_width=32 --fifo_depth=64 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/axis_async_fifo/v1_0/axis_async_fifo_gen.py --data_width=32 --depth=64 --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/io_configurator/v1_0/io_configurator_gen.py --build
./python3 $GITHUB_WORKSPACE/rapidsilicon/ip/ethernet_mac/v1_0/ethernet_mac_gen.py --build