Skip to content

Commit

Permalink
Minor corrections (#842)
Browse files Browse the repository at this point in the history
* correction for Power compilation

Signed-off-by: Bruno Mesnet <[email protected]>

* correct failure case print message for action

Signed-off-by: Bruno Mesnet <[email protected]>

* add timeout reminder checking

Signed-off-by: Bruno Mesnet <[email protected]>

* Updated User Guide with P9 and moved cards and env data to .md format
Signed-off-by: Alexandre Castellane <[email protected]>

* remove SLES information

Signed-off-by: Bruno Mesnet <[email protected]>

* add timeout reminder checking

Signed-off-by: Bruno Mesnet <[email protected]>

* adding logs directory if missing

Signed-off-by: Bruno Mesnet <[email protected]>

* correct uplaod flash timeout test

Signed-off-by: Bruno Mesnet <[email protected]>

* change g++ to gcc since g++ not installed everywhere

Signed-off-by: Bruno Mesnet <[email protected]>

* adding hdl_helloworld and hls_intersect

Signed-off-by: Bruno Mesnet <[email protected]>

* For HLS CRITICAL WARNING checkings

Signed-off-by: luyong6 <[email protected]>

* correcting fix testing critical and CRITICAL  warnings

Signed-off-by: Bruno Mesnet <[email protected]>
  • Loading branch information
bmesnet authored Nov 6, 2018
1 parent 2758737 commit 364b6c2
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 15 deletions.
4 changes: 3 additions & 1 deletion actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ To configure the include path for the common header files with the Xilinx Vivado

| Action name |Host|DDR|NVMe|Eth| Description
|:------------------------|:--:|:-:|:--:|:-:|:--------------------------------------------------------------------------------
| **hdl**\_helloworld | X | X | | | **Discovery example** to help you start coding a SNAP application working with registers and simply moving data. The hardware action is coded in Verilog.
| **hdl**\_example | X | X | X | | Shows how to use MMIO registers: Software application uses one of them to collect a hardware counter value. Also shows how to copy data between Host, FPGA, card DDR and card NVMe(Flash) in **VHDL** (**Bandwidth measurement**).
| **hdl**\_nvme_example | X | X | X | | Example to read and write 4k NVMe blocks. It provides a block layer library which is compatible to the IBM CapiFLASH block API and contains experiments for caching and prefetching.
| hls_helloworld | X | | | | **Discovery example** changing all characters of a string into lower or upper cases.
| hls_helloworld | X | | | | **Discovery example** changing all characters of a string into lower or upper cases. The hardware action is written in C.
| hls_memcopy | X | X | | | Shows how to copy data between Host, FPGA and card DDR (**Bandwidth measurement**).
| hls_nvme_memcopy | X | X | X | | Shows how to copy data between Host, FPGA, card DDR and card NVMe(Flash) (**Bandwidth measurement**).
| hls_bfs | X | | | | Breadth first search (graph data): shows how to access a complex data structure.
Expand All @@ -44,4 +45,5 @@ To configure the include path for the common header files with the Xilinx Vivado
| hls_search | X | X | | | Shows how to code an action providing multiple operations: memcopy + different searches such as Naive, KMP and streaming mode (_code not optimized_)
| hls_sponge | X | | | | Shows how an FPGA can compete against a multi-threaded CPU on a compute intensive code (SHA3) (**Compute-only benchmark**)
| hls_decimal_mult | X | | | | Shows how to manage decimal values exchanged between the application on the server and the action in the FPGA
| hls_intersect | X | X | | | Shows how to make two implementations for a single target. It also shows how to invoke the hardware action several times from C main() function. (Action not optimized - timing issues may be faced when building the image)

2 changes: 1 addition & 1 deletion actions/hdl_helloworld/sw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ endif
endif

CPPFLAGS+= -g
CXX=g++
CXX=gcc

all: all_build

Expand Down
7 changes: 5 additions & 2 deletions actions/hls.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ CXXFLAGS = -Wall -W -Wextra -Werror -O2 -DNO_SYNTH -Wno-unknown-pragmas -I../inc
all: $(syn_dir) check

$(syn_dir): $(srcs) run_hls_script.tcl
@if [ ! -d "$(SNAP_ROOT)/hardware/logs" ]; then \
mkdir -p $(SNAP_ROOT)/hardware/logs; \
fi
vivado_hls -f run_hls_script.tcl >> $(SNAP_ROOT)/hardware/logs/action_make.log
$(RM) -rf $@/systemc $@/verilog

Expand Down Expand Up @@ -77,8 +80,8 @@ $(SOLUTION_NAME): $(objs)
# Check for register duplication (0x184/Action_Output_o).
#
check: $(syn_dir)
@echo -n " Checking for critical warnings during HLS synthesis .... "
@grep -A8 critical $(SOLUTION_DIR)*/$(SOLUTION_NAME)/$(SOLUTION_NAME).log ; \
@echo -n " Checking for all critical warnings during HLS synthesis .... "
@grep -A8 -i CRITICAL $(SOLUTION_DIR)*/$(SOLUTION_NAME)/$(SOLUTION_NAME).log ; \
test $$? = 1
@echo "OK"
@echo -n " Checking for reserved MMIO area during HLS synthesis ... "
Expand Down
4 changes: 3 additions & 1 deletion actions/hls_search/sw/snap_search.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,10 @@ int main(int argc, char *argv[])
break;
#else
printf(" >>> Streaming method (%d) NOT IMPLEMENTED \n", method);
// Force to naive method
method = 1;
break;
printf(" >>> Default: Naive method (%d) \n", method);
break;
#endif
default:
printf(" >>> Default: Naive method (%d) \n", method);
Expand Down
6 changes: 3 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ _Requires Ubuntu 18.04.1 or later_ / (Resources in _italic_ are not enabled yet)

### Deployment Environments :

| Deployment Server(Power)| Ubuntu | RedHat | CentOS | Suse | Helpful commands
|:------------------------|:-------------:|:--------:|:--------:|:-----:|:----------------
| Deployment Server(Power)| Ubuntu | RedHat | CentOS | Suse | Helpful commands
|:------------------------|:-------------:|:--------------:|:--------:|:-----:|:----------------
| Power8 (CAPI1.0) | 16.04.1 min | RHEL7.3 min | - | - | lsb_release -a _OR_ cat /etc/os-release
| Power9 (CAPI2.0) | 18.04.1 min | RHEL7.5-ALT min| - | - | lsb_release -a _OR_ cat /etc/os-release
| Power9 (OpenCAPI3.0) | 18.04.1 min | RHEL7.6-ALT min| _to come_|_SLES15 SP1 & SLES12 SP5_ | lsb_release -a _OR_ cat /etc/os-release
| Power9 (OpenCAPI3.0) | 18.04.1 min | RHEL7.6-ALT min| _to come_| - | lsb_release -a _OR_ cat /etc/os-release

Notes :
- Resources in _italic_ are tentative
Expand Down
Binary file modified doc/UG_CAPI_SNAP-QuickStart_on_a_General_Environment.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions hardware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ action_hw: prepare_logs
echo " Error: Path to ACTION_ROOT is not defined properly"; exit -1; \
fi
@echo "Calling make -C $(ACTION_ROOT) hw" > $(LOGS_DIR)/action_make.log
@$(MAKE) -C $(ACTION_ROOT) hw
@if [ $$? -ne 0 ]; then \
echo -e " Error: please look into $(LOGS_DIR)/action_make.log"; exit -1; \
fi
@$(MAKE) -C $(ACTION_ROOT) hw; \
if [ $$? -ne 0 ]; then \
echo -e " Error: please look into $(LOGS_DIR)/action_make.log"; exit -1; \
fi
@if [ "$(HLS_SUPPORT)" == "TRUE" ]; then \
echo "Calling make -C $(ACTION_ROOT)/hw vhdl" >> $(LOGS_DIR)/action_make.log; \
$(MAKE) -kC $(ACTION_ROOT)/hw vhdl >> $(LOGS_DIR)/action_make.log; \
Expand Down
1 change: 1 addition & 0 deletions software/lib/snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ int snap_action_completed(struct snap_action *action, int *rc, int timeout)
if (rc)
*rc = _rc;

// Test the rc in calling function for normal or timeout (rc=0) termination
return (action_data & ACTION_CONTROL_IDLE) == ACTION_CONTROL_IDLE;
}

Expand Down
7 changes: 4 additions & 3 deletions software/tools/snap_find_card
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ function usage() {
# Flash Update will reset the Capi Card and the card will disappear for
# some time.
function wait_no_flash() {
for i in `seq 1 50`; do
for i in `seq 1 5`; do

This comment has been minimized.

Copy link
@Eberhard-S-Amann

Eberhard-S-Amann Nov 19, 2018

Hi, why was this timeout changed. I remember havin 5 * 50 sec which is about 250 sec because the card can be in reset sate at this point.

This comment has been minimized.

Copy link
@bmesnet

bmesnet Nov 20, 2018

Author Collaborator

ok thanks for the notification Eberhard and happy to see you around ;-)
I can certainly put it back if you think it is needed.
Thanks for your review

if [ ! -d /var/cxl/capi-flash-script.lock ]; then
break;
fi
sleep 5
echo "capi-flash-script is locked in /var/cxl. Waiting for unlock (25s)"
done
if [ $i -gt 50 ]; then
echo "ERROR: Timeout after $i Flash is pending ......."
if [ $i -ge 5 ]; then
echo "ERROR: Timeout. Flash is pending ......."
exit 0
fi
}
Expand Down

0 comments on commit 364b6c2

Please sign in to comment.