1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-04-03 20:12:55 +00:00

Merge pull request #301 from umarcor/vunit-cleanup

VUnit cleanup
This commit is contained in:
Michael Neuling
2021-08-02 14:22:11 +10:00
committed by GitHub
2 changed files with 18 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ on:
pull_request:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:
jobs:
@@ -54,10 +55,11 @@ jobs:
VUnit:
needs: [build]
runs-on: ubuntu-latest
container: ghdl/vunit:llvm
steps:
- uses: actions/checkout@v2
- run: python3 ./run.py -p10
- uses: docker://ghdl/vunit:llvm
with:
args: python3 ./run.py -p10
symbiflow:
strategy:

34
run.py
View File

@@ -1,29 +1,23 @@
from pathlib import Path
from vunit import VUnit
from glob import glob
prj = VUnit.from_argv()
prj.add_osvvm()
root = Path(__file__).parent
ROOT = Path(__file__).parent
lib = prj.add_library("lib")
lib.add_source_files(root / "litedram" / "extras" / "*.vhdl")
lib.add_source_files(root / "litedram" / "generated" / "sim" / "*.vhdl")
PRJ = VUnit.from_argv()
PRJ.add_osvvm()
# Use multiply.vhd and not xilinx-mult.vhd. Use VHDL-based random.
vhdl_files = glob(str(root / "*.vhdl"))
vhdl_files = [
PRJ.add_library("lib").add_source_files([
ROOT / "litedram" / "extras" / "*.vhdl",
ROOT / "litedram" / "generated" / "sim" / "*.vhdl"
] + [
src_file
for src_file in vhdl_files
if ("xilinx-mult" not in src_file)
and ("foreign_random" not in src_file)
and ("nonrandom" not in src_file)
]
lib.add_source_files(vhdl_files)
for src_file in ROOT.glob("*.vhdl")
# Use multiply.vhd and not xilinx-mult.vhd. Use VHDL-based random.
if not any(exclude in str(src_file) for exclude in ["xilinx-mult", "foreign_random", "nonrandom"])
])
unisim = prj.add_library("unisim")
unisim.add_source_files(root / "sim-unisim" / "*.vhdl")
PRJ.add_library("unisim").add_source_files(ROOT / "sim-unisim" / "*.vhdl")
prj.set_sim_option("disable_ieee_warnings", True)
PRJ.set_sim_option("disable_ieee_warnings", True)
prj.main()
PRJ.main()