Time-stamp: <04/11/29 16:30:04 makino>

Memo on installing GRAPE-6A library on x86_64 Linux boxen

Copyright 2004- Jun Makino

Device driver

The device driver included in the version 1.0 (or earlier) GRAPE-6A library available at the official distribution page does not compile on a x86_64.

As the workaround, install the device driver in GRAPE-6 package. You need to follow steps one and three of the installation script. Details of the GRAPE-6 library install script is given here.

========= Main Menu ========
1. Compiling the device driver
2. Compiling libraries and sample applications.
3. Installing the device driver (need to be a superuser)
4. Testing the basic device driver functions and the PCI card.
5. Testing the libraries and sample applications
You need to do steps 1 and 3 of the main menu

Compiling the library

You need to change the file lib/g6autil.c as follows:
diff -C1 g6autil.c g6autil.c.bak
*** g6autil.c   2004-11-19 13:17:43.000000000 +0900
--- g6autil.c.bak       2004-10-01 21:26:54.000000000 +0900
***************
*** 3,5 ****
  #include <fcntl.h>
! #include "memmap.h"
  #define NPCIMEM 16
--- 3,5 ----
  #include <fcntl.h>
! 
  #define NPCIMEM 16
Namely, you need to add a single line
#include "memmap.h"
after
#include <fcntl.h>
The modified file is here. This one os for version 1.0. May not work with other versions.

Loading the FPGA data

Unlike the GRAPE-6 library,the GRAPE-6A library does not load FPGA data in g6_init. The loading of the FPGA data must be done by a separate program, g6aconfig (lives in the "lib" directory). I recommend you to run this program automatically in rc.local (or boot.local).

Good luck!