Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f1e88cc
infrastructure refactorization
IstvanZsSzekely Dec 16, 2024
e0e4835
infrastructure refactorization: Fixes
IstvanZsSzekely Dec 16, 2024
836fbe3
infrastructure refactorization: Refactoring
IstvanZsSzekely Dec 16, 2024
c99cfd7
infrastructure refactorization: Generalized scoreboard
IstvanZsSzekely Dec 16, 2024
a463503
infrastructure refactorization: Updated DMA loopback project
IstvanZsSzekely Dec 16, 2024
fb7eadf
infrastructure refactorization: Fixed address value in DMA loopback f…
IstvanZsSzekely Dec 16, 2024
5ee6bb3
infrastructure refactorization: Updated IP level testbenches
IstvanZsSzekely Jan 17, 2025
29b8873
infrastructure refactorization: IP level updates
IstvanZsSzekely Jan 20, 2025
53c1327
infrastructure refactorization: Updated Project level testbenches
IstvanZsSzekely Jan 20, 2025
d2aa755
infrastructure refactorization: Updates and fixes
IstvanZsSzekely Jan 20, 2025
1670e8e
ad7616: Fixes
IstvanZsSzekely Jan 20, 2025
269401b
dma_flock: Fixed testbench after rebase
IstvanZsSzekely Jan 20, 2025
41dfa6f
adi_datatypes: Added FIFO and LIFO class implementation
IstvanZsSzekely Jan 21, 2025
2991e44
infrastructure refactorization: Minor fixes
IstvanZsSzekely Jan 30, 2025
1fe651d
util_axis_fifo_asym: Initial testbench commit
IstvanZsSzekely Oct 18, 2024
fc60809
util_axis_fifo_asym: Updated after rebase
IstvanZsSzekely Jan 22, 2025
2693a75
util_axis_fifo_asym: Updates and fixes
IstvanZsSzekely Jan 22, 2025
98691b5
util_axis_fifo_asym: Updated waveform configuration
IstvanZsSzekely Jan 22, 2025
2f11dc9
util_axis_fifo: Initial testbench commit
IstvanZsSzekely Jan 22, 2025
76665e5
util_axis_fifo: Updated ADI AXI and AXIS agents
IstvanZsSzekely Jan 22, 2025
30018ba
util_axis_fifo: Fixed ADI AXI agent run call
IstvanZsSzekely Jan 22, 2025
8ee0dee
General updates:
IstvanZsSzekely Jan 27, 2025
a5337ee
SPI VIP update
IstvanZsSzekely Jan 30, 2025
a888f41
General updates: Updated VIP clocking and reset calls
IstvanZsSzekely Feb 11, 2025
46b53bb
general: Change while(1) calls to forever
IstvanZsSzekely Feb 11, 2025
afcd1be
ADI AMD agent abstractization
IstvanZsSzekely Feb 12, 2025
e87f281
ADI AMD agent abstractization: Added linker macro to simplify VIP lin…
IstvanZsSzekely Feb 13, 2025
a6483d7
ADI AMD agent abstractication: Updated testbenches for the base envir…
IstvanZsSzekely Feb 13, 2025
a8c9d2d
library/vip/amd/axi/s_axi_sequencer: Added memory access functions
IstvanZsSzekely Feb 13, 2025
bf9ae58
library/vip/amd/axi/s_axi_sequencer: Cosmetic change
IstvanZsSzekely Feb 13, 2025
85d89c1
library/vip/amd: Updated ADI agent function calls to fix a null-objec…
IstvanZsSzekely Feb 20, 2025
13863e7
scoreboard: Simplified to AXIS datastream verification
IstvanZsSzekely Feb 20, 2025
1961396
scoreboard: Commented test program
IstvanZsSzekely Feb 20, 2025
bffecca
packet_filter: Initial commit
IstvanZsSzekely Feb 17, 2025
baf31fd
packet_filter: Add dependencies
IstvanZsSzekely Feb 17, 2025
a878252
packet_filter: Add sandbox testbench
IstvanZsSzekely Feb 25, 2025
920634f
packet_processor: Initial commit
IstvanZsSzekely Feb 26, 2025
d869b1b
docs: Packet processor testbench
IstvanZsSzekely Mar 3, 2025
42d002b
docs/testbenches/ip/packet_processor: PR requests
IstvanZsSzekely Mar 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 192 additions & 0 deletions docs/testbenches/ip_based/packet_processor/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
.. _packet_processor:

Packet processor
================================================================================

Overview
-------------------------------------------------------------------------------

The purpose of this testbench is to give engineers a sandbox testbench, where
they can check out how to implement and use a processor.

Block design
-------------------------------------------------------------------------------

The block design is based on the test harness with the addition of two AXI4
Stream VIPs from AMD. This testbench does not require the presence of the test
harness, as it can work without it, but since it was created based on the base
design, this was inherited. One of the VIPs is configured as master, while the
other one is configured as slave. The TREADY, TLAST and TKEEP signals are set to
be enabled for the VIPs.

Block diagram
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: ../axis_sequencers/axis_sequencers_tb.svg
:width: 800
:align: center
:alt: Scoreboard/Testbench block diagram

Configuration parameters and modes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are no parameters that can be configured in the testbench configuration
files.

Build parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are no build parameters for this testbench.

Configuration files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As this is a sandbox testbench, engineers are encouraged to change parameters
and see what happens in the simulation. Since there are no parameters available
for edit, the coniguration file's purpose is to give the testbench instance a
name.

Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The following test program file is available:

============ ==============================
Test program Usage
============ ==============================
test_program Creates a basic test stimulus.
============ ==============================

Available configurations & tests combinations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The test program is compatible with the configuration.

Test stimulus
-------------------------------------------------------------------------------

The test program is responsible for configuring and running the sequencers,
while checking the data with a scoreboard. A processor class is implemented that
is used to process data.

Environment Bringup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The steps of the environment bringup are:

* Create the environment
* Start the environment
* Start the clocks
* Assert the resets

Packet processing testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Processing class is implemented which is simple data processor
* Before the resets are asserted, the processor is instantiated
* The processor is connected with the publisher processors
* The master and slave sequencers are configured and then the resets are
asserted
* The scoreboard is subscribed to the master and slave sequencers' publisher
* The scoreboard is started
* The sequencers are started
* Scoreboard waits until the verification is complete

.. warning::

Depending on the packet size and amount, the simulation may end before all of
the data is verified, which may cause runtime errors!

Building the test bench
-------------------------------------------------------------------------------

The testbench is built upon ADI's generic HDL reference design framework.
ADI does not distribute compiled files of these projects so they must be built
from the sources available :git-hdl:`here </>` and :git-testbenches:`here </>`,
with the specified hierarchy described :ref:`build_tb set_up_tb_repo`.
To get the source you must
`clone <https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository>`__
the HDL repository, and then build the project as follows:

**Linux/Cygwin/WSL**

*Example 1*

Building and simulating the testbench using only the command line.

.. shell::
:showuser:

$cd testbenches/ip/packet_processor
$make

*Example 2*

Building and simulating the testbench using the Vivado GUI. This command will
launch Vivado, will run the simulation and display the waveforms.

.. shell::
:showuser:

$cd testbenches/ip/packet_processor
$make MODE=gui

*Example 3*

Build a particular combination of test and configuration, using the Vivado GUI.
This command will launch Vivado, will run the simulation and display the
waveforms.

.. shell::
:showuser:

$cd testbenches/ip/packet_processor
$make MODE=gui CFG=cfg1 TST=test_program

The built project can be found in the ``runs`` folder, where each configuration
specific build has its own folder named after the configuration file's name.
Example: if the following command was run for a single configuration in the
clean folder (no runs folder available):

``make CFG=cfg1``

Then the subfolder under ``runs`` name will be:

``cfg1``

Resources
-------------------------------------------------------------------------------

Testbenches related dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: ../../common/dependency_common.rst

Testbench specific dependencies:

.. list-table::
:widths: 30 45 25
:header-rows: 1

* - SV dependency name
- Source code link
- Documentation link
* - M_AXIS_SEQUENCER
- :git-testbenches:`library/vip/amd/m_axis_sequencer.sv`
- ---
* - PROCESSOR
- :git-testbenches:`library/utilities/packet_processor_pkg.sv`
- ---
* - PUBLISHER-SUBSCRIBER
- :git-testbenches:`library/utilities/pub_sub_pkg.sv`
- ---
* - S_AXIS_SEQUENCER
- :git-testbenches:`library/vip/amd/s_axis_sequencer.sv`
- ---
* - SCOREBOARD
- :git-testbenches:`library/drivers/common/scoreboard.sv`
- ---

.. include:: ../../../common/more_information.rst

.. include:: ../../../common/support.rst
67 changes: 0 additions & 67 deletions library/drivers/common/mailbox.sv

This file was deleted.

Loading