Virtex2p Linux[100%]
Table of Contents
1 TB-V2P-XSP-016
Designed and manufactured by Tokyo Electron Device, but the board information cannot be found on their website. Instead, 3rd party information is available at HiTech Global with board retail information.
The board ships with a Xilinx Virtex 2 Pro, datasheet can be found on Xilinx as DS083.
2 FPGA design
There is a reference design for TB-V2P-XSP-016 called monitor, which can be found in the attach CD-ROM (not available on the internet, contact me if you want a copy only for personal use).
The Xilinx ISE version for the reference design is 6.3. It is too old to be supported by Xilinx and hard to find. Virtex 2 Pro has been dropped since Xilinx ISE 11. Finally I choosed to use ISE 10.1 Design Suite. If the license has expired for opb ethernet mac (datasheet), try to copy a valid one from ISE 13.
2.1 upgrading monitor from ISE 6.3 to 10.1
Xilinx ISE tools makes backward incompatible upgrades regularly. It is non-trivial to port monitor from ISE 6.3 to 10.1. The upgrade winzard ISE hardly works. Many IP cores(e.g. opb ethernet, opb emc) have been discarded and needs manual tuning after adopting the new versions.
I performed a conservative upgrade only for those that are necessary to port to 10.1 and hold back even if there is a better alternative.
There is a lot of trial and error envolved. The process is to refer to any datasheet and upgrade guide when necessary, therefore, uninteresting.
Here is my working design (except NOR flash) on ISE 10.1 for reference.
Unfortunatley, we are locked in by Xilinx to use the proprietory ISE.
3 RS232 console
A console is crucial as an interface of programming.
There is a RS232 port (aka. serial port) on the board. By tested it with monitor, I have found it requires a direct configuration for RS232 cable. This is pretty weird and not to common practice of null modem.
3.1 RS232 adapter
Modern PCs (in 2010's) do not have RS232 port usually, a USB-to-RS232 can be used.
My tool here is MFT232RL plus a baseboard utilizing a MAX232 chip, which can be found here. After setting up with Some solder, it can do both TTL and RS232 via USB, which can be used in I2C, TTL and RS232 consoles.
4 DONE ppc elf linux boot [100%]
Linux kernel has its native support for powerpc. Xilinx has support for a pile of their IP core drivers for linux. http://wiki.xilinx.com/
Some drivers, especially xilinx emac, are outdated on linux 3.0 where the code has beed rearraged. I have made some patch against git://git.xilinx.com/linux-2.6-xlnx, they are submitted to xilinx but not adopted yet as of <2012-01-15 Sun>. Please contact me if this info needs update.
Here is my project checklist for compiling and running linux
[X]
crossdev[100%][X]
powerpc-unknown-linux-gnu[X]
powerpc-softfloat-linux-gnu YAGNI[X]
powerpc-softfloat-linux-uclibc YAGNI[X]
tuna4 gentoo test bench
[X]
kernel compile Kernel config file[X]
ubootYAGNI not needed for now unless we have the NOR flash issue resolved.
[X]
xilinx device tree generatorWe use the device tree to pass hardware configuration to linux.
[X]
ELF info[X]
XMD assembly[X]
console output console howto[X]
xz compressnot supported in powerpc out of tree, need kernel hack.
[X]
ramdiskYAGNI no use if no NOR flash
[X]
squashfs-lzmaYAGNI no use if no NOR flash
[X]
gpio migrate YAGNI[X]
plb upgrade YAGNI, time constraint maybe[X]
nfsrootmoguhome nfs kernel oops, move nfs server to proton
I used multistrap to make a Debian rootfs served to xsp-016 via NFS. It is really a pity that I could not make the board standalone yet. Damn te7720!
[X]
mtd flashWait for Spartan 3E flash kit blame tel
5 DONE device tree [100%]
[X]
device tree everywhere IBM paper[X]
U-Boot (FDT) blob[X]
general info[X]
MIPS mdt equivalent
6 Remaining Problems
6.1 On board NOR flash
This is a long frustrating story.
6.1.1 te7720 and lbplay2
xsp-016 has a te7720 chip (datasheet from 3rd party, again) from Tokyo Electron Device to manage onboard NOR flash. This one emulates the behavior of Xilinx 18V04, but does not support direct write from Xilinx iMPACT.
The tool supported to use is call lbplay2.exe only available under Windows sytem, and ONLY support to write via Xilinx parallel JTAG adapter. All the JTAG adapters at hands are USB based, and I feel ill to dig a parallel JTAG out of some museum just in order to run lbplay2.exe against.
This is frustrating.
An upgraded chip for te7720 is te7725pf.
6.1.2 Fujitsu MBM29LV323
A second alternative is trying to drive the NOR flash Fujitsu MBM29LV323. But I could not even read out Manufacturer and Product IDs with tuned xilinx opb emc IP.
The issue may be related to the fact that xsp-016 use a dividing scheme in order to use the NOR flash with TE7720 and breaks its normal interface.
This is a puzzle that maybe lifted by trying to flash a Spartan 3E starter kit at hand.
6.2 Timing constraint
Sometimes, the timing constraint (10ns for 100Mhz clock) cannot be met and I need to try hard with Xilinx Xplorer. The problem seems to be in the local gluing VHDL library, possibly generated by inefficient some tool with ISE 6.
Designing the FPGA layout from fresh may help. But I will hold back until it is absolutely necessary.
7 Tests
After boot, we can navigate through the resulting system.
Basic configuration can be found here:
root@moon:~# cat /proc/cpuinfo processor : 0 cpu : Virtex-II Pro clock : 100.000000MHz revision : 8.32 (pvr 2001 0820) bogomips : 200.00 timebase : 100000000 platform : Xilinx Virtex model : testing Memory : 128 MB
I have make a test for network transfer (100Mbps connected to PC 1Gbps ethernet):
root@moon:~# wget ftp://10.16.9.1//srv/rootfs-init.tar.xz -O /dev/null --2012-01-13 00:25:43-- ftp://10.16.9.1//srv/rootfs-init.tar.xz => `/dev/null' Connecting to 10.16.9.1:21... connected. Logging in as heroxbd ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD (1) /srv ... done. ==> SIZE rootfs-init.tar.xz ... 8061360 ==> PASV ... done. ==> RETR rootfs-init.tar.xz ... done. Length: 8061360 (7.7M) (unauthoritative) 100%[==================================>] 8,061,360 630K/s in 13s 2012-01-13 00:25:56 (629 KB/s) - `/dev/null' saved [8061360]
the bottleneck is cpu, which was 100% when downloading. Further tuning of MAC IP core and linux driver may help.
Org version 7.5 with Emacs version 23
Validate XHTML 1.0