Skip to content

Commit

Permalink
propose next steps to user (#901)
Browse files Browse the repository at this point in the history
* propose next steps to user
* list starting with the worst WNS instead of the first one
Signed-off-by: Bruno Mesnet <bruno.mesnet@fr.ibm.com>
  • Loading branch information
bmesnet committed Sep 18, 2019
1 parent d565a0d commit 2fb8fb8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -148,10 +148,16 @@ snap_config:
@$(MAKE) -s menuconfig || exit 1
@$(MAKE) -s snap_env snap_env_parm=config
@echo "SNAP config done"
@echo "-----------"
@echo " Suggested next step: to run a simulation, execute: make sim"
@echo " or to build the FPGA binary, execute: make image"

$(snap_config_sh):
@$(MAKE) -s menuconfig || exit 1
@echo "SNAP config done"
@echo "-----------"
@echo " Suggested next step: to run a simulation, execute: make sim"
@echo " or to build the FPGA binary, execute: make image"

# Prepare SNAP Environment
$(snap_env_sh) snap_env: $(snap_config_sh)
Expand Down
6 changes: 6 additions & 0 deletions hardware/Makefile
Expand Up @@ -435,6 +435,8 @@ nosim:
@echo -e "[BUILD $@ MODEL....] start `date +"%T %a %b %d %Y"`"
@echo -e " Info: Not building a simulation model, since SIMULATOR is set to \"nosim\"";
@echo -e "[BUILD $@ MODEL....] done `date +"%T %a %b %d %Y"`"
@echo "-----------"
@echo " Suggested next step: to run a simulation, execute: make sim"

$(SNAP_SIMULATORS): check_nvme .hw_project_done app
@if [ "$(SIMULATOR)" != "$@" ]; then \
Expand All @@ -454,6 +456,8 @@ $(SNAP_SIMULATORS): check_nvme .hw_project_done app
fi
@touch .model_$@
@echo -e "[BUILD $@ MODEL....] done `date +"%T %a %b %d %Y"`"
@echo "-----------"
@echo " Suggested next step: to run a simulation, execute: make sim"

$(SNAP_MODELS):
@$(MAKE) -s $(subst .model_,,$@)
Expand All @@ -467,6 +471,8 @@ sim: check_simulator
@echo " SIMULATOR is set to $(SIMULATOR)"
@if [ "$(SIMULATOR)" != "nosim" ]; then cd sim; ./run_sim; fi
@echo -e "[SIMULATION........] done `date +"%T %a %b %d %Y"`"
@echo "-----------"
@echo " Suggested next step: to display waveforms, execute: ./snap_trace"

sim_tmux:
@tmux new-session "$(MAKE) -s sim"
Expand Down
14 changes: 11 additions & 3 deletions snap_debug_timing
@@ -1,18 +1,26 @@
if [ -f ./hardware/build/Reports/timing_summary.rpt ]; then \
#!/bin/bash
FILE="./hardware/build/Reports/timing_summary.rpt"
if [ -f $FILE ]; then \
TEXT="Timing constraints are not met"
MAX_VIOLATION=`grep -B3 "$TEXT" "$FILE" | awk '{print $1}' | head -n 1`
LINE=`grep -A1 -n VIOL "$FILE"|grep -m1 -e "$MAX_VIOLATION" | cut -d ':' -f 1`
echo "-------------------------------------------------------------------"
echo "-------------- DISPLAY the 10 first timing violations -------------"
echo "-------------- DISPLAY the 10 worst timing violations -------------"
echo "-------------------------------------------------------------------"
grep -A1 -m10 VIOL hardware/build/Reports/timing_summary.rpt
#grep -A1 -m10 VIOL hardware/build/Reports/timing_summary.rpt
tail -n +"$LINE" "$FILE" | grep -A1 -m10 VIOL
echo "-------------------------------------------------------------------"
echo "- => Few options to solve these timing violations <= -"
echo "- c0 signals are related to BSP/PSL logic -"
echo "- There is not a lot you can do in the logic, but .... -"
echo "- Not a FPGA expert? => retry a make image -"
echo "- or => use Kconfig menu to select derated clk -"
echo "- FPGA expert? => change placement constraints of the PSL/BSP -"
echo "- a0 signals are related to SNAP or Action logic -"
echo "- There should be a way to solve that in the logic -"
echo "- You can first retry a make image (a new placement may work) -"
echo "- Try changing the way you have coded the logic of your action -"
echo "- or use Kconfig menu to try and decrease the HLS clock period -"
echo "- The path listed above should show you the function to change -"
echo "-------------------------------------------------------------------"
else
Expand Down
1 change: 1 addition & 0 deletions software/tools/snap_maint.c
Expand Up @@ -103,6 +103,7 @@ static void *snap_open(struct mdev_ctx *mctx)
VERBOSE0("Error: Can not open CAPI-SNAP Device: %s\n",
device);
VERBOSE0(" Root rights are needed to access this directory\n");
VERBOSE0(" Type: sudo chmod -R ugo+rw /dev/cxl\n");
}
return handle;
}
Expand Down

0 comments on commit 2fb8fb8

Please sign in to comment.