{ "info": { "author": "Jeroen van Straten", "author_email": "j.vanstraten-1@tudelft.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "\nvhdeps: a VHDL file dependency analyzer and test runner\n=======================================================\n\n[![PyPi](https://badgen.net/pypi/v/vhdeps)](https://pypi.org/project/vhdeps/)\n[![Build Status](https://dev.azure.com/abs-tudelft/vhdeps/_apis/build/status/abs-tudelft.vhdeps?branchName=master)](https://dev.azure.com/abs-tudelft/vhdeps/_build/latest?definitionId=4&branchName=master)\n[![codecov](https://codecov.io/gh/abs-tudelft/vhdeps/branch/master/graph/badge.svg)](https://codecov.io/gh/abs-tudelft/vhdeps)\n![Linux](https://badgen.net/badge/os/Linux)\n![MacOS](https://badgen.net/badge/os/MacOS)\n[![License](https://badgen.net/github/license/abs-tudelft/vhdeps)](https://github.com/abs-tudelft/vhdeps/blob/master/LICENSE)\n\nWhatever tool you use, testing VHDL code has always been a pain. With most\ntools you have to write TCL scripts for compilation, requiring you to copypaste\nall the paths of the files your test case depends on... eventually leading you\nto just include everything despite the additional compilation time. Automated\ntesting for CI requires yet more TCL scripting, or is outright not possible due\nto licensing or the tools being primarily GUI-oriented. Not to mention doing\nall this for more than two or three integration tests, unit tests be damned.\nDon't even start about code coverage.\n\n`vhdeps` aims to change this, at least for a common subset of problems. With\nit, running your test suite is as simple as going to your project's root\ndirectory and running `vhdeps ghdl`, `vhdeps vsim`, or whatever other target\nthat may be added in the future. As it should be!\n\n\nInstallation\n------------\n\n`vhdeps` is a Python package. To install it, simply run:\n\n sudo pip3 install vhdeps\n\nYou can of course install it to a venv or your home directory as well if you\nprefer, as long as you make sure you add the `bin` folder to your system path,\nor call `vhdeps` using `python3 -m vhdeps`.\n\nWe have only tested `vhdeps` on Linux and MacOS thus far, but there should not\nbe any fundamental issues with making it work on Windows as well.\n\nInstalling `vhdeps` this way takes care of all its Python dependencies, but\ndoes not install [`ghdl`](https://github.com/ghdl/ghdl) or a `vsim`-compatible\nsimulator (like Modelsim) for you.\n\nTo use the code coverage features of the GHDL target, you must get yourself a\nGHDL build that uses the [GCC backend](https://ghdl.readthedocs.io/en/latest/building/gcc/),\nand install [`lcov`](http://ltp.sourceforge.net/coverage/lcov.php) in addition\nif you want the fancier output formats.\n\nOnce you have that, try the [vhlib](https://github.com/abs-tudelft/vhlib)\nrepository to see `vhdeps` in action.\n\n\nTargets\n-------\n\nAfter `vhdeps` determines the compile order for your project, it passes it to a\nso-called target of your choosing. Currently, the following targets are\navailable.\n\n### `dump`\n\nThis target simply dumps the compile order in a format that should be easy\nto read using whatever script you may devise on your own. It does not require\nany non-Python tools.\n\n $ vhdeps dump StreamBuffer -o order\n Including the current working directory recursively by default...\n\n $ cat order\n dep work 2008 /path/to/vhlib/stream/StreamSlice.vhd\n dep work 2008 /path/to/vhlib/util/UtilRam1R1W.vhd\n dep work 2008 /path/to/vhlib/stream/StreamFIFOCounter.vhd\n dep work 2008 /path/to/vhlib/util/UtilRam_pkg.vhd\n dep work 2008 /path/to/vhlib/util/UtilInt_pkg.vhd\n dep work 2008 /path/to/vhlib/stream/Stream_pkg.vhd\n dep work 2008 /path/to/vhlib/stream/StreamFIFO.vhd\n top work 2008 /path/to/vhlib/stream/StreamBuffer.vhd\n\n### `ghdl`\n\nThis target runs the test cases detected in the compile order using GHDL. For\nexample:\n\n $ vhdeps ghdl StreamBuffer_*_tc\n ...\n Summary:\n * PASSED work.streambuffer_0_tc\n * PASSED work.streambuffer_200_tc\n * PASSED work.streambuffer_2_tc\n * PASSED work.streambuffer_4_tc\n * PASSED work.streambuffer_6_tc\n Test suite PASSED\n\nHere's some of the features this target supports:\n\n - Runs in a temporary directory by default, preventing `.cf` or object files\n from appearing all over the place.\n - Supports parallel elaboration and execution (parallel analysis is\n [not supported by GHDL](https://github.com/ghdl/ghdl/issues/829)).\n - Can output VCD files for all test cases to a directory of your choosing.\n - Can automatically open `gtkwave` for you to view the waveform(s).\n - If GHDL is built with the [GCC backend](https://ghdl.readthedocs.io/en/latest/building/gcc/),\n it can generate coverage information for you, all the way to user-friendly\n HTML output.\n\n### `vsim`\n\nThis target runs the test suite in Modelsim or Questasim, either in GUI or\nbatch mode, or simply outputs an appropriate `.do` file for you. Here's an\nexample of what it all looks like:\n\n $ vhdeps vsim StreamBuffer_*_tc\n ...\n # Summary:\n * PASSED work.streambuffer_0_tc\n * PASSED work.streambuffer_200_tc\n * PASSED work.streambuffer_2_tc\n * PASSED work.streambuffer_4_tc\n * PASSED work.streambuffer_6_tc\n Test suite PASSED\n\n $ vhdeps vsim StreamBuffer_0_tc --gui\n ...\n\n(after zooming in to the waveforms only:)\n\n![Modelsim screenshot](/.assets/modelsim.png?raw=true)\n\nThe TCL script supports the following, among other things:\n\n - Incremental recompilation and rerunning in the GUI through the `rerun`\n command.\n - `rerun` maintains your waveform view configuration (zoom level, signals,\n etc.).\n - By default, all signals in the toplevel test case entity and all its\n immediate instantiations are added to the waveform view, and all signals in\n the design are logged. Inputs are colored blue, outputs are colored yellow,\n and internal signals are colored white to improve readability. This behavior\n can be overridden with `--pragma vhdeps vsim wave-config-tcl ` and\n `--pragma vhdeps vsim no-log-all` pragmas in the test case file if desired.\n - When there are multiple test cases, the script executes all of them\n initially without displaying any waveforms. You can then run `debug`\n to run (one of) the failing test case(s) with waveforms enabled to\n debug it.\n - Automatic GUI vs. batch mode detection. In batch mode, Modelsim\n automatically exits with 0 or 1 depending on the result of the test suite.\n\nThe script is only tested in Modelsim and Questasim so far, and requires some\nrather magical constructs to make signal coloring and restoring the waveform\nview work properly. Your mileage may vary with other vsim-compatible tools\nsuch as Riviera.\n\n### (your target here?)\n\nIt's easy to add a new target to `vhdeps`. Simply look for its install\ndirectory (or clone this repository and install it using `setup.py`) and add\na file to the `vhdeps/target` directory. `vhdeps` automagically detects the\navailable targets, so there's no need to add your target to any kind of index.\n\nAPI documentation is still somewhat lacking, however. Then again, it shouldn't\nbe *too* difficult to figure it out from the docstrings and existing targets.\n\n\nVHDL code requirements\n----------------------\n\n`vhdeps` is currently quite simplistic in its VHDL parsing -- it just uses\nregular expressions to match entity, component, and package declarations, uses,\nand definitions and works from there -- but it should be enough for most use\ncases. Some known limitations are listed [here](https://github.com/abs-tudelft/vhdeps/issues/6).\n\nBy default, `vhdeps` detects test cases by looking for toplevel entities that\nend in `_tc`. This is intentionally different from the industry-standard `_tb`,\nbecause test benches are rarely built to check themselves and self-terminate\nin practice, which would just lead to timeouts. You can of course adjust this\nbehavior using command-line options. Currently, `vhdeps`\n[does not support](https://github.com/abs-tudelft/vhdeps/issues/4) defining\nmultiple test case entities in a single file, but it should be able to handle\nthis just fine for design files.\n\nBy self-terminating, we mean that it either terminates by event exhausting\nto indicate success (usually, this means stopping the clock), or through a\n`severity failure` report or assertion statement to indicate failure. If a\ntest case does not terminate within a specified timeout, the test case is also\nconsidered to have failed. This timeout is specified in the test case file\nusing a pragma, like this:\n\n -- pragma simulation timeout 10 ms\n\nThe timeout arbitrarily defaults to 1 ms if it is not specified.\n\n`vhdeps` can handle input from different VHDL versions within a single run (as\nlong as the target supports this as well) and can distinguish between\nsimulation-only, synthesis-only, and universal source files. It does this based\non tags specified in the VHDL filenames:\n\n - Filenames matching `*..*`, where `` is a two-digit VHDL\n version code (93, 08, and so on), are compatible with the specified version.\n Multiple version tags can be chained for files that are compatible with\n multiple versions. If no version tag is present, the file is assumed to be\n compatible with all versions.\n - Filenames matching `*.syn.*` are synthesis-only.\n - Filenames matching `*.sim.*` are simulation-only.\n\nYou can even have both a VHDL-93 and a VHDL-2008 file for a single design unit;\n`vhdeps` will automatically disambiguate based on a desired or required VHDL\nversion that you specify on the command line.\n\n\nMiscellaneous features\n----------------------\n\n### Black box detection\n\nMost tools are, annoyingly, perfectly okay with black boxes by default (black\nboxes are component instantiations that don't resolve to any previously\ncompiled entity, in case you're not aware). `vhdeps` isn't: by default, it will\nrefuse to output a compile order for you if your design has black boxes. You\ncan override this behavior by including the files that contain the black box\ncomponent definitions with the `-x` flag instead of `-i`, which may be useful\nfor getting the compile order for projects that use vendor primitives.\n\n### Style checking\n\nIn addition to the rules above, `vhdeps` can enforce some additional rules for\nyou if you like by including VHDL files \"strictly\" (`-I` instead of `-i`).\nThese rules are:\n\n - Each VHDL file must define exactly one entity or exactly one package.\n - VHDL package names must use the `_pkg` suffix.\n - The filename must match the name of the VHDL entity/package.\n\n\nContributing\n------------\n\nPull requests are welcome. Before opening a PR, check that all tests succeed\n(or are skipped due to missing dependencies, if they're not relevant to your\nPR) and that pylint is happy:\n\n $ ./setup.py test\n ...\n OK (SKIP=...)\n\n $ ./setup.py lint\n ...\n Your code has been rated at 10.00/10\n\nYou can check your code coverage offline as follows:\n\n $ coverage html\n $ xdg-open htmlcov/index.html\n\nOnce you open your PR, Azure will also check it for you.\n\nWe strive to use [GitHub flow](https://help.github.com/en/articles/github-flow).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abs-tudelft/vhdeps", "keywords": "vhdl dependency analyzer simulation", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "vhdeps", "package_url": "https://pypi.org/project/vhdeps/", "platform": "", "project_url": "https://pypi.org/project/vhdeps/", "project_urls": { "Homepage": "https://github.com/abs-tudelft/vhdeps", "Source": "https://github.com/abs-tudelft/vhdeps" }, "release_url": "https://pypi.org/project/vhdeps/0.4.2/", "requires_dist": [ "lcov-cobertura", "plumbum" ], "requires_python": ">=3", "summary": "VHDL dependency analyzer and simulation driver.", "version": "0.4.2", "yanked": false, "yanked_reason": null }, "last_serial": 6028267, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "771b8df595c7027af0d6350a2e8b2f37", "sha256": "610261988f2dabb49ffa7b1d5fffb954a11f7ce81db37007d4cb5b97c58dfb3c" }, "downloads": -1, "filename": "vhdeps-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "771b8df595c7027af0d6350a2e8b2f37", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 18688, "upload_time": "2019-06-04T14:54:54", "upload_time_iso_8601": "2019-06-04T14:54:54.722686Z", "url": "https://files.pythonhosted.org/packages/8c/3b/4d46f577c43b13e53af035711e53a2374b52afb1fc4c7db67cb45d6cb102/vhdeps-0.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5e6a1bfd67cdb191f9dd41f9d17ea692", "sha256": "a2e027cd36ea5bdbe9b0fd13fd6ad14b346f16a95f2f7f1c9aba481c364f7527" }, "downloads": -1, "filename": "vhdeps-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5e6a1bfd67cdb191f9dd41f9d17ea692", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 18908, "upload_time": "2019-06-06T12:17:33", "upload_time_iso_8601": "2019-06-06T12:17:33.328025Z", "url": "https://files.pythonhosted.org/packages/7d/b3/0f3c52134dfec1e905d79bb0ab011d1a1c1da567962e78e0f172bb3f9bb2/vhdeps-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "18f82c4c238bba1652d37e56ec624acd", "sha256": "e513a4bdca1a73d0aa206ab52bb315e558414370bde2de73b58bae8ca6181be2" }, "downloads": -1, "filename": "vhdeps-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "18f82c4c238bba1652d37e56ec624acd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25000, "upload_time": "2019-06-17T13:35:45", "upload_time_iso_8601": "2019-06-17T13:35:45.948148Z", "url": "https://files.pythonhosted.org/packages/05/67/c1ed8c26985bab63f978f05d65e81904cab4c3407616cd161806405f6bfa/vhdeps-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "03d9aa95e74cd0932f3d6c7ec92a51db", "sha256": "73a10836cf47c20af6db60ba9743c9d1758e31266342449fd27ca75ea41abb54" }, "downloads": -1, "filename": "vhdeps-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "03d9aa95e74cd0932f3d6c7ec92a51db", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25527, "upload_time": "2019-06-19T09:22:04", "upload_time_iso_8601": "2019-06-19T09:22:04.799454Z", "url": "https://files.pythonhosted.org/packages/db/8d/7f90ad435f9e0580d78009489851fb3c42f51a5a57e1e41f20b9c39d538a/vhdeps-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "e1d9089965f15bdc6e5c668baafc627b", "sha256": "27fb02cb37fee3b70865086a6c0ceeb8042e2d7b668ccfa389884a33433634b7" }, "downloads": -1, "filename": "vhdeps-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e1d9089965f15bdc6e5c668baafc627b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 33531, "upload_time": "2019-06-21T11:01:41", "upload_time_iso_8601": "2019-06-21T11:01:41.639925Z", "url": "https://files.pythonhosted.org/packages/65/ee/400ecd13d76d053ba6fb3a47484be2621fe3e1b9404612513b4d57b68967/vhdeps-0.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "71184e61ab6540f3cf28433d5986ba64", "sha256": "80e27695075e1539d04343616e1cee378a324c7caf812df79f84e4788925fb5f" }, "downloads": -1, "filename": "vhdeps-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "71184e61ab6540f3cf28433d5986ba64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 33612, "upload_time": "2019-06-21T11:40:24", "upload_time_iso_8601": "2019-06-21T11:40:24.740030Z", "url": "https://files.pythonhosted.org/packages/fc/e0/e04edcee2a5dd8ee051e37039fe9ab7e6c4a338a27734d722d07455963a6/vhdeps-0.1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "fe2d08db416fbb66aec50ec6a00df37d", "sha256": "862f40cd164238764bbdb8a25f7915f6f4f53806cd58a84512720d9dd26bc61a" }, "downloads": -1, "filename": "vhdeps-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fe2d08db416fbb66aec50ec6a00df37d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 33793, "upload_time": "2019-07-03T09:01:46", "upload_time_iso_8601": "2019-07-03T09:01:46.087894Z", "url": "https://files.pythonhosted.org/packages/c3/cc/8ae4d600faca4c21d4621f90591b759d6dcceece6308614cd3393a8935c1/vhdeps-0.1.2-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "39cfff262058abb9d5825fe83cbeaee4", "sha256": "1ab76099712f9ef163d001a71c6856c13fb53cf32f176cf68ee29fa8a5ccac99" }, "downloads": -1, "filename": "vhdeps-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "39cfff262058abb9d5825fe83cbeaee4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 42898, "upload_time": "2019-07-18T15:27:00", "upload_time_iso_8601": "2019-07-18T15:27:00.528157Z", "url": "https://files.pythonhosted.org/packages/ef/7f/f3dd3cc7774e29ae72e35d7ba11d4e4f234c6169127a800feb28fd7ad7ac/vhdeps-0.2.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "da817f67894a8fc5ec8717ac8346baab", "sha256": "060a03300d07bfd94fdb950086b6ab53db3a0db7e1fc7d800c256ec1f0df2803" }, "downloads": -1, "filename": "vhdeps-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "da817f67894a8fc5ec8717ac8346baab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43067, "upload_time": "2019-09-10T09:51:20", "upload_time_iso_8601": "2019-09-10T09:51:20.342118Z", "url": "https://files.pythonhosted.org/packages/6f/e3/91269245bd0ea6aeb7447662bd5f61ca34ebf87e39f70016606a52d3bdbc/vhdeps-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "b0e94e938a761197a179ad338e9b3e0d", "sha256": "d180ff5b6946bbdd6ec3b477939635dc09a622370731583cd47b9701c6454633" }, "downloads": -1, "filename": "vhdeps-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b0e94e938a761197a179ad338e9b3e0d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43177, "upload_time": "2019-09-26T18:57:56", "upload_time_iso_8601": "2019-09-26T18:57:56.059377Z", "url": "https://files.pythonhosted.org/packages/94/a5/a06daaa2f3db16343f79cc743ff77ceed0f4dc973526445e97dd9dbee856/vhdeps-0.4.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "f1a78ab18f37daf7c86c959ddadcaaf1", "sha256": "411b5f3cfe3d225aad77a8fc28ea8762ffffde4dad7eb28eb93b14339e664c0d" }, "downloads": -1, "filename": "vhdeps-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f1a78ab18f37daf7c86c959ddadcaaf1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43178, "upload_time": "2019-09-26T19:20:27", "upload_time_iso_8601": "2019-09-26T19:20:27.329462Z", "url": "https://files.pythonhosted.org/packages/c2/60/84cbce0ad20b14e9d023f715cc0ed7a4c821184a0e8bbe3dda16e74b69a8/vhdeps-0.4.1-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "f5492bbe192a62353b95f88a8e791409", "sha256": "b36b34018a4c7eb386539c194c26d63e8f324b983ba2e3c1f4dc7dcb5eac38ca" }, "downloads": -1, "filename": "vhdeps-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f5492bbe192a62353b95f88a8e791409", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43323, "upload_time": "2019-10-25T08:39:38", "upload_time_iso_8601": "2019-10-25T08:39:38.550655Z", "url": "https://files.pythonhosted.org/packages/ae/6b/fa1dfac6a443a4a2cc04c13fa36b1d5f4fb8a5a1ab5b9d2480bf5ed28c59/vhdeps-0.4.2-py3-none-any.whl", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5492bbe192a62353b95f88a8e791409", "sha256": "b36b34018a4c7eb386539c194c26d63e8f324b983ba2e3c1f4dc7dcb5eac38ca" }, "downloads": -1, "filename": "vhdeps-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f5492bbe192a62353b95f88a8e791409", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 43323, "upload_time": "2019-10-25T08:39:38", "upload_time_iso_8601": "2019-10-25T08:39:38.550655Z", "url": "https://files.pythonhosted.org/packages/ae/6b/fa1dfac6a443a4a2cc04c13fa36b1d5f4fb8a5a1ab5b9d2480bf5ed28c59/vhdeps-0.4.2-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }