Extending ========= .. note:: All classes inherit from ``Project`` (``project.py``). This is a guide on how to add support for a new TOOL. Add support for the new tool ---------------------------- .. code-block:: bash pyfpga/templates/.jinja pyfpga/templates/-prog.jinja pyfpga/.py pyfpga/factory.py # UPDATE pyfpga/helpers/prj2bit.py # UPDATE Add tests and tools mock-ups ---------------------------- .. code-block:: bash tests/test_tools.py # UPDATE tests/regress.sh # UPDATE tests/support.py # UPDATE if exceptions are needed tests/mocks/ Add examples ------------ .. code-block:: bash examples/sources/cons//timing. examples/sources/cons//clk. examples/sources/cons//led. examples/projects/.py examples/helpers/.sh examples/hooks/.py # OPTIONAL Verify the code --------------- Run it at the root of the repo. .. code-block:: bash make docs make lint make test .. tip:: You can simply run ``make`` to perform all the operations. Running ``make clean`` will remove all the generated files. Verify the functionality ------------------------ .. code-block:: bash cd tests python3 support.py --tool Updated the documentation ------------------------- .. code-block:: bash README.md docs/intro.rst docs/tools.rst