Skip to content

Commit

Permalink
change runt and get_hardfloat to try to pass the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahanxie353 committed Jan 5, 2025
1 parent 0775b6c commit f2fa798
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 3 additions & 6 deletions primitives/float/get_hardfloat.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
#!/bin/bash

HARDFLOAT_DIR="$PWD"
HARDFLOAT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

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"
unzip -o "$ZIP_FILE"
echo "HardFloat library fetched and extracted to ${HARDFLOAT_DIR}"
else
echo "Failed to download HardFloat library from ${HARDFLOAT_URL}"
exit 1
fi
7 changes: 4 additions & 3 deletions runt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -562,15 +562,16 @@ fud exec -s calyx.exec './target/debug/calyx' \
name = "correctness HardFloat floating point"
paths = ["tests/correctness/hardfloat/*.futil"]
cmd = """
cd primitives/float && ./get_hardfloat.sh > /dev/null 2>&1 && cd ../../ &&
if [ ! -d "primitives/float/HardFloat-1" ]; then
bash primitives/float/get_hardfloat.sh > /dev/null 2>&1
fi &&
fud exec --from calyx --to jq \
--through verilog \
--through dat \
-s verilog.data {}.data \
-s calyx.exec './target/debug/calyx' \
-s verilog.cycle_limit 500 \
{} -q &&
rm -rf primitives/float/HardFloat-1/
{} -q
"""
expect_dir = "tests/correctness/hardfloat/"
timeout = 30
Expand Down

0 comments on commit f2fa798

Please sign in to comment.