Debug tools
From SeedWiki
Checking the PCIe connection at driver load time
A quick way to verify that the PCIe connection with the board is established is to use the command "lspci" that command will show you that the card is detected:
[sittarpa@freundlabpc4 ~]$ lspci 00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02) 00:01.0 PCI bridge: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1e.2 Multimedia audio controller: Intel Corporation 82801G (ICH7 Family) AC'97 Audio Controller (rev 01) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01) 01:00.0 VGA compatible controller: ATI Technologies Inc RV380 [Radeon X600 (PCIE)] 01:00.1 Display controller: ATI Technologies Inc RV380 [Radeon X600] 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01) 03:00.0 RAM memory: Xilinx Corporation Device 0506 [sittarpa@freundlabpc4 ~]$
Using "lspci -v" will give more information about the driver.
03:00.0 RAM memory: Xilinx Corporation Device 0506 Subsystem: Xilinx Corporation Device 0506 Flags: bus master, fast devsel, latency 0 Memory at f0000000 (64-bit, prefetchable) [size=64K] Capabilities: <access denied> Kernel driver in use: xc5vsx50t
Using the command "dmesg" after the driver has been loaded into the kernel will give a dump of the contents of the bram memory. This is due to an alteration of the driver file "XC5VSX50T.c". The memory dump looks like this:
fff Test: 2204ffff Test: e10cffff Test: 69f0ffff Test: 41ecffff Test: 7d6affff Test: a28bffff Test: 4feaffff Test: 8bd4ffff Test: 6888ffff Test: 4b86ffff Test: 08d5ffff Test: 2644ffff Test: 612cffff Test: ae30ffff Test: 332effff
Using the driver program to write and read bram memory
Patrick and Sameh added a small snippet of code to the driver so that they can write and read the bram content.