Skip to content

Commit

Permalink
Merge pull request #26 from geddy11/issue25
Browse files Browse the repository at this point in the history
Issue25
  • Loading branch information
geddy11 committed Oct 16, 2023
2 parents 47146cf + 73a6e36 commit d32e349
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 4 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/netwiz_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

jobs:
simulate:
ghdl_sim:
runs-on: ubuntu-latest
steps:
- uses: ghdl/setup-ghdl-ci@nightly
Expand All @@ -19,8 +19,32 @@ jobs:
- name: sim
working-directory: ./script
run: bash ghdl_run_all.sh
# while we wait for the official nvc githib action, we simply install nvc in the GHDL container.
nvc_sim:
runs-on: ubuntu-latest
steps:
- uses: ghdl/setup-ghdl-ci@nightly
with:
backend: llvm
- name: checkout
uses: actions/checkout@v3
# nvc install from source
- name: clone
run: git clone https://github.com/nickg/nvc.git
- name: prepare
working-directory: ./nvc
run: ./autogen.sh && mkdir build
- name: update
run: sudo apt-get install build-essential automake autoconf flex check llvm-dev pkg-config zlib1g-dev libdw-dev libffi-dev libzstd-dev
- name: compile
working-directory: ./nvc/build
run: ../configure && make && sudo make install
# simulate
- name: sim
working-directory: ./script
run: bash nvc_run_all.sh
document:
needs: simulate
needs: [ghdl_sim, nvc_sim]
runs-on: ubuntu-latest
steps:
- uses: DenverCoder1/doxygen-github-pages-action@v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ html
_NVC_LIB
*~
script/*
!script/ghdl_run_all.sh
!script/modelsim_run_all.do
!script/*.sh
!script/*.do
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.1] - 2023-10-16

### Changed
- Added additional simulation job using nvc.

## [1.3.0] - 2023-10-13

### Added
Expand Down
84 changes: 84 additions & 0 deletions script/nvc_run_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash
# MIT License
#
# Copyright (c) 2023 Geir Drange
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
echo -e "\n"
echo "███ ██ ███████ ████████ ██ ██ ██ ███████ "
echo "████ ██ ██ ██ ██ ██ ██ ███ "
echo "██ ██ ██ █████ ██ ██ █ ██ ██ ███ "
echo "██ ██ ██ ██ ██ ██ ███ ██ ██ ███ "
echo "██ ████ ███████ ██ ███ ███ ██ ███████ "
# nw_adapt
nvc --std=2008 --work=nw_adapt -a ../nw_adapt/src/nw_adaptations_pkg.vhd
# nw_util
echo -e "\nTesting nw_util:"
nvc --std=2008 --work=nw_util -a ../nw_util/src/nw_types_pkg.vhd
nvc --std=2008 --work=nw_util -L . -a ../nw_util/src/nw_util_pkg.vhd
nvc --std=2008 --work=nw_util -L . -a ../nw_util/src/nw_crc_pkg.vhd
nvc --std=2008 --work=nw_util -L . -a ../nw_util/src/nw_nrs_pkg.vhd
nvc --std=2008 --work=nw_util -L . -a ../nw_util/src/nw_prbs_pkg.vhd
nvc --std=2008 --work=nw_util -L . -a ../nw_util/src/nw_util_context.vhd
nvc --std=2008 -L . -a ../nw_util/tb/nw_util_tb.vhd -e nw_util_tb -r
# nw_pcap
echo -e "\nTesting nw_pcap:"
nvc --std=2008 --work=nw_pcap -L . -a ../nw_pcap/src/nw_pcap_pkg.vhd
nvc --std=2008 -L . -a ../nw_pcap/tb/nw_pcap_tb.vhd -e nw_pcap_tb -r
# nw_ethernet
echo -e "\nTesting nw_ethernet:"
nvc --std=2008 --work=nw_ethernet -L . -a ../nw_ethernet/src/nw_ethernet_pkg.vhd
nvc --std=2008 --work=nw_ethernet -L . -a ../nw_ethernet/src/nw_arp_pkg.vhd
nvc --std=2008 --work=nw_ethernet -L . -a ../nw_ethernet/src/nw_ethernet_context.vhd
nvc --std=2008 --work=work -L . -a ../nw_ethernet/tb/nw_ethernet_tb.vhd -e nw_ethernet_tb -r
# nw_ipv4
echo -e "\nTesting nw_ipv4"
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/ip_protocols_pkg.vhd
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/nw_ipv4_pkg.vhd
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/nw_udpv4_pkg.vhd
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/nw_icmpv4_pkg.vhd
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/nw_tcpv4_pkg.vhd
nvc --std=2008 --work=nw_ipv4 -L . -a ../nw_ipv4/src/nw_ipv4_context.vhd
nvc --std=2008 --work=work -L . -a ../nw_ipv4/tb/nw_ipv4_tb.vhd -e nw_ipv4_tb -r
# nw_ipv6
echo -e "\nTesting nw_ipv6"
nvc --std=2008 --work=nw_ipv6 -L . -a ../nw_ipv6/src/nw_ipv6_pkg.vhd
nvc --std=2008 --work=nw_ipv6 -L . -a ../nw_ipv6/src/nw_udpv6_pkg.vhd
nvc --std=2008 --work=nw_ipv6 -L . -a ../nw_ipv6/src/nw_icmpv6_pkg.vhd
nvc --std=2008 --work=nw_ipv6 -L . -a ../nw_ipv6/src/nw_tcpv6_pkg.vhd
nvc --std=2008 --work=nw_ipv6 -L . -a ../nw_ipv6/src/nw_ipv6_context.vhd
nvc --std=2008 --work=work -L . -a ../nw_ipv6/tb/nw_ipv6_tb.vhd -e nw_ipv6_tb -r
# nw_codec
echo -e "\nTesting nw_codec"
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_sl_codec_pkg.vhd
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_cobs_pkg.vhd
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_base_pkg.vhd
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_bitstuff_pkg.vhd
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_hamming_pkg.vhd
nvc --std=2008 --work=nw_codec -L . -a ../nw_codec/src/nw_codec_context.vhd
nvc --std=2008 --work=work -L . -a ../nw_codec/tb/nw_codec_tb.vhd -e nw_codec_tb -r
# nw_ptp
echo -e "\nTesting nw_ptp"
nvc --std=2008 --work=nw_ptp -L . -a ../nw_ptp/src/nw_ptpv2_pkg.vhd
nvc --std=2008 --work=work -L . -a ../nw_ptp/tb/nw_ptp_tb.vhd -e nw_ptp_tb -r
# nw_usb
echo -e "\nTesting nw_usb"
nvc --std=2008 --work=nw_usb -L . -a ../nw_usb/src/nw_usb_pkg.vhd
nvc --std=2008 --work=nw_usb -L . -a ../nw_usb/src/nw_usb_context.vhd
nvc --std=2008 --work=work -L . -a ../nw_usb/tb/nw_usb_tb.vhd -e nw_usb_tb -r

0 comments on commit d32e349

Please sign in to comment.