From 8720c4ff25bdeecf8a010271ba00339f7cdcc494 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Wed, 10 Aug 2022 21:27:27 +0200 Subject: [PATCH] f4pga/wrappers/sh/quicklogic: rm generate_libfile.f4pga.sh Signed-off-by: Unai Martinez-Corral --- f4pga/wrappers/sh/__init__.py | 27 +++++++++++- .../sh/quicklogic/generate_libfile.f4pga.sh | 43 ------------------- 2 files changed, 26 insertions(+), 44 deletions(-) delete mode 100755 f4pga/wrappers/sh/quicklogic/generate_libfile.f4pga.sh diff --git a/f4pga/wrappers/sh/__init__.py b/f4pga/wrappers/sh/__init__.py index 237f1f7..bdd8903 100644 --- a/f4pga/wrappers/sh/__init__.py +++ b/f4pga/wrappers/sh/__init__.py @@ -166,7 +166,32 @@ def generate_bitstream(): def generate_libfile(): print("[F4PGA] Running (deprecated) generate_libfile") - run_sh_script(ROOT / "quicklogic/generate_libfile.f4pga.sh") + run_bash_cmds(f""" +set -e +PART=$1 +DEVICE=$2 +CORNER=$3 + +if [[ "$DEVICE" =~ ^(qlf_k4n8_qlf_k4n8)$ ]];then + DEVICE_1="qlf_k4n8-qlf_k4n8_umc22_$CORNER" + PINMAPXML="pinmap_qlf_k4n8_umc22.xml" + INTERFACEXML="interface-mapping_24x24.xml" + DEV="qlf_k4n8_umc22" +else + DEVICE_1=${{DEVICE}} +fi + +ARCH_DIR="$F4PGA_SHARE_DIR"/arch/${{DEVICE_1}}_${{DEVICE_1}} +PINMAP_XML=${{ARCH_DIR}}/${{PINMAPXML}} + +'{which('python3')}' "$F4PGA_SHARE_DIR"/scripts/create_lib.py \ + -n "${{DEV}}_0P72_SSM40" \ + -m fpga_top \ + -c "${{PART}}" \ + -x "${{ARCH_DIR}}/lib/${{INTERFACEXML}}" \ + -l "${{DEV}}_0P72_SSM40.lib" \ + -t "${{ARCH_DIR}}/lib" +""") def ql(): diff --git a/f4pga/wrappers/sh/quicklogic/generate_libfile.f4pga.sh b/f4pga/wrappers/sh/quicklogic/generate_libfile.f4pga.sh deleted file mode 100755 index 865cc60..0000000 --- a/f4pga/wrappers/sh/quicklogic/generate_libfile.f4pga.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env 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 - -set -e - -PART=$1 -DEVICE=$2 -CORNER=$3 - -if [[ "$DEVICE" =~ ^(qlf_k4n8_qlf_k4n8)$ ]];then - DEVICE_1="qlf_k4n8-qlf_k4n8_umc22_$CORNER" - PINMAPXML="pinmap_qlf_k4n8_umc22.xml" - INTERFACEXML="interface-mapping_24x24.xml" - DEV="qlf_k4n8_umc22" -else - DEVICE_1=${DEVICE} -fi - -ARCH_DIR="$F4PGA_SHARE_DIR"/arch/${DEVICE_1}_${DEVICE_1} -PINMAP_XML=${ARCH_DIR}/${PINMAPXML} - -`which python3` "$F4PGA_SHARE_DIR"/scripts/create_lib.py \ - -n "${DEV}_0P72_SSM40" \ - -m fpga_top \ - -c "$PART" \ - -x "${ARCH_DIR}/lib/${INTERFACEXML}" \ - -l "${DEV}_0P72_SSM40.lib" \ - -t "${ARCH_DIR}/lib"