f4pga/wrappers/sh: raise exception if F4PGA_INSTALL_DIR is undefined

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-05-30 23:37:40 +02:00
parent b51e8e3a0c
commit e3bc36fa1d
1 changed files with 7 additions and 3 deletions

View File

@ -31,9 +31,13 @@ F4PGA_FAM = f4pga_environ.get('F4PGA_FAM', 'xc7')
isQuickLogic = F4PGA_FAM == 'eos-s3'
SH_SUBDIR = 'quicklogic' if isQuickLogic else F4PGA_FAM
F4PGA_INSTALL_DIR = Path(f4pga_environ.get('F4PGA_INSTALL_DIR'))
f4pga_environ['F4PGA_ENV_BIN'] = f4pga_environ.get('F4PGA_ENV_BIN', str(F4PGA_INSTALL_DIR / F4PGA_FAM / 'conda/bin'))
f4pga_environ['F4PGA_ENV_SHARE'] = f4pga_environ.get('F4PGA_ENV_SHARE', str(F4PGA_INSTALL_DIR / F4PGA_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 / (
'share' if isQuickLogic else 'install/share/symbiflow'
)))