Skip to content

Commit

Permalink
exit early on error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakayorihiro committed Sep 10, 2024
1 parent 91700c9 commit 1d1c31c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/profiler/get-profile-counts-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ echo "[${SCRIPT_NAME}] Obtaining FSM info from TDCC"
set +o xtrace
) &> ${LOGS_DIR}/gol-tdcc

if [ ! -f ${FSM_JSON} ]; then
echo "[${SCRIPT_NAME}] Failed to generate ${FSM_JSON}! Exiting"
exit 1
fi

# Run component-cells backend to get cell information
echo "[${SCRIPT_NAME}] Obtaining cell information from component-cells backend"
(
Expand All @@ -65,6 +70,11 @@ echo "[${SCRIPT_NAME}] Obtaining cell information from component-cells backend"
cargo run --manifest-path tools/component_cells/Cargo.toml ${INPUT_FILE} -o ${CELLS_JSON}
) &> ${LOGS_DIR}/gol-cells

if [ ! -f ${CELLS_JSON} ]; then
echo "[${SCRIPT_NAME}] Failed to generate ${CELLS_JSON}! Exiting"
exit 1
fi

# Run simuation to get VCD
echo "[${SCRIPT_NAME}] Obtaining VCD file via simulation"
(
Expand All @@ -73,6 +83,11 @@ echo "[${SCRIPT_NAME}] Obtaining VCD file via simulation"
set +o xtrace
) &> ${LOGS_DIR}/gol-vcd

if [ ! -f ${VCD_FILE} ]; then
echo "[${SCRIPT_NAME}] Failed to generate ${VCD_FILE}! Exiting"
exit 1
fi

# Run script to get cycle level counts
echo "[${SCRIPT_NAME}] Using FSM info and VCD file to obtain cycle level counts"
(
Expand Down

0 comments on commit 1d1c31c

Please sign in to comment.