From 45020ee7a640be99118d400637336205fb1b296e Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Wed, 10 Aug 2022 21:36:10 +0200 Subject: [PATCH] f4pga/wrappers/sh/generate_libfile: cleanup Signed-off-by: Unai Martinez-Corral --- f4pga/wrappers/sh/__init__.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/f4pga/wrappers/sh/__init__.py b/f4pga/wrappers/sh/__init__.py index bdd8903..6af9e70 100644 --- a/f4pga/wrappers/sh/__init__.py +++ b/f4pga/wrappers/sh/__init__.py @@ -166,28 +166,23 @@ def generate_bitstream(): def generate_libfile(): print("[F4PGA] Running (deprecated) generate_libfile") + (part, device, corner) = sys_argv[1:4] 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" +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}} + 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}}" \ + -c '{part}' \ -x "${{ARCH_DIR}}/lib/${{INTERFACEXML}}" \ -l "${{DEV}}_0P72_SSM40.lib" \ -t "${{ARCH_DIR}}/lib"