kastnerrg / riffa Goto Github PK
View Code? Open in Web Editor NEWThe RIFFA development repository
Home Page: https://riffa.ucsd.edu
License: Other
The RIFFA development repository
Home Page: https://riffa.ucsd.edu
License: Other
I have tried with linux kernel 4.4, 4.13 and 4.15.5 , testutil check is only giving me around 1.5Gbps for very large sample size.
@marzoul Does it have to do with the paging mechanism in the newer linux kernel as you had modified for #18 ? I suspect that it is something else because linux kernel 4.4 is also affected as per my experience. Could you advise ?
Is there a way to debug this bandwidth reduction issue using the linux driver compiled ("make debug") with debug support enabled ?
Why am I only getting 65536 words when I sent 99999 words ?
kernel log for "./testutil 2 0 0 99999"
phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/c_c++/linux/x64/test_apps$ ./testutil 2 0 0 9999999999
Test 0: words sent: 1048576
Test 0: words recv: 1048576
Test 1: words sent: 1048576
Test 1: words recv: 1048576
send bw: 1474.287238
recv bw: 1507.535028
Test 2: words sent: 1048576
Test 2: words recv: 1048576
send bw: 1447.335230
recv bw: 1542.593983
Test 3: words sent: 1048576
Test 3: words recv: 1048576
send bw: 1498.592916
recv bw: 1565.649247
Test 4: words sent: 1048576
Test 4: words recv: 1048576
send bw: 1502.262083
recv bw: 1548.852252
Test 5: words sent: 1048576
Test 5: words recv: 1048576
send bw: 1503.840090
recv bw: 1564.508623
Test 6: words sent: 1048576
Test 6: words recv: 1048576
send bw: 1498.462205
recv bw: 1551.229723
Test 7: words sent: 1048576
Test 7: words recv: 1048576
send bw: 1444.293332
recv bw: 1548.852252
Test 8: words sent: 1048576
Test 8: words recv: 1048576
send bw: 1443.807814
recv bw: 1518.595349
Test 9: words sent: 1048576
Test 9: words recv: 1048576
send bw: 1436.924488
recv bw: 1534.053861
Test 10: words sent: 1048576
Test 10: words recv: 1048576
send bw: 1470.627391
recv bw: 1536.935873
Test 11: words sent: 1048576
Test 11: words recv: 1048576
send bw: 1467.110947
recv bw: 1547.735963
Test 12: words sent: 1048576
Test 12: words recv: 1048576
send bw: 1475.806991
recv bw: 1501.736817
Test 13: words sent: 1048576
Test 13: words recv: 1048576
send bw: 1449.288779
recv bw: 1538.587604
Test 14: words sent: 1048576
Test 14: words recv: 1048576
send bw: 1456.291361
recv bw: 1550.529710
Test 15: words sent: 1048576
Test 15: words recv: 1048576
send bw: 1451.860829
recv bw: 1530.227949
Test 16: words sent: 1048576
Test 16: words recv: 1048576
send bw: 1459.384063
recv bw: 1555.161508
Test 17: words sent: 1048576
Test 17: words recv: 1048576
send bw: 1431.894414
recv bw: 1516.986241
Test 18: words sent: 1048576
Test 18: words recv: 1048576
send bw: 1453.334674
recv bw: 1501.736817
Test 19: words sent: 1048576
Test 19: words recv: 1048576
send bw: 1447.335230
recv bw: 1539.138970
Test 20: words sent: 1048576
Test 20: words recv: 1048576
send bw: 1441.869004
recv bw: 1503.313719
Test 21: words sent: 1048576
Test 21: words recv: 1048576
send bw: 1457.279598
recv bw: 1548.852252
Test 22: words sent: 1048576
Test 22: words recv: 1048576
send bw: 1454.318902
recv bw: 1557.558403
Test 23: words sent: 1048576
Test 23: words recv: 1048576
send bw: 1445.751846
recv bw: 1507.667326
Test 24: words sent: 1048576
Test 24: words recv: 1048576
send bw: 1459.880114
recv bw: 1531.319118
Test 25: words sent: 1048576
Test 25: words recv: 1048576
send bw: 1469.118282
recv bw: 1516.450630
Test 26: words sent: 1048576
Test 26: words recv: 1048576
send bw: 1439.452801
recv bw: 1561.522376
Test 27: words sent: 1048576
Test 27: words recv: 1048576
send bw: 1472.644367
recv bw: 1531.319118
Test 28: words sent: 1048576
Test 28: words recv: 1048576
send bw: 1465.984229
recv bw: 1553.474020
Test 29: words sent: 1048576
Test 29: words recv: 1048576
send bw: 1503.313719
recv bw: 1566.791535
Test 30: words sent: 1048576
Test 30: words recv: 1048576
send bw: 1503.313719
recv bw: 1564.508623
Test 31: words sent: 1048576
Test 31: words recv: 1048576
send bw: 1475.300059
recv bw: 1574.401501
Test 32: words sent: 1048576
Test 32: words recv: 1048576
send bw: 1481.534079
recv bw: 1582.668741
Test 33: words sent: 1048576
Test 33: words recv: 1048576
send bw: 1477.329881
recv bw: 1551.229723
Test 34: words sent: 1048576
Test 34: words recv: 1048576
send bw: 1482.556885
recv bw: 1559.821063
Test 35: words sent: 1048576
Test 35: words recv: 1048576
send bw: 1486.276424
recv bw: 1549.411001
Test 36: words sent: 1048576
Test 36: words recv: 1048576
send bw: 1484.735043
recv bw: 1562.232353
Test 37: words sent: 1048576
Test 37: words recv: 1048576
send bw: 1480.002514
recv bw: 1562.090306
Test 38: words sent: 1048576
Test 38: words recv: 1048576
send bw: 1506.609593
recv bw: 1566.220183
Test 39: words sent: 1048576
Test 39: words recv: 1048576
send bw: 1468.615933
recv bw: 1567.363305
Test 40: words sent: 1048576
Test 40: words recv: 1048576
send bw: 1486.276424
recv bw: 1555.161508
Test 41: words sent: 1048576
Test 41: words recv: 1048576
send bw: 1502.787717
recv bw: 1570.371955
Test 42: words sent: 1048576
Test 42: words recv: 1048576
send bw: 1488.336584
recv bw: 1558.123452
Test 43: words sent: 1048576
Test 43: words recv: 1048576
send bw: 1475.300059
recv bw: 1562.800799
Test 44: words sent: 1048576
Test 44: words recv: 1048576
send bw: 1462.365440
recv bw: 1581.066555
Test 45: words sent: 1048576
Test 45: words recv: 1048576
send bw: 1471.635188
recv bw: 1548.293906
Test 46: words sent: 1048576
Test 46: words recv: 1048576
send bw: 1491.049226
recv bw: 1536.386083
Test 47: words sent: 1048576
Test 47: words recv: 1048576
send bw: 1489.497935
recv bw: 1544.813343
Test 48: words sent: 1048576
Test 48: words recv: 1048576
send bw: 1487.305790
recv bw: 1546.064541
Test 49: words sent: 1048576
Test 49: words recv: 1048576
send bw: 1499.508526
recv bw: 1555.302298
Test 50: words sent: 1048576
Test 50: words recv: 1048576
send bw: 1494.811553
recv bw: 1561.522376
Test 51: words sent: 1048576
Test 51: words recv: 1048576
send bw: 1500.556309
recv bw: 1543.702865
Test 52: words sent: 1048576
Test 52: words recv: 1048576
send bw: 1495.331986
recv bw: 1534.739073
Test 53: words sent: 1048576
Test 53: words recv: 1048576
send bw: 1447.335230
recv bw: 1520.207874
Test 54: words sent: 1048576
Test 54: words recv: 1048576
send bw: 1503.840090
recv bw: 1564.508623
Test 55: words sent: 1048576
Test 55: words recv: 1048576
send bw: 1476.441147
recv bw: 1564.936162
Test 56: words sent: 1048576
Test 56: words recv: 1048576
send bw: 1488.336584
recv bw: 1578.016826
Test 57: words sent: 1048576
Test 57: words recv: 1048576
send bw: 1457.403222
recv bw: 1538.587604
Test 58: words sent: 1048576
Test 58: words recv: 1048576
send bw: 1493.771775
recv bw: 1551.089670
Test 59: words sent: 1048576
Test 59: words recv: 1048576
send bw: 1488.336584
recv bw: 1552.912337
Test 60: words sent: 1048576
Test 60: words recv: 1048576
send bw: 1474.287238
recv bw: 1563.227405
Test 61: words sent: 1048576
Test 61: words recv: 1048576
send bw: 1488.981555
recv bw: 1560.954860
Test 62: words sent: 1048576
Test 62: words recv: 1048576
send bw: 1467.612266
recv bw: 1538.587604
Test 63: words sent: 1048576
Test 63: words recv: 1048576
send bw: 1497.417344
recv bw: 1565.649247
Test 64: words sent: 1048576
Test 64: words recv: 1048576
send bw: 1488.852516
recv bw: 1550.529710
Test 65: words sent: 1048576
Test 65: words recv: 1048576
send bw: 1490.014673
recv bw: 1548.852252
Test 66: words sent: 1048576
Test 66: words recv: 1048576
send bw: 1495.852780
recv bw: 1548.293906
Test 67: words sent: 1048576
Test 67: words recv: 1048576
send bw: 1479.492696
recv bw: 1557.417205
Test 68: words sent: 1048576
Test 68: words recv: 1048576
send bw: 1486.276424
recv bw: 1556.288539
Test 69: words sent: 1048576
Test 69: words recv: 1048576
send bw: 1487.949869
recv bw: 1555.161508
Test 70: words sent: 1048576
Test 70: words recv: 1048576
send bw: 1501.211918
recv bw: 1557.558403
Test 71: words sent: 1048576
Test 71: words recv: 1048576
send bw: 1471.761260
recv bw: 1563.227405
Test 72: words sent: 1048576
Test 72: words recv: 1048576
send bw: 1483.709231
recv bw: 1549.411001
Test 73: words sent: 1048576
Test 73: words recv: 1048576
send bw: 1501.736817
recv bw: 1542.040139
^C
phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/c_c++/linux/x64/test_apps$ uname -a
Linux UbuntuHW15 4.15.5-041505-generic #201802261304 SMP Mon Feb 26 18:05:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/c_c++/linux/x64/test_apps$
Hi, i think i found a bug.
In tx_alignment_inst module, when TX_PKT_READY is not always ready, then the TX_PKT is worng(lost data when TX_PKT_READY is low), pls check!!!
uname -a
Linux m4800 5.4.0-65-generic #73~18.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
sudo make setup
if [ -f "/etc/redhat-release" ]; then yum install kernel-devel-uname -r
;
else apt-get install linux-headers-uname -r
; fi
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-5.4.0-65-generic is already the newest version (5.4.0-65.73~18.04.1).
The following packages were automatically installed and are no longer required:
amd64-microcode intel-microcode iucode-tool libssl1.1:i386 linux-image-generic-hwe-18.04 thermald
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sudo make
Compiling driver for kernel: 5.4.0-65-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-65-generic'
make[2]: *** No rule to make target 'arch/x86/tools/relocs_32.c', needed by 'arch/x86/tools/relocs_32.o'. Stop.
arch/x86/Makefile:232: recipe for target 'archscripts' failed
make[1]: *** [archscripts] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-65-generic'
Makefile:94: recipe for target 'riffa.ko' failed
make: *** [riffa.ko] Error 2
What I'm doing wrong?
Hello,
We have currently imported the driver repo into a new KMDF visual studio 2019 project, and compiled using windows 10 driver tools, The build is succesful, (with test certificates), but later on the driver is not recognized on the target machine with the riffa device connected, the device manager does not show any riffa related pci hardware.
Anyone that has succesfully build on/for windows 10? is it possible?
Reagards
Pau
Why the recvBuffer[3:0] always is not equal to the sendBuffer[3:0] in testutil.c ?
I am new to driver installations. Can someone help me with the installation issue? I tried to install riffa on my ubuntu system and received the following error message:
erginatalar@AtalarUbuntu:~/Programming/riffa-master/driver/linux$ sudo make debug
Compiling driver for kernel: 5.19.0-38-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DEBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-38-generic'
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'. Stop.
make[1]: *** [arch/x86/Makefile:232: archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-38-generic'
make: *** [Makefile:101: riffa.ko] Error 2
riffa/fpga/riffa_hdl/tx_alignment_pipeline.v
Line 163 in 4e9d3c8
Going through the verilog code, it appears to never be set. Did something get dropped in a recent version?
Hi,
Can RIFFA be used with a PCIe x1 gen2 FPGA ?
Thanks in advance for your answer !
Regards.
This project looks like something created just for our Hastlayer project!
Hastlayer automatically converts .NET programs into equivalent hardware descriptions and seamlessly swaps out software method calls with hardware executions (it's a bit like a programmer-focused HLS tool). We need a (preferably) multi-platform (as in OS and FPGA) way of supporting high-performance PCIe FPGAs and have an FPGA-side and host PC-side framework for communication where we can plug the IP cores generated by Hastlayer into and the rest is taken care of for us.
Let me have some questions:
Dear Dustin Richmond,
I am Holguer Andres Becerra, a masters student at University of British Columbia,
Currently, I am trying to implement RIFFA(your nice contribution) using the DE4 board Terasic EP4SGX230, however, none of the bit files you uploaded worked for me, the computer simply does not boot up when I program the FPGA as non-volatil, for that reason I recompiled the DE4 version to change some details to find the problem (maybe the latency, number of lanes, etc), but even so, I could not make it work,
For that reason, I am really interested in seeing if you can enlighten me with a piece of advice, or even better with a working template for this board(DE4 terasic EP4SGX230) , I am really interested in implementing your RIFFA contribution on my project, but I have been having troubles with it.
I hope you can help me out,
Thanks in advance,
Best Regards
Hi,
I'm having a problem with the riffa driver. I installed without any errors, but when is loaded in the system, I have this error:
[ 7.405537] riffa: module verification failed: signature and/or required key missing - tainting kernel
[ 7.405776] riffa: found FPGA with name: 0000:01:00.00
[ 7.405780] riffa: vendor id: 0x10EE
[ 7.405782] riffa: device id: 0x6018
[ 7.405785] riffa: BAR 0 address: fe600000
[ 7.405788] riffa: BAR 0 length: 1048576 bytes
[ 7.405790] riffa: BAR 0 incorrect length
I don't know why the length is not 1024... I'm using Ubuntu 16.04 with, kernel 4.4.0-31-generic, FPGA Xilinx ML605. I tried with all the versions of the riffa driver, and with other kernels, but I couldn' solve the problem.
Any clue on what is going on?
Thank you very much,
Lois
During linux driver compilation, I have such following errors https://gist.github.com/anonymous/8c2f7fd050696f6986ba22750c57fe67
`Compiling driver for kernel: 4.10.0-42-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-42-generic'
CC [M] /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: In function ‘fill_sg_buf’:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:447:59: error: passing argument 5 of ‘get_user_pages’ from incompatible pointer type [-Werror=incompatible-pointer-types]
num_pages = get_user_pages(udata, num_pages_reqd, 1, 0, pages, NULL);
^
In file included from ./include/linux/scatterlist.h:7:0,
from ./include/linux/dmapool.h:14,
from ./include/linux/pci.h:1287,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mm.h:1293:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:447:15: error: too many arguments to function ‘get_user_pages’
num_pages = get_user_pages(udata, num_pages_reqd, 1, 0, pages, NULL);
^
In file included from ./include/linux/scatterlist.h:7:0,
from ./include/linux/dmapool.h:14,
from ./include/linux/pci.h:1287,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mm.h:1293:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: At top level:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1533:8: error: type defaults to ‘int’ in declaration of ‘DEFINE_PCI_DEVICE_TABLE’ [-Werror=implicit-int]
static DEFINE_PCI_DEVICE_TABLE(fpga_ids) = {
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1533:1: warning: parameter names (without types) in function declaration
static DEFINE_PCI_DEVICE_TABLE(fpga_ids) = {
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1533:1: error: function ‘DEFINE_PCI_DEVICE_TABLE’ is initialized like a variable
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:2: warning: braces around scalar initializer
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:0:
./include/linux/pci.h:725:2: error: field name not in record or union initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:12: error: invalid initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:12: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:20: error: field name not in record or union initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:30: warning: excess elements in scalar initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:725:30: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:726:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:726:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
In file included from ./include/linux/pci.h:20:0,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:0:
./include/linux/pci.h:726:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/pci.h:726:27: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
In file included from ./include/linux/pci.h:20:0,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1534:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID0, PCI_ANY_ID)},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:2: warning: braces around scalar initializer
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:0:
./include/linux/pci.h:725:2: error: field name not in record or union initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:12: error: invalid initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:12: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:20: error: field name not in record or union initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:30: warning: excess elements in scalar initializer
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:725:30: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:726:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:726:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
In file included from ./include/linux/pci.h:20:0,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:0:
./include/linux/pci.h:726:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/pci.h:726:27: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
In file included from ./include/linux/pci.h:20:0,
from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:52:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
#define PCI_ANY_ID (~0)
^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:2: warning: excess elements in scalar initializer
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1535:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:2: warning: braces around scalar initializer
{0},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:3: error: invalid initializer
{0},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:3: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:2: warning: excess elements in scalar initializer
{0},
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1536:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:46:0:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1539:26: error: ‘fpga_ids’ undeclared here (not in a function)
MODULE_DEVICE_TABLE(pci, fpga_ids);
^
./include/linux/module.h:213:21: note: in definition of macro ‘MODULE_DEVICE_TABLE’
extern const typeof(name) mod##type##_##name##_device_table
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1533:8: warning: ‘DEFINE_PCI_DEVICE_TABLE’ defined but not used [-Wunused-function]
static DEFINE_PCI_DEVICE_TABLE(fpga_ids) = {
^
In file included from /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:46:0:
./include/linux/module.h:213:27: error: ‘_mod_pci__fpga_ids_device_table’ aliased to undefined symbol ‘fpga_ids’
extern const typeof(name) mod##type####name##_device_table
^
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:1539:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
MODULE_DEVICE_TABLE(pci, fpga_ids);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o' failed
make[2]: *** [/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o] Error 1
Makefile:1524: recipe for target 'module/home/phung/Documents/fpga_overlay/riffa/driver/linux' failed
make[1]: *** [module/home/phung/Documents/fpga_overlay/riffa/driver/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-42-generic'
Makefile:94: recipe for target 'riffa.ko' failed
make: *** [riffa.ko] Error 2
`
Hi,
When I compile the RIFFA driver on the target (JTX1) I have this make command error :
make: Warning: File `circ_queue.c' has modification time 9.9e+07 s in the future
Compiling driver for kernel: 3.10.67-g458d45c with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DEBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules
make[1]: Entering directory/usr/src/linux-headers-3.10.67-g458d45c' make[1]: Warning: File
/usr/src/linux-headers-3.10.67-g458d45c/arch/arm64/Makefile' has modification time 1.1e+08 s in the future
make[2]: Warning: Filescripts/Makefile.lib' has modification time 1.1e+08 s in the future CC [M] /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.o /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c: In function ‘fpga_probe’: /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c:1200:76: error: ‘PCI_EXP_DEVCTL2_IDO_REQ_EN’ undeclared (first use in this function) error = pcie_capability_write_dword(dev,PCI_EXP_DEVCTL2,(devctl2_result | PCI_EXP_DEVCTL2_IDO_REQ_EN | PCI_EXP_DEVCTL2_IDO_CMP_EN)); ^ /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c:1200:76: note: each undeclared identifier is reported only once for each function it appears in /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c:1200:105: error: ‘PCI_EXP_DEVCTL2_IDO_CMP_EN’ undeclared (first use in this function) error = pcie_capability_write_dword(dev,PCI_EXP_DEVCTL2,(devctl2_result | PCI_EXP_DEVCTL2_IDO_REQ_EN | PCI_EXP_DEVCTL2_IDO_CMP_EN)); ^ /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c: In function ‘fpga_remove’: /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c:1445:61: error: ‘PCI_EXP_DEVCTL2_IDO_REQ_EN’ undeclared (first use in this function) pcie_capability_write_dword(dev,PCI_EXP_DEVCTL2,result & ~(PCI_EXP_DEVCTL2_IDO_REQ_EN | PCI_EXP_DEVCTL2_IDO_CMP_EN)); ^ /home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.c:1445:90: error: ‘PCI_EXP_DEVCTL2_IDO_CMP_EN’ undeclared (first use in this function) pcie_capability_write_dword(dev,PCI_EXP_DEVCTL2,result & ~(PCI_EXP_DEVCTL2_IDO_REQ_EN | PCI_EXP_DEVCTL2_IDO_CMP_EN)); ^ make[2]: *** [/home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux/riffa_driver.o] Error 1 make[1]: *** [_module_/home/ubuntu/RIFFA_tmp/riffa_2.2.1/source/driver/linux] Error 2 make[1]: Leaving directory
/usr/src/linux-headers-3.10.67-g458d45c'
make: *** [riffa.ko] Error 2
One solution to solve the #include <slab.h>
problem should be to put the include in circ_queue.h
.
About the pci_regs.h
#define
, during the driver compilation the pci #define
in #if LINUX_VERSION_CODE <= (KERNEL_VERSION(3,6,11))
statement are not defined although the L4T 23.2 kernel has the 3.10.67 version.
S. P
P.S: I'm using the 2.2.1 zip version available on the website and my GCC version is the 4.8 for arm64 architecture (compilation on the target).
It seems that there is a typo here
riffa/fpga/xilinx/vc709/riffa_wrapper_vc709.v
Line 286 in 4e9d3c8
I think it should be
assign config_link_rate = CFG_CURRENT_SPEED[2]? 2'b11 : CFG_CURRENT_SPEED[1] ? 2'b10 : 2'b01;
According to the Ultrascale datasheet
Current Link Speed
This signal outputs the current link speed from Link Status
register bits 1 down to 0. This field indicates the negotiated
Link speed of the given PCI Express Link.
• 001b: 2.5 GT/s PCI Express Link
• 010b: 5.0 GT/s PCI Express Link
• 100b: 8.0 GT/s PCI Express Link
I think you are trying to change the 1 hot bits to a 2 bit unsigned number right?
Greetings.
Although it states clear at the documentation that for Virtex5 boards we should uses the Riffa 1.0 would it be possible to add support for ML505 boards (virtex5) for Riffa 2?
I recently got a number of Ml505 boards and i was thinking of using them as crypto acceleration co-processesors and Riffa sounds ideal.
I don't have much experience with the pci-e cores between the different xilinx generations so i was wondering what might the hold back be and whether i should try it.
In the past i have worked with this board
https://opencores.org/project,spartan6_pcie
and have written some libraries to communicate over the pci(e) bus but was far from perfect.
This line creates a new event for every fpga_recv()
.
It seems we have a handle leak here?
riffa/c_c++/windows/x64/riffa.c
Line 177 in 4e9d3c8
I thought it's wired that the functions.vh file was included in async_fifo_fwft.v inside the module
while all other .v file like translation_xilinx.v -> trellis.vh -> functions.vh, included in the front of the file.
AND when simulation, it will generate a error "function not decleared" when building,
ps: in my file list async_fifo_fwft.v is the first file, when move the `include "functions.vh" row to the header of the file , it's OK。
BUT, it should NOT dependent on the file position in the file list, should not it ?
This causes a missing first-dword in about 1-in-10 transfers.
Does not seem to affect Altera (unlikely it's a logic bug in our code)
https://github.com/KastnerRG/riffa/blob/master/fpga/riffa_hdl/chnl_tester.v#L128 is only cheating the receiving part. This means we are not actually using the actual data received from linux driver, instead we just use self-defined counter.
The problem with this is that we will only be able to compute result from 1 onwards with linear increasing trend. Therefore, it will pose a problem for user verilog logic coding integration which will not follow the same linear increasing trend.
Could you advise ?
Hi~when i use "make" and "make install" trying to compile and install riffa, a lot of errors occured:
------------------------------------------errors------------------------------------------------------------------------
/home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:1343:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:58:0:
./include/linux/pci.h:858:2: error: field name not in record or union initializer
.vendor = (vend), .device = (dev),
^
/home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:1343:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^~~~~~~~~~
./include/linux/pci.h:858:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:1343:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^~~~~~~~~~
./include/linux/pci.h:858:12: error: invalid initializer
.vendor = (vend), .device = (dev),
^
/home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:1343:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^~~~~~~~~~
./include/linux/pci.h:858:12: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
.vendor = (vend), .device = (dev),
^
/home/msl/SoftWare/riffa_2.1/source/driver/linux/riffa_driver.c:1343:3: note: in expansion of macro ‘PCI_DEVICE’
{PCI_DEVICE(VENDOR_ID1, PCI_ANY_ID)},
^~~~~~~~~~
------------------------------------------errors------------------------------------------------------------------------
my os is ubuntu18.0.4, i'm really confused.
since there is little info about this kind of problem, i have to come to you for help, if you can give me some tips, i'd be very glad~thank u
fpga/riffa_hdl/counter.v: /* verilator lint_off WIDTH /
fpga/riffa_hdl/counter.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/engine_layer.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/engine_layer.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/offset_to_mask.v: / verilator lint_off CASEX /
fpga/riffa_hdl/offset_to_mask.v: / verilator lint_on CASEX /
fpga/riffa_hdl/pipeline.v:/ verilator lint_off UNOPTFLAT /
fpga/riffa_hdl/pipeline.v:/ verilator lint_on UNOPTFLAT /
fpga/riffa_hdl/registers.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/registers.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/rxc_engine_ultrascale.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/rxc_engine_ultrascale.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/rxr_engine_ultrascale.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/rxr_engine_ultrascale.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/tlp.vh: / verilator lint_off CASEX /
fpga/riffa_hdl/tlp.vh: / verilator lint_on CASEX /
fpga/riffa_hdl/tlp.vh: / verilator lint_off CASEX /
fpga/riffa_hdl/tlp.vh: / verilator lint_on CASEX /
fpga/riffa_hdl/tx_data_fifo.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/tx_data_fifo.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/tx_engine_classic.v: / verilator lint_off WIDTH /
fpga/riffa_hdl/tx_engine_classic.v: / verilator lint_on WIDTH /
fpga/riffa_hdl/ultrascale.vh: / verilator lint_off CASEX /
fpga/riffa_hdl/ultrascale.vh: / verilator lint_on CASEX /
fpga/riffa_hdl/ultrascale.vh: / verilator lint_off CASEX /
fpga/riffa_hdl/ultrascale.vh: / verilator lint_on CASEX */
When I grep for 'verilator' , I had the above search result. However, I could not find any c++ verilator testbench for the verilog coding in the github repo. Could anyone advise ?
Alternatively, let me rephare my question: where could I find the testbench for RIFFA verilog coding ?
Correspondence from RIFFA Users Mailing list:
In riffa_driver.c, can you find the method declaration for __udivdi3, and change the method header as seen below:
Currently:
unsigned long long __udivdi3(unsigned long long num, unsigned long long den)
Suggested change:
unsigned long long __udivdi3(unsigned long long num, unsigned long den)
After this, recompile the driver and reinstall. Afterward, send the output of dmesg | grep riffa
I am going to file this as a bug on github, and attach our correspondence
Dear Kastner,
This is Brian and i am having a customized Virtex 6 board with the same pinouts as ML605 and the only different is the LE which the board is using the 365t 1156-1 instead of 240t 1156-1 .
The problem currently i facing is that the softer example the testutil.exe do able to read out the device 0 i.e. the FPGA board with the correct ID etc.
While i tried to run the command 2 0 0 XX it fails to write in and timeout.
Is there are clued how to solve such issue?
Thank for having an open source PCIe driver and sample.
Bests,
Brian
Hi there,
I've noticed that after some transactions (which is a random number of times), the core stalls and stops acknowledging new transaction in the hardware side (don't know about the software side).
The only way i found to unlock the situation is to reset the whole core which is quite inconvenient.
Even if i detect the defect by using a timeout a restarting the transfert (deasserting CHNL_TX and reasserting it), it won't acknowledge it.
Have you ever encountered this before ? And is there a fix for this ?
I'm using Riffa 2.2.1
EDIT:
I've investigate a little bit,
In tx_port_monitor_64, the state machine is stalled in S_TXPORTMON64_TXN because ACK is never asserted.
I'm now tracing NEW_TXN_ACK in tx_port_writer to see why it is never asserted.
Greetings
Can you point out why the num_fpgas was limited to 5? I rebuilt it and checked it with 8 boards but faced some issues and wrong behavior..
I am reading your code base to understand how it works. So i haven't run it yet to check if it works.
i am looking at version 2.2.1 (the latest one)
In the tx_port_128.v you specify a wire:
wire [C_DATA_WIDTH:0] wGateData; // this is [128:0]
this wire connects tx_port_channel_gate_128 and tx_port_monitor_128.
However, the port definition of tx_port_channel_gate:
output [C_FIFO_DATA_WIDTH-1:0] RD_DATA, // FIFO read data
is not matching the wGateData
wire, also the internal signals rFifoData, _rFifoData
are not matching it, even though rFifoData[128] is assigned a value.
Correctly, in tx_port_monitor_128, the port definition is:
input [C_DATA_WIDTH:0] EVT_DATA, // Event data from tx_port_channel_gate
I don't know it this shows up as a bug when the circuit is used, but it is clearly a bug when reading the code.
Thanks,
David
PS: if you prefer, i can create a pull request with the fix for this.
Hello,
I executed "sudo make" command and report the error, I don't know what causes this error, Please help to take a look at this issue, thanks!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
host@host-System-Product-Name:/home/work/riffa_master_mz/driver/linux$ sudo make
Compiling driver for kernel: 5.8.0-59-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build M=/home/work/riffa_master_mz/driver/linux modules
make[1]: 进入目录“/usr/src/linux-headers-5.8.0-59-generic”
CC [M] /home/work/riffa_master_mz/driver/linux/riffa_driver.o
/home/work/riffa_master_mz/driver/linux/riffa_driver.c: In function ‘fill_sg_buf’:
/home/work/riffa_master_mz/driver/linux/riffa_driver.c:449:27: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
449 | down_read(¤t->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/work/riffa_master_mz/driver/linux/riffa_driver.c:457:25: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
457 | up_read(¤t->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
make[2]: *** [scripts/Makefile.build:286:/home/work/riffa_master_mz/driver/linux/riffa_driver.o] 错误 1
make[1]: *** [Makefile:1785:/home/work/riffa_master_mz/driver/linux] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.8.0-59-generic”
make: *** [Makefile:101:riffa.ko] 错误 2
When I ran "make" under riffa/driver/linux directory, the following errors were generated:
jinwen@xbx-jixi-09:~/projects/riffa/driver/linux$ make debug
Compiling driver for kernel: 4.18.0-22-generic with the following values
NAME: 'riffa'
MAJNUM: '100'
VENDOR_ID0: '10EE'
VENDOR_ID1: '1172'
sed -i 's/#define MAJOR_NUM [^\n]/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]/#define DEBUG 1/g' riffa_driver.h
make -C /lib/modules/uname -r
/build SUBDIRS=pwd
modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-22-generic'
arch/x86/Makefile:155: CONFIG_X86_X32 enabled but no binutils support
arch/x86/Makefile:244: *** You are building kernel with non-retpoline compiler, please update your compiler.. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-22-generic'
Makefile:94: recipe for target 'riffa.ko' failed
make: *** [riffa.ko] Error 2
Could you advise how to fix this?
Hi,
I'm having issues with riffa while using it.
Sometimes when the computer boots up, riffa is not detected by linux (i use an altera DE4).
When i run python -c "import riffa;print riffa.fpga_list()"
I get num fpgas: 0
To debug it i found in the dmesg log those lines :
797:[ 5.507040] riffa: found FPGA with name: 0000:02:00.00
798:[ 5.507046] riffa: vendor id: 0x1172
799:[ 5.507049] riffa: device id: 0x0004
800:[ 5.507054] riffa: BAR 0 address: df100000
801:[ 5.507057] riffa: BAR 0 length: 1024 bytes
802:[ 5.507149] riffa: MSI setup on irq 135
803:[ 5.507154] riffa: PCIE_EXP_DEVCTL register: 2930
804:[ 5.507159] riffa: PCIE_EXP_DEVCTL2 register: 0
805:[ 5.507165] riffa: PCIE_EXP_LNKCTL register: 10810040
806:[ 5.507169] riffa: number of channels: 0
807:[ 5.507171] riffa: bus interface width: 0
808:[ 5.507173] riffa: bus master enabled: 0
809:[ 5.507175] riffa: negotiated link width: 0
810:[ 5.507177] riffa: negotiated link rate: 0 MTs
811:[ 5.507179] riffa: max downstream payload: 128 bytes
812:[ 5.507181] riffa: max upstream payload: 128 bytes
813:[ 5.507183] riffa: bus master not enabled!
So it seems like their is an issue with the PCIE Controller.
The weirdest thing is that this problem only appear on some synthesis. Timequest doesn't bring any timing issue in the synthesized design.
Did you ever encounter this error ?
Hi:
Sorry to bother you, i am using the xilinx adm7V3 example designs in vivado 2018.2, but when i run synthesis it complaint [Synth 8-660] unable to resolve 'clog2s'[fiffa_wrapper_adm7V3.v:164], when i tried the vivado 2017.2, it reported the same issue, so why is this error happen? i needed some help, thanks a lot.
Added logs in comments
I download the RIFFA bitstream with Gen 2.0x8 configuration into my KC705 FPGA and installed the drivers on Ubuntu 18.04, and C test worked fine with the measured bandwidth of:
send bw: 3335.055111 MB/s 114.381836ms
recv bw: 3455.153763 MB/s 110.406006ms
However, the python example showed that the data received were different from the data that were transmitted.
$ python sampleapp.py
TX data:
array('I', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200])
RX data:
array('I', [197, 198, 199, 200, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200])
I checked the python module riffa.py but didn't notice anything abnormal. Could anybody advise how to fix this since my apps will base on Python.
Hi
I'm using RIFFA on Xilinx ML605, part of SoftMC implementation (https://github.com/CMU-SAFARI/SoftMC). I've also installed the RIFFA Linux driver on Ubuntu 14.04.
I'm trying to run option 2 on the testutil application, but calls to fpga_recv always timeout at 25s. If I set the timeout value to 0, the call blocks and never returns. fpga_send seems to work, as it returns the number of bytes sent to the FPGA.
If I run "dmesg | grep riffa", I see no errors. The ML605 is able to register with the driver and negotiate a link rate. But calls to fpga_recv always never return.
Has anyone encountered this before?
This bug is a TODO for me (since I have the signing key).
This may also fix an issue reported where the FPGA was not recognized in windows.
Hi,
I used the latest RIFFA on my research project and it seems that the PCIe Gen2X8 BW was still too low(4GB/s). Just wonder if it is possible to modify the current source code to let RIFFA support PCIe Gen2.0X16(8GB/s) or PCIe Gen3.0X16(16GB/s)?
Raising an issue that on RIFFA v2.2.0, running on Ubuntu 20.04.6 LTS, kernel version 5.4.0-186-generic, using Python 3.8.10, using fpga_send results in an error because in line 128 of riffa.py, length variable is assigned a float value, which raises a ctype error when passed into libriffa.fpga_send. Setting length = int(datalen/4) resolves the issue, but I am unsure if this breaks anything else.
Hi all, I'm trying to simulate the project for VC707 (VC707_gen1x8lf64) using Vivado 2015.4. The Vivado runs on Ubuntu 14.04. However, the simulation has errors as following:
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:45]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:61]
...
ERROR: [VRFC 10-1775] range must be bounded by constant expressions [/home/jeff/riffa_ori/fpga/riffa_hdl/scsdpram.v:59]
ERROR: [VRFC 10-1775] range must be bounded by constant expressions [/home/jeff/riffa_ori/fpga/riffa_hdl/scsdpram.v:63]
For the first error, it seems that the functions in verilog header must be wrapped in a module. There are two more files have similar problem.
For the second error, the simulator reports error for syntax like: input [clog2s(C_DEPTH)-1:0]
I''m using the original Vivado simulator, and I'm not sure if this would be a problem.
I have tried to replace all clog2 and clog2s with $clog2, and wrap the functions into module, but the simulation result was very wierd. Does anyone can provide possible solution for these errors or any idea about simulation for project? Any comment would be very appreciated!
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:44]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/functions.vh:60]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/tlp.vh:213]
ERROR: [VRFC 10-1342] root scope declaration is not allowed in verilog 95/2K mode [../../../../../../../riffa_hdl/tlp.vh:230]
I am using Vivado version 2017.2 as well as the default supported 2015.4 version to simulate the design. However, I got into the above errors. These errors only occur during simulation, not during synthesis/P&R stages.
I have tried both solution (introducing module wrapper as well as setting the file type as systemverilog) as in https://stackoverflow.com/questions/44979043/vivado-sim-error-root-scope-declaration-is-not-allowed-in-verilog-95-2k-mode , but they do not solve the above errors.
Hi,
Firstly, please pardon me for my bad English. Secondly, also pardon me for my ironic questions (since I don't have enough time to carefully read and understand everything about riffa).
I'm now integrating my logic into RIFFA by modifing chnl_tester.v. The requirement is send 1 bulk data through PCI (1K of packet, each packet is 48 bytes) and then wait for its bulk responses. Normally my logic will process one packet in around 0.5ms (which is pretty slow in compared with RIFFA's performance). Since I don't really understand about how RIFFA works, is it ok to read one packet, wait for my logic to finish processing it, and then read another packet? Is there any chance of losing data? Do I have to read all the bulk data at once?
Thanks a lot for your help.
Your sincerely,
Quang Dao
I tried to simulate the riffa example without the PCIe core. I created a testbench to instantiate the following modules(I am using Xilinx KC705 board)
riffa_wrapper_kc705
#(/AUTOINSTPARAM/
// Parameters
.C_LOG_NUM_TAGS (C_LOG_NUM_TAGS),
.C_NUM_CHNL (C_NUM_CHNL),
.C_PCI_DATA_WIDTH (C_PCI_DATA_WIDTH),
.C_MAX_PAYLOAD_BYTES (C_MAX_PAYLOAD_BYTES))
riffa....
chnl_tester #(
.C_PCI_DATA_WIDTH (C_PCI_DATA_WIDTH)
) dut ...
I initialize the inputs of the riffa_wrapper_kc705 as following:
wire [SIG_BUSID_W-1:0] cfg_bus_number = {
SIG_BUSID_W{1'b0}};
wire [SIG_DEVID_W-1:0] cfg_device_number = {
SIG_DEVID_W{1'b0}};
wire [SIG_FNID_W-1:0] cfg_function_number = {
SIG_FNID_W{1'b0}};
wire [SIG_CFGREG_W-1:0] cfg_command = {
SIG_CFGREG_W{1'b0}};
wire [SIG_CFGREG_W-1:0] cfg_dcommand = 16'h2810; wire [
SIG_CFGREG_W-1:0] cfg_lstatus = 16'h1000;
wire [SIG_CFGREG_W-1:0] cfg_lcommand = {
SIG_CFGREG_W{1'b0}};
wire [SIG_FC_CPLD_W-1:0] fc_cpld = {
SIG_FC_CPLD_W{1'b0}};
wire [SIG_FC_CPLH_W-1:0] fc_cplh = {
SIG_FC_CPLH_W{1'b0}};
In my testbench, I drive the following signals to generate valid transaction:
M_AXIS_RX_TDATA
M_AXIS_RX_TKEEP
M_AXIS_RX_TLAST
M_AXIS_RX_TVALID
M_AXIS_RX_TUSER
S_AXIS_TX_TREADY
I check the waveform, there was no activities on RX_CHNL_* signals of the riffa RX output side connecting the chnl_tester. Did anybody experience the similar issue?
Hi
I see in the riffa 2.2.2 doc this paragraph:
Issue 2: Missing example design for Spartan 6 LXT Development board The 32-bit
interface support has been removed from RIFFA 2.2 and may be added back in the future.
Please use RIFFA 2.1 in the meantime
but I can not find riffa 2.1 !!!
Pls send a link for me.
What is the minimum requirement for fpga device?
where is the complete list of fpga device that riffa support them?
Best Regards
Greeting,
I try the sample code in AC701. (I use vivado 2018.3)
After change the C_NUM_CHNL = 3
The channel 3 recived data become all 0
Any idea ?
I run the demo for De5 by sending and receiving 1000000 32-bit datas.
The displayed datas are:
recvBuffer[0]: 999997
recvBuffer[1]: 999998
recvBuffer[2]: 999999
recvBuffer[3]: 1000000
recvBuffer[4]: 5
recvBuffer[5]: 6
recvBuffer[6]: 7
recvBuffer[7]: 8
recvBuffer[8]: 9
recvBuffer[9]: 10
recvBuffer[10]: 11
recvBuffer[11]: 12
recvBuffer[12]: 13
recvBuffer[13]: 14
recvBuffer[14]: 15
recvBuffer[15]: 16
recvBuffer[16]: 17
recvBuffer[17]: 18
recvBuffer[18]: 19
recvBuffer[19]: 20
Could any guys help me?Thanks a lot!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.