Skip to content

Commit

Permalink
Testing sims
Browse files Browse the repository at this point in the history
  • Loading branch information
marianabuhazi committed Apr 27, 2024
1 parent fd00493 commit 5b15541
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/regression-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ jobs:
run: |
cd $HOME/esp/utils/scripts/actions-pipeline
./get_modified_accelerators.sh
- name: Run behavioral simulations
run: |
./run_sims.sh
12 changes: 3 additions & 9 deletions utils/scripts/actions-pipeline/accelerators.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"accelerators": [
{
"name": "cholesky_stratus",
"path": "accelerators/stratus_hls/cholesky_stratus",
"behavioral": "cholesky_stratus-exe",
"hls": "cholesky_stratus-hls"
},
{
{
"name": "dummy_stratus",
"path": "accelerators/stratus_hls/dummy_stratus",
"behavioral": "dummy_stratus-exe",
"hls": "dummy_stratus-hls"
}
}
]
}
}

8 changes: 4 additions & 4 deletions utils/scripts/actions-pipeline/run_sims.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ cleanup() {
exit
}


# Trap SIGINT signal (Ctrl+C) to run cleanup function
trap cleanup SIGINT

echo "Getting modified accelerators..."
source get_modified_accelerators.sh

echo ""
echo "Sourcing tools"
echo "Exporting tools..."
source /opt/cad/scripts/tools_env.sh
echo ""

Expand All @@ -56,7 +55,7 @@ for accelerator_name in "${modified_accelerators[@]}"; do
done

echo "Starting RTL simulation for $accelerator_name on CPU core $min_core"
hls=$(jq --arg name "$accelerator_name" '.accelerators[] | select(.name == $name)' "$ACCELERATORS" | jq -r '.hls')
hls=$(jq --arg name "$accelerator_name" '.accelerators[] | select(.name == $name)' "$ACCELERATORS" | jq -r '.behavioral')

(cd ~/esp/socs/xilinx-vc707-xc7vx485t && taskset -c "$min_core" setsid make "$hls" > "logs/hls/${accelerator_name}_test.log" 2>&1) &
child_processes+=("$!")
Expand All @@ -76,5 +75,6 @@ echo "Waiting for all jobs to finish..."
for pid in "${child_processes[@]}"; do
wait "$pid"
# Print the latest job result with accelerator name
echo "HLS completed for acc: ${job_names[$pid]}"
echo "HLS completed for accelerator:"
echo "-- ${job_names[$pid]}"
done

0 comments on commit 5b15541

Please sign in to comment.