Add IEM (Input Edge Monitor) #856
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Chipdb builder | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
gw1n1: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1n-1 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1N-1.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-1-chipdb | |
path: apycula/GW1N-1.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-1-stage | |
path: GW1N-1* | |
gw1nz1: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1nz-1 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1NZ-1.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1nz-1-chipdb | |
path: apycula/GW1NZ-1.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1nz-1-stage | |
path: GW1NZ-1* | |
gw1n9: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1n-9 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1N-9.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-9-chipdb | |
path: apycula/GW1N-9.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-9-stage | |
path: GW1N-9* | |
gw1n9c: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1n-9c chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1N-9C.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-9c-chipdb | |
path: apycula/GW1N-9C.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-9c-stage | |
path: GW1N-9C* | |
gw1n4: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1n-4 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1N-4.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-4-chipdb | |
path: apycula/GW1N-4.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1n-4-stage | |
path: GW1N-4* | |
gw1ns2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1ns-2 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1NS-2.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1ns-2-chipdb | |
path: apycula/GW1NS-2.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1ns-2-stage | |
path: GW1NS-2* | |
gw1ns4: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw1ns-4 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW1NS-4.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1ns-4-chipdb | |
path: apycula/GW1NS-4.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw1ns-4-stage | |
path: GW1NS-4* | |
gw2a18: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw2a-18 chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW2A-18.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw2a-18-chipdb | |
path: apycula/GW2A-18.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw2a-18-stage | |
path: GW2A-18* | |
gw2a18c: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build gw2a-18c chipdb | |
run: | | |
docker pull pepijndevos/apicula:1.9.8 | |
docker run -v $(pwd):/usr/src/apicula pepijndevos/apicula:1.9.8 make apycula/GW2A-18C.pickle | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw2a-18c-chipdb | |
path: apycula/GW2A-18C.pickle | |
- name: Archive stage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gw2a-18C-stage | |
path: GW2A-18C* | |
pypi: | |
runs-on: ubuntu-latest | |
needs: [gw1n1, gw1nz1, gw1n9, gw1n9c, gw1n4, gw1ns2, gw1ns4, gw2a18, gw2a18c] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download gw1n-1 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1n-1-chipdb | |
path: apycula | |
- name: Download gw1nz-1 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1nz-1-chipdb | |
path: apycula | |
- name: Download gw1n-4 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1n-4-chipdb | |
path: apycula | |
- name: Download gw1n-9 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1n-9-chipdb | |
path: apycula | |
- name: Download gw1n-9c chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1n-9c-chipdb | |
path: apycula | |
- name: Download gw1ns-2 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1ns-2-chipdb | |
path: apycula | |
- name: Download gw1ns-4 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw1ns-4-chipdb | |
path: apycula | |
- name: Download gw2a-18 chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw2a-18-chipdb | |
path: apycula | |
- name: Download gw2a-18c chipdb | |
uses: actions/download-artifact@v4 | |
with: | |
name: gw2a-18c-chipdb | |
path: apycula | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install and build | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
python setup.py --version | |
python setup.py sdist bdist_wheel | |
# Validate that the resulting wheel can be executed | |
pip install dist/Apycula-$(python setup.py --version)-py3-none-any.whl | |
gowin_pack --help | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-dist | |
path: dist | |
- name: Publish to Pypi | |
if: startsWith(github.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
twine upload --verbose dist/* | |
- name: Pack release data | |
if: startsWith(github.ref, 'refs/heads/master') | |
run: | | |
tar cvfz linux-x64-gowin-data.tgz apycula/*.pickle | |
- name: Upload to oss-cad-suite | |
uses: ncipollo/release-action@v1 | |
if: hashFiles('linux-x64-gowin-data.tgz') != '' | |
with: | |
allowUpdates: True | |
prerelease: True | |
omitBody: True | |
omitBodyDuringUpdate: True | |
omitNameDuringUpdate: True | |
tag: 0.0.0.dev | |
artifacts: "linux-x64-gowin-data.tgz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
example: | |
runs-on: ubuntu-latest | |
needs: [pypi] | |
strategy: | |
fail-fast: false | |
matrix: | |
yosys: [main, yosys-0.44] | |
nextpnr: [master, nextpnr-0.7] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download python package | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-dist | |
path: dist | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
id: pysetup | |
with: | |
python-version: '3.9' | |
- name: Install and build | |
run: | | |
pip install dist/*.whl | |
# pip install apycula | |
git clone https://github.com/YosysHQ/yosys.git | |
git clone https://github.com/YosysHQ/nextpnr.git | |
sudo apt-get update | |
sudo apt-get install build-essential clang bison flex \ | |
libreadline-dev gawk tcl-dev libffi-dev git \ | |
graphviz xdot pkg-config python3 libboost-system-dev \ | |
libboost-python-dev libboost-filesystem-dev zlib1g-dev \ | |
libboost-thread-dev libboost-program-options-dev libboost-iostreams-dev libboost-dev \ | |
libeigen3-dev | |
cd yosys | |
git checkout ${{ matrix.yosys }} | |
git submodule update --init | |
make config-gcc | |
make -j$(nproc) | |
sudo make install | |
cd ../nextpnr | |
git checkout ${{ matrix.nextpnr }} | |
cmake . -DBUILD_PYTHON=OFF -DARCH="gowin;himbaechel" -DHIMBAECHEL_GOWIN_DEVICES="all" -DPython3_EXECUTABLE=${{ steps.pysetup.outputs.python-path }} | |
make -j$(nproc) | |
sudo make install | |
cd ../examples | |
make -j$(nproc) all | |
cd himbaechel | |
make -j$(nproc) -f Makefile.himbaechel all | |
- name: Archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: examples-${{ matrix.yosys }}-${{ matrix.nextpnr }} | |
path: examples | |
- name: Do sanity check | |
run: | | |
cd examples | |
make -j$(nproc) unpacked | |
for f in *-unpacked.v; do | |
yosys -p "read_verilog $f; read_verilog -lib +/gowin/cells_sim.v; clean -purge; select -assert-any t:DFF*; select -assert-any t:*BUF;"; | |
done | |
cd himbaechel | |
make -j$(nproc) -f Makefile.himbaechel unpacked | |
for f in *-unpacked.v; do | |
yosys -p "read_verilog $f; read_verilog -lib +/gowin/cells_sim.v; clean -purge; select -assert-any t:DFF*; select -assert-any t:*BUF;"; | |
done |