From b2c7c587fbe5eaed0d5b02d49073491d8d7461a9 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 26 May 2022 11:42:34 +0200 Subject: [PATCH 1/2] docs: s/INSTALL_DIR/F4PGA_INSTALL_DIR/ Signed-off-by: Unai Martinez-Corral --- docs/building-examples.rst | 16 ++++++++-------- docs/getting.rst | 12 ++++++------ docs/personal-designs.rst | 2 +- .../button_controller/README.rst | 10 ++++------ xc7/litex_demo/README.rst | 2 +- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/docs/building-examples.rst b/docs/building-examples.rst index 6f24185..1878b8d 100644 --- a/docs/building-examples.rst +++ b/docs/building-examples.rst @@ -9,7 +9,7 @@ set it to earlier, for example: .. code-block:: bash :name: export-install-dir - export INSTALL_DIR=~/opt/f4pga + export F4PGA_INSTALL_DIR=~/opt/f4pga Select your FPGA family: @@ -39,22 +39,22 @@ Next, prepare the environment: .. code-block:: bash :name: conda-prep-env-xc7 - export PATH="$INSTALL_DIR/$FPGA_FAM/install/bin:$PATH"; - source "$INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" + export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/install/bin:$PATH"; + source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" .. group-tab:: EOS S3 .. code-block:: bash :name: conda-prep-env-eos-s3 - export PATH="$INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin:$PATH"; - source "$INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" + export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin:$PATH"; + source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" .. code-block:: bash :name: f4pga-env-bin - export F4PGA_ENV_BIN="$INSTALL_DIR/$FPGA_FAM/conda/bin" + export F4PGA_ENV_BIN="$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/bin" .. tabs:: @@ -64,14 +64,14 @@ Next, prepare the environment: .. code-block:: bash :name: f4pga-env-share-xc7 - export F4PGA_ENV_SHARE="$INSTALL_DIR/$FPGA_FAM/install/share/symbiflow" + export F4PGA_ENV_SHARE="$F4PGA_INSTALL_DIR/$FPGA_FAM/install/share/symbiflow" .. group-tab:: EOS S3 .. code-block:: bash :name: f4pga-env-share-ql - export F4PGA_ENV_SHARE="$INSTALL_DIR/$FPGA_FAM/share" + export F4PGA_ENV_SHARE="$F4PGA_INSTALL_DIR/$FPGA_FAM/share" Finally, enter your working Conda environment: diff --git a/docs/getting.rst b/docs/getting.rst index daf6ba7..06c022d 100644 --- a/docs/getting.rst +++ b/docs/getting.rst @@ -84,7 +84,7 @@ and so you will need to add some ``sudo`` commands to the instructions below. .. code-block:: bash :name: conda-install-dir - export INSTALL_DIR=~/opt/f4pga + export F4PGA_INSTALL_DIR=~/opt/f4pga Setup and download assets ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -112,8 +112,8 @@ Next, setup Conda and your system's environment: .. code-block:: bash :name: conda-setup - bash conda_installer.sh -u -b -p $INSTALL_DIR/$FPGA_FAM/conda; - source "$INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh"; + bash conda_installer.sh -u -b -p $F4PGA_INSTALL_DIR/$FPGA_FAM/conda; + source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh"; conda env create -f $FPGA_FAM/environment.yml Download architecture definitions: @@ -129,13 +129,13 @@ Download architecture definitions: .. code-block:: bash :name: download-arch-def-xc7 - mkdir -p $INSTALL_DIR/xc7/install + mkdir -p $F4PGA_INSTALL_DIR/xc7/install F4PGA_TIMESTAMP='20220523-230829' F4PGA_HASH='934b12d' for PKG in install xc7a50t_test xc7a100t_test xc7a200t_test xc7z010_test; do - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${F4PGA_TIMESTAMP}/symbiflow-arch-defs-${PKG}-${F4PGA_HASH}.tar.xz | tar -xJC $INSTALL_DIR/${FPGA_FAM}/install + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${F4PGA_TIMESTAMP}/symbiflow-arch-defs-${PKG}-${F4PGA_HASH}.tar.xz | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install done .. group-tab:: EOS-S3 @@ -143,7 +143,7 @@ Download architecture definitions: .. code-block:: bash :name: download-arch-def-eos-s3 - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-install/quicklogic-arch-defs-d6d05185.tar.gz | tar -xzC $INSTALL_DIR/$FPGA_FAM/ + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-install/quicklogic-arch-defs-d6d05185.tar.gz | tar -xzC $F4PGA_INSTALL_DIR/$FPGA_FAM/ If the above commands exited without errors, you have successfully installed and configured your working environment. diff --git a/docs/personal-designs.rst b/docs/personal-designs.rst index 17d5fbe..e93888b 100644 --- a/docs/personal-designs.rst +++ b/docs/personal-designs.rst @@ -120,7 +120,7 @@ name you used for your top level module: .. code-block:: bash - openocd -f ${INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" + openocd -f ${F4PGA_INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" .. tip:: diff --git a/xc7/additional_examples/button_controller/README.rst b/xc7/additional_examples/button_controller/README.rst index 5ed8bc0..92ede59 100644 --- a/xc7/additional_examples/button_controller/README.rst +++ b/xc7/additional_examples/button_controller/README.rst @@ -3,8 +3,8 @@ Button Controller This example demonstrates using a button debouncer state machine to count the number of presses on the center button of the basys3 board. The number of presses counted by the debouncer state machine will -be given on the two right most digits of the display. The two left most digits record the number of -presses counted without the debouncer. You can reset the button counter by pressing the up button on +be given on the two right most digits of the display. The two left most digits record the number of +presses counted without the debouncer. You can reset the button counter by pressing the up button on the board. To build the design first navigate to the additional examples directory: .. code-block:: bash @@ -12,7 +12,7 @@ the board. To build the design first navigate to the additional examples directo cd additional_examples -Then run make to compile the design: +Then run make to compile the design: .. code-block:: bash :name: example-debouncer-basys3 @@ -30,12 +30,10 @@ Now, you can upload the design with: .. code-block:: bash - openocd -f ${INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" + openocd -f ${F4PGA_INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" The following is an example of the debouncer in action: .. image:: ../images/debounce.gif :align: center :width: 50% - - diff --git a/xc7/litex_demo/README.rst b/xc7/litex_demo/README.rst index 62f7f63..92ec3a4 100644 --- a/xc7/litex_demo/README.rst +++ b/xc7/litex_demo/README.rst @@ -52,7 +52,7 @@ Now you can upload the design with: .. code-block:: bash - openocd -f ${INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" + openocd -f ${F4PGA_INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" .. note:: From 18f067bf61ed96a69022ff80fdddfa751fa121c1 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 26 May 2022 11:54:04 +0200 Subject: [PATCH 2/2] docs/building-examples: defining F4PGA_ENV_* envvars explicitly is not required anymore (chipsalliance/f4pga#566) Signed-off-by: Unai Martinez-Corral --- docs/building-examples.rst | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/docs/building-examples.rst b/docs/building-examples.rst index 1878b8d..e6886ee 100644 --- a/docs/building-examples.rst +++ b/docs/building-examples.rst @@ -31,7 +31,6 @@ Select your FPGA family: Next, prepare the environment: - .. tabs:: .. group-tab:: Artix-7 @@ -50,30 +49,6 @@ Next, prepare the environment: export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin:$PATH"; source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" - -.. code-block:: bash - :name: f4pga-env-bin - - export F4PGA_ENV_BIN="$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/bin" - - -.. tabs:: - - .. group-tab:: AMD/Xilinx Series 7 - - .. code-block:: bash - :name: f4pga-env-share-xc7 - - export F4PGA_ENV_SHARE="$F4PGA_INSTALL_DIR/$FPGA_FAM/install/share/symbiflow" - - .. group-tab:: EOS S3 - - .. code-block:: bash - :name: f4pga-env-share-ql - - export F4PGA_ENV_SHARE="$F4PGA_INSTALL_DIR/$FPGA_FAM/share" - - Finally, enter your working Conda environment: .. code-block:: bash