Skip to content

Commit 866f149

Browse files
authored
oc_ad9h335_patch (#128)
* add OC-AD9H335 items Signed-off-by: Alexandre CASTELLANE <alexandre.castellane@fr.ibm.com>
1 parent 3d9c593 commit 866f149

File tree

6 files changed

+39
-21
lines changed

6 files changed

+39
-21
lines changed

actions/hls_hbm_memcopy_1024/tests/hw_test.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ if [ $card_type -eq "31" ]; then
9393
echo "AD9V3 card"
9494
elif [ $card_type -eq "32" ]; then
9595
echo "AD9H3 card"
96+
elif [ $card_type -eq "35" ]; then
97+
echo "AD9H335 card"
9698
elif [ $card_type -eq "33" ]; then
9799
echo "AD9H7 card"
98100
elif [ $card_type -eq "34" ]; then
@@ -102,7 +104,8 @@ else
102104
fi
103105

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

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

163168
for (( size=64; size<128; size*=2 )); do
@@ -170,11 +175,14 @@ if [ "$duration" = "NORMAL" ]; then
170175
test_memcopy ${size}
171176
done
172177
fi
173-
174178
echo
175-
#echo "Print time: (small size doesn't represent performance)"
179+
echo
180+
echo "Summary of execution times"
181+
echo "NOTE : In simulation reported times are greater compared to POWER actual operation"
176182
grep "memcopy of" snap_hbm_memcopy.log
177183
echo
184+
echo "End of simple host memory test in \"$duration\" mode."
185+
echo "----------------------------------------------------"
178186

179187
#### MEMCOPY to and from HBM #############
180188

@@ -246,7 +254,9 @@ function test_memcopy_with_hbm {
246254
################ TEST Begins ##################
247255
rm -f snap_memcopy_with_hbm.log
248256
touch snap_memcopy_with_hbm.log
249-
257+
echo
258+
echo "----------------------------------------------------"
259+
echo "Running HBM tests in \"$duration\" mode..."
250260
if [ "$duration" = "SHORT" ]; then
251261
for (( size=64; size<512; size*=2 )); do
252262
test_memcopy_with_hbm ${size}
@@ -260,6 +270,12 @@ if [ "$duration" = "NORMAL" ]; then
260270
fi
261271

262272
echo
263-
#echo "Print time: (small size doesn't represent performance)"
273+
echo
274+
echo "Summary of execution times"
275+
echo "NOTE, in simulation reported times are greater compared to POWER actual operation"
264276
grep "memcopy of" snap_memcopy_with_hbm.log
265277
echo
278+
echo
279+
echo "End of HBM memory test in \"$duration\" mode."
280+
echo "----------------------------------------------------"
281+

software/include/osnap_global_regs.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ extern "C" {
133133
*/
134134
#define SNAP_CAP (CORE_BASE_ADDR + 0x30)
135135

136-
#define SNAP_NVME_ENA 0x100
137-
#define AD9V3_OC_CARD 0x031 /* OpenCAPI 3.0*/
138-
#define AD9H3_OC_CARD 0x032 /* OpenCAPI 3.0*/
139-
#define AD9H7_OC_CARD 0x033 /* OpenCAPI 3.0*/
140-
#define BW250SOC_OC_CARD 0x034 /* OpenCAPI 3.0*/
136+
#define SNAP_NVME_ENA 0x100
137+
#define AD9V3_OC_CARD 0x031 /* OpenCAPI 3.0*/
138+
#define AD9H3_OC_CARD 0x032 /* OpenCAPI 3.0*/
139+
#define AD9H335_OC_CARD 0x035 /* OpenCAPI 3.0*/
140+
#define AD9H7_OC_CARD 0x033 /* OpenCAPI 3.0*/
141+
#define BW250SOC_OC_CARD 0x034 /* OpenCAPI 3.0*/
141142

142143
/*
143144
* Freerunning Timer (FRT)

software/lib/osnap.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,12 @@ struct card_2_name {
130130

131131
/* Limit Card names to max of 15 Bytes */
132132
struct card_2_name snap_card_2_name_tab[] = {
133-
{.card_id = AD9V3_OC_CARD, .card_name = "AD9V3"},
134-
{.card_id = AD9H3_OC_CARD, .card_name = "AD9H3"},
135-
{.card_id = AD9H7_OC_CARD, .card_name = "AD9H7"},
136-
{.card_id = BW250SOC_OC_CARD, .card_name = "BW250SOC"},
137-
{.card_id = -1, .card_name = "INVALID"}
133+
{.card_id = AD9V3_OC_CARD, .card_name = "AD9V3"},
134+
{.card_id = AD9H3_OC_CARD, .card_name = "AD9H3"},
135+
{.card_id = AD9H335_OC_CARD, .card_name = "AD9H335"},
136+
{.card_id = AD9H7_OC_CARD, .card_name = "AD9H7"},
137+
{.card_id = BW250SOC_OC_CARD, .card_name = "BW250SOC"},
138+
{.card_id = -1, .card_name = "INVALID"}
138139
};
139140

140141
/* Search snap_card_2_name_tab to for card name */

software/tools/oc_find_card

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ if [ $CardOption == 1 ]; then
599599
if [ $? == 1 ]; then
600600
rc=1
601601
fi
602-
detect_card_name $card "0x0632" "0x066B" "AD9H335"
602+
detect_card_name $card "0x0632" "0x066b" "AD9H335"
603603
if [ $? == 1 ]; then
604604
rc=1
605605
fi
@@ -715,7 +715,7 @@ case ${accel} in
715715
;;
716716
# OC-AD9H335 OpenCAPI 3.0 card from Alphadata
717717
"OC-AD9H335")
718-
detect_snap_cards "0x062b" "0x066B" "OC-AD9H335"
718+
detect_snap_cards "0x062b" "0x066b" "OC-AD9H335"
719719
RC=$?
720720
;;
721721
# OC-AD9H7 OpenCAPI 3.0 card from Alphadata
@@ -797,7 +797,7 @@ case ${accel} in
797797
detect_snap_cards "0x0632" "0x0667" "AD9H3"
798798
RC=$((RC + $?))
799799

800-
detect_snap_cards "0x0632" "0x066B" "AD9H335"
800+
detect_snap_cards "0x0632" "0x066b" "AD9H335"
801801
RC=$((RC + $?))
802802

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

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

821821
detect_snap_cards "0x062b" "0x0666" "OC-AD9H7"

software/tools/oc_maint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static void snap_version (void* handle)
199199

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

0 commit comments

Comments
 (0)