From 5083c611664cfbdd223c02b04bdb89282f0275e6 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 24 May 2022 15:16:52 +0200 Subject: [PATCH 1/3] docs/getting: use variables F4PGA_TIMESTAMP and F4PGA_HASH Signed-off-by: Unai Martinez-Corral --- docs/getting.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/getting.rst b/docs/getting.rst index e59cd13..e2368f9 100644 --- a/docs/getting.rst +++ b/docs/getting.rst @@ -131,8 +131,11 @@ Download architecture definitions: mkdir -p $INSTALL_DIR/xc7/install + F4PGA_TIMESTAMP='20220406-185509' + F4PGA_HASH='3ef4188' + 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/20220406-185509/symbiflow-arch-defs-${PKG}-3ef4188.tar.xz | tar -xJC $INSTALL_DIR/xc7/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 $INSTALL_DIR/${FPGA_FAM}/install done .. group-tab:: EOS-S3 From f801f7d2c73fc1aa2539d6fb8f6e76a4b956634e Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 24 May 2022 15:19:55 +0200 Subject: [PATCH 2/3] docs/getting: update arch-defs packages for xc7 Signed-off-by: Unai Martinez-Corral --- docs/getting.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting.rst b/docs/getting.rst index e2368f9..9814f2c 100644 --- a/docs/getting.rst +++ b/docs/getting.rst @@ -131,8 +131,8 @@ Download architecture definitions: mkdir -p $INSTALL_DIR/xc7/install - F4PGA_TIMESTAMP='20220406-185509' - F4PGA_HASH='3ef4188' + 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 From 543a16a1af4e386a932339821729d1a0ff1ea401 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 24 May 2022 13:13:05 +0200 Subject: [PATCH 3/3] install f4pga through pip and use envvars to support deprecated wrappers Signed-off-by: Unai Martinez-Corral --- .github/scripts/build-examples.sh | 3 ++- docs/building-examples.rst | 25 +++++++++++++++++++++++++ docs/getting.rst | 2 +- xc7/requirements.txt | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/scripts/build-examples.sh b/.github/scripts/build-examples.sh index dcbf383..41cc3c0 100755 --- a/.github/scripts/build-examples.sh +++ b/.github/scripts/build-examples.sh @@ -52,8 +52,9 @@ elif [ "$fpga_family" == "eos-s3" -a -z "$examples" ]; then examples="counter" fi + # activate conda and enter example dir -activate_env="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,conda-act-env" +activate_env="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,f4pga-env-bin,f4pga-env-share-$fpga_family,conda-act-env" snippets="${activate_env},enter-dir-$fpga_family" additionalDesigns="${activate_env},enter-dir-$fpga_family" diff --git a/docs/building-examples.rst b/docs/building-examples.rst index d284094..6f24185 100644 --- a/docs/building-examples.rst +++ b/docs/building-examples.rst @@ -31,6 +31,7 @@ Select your FPGA family: Next, prepare the environment: + .. tabs:: .. group-tab:: Artix-7 @@ -49,6 +50,30 @@ Next, prepare the environment: export PATH="$INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin:$PATH"; source "$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" + + +.. tabs:: + + .. group-tab:: AMD/Xilinx Series 7 + + .. code-block:: bash + :name: f4pga-env-share-xc7 + + export F4PGA_ENV_SHARE="$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" + + Finally, enter your working Conda environment: .. code-block:: bash diff --git a/docs/getting.rst b/docs/getting.rst index 9814f2c..daf6ba7 100644 --- a/docs/getting.rst +++ b/docs/getting.rst @@ -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/eos-s3/ + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-install/quicklogic-arch-defs-d6d05185.tar.gz | tar -xzC $INSTALL_DIR/$FPGA_FAM/ If the above commands exited without errors, you have successfully installed and configured your working environment. diff --git a/xc7/requirements.txt b/xc7/requirements.txt index d97e601..65ea7dc 100644 --- a/xc7/requirements.txt +++ b/xc7/requirements.txt @@ -14,6 +14,7 @@ sympy textx yapf==0.24.0 python-constraint +https://github.com/chipsalliance/f4pga/archive/main.zip#subdirectory=f4pga fasm git+https://github.com/SymbiFlow/prjxray.git@e25c20a8f158cc5e94eb62e3b74e16fc9d6c1d26#egg=prjxray git+https://github.com/symbiflow/xc-fasm.git@14afc2bae24cbf6ee5e7d057a58b4cbd776358d0#egg=xc-fasm