s/F4PGA_FAM/FPGA_FAM/
This is required to make f4pga-examples working without handling 2 similar environment variables: * F4PGA_FAM required for installing F4PGA * FPGA_FAM used in f4pga-examples Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
This commit is contained in:
parent
38ded8f15b
commit
593adf1bda
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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'
|
||||
)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue