diff --git a/.github/scripts/activate.sh b/.github/scripts/activate.sh index a15fb66..13782a1 100755 --- a/.github/scripts/activate.sh +++ b/.github/scripts/activate.sh @@ -18,14 +18,14 @@ set -e -F4PGA_FAM=${F4PGA_FAM:=xc7} +FPGA_FAM=${FPGA_FAM:=xc7} -case "$F4PGA_FAM" in +case "$FPGA_FAM" in xc7) F4PGA_DIR_ROOT='install';; eos-s3) F4PGA_DIR_ROOT='quicklogic-arch-defs';; esac -export PATH="$F4PGA_INSTALL_DIR/$F4PGA_FAM/$F4PGA_DIR_ROOT/bin:$PATH" -source "$F4PGA_INSTALL_DIR/$F4PGA_FAM/conda/etc/profile.d/conda.sh" +export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/$F4PGA_DIR_ROOT/bin:$PATH" +source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh" -conda activate $F4PGA_FAM +conda activate $FPGA_FAM diff --git a/.github/scripts/prepare_environment.sh b/.github/scripts/prepare_environment.sh index dde65e3..1d26c3e 100755 --- a/.github/scripts/prepare_environment.sh +++ b/.github/scripts/prepare_environment.sh @@ -28,12 +28,12 @@ cd f4pga-examples echo '::endgroup::' -F4PGA_FAM=${F4PGA_FAM:=xc7} +FPGA_FAM=${FPGA_FAM:=xc7} echo '::group::Install Miniconda3' wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh -F4PGA_INSTALL_DIR_FAM="$F4PGA_INSTALL_DIR/$F4PGA_FAM" +F4PGA_INSTALL_DIR_FAM="$F4PGA_INSTALL_DIR/$FPGA_FAM" bash conda_installer.sh -u -b -p "$F4PGA_INSTALL_DIR_FAM"/conda source "$F4PGA_INSTALL_DIR_FAM"/conda/etc/profile.d/conda.sh @@ -41,12 +41,12 @@ echo '::endgroup::' echo '::group::Create environment' -conda env create -f "$F4PGA_FAM"/environment.yml +conda env create -f "$FPGA_FAM"/environment.yml echo '::endgroup::' echo '::group::Install arch-defs' -case "$F4PGA_FAM" in +case "$FPGA_FAM" in xc7) mkdir -p "$F4PGA_INSTALL_DIR_FAM"/install wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/535/20220128-000432/symbiflow-arch-defs-install-5fa5e715.tar.xz | tar -xJC $F4PGA_INSTALL_DIR/xc7/install @@ -64,7 +64,7 @@ cd .. echo '::group::Add f4pga-env' -case "$F4PGA_FAM" in +case "$FPGA_FAM" in xc7) F4PGA_DIR_ROOT='install';; eos-s3) F4PGA_DIR_ROOT='quicklogic-arch-defs';; esac @@ -78,7 +78,7 @@ echo '::group::🗑️ Remove the wrappers (pre-packaged from arch-defs)' cd "$F4PGA_DIR_BIN" -case "$F4PGA_FAM" in +case "$FPGA_FAM" in xc7) rm -vrf \ env \ diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index a3a3c86..e2c5ca0 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -88,7 +88,7 @@ jobs: name: '🚦 Example (deprecated sh) | ${{ matrix.fam }}' env: F4PGA_INSTALL_DIR: /opt/f4pga - F4PGA_FAM: ${{ matrix.fam }} + FPGA_FAM: ${{ matrix.fam }} steps: @@ -149,7 +149,7 @@ jobs: name: '🐍 Example | xc7' env: F4PGA_INSTALL_DIR: /opt/f4pga - F4PGA_FAM: xc7 + FPGA_FAM: xc7 steps: @@ -187,7 +187,7 @@ jobs: name: '🐍 PYTHONPATH' env: F4PGA_INSTALL_DIR: /opt/f4pga - F4PGA_FAM: xc7 + FPGA_FAM: xc7 steps: @@ -205,7 +205,7 @@ jobs: name: '🐍 Python wrappers' env: F4PGA_INSTALL_DIR: /opt/f4pga - F4PGA_FAM: xc7 + FPGA_FAM: xc7 steps: diff --git a/f4pga/setup.py b/f4pga/setup.py index b28825b..21d20d8 100644 --- a/f4pga/setup.py +++ b/f4pga/setup.py @@ -23,7 +23,7 @@ from typing import List from setuptools import setup as setuptools_setup from os import environ -F4PGA_FAM = environ.get('F4PGA_FAM', 'xc7') +FPGA_FAM = environ.get('FPGA_FAM', 'xc7') packagePath = Path(__file__).resolve().parent @@ -61,7 +61,7 @@ wrapper_entrypoints = [ f"{sf}_synth = {shwrappers}:synth", f"{sf}_write_bitstream = {shwrappers}:write_bitstream", f"{sf}_write_fasm = {shwrappers}:write_fasm", -] if F4PGA_FAM == 'xc7' else [ +] if FPGA_FAM == 'xc7' else [ f"{sf}_synth = {shwrappers}:synth", f"{sf}_pack = {shwrappers}:pack", f"{sf}_repack = {shwrappers}:repack", diff --git a/f4pga/wrappers/sh/__init__.py b/f4pga/wrappers/sh/__init__.py index 15b1208..63a0663 100644 --- a/f4pga/wrappers/sh/__init__.py +++ b/f4pga/wrappers/sh/__init__.py @@ -28,17 +28,17 @@ from subprocess import check_call f4pga_environ = environ.copy() ROOT = Path(__file__).resolve().parent -F4PGA_FAM = f4pga_environ.get('F4PGA_FAM', 'xc7') -isQuickLogic = F4PGA_FAM == 'eos-s3' -SH_SUBDIR = 'quicklogic' if isQuickLogic else F4PGA_FAM +FPGA_FAM = f4pga_environ.get('FPGA_FAM', 'xc7') +isQuickLogic = FPGA_FAM == 'eos-s3' +SH_SUBDIR = 'quicklogic' if isQuickLogic else FPGA_FAM F4PGA_INSTALL_DIR = f4pga_environ.get('F4PGA_INSTALL_DIR') if F4PGA_INSTALL_DIR is None: raise(Exception("Required environment variable F4PGA_INSTALL_DIR is undefined!")) F4PGA_INSTALL_DIR_PATH = Path(F4PGA_INSTALL_DIR) -f4pga_environ['F4PGA_ENV_BIN'] = f4pga_environ.get('F4PGA_ENV_BIN', str(F4PGA_INSTALL_DIR_PATH / F4PGA_FAM / 'conda/bin')) -f4pga_environ['F4PGA_ENV_SHARE'] = f4pga_environ.get('F4PGA_ENV_SHARE', str(F4PGA_INSTALL_DIR_PATH / F4PGA_FAM / ( +f4pga_environ['F4PGA_ENV_BIN'] = f4pga_environ.get('F4PGA_ENV_BIN', str(F4PGA_INSTALL_DIR_PATH / FPGA_FAM / 'conda/bin')) +f4pga_environ['F4PGA_ENV_SHARE'] = f4pga_environ.get('F4PGA_ENV_SHARE', str(F4PGA_INSTALL_DIR_PATH / FPGA_FAM / ( 'share' if isQuickLogic else 'install/share/symbiflow' )))