f4pga: remove F4PGA_BIN_DIR and VPRPATH

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-08-04 04:23:37 +02:00
parent 98498b9330
commit e9a520a17a
16 changed files with 23 additions and 70 deletions

View File

@ -5,7 +5,7 @@
},
"dependencies": {
"sources": [
"eos-s3/btn_counter/btn_counter.v"
"btn_counter/btn_counter.v"
],
"synth_log": "synth.log",
"pack_log": "pack.log",
@ -14,9 +14,9 @@
"EOS3FF512-PDN64": {
"default_target": "bitstream",
"dependencies": {
"build_dir": "build/eos-s3",
"pcf": "eos-s3/btn_counter/chandalar.pcf",
"sdc-in": "eos-s3/btn_counter/dummy.sdc"
"build_dir": "build",
"pcf": "btn_counter/chandalar.pcf",
"sdc-in": "btn_counter/dummy.sdc"
},
"values": {
"part": "ql-eos-s3",

View File

@ -112,31 +112,28 @@ jobs:
- name: 🐍 Install f4pga (pip)
run: |
. ./.github/scripts/activate.sh
cd f4pga
pip install .
cd ..
- name: 🛠️ Clone f4pga-examples
run: git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
# F4PGA
- name: 🚧 [F4PGA] Test f4pga build
if: matrix.flow == 'F4PGA'
run: |
. ./.github/scripts/activate.sh
echo '::group::Clone f4pga-examples'
git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
cd f4pga-examples
echo '::endgroup::'
f4pga -vv build --flow ../.github/${{ matrix.fam }}_test.json
cd f4pga-examples/${{ matrix.fam }}
f4pga -vv build --flow ../../.github/${{ matrix.fam }}_test.json
- name: '📤 Upload artifact: ${{ matrix.fam }} bitstream'
if: matrix.flow == 'F4PGA'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.flow }}-${{ matrix.fam }}-Bitstream
path: f4pga-examples/build/${{ matrix.fam }}/top.bit
path: f4pga-examples/${{ matrix.fam }}/build/top.bit
if-no-files-found: error
# SymbiFlow
@ -145,20 +142,8 @@ jobs:
if: matrix.flow == 'SymbiFlow'
run: |
. ./.github/scripts/activate.sh
export F4PGA_BIN_DIR="${F4PGA_INSTALL_DIR}/${FPGA_FAM}"/bin/
export F4PGA_SHARE_DIR="${F4PGA_INSTALL_DIR}/${FPGA_FAM}"/share/f4pga
export VPRPATH=$F4PGA_BIN_DIR
echo '::group::Clone f4pga-examples'
git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
cd f4pga-examples
echo '::endgroup::'
cd ${{ matrix.fam }}
cd f4pga-examples/${{ matrix.fam }}
export F4PGA_USE_DEPRECATED=true
case '${{ matrix.fam }}' in
xc7) TARGET="arty_35" make -C counter_test;;
eos-s3) make -C btn_counter;;
@ -199,7 +184,6 @@ jobs:
- name: 🐍 Install f4pga (pip)
run: |
. ./.github/scripts/activate.sh
cd f4pga
pip install .
cd ..
@ -207,7 +191,6 @@ jobs:
- name: 🚦 Test Python wrappers
run: |
. ./.github/scripts/activate.sh
pip3 install -r ./test/requirements.txt
pytest --verbose --capture=no -rA --color=yes test/

View File

@ -5,7 +5,7 @@
},
"dependencies": {
"sources": [
"xc7/counter_test/counter.v"
"counter_test/counter.v"
],
"synth_log": "synth.log",
"pack_log": "pack.log"
@ -13,9 +13,9 @@
"XC7A35TCSG324-1": {
"default_target": "bitstream",
"dependencies": {
"build_dir": "build/xc7",
"build_dir": "build",
"xdc": [
"xc7/counter_test/arty.xdc"
"counter_test/arty.xdc"
]
},
"values": {

View File

@ -36,7 +36,8 @@
description: |
- Tarballs from f4pga-arch-defs now include usable environment and requirements files which allow bootstraping
minimal Conda environments.
- The default share path does not include subdir 'install' by default.
- The default F4PGA_SHARE_DIR path does not include subdir 'install' by default.
- F4PGA_BIN_DIR and VPRPATH are not used anymore.
5:
examples: 524dfb6e746b632fdeddc9d06d8a002a3c7a3118

View File

@ -76,8 +76,7 @@ mypath = str(Path(__file__).resolve().parent)
FPGA_FAM = environ.get('FPGA_FAM', 'xc7')
bin_dir_path = \
environ.get('F4PGA_BIN_DIR', str(Path(sys_argv[0]).resolve().parent.parent))
bin_dir_path = str(Path(sys_argv[0]).resolve().parent.parent)
share_dir_path = \
environ.get('F4PGA_SHARE_DIR',
str(Path(f'{install_dir}/{FPGA_FAM}/share/f4pga').resolve()))

View File

@ -87,11 +87,13 @@ setuptools_setup(
],
package_dir={"f4pga": "."},
package_data={
'f4pga': ['*.json', 'platforms/*.json'],
'f4pga': [
'*.json',
'platforms/*.json'
],
'f4pga.wrappers.sh': [
'xc7/*.f4pga.sh',
'quicklogic/*.f4pga.sh',
'quicklogic/env'
'quicklogic/*.f4pga.sh'
]
},
classifiers=[],

View File

@ -38,8 +38,7 @@ 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_BIN_DIR'] = f4pga_environ.get('F4PGA_BIN_DIR', str(F4PGA_INSTALL_DIR_PATH / FPGA_FAM / 'conda/bin'))
f4pga_environ['F4PGA_SHARE_DIR'] = f4pga_environ.get('F4PGA_SHARE_DIR', str(F4PGA_INSTALL_DIR_PATH / FPGA_FAM / 'install/share/f4pga'))
f4pga_environ['F4PGA_SHARE_DIR'] = f4pga_environ.get('F4PGA_SHARE_DIR', str(F4PGA_INSTALL_DIR_PATH / FPGA_FAM / 'share/f4pga'))
def run_sh(script):

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args $@

View File

@ -1,22 +0,0 @@
#!/bin/bash
#
# Copyright (C) 2020-2022 F4PGA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
if [ -z $VPRPATH ]; then
export VPRPATH="$F4PGA_BIN_DIR"
export PYTHONPATH="${VPRPATH}/python:${PYTHONPATH}"
fi

View File

@ -19,7 +19,6 @@
set -e
SHARE_DIR_PATH=${SHARE_DIR_PATH:="$F4PGA_SHARE_DIR"}
BIN_DIR_PATH=${BIN_DIR_PATH:="$F4PGA_BIN_DIR"}
OPTS=d:P:p:b:v:o:q
LONGOPTS=device:,part:,pcf:,bit:,out-verilog:,out-pcf:,out-qcf:,

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args $@

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args $@

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args $@

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args $@

View File

@ -18,8 +18,6 @@
set -e
source $(dirname "$0")/env
export SHARE_DIR_PATH=${SHARE_DIR_PATH:="$F4PGA_SHARE_DIR"}
SPLIT_INOUTS=`realpath ${SHARE_DIR_PATH}/scripts/split_inouts.py`
CONVERT_OPTS=`realpath ${SHARE_DIR_PATH}/scripts/convert_compile_opts.py`

View File

@ -18,7 +18,6 @@
set -e
source $(dirname "$0")/env
source $(dirname "$0")/vpr_common.f4pga.sh
parse_args "$@"