THIS HOWTO IS DEPRECATED
A soft CPU based on the lm32 is embedded in the White Rabbit core. This how-to describes the installation required for a SPEC board connected to standard GSI Linux machine (Debian, Lenny).
This is a short log on getting the lm32 toolchain for a SPEC board working...
Installation
The installation was mainly done by Wesley (thanks!). Here is just a small log from my (db) memory.
- install ISE software from Xilinx
- upgrade standard GSI Linux box from Lenny to "Squeeze"
- upgrade kernel to "2.6.39-bpo.2-686-pae"
- created a folder ".../white-rabbit" and checked out the following repositories
- "git://ohwr.org/hdl-core-lib/wr-cores.git" to .../white-rabbit/wr-cores
- "git://github.com/twlostow/wr-core-software" to .../white-rabbit/wr-core-software
- "git://gnudd.com/gnurabbit.git" to .../white-rabbit/gnurabbit
- copied lm32 toolchain to /opt/lm32
- plugged SPEC board into an PCIe slot
- connected USB connector on SPEC board to USB port at PC (looks a bit strange - useful for display of debugging messages in minicom)
Start White Rabbit
Start Debug Output
Debug output can be seen via a minicom terminal. On the SPEC board, it is available via the mini-USB plug, connected to a USB-port of the hosting Linux box.
minicom -D /dev/ttyUSB0
(Note: It could also be UDB1 instead. You may need "sudo")
Install Driver
VHDL Bitfiles and soft-CPU binaries are loaded via the PCIe interface. This requires loading the driver.
cd /white-rabbit/gnurabbit/kernel/
insmod rawrabbit.ko
(Note: You may need "sudo")
(Anm. d. Red.: is the computer hanging (mostly DELL), edit 'rawrabbit-core.c'. Then go to the function 'rr_pciprobe' after command 'pci_enable_device' (arround line 136 ) insert 'pci_enable_msi(pdev)' save and quit. Then type 'make'... this is first aid only !)
Load VDHL bitfile
cd ~/white-rabbit/gnurabbit/user/
./loadfile ~/white-rabbit/wr-cores/syn/spec_1_1/wr_core_demo/spec_top.bin
Load soft-CPU Binaries
cd ~/white-rabbit/gnurabbit/user/
./lm32-loader ~/white-rabbit/wr-core-software/wrc.bin
View Debug Output In the minicom terminal, there should be some message like
wrc_main.c is up (compiled on Nov 15 2011 18:27:00)
wr_core: starting up (press G to launch the GUI and D for extra debug messages)....
Read/Write Register from the Command Line
The following is just an example
cd ~/white-rabbit/gnurabbit/user/
rrcmd r4 0:80100
Note: The above read 4 bytes from bar0 at address 0x80100. Get some help by just typing "rrcmd"
Rebuild Software for soft-CPU
In case the software has changed, one can recompile via
cd ~/white-rabbit/wr-core-software/
make clean
make
In case the SPEC board should be used as White Rabbit master, do
cd ~/white-rabbit/wr-core-software/
make clean
make WRMODE=master
Of course, the software needs to be reloaded into the soft-CPU after compiling.
Rebuild Firmware (VDHL Part)
cd ~/white-rabbit/wr-cores/syn/spec_1_1/wr_core_demo/
hdlmake
make
Rebuild Linux Driver
cd ~/white-rabbit/gnurabbit/kernel
make
--
DietrichBeck - 25 Nov 2011