f4pga/wrappers/sh/generate_libfile: cleanup
@@ -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"
