OpenFPGA/docs/source/tutorials/getting_started/shell_shortcuts.rst

55 lines
2.1 KiB
ReStructuredText
Raw Normal View History

OpenFPGA shortcuts
------------------
2022-05-02 13:46:07 -05:00
OpenFPGA provides `bash`/`zsh` shell-based shortcuts to perform all essential functions and navigate through the directories. Go to the OpenFPGA directory and source ``openfpga.sh``
.. code-block:: bash
cd ${OPENFPGA_PATH} && source openfpga.sh
.. note::
2022-05-02 13:46:07 -05:00
The OpenFPGA shortcut works with only a bash-like shell. e.g., `bash`/`zsh`/`fish,` etc.
Shortcut Commands
^^^^^^^^^^^^^^^^^
2022-05-02 13:46:07 -05:00
Once the ``openfpga.sh`` script is sourced, you can run any following commands directly in the terminal.
.. option:: list-tasks
This command lists all the OpenFPGA tasks from the current task directory.
default task directory is considered as ``${OPENFPGA_PATH}/openfpga_flow/tasks``
.. option:: run-task <task_name> **kwarags
2022-05-02 13:46:07 -05:00
This command runs the specified task. The script will first look for the task in the current working directory.
If it is not in the current directory, it will then search in ``TASK_DIRECTORY`` (relative to task directory).
You can also provide a path as a task_name, for example, ``run-task basic_tests/generate_fabric``
The valid arguments listed here <_openfpga_task_args>`_, you can also run `run-task run-task` to get the list of command-line arguments.
.. option:: create-task <task_name> <template>
It creates a template project with the task name in the current directory.
There are two templates currently configurate
- ``vpr_blif``: A template task for running flow with `.blif` file as an input (VPR + Netlist generation)
- ``yosys_vpr``: A template task for running flow with `.v` file as an input (Synthesis + VPR + Netlist generation)
.. option:: run-modelsim
This command runs the verification using ModelSim.
The test benches are generated during the OpenFPGA run.
**Note**: users need to have ``VSIM`` installed and configured
.. option:: run-regression-local
This script runs the regression test locally using the current version of OpenFPGA.
**NOTE** Important before making a pull request to the master
.. option:: unset-openfpga
Unregisters all the shortcuts and commands from the current shell session