SISO AXI4 Stream#
The purpose of this example is to showcase a testing setup for a core with Single Input Single Output (SISO) AXI4 Stream interfaces. This is typically found in streaming Digital Signal Processing (DSP) applications. For illustration purposes, the same UUT is tested using verification components and run scripts from several frameworks.
AXI4Stream/src contains the VHDL sources of a SISO AXI4 Stream loopback buffer. Those sources are the same as the ones in the array_axis_vcs example of VUnit’s repo.
VUnit’s array_axis_vcs example#
AXI4Stream/test/vunit/*.vhd are regular VUnit testbenches using VUnit’s Verification Components (VCs), similar to the ones found in VUnit/vunit: examples/vhdl/array_axis_vcs. However, several variants were added here, for testing performance with different setups.
VUnit#
AXI4Stream/test/vunit/run.py is a regular VUnit script based on VUnit/vunit: examples/vhdl/array_axis_vcs/run.py. It searches the testbenches in the same directory, and executes the tests as usual in a VUnit run.
This is test_AXI4Stream_VUnit
in CI.
With pyCAPI#
AXI4Stream/test/vunit/run_capi.py is a variant of the default script, which uses Core for retrieving the filesets. Testbenches are found and executed as usual.
This is test_AXI4Stream_VUnitCAPI
in CI.
OSVVM TBStream#
AXI4Stream/test/osvvm contains VHDL sources based on OSVVM’s AXI4 Stream testbench example: OSVVM/AXI4: AxiStream.
OSVVM .pro
files#
OSVVM provides a compilation and execution infrastructure through files with extension .pro
, which are in fact TCL
scripts.
Those scripts are used in the CI workflow of osvvm/OsvvmLibraries.
AXI4Stream/test/osvvm/run.pro sources OSVVM’s scripts and uses the analyze
simulate
commands provided by those.
This is test_AXI4Stream_OSVVM_ProFiles
in CI.
GHDL’s vendor scripts#
Maintainers of GHDL provide helper scripts to build vendor libraries, including Xilinx, Intel/Altera,… and OSVVM (see ghdl/ghdl: scripts/vendors). Currently, Bash and PowerShell variants of the scripts are provided. Those scripts are used in the CI workflow of gh:ghdl/extended-tests.
Hint
GHDL’s vendor scripts are typically used along with custom simulation scripts or with VUnit.
Is it possible to use them for compilation and OSVVM’s .pro
files for running the simulations?
VUnit#
Since VUnit allows managing the compilation of VHDL sources or adding externally built libraries, there are multiple possibilities for combining the OSVVM methodology and the VUnit framework. Ten different use cases are showcased in this repository, nine of which are summarised in the following table:
Order \ Build procedure |
RunScript |
ProFiles |
VendorScripts |
---|---|---|---|
Without VUnit’s VCs |
|||
With VUnit’s VCs Before |
|||
With VUnit’s VCs After |
where:
RunScript
: compiling sources through VUnit.ProFiles
: using OSVVM’s.pro
files for building OSVVMLibraries, and then adding them as external to VUnit.VendorScripts
: using GHDL’s vendor scripts for building OSVVMLibraries, and then adding them as external to VUnit.
and:
Before
: VUnit’sadd_verification_components
(including the builtin OSVVM) is used before adding non-builtin OSVVMLibraries.After
: non-builtin OSVVM and/or OSVVMLibraries are added before using VUnit’sadd_verification_components
.
Moreover, run_wvcsans.py is equivalent to run_wvcsb.py
, but the
resources are added in a different order.
The corresponding tests in CI are the following:
test_AXI4Stream_OSVVM_VUnit
test_AXI4Stream_OSVVM_VUnit_WithVCsBefore
test_AXI4Stream_OSVVM_VUnit_WithVCsAfter
test_AXI4Stream_OSVVM_VUnit_WithVCsAfterNoSkip
test_AXI4Stream_OSVVM_VUnit_external_ProFiles
test_AXI4Stream_OSVVM_VUnit_external_ProFiles_WithVCsBefore
test_AXI4Stream_OSVVM_VUnit_external_ProFiles_WithVCsAfter
test_AXI4Stream_OSVVM_VUnit_external_VendorScripts
test_AXI4Stream_OSVVM_VUnit_external_VendorScripts_WithVCsBefore
test_AXI4Stream_OSVVM_VUnit_external_VendorScripts_WithVCsAfter
With pyEDAA.ProjectModel#
TBC
Hint
Probably, use GHDL’s compile-osvvm.ps1 as a
reference or for generating *.core
files automatically.