Skip to content

Commit

Permalink
using a script to get HardFloat Verilog source code
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahanxie353 committed Jan 5, 2025
1 parent 1d6ff18 commit d2fec1c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions primitives/float/get_hardfloat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

HARDFLOAT_DIR="."

HARDFLOAT_URL="http://www.jhauser.us/arithmetic/HardFloat-1.zip"

ZIP_FILE="HardFloat-1.zip"

rm -rf "${HARDFLOAT_DIR}/HardFloat-1"

mkdir -p "${HARDFLOAT_DIR}"

cd "${HARDFLOAT_DIR}"

curl -LO "${HARDFLOAT_URL}"

if [ -f "$ZIP_FILE" ]; then
unzip "$ZIP_FILE" && rm "$ZIP_FILE"
echo "HardFloat library fetched and extracted to ${HARDFLOAT_DIR}"
else
echo "Failed to download HardFloat library from ${HARDFLOAT_URL}"
fi

0 comments on commit d2fec1c

Please sign in to comment.