Skip to main content

PCI Lane Margining Tool

Project description

PCIe Lane Margining Tool (LMT)

LMT is a standard PCIE margining measurement added by PCI-SIG in the PCIe 4.0 specification. This is required mainly to overcome the challenges in delivering a reliable 16GT/s solution. Lane Margining enables system designers to measure the available margin in a standardized manner.

Key Benefits

  • Works in a production platform without any test equipment
  • Provides a way to measure actual margin when running prod traffic
  • Provides visibility to the details of the defect:
    • exactly which wires/pins are bad
    • exactly how ‘bad’ each wire pair (vs a nominal system)
  • Avoids excessive part swaps triggered by multiple repair actions
  • Provides a reliable way to check if source defect is fixed after repairs

This project is part of ocp-diag-core and exists under the same MIT License Agreement.

Usage

Minimum python version is currently py3.8

The binary can be installed from PyPI ocptv-pci_lmt and can be used directly on a system as such:

> pci_lmt -h
usage: pci_lmt [-h] [-o {json,csv}] [-e ERROR_COUNT_LIMIT] [-d DWELL_TIME] [-a ANNOTATION] [-v] [--version] config_file

Runs Lane Margining Test on PCIe devices.

positional arguments:
  config_file           Path to the configuration file (in JSON format).

optional arguments:
  -h, --help            show this help message and exit
  -o {json,csv}         Output format. Supported formats: json, csv. Default: json
  -e ERROR_COUNT_LIMIT  Maximum errors allowed before terminating the test. Default: 63
  -d DWELL_TIME         Amount of time (in seconds) to wait before making BER measurements. Default: 5
  -a ANNOTATION         Annotation string to be prefix'd for LMT results. Default: <empty>
  -v                    Verbosity level. Use '-v' for INFO and '-vv' for DEBUG. Default: 0
  --version             Print tool version and exit.

Contact

Feel free to start a new discussion, or otherwise post an issue/request.

Developer notes

New code may be committed through features or bugfix branches (eg. fea/cool_new_thing or bugfix/none_in_collector). All PRs must be merged into the dev branch.

Quickest way to setup a dev environment:

# make a venv, see https://docs.python.org/3/library/venv.html
> python3 -m venv env
. ./env/bin/activate

> pip install -r requirements.txt

# [1] then the main script can be run from source
> python src/pci_lmt_bin/main.py --version
main.py 1.1.1

# [2] or alternatively do a local editable install and use it as an executable
# see: https://setuptools.pypa.io/en/latest/userguide/development_mode.html
> pip install -e .
> pci_lmt --version
pci_lmt 1.1.1

Before pushing new commits upstream, please check that your changes pass the linters, formatting, typechecker, etc. All the following checks should pass (and return exit code 0). They are also run in a github action, which safeguards against problematic code.

> black . --check --preview
All done!  🍰 14 files would be left unchanged.

# remove the fixme disable to see the list of TODOs in the codebase
> pylint src tests --disable fixme

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

> mypy src tests --check-untyped-defs
Success: no issues found in 14 source files

# run all unit tests
> find tests -type f -name "test_*.py" | xargs testslide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocptv-pci_lmt-1.3.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocptv_pci_lmt-1.3.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file ocptv-pci_lmt-1.3.0.tar.gz.

File metadata

  • Download URL: ocptv-pci_lmt-1.3.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for ocptv-pci_lmt-1.3.0.tar.gz
Algorithm Hash digest
SHA256 5c6884eda6aa7f2c4c1d446221228d4bec041c17c29ffc625340cfac6ac37f1c
MD5 ab5204d71bd56f19317359a152090a47
BLAKE2b-256 894b779b59783d3cec8d289a94361c913ab1b76249afbdf3c8d41ecd0876eaa4

See more details on using hashes here.

File details

Details for the file ocptv_pci_lmt-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ocptv_pci_lmt-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for ocptv_pci_lmt-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35888af4eaa9e54b275cb7a823dcbea6e256c3a94df7dfb490e08a3c8763c8d2
MD5 58419faa3b22f6d81af9691b4e7ad43c
BLAKE2b-256 33eda5e3b331c82f0cf00a7c67b530ed2ba721e59da583b1aca1ae9cdb973862

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page