Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions actions/hls_hbm_memcopy_1024/tests/hw_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ if [ $card_type -eq "31" ]; then
echo "AD9V3 card"
elif [ $card_type -eq "32" ]; then
echo "AD9H3 card"
elif [ $card_type -eq "35" ]; then
echo "AD9H335 card"
elif [ $card_type -eq "33" ]; then
echo "AD9H7 card"
elif [ $card_type -eq "34" ]; then
Expand All @@ -102,7 +104,8 @@ else
fi

#for HBM cards
if [ $card_type -eq "32" ] || [ $card_type -eq "33" ]; then
if [ $card_type -eq "32" ] || [ $card_type -eq "33" ] || [ $card_type -eq "35" ]; then
echo -n "HBM card detected"
echo -n "Number of AXI HBM IF: "
hbm_if_num_hexa=`snap_peek -C ${snap_card} 0x30 |grep 30|cut -c22-23 || exit 1;`
hbm_if_num=$(printf '%#x' "0x$hbm_if_num_hexa")
Expand Down Expand Up @@ -158,6 +161,8 @@ function test_memcopy {
rm -f snap_hbm_memcopy.log
touch snap_hbm_memcopy.log

echo "-----------------------------------------------------"
echo "Running simple host memory test in \"$duration\" mode..."
if [ "$duration" = "SHORT" ]; then

for (( size=64; size<128; size*=2 )); do
Expand All @@ -170,11 +175,14 @@ if [ "$duration" = "NORMAL" ]; then
test_memcopy ${size}
done
fi

echo
#echo "Print time: (small size doesn't represent performance)"
echo
echo "Summary of execution times"
echo "NOTE : In simulation reported times are greater compared to POWER actual operation"
grep "memcopy of" snap_hbm_memcopy.log
echo
echo "End of simple host memory test in \"$duration\" mode."
echo "----------------------------------------------------"

#### MEMCOPY to and from HBM #############

Expand Down Expand Up @@ -246,7 +254,9 @@ function test_memcopy_with_hbm {
################ TEST Begins ##################
rm -f snap_memcopy_with_hbm.log
touch snap_memcopy_with_hbm.log

echo
echo "----------------------------------------------------"
echo "Running HBM tests in \"$duration\" mode..."
if [ "$duration" = "SHORT" ]; then
for (( size=64; size<512; size*=2 )); do
test_memcopy_with_hbm ${size}
Expand All @@ -260,6 +270,12 @@ if [ "$duration" = "NORMAL" ]; then
fi

echo
#echo "Print time: (small size doesn't represent performance)"
echo
echo "Summary of execution times"
echo "NOTE, in simulation reported times are greater compared to POWER actual operation"
grep "memcopy of" snap_memcopy_with_hbm.log
echo
echo
echo "End of HBM memory test in \"$duration\" mode."
echo "----------------------------------------------------"

11 changes: 6 additions & 5 deletions software/include/osnap_global_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ extern "C" {
*/
#define SNAP_CAP (CORE_BASE_ADDR + 0x30)

#define SNAP_NVME_ENA 0x100
#define AD9V3_OC_CARD 0x031 /* OpenCAPI 3.0*/
#define AD9H3_OC_CARD 0x032 /* OpenCAPI 3.0*/
#define AD9H7_OC_CARD 0x033 /* OpenCAPI 3.0*/
#define BW250SOC_OC_CARD 0x034 /* OpenCAPI 3.0*/
#define SNAP_NVME_ENA 0x100
#define AD9V3_OC_CARD 0x031 /* OpenCAPI 3.0*/
#define AD9H3_OC_CARD 0x032 /* OpenCAPI 3.0*/
#define AD9H335_OC_CARD 0x035 /* OpenCAPI 3.0*/
#define AD9H7_OC_CARD 0x033 /* OpenCAPI 3.0*/
#define BW250SOC_OC_CARD 0x034 /* OpenCAPI 3.0*/

/*
* Freerunning Timer (FRT)
Expand Down
11 changes: 6 additions & 5 deletions software/lib/osnap.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ struct card_2_name {

/* Limit Card names to max of 15 Bytes */
struct card_2_name snap_card_2_name_tab[] = {
{.card_id = AD9V3_OC_CARD, .card_name = "AD9V3"},
{.card_id = AD9H3_OC_CARD, .card_name = "AD9H3"},
{.card_id = AD9H7_OC_CARD, .card_name = "AD9H7"},
{.card_id = BW250SOC_OC_CARD, .card_name = "BW250SOC"},
{.card_id = -1, .card_name = "INVALID"}
{.card_id = AD9V3_OC_CARD, .card_name = "AD9V3"},
{.card_id = AD9H3_OC_CARD, .card_name = "AD9H3"},
{.card_id = AD9H335_OC_CARD, .card_name = "AD9H335"},
{.card_id = AD9H7_OC_CARD, .card_name = "AD9H7"},
{.card_id = BW250SOC_OC_CARD, .card_name = "BW250SOC"},
{.card_id = -1, .card_name = "INVALID"}
};

/* Search snap_card_2_name_tab to for card name */
Expand Down
8 changes: 4 additions & 4 deletions software/tools/oc_find_card
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ if [ $CardOption == 1 ]; then
if [ $? == 1 ]; then
rc=1
fi
detect_card_name $card "0x0632" "0x066B" "AD9H335"
detect_card_name $card "0x0632" "0x066b" "AD9H335"
if [ $? == 1 ]; then
rc=1
fi
Expand Down Expand Up @@ -715,7 +715,7 @@ case ${accel} in
;;
# OC-AD9H335 OpenCAPI 3.0 card from Alphadata
"OC-AD9H335")
detect_snap_cards "0x062b" "0x066B" "OC-AD9H335"
detect_snap_cards "0x062b" "0x066b" "OC-AD9H335"
RC=$?
;;
# OC-AD9H7 OpenCAPI 3.0 card from Alphadata
Expand Down Expand Up @@ -797,7 +797,7 @@ case ${accel} in
detect_snap_cards "0x0632" "0x0667" "AD9H3"
RC=$((RC + $?))

detect_snap_cards "0x0632" "0x066B" "AD9H335"
detect_snap_cards "0x0632" "0x066b" "AD9H335"
RC=$((RC + $?))

detect_snap_cards "0x0632" "0x0665" "U200"
Expand All @@ -815,7 +815,7 @@ case ${accel} in
detect_snap_cards "0x062b" "0x0667" "OC-AD9H3"
RC=$((RC + $?))

detect_snap_cards "0x062b" "0x066B" "OC-AD9H335"
detect_snap_cards "0x062b" "0x066b" "OC-AD9H335"
RC=$((RC + $?))

detect_snap_cards "0x062b" "0x0666" "OC-AD9H7"
Expand Down
2 changes: 1 addition & 1 deletion software/tools/oc_maint.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void snap_version (void* handle)

/* if card is a 9H3 or 9H7 then display number of HBM AX interfaces */
snap_card_ioctl (handle, GET_SDRAM_SIZE, (unsigned long)&ioctl_data);
if ( !( strcmp(buffer, "AD9H3") && strcmp(buffer,"AD9H7") )) {
if ( !( strcmp(buffer, "AD9H3") && strcmp(buffer,"AD9H7") && strcmp(buffer,"AD9H335") )) {
VERBOSE1 (" %d HBM AXI interfaces. ", (int)ioctl_data);
} else {
VERBOSE1 (" %d MB DRAM available. ", (int)ioctl_data);
Expand Down