cl_dram_hbm_dma builds but running the way the tutorial says produces "unable to open read dma queue"
- Dominant language
- SystemVerilog
- Stars
- 1.7k
- Forks
- 538
- PR merge metrics
- No merged PRs in 30d
Description
I loaded the FPGA with my compiled verilog and confirmed that it was loaded, but it does not run.
I am very carefully following these instructions: https://github.com/aws/aws-fpga/blob/f2/hdk/README.md
```
$ ./load_aws_fpga_image.sh
AFI 0 agfi-0c0272c37d36a7915 loaded 0 ok 0 0x10212415
AFIDEVICE 0 0x1d0f 0xf001 0000:34:00.0
```
```
$ sudo fpga-describe-local-image -S 0 -H
Type FpgaImageSlot FpgaImageId StatusName StatusCode ErrorName ErrorCode ShVersion
AFI 0 agfi-0c0272c37d36a7915 loaded 0 ok 0 0x10212415
Type FpgaImageSlot VendorId DeviceId DBDF
AFIDEVICE 0 0x1d0f 0xf001 0000:34:00.0
```
And then these instructions: https://github.com/aws/aws-fpga/tree/f2/hdk/cl/examples/cl_dram_hbm_dma
```
$ cd aws-fpga/hdk/cl/examples/cl_dram_hbm_dma/software/runtime/
$ make
gcc -DCONFIG_LOGLEVEL=4 -std=gnu11 -g -Wall -Werror -I/home/ubuntu/aws-fpga/sdk/userspace/include -c -o test_dram_dma_common.o test_dram_dma_common.c
gcc -DCONFIG_LOGLEVEL=4 -std=gnu11 -g -Wall -Werror -I/home/ubuntu/aws-fpga/sdk/userspace/include -c -o test_dram_hbm_dma.o test_dram_hbm_dma.c
gcc -DCONFIG_LOGLEVEL=4 -std=gnu11 -g -Wall -Werror -I/home/ubuntu/aws-fpga/sdk/userspace/include -c -o test_dram_dma_hwsw_cosim.o test_dram_dma_hwsw_cosim.c
gcc -DCONFIG_LOGLEVEL=4 -std=gnu11 -g -Wall -Werror -I/home/ubuntu/aws-fpga/sdk/userspace/include -o test_dram_hbm_dma test_dram_hbm_dma.o test_dram_dma_common.o -lfpga_mgmt
gcc -DCONFIG_LOGLEVEL=4 -std=gnu11 -g -Wall -Werror -I/home/ubuntu/aws-fpga/sdk/userspace/include -o test_dram_dma_hwsw_cosim test_dram_dma_hwsw_cosim.o test_dram_dma_common.o -lfpga_mgmt
```
However it does not work.
```
$ sudo ./test_dram_hbm_dma
2025-09-02T00:34:07.475012Z, test_dram_hbm_dma, ERROR, test_dram_hbm_dma.c +124: dma_example(): unable to open read dma queue
2025-09-02T00:34:07.475059Z, test_dram_hbm_dma, ERROR, test_dram_hbm_dma.c +83: main(): DMA example failed
2025-09-02T00:34:07.475068Z, test_dram_hbm_dma, INFO, test_dram_hbm_dma.c +97: main(): TEST FAILED
```
Now the code does attempt to read a slot_id from the command line, which the instructions do not say to proivde:
```
int main(int argc, char **argv) {
int rc;
int slot_id = 0;
// int interrupt_n;
switch (argc) {
case 1:
break;
case 3:
sscanf(argv[2], "%x", &slot_id);
break;
```
So that means that it is defaulting to slot_id = 0, but given that case 1 above does not error, that seems to be simply the default.
Any suggestions please?
Contributor guide
Research direction
Start with hdk/README.md and hdk/cl/examples/cl_dram_hbm_dma, then inspect software/runtime/test_dram_hbm_dma.c around dma_example() and main(). Reproduce the documented build and sudo ./test_dram_hbm_dma invocation, checking how the slot ID and DMA queue are selected. Done means the tutorial command runs without the read DMA queue error, or the instructions clearly document the required invocation or setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, c
- Domain
- cli, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100