Results 1 to 3 of 3

Thread: Arria 10 PCIe Avalon-MM DMA Reference Design: Read/Write Timeout

  1. #1
    Join Date
    May 2018
    Posts
    3
    Rep Power
    1

    Default Arria 10 PCIe Avalon-MM DMA Reference Design: Read/Write Timeout

    Hi guys,

    I tried searching through the forum for this and found some posts on it but no solution to the issue. I am currently in possession of a Nallatech 385a PCIe card with an Arria 10 on it. I am running this on CentOS 7 and using Quartus Prime version 17.1. What I've done with the Avalon-MM DMA reference design ( https://www.altera.com/en_US/pdfs/li...e/an/an690.pdf ) is change the device and the pin assignments. The reference design archive package I am using is "hip_a10gx_g3_x8_avmm_dma256_1602_PS.qar". I am able to generate the HDL, fully compile, and program the .jic file into flash and restart the PC so the design saves and re-enumerates the PCIe bus properly. I am also able to make the test throughput code, install the driver, and run the program. However, the read/write test is timing out. I am able to see the device in lspci and output its details. Attached are screenshots of Quartus and the terminal output is below. Any and all help is greatly appreciated!

    Code:
    [arclab@p56-138 ~]$ cd Downloads/
    [arclab@p56-138 Downloads]$ cd avmm_dma_linux/
    [arclab@p56-138 avmm_dma_linux]$ su
    Password: 
    [root@p56-138 avmm_dma_linux]# make
    make -C /lib/modules/3.10.0-862.2.3.el7.x86_64/build M=/home/arclab/Downloads/avmm_dma_linux
    make[1]: Entering directory `/usr/src/kernels/3.10.0-862.2.3.el7.x86_64'
      Building modules, stage 2.
      MODPOST 1 modules
    make[1]: Leaving directory `/usr/src/kernels/3.10.0-862.2.3.el7.x86_64'
    [root@p56-138 avmm_dma_linux]# ./install
    rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.symvers *.order
    make -C /lib/modules/3.10.0-862.2.3.el7.x86_64/build M=/home/arclab/Downloads/avmm_dma_linux
    make[1]: Entering directory `/usr/src/kernels/3.10.0-862.2.3.el7.x86_64'
      LD      /home/arclab/Downloads/avmm_dma_linux/built-in.o
      CC [M]  /home/arclab/Downloads/avmm_dma_linux/altera_dma.o
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c: In function ‘init_rp_mem’:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:272:9: warning: unused variable ‘increment_value’ [-Wunused-variable]
         u32 increment_value = 0;
             ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c: In function ‘rp_ep_compare’:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:287:9: warning: unused variable ‘count’ [-Wunused-variable]
         u32 count = 1;
             ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:286:12: warning: unused variable ‘rp_tmp’ [-Wunused-variable]
         u32 j, rp_tmp, ep_tmp;
                ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c: In function ‘dma_test’:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:362:13: warning: unused variable ‘ep_tmp’ [-Wunused-variable]
     u32 rp_tmp, ep_tmp;
                 ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:362:5: warning: unused variable ‘rp_tmp’ [-Wunused-variable]
     u32 rp_tmp, ep_tmp;
         ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:361:12: warning: unused variable ‘j’ [-Wunused-variable]
         int i, j;
                ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:360:63: warning: unused variable ‘simul_write_count’ [-Wunused-variable]
         int loop_count = 0, num_loop_count = 1, simul_read_count, simul_write_count;
                                                                   ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:360:45: warning: unused variable ‘simul_read_count’ [-Wunused-variable]
         int loop_count = 0, num_loop_count = 1, simul_read_count, simul_write_count;
                                                 ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:360:25: warning: unused variable ‘num_loop_count’ [-Wunused-variable]
         int loop_count = 0, num_loop_count = 1, simul_read_count, simul_write_count;
                             ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:360:9: warning: unused variable ‘loop_count’ [-Wunused-variable]
         int loop_count = 0, num_loop_count = 1, simul_read_count, simul_write_count;
             ^
    In file included from /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:15:0:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c: At top level:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.h:171:12: warning: ‘rp_compare’ declared ‘static’ but never defined [-Wunused-function]
     static int rp_compare(u8 *virt_addr1, u8 *virt_addr2, u32 num_dwords);
                ^
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c: In function ‘rp_ep_compare.isra.5’:
    /home/arclab/Downloads/avmm_dma_linux/altera_dma.c:313:14: warning: ‘ep_tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
            printk(KERN_DEBUG "ep_tmp = %08x\n", ep_tmp);
                  ^
      Building modules, stage 2.
      MODPOST 1 modules
      CC      /home/arclab/Downloads/avmm_dma_linux/altera_dma.mod.o
      LD [M]  /home/arclab/Downloads/avmm_dma_linux/altera_dma.ko
    make[1]: Leaving directory `/usr/src/kernels/3.10.0-862.2.3.el7.x86_64'
    [root@p56-138 avmm_dma_linux]#
    
    
    
    
    
    **********************************************
    ** ALTERA AVMM DMA driver                   **
    ** version 2.02                              **
    ** 1) start DMA                             **
    ** 2) enable/disable read dma               **
    ** 3) enable/disable write dma              **
    ** 4) enable/disable simul dma              **
    ** 5) set num dwords (256 - 2048)           **
    ** 6) set num descriptors (1 - 128)         **
    ** 8) loop dma                              **
    ** 10) exit                                 **
    **********************************************
    Run Read                ? 1
    Run Write               ? 1
    Run Simultaneous        ? 1
    Read Passed             ? 0
    Write Passed            ? 0
    Simultaneous Passed     ? 0
    Read EPLast timeout     ? 1
    Write EPLast timeout    ? 1
    Number of Dwords/Desc   : 512
    Number of Descriptors   : 128
    Length of transfer      : 256 KB
    Rootport address offset : 0
    Read Time               : 0 s and 249767 us
    Read Throughput         : 0.000978 GB/S
    Write Time              : 0 s and 216415 us
    Write Throughput        : 0.001128 GB/S
    Simultaneous Time       : 0 s and 270368 us
    Simultaneous Throughput : 0.001807 GB/S
    # 
    
    
    
    
    
    [arclab@p56-138 ~]$ sudo lspci -s 01:00.0 -vvv
    [sudo] password for arclab: 
    01:00.0 Non-VGA unclassified device: Altera Corporation Device e003 (rev 01)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 33
        Region 0: Memory at f0120000 (64-bit, prefetchable) [size=512]
        Region 4: Memory at f0100000 (64-bit, prefetchable) [size=128K]
        Capabilities: [50] MSI: Enable+ Count=1/4 Maskable- 64bit+
            Address: 00000000fee003d8  Data: 0000
        Capabilities: [78] Power Management version 3
            Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
            Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [80] Express (v2) Endpoint, MSI 00
            DevCap:    MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 75.000W
            DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                MaxPayload 256 bytes, MaxReadReq 512 bytes
            DevSta:    CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
            LnkCap:    Port #1, Speed 8GT/s, Width x8, ASPM not supported, Exit Latency L0s <4us, L1 <1us
                ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
            LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
            LnkSta:    Speed 8GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
            DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
            DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
            LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                 Compliance De-emphasis: -6dB
            LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+
                 EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
        Capabilities: [100 v1] Virtual Channel
            Caps:    LPEVC=0 RefClk=100ns PATEntryBits=1
            Arb:    Fixed- WRR32- WRR64- WRR128-
            Ctrl:    ArbSelect=Fixed
            Status:    InProgress-
            VC0:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                Ctrl:    Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                Status:    NegoPending- InProgress-
        Capabilities: [200 v1] Vendor Specific Information: ID=1172 Rev=0 Len=044 <?>
        Capabilities: [300 v1] #19
        Capabilities: [800 v1] Advanced Error Reporting
            UESta:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
            UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
            UESvrt:    DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
            CESta:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
            CEMsk:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
            AERCap:    First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
        Kernel driver in use: Altera DMA
    
    [arclab@p56-138 ~]$ 
    
    
    
    
    
    [arclab@p56-138 ~]$ ls /dev/ -l
    total 0
    crw-rw-rw-.  1 root root    243,   0 May 16 19:16 altera_dma

  2. #2
    Join Date
    May 2018
    Posts
    3
    Rep Power
    1

    Default Re: Arria 10 PCIe Avalon-MM DMA Reference Design: Read/Write Timeout

    Some additional output from dmesg:

    Code:
    [  321.850314] altera_dma: loading out-of-tree module taints kernel.
    [  321.850403] altera_dma: module verification failed: signature and/or required key missing - tainting kernel
    [  321.850999] Altera DMA: altera_dma_init(), May 18 2018 17:29:59 
    [  321.851078] Altera DMA 0000:01:00.0: pci_enable_device() successful
    [  321.851106] Altera DMA 0000:01:00.0: irq 33 for MSI/MSI-X
    [  321.851114] Altera DMA 0000:01:00.0: pci_enable_msi() successful
    [  321.851118] Altera DMA 0000:01:00.0: using a 64-bit irq mask
    [  321.851120] Altera DMA 0000:01:00.0: irq pin: 1
    [  321.851122] Altera DMA 0000:01:00.0: irq line: 11
    [  321.851124] Altera DMA 0000:01:00.0: irq: 33
    [  321.851125] Altera DMA 0000:01:00.0: request irq: 11
    [  321.851128] Altera DMA 0000:01:00.0: BAR[0] 0xf0110000-0xf01101ff flags 0x0014220c, length 512
    [  321.851130] Altera DMA 0000:01:00.0: BAR[1] 0x00000000-0x00000000 flags 0x00000000, length 0
    [  321.851133] Altera DMA 0000:01:00.0: BAR[2] 0x00000000-0x00000000 flags 0x00000000, length 0
    [  321.851135] Altera DMA 0000:01:00.0: BAR[3] 0x00000000-0x00000000 flags 0x00000000, length 0
    [  321.851138] Altera DMA 0000:01:00.0: BAR[4] 0xf0100000-0xf010ffff flags 0x0014220c, length 65536
    [  321.851140] Altera DMA 0000:01:00.0: BAR[5] 0x00000000-0x00000000 flags 0x00000000, length 0
    [  321.851154] Altera DMA 0000:01:00.0: BAR[0] mapped to 0xffffabf100e46000, length 512
    [  321.851159] Altera DMA 0000:01:00.0: BAR[4] mapped to 0xffffabf100ee0000, length 65536
    [  328.478147] Read DMA times out
    [  328.478150] DWORD = 00000200
    [  328.478151] Desc = 00000080
    [  328.713177] Write DMA times out
    [  328.713179] DWORD = 00000200
    [  328.713179] Desc = 00000080
    [  329.016553] Simultaneous DMA times out
    [  329.016555] DWORD = 00000200
    [  329.016556] Desc = 00000080

  3. #3
    Join Date
    May 2018
    Posts
    3
    Rep Power
    1

    Default Re: Arria 10 PCIe Avalon-MM DMA Reference Design: Read/Write Timeout

    Still struggling to understand what's going on here. Same error on both Windows 10 and CentOS. I have a dual boot setup on the same PC where the card is installed. Extension cable is not used here. I've also attempted to change the memory maps for RD/WR master and the device ID, still the same result. I never have an issue with seeing the device nor is the BARs disabled, I just can't read/write to the on chip RAM. I'm at a loss here as to what the issue would be.

Similar Threads

  1. Replies: 2
    Last Post: November 28th, 2017, 04:53 PM
  2. Replies: 5
    Last Post: November 20th, 2017, 05:18 PM
  3. [ARRIA V GX STARTER KIT] USB read/write registers to Arria V
    By KRONIC1968 in forum Development Kit Related
    Replies: 2
    Last Post: February 8th, 2015, 11:41 PM
  4. Qsys pcie ref design - read and write descriptors
    By dsmithx3 in forum IP Discussion
    Replies: 2
    Last Post: September 26th, 2011, 12:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •