{"id":18875265,"url":"https://github.com/opencomputeproject/ocp-diag-pci_lmt","last_synced_at":"2025-04-14T17:31:21.128Z","repository":{"id":193103535,"uuid":"686103126","full_name":"opencomputeproject/ocp-diag-pci_lmt","owner":"opencomputeproject","description":"PCIe Lane Margining Tool (LMT)","archived":false,"fork":false,"pushed_at":"2024-09-19T16:30:38.000Z","size":119,"stargazers_count":16,"open_issues_count":4,"forks_count":5,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2024-09-19T16:47:59.150Z","etag":null,"topics":["lmt","pci","pcie"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencomputeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-01T18:48:50.000Z","updated_at":"2024-09-04T15:10:16.000Z","dependencies_parsed_at":"2024-02-03T06:30:14.908Z","dependency_job_id":"6e9c21d8-d53b-401c-8a91-2672fec15ab0","html_url":"https://github.com/opencomputeproject/ocp-diag-pci_lmt","commit_stats":null,"previous_names":["opencomputeproject/ocp-diag-pci_lmt"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-pci_lmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-pci_lmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-pci_lmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-pci_lmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomputeproject","download_url":"https://codeload.github.com/opencomputeproject/ocp-diag-pci_lmt/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639402,"owners_count":17177816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lmt","pci","pcie"],"created_at":"2024-11-08T06:06:45.893Z","updated_at":"2024-11-08T06:06:46.461Z","avatar_url":"https://github.com/opencomputeproject.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PCIe Lane Margining Tool (LMT)\nLMT is a standard PCIE margining measurement added by PCI-SIG in the PCIe 4.0 specification.\nThis is required mainly to overcome the challenges in delivering a reliable 16GT/s solution.\nLane Margining enables system designers to measure the available margin in a standardized manner.\n\n# Key Benefits\n- Works in a production platform without any test equipment\n- Provides a way to measure actual margin when running prod traffic\n- Provides visibility to the details of the defect:\n    - exactly which wires/pins are bad\n    - exactly how ‘bad’ each wire pair (vs a nominal system)\n- Avoids excessive part swaps triggered by multiple repair actions\n- Provides a reliable way to check if source defect is fixed after repairs\n\nThis project is part of [ocp-diag-core](https://github.com/opencomputeproject/ocp-diag-core) and exists under the same [MIT License Agreement](https://github.com/opencomputeproject/ocp-diag-pci_lmt/LICENSE).\n\n# Usage\n\n**Minimum python version is currently py3.8**\n\nThe binary can be installed from [`PyPI ocptv-pci_lmt`](https://pypi.org/project/ocptv-pci-lmt/) and can be used directly on a system as such:\n\n```\n\u003e pci_lmt -h\nusage: pci_lmt [-h] [-o {json,csv}] [-e ERROR_COUNT_LIMIT] [-d DWELL_TIME] [-a ANNOTATION] [-v] [--version] config_file\n\nRuns Lane Margining Test on PCIe devices.\n\npositional arguments:\n  config_file           Path to the configuration file (in JSON format).\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o {json,csv}         Output format. Supported formats: json, csv. Default: json\n  -e ERROR_COUNT_LIMIT  Maximum errors allowed before terminating the test. Default: 63\n  -d DWELL_TIME         Amount of time (in seconds) to wait before making BER measurements. Default: 5\n  -a ANNOTATION         Annotation string to be prefix'd for LMT results. Default: \u003cempty\u003e\n  -v                    Verbosity level. Use '-v' for INFO and '-vv' for DEBUG. Default: 0\n  --version             Print tool version and exit.\n```\n\n### Contact\n\nFeel free to start a new [discussion](https://github.com/opencomputeproject/ocp-diag-pci_lmt/discussions), or otherwise post an [issue/request](https://github.com/opencomputeproject/ocp-diag-pci_lmt/issues).\n\n# Developer notes\n\nNew 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.\n\nQuickest way to setup a dev environment:\n```bash\n# make a venv, see https://docs.python.org/3/library/venv.html\n\u003e python3 -m venv env\n. ./env/bin/activate\n\n\u003e pip install -r requirements.txt\n\n# [1] then the main script can be run from source\n\u003e python src/pci_lmt_bin/main.py --version\nmain.py 1.1.1\n\n# [2] or alternatively do a local editable install and use it as an executable\n# see: https://setuptools.pypa.io/en/latest/userguide/development_mode.html\n\u003e pip install -e .\n\u003e pci_lmt --version\npci_lmt 1.1.1\n```\n\nBefore pushing new commits upstream, please check that your changes pass the linters, formatting, typechecker, etc.\nAll the following checks should pass (and return exit code 0). They are also run in a github action, which safeguards against problematic code.\n\n```bash\n\u003e black . --check --preview\nAll done! ✨ 🍰 ✨\n14 files would be left unchanged.\n\n# remove the fixme disable to see the list of TODOs in the codebase\n\u003e pylint src tests --disable fixme\n\n--------------------------------------------------------------------\nYour code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)\n\n\u003e mypy src tests --check-untyped-defs\nSuccess: no issues found in 14 source files\n\n# run all unit tests\n\u003e find tests -type f -name \"test_*.py\" | xargs testslide\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-diag-pci_lmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomputeproject%2Focp-diag-pci_lmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-diag-pci_lmt/lists"}