Index: /drsdaq/DAQReadout.cc
===================================================================
--- /drsdaq/DAQReadout.cc	(revision 22)
+++ /drsdaq/DAQReadout.cc	(revision 22)
@@ -0,0 +1,1284 @@
+/********************************************************************\
+
+  DAQReadout.cc
+
+  Main DAQ routines.
+   
+  Sebastian Commichau, Oliver Grimm
+  
+\********************************************************************/
+
+#include "DAQReadout.h"
+
+static char* daq_state_str[] = {"active", "stopped"};
+static char* daq_runtype_str[] = {"data", "pedestal", "test"};
+
+static struct CL_Struct { char *Name;    
+                	  void (DAQReadout::*CommandPointer)();
+			  bool NeedNotBusy;
+			  char *Parameters;
+			  char *Help;
+  } CommandList[] = 
+  {{"board", &DAQReadout::cmd_board, true, "<i> [j] | <all>" ,"Address board i, boards i-j, all boards"},
+   {"status", &DAQReadout::cmd_status, false, "[daq|drs]", "Show DAQ/DRS status information"},
+   {"freq", &DAQReadout::cmd_freq, true, "<GHz>", "Set DRS sampling frequency"},
+   {"calib", &DAQReadout::cmd_calib, true, "<t_f> <c_f> [dir]", "Response calibration"},
+   {"trigger", &DAQReadout::cmd_trigger, true, "<on|off>", "Hardware trigger on or off"},
+   {"delayed", &DAQReadout::cmd_delayed, true, "<on|off>", "Switch delayed start on or off"},
+   {"wmode", &DAQReadout::cmd_wmode, true, "<0|1>", "Set DRS wave mode"},
+   {"rmode", &DAQReadout::cmd_rmode, true, "<0|1>", "Set DRS readout mode"},
+   {"mode", &DAQReadout::cmd_mode, true, "<0|1>", "Set DRS mode: 0 = single shot, 1 = continuous"},
+   {"read", &DAQReadout::cmd_read, true, "<brd> <chip> <chan>", "Read current data from board, chip, channel"},
+   {"take", &DAQReadout::cmd_take, false, "<d|p|t> [n] [source]", "Start run (data, pedestal or test) with n events"},
+   {"events", &DAQReadout::cmd_events, false, "", "Number of events in current run"},
+   {"start", &DAQReadout::cmd_start, true, "", "Start domino wave"},
+   {"stop", &DAQReadout::cmd_stop, false, "", "Issue soft trigger and stop DAQ"},
+   {"test", &DAQReadout::cmd_test, true, "[2e]<blt32|blt64> [n]", "Test read access of VMEbus (n blocks)"},
+   {"regtest", &DAQReadout::cmd_regtest, true, "", "DRS register test"},
+   {"ramtest", &DAQReadout::cmd_ramtest, true, "", "DRS RAM integrity and speed test"},
+   {"led", &DAQReadout::cmd_led, true, "<on|off>", "Turn LED on or off"},
+   {"config", &DAQReadout::cmd_config, false, "", "Print drsdaq configuration"},
+   {"serial", &DAQReadout::cmd_serial, true, "<i> <n>", "Set serial# of board <i> to <n> (experts only)"},
+   {"disk", &DAQReadout::cmd_disk, false, "" ,"Remaining disk space"},
+   {"uptime", &DAQReadout::cmd_uptime, false, "", "Get DAQ uptime"},		  
+   {"exit", &DAQReadout::cmd_exit, false, "", "Exit program"},
+   {"fmode", &DAQReadout::cmd_fmode, false, "[off|active|targ]", "Set or get feedback mode"},
+   {"faverage", &DAQReadout::cmd_faverage, false, "[n]", "Set ot get number of averages for feedback"},
+   {"fgain", &DAQReadout::cmd_fgain, false, "[gain]", "Set ot get feedback gain"},
+   {"ftarget", &DAQReadout::cmd_ftarget, false, "[brd chip chan]", "Set or get target value"},
+   {"fresponse", &DAQReadout::cmd_fresponse, false, "[V1 V2]", "Start response measurement with voltages V1 and V2"},
+   {"fconfig", &DAQReadout::cmd_fconfig, false, "", "Print feedback configuration"},
+   {"help", &DAQReadout::cmd_help, false, "", "Print help"}};
+
+
+// -----------------------------------------------
+// *****  Constructor: Class initialisation  *****
+// -----------------------------------------------
+//
+// Note that constructor cannot report error and should not fail
+ 
+DAQReadout::DAQReadout(const char *Configfile) {
+   
+  time(&StartTime);  // Start time of DAQ
+  Rawfile = NULL;
+
+  // Initialize status structure
+  daq_state	= stopped;
+  daq_runtype	= data;
+  Socket	= -1;
+  Exit		= false;
+  NumEvents		= 0;
+  NumEventsRequested	= 100;
+  NumCMCBoards		= 0;
+  FirstBoard		= 0;
+  LastBoard		= -1;
+  sprintf(Source,"DUMMY");
+  
+  // Read configuration file
+  FILE *File;
+  if ((File = fopen(Configfile,"r")) == NULL) {
+    printf("Error: Could not open drsdaq configuration file '%s'\n", Configfile);
+  }
+  else {
+    printf("Reading drsdaq configuration file %s\n", Configfile);
+    ReadCard("LogFile",            fLogFile,            's', File);
+    ReadCard("RawDataPath",        fRawDataPath,        's', File);
+    ReadCard("RotateWave",         &fRotateWave,        'I', File);
+    ReadCard("FirstSample",        &fFirstSample,       'I', File);
+    ReadCard("LastSample",         &fLastSample,        'I', File);
+    ReadCard("MinDiskSpaceMB",     &fMinDiskSpaceMB,    'U', File);
+    ReadCard("MaxFileSizeMB",      &fMaxFileSizeMB,     'I', File);
+    ReadCard("CCPort",             &fCCPort,            'I', File);
+    ReadCard("FirstVMESlot",       &fFirstVMESlot,      'I', File);
+    ReadCard("LastVMESlot",        &fLastVMESlot,       'I', File);
+    ReadCard("HVFeedbackConfig",    fHVFeedbackConfig,  's', File);
+    fclose(File);
+  }
+  if (fFirstSample < 0 || fFirstSample >= kNumberOfBins || fLastSample < 0 || fLastSample >= kNumberOfBins) {
+    PrintMessage("Warning: Sample range in configuration beyond limits, setting to full range\n");
+    fFirstSample = 0;
+    fLastSample = kNumberOfBins;
+  }
+
+  // Open log file
+  if ((Logfile = fopen(fLogFile, "a")) == NULL)
+    fprintf(stderr,"Warning: Could not open log file '%s'\n", fLogFile);
+  else PrintMessage(MsgToLog,"********** Logging started **********\n");
+ 
+  cmd_config();
+
+  // Create DRS instance and perform initial scan
+  drs     = new DRS();
+  drs->SetFirstVMESlot(fFirstVMESlot);
+  drs->SetLastVMESlot(fLastVMESlot);
+  drs->InitialScan();
+
+  RHeader  = new RunHeader;
+  EHeader  = new EventHeader;
+  DRSFreq  = new float [drs->GetNumberOfBoards()];
+
+  // Scan for DRS boards
+  if (drs->GetNumberOfBoards()==0)
+    PrintMessage("No DRS boards found - check VME crate and configuration file!\n");
+
+  for (int i=0; i<drs->GetNumberOfBoards(); i++) {
+    PrintMessage("Init. mezz. board %2d on VME slot %2d %s, serial #%d, firmware revision %d\n", 
+      i, (drs->GetBoard(i)->GetSlotNumber() >> 1)+2, ((drs->GetBoard(i)->GetSlotNumber() & 1) == 0) ? "upper" : "lower", 
+      drs->GetBoard(i)->GetCMCSerialNumber(), drs->GetBoard(i)->GetFirmwareVersion());
+    NumCMCBoards++;
+    LastBoard++;
+    drs->GetBoard(i)->Init();
+    drs->GetBoard(i)->SetRotation(fRotateWave);
+    DRSFreq[i] = 0;
+  }
+  BStruct  = new BoardStructure [NumCMCBoards == 0 ? 1:drs->GetNumberOfBoards()];
+  WaveForm = new short [NumCMCBoards == 0 ? 1:NumCMCBoards][kNumberOfChips][kNumberOfChannels][kNumberOfBins];
+  
+  // Create instance of HV feedback (must be after CMC board detection)
+  HVFB	  = new HVFeedback(this, fHVFeedbackConfig);
+}
+
+// ------------------------
+// *****  Destructor  *****
+// ------------------------
+
+DAQReadout::~DAQReadout() {
+  delete RHeader;     delete EHeader;
+  delete drs;	      delete HVFB;
+  delete[] DRSFreq;   delete[] BStruct;
+  delete[] WaveForm;
+  
+  PrintMessage(MsgToLog,"********** Logging ended **********\n\n");
+  if(Logfile) {
+    if(!fclose(Logfile)) printf("Closing logfile\n");
+    else perror("Error closing logfile");
+  }
+}
+
+// --------------------------------
+// *****  Command evaluation  *****
+// --------------------------------
+
+int DAQReadout::CommandControl(char *Command, bool FromSocket) {
+
+  if (strlen(Command) < 2 ) return 0;  // Ignore commands with only '/n'
+  if (Command[strlen(Command)-1]=='\n') Command[strlen(Command)-1]='\0';  // Remove '/n'
+  
+  if(Command[0]=='.') {   // Shell command
+    system(&(Command[1]));
+    return 0;
+  }
+
+  for(int i=0; i<MAX_NUM_TOKEN; i++) Param[i] = "";  // All pointers point initially to empty string
+  NParam = ParseInput(Command, Param);
+	
+  CmdFromSocket = FromSocket;
+  for(CmdNumber=0; CmdNumber<sizeof(CommandList)/sizeof(CL_Struct); CmdNumber++)
+    if (Match(Param[0], CommandList[CmdNumber].Name)) {
+      if(CommandList[CmdNumber].NeedNotBusy && IsDAQBusy()) PrintMessage("DAQ is busy\n");
+      else if(CommandList[CmdNumber].NeedNotBusy && NumCMCBoards==0) PrintMessage("No mezzanine boards available\n");
+      else (this->*CommandList[CmdNumber].CommandPointer)();
+      return 0;  
+    }
+  PrintMessage("Unknown command: %s\n",Param[0]);
+  return 0;
+}
+  	  
+// Get uptime
+void DAQReadout::cmd_uptime() {
+  time_t ActualT;
+  time (&ActualT);
+  PrintMessage("%d:%02d:%02d\n", (int) difftime(ActualT, StartTime)/3600, ((int) difftime(ActualT, StartTime)/60)%60, (int) difftime(ActualT, StartTime)%60);
+} 
+
+// Print disk space
+void DAQReadout::cmd_disk() {
+  PrintMessage("Free disk space (%s) [MB]: %lu\n", fRawDataPath, CheckDisk(fRawDataPath));
+} 
+
+// Print current number of events
+void DAQReadout::cmd_events() {
+  if(daq_state != active) PrintMessage("DAQ not active.\n");
+  else PrintMessage("Current number of events: %d\n", NumEvents);
+} 
+
+// Print DAQ configuration
+void DAQReadout::cmd_config() {
+  PrintMessage("LogFile: %s\tRawDataPath: %s\n"
+      	       "RotateWave: %d\t\tFirstSample: %d\t\tLastSample: %d\n"
+     	       "MinDiskSpaceMB: %u\tMaxFileSizeMB: %d\tCCPort: %d\n"
+      	       "FirstVMESlot: %d\t\tLastVMESlot: %d\n"
+	       "HVFeedbackConfig: \t%s\n",
+    fLogFile,fRawDataPath,fRotateWave,fFirstSample,fLastSample,fMinDiskSpaceMB,
+    fMaxFileSizeMB,fCCPort,fFirstVMESlot,fLastVMESlot,fHVFeedbackConfig);
+}
+
+// Start DAQ 
+void DAQReadout::cmd_take() {
+  
+  if(!Match(Param[1],"test") && (IsDAQBusy() || NumCMCBoards==0)) {
+    PrintMessage("DAQ is busy or no boards available.\n");
+    return;
+  }
+  if (!IsDRSFreqSet()) return;
+  if (!IsCalibrationRead()) 
+    if(!ReadCalibration()) {
+      PrintMessage("Problem with response calibration!\n");
+      return;
+    }
+    
+  if (Match(Param[1],"data")) {
+    HWTrigger(1);
+    daq_runtype = data;
+  } 
+  else if (Match(Param[1],"pedestal")) {
+    HWTrigger(0);
+    daq_runtype = pedestal;	
+  } 
+  else if (Match(Param[1],"test")) {
+    daq_runtype = test;	
+  }
+  else {
+    PrintUsage();
+    return;
+  }
+
+  if (NParam==3 && atoi(Param[2])) NumEventsRequested = atoi(Param[2]);
+  if (NParam==4) {
+    if(atoi(Param[2])) NumEventsRequested = atoi(Param[2]);
+    strcpy(Source, Param[3]);
+  }
+
+  if ((pthread_create(&thread_DAQ, NULL, (void * (*)(void *)) DAQ,(void *) this)) != 0)
+    perror("pthread_create failed with DAQ thread");
+  else {
+    daq_state = active;
+    Stop = false;
+    pthread_detach(thread_DAQ);
+  }  
+}
+  
+// Start DRS
+void DAQReadout::cmd_start() {
+  if (IsDRSFreqSet()) {
+    StartDRS();
+    PrintMessage("Domino wave started\n");
+  }
+}
+
+// RAM test
+void DAQReadout::cmd_ramtest() {
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    PrintMessage("RAM integrity and speed test (board #%d):\n",i);
+    (drs->GetBoard(i))->RAMTest(3);
+  }
+} 
+
+// Register test
+void DAQReadout::cmd_regtest() {
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    PrintMessage("Register test (board #%d):\n",i);
+    (drs->GetBoard(i))->RegisterTest();
+  }
+}
+
+// Test VME transfer
+void DAQReadout::cmd_test() {
+  int Type=-1, i;
+  
+  if (Match(Param[1], "2eblt64")) Type = 2;
+  else if (Match(Param[1], "blt32")) Type = 0;
+  else if (Match(Param[1], "blt64")) Type = 1;
+  else {
+    PrintMessage("Unknown type for testing.\n");
+    return;
+  }
+  
+  if (NumCMCBoards) 
+    for (i=FirstBoard; i<=LastBoard; i++) {
+      PrintMessage("BLT test started (board #%d)\n",i);
+      (drs->GetBoard(i))->TestRead(Param[2][0] && atoi(Param[2])<=10000 && atoi(Param[2])>0 ? atoi(Param[2]):1, Type);
+    }
+  else PrintMessage("No DRS boards available\n");
+} 
+
+// Stop DAQ 
+void DAQReadout::cmd_stop() {
+  if(!IsDAQBusy() && !IsDRSBusy()) PrintMessage("Nothing to stop\n");
+  if (IsDAQBusy()) StopRun();
+  if (IsDRSBusy()) {
+    StopDRS();
+    PrintMessage("Domino wave stopped\n");
+  }
+} 
+  
+// Read data 
+void DAQReadout::cmd_read() {
+  if (IsDRSBusy()) {
+    PrintMessage("Domino wave is running, issue \"stop first\"\n");
+    return;
+  } 
+  if (Param[1][0] && Param[2][0] && Param[3][0]) {
+    if (IsDRSFreqSet()&& !IsCalibrationRead()) ReadCalibration();
+    ReadandPrintDRSData(atoi(Param[1]),atoi(Param[2]),atoi(Param[3]));
+  }
+  else PrintUsage();  
+} 
+
+// Set Domino mode
+void DAQReadout::cmd_mode() {
+  if (Match(Param[1],"continuous")) SetDOMINOMode(1);
+  else if (Match(Param[1],"single")) SetDOMINOMode(0);
+  else PrintUsage();
+} 
+
+// Set Domino readout mode
+void DAQReadout::cmd_rmode() {
+  if (Match(Param[1],"1")) SetDOMINOReadMode(1);
+  else if (Match(Param[1],"0")) SetDOMINOReadMode(0);
+  else PrintUsage();
+} 
+
+// Set Domino wave mode
+void DAQReadout::cmd_wmode() {
+  if (Match(Param[1],"1")) SetDOMINOWaveMode(1);
+  else if (Match(Param[1],"0")) SetDOMINOWaveMode(0);
+  else PrintUsage();
+} 
+
+// Switch delayed start on/off
+void DAQReadout::cmd_delayed() {
+  if (Match(Param[1],"on")) SetDelayedStart(1);
+  else if (Match(Param[1],"off")) SetDelayedStart(0);
+  else PrintUsage();
+} 
+
+// Set trigger mode
+void DAQReadout::cmd_trigger() {
+  if (Match(Param[1],"on")) HWTrigger(1);
+  else if (Match(Param[1],"off")) HWTrigger(0);
+  else PrintUsage();
+} 
+
+// Set serial number of board
+void DAQReadout::cmd_serial() {    
+  if (NParam==4 && Match(Param[3], "expert")) {
+    if ((atoi(Param[1]) < FirstBoard) || (atoi(Param[1]) > LastBoard))
+      PrintMessage("Board number out of range (%d...%d)!\n",FirstBoard,LastBoard);
+    else if (atoi(Param[2]) < 100 || atoi(Param[2]) >= 1000) 
+      PrintMessage("Serial number out of range (100...999)!\n");
+    else {
+      PrintMessage("Flashing EEPROM of board %d...\n", atoi(Param[1]));
+      (drs->GetBoard(atoi(Param[1])))->FlashEEPROM(atoi(Param[2]));
+    }
+  }
+  else PrintMessage("You are not allowed to change the serial number!\n");
+} 
+
+// Do internal calibration
+void DAQReadout::cmd_calib() {
+  if (NParam==4 && atof(Param[1]) && atof(Param[2]))
+    CalibrateDRS(Param[3],atof(Param[1]),atof(Param[2])); 
+  else if (NParam==3 && atof(Param[1]) && atof(Param[2]))
+    CalibrateDRS(NULL,atof(Param[1]),atof(Param[2])); 
+  else PrintUsage();
+}
+
+// Set DRS sampling frequency
+void DAQReadout::cmd_freq() {    
+  if (NParam==3 && atof(Param[1]) && atoi(Param[2]))
+    SetRegulatedDRSFrequency(atof(Param[1]));
+  else if (NParam==2 && atof(Param[1]))
+    SetDRSFrequency(atof(Param[1]));
+  else PrintUsage();
+} 
+
+// Set LED
+void DAQReadout::cmd_led() {
+  if (Match(Param[1], "on") || Match(Param[1], "off"))
+    for (int i=FirstBoard; i<=LastBoard; i++)
+      (drs->GetBoard(i))->SetLED(Match(Param[1], "on") ? 1 : 0);     
+  else PrintUsage();
+}
+
+// Print status
+void DAQReadout::cmd_status() {
+  
+  double freq;
+  
+  if(NParam==1 || Match(Param[1],"daq")) {
+    PrintMessage("********** DAQ STATUS **********\n"
+ 	        " DAQ: %s\n"
+  	        " Run number: %d\n"
+ 	        " Run type: %c\n"
+	        " Event: %d\n"
+      	        " Requested events per run: %d\n"
+ 	        " Storage directory: %s\n"
+ 	        " Disk space: %lu MByte\n"
+ 	      	" Socket state: %s\n"                              
+              	" Total number of CMC boards: %d\n"
+	        " Active CMC boards: %d\n",
+      daq_state_str[daq_state], daq_state==active ? (int) RunNumber:-1,
+      daq_runtype_str[daq_runtype][0], NumEvents,
+      NumEventsRequested, fRawDataPath,
+      CheckDisk(fRawDataPath), Socket==-1 ? "disconnected":"connected",
+      NumCMCBoards, LastBoard - FirstBoard + 1);
+
+    for (int i=FirstBoard;i<=LastBoard;i++)
+      PrintMessage(" Frequency of board %d set: %s\n",i,(DRSFreq[i]!=0 ? "yes":"no"));
+  }
+  
+  if(NParam==1 || Match(Param[1],"drs")) {
+    PrintMessage("\n********** DRS STATUS **********\n");
+    if (NumCMCBoards) {
+      for (int i=FirstBoard; i<=LastBoard; i++) {
+
+	PrintMessage(" Mezz. board index:    %d\n"
+                    " Slot:                 %d %s\n",i,((drs->GetBoard(i))->GetSlotNumber() >> 1)+2,((drs->GetBoard(i))->GetSlotNumber() & 1)==0 ? "upper":"lower");
+	PrintMessage(" Chip version:         DRS%d\n"
+                    " Board version:        %d\n"
+                    " Serial number:        %d\n"
+                    " Firmware revision:    %d\n"
+                    " Temperature:          %1.1lf C\n"
+                    " Status reg.:          0X%08X\n", 
+		    (drs->GetBoard(i))->GetChipVersion(),
+		    (drs->GetBoard(i))->GetCMCVersion(),
+		    (drs->GetBoard(i))->GetCMCSerialNumber(),
+		    (drs->GetBoard(i))->GetFirmwareVersion(),
+		    (drs->GetBoard(i))->GetTemperature(),
+		    (drs->GetBoard(i))->GetStatusReg());
+
+
+	if ((drs->GetBoard(i))->GetStatusReg() & BIT_RUNNING)
+	  PrintMessage("   Domino wave running\n");
+	if ((drs->GetBoard(i))->GetStatusReg() & BIT_NEW_FREQ1)
+	  PrintMessage("   New Freq1 ready\n");
+	if ((drs->GetBoard(i))->GetStatusReg() & BIT_NEW_FREQ2)
+	  PrintMessage("   New Freq2 ready\n");
+
+	PrintMessage(" Control reg.:         0X%08X\n", (drs->GetBoard(i))->GetCtrlReg());
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_AUTOSTART)
+	  PrintMessage("   AUTOSTART enabled\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_DMODE)
+	  PrintMessage("   DMODE circular\n");
+	else
+	  PrintMessage("   DMODE single shot\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_LED)
+          PrintMessage("   LED\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_TCAL_EN)
+	  PrintMessage("   TCAL enabled\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_ZERO_SUPP)
+	  PrintMessage("   ZERO_SUPP enabled\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_FREQ_AUTO_ADJ)
+	  PrintMessage("   FREQ_AUTO_ADJ enabled\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_ENABLE_TRIGGER)
+	  PrintMessage("   ENABLE_TRIGGER\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_LONG_START_PULSE)
+	  PrintMessage("   LONG_START_PULSE\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_DELAYED_START)
+	  PrintMessage("   DELAYED_START\n");
+	if ((drs->GetBoard(i))->GetCtrlReg() & BIT_ACAL_EN)
+	  PrintMessage("   ACAL enabled\n");
+	PrintMessage(" Trigger bus:          0X%08X\n", (drs->GetBoard(i))->GetTriggerBus());
+	if ((drs->GetBoard(i))->IsBusy()) {
+	  (drs->GetBoard(i))->ReadFrequency(0, &freq);
+	  PrintMessage(" Frequency0:           %1.4lf GHz\n", freq);
+	  (drs->GetBoard(i))->ReadFrequency(1, &freq);
+	  PrintMessage(" Frequency1:           %1.4lf GHz\n", freq);
+	} 
+	else PrintMessage(" Domino wave stopped\n");
+      }
+    }
+    else PrintMessage("No DRS boards available!\n\n");
+  }
+}
+
+// Adress DRS boards
+void DAQReadout::cmd_board() {
+  if (Match(Param[1],"all")) {
+    FirstBoard = 0;
+    LastBoard = drs->GetNumberOfBoards()-1;
+  } 
+  else if (NParam==2 && atoi(Param[1]) >= 0 && atoi(Param[1]) < NumCMCBoards) {
+    FirstBoard = atoi(Param[1]);
+    LastBoard = FirstBoard;
+  }
+  else if (NParam==3 && atoi(Param[1])>=0 && atoi(Param[1])<NumCMCBoards && 
+           atoi(Param[2])>0 && atoi(Param[2])<NumCMCBoards) {
+    FirstBoard = atoi(Param[1]);
+    LastBoard = atoi(Param[2]);
+  }
+  else PrintMessage("Cannot address board(s), out of range.\n");
+} 
+
+// Print help
+void DAQReadout::cmd_help() {
+  char Buffer[MAX_COM_SIZE];
+  for(unsigned int i=0; i<sizeof(CommandList)/sizeof(CL_Struct); i++) {
+    sprintf(Buffer, "%s %s", CommandList[i].Name, CommandList[i].Parameters);
+    PrintMessage(MsgToConsole|MsgToSocket,"%-28s%s\n", Buffer, CommandList[i].Help);
+  }     
+  PrintMessage(MsgToConsole|MsgToSocket,".<command>                  Execute shell command\n\n"
+   "Items in <> are mandatory, in [] optional, | indicates mutual exclusive or.\n"
+   "Test data can also be written if no DRS boards are available.\n"
+   "Strings containing spaces have to be enclosed in \"double quotes\".\n"); 
+}
+
+// Exit programm
+void DAQReadout::cmd_exit() {
+  if (CmdFromSocket) {
+     PrintMessage("Exit command not allowed over socket.\n");
+     return;
+  }  	
+  if (IsDAQBusy()) PrintMessage("Issue \"stop\" first to stop daq\n");
+  else {
+    Exit = true;
+    if(SocketThread != NULL) pthread_kill(*SocketThread, SIGUSR1);
+  }
+}
+
+// Set/get mode of feedback
+void DAQReadout::cmd_fmode() {
+  if(NParam==1) HVFB->GetFBMode();
+  else if(Match(Param[1],"off")) HVFB->SetFBMode(FB_Off);
+  else if(Match(Param[1],"active")) HVFB->SetFBMode(FB_Active);
+  else if(Match(Param[1],"targets")) HVFB->SetFBMode(FB_Targets);
+  else PrintUsage();
+}
+
+// Set/get current number of events
+void DAQReadout::cmd_faverage() {
+  if(NParam==1) printf("Current number of feedback events: %u   (acting when %u events are reached)\n",
+                       HVFB->GetCurrentCount(), HVFB->GetNumAverages());
+  else if(atoi(Param[1])>=0) HVFB->SetNumAverages(atoi(Param[1]));
+  else PrintUsage();
+}
+
+// Set/get feedback gain
+void DAQReadout::cmd_fgain() {
+  if(NParam==1) printf("Feedback gain is %.2f\n", HVFB->GetGain());
+  else if(NParam==2) HVFB->SetGain(atof(Param[1]));
+  else PrintUsage();
+}
+
+// Set/get target value
+void DAQReadout::cmd_ftarget() {
+  if(NParam==1) HVFB->GetTargets();
+  else if(NParam!=5) PrintUsage();
+  else {
+    if(atoi(Param[1])>=0 && atoi(Param[1])<NumCMCBoards && atoi(Param[2])>=0 && 
+       atoi(Param[2])<kNumberOfChips && atoi(Param[3])>=0 && atoi(Param[3])<kNumberOfChannels)
+      	 HVFB->SetTarget(atoi(Param[1]),atoi(Param[2]),atoi(Param[3]),atoi(Param[4]));
+    else PrintMessage("Board, chip or channel number out of range.\n");
+  }
+}
+
+// Start response measurement
+void DAQReadout::cmd_fresponse() {
+  if(NParam==1) HVFB->GetResponse();
+  else if(atof(Param[1]) && atof(Param[2]))
+    HVFB->MeasureResponse(atof(Param[1]),atof(Param[2]));
+  else PrintUsage();
+}
+
+// Print feedback configuration
+void DAQReadout::cmd_fconfig() {
+  HVFB->PrintConfig();
+}
+
+// ----------------------------------------------
+// *****  Utility function for DRS control  *****
+// ----------------------------------------------
+
+// Start domino wave
+void DAQReadout::StartDRS() {
+  for (int i=FirstBoard; i<=LastBoard; i++) drs->GetBoard(i)->StartDomino();
+}
+
+// Stop domino wave
+void DAQReadout::StopDRS() {
+  for (int i=FirstBoard; i<=LastBoard; i++) drs->GetBoard(i)->SoftTrigger();
+}
+
+// Read current data
+void DAQReadout::ReadandPrintDRSData(int board, int chip, int channel) {
+
+  if (board>LastBoard || board<FirstBoard) {
+    PrintMessage("Error: Board %d does not exist\n",board);
+    return;
+  }
+  if (channel<0 || channel>kNumberOfChannels-1) {
+    PrintMessage("Error: Select channel between %d and %d\n",0,kNumberOfChannels-1);
+    return;
+  }
+  if (chip<0 || chip>1) {
+    PrintMessage("Error: Select chip index between 0 and 1\n");
+    return;
+  }
+  PrintMessage("Waveform from board %d, chip %d, channel %d\n",board,chip,channel);
+  PrintMessage("Note: The first number is the number of numbers that follows.\n");
+
+  ReadCalibratedDRSData();
+  
+  // Note that all numbers must be separated by exactly one whitespace
+  // to allow reading from client socket  
+  PrintMessage("==START== %d ",kNumberOfBins);
+  for (int k=0; k<kNumberOfBins; k++) PrintMessage("%.1f ", (float) WaveForm[board][chip][channel][k]);
+  PrintMessage("==END==");
+  PrintMessage("\n");
+}
+
+// Transfer data to memory
+void DAQReadout::ReadCalibratedDRSData() {
+
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    (drs->GetBoard(i))->TransferWaves(kNumberOfChannels*kNumberOfChips); 
+    for (int ch=0; ch<kNumberOfChannels; ch++) {
+       (drs->GetBoard(i))->GetWave(0, ch, WaveForm[i][0][ch], true); // Chip #1
+       (drs->GetBoard(i))->GetWave(1, ch, WaveForm[i][1][ch], true); // Chip #2
+    }
+  }
+}
+
+// Read calibration file
+bool DAQReadout::ReadCalibration() {
+
+  char dir[MAX_COM_SIZE];
+
+  getcwd(dir, sizeof(dir));
+  strcat(dir,"/calib");
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    (drs->GetBoard(i))->SetCalibrationDirectory(dir);
+    PrintMessage("Reading response calibration file for board %d from: \"%s\"\n",i,dir);
+    for (int Chip=0; Chip<kNumberOfChips; Chip++)
+      if (drs->GetBoard(i)->GetResponseCalibration()->ReadCalibration(Chip)==false) return false;
+  }
+  return true;
+}
+
+// Check if calibration file has been read
+bool DAQReadout::IsCalibrationRead() {
+
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    for (int Chip=0; Chip<kNumberOfChips; Chip++) 
+      if (!(drs->GetBoard(i)->GetResponseCalibration()->IsRead(Chip))) {
+	PrintMessage("Warning: Response calibration of board %d chip %d not yet read!\n",i,Chip);
+	return false;
+      }
+  }
+  return true;
+}
+
+// Stop DAQ
+void DAQReadout::StopRun() {
+
+  if(daq_state != active) PrintMessage("DAQ is not active.\n");
+  else {
+    Stop = true;
+    PrintMessage("DAQ will stop.\n");
+  }
+}
+
+// Set DOMINO mode 
+void DAQReadout::SetDOMINOMode(int mode) {
+ 
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      (drs->GetBoard(i))->SetDominoMode(mode==1 ? 1:0);
+      PrintMessage("Domino mode of board %d switched to %s.\n",i,mode==1 ? "continuous":"single shot");
+    } 
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Set DOMINO readout mode 
+void DAQReadout::SetDOMINOReadMode(int mode) {
+
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      (drs->GetBoard(i))->SetReadoutMode(mode==1 ? 1:0);
+      PrintMessage("Start readout of board %d from %s.\n",i,mode==1 ? "first bin":"stop position");
+    } 
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Set DOMINO wave mode 
+void DAQReadout::SetDOMINOWaveMode(int mode) {
+
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      (drs->GetBoard(i))->SetDominoActive(mode==1 ? 1:0);
+      PrintMessage("Domino wave of board %d is %s during readout\n",i,mode==1 ? "running":"stopped");
+    } 
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Delayed start on/off 
+void DAQReadout::SetDelayedStart(int mode) {
+
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      (drs->GetBoard(i))->SetDelayedStart(mode==1 ? 1:0);
+       PrintMessage("Delayed start of board %d is %s\n",i,mode==1 ? "on":"off");
+    } 
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Enable hardware trigger of all boards 
+void DAQReadout::HWTrigger(int mode) {
+
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      drs->GetBoard(i)->EnableTrigger(mode==1 ? 1:0);
+      PrintMessage("Hardware trigger of board %d %s\n",i,mode==1 ? "enabled":"disabled");
+    }
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Read the frequency of all boards 
+double DAQReadout::ReadDRSFrequency() {
+
+  double freq = 0;
+  
+  if (NumCMCBoards) 
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      (drs->GetBoard(i))->ReadFrequency(0, &freq); 
+       PrintMessage("Domino wave of board %d is running at %1.3lf GHz\n",i,freq);
+    } 
+  else PrintMessage("No DRS boards available\n");
+
+  return freq;
+}
+
+// Set DRS sampling frequency 
+void DAQReadout::SetDRSFrequency(double freq) {
+
+  double currentfreq;
+
+  if (NumCMCBoards) {
+    PrintMessage("Setting frequency without regulation:\n");
+    
+    for (int i=FirstBoard; i<=LastBoard; i++) { 
+      drs->GetBoard(i)->SetDebug(1);
+      
+      if (drs->GetBoard(i)->SetFrequency(freq)) {
+ 	drs->GetBoard(i)->ReadFrequency(0, &currentfreq); 
+	DRSFreq[i] = freq;
+	PrintMessage("Domino wave of board %d is running at %1.3lf GHz\n",i,currentfreq);
+      } else {
+	DRSFreq[i] = 0;
+	PrintMessage("Warning: domino wave of board %d has changed but not reached the requested value\n",i);
+      }
+    }
+  }  
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Regulate DRS sampling frequency 
+void DAQReadout::SetRegulatedDRSFrequency(double freq) {
+
+  double currentfreq;
+
+  if (NumCMCBoards) {
+    PrintMessage("Setting frequency with regulation:\n");
+
+    for (int i=FirstBoard; i<=LastBoard; i++) {
+      drs->GetBoard(i)->SetDebug(1);
+      
+      if (drs->GetBoard(i)->RegulateFrequency(freq)) {
+	
+	  drs->GetBoard(i)->ReadFrequency(0, &currentfreq); 
+	  PrintMessage("Domino wave of board %d is running at %1.3lf GHz\n",i,currentfreq);
+	  DRSFreq[i] = freq;;
+      }
+      else DRSFreq[i] = 0;
+    }
+  }
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Do internal calibration
+void DAQReadout::CalibrateDRS(char *dir, double trigfreq, double calibfreq) {
+
+  int i,j;
+  char str[MAX_COM_SIZE];
+  DIR *pdir;
+      
+  if (NumCMCBoards) {
+    if(dir!=NULL) {
+      if ((pdir=opendir(str))==0){
+	PrintMessage("Error: target directory \"%s\" does not exist!\n",str);
+        return;
+      }
+      closedir(pdir);
+      sprintf(str,"%s",dir);
+      PrintMessage("Target: \"%s\"\n",str);
+    }
+    else {
+      getcwd(str, sizeof(str));
+      strcat(str,"/calib");
+      PrintMessage("Taking default target: \"%s/\"\n",str);
+    }
+        
+    for (i=FirstBoard; i<=LastBoard; i++) {
+      drs->GetBoard(i)->Init();
+      drs->GetBoard(i)->SetFrequency(calibfreq);
+      drs->GetBoard(i)->SoftTrigger();
+            
+      PrintMessage("Creating calibration of board %d\n", drs->GetBoard(i)->GetCMCSerialNumber());
+
+      drs->GetBoard(i)->EnableTcal(1);
+      PrintMessage("Tcal enabled");
+
+      if (drs->GetBoard(i)->GetChipVersion() == 3)
+	drs->GetBoard(i)->GetResponseCalibration()->SetCalibrationParameters(1,21,0,20,0,0,0,0,0);
+      else
+	drs->GetBoard(i)->GetResponseCalibration()->SetCalibrationParameters(1,36,110,20,19,40,15,trigfreq,0);
+            
+      drs->GetBoard(i)->SetCalibrationDirectory(str);
+      PrintMessage("Storage directory \"%s\"\n",str);
+
+      for (j=0;j<2;j++) {
+	drs->GetBoard(i)->GetResponseCalibration()->ResetCalibration();
+	PrintMessage("Calibration reset done.\n");
+
+	while (!drs->GetBoard(i)->GetResponseCalibration()->RecordCalibrationPoints(j)) {}
+	PrintMessage("Record calibration points done.\n");
+	while (!drs->GetBoard(i)->GetResponseCalibration()->FitCalibrationPoints(j)) {}
+	PrintMessage("Calibration points fitted.\n");
+	while (!drs->GetBoard(i)->GetResponseCalibration()->OffsetCalibration(j)) {}
+	PrintMessage("Offset calibration done.\n");
+
+	if (!drs->GetBoard(i)->GetResponseCalibration()->WriteCalibration(j))
+	  break;
+      }        
+      drs->GetBoard(i)->Init(); // Reset linear range -0.2 ... 0.8 V
+    } // Loop over boards   
+  }
+  else PrintMessage("No DRS boards available\n");
+}
+
+// Check if DAQ is busy
+bool DAQReadout::IsDAQBusy() {
+
+  if (daq_state == active) {
+    PrintMessage("DAQ is busy\n");
+    return true;
+  }
+  else return false;
+}
+
+// Check if DRS is sampling
+bool DAQReadout::IsDRSBusy() {
+
+  for (int i=FirstBoard; i<=LastBoard; i++)     
+    if ((drs->GetBoard(i))->IsBusy()) return true;
+  return false;
+}
+
+// Check if DRS frequency is set
+bool DAQReadout::IsDRSFreqSet() {
+
+  for (int i=FirstBoard;i<=LastBoard;i++)
+    if (DRSFreq[i]==0) {
+      PrintMessage("DRS sampling frequency of board %d not set!\n",i);
+      return false;
+    }
+  return true;
+}
+
+// Open new raw data file
+bool DAQReadout::OpenRawFile(int Part) {
+
+  time_t rawtime;
+  struct tm *timeinfo;
+  char RunDate[MAX_COM_SIZE], Buffer[MAX_COM_SIZE], SystemCommand[MAX_COM_SIZE];
+  int TempDescriptor;
+  
+  // Write run date to status structure
+  time(&rawtime);
+  timeinfo = localtime(&rawtime);
+  sprintf(RunDate,"%d%02d%02d",timeinfo->tm_year + 1900,timeinfo->tm_mon + 1,timeinfo->tm_mday);
+
+  // Create direcory if not existing (ignore error if already existing) and change to it
+  sprintf(Buffer, "%s/%s", fRawDataPath, RunDate);
+  if(mkdir(Buffer, S_IRWXU|S_IRWXG)==-1 && errno!=EEXIST) {
+    PrintMessage("\rError: Could not create direcory \"%s\" (%s)\n", Buffer, strerror(errno));
+    return false;
+  }
+  
+  // Determine new run number in directory (only if first file in series) by finding the
+  // last file in alphabetical order and assuming that run number starts at position 9
+  if(Part==0) {
+    char *TmpName = tmpnam(NULL); 
+    sprintf(SystemCommand, "ls -1 %s/*.raw 2>/dev/null|tail -n-1 >%s", Buffer, TmpName);
+    system(SystemCommand);
+    if ((TempDescriptor=open(TmpName,O_RDONLY)) == -1) {
+      PrintMessage("Error: Could not determine last run number (%s)\n",strerror(errno));
+      return false;
+    }
+    memset(Buffer,0,sizeof(Buffer));
+    read(TempDescriptor, Buffer, sizeof(Buffer));
+    close(TempDescriptor);
+    remove(TmpName);
+    if(sscanf(Buffer, "%*28c%u", &RunNumber) == 1) RunNumber++;
+    else RunNumber = 0;
+  }
+
+  // Generate filename
+  sprintf(FileName,"%s/%s/%s_%.8d_%s_%c_%d.raw", fRawDataPath, RunDate,
+    RunDate,RunNumber,Source,daq_runtype_str[daq_runtype][0],Part);
+ 
+  //  Open file with rwx right for owner and group, never overwrite file
+  TempDescriptor = open(FileName,O_WRONLY|O_CREAT|O_EXCL, S_IRWXU|S_IRWXG);
+  if(TempDescriptor==-1) {
+    PrintMessage("\rError: Could not open file \"%s\"\n",FileName);
+    perror("Error");
+    return false;
+  }
+  Rawfile = fdopen(TempDescriptor,"w"); 
+  return true;
+}
+
+// Write run header and board structures
+void DAQReadout::WriteRunHeader() {
+
+  time_t time_now_secs;
+  struct tm *time_now;
+
+  RHeader->MagicNum = MAGICNUM_FILE_OPEN;
+  RHeader->DataFormat 	= DATA_FORMAT;
+  strcpy(RHeader->DAQVersion,   __DATE__);
+  strcpy(RHeader->Source,       Source);
+  RHeader->Type = daq_runtype_str[daq_runtype][0];
+  RHeader->RunNumber  = RunNumber;
+
+  time(&time_now_secs);
+  time_now = localtime(&time_now_secs);
+  
+  RHeader->StartYear   = 1900 + time_now->tm_year;
+  RHeader->StartMonth  = 1 + time_now->tm_mon;
+  RHeader->StartDay    = time_now->tm_mday;
+  RHeader->StartHour   = time_now->tm_hour;
+  RHeader->StartMinute = time_now->tm_min;
+  RHeader->StartSecond = time_now->tm_sec;
+  
+  RHeader->SourceRA     = -1;    
+  RHeader->SourceDEC    = -1;   
+  RHeader->TelescopeRA  = -1; 
+  RHeader->TelescopeDEC = -1;
+
+  RHeader->NCMCBoards = NumCMCBoards==0 && daq_runtype==test ? 1 : (LastBoard - FirstBoard) + 1;  
+  RHeader->NChips       = kNumberOfChips;
+  RHeader->NChannels    = kNumberOfChannels;
+
+  RHeader->Offset       = fFirstSample;
+  RHeader->Samples      = fLastSample - fFirstSample + 1;
+  
+  if(fwrite(RHeader, sizeof(RunHeader), 1, Rawfile) != 1) {
+    PrintMessage("Error: Could not write run header, terminating run (%s)\n", strerror(errno));
+    Stop = true;
+  }
+
+  for (int i=FirstBoard; i<=LastBoard; i++) {
+    BStruct[i].Index       = i;	  
+    BStruct[i].SerialNo    = drs->GetBoard(i)->GetCMCSerialNumber();	  
+    BStruct[i].BoardTemp   = drs->GetBoard(i)->GetTemperature();
+    BStruct[i].NomFreq     = DRSFreq[i];
+    BStruct[i].ScaleFactor = drs->GetBoard(i)->GetPrecision();
+  }
+
+  // In case no boards are available, dummy data is written for one board structure   
+  if (NumCMCBoards == 0) {
+    LastBoard=0;
+    BStruct[0].NomFreq     = 1;
+    BStruct[0].ScaleFactor = 0.1;
+  }    
+
+  if(fwrite(BStruct, sizeof(BoardStructure), LastBoard-FirstBoard+1, Rawfile) != (unsigned int) (LastBoard-FirstBoard+1)) {
+    PrintMessage("Error: Could not write (all) board structures, terminating run (%s)\n", strerror(errno));
+    Stop = true;
+  }
+  if (NumCMCBoards == 0) LastBoard=-1;
+}
+
+// Update the run header
+void DAQReadout::UpdateRunHeader(unsigned int Events) {
+
+  time_t time_now_secs;
+  struct tm *time_now;
+  
+  RHeader->MagicNum = MAGICNUM_FILE_CLOSED;
+  RHeader->Events     = Events;
+
+  time(&time_now_secs);
+  time_now = localtime(&time_now_secs);
+  
+  RHeader->EndYear     = 1900 + time_now->tm_year;
+  RHeader->EndMonth    = 1 + time_now->tm_mon;
+  RHeader->EndDay      = time_now->tm_mday;
+  RHeader->EndHour     = time_now->tm_hour;
+  RHeader->EndMinute   = time_now->tm_min;
+  RHeader->EndSecond   = time_now->tm_sec;
+
+  rewind(Rawfile);
+  if(fwrite(RHeader, sizeof(RunHeader), 1, Rawfile) != 1) {
+    PrintMessage("Error: Could not write updated run header, terminating run (%s)\n", strerror(errno));
+    Stop = true;
+  }
+}
+
+// Write event header
+void DAQReadout::WriteEventHeader() {
+
+  time_t time_now_secs;
+  struct tm *time_now;
+  struct timezone tz;
+  struct timeval actual_time;
+
+  strcpy(EHeader->Name,"EVTH");
+ 
+  EHeader->EventNumber = NumEvents;
+  EHeader->TriggerType = 0XFFFF;
+
+  time(&time_now_secs);
+  time_now = localtime(&time_now_secs);
+  
+  gettimeofday(&actual_time, &tz);
+  EHeader->TimeSec = time_now->tm_sec + actual_time.tv_usec/1000000.;
+
+  if(fwrite(EHeader, sizeof(EventHeader), 1, Rawfile) != 1) {
+    PrintMessage("Error: Could not write event header, terminating run (%s)\n", strerror(errno));
+    Stop = true;
+  }
+}
+
+// Print usage text for command
+void DAQReadout::PrintUsage() {
+  PrintMessage("Usage: %s %s\n", CommandList[CmdNumber].Name, CommandList[CmdNumber].Parameters);
+}
+	 
+// Print message to selected target
+void DAQReadout::PrintMessage(int Target, char *Format, ...) {
+  va_list ArgumentPointer;
+  va_start(ArgumentPointer, Format); 
+  PrintMessage(Target, Format, ArgumentPointer);
+  va_end(ArgumentPointer);
+}
+
+// Print message to screen, log file and socket
+void DAQReadout::PrintMessage(char *Format, ...) {
+  va_list ArgumentPointer;
+  va_start(ArgumentPointer, Format); 
+  PrintMessage(MsgToConsole|MsgToLog|MsgToSocket, Format, ArgumentPointer);
+  va_end(ArgumentPointer);
+}
+
+// Function doing the actual printing work
+void DAQReadout::PrintMessage(int Target, char *Format, va_list ArgumentPointer) {
+
+  char Textbuffer[MAX_COM_SIZE];
+
+  memset(Textbuffer, 0, sizeof(Textbuffer));  
+  vsprintf(Textbuffer, Format, ArgumentPointer);
+  
+  // Print to console and generate new prompt
+  if(Target & MsgToConsole) {
+    if(strlen(Textbuffer)>0 && Textbuffer[strlen(Textbuffer)-1]=='\n') printf("\r%s", Textbuffer);
+    else printf("%s", Textbuffer);
+
+    // New prompt only after newline
+    if(Textbuffer[strlen(Textbuffer)-1]=='\n' || strlen(Textbuffer)==0) {
+      if (NumCMCBoards == 0) printf("\rDAQ> "); 
+      else if (FirstBoard == LastBoard) printf("\rDAQ|B%d> ",FirstBoard); 
+      else printf("\rDAQ|B%d-%d> ",FirstBoard,LastBoard); 
+      fflush(stdout);
+    }
+  }
+
+  // Print to log file and socket only if length not zero (then only prompt)
+  if (strlen(Textbuffer)>0) {
+    if((Target & MsgToLog) && Logfile!=NULL) {
+      fprintf(Logfile, "%s", Textbuffer);
+      fflush(Logfile);
+    }
+    if((Target & MsgToSocket) && Socket!=-1) write(Socket, Textbuffer, strlen(Textbuffer));
+  }
+}
+
+
+// ---------------------------------------
+// *****  Various utility functions  *****
+// ---------------------------------------
+
+// Check if two strings match (min 1 character must match)
+int Match(char *str, char *cmd) {
+  return strncasecmp(str,cmd,strlen(str)==0 ? 1:strlen(str)) ? 0:1;
+}
+
+// Return current available storage space in given directory
+int CheckDisk(char *Directory) {
+  struct statfs FileSystemStats;
+
+  statfs(Directory, &FileSystemStats);
+  return FileSystemStats.f_bavail / 1024 * (FileSystemStats.f_bsize / 1024);
+}
+
+// Parse command line for white space and double-quote separated tokens 
+int ParseInput(char* Command, char *Param[]) {
+  int Count=0;
+   
+  while(Count<MAX_NUM_TOKEN) {
+    while (isspace(*Command)) Command++; // Ignore initial white spaces
+    if(*Command=='\0') break;
+    if (*Command == '\"') {
+      Param[Count] = ++Command;
+      while(*Command!='\"' && *Command!='\0') Command++;
+    }
+    else {
+      Param[Count] = Command;
+      while(!isspace(*Command) && *Command!='\0') Command++;
+    }
+    *Command++ = '\0';
+    Count++;
+  };
+  return Count;
+}
+
+// ReadCard function by F. Goebel
+int ReadCard(char *card_flag, void *store, char type, FILE *fptr) {
+  
+  char *card_name, *card_val, line[160];
+
+  rewind(fptr);
+
+  while (fgets(line, 160, fptr) != NULL) {    // Read line by line
+    card_name = strtok(line," \t\n");
+    card_val  = strtok(NULL," \t\n");
+    
+    if (   card_name    != NULL  && card_val     != NULL   // Comment or empty line?
+        && card_name[0] != '*'   && card_name[0] != '#') {
+      
+      if (strcmp(card_name, card_flag)!=0) {   // Is this the card name we are looking for?
+	continue;  
+      }
+
+      switch (type) {
+      case 'I':	*((int *) store)   = (int) strtol(card_val, (char**)NULL, 10);
+	      	break;
+      case 'i':	*((short *) store) = (short) strtol(card_val, (char**)NULL, 10);
+	      	break;
+      case 'U':	*((unsigned int *) store) = (unsigned int) strtoul(card_val, (char**)NULL, 10);
+	      	break;
+      case 'u':	*((unsigned short *) store) = (unsigned short) strtoul(card_val, (char**)NULL, 10);
+	      	break;
+      case 'f': *((float *) store) = atof(card_val);
+	      	break;
+      case 'd':	*((double *) store) = atof(card_val);
+	      	break;
+      case 's':	sprintf((char *) store,"%s",card_val);
+	      	break;
+      case 'c':	*((char *) store) = card_val[0];
+	      	break;
+      default:	fprintf(stderr,"WARNING: ReadCard: unknown type: %c\n", type);
+	      	return -2;
+      }
+      return 0; // Found card name
+    }
+  }
+  fprintf(stderr,"WARNING: ReadCard: card: %s not found\n", card_flag);
+  return -1;
+}
+
+
+/********************************************************************\
+
+  DAQ Thread
+
+  This thread takes data until the requested number of events is reached,
+  until no more disk space is available or until data taking is stopped.
+  No mutex mechanism is used since variables will never be written 
+  simultaneoously by two threads.
+  
+\********************************************************************/
+
+void DAQ(DAQReadout *m) {
+
+  struct timeval StartTime, StopTime;
+  int Filepart;
+  unsigned int EventsInFile;
+  unsigned long long RunSize;
+   
+  Filepart = 0;   RunSize = 0;
+  m->HVFB->ClearAverages();    
+  m->NumEvents = 0;
+  gettimeofday(&StartTime, NULL);
+
+  m->PrintMessage("\rStarting run #%d (%s) on \"%s\" with %u event(s)\n",m->RunNumber,daq_runtype_str[m->daq_runtype],m->Source,m->NumEventsRequested);
+  do {
+    // Check if enough disk space is left
+    if (CheckDisk(m->fRawDataPath) <= m->fMinDiskSpaceMB+m->fMaxFileSizeMB) {	  
+      m->PrintMessage("\rError: Disk space after next file (max. %d MByte) below %d MByte\n",m->fMaxFileSizeMB,m->fMinDiskSpaceMB);
+      break;
+    }
+
+    // Init run header, open raw file, write run header
+    if (!m->OpenRawFile(Filepart)) break;
+    m->PrintMessage("\rData file \"%s\" opened.\n",m->FileName);
+    EventsInFile = 0;
+    m->WriteRunHeader();
+    
+    if (m->daq_runtype != test) m->StartDRS(); 
+
+    // Take data until finished, stopped or file too large   
+    while (m->NumEvents<m->NumEventsRequested && !m->Stop && 
+      ftell (m->Rawfile)/1024/1024<m->fMaxFileSizeMB) {
+
+      if (m->daq_runtype == data) while (m->IsDRSBusy());  // Wait for hardware trigger (if DAQ stopped, DRS will not be busy anymore)
+      else if (m->daq_runtype == pedestal) m->StopDRS();      // Wait for software trigger
+
+      EventsInFile++;
+      m->NumEvents++;	
+      m->WriteEventHeader();
+
+      // Read event data via VME or generate test data (for one board if no boards available)
+      if (m->daq_runtype != test) {
+	m->ReadCalibratedDRSData();
+        m->StartDRS();  // Restart here: writing data is in parallel to waiting for next trigger
+      }
+      else {
+	double Period = ((double) rand())/RAND_MAX*20;
+	for (long int i=0; i<(m->NumCMCBoards>0 ?  m->NumCMCBoards : 1)*kNumberOfChips*kNumberOfChannels*kNumberOfBins; i++)
+	  *((short *) m->WaveForm+i) = (short) (sin(i/Period)*1000);
+      }
+      // Write data to disk
+      for (int i=m->FirstBoard; i<=m->LastBoard + (m->NumCMCBoards==0); i++) {
+        for (unsigned int k=0; k<m->RHeader->NChips*m->RHeader->NChannels; k++) 
+    	  if(fwrite((short *) m->WaveForm[i] + m->RHeader->Offset + k*kNumberOfBins, sizeof(short), m->RHeader->Samples, m->Rawfile) != m->RHeader->Samples) {
+            m->PrintMessage("Error: Could not write event data, terminating run ()\n", strerror(errno));
+            m->Stop = true;
+    	  }
+        }
+      // Call feedback to process event
+      m->HVFB->ProcessEvent();
+    }
+
+    // Write updated run header, close file
+    RunSize += ftell (m->Rawfile);
+    m->UpdateRunHeader(EventsInFile);
+    fclose(m->Rawfile);  
+    m->PrintMessage("Data file closed.\n");
+
+    Filepart += 1; 
+  } while(m->NumEvents < m->NumEventsRequested && !m->Stop);
+
+  m->StopDRS();
+
+  m->PrintMessage("\r%s run #%d %s (%d event(s))\n",daq_runtype_str[m->daq_runtype],m->RunNumber,(m->NumEvents == m->NumEventsRequested) ? "completed":"stopped",m->NumEvents);
+  if (m->NumEvents>0) {
+      gettimeofday(&StopTime, NULL);
+      float RunTime = StopTime.tv_sec-StartTime.tv_sec + (StopTime.tv_usec-StartTime.tv_usec)*1e-6;
+      m->PrintMessage("Time for run %.2f seconds, trigger rate %.2f Hz.\n", RunTime, m->NumEvents/RunTime);
+      m->PrintMessage("Run size %llu MByte, data rate %.1f MByte/s.\n", RunSize/1024/1024, RunSize/1024.0/1024/RunTime);
+  }
+  m->daq_state = stopped;
+}
Index: /drsdaq/DAQReadout.h
===================================================================
--- /drsdaq/DAQReadout.h	(revision 22)
+++ /drsdaq/DAQReadout.h	(revision 22)
@@ -0,0 +1,138 @@
+#ifndef DAQREADOUT_H_SEEN
+#define DAQREADOUT_H_SEEN
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <time.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <pthread.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <sys/vfs.h>
+#include <signal.h>
+
+#include "RawDataCTX.h"
+#include "DRS.h"
+#include "HVFeedback.h"
+
+#define MAX_PATH 256		// also used for filename length
+#define MAX_COM_SIZE 10000
+#define MAX_NUM_TOKEN 10
+
+#define MsgToConsole 1
+#define MsgToLog 2
+#define MsgToSocket 4
+
+enum state_enum {active, stopped};
+enum runtype_enum {data, pedestal, test};
+
+class DAQReadout {
+    time_t StartTime;
+    DRS *drs;
+    pthread_t thread_DAQ;
+    unsigned int CmdNumber;
+    FILE *Logfile;    
+    void PrintUsage();
+    	
+  public:
+    RunHeader*   RHeader;
+    EventHeader* EHeader;
+    
+    short (*WaveForm)[kNumberOfChips][kNumberOfChannels][kNumberOfBins];
+    pthread_mutex_t control_mutex;
+    FILE *Rawfile;
+    class HVFeedback* HVFB;
+
+    // Configuration data
+    char fLogFile[MAX_PATH];
+    char fRawDataPath[MAX_PATH];
+    int fMinDiskSpaceMB;   // Minimum required disk space in MBytes
+    int fMaxFileSizeMB;    // Maximum File size in Bytes 
+    unsigned int fFirstSample;
+    unsigned int fLastSample;
+    short fRotateWave;
+    int fCCPort;
+    int fLastVMESlot;
+    int fFirstVMESlot;
+    char fHVFeedbackConfig[MAX_PATH];
+    
+    // Status variables    
+    int NParam;       	      	// Number of parameters
+    char *Param[MAX_NUM_TOKEN]; // Pointers to parameters
+    bool CmdFromSocket;       	// Current command issued via socket
+    int NumCMCBoards;
+    int FirstBoard;
+    int LastBoard;
+    float *DRSFreq;   	      	// DRS sampling frequency [GHz]
+    BoardStructure *BStruct;
+    state_enum   daq_state;
+    runtype_enum daq_runtype;
+    int Socket;			// -1 if not connected
+    pthread_t *SocketThread;	// exit function sends signal to this thread
+    bool Exit;
+    bool Stop;	      	      	// Set to true to stop run
+    unsigned int NumEvents;		// Number of event taken            
+    unsigned int NumEventsRequested;	// Number of events requested
+    unsigned int RunNumber; 
+    char Source[32];
+    char FileName[MAX_PATH];
+
+    
+    // Public functions
+    DAQReadout(const char*);
+    ~DAQReadout();
+
+    void cmd_exit();	  void cmd_help();
+    void cmd_board();	  void cmd_status();
+    void cmd_led();	  void cmd_freq();
+    void cmd_calib();	  void cmd_serial();
+    void cmd_trigger();	  void cmd_delayed();
+    void cmd_wmode();	  void cmd_rmode();
+    void cmd_mode();	  void cmd_read();
+    void cmd_stop();	  void cmd_test();
+    void cmd_regtest();	  void cmd_ramtest();
+    void cmd_start();	  void cmd_take();
+    void cmd_config();	  void cmd_events();
+    void cmd_disk();	  void cmd_uptime();
+      
+    void cmd_fmode(); 	  void cmd_faverage();
+    void cmd_ftarget();   void cmd_fgain();
+    void cmd_fresponse(); void cmd_fconfig();
+
+    int CommandControl(char*, bool);  
+    void StartDRS();
+    void StopDRS();
+    void StopRun();
+    bool IsDAQBusy();
+    bool IsDRSBusy();
+    bool IsDRSFreqSet();
+    void SetDRSFrequency(double);
+    void SetRegulatedDRSFrequency(double);
+    double ReadDRSFrequency();
+    void CalibrateDRS(char*, double, double);
+    void SetDOMINOMode(int);
+    void SetDOMINOReadMode(int);
+    void SetDOMINOWaveMode(int);
+    void SetDelayedStart(int);
+    void HWTrigger(int); 
+    bool ReadCalibration();
+    bool IsCalibrationRead();
+    void ReadCalibratedDRSData();
+    void ReadandPrintDRSData(int, int, int);
+    void PrintMessage(int, char*, ...);
+    void PrintMessage(char*, ...);
+    void PrintMessage(int, char*, va_list); 
+    bool OpenRawFile(int);
+    void WriteRunHeader();
+    void UpdateRunHeader(unsigned int);
+    void WriteEventHeader();
+};
+
+void DAQ(DAQReadout *);
+int Match(char*, char*);
+int ParseInput(char*, char *Param[]);
+int CheckDisk(char*);
+int ReadCard(char *, void *, char, FILE *);
+
+#endif
Index: /drsdaq/DRS/DRS.cc
===================================================================
--- /drsdaq/DRS/DRS.cc	(revision 22)
+++ /drsdaq/DRS/DRS.cc	(revision 22)
@@ -0,0 +1,4446 @@
+
+/********************************************************************\
+
+  Name:         DRS.cc
+
+  Created by:   Stefan Ritt, Matthias Schneebeli
+
+  Modified by:  Sebastian Commichau, May-November 2008
+                commichau@phys.ethz.ch
+
+  Modification: This library works with:
+                - Concurrent Technolgies VME single board PC (VP 315) 
+                - Struck VME controller (SIS 3100) => faster!
+
+  Contents:     Library functions for DRS board CMC card - requires
+                DRS version 2 or 3 
+
+\********************************************************************/
+
+#include "DRS.h"
+
+#define DEBUG 0
+
+// Minimal FPGA firmware version required for this library
+#define REQUIRED_FIRMWARE_VERSION_DRS2 5268
+#define REQUIRED_FIRMWARE_VERSION_DRS3 6981
+
+#ifdef CT_VME
+#define MEM_SEGMENT 0XA000 // Size of the memory segment allocated by each DRS board for BLT
+#define BLT_TIMEOUT 1000   // Timeout for BLT [msec]
+#endif
+
+int drs_kbhit()
+{
+  int n;
+  
+  ioctl(0, FIONREAD, &n);
+  return (n > 0);
+}
+
+static inline int getch() { return getchar(); }
+inline void Sleep(useconds_t x) { usleep(x * 1000); }
+
+// VME addresses
+
+/* Assuming following DIP Switch settings:
+   
+SW1-1: 1 (off)       Use geographical addressing (1=left, 21=right)
+SW1-2: 1 (off)       \
+SW1-3: 1 (off)        >  VME_WINSIZE = 8MB, subwindow = 1MB
+SW1-4: 0 (on)        /
+SW1-5: 0 (on)        Reserved
+SW1-6: 0 (on)        Reserved
+SW1-7: 0 (on)        Reserved
+SW1-8: 0 (on)        \
+SW2-1: 0 (on)         |
+SW2-2: 0 (on)         |
+SW2-3: 0 (on)         |
+SW2-4: 0 (on)         >  VME_ADDR_OFFSET = 0
+SW2-5: 0 (on)         |
+SW2-6: 0 (on)         |
+SW2-7: 0 (on)         |
+SW2-8: 0 (on)        /
+
+which gives 
+VME base address = SlotNo * VME_WINSIZE + VME_ADDR_OFFSET
+= SlotNo * 0x80'0000 */
+
+#define GEVPC_BASE_ADDR           0x00000000
+#define GEVPC_WINSIZE               0x800000
+#define GEVPC_USER_FPGA   (GEVPC_WINSIZE*2/8)
+#define PMC1_OFFSET                  0x00000
+#define PMC2_OFFSET                  0x80000
+#define PMC_CTRL_OFFSET              0x00000  // All registers 32 bit!
+#define PMC_STATUS_OFFSET            0x10000
+#define PMC_FIFO_OFFSET              0x20000
+#define PMC_RAM_OFFSET               0x40000
+
+// DRS registers
+#define T_CTRL                     1
+#define T_STATUS                   2
+#define T_RAM                      3
+#define T_FIFO                     4
+#define REG_CTRL             0x00000    // 32-bit control reg
+#define REG_DAC_OFS          0x00004
+#define REG_DAC0             0x00004
+#define REG_DAC1             0x00006
+#define REG_DAC2             0x00008
+#define REG_DAC3             0x0000A
+#define REG_DAC4             0x0000C
+#define REG_DAC5             0x0000E
+#define REG_DAC6             0x00010
+#define REG_DAC7             0x00012
+#define REG_CHANNEL_CONFIG   0x00014
+#define REG_CHANNEL_SPAN     0x00016
+#define REG_FREQ_SET_HI      0x00018
+#define REG_FREQ_SET_LO      0x0001A
+#define REG_TRIG_DELAY       0x0001C
+#define REG_CALIB_TIMING     0x0001E
+#define REG_STATUS           0x00000
+#define REG_RDAC_OFS         0x0000A
+#define REG_RDAC0            0x00004
+#define REG_RDAC1            0x00006
+#define REG_RDAC2            0x00008
+#define REG_RDAC3            0x0000A
+#define REG_RDAC4            0x0000C
+#define REG_RDAC5            0x0000E
+#define REG_RDAC6            0x00010
+#define REG_RDAC7            0x00012
+#define REG_EVENTS_IN_FIFO   0x00014
+#define REG_EVENT_COUNT      0x00016
+#define REG_FREQ1            0x00018
+#define REG_FREQ2            0x0001A
+#define REG_TEMPERATURE      0x0001C
+#define REG_TRIGGER_BUS      0x0001E
+#define REG_SERIAL_CMC       0x00020
+#define REG_VERSION_FW       0x00022
+
+using namespace std;
+
+
+DRS::DRS() : fNumberOfBoards(0),
+#ifdef STRUCK_VME
+	     fVMEInterface(0),
+#endif
+	     First_VME_Slot(0), Last_VME_Slot(7)
+{ }
+
+
+/*------------------------------------------------------------------*/
+
+DRS::~DRS() {
+  
+  int i;
+  
+  for (i = 0; i < fNumberOfBoards; i++) {
+    delete fBoard[i];
+  }
+  
+#ifdef CT_VME 
+  if (!CloseVME()) 
+    printf("VME connection closed\n");
+  
+  if (!CloseCMEM())
+    printf("CMEM closed\n");
+#endif
+
+#ifdef STRUCK_VME
+  if (fVMEInterface != NULL)
+    if (mvme_close(fVMEInterface));
+	printf("VME connection closed\n");
+
+#endif
+
+}
+
+/*------------------------------------------------------------------*/
+#ifdef CT_VME 
+int DRS::OpenVME() {
+
+  // Open VME connection
+  if ((ErrorCode = VME_Open()) != VME_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return ErrorCode;
+}
+#endif
+/*------------------------------------------------------------------*/
+
+void DRS::InitialScan() {
+
+  int index = 0;
+  
+  unsigned short Firmware, Serial, Temperature;
+
+#ifdef CT_VME 
+  
+  unsigned int BoardAddress;
+    
+  if (!OpenVME()) {
+    
+    printf("VME connection opened\n");
+
+    if (!OpenCMEM())
+      printf("CMEM opened\n");
+    else return;
+    
+    // Set master mapping input information
+    MasterMap.vmebus_address	= GEVPC_BASE_ADDR + index * GEVPC_WINSIZE; // Init VME board base address (derived from
+                                                                           // the slot number => geographical addressing)
+
+    MasterMap.window_size	= GEVPC_WINSIZE;                           // VME address window size
+    
+    MasterMap.address_modifier	= VME_A32;  
+    MasterMap.options		= 0;
+    
+    
+    // Check all VME slave slots 
+    for (index = First_VME_Slot; index <= Last_VME_Slot; index++) {
+      
+      
+      MasterMap.vmebus_address	= GEVPC_BASE_ADDR + index * GEVPC_WINSIZE; // Update VME board base address
+
+      
+      if (DEBUG)
+	printf("Checking VME slot %d (base address: 0X%08X)\n",index,MasterMap.vmebus_address);
+                  
+      MasterMapVME(&MasterMapping[index]);
+      
+      // **************************** Check PMC1 ****************************
+      BoardAddress  = GEVPC_USER_FPGA;   // UsrFPGA base address
+      BoardAddress += PMC1_OFFSET;       // PMC1 offset
+      
+      // Read firmware
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_VERSION_FW, &Firmware);
+      
+      // Read serial number
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_SERIAL_CMC, &Serial);
+
+      // Read temperature register to see if CMC card is present 
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_TEMPERATURE, &Temperature);
+      
+      if (Firmware > 2400 && Firmware < 20000) {
+	
+	if (Temperature == 0XFFFF) {
+	  if (DEBUG)
+	    printf("No CMC board in slot %d\n", index);
+	} else {
+	  if (DEBUG) {
+	    printf("Found CMC board in slot %d:\n", index);
+	    printf(" Firmware: %d\n",Firmware);
+	    printf(" Board serial nr.: %d\n",Serial);
+	    printf(" Temperature register: %d\n",Temperature);
+	  }
+	  
+	  fBoard[fNumberOfBoards] = new DRSBoard(MasterMapping[index], MasterMap.vmebus_address, BoardAddress, (index-2) << 1);
+	  
+	  if (fBoard[fNumberOfBoards]->HasCorrectFirmware())
+	    fNumberOfBoards++;
+	  else
+	    if (DEBUG) 
+	      printf("Error: wrong firmware version: board has %d, required is %d\n",
+		     fBoard[fNumberOfBoards]->GetFirmwareVersion(),
+		     fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion());
+	}
+      }
+
+           
+      // **************************** Check PMC2 ****************************
+      BoardAddress  = GEVPC_USER_FPGA;   // UsrFPGA base address
+      BoardAddress += PMC2_OFFSET;       // PMC2 offset
+      
+      // Read firmware
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_VERSION_FW, &Firmware);
+      
+      // Read serial number
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_SERIAL_CMC, &Serial);
+      
+      // Read temperature register to see if CMC card is present 
+      VME_ReadFastUShort(MasterMapping[index], BoardAddress + PMC_STATUS_OFFSET + REG_TEMPERATURE, &Temperature);
+
+      if (Firmware > 2400 && Firmware < 20000) {
+	
+	if (Temperature == 0XFFFF) {
+	  printf("No CMC board in slot %d\n", index);
+	} else {
+	  if (DEBUG) {
+	    printf("Found CMC board in slot %d:\n", index);
+	    printf(" Firmware: %d\n",Firmware);
+	    printf(" Board serial nr.: %d\n",Serial);
+	    printf(" Temperature register: %d\n",Temperature);
+	  }
+		  
+	  fBoard[fNumberOfBoards] = new DRSBoard(MasterMapping[index], MasterMap.vmebus_address, BoardAddress, ((index-2) << 1) | 1);
+	  
+	  if (fBoard[fNumberOfBoards]->HasCorrectFirmware())
+	    fNumberOfBoards++;
+	  else
+	    if (DEBUG) 
+	      printf("Error: wrong firmware version: board has %d, required is %d\n",
+		     fBoard[fNumberOfBoards]->GetFirmwareVersion(),
+		     fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion());
+	}
+      }
+      else
+	MasterUnMapVME(MasterMapping[index]);
+    }
+    if (DEBUG) printf("Found %d DRS boards in VME crate\n", fNumberOfBoards);
+  } 
+#endif
+#ifdef STRUCK_VME
+
+  int i = 0;
+
+  mvme_addr_t Address;
+  
+  if (mvme_open(&fVMEInterface, 0) == MVME_SUCCESS) {
+    
+    printf("VME connection opened\n");
+
+    mvme_set_am(fVMEInterface, MVME_AM_A32);
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D16);
+    
+    // Check all VME slave slots 
+    for (index = 2; index <= 21; index++) {
+      
+      // **************************** Check PMC1 ****************************
+      Address = GEVPC_BASE_ADDR + index * GEVPC_WINSIZE;  // VME board base address
+      Address += GEVPC_USER_FPGA;                         // UsrFPGA base address
+      Address += PMC1_OFFSET;                             // PMC1 offset
+
+      // Read firmware
+      i = mvme_read(fVMEInterface, &Firmware, Address + PMC_STATUS_OFFSET + REG_VERSION_FW, 2);
+      
+      if (i == 2) {
+	
+	// Read serial number
+	mvme_read(fVMEInterface, &Serial, Address + PMC_STATUS_OFFSET + REG_SERIAL_CMC, 2);
+	
+	// Read temperature register to see if CMC card is present 
+	mvme_read(fVMEInterface, &Temperature, Address + PMC_STATUS_OFFSET + REG_TEMPERATURE, 2);
+	
+	if (Firmware > 2400 && Firmware < 20000) {
+	  
+	  if (Temperature == 0xFFFF) {
+	    printf("No CMC board in slot %d\n", index);
+	  } else {
+	    if (DEBUG) {
+	      printf("Found CMC board in slot %d:\n", index);
+	      printf(" Firmware: %d\n",Firmware);
+	      printf(" Board serial nr.: %d\n",Serial);
+	      printf(" Temperature register: %d\n",Temperature);
+	    }
+	    
+	    fBoard[fNumberOfBoards] = new DRSBoard(fVMEInterface, Address, (index-2) << 1);
+	    
+	    if (fBoard[fNumberOfBoards]->HasCorrectFirmware())
+	      fNumberOfBoards++;
+	    else
+	      if (DEBUG) 
+		printf("Error: wrong firmware version: board has %d, required is %d\n",
+		       fBoard[fNumberOfBoards]->GetFirmwareVersion(),
+		       fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion());
+	    
+	  }
+	}
+      }
+      
+      // **************************** Check PMC2 ****************************
+      Address = GEVPC_BASE_ADDR + index * GEVPC_WINSIZE;  // VME board base address
+      Address += GEVPC_USER_FPGA;                         // UsrFPGA base address
+      Address += PMC2_OFFSET;                             // PMC2 offset
+      
+      // Read firmware
+      i = mvme_read(fVMEInterface, &Firmware, Address + PMC_STATUS_OFFSET + REG_VERSION_FW, 2);
+
+      if (i == 2) {
+
+	// Read serial number
+	mvme_read(fVMEInterface, &Serial, Address + PMC_STATUS_OFFSET + REG_SERIAL_CMC, 2);
+	
+	// Read temperature register to see if CMC card is present 
+	mvme_read(fVMEInterface, &Temperature, Address + PMC_STATUS_OFFSET + REG_TEMPERATURE, 2);
+	
+	if (Firmware > 2400 && Firmware < 20000) {
+	  
+	  if (Temperature == 0xFFFF) {
+	    printf("No CMC board in slot %d\n", index);
+	  } else {
+	    if (DEBUG) {
+	      printf("Found CMC board in slot %d:\n", index);
+	      printf(" Firmware: %d\n",Firmware);
+	      printf(" Board serial nr.: %d\n",Serial);
+	      printf(" Temperature register: %d\n",Temperature);
+	    }
+	    
+	    fBoard[fNumberOfBoards] = new DRSBoard(fVMEInterface, Address, ((index-2) << 1) | 1);
+	
+	    if (fBoard[fNumberOfBoards]->HasCorrectFirmware())
+	      fNumberOfBoards++;
+	    else
+	      if (DEBUG) 
+		printf("Error: wrong firmware version: board has %d, required is %d\n",
+		       fBoard[fNumberOfBoards]->GetFirmwareVersion(),
+		       fBoard[fNumberOfBoards]->GetRequiredFirmwareVersion());
+	  }
+	}
+      }
+    }
+    if (DEBUG) printf("Found %d DRS boards in VME crate\n", fNumberOfBoards);
+  }   
+#endif
+  else printf("Error: cannot access VME crate, check driver, power and connection\n");
+
+}
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRS::MasterMapVME(int *MMap) {
+  
+  // Do master mapping  
+  if (ErrorCode = VME_MasterMap(&MasterMap, MMap)) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return(ErrorCode);
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRS::MasterUnMapVME(int MMap) {
+  
+  // Delete master mapping
+  if (ErrorCode = VME_MasterUnmap(MMap)) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return(ErrorCode);  
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRS::CloseVME() {
+  
+  // Close VME connection
+  if ((ErrorCode = VME_Close()) != VME_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRS::OpenCMEM() {
+  
+  // Open CMEM package
+  if ((ErrorCode = CMEM_Open()) != CMEM_RCC_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRS::CloseCMEM() {
+  
+  // Close CMEM package
+  if ((ErrorCode = CMEM_Close()) != CMEM_RCC_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME
+DRSBoard::DRSBoard(int MasterMapping, unsigned int BaseAddress, unsigned int BoardAddress, int SlotNumber)
+#else
+DRSBoard::DRSBoard(MVME_INTERFACE *MVME_Interface, mvme_addr_t BaseAddress, int SlotNumber)
+#endif
+  :fDAC_COFSA(0)
+  ,fDAC_COFSB(0)
+  ,fDAC_DRA(0)
+  ,fDAC_DSA(0)
+  ,fDAC_TLEVEL(0)
+  ,fDAC_ACALIB(0)
+  ,fDAC_DSB(0)
+  ,fDAC_DRB(0)
+  ,fDAC_COFS(0)
+  ,fDAC_ADCOFS(0)
+  ,fDAC_CLKOFS(0)
+  ,fDAC_ROFS_1(0)
+  ,fDAC_ROFS_2(0)
+  ,fDAC_INOFS(0)
+  ,fDAC_BIAS(0)
+  ,fRequiredFirmwareVersion(0)
+  ,fFirmwareVersion(0)
+  ,fChipVersion(0)
+  ,fBoardVersion(0)
+  ,fCMCSerialNumber(0)
+  ,fCtrlBits(0)
+  ,fNumberOfReadoutChannels(0)
+  ,fExternalClockFrequency(0)
+  ,fBaseAddress(BaseAddress)
+#ifdef CT_VME
+  ,fBoardAddress(BoardAddress)
+  ,fMasterMapping(MasterMapping)
+  ,fSlotNumber(SlotNumber)
+#endif
+#ifdef STRUCK_VME
+  ,fVMEInterface(MVME_Interface)
+  ,fSlotNumber(SlotNumber)
+#endif
+  ,fFrequency(0)
+  ,fDominoMode(0)
+  ,fReadoutMode(0)
+  ,fTriggerEnable(0)
+  ,fDelayedStart(0)
+  ,fTriggerCell(0)
+  ,fMaxChips(0)
+  ,fResponseCalibration(0)
+  ,fTimeData(0)
+  ,fNumberOfTimeData(0)
+  ,fDebug(0)
+  ,fTriggerStartBin(0)
+  ,kRotateWave(0)
+{
+  ConstructBoard();
+}
+
+
+/*------------------------------------------------------------------*/
+
+DRSBoard::~DRSBoard()
+{
+  // Response Calibration
+  delete fResponseCalibration;
+  
+  int i;
+  // Time Calibration
+  for (i = 0; i < fNumberOfTimeData; i++) {
+    delete fTimeData[i];
+  }
+  delete[]fTimeData;
+  
+#ifdef CT_VME 
+  if (!FreeSegmentCMEM(CMEM_SegIdentifier) && DEBUG)
+    printf("Memory segment %d (board #%d) freed\n",CMEM_SegIdentifier,fCMCSerialNumber);
+#endif
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::ConstructBoard()
+{
+  fDebug = 0;
+  fDominoMode = 1;
+  fReadoutMode = 0;
+  fTriggerEnable = 0;
+  fCtrlBits = 0;
+  fNumberOfReadoutChannels = 10;
+  fExternalClockFrequency = 1000. / 30.;
+  
+  for (int i = 0; i < kNumberOfChips * kNumberOfChannels; i++)
+    fWaveTransferred[i] = false;
+  
+  strcpy(fCalibDirectory, ".");
+  
+#ifdef CT_VME
+  if (DEBUG) {
+    printf("Base address:  0X%08X\n",fBaseAddress);
+    printf("Board address: 0X%08X\n",fBoardAddress);
+    printf("0X%08X\n",fBaseAddress+fBoardAddress);
+  }
+#endif
+  ReadSerialNumber();
+  
+  // Check for required firmware version 
+  if (!HasCorrectFirmware())
+    return;
+  
+  if (DEBUG)
+    printf("Board version: %d\n",fBoardVersion);
+
+  if (fBoardVersion == 1) {
+    
+    fDAC_COFSA  = 0;
+    fDAC_COFSB  = 1;
+    fDAC_DRA    = 2;
+    fDAC_DSA    = 3;
+    fDAC_TLEVEL = 4;
+    fDAC_ACALIB = 5;
+    fDAC_DSB    = 6;
+    fDAC_DRB    = 7;
+    
+  } else if (fBoardVersion == 2 || fBoardVersion == 3) {
+    
+    fDAC_COFS   = 0;
+    fDAC_DSA    = 1;
+    fDAC_DSB    = 2;
+    fDAC_TLEVEL = 3;
+    fDAC_CLKOFS = 5;
+    fDAC_ACALIB = 6;
+    fDAC_ADCOFS = 7;
+    
+  } else if (fBoardVersion == 4) {
+    
+    fDAC_ROFS_1 = 0;
+    fDAC_DSA    = 1;
+    fDAC_DSB    = 2;
+    fDAC_ROFS_2 = 3;
+    fDAC_BIAS   = 4;
+    fDAC_ADCOFS = 7;
+    fDAC_INOFS  = 5;
+    fDAC_ACALIB = 6;
+  }
+  
+  // Response Calibration
+  fResponseCalibration = new ResponseCalibration(this);
+  
+  // Time Calibration
+  fTimeData = new DRSBoard::TimeData *[kNumberOfChips];
+  fNumberOfTimeData = 0;
+
+#ifdef CT_VME 
+  // Allocate contiguous memory for BLT
+  AllocateSegmentCMEM(MEM_SEGMENT,&CMEM_SegIdentifier);
+  if (DEBUG)
+    printf("Memory segment %d (board #%d) allocated\n",CMEM_SegIdentifier,fCMCSerialNumber);
+
+  AssignPhysicalSegAddressCMEM(CMEM_SegIdentifier, &PCIAddress);
+  AssignVirtualSegAddressCMEM(CMEM_SegIdentifier, &VirtualAddress);
+  if (DEBUG)
+    printf("Physical address: 0X%08X, virtual address: 0X%08X\n", (unsigned int)PCIAddress,(unsigned int)VirtualAddress);
+#endif
+
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::PrintBinary32(unsigned int i) {
+
+  int k;
+
+  for (k=31;k>=0;k--)
+    if ((i & (1 << k)) !=0) {
+	if ((k)%8)
+       	printf("1");
+        else
+        printf("1 ");
+    }
+    else {
+        if ((k)%8)
+        printf("0");
+        else
+        printf("0 ");
+    }
+  printf("\n");
+}
+
+/*------------------------------------------------------------------*/
+
+long int DRSBoard::GetMicroSeconds() {
+
+  struct tm * timeinfo;
+  time_t rawtime;
+  
+  struct timezone tz;
+  struct timeval actual_time;   // Actual time 
+  
+  gettimeofday(&actual_time, &tz);
+  
+  time(&rawtime);
+  
+  timeinfo = gmtime(&rawtime);  // Get UTC (or GMT timezone).
+  
+  return (timeinfo->tm_hour*3600 + timeinfo->tm_min*60 + timeinfo->tm_sec)*1000000 + actual_time.tv_usec;
+
+}
+
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::TestRead(unsigned int n, int type) {
+
+  float delta;
+  float mbps;
+
+  int errors = 0;
+  
+  const int size = 0X10000; // bytes
+  
+#ifdef STRUCK_VME 
+
+  long int ts1, ts2;
+  
+  unsigned int Address = fBaseAddress + PMC_RAM_OFFSET;
+
+  int read = 0, i;
+
+  unsigned char data[size];
+    
+  printf("**************************************************\n");
+
+  if (type==0) {
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D32);
+    mvme_set_blt(fVMEInterface, MVME_BLT_BLT32); 
+    printf(" Mode: VMEbus A32/D32 DMA read [64 kB]\n");
+  }
+  else if (type==1) {
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D32);
+    mvme_set_blt(fVMEInterface,MVME_BLT_MBLT64);
+    printf(" Mode: VMEbus A32/D64 DMA read [64 kB]\n");
+  }
+  else if (type==2) {
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D64);
+    mvme_set_blt(fVMEInterface, MVME_BLT_2EVME); 
+    printf(" Mode: VMEbus A32/D64 2eVME read [64 kB]\n");
+  }
+
+  ts1 = GetMicroSeconds();
+
+  for (unsigned int j=0;j<n;j++) {
+    read = mvme_read(fVMEInterface, static_cast<unsigned char*>(data), Address, size);
+    
+    while (read != size) {
+
+      errors++;
+      printf("Only read %d out of %d, retry with %d: ", read, size, size-read);
+      i = mvme_read(fVMEInterface, static_cast<unsigned char*>(data) + read/4, Address + read, size - read);
+      printf("read %d\n", i);
+      if (i == 0) {
+	printf("Error reading VME\n");
+	return read;
+      }
+      read += i;
+    }
+  }
+
+  ts2 = GetMicroSeconds();
+
+  delta = (ts2 - ts1)/1000000.;
+
+  mbps  = n * read * 1.0/(delta * 1024. * 1024.);
+
+  printf(" %d BLT(s) finished...\n",n);
+  
+  if (!errors)
+    printf(" %d errors... success!\n",errors);
+  else
+    printf(" %d errors...\n",errors);
+  
+  printf(" Duration: %.3f s\n", delta);
+  printf(" Rate: %.3f MB/s\n", mbps);
+
+  printf("**************************************************\n");
+  
+#endif
+#ifdef CT_VME 
+  tstamp ts1, ts2;
+
+  unsigned int ret;
+
+  ret = ts_open(1, TS_DUMMY);
+  if (ret)
+  {
+    rcc_error_print(stdout, ret);
+    exit(-2);
+  }
+
+  printf("**************************************************\n");
+
+  // Assign fields for BLT
+  BLT_List.number_of_items                       = 1;
+  BLT_List.list_of_items[0].vmebus_address       = fBaseAddress + fBoardAddress + PMC_RAM_OFFSET;
+  BLT_List.list_of_items[0].system_iobus_address = PCIAddress;
+  BLT_List.list_of_items[0].size_requested       = size;
+
+  if (type==0) {
+    BLT_List.list_of_items[0].control_word         = VME_DMA_D32R | VME_A32; 
+    printf(" Mode: VMEbus A32/D32 DMA read [64 kB]\n");
+  }
+  else if (type==1) {
+    BLT_List.list_of_items[0].control_word         = VME_DMA_D64R | VME_A32; 
+    printf(" Mode: VMEbus A32/D64 DMA read [64 kB]\n");
+  }
+  else if (type==2) {
+    printf("Warning: current interface does not support 2exx transfer mode!\n");
+    return 0;
+  }
+
+  printf("  VMEbus address:   0X%08X\n", BLT_List.list_of_items[0].vmebus_address);   
+  printf(" Contiguous buffer:\n");
+  printf("  Physical address: 0X%08X\n", (unsigned int)PCIAddress); 
+  printf("  Virtual address:  0X%08X\n", (unsigned int)VirtualAddress); 
+  
+  ts_clock(&ts1);
+
+  for (unsigned int i=0;i<n;i++)
+    // Perfom BLT
+    if ((ErrorCode = VME_BlockTransfer(&BLT_List,BLT_TIMEOUT)) != VME_SUCCESS) {
+      VME_ErrorString(ErrorCode,ErrorString);
+      printf(" VME (BLT): %s\n",ErrorString);
+      
+      errors++;
+      return -1;
+    }   
+
+  ts_clock(&ts2);
+  delta = ts_duration(ts1, ts2);
+  mbps = n * size * 1.0 / (delta * 1024. * 1024.);
+    
+  printf(" %d BLT(s) finished...\n",n);
+
+  if (!errors)
+    printf(" %d errors... success!\n",errors);
+  else
+    printf(" %d errors...\n",errors);
+
+  printf(" Duration: %.3f s\n", delta);
+  printf(" Rate: %.3f MB/s\n", mbps);
+
+  ret = ts_close(TS_DUMMY);
+  if (ret)
+  {
+    rcc_error_print(stdout, ret);
+    exit(-2);
+  }
+
+  printf("**************************************************\n");
+#endif
+
+  return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::ReadSerialNumber()
+{
+  unsigned char buffer[2];
+  char str[80];
+  int number;
+  
+  Read(T_STATUS, buffer, REG_VERSION_FW, 2);
+  fFirmwareVersion = (static_cast<int>(buffer[1]) << 8) + buffer[0];
+  
+  // Retrieve board serial number
+  Read(T_STATUS, buffer, REG_SERIAL_CMC, 2);
+  number = (static_cast<int>(buffer[1]) << 8) + buffer[0];
+  fCMCSerialNumber = number;
+  
+  // Determine DRS chip number from serial number
+  fChipVersion = number < 1000 ? 2 : 3;
+  
+  if (number == 0xFFFF) {
+    printf("Found new mezzanine board. Please select DRS version (2/[3]): ");
+    fgets(str, sizeof(str), stdin);
+    if (atoi(str) == 2)
+      fChipVersion = 2;
+    else
+      fChipVersion = 3;
+  }
+  
+  // Retrieve firmware version
+  if (fChipVersion == 2)
+    fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS2;
+  if (fChipVersion == 3)
+    fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS3;
+  
+  
+  // Determine board version from serial number
+  if (number >= 1000)
+    fBoardVersion = 4;
+  else if (number >= 100)
+    fBoardVersion = 3;
+  else if (number > 0)
+    fBoardVersion = 2;
+  else {
+    fBoardVersion = 4;
+    fChipVersion = 3;
+    fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS3;
+  }
+  
+  //Fixme (SCC 03032008): change function FlashEEPROM accordingly!
+  //fChipVersion = 2;
+  //fBoardVersion = 3;
+  //fRequiredFirmwareVersion = REQUIRED_FIRMWARE_VERSION_DRS2;
+}
+
+/*------------------------------------------------------------------*/
+
+bool DRSBoard::HasCorrectFirmware()
+{
+  // Check firmware version 
+  return (fFirmwareVersion >= fRequiredFirmwareVersion);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::Write(int type, unsigned int addr, void *data, int size)
+{
+
+  // Generic write function
+
+#ifdef CT_VME 
+  if (size > MEM_SEGMENT)
+    size = MEM_SEGMENT;
+  
+  if (type == T_CTRL)
+    addr += PMC_CTRL_OFFSET;
+  else if (type == T_STATUS)
+    addr += PMC_STATUS_OFFSET;
+  else if (type == T_RAM)
+    addr += PMC_RAM_OFFSET;
+  
+  if (size == 1) {
+    
+    VME_WriteSafeUChar(fMasterMapping, fBoardAddress + addr, *(static_cast<unsigned char*>(data)));
+    
+  } else if (size == 2) {
+    
+    VME_WriteSafeUShort(fMasterMapping, fBoardAddress + addr, *(static_cast<unsigned short*>(data)));
+    
+  } else if (size == 4) {
+    
+    VME_WriteSafeUInt(fMasterMapping, fBoardAddress + addr, *(static_cast<unsigned int*>(data)));
+    
+  } else {
+    
+    // Copy contiguous block of memory starting from VirtualAddress
+    memcpy((unsigned long*)((unsigned long)VirtualAddress),(unsigned long*)data,size);
+
+    // Assign fields for BLT
+    BLT_List.list_of_items[0].vmebus_address       = fBaseAddress + fBoardAddress + PMC_RAM_OFFSET;
+    BLT_List.list_of_items[0].system_iobus_address = PCIAddress;
+    BLT_List.list_of_items[0].size_requested       = MEM_SEGMENT; 
+    BLT_List.list_of_items[0].control_word         = VME_DMA_D64W | VME_A32;
+   
+    BLT_List.number_of_items = 1;
+
+    // Perfom BLT
+    if ((ErrorCode = VME_BlockTransfer(&BLT_List,BLT_TIMEOUT)) != VME_SUCCESS) {
+      VME_ErrorString(ErrorCode,ErrorString);
+      printf("VME (BLT): %s\n",ErrorString);
+    }   
+  }
+
+#endif
+#ifdef STRUCK_VME  
+  
+  unsigned int base_addr;
+  
+  base_addr = fBaseAddress;
+  
+  if (type == T_CTRL)
+    base_addr += PMC_CTRL_OFFSET;
+  else if (type == T_STATUS)
+    base_addr += PMC_STATUS_OFFSET;
+  else if (type == T_RAM)
+    base_addr += PMC_RAM_OFFSET;
+  
+  if (size == 1) {
+    // 8-bit write access
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D8);
+    mvme_write(fVMEInterface, base_addr + addr, static_cast<mvme_locaddr_t*>(data), size);
+  } else if (size == 2) {
+    // 16-bit write access
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D16);
+    mvme_write(fVMEInterface, base_addr + addr, static_cast<mvme_locaddr_t*>(data), size);
+  } else {
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D32);
+    
+    // As long as no block transfer is supported, do pseudo block transfer
+    mvme_set_blt(fVMEInterface, MVME_BLT_NONE);
+    
+    mvme_write(fVMEInterface, base_addr + addr, static_cast<mvme_locaddr_t*>(data), size);
+  }
+  
+#endif
+
+  return size;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::Read(int type, void *data, unsigned int addr, int size)
+{
+
+  // Generic read function
+  
+#ifdef CT_VME
+
+  if (size > MEM_SEGMENT)
+    size = MEM_SEGMENT;
+
+  if (type == T_CTRL)
+    addr += PMC_CTRL_OFFSET;
+  else if (type == T_STATUS)
+    addr += PMC_STATUS_OFFSET;
+  else if (type == T_RAM) {
+    addr += PMC_RAM_OFFSET;
+  }
+  else if (type == T_FIFO) {
+    addr += PMC_FIFO_OFFSET;
+  }
+
+  if (size == 1) {
+    
+    VME_ReadFastUChar(fMasterMapping, fBoardAddress + addr, static_cast<unsigned char*>(data)); 
+  
+  } else if (size == 2) {
+    
+    VME_ReadFastUShort(fMasterMapping, fBoardAddress + addr, static_cast<unsigned short*>(data)); 
+    
+  } else if (size == 4) {
+    
+    VME_ReadFastUInt(fMasterMapping, fBoardAddress + addr, static_cast<unsigned int*>(data)); 
+
+  } else {
+
+    // Assign fields for BLT
+    BLT_List.list_of_items[0].vmebus_address       = fBaseAddress + fBoardAddress + PMC_RAM_OFFSET;
+    BLT_List.list_of_items[0].system_iobus_address = PCIAddress;
+    BLT_List.list_of_items[0].size_requested       = MEM_SEGMENT; 
+    BLT_List.list_of_items[0].control_word         = VME_DMA_D64R | VME_A32;
+   
+    BLT_List.number_of_items = 1;
+
+    // Perfom BLT
+    if ((ErrorCode = VME_BlockTransfer(&BLT_List,BLT_TIMEOUT)) != VME_SUCCESS) {
+      VME_ErrorString(ErrorCode,ErrorString);
+      printf("VME (BLT): %s\n",ErrorString);
+    }   
+    
+    // Copy contiguous block of memory starting from VirtualAddress
+    memcpy((unsigned long*)data,(unsigned long*)((unsigned long)VirtualAddress),size);
+
+    // Do pseudo BLT
+    /*for (i = 0; i < size; i += 4) 
+      VME_ReadFastUInt(fMasterMapping, fBoardAddress + addr + i, (unsigned int*)((unsigned char*)data + i));
+    
+    // Decode data
+    printf("pseudo BLT: %d %d\n",((*((unsigned char*)data + 1) & 0x0f) << 8) | *((unsigned char*)data), 
+	                         ((*((unsigned char*)data + 2)) << 4) | ((*((unsigned char*)data + 1)) >> 4) );
+
+    printf("pseudo BLT: %d %d\n",((*((unsigned char*)data + 5) & 0x0f) << 8) | *((unsigned char*)data + 4), 
+	                         ((*((unsigned char*)data + 6)) << 4) | ((*((unsigned char*)data + 5)) >> 4) );
+    */
+  }
+  return size;
+
+#endif
+#ifdef STRUCK_VME
+
+  unsigned int base_addr;
+  int n, i;
+  
+  base_addr = fBaseAddress;
+  
+  if (type == T_CTRL)
+    base_addr += PMC_CTRL_OFFSET;
+  else if (type == T_STATUS)
+    base_addr += PMC_STATUS_OFFSET;
+  else if (type == T_RAM)
+    base_addr += PMC_RAM_OFFSET;
+  else if (type == T_FIFO)
+    base_addr += PMC_FIFO_OFFSET;
+  
+  mvme_set_dmode(fVMEInterface, MVME_DMODE_D32);
+  
+  n = 0;
+  if (size == 1) {
+    // 8-bit read access
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D8);
+    n = mvme_read(fVMEInterface, static_cast<mvme_locaddr_t*>(data), base_addr + addr, size);
+  } else if (size == 2) {
+    // 16-bit read access
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D16);
+    n = mvme_read(fVMEInterface, static_cast<mvme_locaddr_t*>(data), base_addr + addr, size);
+  } else {
+    mvme_set_dmode(fVMEInterface, MVME_DMODE_D32);
+  
+    //mvme_set_blt(fVMEInterface, MVME_BLT_NONE); // Pseudo block transfer
+    mvme_set_blt(fVMEInterface, MVME_BLT_2EVME);  // Use 2eVME if implemented
+    //mvme_set_blt(fVMEInterface, MVME_BLT_MBLT64);  // Use MBLT64 if implemented
+    //mvme_set_blt(fVMEInterface, MVME_BLT_2ESST);  // Use 2eSST if implemented
+
+    n = mvme_read(fVMEInterface, static_cast<mvme_locaddr_t*>(data), base_addr + addr, size);
+    while (n != size) {
+      printf("Only read %d out of %d, retry with %d: ", n, size, size-n);
+      i = mvme_read(fVMEInterface, static_cast<mvme_locaddr_t*>(data)+n/4, base_addr + addr + n, size-n);
+      printf("read %d\n", i);
+      if (i == 0) {
+	printf("Error reading VME\n");
+	return n;
+      }
+      n += i;
+    }
+    
+    //for (i = 0; i < size; i += 4)
+    //mvme_read(fVMEInterface, (mvme_locaddr_t *)((char *)data+i), base_addr + addr+i, 4);
+  }
+  return n;
+
+#endif
+
+}
+
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRSBoard::AllocateSegmentCMEM(unsigned int SegSize, int *CMEM_SegIdentifier) {
+  
+  if ((ErrorCode = CMEM_SegmentAllocate(SegSize, "DMA_BUFFER", CMEM_SegIdentifier)) != CMEM_RCC_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRSBoard::AssignPhysicalSegAddressCMEM(int CMEM_SegIdentifier, unsigned long* PCIAddress) {
+  
+  if ((ErrorCode = CMEM_SegmentPhysicalAddress(CMEM_SegIdentifier, PCIAddress)) != CMEM_RCC_SUCCESS) {
+    
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+
+  }
+
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+int DRSBoard::AssignVirtualSegAddressCMEM(int CMEM_SegIdentifier, unsigned long* VirtualAddress) {
+
+  if ((ErrorCode = CMEM_SegmentVirtualAddress(CMEM_SegIdentifier, VirtualAddress)) != CMEM_RCC_SUCCESS) {
+
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+
+  }
+
+  return ErrorCode;
+}
+#endif
+
+/*------------------------------------------------------------------*/
+
+#ifdef CT_VME 
+ int DRSBoard::FreeSegmentCMEM(int CMEM_SegIdentifier) {
+  
+  // Free memory segment
+  if ((ErrorCode = CMEM_SegmentFree(CMEM_SegIdentifier)) != CMEM_RCC_SUCCESS) {
+
+    VME_ErrorString(ErrorCode,ErrorString);
+    
+    printf("Error: %s\n",ErrorString);
+  }
+  
+  return ErrorCode;
+ }
+#endif
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::SetLED(int state)
+{
+  // Set LED state
+  if (state)
+    fCtrlBits |= BIT_LED;
+  else
+    fCtrlBits &= ~BIT_LED;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::SetChannelConfig(int firstChannel, int lastChannel, int nConfigChannels)
+{
+  // Set number of channels
+  unsigned short d;
+  
+  if (lastChannel < 0 || lastChannel > 10) {
+    printf("Invalid number of channels: %d (must be between 0 and 10)\n", lastChannel);
+    return;
+  }
+  
+  if (fChipVersion == 2) {
+    // Register must contain last channel to read out starting from 9
+    d = 9 - lastChannel;
+    Write(T_CTRL, REG_CHANNEL_CONFIG, &d, 2);
+  } else if (fChipVersion == 3) {
+    // Upper four bits of register must contain last channel to read out starting from 9
+    d = (firstChannel << 4) | lastChannel;
+    Write(T_CTRL, REG_CHANNEL_SPAN, &d, 2);
+    
+    // Set bit pattern for write shift register
+    switch (nConfigChannels ) {
+    case  1: d = 0x001; break;
+    case  2: d = 0x041; break;
+    case  3: d = 0x111; break;
+    case  4: d = 0x249; break;
+    case  6: d = 0x555; break;
+    case 12: d = 0xFFF; break;
+    default:
+      printf("Invalid channel configuration\n");
+    }
+    Write(T_CTRL, REG_CHANNEL_CONFIG, &d, 2);
+  }
+  
+  fNumberOfReadoutChannels = lastChannel - firstChannel + 1;
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::SetNumberOfChannels(int nChannels)
+{
+  SetChannelConfig(0, nChannels-1, 12);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetDAC(unsigned char channel, double value)
+{
+  // Set DAC value
+  unsigned short d;
+  
+  // Normalize to 2.5V for 16 bit 
+  d = static_cast<unsigned short>(value / 2.5 * 0xFFFF + 0.5);
+  
+  Write(T_CTRL, REG_DAC_OFS + (channel * 2), &d, 2);
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::ReadDAC(unsigned char channel, double *value)
+{
+  // Readback DAC value from control register
+  unsigned char buffer[2];
+  
+  // Map 0->1, 1->0, 2->3, 3->2, etc. 
+  // ofs = channel + 1 - 2*(channel % 2);
+  
+  Read(T_CTRL, buffer, REG_DAC_OFS + (channel * 2), 2);
+  
+  // Normalize to 2.5V for 16 bit 
+  *value = 2.5 * (buffer[0] + (buffer[1] << 8)) / 0xFFFF;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetRegulationDAC(double *value)
+{
+  // Get DAC value from status register (-> freq. regulation)
+  unsigned char buffer[2];
+  
+  if (fBoardVersion == 1)
+    Read(T_STATUS, buffer, REG_RDAC3, 2);
+  else if (fBoardVersion == 2 || fBoardVersion == 3 || fBoardVersion == 4)
+    Read(T_STATUS, buffer, REG_RDAC1, 2);
+  
+  // Normalize to 2.5V for 16 bit 
+  *value = 2.5 * (buffer[0] + (buffer[1] << 8)) / 0xFFFF;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::StartDomino()
+{
+  // Start domino sampling
+  fCtrlBits |= BIT_START_TRIG;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  fCtrlBits &= ~BIT_START_TRIG;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::Reinit()
+{
+  // Stop domino sampling
+  // Reset readout state machine
+  // Reset FIFO counters
+  fCtrlBits |= BIT_REINIT_TRIG;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  fCtrlBits &= ~BIT_REINIT_TRIG;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::Init()
+{
+  // Reinitialize
+  fCtrlBits |= BIT_REINIT_TRIG;        // Reset readout state machine
+  fCtrlBits &= ~BIT_FREQ_AUTO_ADJ;     // Turn auto. freq regul. off
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  fCtrlBits &= ~BIT_REINIT_TRIG;
+  
+  // Set default DAC voltages
+  
+  if (fBoardVersion == 1) {
+    // Set max. domino speed
+    SetDAC(fDAC_DRA, 2.5);
+    SetDAC(fDAC_DSA, 2.5);
+    SetDAC(fDAC_DRB, 2.5);
+    SetDAC(fDAC_DSB, 2.5);
+    // Set readout offset
+    SetDAC(fDAC_COFSA, 0.9);
+    SetDAC(fDAC_COFSB, 0.9);
+    SetDAC(fDAC_TLEVEL, 1.7);
+  } else if (fBoardVersion == 2 || fBoardVersion == 3) {
+    // Set max. domino speed
+    SetDAC(fDAC_DSA, 2.5);
+    SetDAC(fDAC_DSB, 2.5);
+    
+    // Set readout offset
+    SetDAC(fDAC_COFS, 0.9);
+    SetDAC(fDAC_TLEVEL, 1.7);
+    SetDAC(fDAC_ADCOFS, 1.7);  // 1.7 for DC coupling, 1.25 for AC
+    SetDAC(fDAC_CLKOFS, 1);
+  } else if (fBoardVersion == 4) {
+    // Set max. domino speed
+    SetDAC(fDAC_DSA, 2.5);
+    SetDAC(fDAC_DSB, 2.5);
+    
+    // Set readout offset
+    SetDAC(fDAC_ROFS_1, 1.25);   // LVDS level
+    SetDAC(fDAC_ROFS_2, 0.85);   // Linear range  0.1V ... 1.1V
+    
+    SetDAC(fDAC_ADCOFS, 1.25);
+    SetDAC(fDAC_ACALIB, 0.5);
+    SetDAC(fDAC_INOFS, 0.6);
+    SetDAC(fDAC_BIAS, 0.70);     // A bit above the internal bias of 0.68V
+  }
+  
+  // Set default number of channels per chip 
+  SetChannelConfig(0, fNumberOfReadoutChannels-1, 12);
+  SetDominoMode(fDominoMode);
+  SetReadoutMode(fReadoutMode);
+  EnableTrigger(fTriggerEnable);
+  
+  // Disable calibration 
+  EnableAcal(0, 0);
+  SetCalibTiming(0, 0);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetDominoMode(unsigned char mode)
+{
+  // Set domino mode
+  // mode == 0: single sweep
+  // mode == 1: run continously
+  //
+  fDominoMode = mode;
+  if (mode)
+    fCtrlBits |= BIT_DMODE;
+  else
+    fCtrlBits &= ~BIT_DMODE;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetDominoActive(unsigned char mode)
+{
+  // Set domino activity
+  // mode == 0: stop during readout
+  // mode == 1: keep domino wave running
+  //
+  fDominoMode = mode;
+  if (mode)
+    fCtrlBits |= BIT_DACTIVE;
+  else
+    fCtrlBits &= ~BIT_DACTIVE;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetReadoutMode(unsigned char mode)
+{
+  // Set readout mode
+  // mode == 0: start from first bin
+  // mode == 1: start from domino stop
+  //
+  fReadoutMode = mode;
+  if (mode)
+    fCtrlBits |= BIT_READOUT_MODE;
+  else
+    fCtrlBits &= ~BIT_READOUT_MODE;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SoftTrigger(void)
+{
+  // Send a software trigger
+  fCtrlBits |= BIT_SOFT_TRIG;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  fCtrlBits &= ~BIT_SOFT_TRIG;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::EnableTrigger(int mode)
+{
+  // Enable external trigger
+  fTriggerEnable = mode;
+  if (mode)
+    fCtrlBits |= BIT_ENABLE_TRIGGER;
+  else
+    fCtrlBits &= ~BIT_ENABLE_TRIGGER;
+  
+  if (mode == 2)
+    fCtrlBits |= BIT_TRIGGER_DELAYED;
+  else
+    fCtrlBits &= ~BIT_TRIGGER_DELAYED;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetDelayedStart(int flag)
+{
+  // Enable external trigger
+  fDelayedStart = flag;
+  if (flag)
+    fCtrlBits |= BIT_DELAYED_START;
+  else
+    fCtrlBits &= ~BIT_DELAYED_START;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::IsBusy()
+{
+  // Get running flag
+  unsigned int status;
+  
+  Read(T_STATUS, &status, REG_STATUS, 4);
+  return (status & BIT_RUNNING) > 0;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::IsNewFreq(unsigned char chipIndex)
+{
+  unsigned int status;
+  
+  Read(T_STATUS, &status, REG_STATUS, 4);
+  if (chipIndex == 0)
+    return (status & BIT_NEW_FREQ1) > 0;
+  return (status & BIT_NEW_FREQ2) > 0;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::ReadFrequency(unsigned char chipIndex, double *f)
+{
+  // Read domino sampling frequency
+  unsigned char buffer[2];
+  
+  if (chipIndex == 0)
+    Read(T_STATUS, buffer, REG_FREQ1, 2);
+  else
+    Read(T_STATUS, buffer, REG_FREQ2, 2);
+  
+  *f = (static_cast<unsigned int>(buffer[1]) << 8) + buffer[0];
+  
+  // Convert counts to frequency 
+  if (*f != 0)
+    *f = 1024 * 200 * (32.768E6 * 4) / (*f) / 1E9;
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+double DRSBoard::VoltToFreq(double volt)
+{
+  if (fChipVersion == 3) {
+    if (volt <= 1.2001)
+      return (volt - 0.6) / 0.2;
+    else
+      return 0.73/0.28 + sqrt((0.73/0.28)*(0.73/0.28)-2.2/0.14+volt/0.14);
+  } else
+    return (volt - 0.5) / 0.2;
+}
+
+/*------------------------------------------------------------------*/
+
+double DRSBoard::FreqToVolt(double freq)
+{
+  if (fChipVersion == 3) {
+    if (freq <= 3)
+      return 0.6 + 0.2 * freq;
+    else
+      return 2.2 - 0.73 * freq + 0.14 * freq * freq;
+  } else
+    return 0.55 + 0.25 * freq;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetFrequency(double demand)
+{
+  // Set domino sampling frequency
+  double freq, voltage, delta_voltage;
+  unsigned short target;
+  int i, index, timeout;
+  int dominoModeSave = fDominoMode;
+  int triggerEnableSave = fTriggerEnable;
+  
+  SetDominoMode(1);
+  EnableTrigger(0);
+  EnableAcal(0, 0);
+  
+  fFrequency = demand;
+  
+  // Turn automatic adjustment off 
+  fCtrlBits &= ~BIT_FREQ_AUTO_ADJ;
+  
+  // Disable external trigger 
+  fCtrlBits &= ~BIT_ENABLE_TRIGGER;
+  
+  // Set start pulse length for future DRSBoard_domino_start() 
+  if (fChipVersion == 2) {
+    if (demand < 0.8)
+      fCtrlBits |= BIT_LONG_START_PULSE;
+    else
+      fCtrlBits &= ~BIT_LONG_START_PULSE;
+    
+    Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  }
+  
+  // Stop any running domino wave 
+  Reinit();
+  
+  // Estimate DAC setting 
+  voltage = FreqToVolt(demand);
+  
+  SetDAC(fDAC_DSA, voltage);
+  SetDAC(fDAC_DSB, voltage);
+  
+  // Wait until new DAC value has settled 
+  Sleep(10);
+  
+  // Restart domino wave 
+  StartDomino();
+  
+  target = static_cast<unsigned short>(1024 * 200 * (32.768E6 * 4) / demand / 1E9);
+  
+  // Iterate over both DRS chips 
+  for (index = 0; index < 2; index++) {
+    
+    // Starting voltage 
+    voltage = FreqToVolt(demand);
+    
+    for (i = 0; i < 100; i++) {
+      
+      // Wait until measurement finished 
+      for (timeout = 0; timeout < 1000; timeout++)
+	if (IsNewFreq(index))
+	  break;
+      
+      freq = 0;
+      if (timeout == 1000)
+	break;
+      
+      ReadFrequency(index, &freq);
+      
+      delta_voltage = FreqToVolt(demand) - FreqToVolt(freq);
+      
+      if (fDebug) {
+	if (fabs(freq - demand) < 0.001)
+	  printf("CHIP #%d, iter%3d: %1.5lf(%05d) %7.5lf\n", index, i, voltage,
+		 static_cast<int>(voltage / 2.5 * 65535 + 0.5), freq);
+	else
+	  printf("CHIP #%d, iter%3d: %1.5lf(%05d) %7.5lf %+5d\n", index, i, voltage,
+		 static_cast<int>(voltage / 2.5 * 65535 + 0.5), freq,
+		 static_cast<int>(delta_voltage / 2.5 * 65535 + 0.5));
+      }
+      
+      if (fabs(freq - demand) < 0.001)
+	break;
+      
+      voltage += delta_voltage;
+      if (voltage > 2.5)
+	voltage = 2.5;
+      if (voltage < 0)
+	voltage = 0;
+      
+      if (freq == 0)
+	break;
+      
+      if (index == 0)
+	SetDAC(fDAC_DSA, voltage);
+      else
+	SetDAC(fDAC_DSB, voltage);
+      
+      Sleep(10);
+    }
+    if (i == 100 || freq == 0 || timeout == 1000) {
+      printf("Board %d: could not set frequency of CHIP #%d to %1.3f GHz\n", GetCMCSerialNumber(), index, demand);
+      return 0;
+    }
+  }
+  
+  SetDominoMode(dominoModeSave);
+  EnableTrigger(triggerEnableSave);
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::RegulateFrequency(double demand)
+{
+  // Set frequency regulation
+  unsigned short target, target_hi, target_lo;
+  
+  if (demand < 0.42 || demand > 5.2)
+    return 0;
+  
+  fFrequency = demand;
+  
+  // First iterate DAC value from host 
+  if (!SetFrequency(demand))
+    return 0;
+  
+  // Convert frequency in GHz into counts for 200 cycles 
+  target = static_cast<unsigned short>(1024 * 200 * (32.768E6 * 4) / demand / 1E9);
+  target_hi = target + 6;
+  target_lo = target - 6;
+  Write(T_CTRL, REG_FREQ_SET_HI, &target_hi, 2);
+  Write(T_CTRL, REG_FREQ_SET_LO, &target_lo, 2);
+  
+  // Turn on regulation 
+  fCtrlBits |= BIT_FREQ_AUTO_ADJ;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  // Optional monitoring code ... 
+#if 0
+  do {
+    double freq;
+    unsigned short dac, cnt;
+    
+    ReadFrequency(0, &freq);
+    
+    if (fBoardVersion == 1)
+      Read(T_STATUS, &dac, REG_RDAC3, 2);
+    else if (fBoardVersion == 2 || fBoardVersion == 3)
+      Read(T_STATUS, &dac, REG_RDAC1, 2);
+    
+    Read(T_STATUS, &cnt, REG_FREQ1, 2);
+    
+    if (cnt < 65535)
+      printf("%5d %5d %5d %1.5lf\n", dac, target, cnt, freq);
+    
+    Sleep(500);
+  } while (1);
+#endif
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::RegisterTest()
+{
+  // Register test
+#define N_REG 8
+  
+  int i, n, n_err;
+  unsigned int buffer[N_REG], ret[N_REG];
+  
+  printf("**************************************************\n");
+
+  n_err = 0;
+  for (n = 0; n < 100; n++) {
+    for (i = 0; i < N_REG; i++)
+      buffer[i] = (rand() << 16) | rand();
+    Write(T_CTRL, 0, buffer, sizeof(buffer));
+    
+    memset(ret, 0, sizeof(ret));
+    i = Read(T_CTRL, ret, 0, sizeof(ret));
+    
+    while (i != sizeof(ret)) {
+      printf(" Read error!\n");
+      return;
+    }
+    
+    for (i = 0; i < N_REG; i++)
+      if (buffer[i] != ret[i]) {
+	n_err++;
+	printf(" Error Reg.%d: %08X - %08X\n", i, buffer[i], ret[i]);
+      }
+      else
+	printf(" OK   : %08X\n", buffer[i]);
+  }
+  
+  printf(" Register test: %d errors\n", n_err);
+  printf("**************************************************\n");
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::RAMTest(int flag)
+{
+#define N_DWORDS (40*1024/4)
+  
+  // RAM test
+  int i, j, n, l=0;
+  unsigned int buffer[N_DWORDS], ret[N_DWORDS];
+  time_t now;
+  
+  // Integrity test
+  printf("**************************************************\n");
+  printf(" Integrity:\n");
+  printf("  Buffer size (bytes): %d (%1.1lfk)\n", static_cast<int>(sizeof(ret)), sizeof(ret) / 1024.0);
+  if (flag & 1) {
+    for (i = 0; i < N_DWORDS; i++)
+      buffer[i] = (rand() | rand() << 16) & 0x00FFFFFF;      // Random 24-bit values
+    //buffer[i] = i;
+    
+    // Reset FIFO 
+    Reinit();
+    
+    Write(T_RAM, 0, buffer, sizeof(buffer));
+    memset(ret, 0, sizeof(ret));
+    
+    Read(T_FIFO, ret, 0, sizeof(ret));
+    Reinit();
+    
+    for (i = n = 0; i < N_DWORDS; i++) {
+      if (buffer[i] != ret[i])
+	n++;
+    }
+    
+    printf("  %d errors\n", n);
+  }
+  
+  // Speed test 
+  if (flag & 2) {
+
+    printf(" Speed:\n");
+
+    // Read continously to determine speed 
+    time(&now);
+    while (now == time(NULL));
+    time(&now);
+    i = n = 0;
+    do {
+      memset(ret, 0, sizeof(ret));
+      
+      for (j = 0; j < 10; j++) {
+	Read(T_RAM, ret, 0, sizeof(ret));
+	i += sizeof(ret);
+      }
+      
+      if (flag & 1) {
+	for (j = 0; j < N_DWORDS; j++)
+	  if (buffer[j] != ret[j])
+	    n++;
+      }
+      
+      if (now != time(NULL)) {
+	if (flag & 1)
+	  printf("  %d read/s, %1.2lf MB/s, %d errors\n", static_cast<int>(i / sizeof(ret)), i / 1024.0 / 1024.0,
+		 n);
+	else
+	  printf("  %d read/s, %1.2lf MB/s\n", static_cast<int>(i / sizeof(ret)), i / 1024.0 / 1024.0);
+	time(&now);
+	i = 0;   l++;
+      }
+    } while (l<5);
+  }
+  
+  printf("**************************************************\n");
+
+  return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::SetVoltageOffset(double offset1, double offset2)
+{
+  if (fChipVersion == 3) {
+    SetDAC(fDAC_ROFS_1, 0.95 - offset1);
+    SetDAC(fDAC_ROFS_2, 0.95 - offset2);
+  } else if (fChipVersion == 2)
+    SetDAC(fDAC_COFS, 0.9 - offset1);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetExternalClockFrequency(double frequencyMHz)
+{
+  // Set the frequency of the external clock
+  fExternalClockFrequency = frequencyMHz;
+  return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+double DRSBoard::GetExternalClockFrequency()
+{
+  // Return the frequency of the external clock
+  return fExternalClockFrequency;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::TransferWaves(int numberOfChannels)
+{
+  return TransferWaves(fWaveforms,numberOfChannels);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::TransferWaves(unsigned char *p, int numberOfChannels)
+{
+  return TransferWaves(p, 0, numberOfChannels-1);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::TransferWaves(int firstChannel, int lastChannel)
+{
+  return TransferWaves(fWaveforms, firstChannel, lastChannel);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::TransferWaves(unsigned char *p, int firstChannel, int lastChannel)
+{
+
+  // Transfer all waveforms at once
+  int i, n, offset, n_requested;
+  
+  if (lastChannel < 0 || lastChannel > kNumberOfChips*kNumberOfChannels) {
+    printf("Error: Invalid channel index %d\n", lastChannel);
+    return 0;
+  }
+  
+  if (firstChannel < 0 || firstChannel > kNumberOfChips*kNumberOfChannels) {
+    printf("Error: Invalid channel index %d\n", firstChannel);
+    return 0;
+  }
+  
+  firstChannel = 0;
+  lastChannel = kNumberOfChips*kNumberOfChannels -1;
+  
+  
+  n_requested = (lastChannel - firstChannel + 1) * sizeof(short int) * kNumberOfBins;
+  offset = firstChannel * sizeof(short int) * kNumberOfBins;
+  
+  n = Read(T_RAM, p, offset, n_requested);
+    
+  // Fixme (SCC 28082008): this check is now obsolete!!!! 
+  if (n != n_requested) {
+    printf("Error: only %d bytes read\n", n);
+    return  n;
+  }
+  
+  // Remember which waveforms have been transferred
+  for (i = firstChannel; i <= lastChannel; i++)
+    fWaveTransferred[i] = true;
+    
+  //fNumberOfTransferredWaves = numberOfChannels;
+  return n;
+}
+
+/*------------------------------------------------------------------*/ 
+
+int DRSBoard::TransferWaves(unsigned long *p, int numberOfChannels)
+{
+  return TransferWaves(p, 0, numberOfChannels-1);
+}
+
+/*------------------------------------------------------------------*/ 
+
+int DRSBoard::TransferWaves(unsigned long *p, int firstChannel, int lastChannel)
+{
+
+  // Transfer all waveforms at once
+  int i, n, offset, n_requested;
+  
+  if (lastChannel < 0 || lastChannel > kNumberOfChips*kNumberOfChannels) {
+    printf("Error: Invalid channel index %d\n", lastChannel);
+    return 0;
+  }
+  
+  if (firstChannel < 0 || firstChannel > kNumberOfChips*kNumberOfChannels) {
+    printf("Error: Invalid channel index %d\n", firstChannel);
+    return 0;
+  }
+  
+  firstChannel = 0;
+  lastChannel = kNumberOfChips*kNumberOfChannels - 1;
+  
+  
+  n_requested = (lastChannel - firstChannel + 1) * sizeof(short int) * kNumberOfBins;
+  offset = firstChannel * sizeof(short int) * kNumberOfBins;
+
+  n = Read(T_RAM, p, offset, n_requested);
+
+  if (n != n_requested) {
+    printf("Error: only %d bytes read\n", n);
+    return  n;
+  }
+      
+  // Remember which waveforms have been transferred
+  for (i = firstChannel; i <= lastChannel; i++)
+    fWaveTransferred[i] = true;
+    
+  //fNumberOfTransferredWaves = numberOfChannels;
+  return n;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::DecodeWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform)
+{
+  
+  return DecodeWave(fWaveforms , chipIndex, channel, waveform);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::DecodeWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, unsigned short *waveform)
+{
+
+  // Get waveform
+  int i, offset, ind;
+  
+  // Check valid parameters 
+  if (channel > 9 || chipIndex > 1)
+    return kWrongChannelOrChip;
+  
+  // Re-map channel 
+  if (fBoardVersion == 1) {
+    if (channel < 8)
+      channel = 7 - channel;
+    else
+      channel = 16 - channel;
+  } else {
+    channel = channel;
+  } 
+  
+  offset = (kNumberOfBins * 4) * channel;
+
+  if (DEBUG)
+    printf("offset = %d (0X%X)\n",offset,offset);
+
+  for (i = 0; i < kNumberOfBins; i++) {
+
+    ind = i * 4 + offset;
+
+    if (chipIndex == 0)
+      // Lower 12 bit
+      waveform[i] = ((waveforms[ind + 1] & 0x0f) << 8) | waveforms[ind];
+    else
+      // Upper 12 bit
+      waveform[i] = (waveforms[ind + 2] << 4) | (waveforms[ind + 1] >> 4);
+  }
+  
+  return kSuccess;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::DecodeWave(unsigned long *waveforms, unsigned int chipIndex, unsigned char channel, unsigned short *waveform) 
+{
+
+  // Get waveform
+  int i, offset, ind;
+  
+  // Check valid parameters 
+  if (channel > 9 || chipIndex > 1)
+    return kWrongChannelOrChip;
+  
+  // Re-map channel 
+  if (fBoardVersion == 1) {
+    if (channel < 8)
+      channel = 7 - channel;
+    else
+      channel = 16 - channel;
+  } else {
+    channel = channel;
+  } 
+  
+  offset = kNumberOfBins * channel;
+
+  for (i = 0; i < kNumberOfBins; i++) {
+  
+    ind = i + offset;
+
+    // Lower 12 bit
+    if (chipIndex == 0)
+      waveform[i] = (unsigned short)(waveforms[ind] & 0X00000FFF);
+    // Upper 12 bit
+    else 
+      waveform[i] = (unsigned short)(((unsigned long)(waveforms[ind] & 0X00FFF000)) >> 12);
+  }
+  
+  return kSuccess;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetWave(unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib,
+                      int triggerCell, bool adjustToClock, float threshold)
+{
+
+  int ret;
+  
+  ret = GetWave(fWaveforms,chipIndex,channel,waveform,responseCalib,triggerCell,adjustToClock,threshold);
+
+  if (kRotateWave) RotateWave((int)GetTriggerCell(chipIndex),waveform);  
+
+  return ret;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetWave(unsigned int chipIndex, unsigned char channel, float *waveform, bool responseCalib, 
+		      int triggerCell, bool adjustToClock, float threshold)
+{
+  int ret,i;
+  short waveS[kNumberOfBins];
+
+  ret = GetWave(fWaveforms,chipIndex,channel,waveS,responseCalib,triggerCell,adjustToClock,threshold);
+
+  if (responseCalib)
+    for (i = 0; i < kNumberOfBins; i++)
+      waveform[i] = static_cast<float>(waveS[i] * GetPrecision());
+  else {
+    for (i = 0; i < kNumberOfBins; i++) {
+      if (fBoardVersion==4)
+	waveform[i] = static_cast<float>(waveS[i] / 4.095); // 12-bit corresponding to 1V
+      else
+	waveform[i] = static_cast<float>(waveS[i]);
+    }
+  }
+
+  if (kRotateWave)
+    //RotateWave((int)GetTriggerCell(waveform,chipIndex),waveform);  
+    RotateWave((int)GetTriggerCell(chipIndex),waveform);  
+
+  return ret;
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::RotateWave(int triggerCell, float *waveform) 
+{
+  int i;
+  float buffer[kNumberOfBins];
+
+  memcpy((float*)buffer,(float*)waveform,sizeof(buffer));
+
+  for (i=0;i<kNumberOfBins;i++)
+    waveform[i] = buffer[(i + triggerCell)%kNumberOfBins];
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::RotateWave(int triggerCell, short *waveform) 
+{
+  int i;
+  short buffer[kNumberOfBins];
+
+  memcpy((short*)buffer,(short*)waveform,sizeof(buffer));
+
+  for (i=0;i<kNumberOfBins;i++)
+    waveform[i] = buffer[(i + triggerCell)%kNumberOfBins];
+}
+
+/*------------------------------------------------------------------*/
+
+
+int DRSBoard::GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, float *waveform, bool responseCalib,
+                      int triggerCell, bool adjustToClock, float threshold)
+{
+  int ret,i;
+  short waveS[kNumberOfBins];
+
+  ret = GetWave(waveforms,chipIndex,channel,waveS,responseCalib,triggerCell,adjustToClock,threshold);
+
+  if (responseCalib)
+    for (i = 0; i < kNumberOfBins; i++)
+      waveform[i] = static_cast<float>(waveS[i] * GetPrecision());
+  else {
+    for (i = 0; i < kNumberOfBins; i++) {
+      if (fBoardVersion == 4)
+	waveform[i] = static_cast<float>(waveS[i] / 4.095); // 12-bit corresponding to 1V
+      else
+	waveform[i] = static_cast<float>(waveS[i]);
+    }
+  }
+  return ret;
+}
+
+/*------------------------------------------------------------------*/
+
+
+int DRSBoard::GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib,
+                      int triggerCell, bool adjustToClock, float threshold)
+{
+  if (!fWaveTransferred[chipIndex*kNumberOfChannels+channel])
+    return kWaveNotAvailable;
+  unsigned short adcWaveform[kNumberOfBins];
+  int ret = DecodeWave(waveforms, chipIndex, channel, adcWaveform);
+  if (ret!=kSuccess)
+    return ret;
+  
+  return CalibrateWaveform(chipIndex, channel, adcWaveform, waveform, responseCalib,
+  			   triggerCell, adjustToClock, threshold);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetWave(unsigned long *waveforms, unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib, 
+                      int triggerCell, bool adjustToClock, float threshold)
+{
+  if (!fWaveTransferred[chipIndex*kNumberOfChannels+channel])
+    return kWaveNotAvailable;
+  unsigned short adcWaveform[kNumberOfBins];
+  int ret = DecodeWave(waveforms, chipIndex, channel, adcWaveform);
+  if (ret!=kSuccess)
+    return ret;
+  
+  return CalibrateWaveform(chipIndex, channel, adcWaveform, waveform, responseCalib,
+			   triggerCell, adjustToClock, threshold);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetADCWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform)
+{
+  return DecodeWave(chipIndex, channel, waveform);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetADCWave(unsigned char *waveforms,unsigned int chipIndex, unsigned char channel, unsigned short *waveform)
+{
+  return DecodeWave(waveforms, chipIndex, channel, waveform);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetADCWave(unsigned long *waveforms,unsigned int chipIndex, unsigned char channel, unsigned short *waveform)
+{
+  return DecodeWave(waveforms, chipIndex, channel, waveform);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::CalibrateWaveform(unsigned int chipIndex, unsigned char channel, unsigned short *adcWaveform,
+                                short *waveform, bool responseCalib,
+                                int triggerCell, bool // adjustToClock 
+                                , float threshold)
+{
+  int j;
+  
+  // Calibrate waveform
+  if (responseCalib) {
+    if (!fResponseCalibration->Calibrate(chipIndex, channel % 10, adcWaveform, waveform, triggerCell, threshold))
+      return kZeroSuppression; // Return immediately if below threshold
+  } else {
+    for (j = 0; j < kNumberOfBins; j++) {
+      waveform[j] = adcWaveform[j];
+    }
+  }
+  // Fix bad cells for single turn mode
+  if (fDominoMode == 0 && triggerCell==-1) {
+    waveform[0] = 2 * waveform[1] - waveform[2];
+    short m1 = (waveform[kNumberOfBins - 5] + waveform[kNumberOfBins - 6]) / 2;
+    short m2 = (waveform[kNumberOfBins - 6] + waveform[kNumberOfBins - 7]) / 2;
+    waveform[kNumberOfBins - 4] = m1 - 1 * (m2 - m1);
+    waveform[kNumberOfBins - 3] = m1 - 2 * (m2 - m1);
+    waveform[kNumberOfBins - 2] = m1 - 3 * (m2 - m1);
+    waveform[kNumberOfBins - 1] = m1 - 4 * (m2 - m1);
+  }
+  return kSuccess;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetStretchedTime(float *time, float *measurement, int numberOfMeasurements, float period)
+{
+  int j;
+  if (*time >= measurement[numberOfMeasurements - 1]) {
+    *time -= measurement[numberOfMeasurements - 1];
+    return 1;
+  }
+  if (*time < measurement[0]) {
+    *time = *time - measurement[0] - (numberOfMeasurements - 1) * period / 2;
+    return 1;
+  }
+  for (j = 0; j < numberOfMeasurements - 1; j++) {
+    if (*time > measurement[j] && *time <= measurement[j + 1]) {
+      *time =
+	(period / 2) / (measurement[j + 1] - measurement[j]) * (*time - measurement[j + 1]) -
+	(numberOfMeasurements - 2 - j) * period / 2;
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetTriggerCell(unsigned int chipIndex)
+{
+
+  return GetTriggerCell(fWaveforms,chipIndex);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetTriggerCell(unsigned char *waveforms,unsigned int chipIndex)
+{
+ 
+  int j, triggerCell;
+  bool calib = 0;
+  unsigned short baseLevel = 1000;
+  unsigned short triggerChannel[1024];
+  if (!fWaveTransferred[chipIndex*kNumberOfChannels+8])
+    return -1;
+  
+  GetADCWave(waveforms,chipIndex, 8, triggerChannel);
+  //calib = fResponseCalibration->SubtractADCOffset(chipIndex, 8, triggerChannel, triggerChannel,baseLevel); // Changed 24/10/2008, SCC
+
+
+  triggerCell = -1;
+  for (j = 0; j < kNumberOfBins; j++) {
+    if (calib) {
+      if (triggerChannel[j] <= baseLevel+200
+	  && triggerChannel[(j + 1) % kNumberOfBins] > baseLevel+200) {
+	triggerCell = j;
+	break;
+      }
+    } else {
+      if (triggerChannel[j] >= 2000
+	  && triggerChannel[(j + 1) % kNumberOfBins] < 2000) {
+	triggerCell = j;
+	break;
+      }
+    }
+  }
+  if (triggerCell == -1) {
+    return kInvalidTriggerSignal;
+  }
+  fTriggerCell = triggerCell;
+  return triggerCell;
+}
+
+/*------------------------------------------------------------------*/
+
+
+int DRSBoard::GetTriggerCell(unsigned long *waveforms,unsigned int chipIndex)
+{
+
+  int j, triggerCell;
+  bool calib = 0;
+  unsigned short baseLevel = 1000;
+  unsigned short triggerChannel[1024];
+  if (!fWaveTransferred[chipIndex*kNumberOfChannels+8])
+    return -1;
+  
+  GetADCWave(waveforms,chipIndex, 8, triggerChannel);
+  //calib = fResponseCalibration->SubtractADCOffset(chipIndex, 8, triggerChannel, triggerChannel, baseLevel); // Changed 07/10/2008, SCC
+    
+  triggerCell = -1;
+  for (j = 0; j < kNumberOfBins; j++) {
+    if (calib) {
+
+      if (triggerChannel[j] <= baseLevel+200
+	  && triggerChannel[(j + 1) % kNumberOfBins] > baseLevel+200) {
+	triggerCell = j;
+	break;
+      }
+    } else {
+
+      if (triggerChannel[j] >= 2000
+	  && triggerChannel[(j + 1) % kNumberOfBins] < 2000) {
+	triggerCell = j;
+	break;
+      }
+    }
+  }
+  
+  if (triggerCell == -1) {
+    return kInvalidTriggerSignal;
+  }
+  fTriggerCell = triggerCell;
+  return triggerCell;
+
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetTriggerCell(float *waveform)
+{
+  int j, triggerCell;
+    
+  triggerCell = -1;
+
+  for (j = 0; j < kNumberOfBins; j++) 
+    if ((waveform[(j + 1) % kNumberOfBins]-waveform[j % kNumberOfBins]) > 400.)
+      triggerCell = j;
+  
+    
+  if (triggerCell == -1) {
+    return kInvalidTriggerSignal;
+  }
+  fTriggerCell = triggerCell;
+  return triggerCell;
+
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::TestDAC(int channel)
+{
+  // Test DAC
+  int status;
+  
+  do {
+    status = SetDAC(channel, 0);
+    Sleep(1000);
+    status = SetDAC(channel, 0.5);
+    Sleep(1000);
+    status = SetDAC(channel, 1);
+    Sleep(1000);
+    status = SetDAC(channel, 1.5);
+    Sleep(1000);
+    status = SetDAC(channel, 2);
+    Sleep(1000);
+    status = SetDAC(channel, 2.5);
+    Sleep(1000);
+  } while (status);
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::MeasureSpeed()
+{
+  // Measure domino sampling speed
+  FILE *f;
+  double vdr, vds, freq;
+  
+  f = fopen("speed.txt", "wt");
+  fprintf(f, "\t");
+  printf("\t");
+  for (vdr = 0.5; vdr <= 2.501; vdr += 0.05) {
+    fprintf(f, "%1.2lf\t", vdr);
+    printf("%1.2lf\t", vdr);
+  }
+  fprintf(f, "\n");
+  printf("\n");
+  
+  for (vds = 0.5; vds <= 2.501; vds += 0.05) {
+    fprintf(f, "%1.2lf\t", vds);
+    printf("%1.2lf\t", vds);
+    
+    SetDAC(fDAC_DSA, vds);
+    StartDomino();
+    Sleep(1000);
+    ReadFrequency(0, &freq);
+    
+    fprintf(f, "%1.3lf\t", freq);
+    printf("%1.3lf\t", freq);
+    
+    fprintf(f, "\n");
+    printf("\n");
+    fflush(f);
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::InteractSpeed()
+{
+  int status, i;
+  double freq, vds;
+  
+  do {
+    printf("DS: ");
+    scanf("%lf", &vds);
+    if (vds == 0)
+      break;
+    
+    SetDAC(fDAC_DSA, vds);
+    SetDAC(fDAC_DSB, vds);
+    
+    StartDomino();
+    for (i = 0; i < 4; i++) {
+      Sleep(1000);
+      
+      status = ReadFrequency(0, &freq);
+      if (!status)
+	break;
+      printf("%1.6lf GHz\n", freq);
+    }
+    
+    // Turn CMC_LED off 
+    SetLED(0);
+    
+  } while (1);
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::MonitorFrequency()
+{
+  // Monitor domino sampling frequency
+  int status;
+  unsigned int data;
+  double freq, dac;
+  FILE *f;
+  time_t now;
+  char str[256];
+  
+  f = fopen("DRSBoard.log", "w");
+  
+  do {
+    Sleep(1000);
+    
+    status = ReadFrequency(0, &freq);
+    if (!status)
+      break;
+    
+    data = 0;
+    if (fBoardVersion == 1)
+      Read(T_STATUS, &data, REG_RDAC3, 2);
+    else if (fBoardVersion == 2 || fBoardVersion == 3)
+      Read(T_STATUS, &data, REG_RDAC1, 2);
+    
+    dac = data / 65536.0 * 2.5;
+    printf("%1.6lf GHz, %1.4lf V\n", freq, dac);
+    time(&now);
+    strcpy(str, ctime(&now) + 11);
+    str[8] = 0;
+    
+    fprintf(f, "%s %1.6lf GHz, %1.4lf V\n", str, freq, dac);
+    fflush(f);
+    
+  } while (!drs_kbhit());
+  
+  fclose(f);
+}
+
+/*------------------------------------------------------------------*/
+
+unsigned int DRSBoard::GetCtrlReg()
+{
+  unsigned int status;
+  
+  Read(T_CTRL, &status, REG_CTRL, 4);
+  return status;
+}
+
+/*------------------------------------------------------------------*/
+
+unsigned int DRSBoard::GetStatusReg()
+{
+  unsigned int status;
+  
+  Read(T_STATUS, &status, REG_STATUS, 4);
+  return status;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::EnableTcal(int flag)
+{
+  // Enable clock channel
+  if (flag)
+    fCtrlBits |= BIT_TCAL_EN;
+  else
+    fCtrlBits &= ~BIT_TCAL_EN;
+  
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::EnableAcal(int mode, double voltage)
+{
+  double t1, t2;
+  
+  if (mode == 0) {
+    // Turn calibration off 
+    SetCalibTiming(0, 0);
+    fCtrlBits &= ~BIT_ACAL_EN;
+    Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  } else if (mode == 1) {
+    // Static calibration 
+    SetCalibVoltage(voltage);
+    SetCalibTiming(0, 0);
+    fCtrlBits |= BIT_ACAL_EN;
+    Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  } else if (mode == 2) {
+    // First part calibration:
+    // stop domino wave after 1.2 revolutions,
+    // turn on calibration voltage after 0.1 revolutions 
+    
+    // Ensure circulating domino wave 
+    SetDominoMode(1);
+    
+    // Set calibration voltage but do not turn it on now 
+    SetCalibVoltage(voltage);
+    fCtrlBits &= ~BIT_ACAL_EN;
+    Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+    
+    // Calculate duration of DENABLE signal as 1.2 revolutions 
+    t1 = 1 / fFrequency * 1024 * 1.2; // ns
+    t1 = static_cast<int>((t1 - 30) / 30 + 1);  // 30 ns offset, 30 ns units, rounded up
+    t2 = 1 / fFrequency * 1024 * 0.1; // ns
+    t2 = static_cast<int>((t2 - 30) / 30 + 1);  // 30 ns offset, 30 ns units, rounded up
+    SetCalibTiming(static_cast<int>(t1), static_cast<int>(t2));
+    
+  } else if (mode == 3) {
+    // Second part calibration:
+    // stop domino wave after 1.05 revolutions 
+    
+    // Ensure circulating domino wave 
+    SetDominoMode(1);
+    
+    // Turn on and let settle calibration voltage 
+    SetCalibVoltage(voltage);
+    fCtrlBits |= BIT_ACAL_EN;
+    Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+    
+    // Calculate duration of DENABLE signal as 1.1 revolutions 
+    t1 = 1 / fFrequency * 1024 * 1.05;        // ns
+    t1 = static_cast<int>((t1 - 30) / 30 + 1);  // 30 ns offset, 30 ns units, rounded up
+    SetCalibTiming(static_cast<int>(t1), 0);
+  }
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetCalibTiming(int t_enable, int t_cal)
+{
+  unsigned short d;
+  
+  if (fChipVersion == 2) {
+    d = t_cal | (t_enable << 8);
+    Write(T_CTRL, REG_CALIB_TIMING, &d, 2);
+  }
+  
+  if (fChipVersion == 3) {
+    d = t_cal;
+    Write(T_CTRL, REG_CALIB_TIMING, &d, 2);
+  }
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::SetCalibVoltage(double value)
+{
+  // Set Calibration Voltage
+  SetDAC(fDAC_ACALIB, value);
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+double DRSBoard::GetTemperature()
+{
+  // Read Out Temperature Sensor
+  unsigned char buffer[2];
+  unsigned short d;
+  double temperature;
+  
+  Read(T_STATUS, buffer, REG_TEMPERATURE, 2);
+  
+  d = (static_cast<unsigned int>(buffer[1]) << 8) + buffer[0];
+  temperature = ((d >> 3) & 0x0FFF) * 0.0625;
+  
+  return temperature;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetTriggerBus()
+{
+  unsigned short status;
+  
+  Read(T_STATUS, &status, REG_TRIGGER_BUS, 2);
+  return static_cast<int>(status);
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::FlashEEPROM(unsigned short serial_cmc)
+{
+  unsigned short dac;
+  
+  // Read current DAC register
+  Read(T_CTRL, &dac, REG_DAC0, 2);
+  
+  // Put serial in DAC register
+  Write(T_CTRL, REG_DAC0, &serial_cmc, 2);
+  
+  // Execute flash
+  fCtrlBits |= BIT_FLASH_TRIG;
+  Write(T_CTRL, REG_CTRL, &fCtrlBits, 4);
+  fCtrlBits &= ~BIT_FLASH_TRIG;
+  
+  // Wait 6 ms per word
+  Sleep(20);
+  
+  // Write back old DAC registers
+  Write(T_CTRL, REG_DAC0, &dac, 2);
+  
+  // Read back serial number
+  ReadSerialNumber();
+  
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int DRSBoard::GetTime(unsigned int chipIndex, int frequencyMHz, float *time,int triggerCell)
+{
+  int i,irot;
+  DRSBoard::TimeData * init;
+  DRSBoard::TimeData::FrequencyData * freq;
+  
+  init = GetTimeCalibration(chipIndex);
+  
+  if (init == NULL) {
+    for (i = 0; i < kNumberOfBins; i++)
+      time[i] = static_cast<float>(i / fFrequency);
+    return 1;
+  }
+  freq = NULL;
+  for (i = 0; i < init->fNumberOfFrequencies; i++) {
+    if (init->fFrequency[i]->fFrequency == frequencyMHz) {
+      freq = init->fFrequency[i];
+      break;
+    }
+  }
+  if (freq == NULL) {
+    for (i = 0; i < kNumberOfBins; i++)
+      time[i] = static_cast<float>(i / fFrequency);
+    return 1;
+  }
+  for (i = 0; i < kNumberOfBins; i++) {
+    irot = i;
+    if (triggerCell>-1)
+      irot = (triggerCell + i) % kNumberOfBins;
+    if (triggerCell + i < kNumberOfBins)
+      time[i] = static_cast<float>((freq->fBin[irot] - freq->fBin[triggerCell]) / fFrequency);
+    else
+      time[i] = static_cast<float>((freq->fBin[irot] - freq->fBin[triggerCell] + freq->fBin[kNumberOfBins - 1] -
+				    2 * freq->fBin[0] + freq->fBin[1]) / fFrequency);
+  }
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+bool DRSBoard::InitTimeCalibration(unsigned int chipIndex)
+{
+  return GetTimeCalibration(chipIndex, true) != NULL;
+}
+
+/*------------------------------------------------------------------*/
+
+DRSBoard::TimeData *DRSBoard::GetTimeCalibration(unsigned int chipIndex, bool reinit)
+{
+  int i, l, index;
+  char *cstop;
+  char fileName[500];
+  char error[240];
+  PMXML_NODE node, rootNode, mainNode;
+  
+  index = fNumberOfTimeData;
+  for (i = 0; i < fNumberOfTimeData; i++) {
+    if (fTimeData[i]->fChip == static_cast < int >(chipIndex)) {
+      if (!reinit)
+	return fTimeData[i];
+      else {
+	index = i;
+	break;
+      }
+    }
+  }
+  
+  fTimeData[index] = new DRSBoard::TimeData();
+  DRSBoard::TimeData * init = fTimeData[index];
+  
+  init->fChip = chipIndex;
+  
+  for (i = 0; i < init->kMaxNumberOfFrequencies; i++) {
+    if (i <= 499 || (i >= 501 && i <= 999) || (i >= 1001 && i <= 1499) || (i >= 1501 && i <= 1999) || (i >= 2001 && i <= 2499) || i >= 2501)
+      continue;
+    sprintf(fileName, "%s/board%d/TimeCalib_board%d_chip%d_%dMHz.xml", fCalibDirectory, fCMCSerialNumber,
+	    fCMCSerialNumber, chipIndex, i);
+    rootNode = mxml_parse_file(fileName, error, sizeof(error));
+    if (rootNode == NULL)
+      continue;
+    
+    init->fFrequency[init->fNumberOfFrequencies] = new DRSBoard::TimeData::FrequencyData();
+    init->fFrequency[init->fNumberOfFrequencies]->fFrequency = i;
+    
+    mainNode = mxml_find_node(rootNode, "/DRSTimeCalibration");
+    
+    for (l = 0; l < kNumberOfBins; l++) {
+      node = mxml_subnode(mainNode, l + 2);
+      init->fFrequency[init->fNumberOfFrequencies]->fBin[l] = strtod(mxml_get_value(node), &cstop);
+    }
+    mxml_free_tree(rootNode);
+    init->fNumberOfFrequencies++;
+  }
+  if (init->fNumberOfFrequencies == 0) {
+    printf("Board %d --> Could not find time calibration file\n", GetCMCSerialNumber());
+  }
+  
+  if (index == fNumberOfTimeData)
+    fNumberOfTimeData++;
+  
+  return fTimeData[index];
+}
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::SetCalibrationDirectory(const char *calibrationDirectoryPath)
+{
+  strncpy(fCalibDirectory, calibrationDirectoryPath, strlen(calibrationDirectoryPath));
+  fCalibDirectory[strlen(calibrationDirectoryPath)] = 0;
+};
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::GetCalibrationDirectory(char *calibrationDirectoryPath)
+{
+  strncpy(calibrationDirectoryPath, fCalibDirectory, strlen(fCalibDirectory));
+  calibrationDirectoryPath[strlen(fCalibDirectory)] = 0;
+};
+
+/*------------------------------------------------------------------*/
+
+void DRSBoard::LinearRegression(double *x, double *y, int n, double *a, double *b)
+{
+  int i;
+  double sx, sxx, sy, sxy;
+  
+  sx = sxx = sy = sxy = 0;
+  for (i = 0; i < n; i++) {
+    sx  += x[i];
+    sxx += x[i] * x[i];
+    sy  += y[i];
+    sxy += x[i] * y[i];
+  }
+  
+  *a = (n * sxy - sx*sy) / (n * sxx - sx * sx);
+  *b = (sy - *a * sx) / n;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::SetCalibrationParameters(int numberOfPointsLowVolt, int numberOfPoints,
+                                                   int numberOfMode2Bins, int numberOfSamples,
+                                                   int numberOfGridPoints, int numberOfXConstPoints,
+                                                   int numberOfXConstGridPoints, double triggerFrequency,
+                                                   int showStatistics)
+{
+  DeleteFields();
+  InitFields(numberOfPointsLowVolt, numberOfPoints, numberOfMode2Bins, numberOfSamples, numberOfGridPoints,
+	     numberOfXConstPoints, numberOfXConstGridPoints, triggerFrequency, showStatistics);
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::ResetCalibration()
+{
+  int i;
+  for (i = 0; i < kNumberOfChips; i++)
+    fCalibrationData[i]->fRead = false;
+  fCurrentPoint = 0;
+  fCurrentLowVoltPoint = 0;
+  fCurrentSample = 0;
+  fCurrentFitChannel = 0;
+  fCurrentFitBin = 0;
+  fRecorded = false;
+  fFitted = false;
+  fOffset = false;
+};
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::WriteCalibration(unsigned int chipIndex)
+{
+  if (!fOffset)
+    return false;
+  if (fBoard->GetChipVersion() == 3)
+    return WriteCalibrationV4(chipIndex);
+  else
+    return WriteCalibrationV3(chipIndex);
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::WriteCalibrationV3(unsigned int chipIndex)
+{
+  if (!fOffset)
+    return false;
+  
+  int ii, j, k;
+  char str[1000];
+  char strt[1000];
+  short tempShort;
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  
+  // Open File
+  fBoard->GetCalibrationDirectory(strt);
+  sprintf(str, "%s/board%d", strt, fBoard->GetCMCSerialNumber());
+  if (MakeDir(str) == -1) {
+    printf("Error: Cannot create directory \"%s\"\n", str);
+    return false;
+  }
+  sprintf(str, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", strt, fBoard->GetCMCSerialNumber(),
+	  fBoard->GetCMCSerialNumber(), chipIndex, static_cast<int>(fBoard->GetFrequency() * 1000));
+  fCalibFile = fopen(str, "wb");
+  if (fCalibFile == NULL) {
+    printf("Error: Cannot write to file \"%s\"\n", str);
+    return false;
+  }
+  // Write File
+  fwrite(&data->fNumberOfGridPoints, 1, 1, fCalibFile);
+  tempShort = static_cast<short>(data->fStartTemperature) * 10;
+  fwrite(&tempShort, 2, 1, fCalibFile);
+  tempShort = static_cast<short>(data->fEndTemperature) * 10;
+  fwrite(&tempShort, 2, 1, fCalibFile);
+  fwrite(&data->fMin, 4, 1, fCalibFile);
+  fwrite(&data->fMax, 4, 1, fCalibFile);
+  fwrite(&data->fNumberOfLimitGroups, 1, 1, fCalibFile);
+  
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    chn = data->fChannel[ii];
+    for (j = 0; j < kNumberOfBins; j++) {
+      fwrite(&chn->fLimitGroup[j], 1, 1, fCalibFile);
+      fwrite(&chn->fLookUpOffset[j], 2, 1, fCalibFile);
+      fwrite(&chn->fNumberOfLookUpPoints[j], 1, 1, fCalibFile);
+      for (k = 0; k < chn->fNumberOfLookUpPoints[j]; k++) {
+	fwrite(&chn->fLookUp[j][k], 1, 1, fCalibFile);
+      }
+      for (k = 0; k < data->fNumberOfGridPoints; k++) {
+	fwrite(&chn->fData[j][k], 2, 1, fCalibFile);
+      }
+      fwrite(&chn->fOffsetADC[j], 2, 1, fCalibFile);
+      fwrite(&chn->fOffset[j], 2, 1, fCalibFile);
+    }
+  }
+  fclose(fCalibFile);
+  
+  printf("Calibration successfully written to\n\"%s\"\n", str);
+  return true;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::WriteCalibrationV4(unsigned int chipIndex)
+{
+  if (!fOffset)
+    return false;
+  
+  int ii, j;
+  char str[1000];
+  char strt[1000];
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  
+  // Open File
+  fBoard->GetCalibrationDirectory(strt);
+  sprintf(str, "%s/board%d", strt, fBoard->GetCMCSerialNumber());
+  if (MakeDir(str) == -1) {
+    printf("Error: Cannot create directory \"%s\"\n", str);
+    return false;
+  }
+  sprintf(str, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", strt, fBoard->GetCMCSerialNumber(),
+	  fBoard->GetCMCSerialNumber(), chipIndex, static_cast<int>(fBoard->GetFrequency() * 1000));
+  fCalibFile = fopen(str, "wb");
+  if (fCalibFile == NULL) {
+    printf("Error: Cannot write to file \"%s\"\n", str);
+    return false;
+  }
+  
+  // Write File
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    chn = data->fChannel[ii];
+    for (j = 0; j < kNumberOfBins; j++) {
+      fwrite(&chn->fOffset[j], 2, 1, fCalibFile);
+      fwrite(&chn->fGain[j], 2, 1, fCalibFile);
+    }
+  }
+  fclose(fCalibFile);
+  
+  printf("Calibration successfully written to\n\"%s\"\n", str);
+  return true;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::CalibrationTrigger(int mode, double voltage)
+{
+  fBoard->Reinit();
+  fBoard->EnableAcal(mode, voltage);
+  fBoard->StartDomino();
+  fBoard->SoftTrigger();
+  while (fBoard->IsBusy()) {
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::CalibrationStart(double voltage)
+{
+  fBoard->SetDominoMode(1);
+  fBoard->EnableAcal(0, voltage);
+  fBoard->StartDomino();
+  fBoard->IsBusy();
+  fBoard->IsBusy();
+  fBoard->IsBusy();
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::RecordCalibrationPoints(int chipNumber)
+{
+  if (!fInitialized)
+    return true;
+  if (fBoard->GetChipVersion() == 3)
+    return RecordCalibrationPointsV4(chipNumber);
+  else
+    return RecordCalibrationPointsV3(chipNumber);
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::RecordCalibrationPointsV3(int chipNumber)
+{
+
+  int j, k, ii;
+  int notdone, nsample;
+  double voltage;
+  float mean;
+  const double minVolt = 0.006;
+  const double xpos[50] =
+    { 0.010, 0.027, 0.052, 0.074, 0.096, 0.117, 0.136, 0.155, 0.173, 0.191, 0.208, 0.226, 0.243, 0.260,
+      0.277, 0.294, 0.310,
+      0.325, 0.342, 0.358, 0.374, 0.390, 0.406, 0.422, 0.439, 0.457, 0.477, 0.497, 0.520, 0.546, 0.577, 0.611,
+      0.656, 0.710,
+      0.772, 0.842, 0.916,
+      0.995, 1.075, 1.157, 1.240, 1.323, 1.407, 1.490, 1.575, 1.659, 1.744, 1.829, 1.914, 2.000
+    };
+  
+  // Initialisations
+  if (fCurrentLowVoltPoint == 0) {
+    fBoard->SetDAC(fBoard->fDAC_CLKOFS, 0);
+    // Record Temperature
+    fCalibrationData[chipNumber]->fStartTemperature = static_cast<float>(fBoard->GetTemperature());
+  }
+  // Record current Voltage
+  if (fCurrentLowVoltPoint < fNumberOfPointsLowVolt)
+    voltage = (xpos[0] - minVolt) * fCurrentLowVoltPoint / static_cast<double>(fNumberOfPointsLowVolt) + minVolt;
+  else
+    voltage = xpos[fCurrentPoint];
+  fBoard->SetCalibVoltage(voltage);
+  fResponseY[fCurrentPoint + fCurrentLowVoltPoint] = static_cast<float>(voltage) * 1000;
+  
+  // Loop Over Number Of Samples For Statistics
+  for (j = 0; j < fNumberOfSamples; j++) {
+    // Read Out Second Part of the Waveform
+    CalibrationTrigger(3, voltage);
+    fBoard->TransferWaves();
+    for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+      fBoard->GetADCWave(chipNumber, ii, fWaveFormMode3[ii][j]);
+    }
+    // Read Out First Part of the Waveform
+    CalibrationStart(voltage);
+    CalibrationTrigger(2, voltage);
+    fBoard->TransferWaves();
+    for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+      fBoard->GetADCWave(chipNumber, ii, fWaveFormMode2[ii][j]);
+    }
+    CalibrationStart(voltage);
+  }
+  // Average Sample Points
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    for (k = 0; k < kNumberOfBins; k++) {
+      fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] = 0;
+      for (j = 0; j < fNumberOfSamples; j++) {
+	fSampleUsed[j] = 1;
+	if (k < fNumberOfMode2Bins)
+	  fSamples[j] = fWaveFormMode2[ii][j][k];
+	else
+	  fSamples[j] = fWaveFormMode3[ii][j][k];
+	fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] += fSamples[j];
+      }
+      mean = fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] / fNumberOfSamples;
+      notdone = 1;
+      nsample = fNumberOfSamples;
+      while (notdone) {
+	notdone = 0;
+	for (j = 0; j < fNumberOfSamples; j++) {
+	  if (fSampleUsed[j] && abs(static_cast<int>(fSamples[j] - mean)) > 3) {
+	    notdone = 1;
+	    fSampleUsed[j] = 0;
+	    nsample--;
+	    fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] -= fSamples[j];
+	    mean = fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] / nsample;
+	  }
+	}
+      }
+      fResponseX[ii][k][fCurrentPoint + fCurrentLowVoltPoint] = mean;
+    }
+  }
+  if (fCurrentLowVoltPoint < fNumberOfPointsLowVolt)
+    fCurrentLowVoltPoint++;
+  else
+    fCurrentPoint++;
+  
+  if (fCurrentPoint == fNumberOfPoints) {
+    fCalibrationData[chipNumber]->fEndTemperature = static_cast<float>(fBoard->GetTemperature());
+    fRecorded = true;
+    fFitted = false;
+    fOffset = false;
+    fCalibrationData[chipNumber]->fRead = false;
+    fCalibrationData[chipNumber]->fHasOffsetCalibration = false;
+    fBoard->SetCalibVoltage(0.0);
+    fBoard->EnableAcal(1, 0.0);
+    fBoard->SetDAC(fBoard->fDAC_CLKOFS, 0.0);
+    return true;
+  }
+  
+  return false;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::RecordCalibrationPointsV4(int chipNumber)
+{
+  int i, j, k, n;
+  double voltage, s, s2, average, sigma;
+  
+  if (fCurrentPoint == 0) {
+    fBoard->SetDominoMode(1);
+    fBoard->EnableAcal(1,0);
+    fBoard->SoftTrigger();
+    while (fBoard->IsBusy());
+    fBoard->StartDomino();
+    fCalibrationData[chipNumber]->fStartTemperature = static_cast<float>(fBoard->GetTemperature());
+  }
+  voltage = 1.0 * fCurrentPoint / (static_cast<double>(fNumberOfPoints) - 1) + 0.1;
+  fBoard->SetCalibVoltage(voltage);
+  Sleep(10);
+  fBoard->SetCalibVoltage(voltage);
+  Sleep(10);
+  
+  // One dummy cycle for unknown reasons
+  fBoard->SoftTrigger();
+  while (fBoard->IsBusy());
+  fBoard->StartDomino();
+  //Sleep(50);
+  fBoard->TransferWaves();
+  
+  // Loop over number of samples for statistics
+  for (i = 0; i < fNumberOfSamples; i++) {
+#ifdef DEBUG_CALIB
+    printf("%d   \r", fNumberOfSamples-i);
+#endif
+    fBoard->SoftTrigger();
+    while (fBoard->IsBusy());
+    fBoard->StartDomino();
+    //Sleep(50);
+    fBoard->TransferWaves();
+    for (j = 0; j < kNumberOfCalibChannels; j++) {
+      fBoard->GetADCWave(chipNumber, j, fWaveFormMode3[j][i]);
+    }
+  }
+  
+  for (i = 0; i < kNumberOfCalibChannels; i++) {
+    for (k = 0; k < kNumberOfBins; k++) {
+      s = s2 = 0;
+      
+      for (j=0 ; j<fNumberOfSamples ; j++) {
+	s += fWaveFormMode3[i][j][k];
+	s2 += fWaveFormMode3[i][j][k] * fWaveFormMode3[i][j][k];
+      }
+      n = fNumberOfSamples;
+      average = s / n;
+      sigma = sqrt( (n*s2 - s*s) / (n*(n - 1)) );
+      
+      fResponseX[i][k][fCurrentPoint] = static_cast<float>(average);
+    }
+  }
+  
+#ifdef DEBUG_CALIB
+  for (j = 0; j < fNumberOfSamples; j++)
+    printf("%d ", fWaveFormMode3[1][j][10]);
+  
+  s = s2 = 0;
+  for (j = 0; j < fNumberOfSamples; j++) {
+    s += fWaveFormMode3[i][j][k];
+    s2 += fWaveFormMode3[i][j][k] * fWaveFormMode3[i][j][k];
+  }
+  n = fNumberOfSamples;
+  average = s / n;
+  sigma = sqrt( (n*s2 - s*s) / (n*(n - 1)) );
+  
+  printf("\n");
+  printf("%1.2lf V: %6.1lf (%1.4lf)\n", voltage,
+	 fResponseX[1][10][fCurrentPoint],
+	 fResponseX[1][10][fCurrentPoint]/4096.0);
+#endif
+  
+  fCurrentPoint++;
+  if (fCurrentPoint == fNumberOfPoints) {
+    fCalibrationData[chipNumber]->fEndTemperature = static_cast<float>(fBoard->GetTemperature());
+    fRecorded = true;
+    return true;
+  }
+  
+  return false;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::FitCalibrationPoints(int chipNumber)
+{
+  if (!fRecorded || fFitted)
+    return true;
+  if (fBoard->GetChipVersion() == 3)
+    return FitCalibrationPointsV4(chipNumber);
+  else
+    return FitCalibrationPointsV3(chipNumber);
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::FitCalibrationPointsV3(int chipNumber)
+{
+  int i, j, k;
+  float x1, x2, y1, y2;
+  float uu;
+  float yc, yr;
+  float xminExt, xrangeExt;
+  float xmin, xrange;
+  float average, averageError, averageExt, averageErrorExt;
+  unsigned short i0, i1;
+  
+  CalibrationData *data = fCalibrationData[chipNumber];
+  CalibrationData::CalibrationDataChannel * chn = data->fChannel[fCurrentFitChannel];
+  
+  data->DeletePreCalculatedBSpline();
+  
+  if (fCurrentFitBin == 0 && fCurrentFitChannel == 0) {
+    data->fNumberOfLimitGroups = 0;
+    data->fMin = 100000;
+    data->fMax = -100000;
+    for (i = 0; i < kNumberOfCalibChannels; i++) {
+      for (j = 0; j < kNumberOfBins; j++) {
+	if (data->fMin > fResponseX[i][j][fNumberOfPointsLowVolt + fNumberOfPoints - 1])
+	  data->fMin = fResponseX[i][j][fNumberOfPointsLowVolt + fNumberOfPoints - 1];
+	if (data->fMax < fResponseX[i][j][fNumberOfPointsLowVolt])
+	  data->fMax = fResponseX[i][j][fNumberOfPointsLowVolt];
+      }
+    }
+  }
+
+  // Low Volt
+  i0 = static_cast<unsigned short>(fResponseX[fCurrentFitChannel][fCurrentFitBin][0]);
+  i1 = static_cast<unsigned short>(fResponseX[fCurrentFitChannel][fCurrentFitBin][fNumberOfPointsLowVolt]) + 1;
+  chn->fLookUpOffset[fCurrentFitBin] = i0;
+  delete chn->fLookUp[fCurrentFitBin];
+  if (i0 - i1 + 1 < 2) {
+    chn->fNumberOfLookUpPoints[fCurrentFitBin] = 2;
+    chn->fLookUp[fCurrentFitBin] = new unsigned char[2];
+    chn->fLookUp[fCurrentFitBin][0] = 0;
+    chn->fLookUp[fCurrentFitBin][1] = 0;
+  } else {
+    chn->fNumberOfLookUpPoints[fCurrentFitBin] = i0 - i1 + 1;
+    chn->fLookUp[fCurrentFitBin] = new unsigned char[i0 - i1 + 1];
+    for (i = 0; i < i0 - i1 + 1; i++) {
+      for (j = 0; j < fNumberOfPointsLowVolt; j++) {
+	if (i0 - i >= fResponseX[fCurrentFitChannel][fCurrentFitBin][j + 1]) {
+	  x1 = fResponseX[fCurrentFitChannel][fCurrentFitBin][j];
+	  x2 = fResponseX[fCurrentFitChannel][fCurrentFitBin][j + 1];
+	  y1 = fResponseY[j];
+	  y2 = fResponseY[j + 1];
+	  chn->fLookUp[fCurrentFitBin][i] = static_cast<unsigned char>(((y2 - y1) * (i0 - i - x1) / (x2 - x1) + y1)/fPrecision);
+	  break;
+	}
+      }
+    }
+  }
+  
+
+  // Copy Points
+  for (i = 0; i < fNumberOfPoints; i++) {
+    fPntX[0][i] = fResponseX[fCurrentFitChannel][fCurrentFitBin][fNumberOfPointsLowVolt + i];
+    fPntY[0][i] = fResponseY[fNumberOfPointsLowVolt + i];
+  }
+  // Fit BSpline
+  for (i = 0; i < fNumberOfPoints; i++) {
+    fUValues[0][i] = static_cast<float>(1 - i / (fNumberOfPoints - 1.));
+  }
+  if (!Approx(fPntX[0], fUValues[0], fNumberOfPoints, fNumberOfGridPoints, fResX[fCurrentFitBin]))
+    return true;
+  if (!Approx(fPntY[0], fUValues[0], fNumberOfPoints, fNumberOfGridPoints, fRes[fCurrentFitBin]))
+    return true;
+  
+
+  // X constant fit
+  for (k = 0; k < fNumberOfXConstPoints - 2; k++) {
+    fPntX[1][k + 1] =
+      GetValue(fResX[fCurrentFitBin], static_cast<float>(1 - k / static_cast<float>(fNumberOfXConstPoints - 3)),
+	       fNumberOfGridPoints);
+    fPntY[1][k + 1] =
+      GetValue(fRes[fCurrentFitBin], static_cast<float>(1 - k / static_cast<float>(fNumberOfXConstPoints - 3)),
+	       fNumberOfGridPoints);
+  }
+  xmin = fPntX[1][fNumberOfXConstPoints - 2];
+  xrange = fPntX[1][1] - xmin;
+  
+  for (i = 0; i < fNumberOfXConstPoints - 2; i++) {
+    fUValues[1][i + 1] = (fPntX[1][i + 1] - xmin) / xrange;
+  }
+  
+  if (!Approx
+      (&fPntY[1][1], &fUValues[1][1], fNumberOfXConstPoints - 2, fNumberOfXConstGridPoints,
+       chn->fTempData))
+    return true;
+
+  
+  // Error statistics
+  if (fShowStatistics) {
+    for (i = 0; i < fNumberOfPoints; i++) {
+      uu = (fPntX[0][i] - xmin) / xrange;
+      yc = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints);
+      yr = fPntY[0][i];
+      fStatisticsApprox[i][fCurrentFitBin + fCurrentFitChannel * kNumberOfBins] = yc - yr;
+    }
+  }
+  // Add min and max point
+  chn->fLimitGroup[fCurrentFitBin] = 0;
+  while (xmin - kBSplineXMinOffset > data->fMin + kBSplineXMinOffset * chn->fLimitGroup[fCurrentFitBin]) {
+    chn->fLimitGroup[fCurrentFitBin]++;
+  }
+  if (data->fNumberOfLimitGroups <= chn->fLimitGroup[fCurrentFitBin])
+    data->fNumberOfLimitGroups = chn->fLimitGroup[fCurrentFitBin] + 1;
+  xminExt = data->fMin + kBSplineXMinOffset * chn->fLimitGroup[fCurrentFitBin];
+  xrangeExt = data->fMax - xminExt;
+  
+  fPntX[1][0] = data->fMax;
+  uu = (fPntX[1][0] - xmin) / xrange;
+  fPntY[1][0] = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints);
+  
+  fPntX[1][fNumberOfXConstPoints - 1] = xminExt;
+  uu = (fPntX[1][fNumberOfXConstPoints - 1] - xmin) / xrange;
+  fPntY[1][fNumberOfXConstPoints - 1] = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints);
+  
+  for (i = 0; i < fNumberOfXConstPoints; i++) {
+    fUValues[1][i] = (fPntX[1][i] - xminExt) / xrangeExt;
+  }
+  
+  if (!Approx
+      (fPntY[1], fUValues[1], fNumberOfXConstPoints, fNumberOfXConstGridPoints, chn->fTempData))
+    return true;
+  
+  // Error statistics
+  if (fShowStatistics) {
+    for (i = 0; i < fNumberOfPoints; i++) {
+      uu = (fPntX[0][i] - xminExt) / xrangeExt;
+      yc = GetValue(chn->fTempData, uu, fNumberOfXConstGridPoints);
+      yr = fPntY[0][i];
+      fStatisticsApproxExt[i][fCurrentFitBin + fCurrentFitChannel * kNumberOfBins] = yc - yr;
+    }
+  }
+  for (i = 0; i < fNumberOfXConstGridPoints; i++) {
+    chn->fData[fCurrentFitBin][i] = static_cast<short>(chn->fTempData[i] / fPrecision);
+  }
+  
+
+  // Write end of file
+  fCurrentFitBin++;
+  if (fCurrentFitBin == kNumberOfBins) {
+    fCurrentFitChannel++;
+    fCurrentFitBin = 0;
+  }
+  if (fCurrentFitChannel == kNumberOfCalibChannels) {
+    if (fShowStatistics) {
+      for (i = 0; i < fNumberOfPoints; i++) {
+	average = 0;
+	averageError = 0;
+	averageExt = 0;
+	averageErrorExt = 0;
+	for (j = 0; j < kNumberOfCalibChannels * kNumberOfBins; j++) {
+	  average += fStatisticsApprox[i][j];
+	  averageError += fStatisticsApprox[i][j] * fStatisticsApprox[i][j];
+	  averageExt += fStatisticsApproxExt[i][j];
+	  averageErrorExt += fStatisticsApproxExt[i][j] * fStatisticsApproxExt[i][j];
+	}
+	average /= kNumberOfCalibChannels * kNumberOfBins;
+	averageError =
+	  sqrt((averageError -
+		average * average / kNumberOfCalibChannels * kNumberOfBins) / (kNumberOfCalibChannels *
+									       kNumberOfBins - 1));
+	averageExt /= kNumberOfCalibChannels * kNumberOfBins;
+	averageErrorExt =
+	  sqrt((averageErrorExt -
+		averageExt * averageExt / kNumberOfCalibChannels * kNumberOfBins) /
+	       (kNumberOfCalibChannels * kNumberOfBins - 1));
+	printf("Error at %3.1f V : % 2.3f +- % 2.3f ; % 2.3f +- % 2.3f\n", fPntY[0][i], average,
+	       averageError, averageExt, averageErrorExt);
+      }
+    }
+    fFitted = true;
+    fOffset = false;
+    fCalibrationData[chipNumber]->fRead = true;
+    fCalibrationData[chipNumber]->fHasOffsetCalibration = false;
+    data->PreCalculateBSpline();
+    return true;
+  }
+  return false;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::FitCalibrationPointsV4(int chipNumber)
+{
+  if (!fRecorded || fFitted)
+    return true;
+  int i;
+  double par[2];
+  
+  CalibrationData *data = fCalibrationData[chipNumber];
+  CalibrationData::CalibrationDataChannel * chn = data->fChannel[fCurrentFitChannel];
+  
+  if (fCurrentFitBin == 0 && fCurrentFitChannel == 0) {
+    for (i = 0; i < fNumberOfPoints; i++)
+      fWWFit[i] = 1;
+  }
+  
+  for (i = 0; i < fNumberOfPoints; i++) {
+    fXXFit[i] = 1.0 * i / (static_cast<double>(fNumberOfPoints) - 1) + 0.1;
+    fYYFit[i] = fResponseX[fCurrentFitChannel][fCurrentFitBin][i];
+    if (fCurrentFitBin == 10 && fCurrentFitChannel == 1) {
+      fXXSave[i] = fXXFit[i];
+      fYYSave[i] = fYYFit[i];
+    }
+  }
+  
+  DRSBoard::LinearRegression(fXXFit, fYYFit, fNumberOfPoints, &par[1], &par[0]);
+  chn->fOffset[fCurrentFitBin] = static_cast<short>(par[0] + 0.5);
+  chn->fGain[fCurrentFitBin] = static_cast<short>(par[1] + 0.5);
+  
+  if (fCurrentFitChannel == 1 && fCurrentFitBin == 10) {
+#ifdef DEBUG_CALIB
+    printf("gain:%d, offset:%d\n", chn->fGain[10], chn->fOffset[10]);
+#endif
+    for (i = 0; i < fNumberOfPoints; i++) {
+      fXXSave[i] = fXXFit[i];
+      fYYSave[i] = (fYYFit[i] - chn->fOffset[10]) / chn->fGain[10] - fXXFit[i];
+    }
+  }
+  
+  fCurrentFitBin++;
+  if (fCurrentFitBin == kNumberOfBins) {
+    fCurrentFitChannel++;
+    fCurrentFitBin = 0;
+  }
+  if (fCurrentFitChannel == kNumberOfCalibChannels) {
+    fFitted = true;
+    fOffset = true;
+    fCalibrationData[chipNumber]->fRead = true;
+    fCalibrationData[chipNumber]->fHasOffsetCalibration = false;
+    return true;
+  }
+  
+  return false;
+}
+
+unsigned int millitime()
+{
+  struct timeval tv;
+  
+  gettimeofday(&tv, NULL);
+  
+  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::OffsetCalibration(int chipNumber)
+{
+  if (!fFitted || fOffset)
+    return true;
+  int k, ii, j;
+  int t1, t2;
+  float mean,error;
+  CalibrationData *data = fCalibrationData[chipNumber];
+  CalibrationData::CalibrationDataChannel * chn;
+  
+  if (fCurrentSample == 0) {
+    data->fHasOffsetCalibration = false;
+    fBoard->SetCalibVoltage(0.0);
+    fBoard->EnableAcal(1, 0.0);
+  }
+  // Loop Over Number Of Samples For Statistics
+  t1 = millitime();
+  fBoard->SoftTrigger();
+  while (fBoard->IsBusy()) {
+  }
+  fBoard->TransferWaves();
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    fBoard->GetADCWave(chipNumber, ii, fWaveFormOffsetADC[ii][fCurrentSample]);
+    fBoard->CalibrateWaveform(chipNumber, ii, fWaveFormOffsetADC[ii][fCurrentSample], fWaveFormOffset[ii][fCurrentSample],
+			      true, false, false, 0);
+  }
+  fBoard->StartDomino();
+  fBoard->IsBusy();
+  fBoard->IsBusy();
+  fBoard->IsBusy();
+  t2 = millitime();
+  while (t2 - t1 < (1000 / fTriggerFrequency)) {
+    t2 = millitime();
+  }
+  fCurrentSample++;
+  
+  if (fCurrentSample == fNumberOfSamples) {
+    // Average Sample Points
+    float *sample = new float[fNumberOfSamples];
+    for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+      chn = data->fChannel[ii];
+      for (k = 0; k < kNumberOfBins; k++) {
+	for (j = 0; j < fNumberOfSamples; j++)
+	  sample[j] = static_cast<float>(fWaveFormOffset[ii][j][k]);
+	Average(1, sample, fNumberOfSamples, mean, error, 2);
+	chn->fOffset[k] = static_cast<short>(mean);
+	for (j = 0; j < fNumberOfSamples; j++)
+	  sample[j] = fWaveFormOffsetADC[ii][j][k];
+	Average(1, sample, fNumberOfSamples, mean, error, 2);
+	chn->fOffsetADC[k] = static_cast<unsigned short>(mean);
+      }
+    }
+    fOffset = true;
+    fCalibrationData[chipNumber]->fHasOffsetCalibration = true;
+    delete sample;
+    return true;
+  }
+  
+  return false;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::InitFields(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins,
+                                     int numberOfSamples, int numberOfGridPoints, int numberOfXConstPoints,
+                                     int numberOfXConstGridPoints, double triggerFrequency,
+                                     int showStatistics)
+{
+  int ii, j, i;
+  fInitialized = true;
+  fNumberOfPointsLowVolt = numberOfPointsLowVolt;
+  fNumberOfPoints = numberOfPoints;
+  fNumberOfMode2Bins = numberOfMode2Bins;
+  fNumberOfSamples = numberOfSamples;
+  fNumberOfGridPoints = numberOfGridPoints;
+  fNumberOfXConstPoints = numberOfXConstPoints;
+  fNumberOfXConstGridPoints = numberOfXConstGridPoints;
+  fTriggerFrequency = triggerFrequency;
+  fShowStatistics = showStatistics;
+  fCurrentPoint = 0;
+  fCurrentSample = 0;
+  fCurrentFitChannel = 0;
+  fCurrentFitBin = 0;
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    for (j = 0; j < kNumberOfBins; j++) {
+      fResponseX[ii][j] = new float[fNumberOfPoints + fNumberOfPointsLowVolt];
+    }
+  }
+  fResponseY = new float[fNumberOfPoints + fNumberOfPointsLowVolt];
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    fWaveFormMode3[ii] = new unsigned short *[fNumberOfSamples];
+    fWaveFormMode2[ii] = new unsigned short *[fNumberOfSamples];
+    fWaveFormOffset[ii] = new short *[fNumberOfSamples];
+    fWaveFormOffsetADC[ii] = new unsigned short *[fNumberOfSamples];
+    for (i = 0; i < fNumberOfSamples; i++) {
+      fWaveFormMode3[ii][i] = new unsigned short[kNumberOfBins];
+      fWaveFormMode2[ii][i] = new unsigned short[kNumberOfBins];
+      fWaveFormOffset[ii][i] = new short[kNumberOfBins];
+      fWaveFormOffsetADC[ii][i] = new unsigned short[kNumberOfBins];
+    }
+  }
+  fSamples = new unsigned short[fNumberOfSamples];
+  fSampleUsed = new int[fNumberOfSamples];
+  
+  for (j = 0; j < kNumberOfBins; j++) {
+    fRes[j] = new float[fNumberOfGridPoints];
+    fResX[j] = new float[fNumberOfGridPoints];
+  }
+  for (i = 0; i < 2; i++) {
+    fPntX[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i];
+    fPntY[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i];
+    fUValues[i] = new float[fNumberOfPoints * (1 - i) + fNumberOfXConstPoints * i];
+  }
+  fXXFit = new double[fNumberOfPoints];
+  fYYFit = new double[fNumberOfPoints];
+  fWWFit = new double[fNumberOfPoints];
+  fYYFitRes = new double[fNumberOfPoints];
+  fYYSave = new double[fNumberOfPoints];
+  fXXSave = new double[fNumberOfPoints];
+  
+  fStatisticsApprox = new float *[fNumberOfPoints];
+  fStatisticsApproxExt = new float *[fNumberOfPoints];
+  for (i = 0; i < fNumberOfPoints; i++) {
+    fStatisticsApprox[i] = new float[kNumberOfCalibChannels * kNumberOfBins];
+    fStatisticsApproxExt[i] = new float[kNumberOfCalibChannels * kNumberOfBins];
+  }
+  for (i = 0; i < kNumberOfChips; i++) {
+    fCalibrationData[i] = new CalibrationData(numberOfXConstGridPoints);
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::DeleteFields()
+{
+  if (!fInitialized)
+    return;
+  fInitialized = false;
+  int ii, j, i;
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    for (j = 0; j < kNumberOfBins; j++) {
+      delete fResponseX[ii][j];
+    }
+  }
+  delete fResponseY;
+  for (ii = 0; ii < kNumberOfCalibChannels; ii++) {
+    for (i = 0; i < fNumberOfSamples; i++) {
+      if (fWaveFormMode3[ii] != NULL)
+	delete fWaveFormMode3[ii][i];
+      if (fWaveFormMode2[ii] != NULL)
+	delete fWaveFormMode2[ii][i];
+      if (fWaveFormOffset[ii] != NULL)
+	delete fWaveFormOffset[ii][i];
+      if (fWaveFormOffsetADC[ii] != NULL)
+	delete fWaveFormOffsetADC[ii][i];
+    }
+    delete fWaveFormMode3[ii];
+    delete fWaveFormMode2[ii];
+    delete fWaveFormOffset[ii];
+    delete fWaveFormOffsetADC[ii];
+  }
+  delete fSamples;
+  delete fSampleUsed;
+  
+  for (j = 0; j < kNumberOfBins; j++) {
+    delete fRes[j];
+    delete fResX[j];
+  }
+  for (i = 0; i < 2; i++) {
+    delete fPntX[i];
+    delete fPntY[i];
+    delete fUValues[i];
+  }
+  delete fXXFit;
+  delete fYYFit;
+  delete fWWFit;
+  delete fYYFitRes;
+  delete fYYSave;
+  delete fXXSave;
+  
+  for (i = 0; i < fNumberOfPoints; i++) {
+    delete fStatisticsApprox[i];
+    delete fStatisticsApproxExt[i];
+  }
+  delete fStatisticsApprox;
+  delete fStatisticsApproxExt;
+  for (i = 0; i < kNumberOfChips; i++)
+    delete fCalibrationData[i];
+}
+
+/*------------------------------------------------------------------*/
+
+double ResponseCalibration::GetTemperature(unsigned int chipIndex)
+{
+  if (fCalibrationData[chipIndex]==NULL)
+    return 0;
+  if (!fCalibrationData[chipIndex]->fRead)
+    return 0;
+  return (fCalibrationData[chipIndex]->fStartTemperature + fCalibrationData[chipIndex]->fEndTemperature) / 2;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::Calibrate(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform,
+                                    short *uWaveform, int triggerCell, float threshold)
+{
+  int i;
+  int hasOffset;
+  bool aboveThreshold;
+  float wave, v;
+  int j,irot;
+  
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  
+  if (channel > kNumberOfCalibChannels || data == NULL) {
+    for (i = 0; i < kNumberOfBins; i++) {
+      uWaveform[i] = adcWaveform[i];
+    }
+    return true;
+  }
+  if (!data->fRead) {
+    for (i = 0; i < kNumberOfBins; i++) {
+      uWaveform[i] = adcWaveform[i];
+    }
+    return true;
+  }
+  
+  chn = data->fChannel[channel];
+  
+  hasOffset = data->fHasOffsetCalibration;
+  aboveThreshold = (threshold == 0);   // If threshold equal zero, always return true
+  
+  // Calibrate
+  for (i = 0; i < kNumberOfBins; i++) {
+    if (fBoard->GetChipVersion() != 3) {
+      irot = i;
+      if (triggerCell > -1)
+	irot = (triggerCell + i) % kNumberOfBins;
+      if (adcWaveform[irot] > chn->fLookUpOffset[irot]) {
+	uWaveform[i] =
+	  ((chn->fLookUp[irot][0] - chn->fLookUp[irot][1]) * (adcWaveform[irot] - chn->fLookUpOffset[irot]) +
+	   chn->fLookUp[irot][0]);
+      } else if (adcWaveform[irot] <= chn->fLookUpOffset[irot]
+		 && adcWaveform[irot] > chn->fLookUpOffset[irot] - chn->fNumberOfLookUpPoints[irot]) {
+	uWaveform[i] = chn->fLookUp[irot][chn->fLookUpOffset[irot] - adcWaveform[irot]];
+      } else {
+	wave = 0;
+	for (j = 0; j < kBSplineOrder; j++) {
+	  wave += chn->fData[irot][data->fBSplineOffsetLookUp[adcWaveform[irot]][chn->fLimitGroup[irot]] + j]
+	    * data->fBSplineLookUp[adcWaveform[irot]][chn->fLimitGroup[irot]][j];
+	}
+	uWaveform[i] = static_cast<short>(wave);
+      }
+      // Offset Calibration
+      if (hasOffset)
+	uWaveform[i] -= chn->fOffset[irot];
+    } else {
+      if (chn->fGain[i] > 3800) {
+	//if (channel == 1 && i == 10)
+	//   printf("gain:%d offset:%d value:%d\n", chn->fGain[i], chn->fOffset[i], adcWaveform[i]);
+	v = static_cast<float>(adcWaveform[i] - chn->fOffset[i]) / chn->fGain[i];
+	uWaveform[i] = static_cast<short>(v * 1000 / GetPrecision() + 0.5);
+      } else
+	uWaveform[i] = 0;
+    }
+    
+    // Check for Threshold
+    if (!aboveThreshold) {
+      if (uWaveform[i] >= threshold)
+	aboveThreshold = true;
+    }
+  }
+  return aboveThreshold;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::SubtractADCOffset(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform,
+                                            unsigned short *adcCalibratedWaveform, unsigned short newBaseLevel)
+{
+  int i;
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  
+  if (channel >= kNumberOfCalibChannels || data == NULL)
+    return false;
+  if (!data->fRead || !data->fHasOffsetCalibration)
+    return false;
+  
+  chn = data->fChannel[channel];
+  for (i = 0; i < kNumberOfBins; i++)
+    adcCalibratedWaveform[i] = adcWaveform[i]-chn->fOffsetADC[i]+newBaseLevel;
+  return true;
+}
+
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::ReadCalibration(unsigned int chipIndex)
+{
+  if (fBoard->GetChipVersion() == 3)
+    return ReadCalibrationV4(chipIndex);
+  else
+    return ReadCalibrationV3(chipIndex);
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::ReadCalibrationV3(unsigned int chipIndex)
+{
+  int k, l, m, num;
+  unsigned char ng;
+  short tempShort;
+  char fileName[2000];
+  FILE *fileHandle;
+  char calibDir[1000];
+  
+  // Read Response Calibration
+  delete fCalibrationData[chipIndex];
+  fCalibrationData[chipIndex] = NULL;
+  
+  fBoard->GetCalibrationDirectory(calibDir);
+  sprintf(fileName, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", calibDir,
+	  fBoard->GetCMCSerialNumber(), fBoard->GetCMCSerialNumber(), chipIndex,
+	  static_cast<int>(fBoard->GetFrequency() * 1000));
+  
+  fileHandle = fopen(fileName, "rb");
+  if (fileHandle == NULL) {
+    printf("Board %d --> Could not find response calibration file:\n", fBoard->GetCMCSerialNumber());
+    printf("%s\n", fileName);
+    return false;
+  }
+  // Number Of Grid Points
+  num = fread(&ng, 1, 1, fileHandle);
+  if (num != 1) {
+    printf("Error while reading response calibration file '%s'\n", fileName);
+    printf("   at 'NumberOfGridPoints'.\n");
+    return false;
+  }
+  
+  fCalibrationData[chipIndex] = new CalibrationData(ng);
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  data->fRead = true;
+  data->fHasOffsetCalibration = 1;
+  data->DeletePreCalculatedBSpline();
+  fCalibrationValid[chipIndex] = true;
+  
+  // Start Temperature
+  num = fread(&tempShort, 2, 1, fileHandle);
+  if (num != 1) {
+    printf("Error while reading response calibration file '%s'\n", fileName);
+    printf("   at 'StartTemperature'.\n");
+    return false;
+  }
+  data->fStartTemperature = static_cast<float>(tempShort) / 10;
+  // End Temperature
+  num = fread(&tempShort, 2, 1, fileHandle);
+  if (num != 1) {
+    printf("Error while reading response calibration file '%s'\n", fileName);
+    printf("   at 'EndTemperature'.\n");
+    return false;
+  }
+  data->fEndTemperature = static_cast<float>(tempShort) / 10;
+  if (fBoard->GetChipVersion() != 3) {
+    // Min
+    num = fread(&data->fMin, 4, 1, fileHandle);
+    if (num != 1) {
+      printf("Error while reading response calibration file '%s'\n", fileName);
+      printf("   at 'Min'.\n");
+      return false;
+    }
+    // Max
+    num = fread(&data->fMax, 4, 1, fileHandle);
+    if (num != 1) {
+      printf("Error while reading response calibration file '%s'\n", fileName);
+      printf("   at 'Max'.\n");
+      return false;
+    }
+    // Number Of Limit Groups
+    num = fread(&data->fNumberOfLimitGroups, 1, 1, fileHandle);
+    if (num != 1) {
+      printf("Error while reading response calibration file '%s'\n", fileName);
+      printf("   at 'NumberOfLimitGroups'.\n");
+      return false;
+    }
+  }
+  // Read channel
+  for (k = 0; k < kNumberOfCalibChannels; k++) {
+    chn = data->fChannel[k];
+    for (l = 0; l < kNumberOfBins; l++) {
+      if (fBoard->GetChipVersion() != 3) {
+	// Range Group
+	num = fread(&chn->fLimitGroup[l], 1, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'RangeGroup' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+	// Look Up Offset
+	num = fread(&chn->fLookUpOffset[l], 2, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'LookUpOffset' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+	// Number Of Look Up Points
+	num = fread(&chn->fNumberOfLookUpPoints[l], 1, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'NumberOfLookUpPoints' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+	// Look Up Points
+	delete chn->fLookUp[l];
+	chn->fLookUp[l] = new unsigned char[chn->fNumberOfLookUpPoints[l]];
+	for (m = 0; m < chn->fNumberOfLookUpPoints[l]; m++) {
+	  num = fread(&chn->fLookUp[l][m], 1, 1, fileHandle);
+	  if (num != 1) {
+	    printf("Error while reading response calibration file '%s'\n", fileName);
+	    printf("   at 'LookUp %d' of channel %d bin %d.\n", m, k, l);
+	    return false;
+	  }
+	}
+	// Points
+	for (m = 0; m < data->fNumberOfGridPoints; m++) {
+	  num = fread(&chn->fData[l][m], 2, 1, fileHandle);
+	  if (num != 1) {
+	    printf("Error while reading response calibration file '%s'\n", fileName);
+	    printf("   at 'Point %d' of channel %d bin %d.\n", m, k, l);
+	    return false;
+	  }
+	}
+	// ADC Offset
+	num = fread(&chn->fOffsetADC[l], 2, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'ADC Offset' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+      }
+      // Offset
+      num = fread(&chn->fOffset[l], 2, 1, fileHandle);
+      if (num != 1) {
+	printf("Error while reading response calibration file '%s'\n", fileName);
+	printf("   at 'Offset' of channel %d bin %d.\n", k, l);
+	return false;
+      }
+      if (fBoard->GetChipVersion() == 3) {
+	// Gain
+	num = fread(&chn->fGain[l], 2, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'Gain' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+      }
+    }
+  }
+  fclose(fileHandle);
+  
+  if (fBoard->GetChipVersion() != 3) {
+    data->PreCalculateBSpline();
+  }
+  
+  return true;
+}
+
+/*------------------------------------------------------------------*/
+
+bool ResponseCalibration::ReadCalibrationV4(unsigned int chipIndex)
+{
+  int k, l, num;
+  char fileName[2000];
+  FILE *fileHandle;
+  char calibDir[1000];
+  
+  // Read Response Calibration
+  
+  fBoard->GetCalibrationDirectory(calibDir);
+  sprintf(fileName, "%s/board%d/ResponseCalib_board%d_chip%d_%dMHz.bin", calibDir,
+	  fBoard->GetCMCSerialNumber(), fBoard->GetCMCSerialNumber(), chipIndex,
+	  static_cast<int>(fBoard->GetFrequency() * 1000));
+  
+  fileHandle = fopen(fileName, "rb");
+  if (fileHandle == NULL) {
+    printf("Board %d --> Could not find response calibration file:\n", fBoard->GetCMCSerialNumber());
+    printf("%s\n", fileName);
+    return false;
+  }
+  
+  if (fInitialized)
+    delete fCalibrationData[chipIndex];
+  fCalibrationData[chipIndex] = new CalibrationData(1);
+  CalibrationData *data = fCalibrationData[chipIndex];
+  CalibrationData::CalibrationDataChannel * chn;
+  data->fRead = true;
+  data->fHasOffsetCalibration = 1;
+  fCalibrationValid[chipIndex] = true;
+  data->fStartTemperature = 0;
+  data->fEndTemperature = 0;
+  
+  // read channel
+  for (k = 0; k < kNumberOfCalibChannels; k++) {
+    chn = data->fChannel[k];
+    for (l = 0; l < kNumberOfBins; l++) {
+      // Offset
+      num = fread(&chn->fOffset[l], 2, 1, fileHandle);
+      if (num != 1) {
+	printf("Error while reading response calibration file '%s'\n", fileName);
+	printf("   at 'Offset' of channel %d bin %d.\n", k, l);
+	return false;
+      }
+      if (fBoard->GetChipVersion() == 3) {
+	// Gain
+	num = fread(&chn->fGain[l], 2, 1, fileHandle);
+	if (num != 1) {
+	  printf("Error while reading response calibration file '%s'\n", fileName);
+	  printf("   at 'Gain' of channel %d bin %d.\n", k, l);
+	  return false;
+	}
+      }
+    }
+  }
+  
+  fclose(fileHandle);
+  return true;
+}
+
+/*------------------------------------------------------------------*/
+
+float ResponseCalibration::GetValue(float *coefficients, float u, int n)
+{
+  int j, ii;
+  float bsplines[4];
+  ii = CalibrationData::CalculateBSpline(n, u, bsplines);
+  
+  float s = 0;
+  for (j = 0; j < kBSplineOrder; j++) {
+    s += coefficients[ii + j] * bsplines[j];
+  }
+  return s;
+}
+
+/*------------------------------------------------------------------*/
+
+int ResponseCalibration::Approx(float *p, float *uu, int np, int nu, float *coef)
+{
+  int i, iu, j;
+  
+  const int mbloc = 50;
+  int ip = 0;
+  int ir = 0;
+  int mt = 0;
+  int ileft, irow;
+  float bu[kBSplineOrder];
+  float *matrix[kBSplineOrder + 2];
+  for (i = 0; i < kBSplineOrder + 2; i++)
+    matrix[i] = new float[mbloc + nu + 1];
+  for (iu = kBSplineOrder - 1; iu < nu; iu++) {
+    for (i = 0; i < np; i++) {
+      if (1 <= uu[i])
+	ileft = nu - 1;
+      else if (uu[i] < 0)
+	ileft = kBSplineOrder - 2;
+      else
+	ileft = kBSplineOrder - 1 + static_cast<int>(uu[i] * (nu - kBSplineOrder + 1));
+      if (ileft != iu)
+	continue;
+      irow = ir + mt;
+      mt++;
+      CalibrationData::CalculateBSpline(nu, uu[i], bu);
+      for (j = 0; j < kBSplineOrder; j++) {
+	matrix[j][irow] = bu[j];
+      }
+      matrix[kBSplineOrder][irow] = p[i];
+      if (mt < mbloc)
+	continue;
+      LeastSquaresAccumulation(matrix, kBSplineOrder, &ip, &ir, mt, iu - kBSplineOrder + 1);
+      mt = 0;
+    }
+    if (mt == 0)
+      continue;
+    LeastSquaresAccumulation(matrix, kBSplineOrder, &ip, &ir, mt, iu - kBSplineOrder + 1);
+    mt = 0;
+  }
+  if (!LeastSquaresSolving(matrix, kBSplineOrder, ip, ir, coef, nu)) {
+    for (i = 0; i < kBSplineOrder + 2; i++)
+      delete matrix[i];
+    return 0;
+  }
+  
+  for (i = 0; i < kBSplineOrder + 2; i++)
+    delete matrix[i];
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::LeastSquaresAccumulation(float **matrix, int nb, int *ip, int *ir, int mt, int jt)
+{
+  int i, j, l, mu, k, kh;
+  float rho;
+  
+  if (mt <= 0)
+    return;
+  if (jt != *ip) {
+    if (jt > (*ir)) {
+      for (i = 0; i < mt; i++) {
+	for (j = 0; j < nb + 1; j++) {
+	  matrix[j][jt + mt - i] = matrix[j][(*ir) + mt - i];
+	}
+      }
+      for (i = 0; i < jt - (*ir); i++) {
+	for (j = 0; j < nb + 1; j++) {
+	  matrix[j][(*ir) + i] = 0;
+	}
+      }
+      *ir = jt;
+    }
+    mu = min(nb - 1, (*ir) - (*ip) - 1);
+    if (mu != 0) {
+      for (l = 0; l < mu; l++) {
+	k = min(l + 1, jt - (*ip));
+	for (i = l + 1; i < nb; i++) {
+	  matrix[i - k][(*ip) + l + 1] = matrix[i][(*ip) + l + 1];
+	}
+	for (i = 0; i < k; i++) {
+	  matrix[nb - i - 1][(*ip) + l + 1] = 0;
+	}
+      }
+    }
+    *ip = jt;
+  }
+  kh = min(nb + 1, (*ir) + mt - (*ip));
+  
+  for (i = 0; i < kh; i++) {
+    Housholder(i, max(i + 1, (*ir) - (*ip)), (*ir) + mt - (*ip), matrix, i, (*ip), &rho, matrix, i + 1,
+	       (*ip), 1, nb - i);
+  }
+  
+  *ir = (*ip) + kh;
+  if (kh < nb + 1)
+    return;
+  for (i = 0; i < nb; i++) {
+    matrix[i][(*ir) - 1] = 0;
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+int ResponseCalibration::LeastSquaresSolving(float **matrix, int nb, int ip, int ir, float *x, int n)
+{
+  int i, j, l, ii;
+  float s, rsq;
+  for (j = 0; j < n; j++) {
+    x[j] = matrix[nb][j];
+  }
+  rsq = 0;
+  if (n <= ir - 1) {
+    for (j = n; j < ir; j++) {
+      rsq += pow(matrix[nb][j], 2);
+    }
+  }
+  
+  for (ii = 0; ii < n; ii++) {
+    i = n - ii - 1;
+    s = 0;
+    l = max(0, i - ip);
+    if (i != n - 1) {
+      for (j = 1; j < min(n - i, nb); j++) {
+	s += matrix[j + l][i] * x[i + j];
+      }
+    }
+    if (matrix[l][i] == 0) {
+      printf("Error in LeastSquaresSolving.\n");
+      return 0;
+    }
+    x[i] = (x[i] - s) / matrix[l][i];
+  }
+  return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::Housholder(int lpivot, int l1, int m, float **u, int iU1, int iU2, float *up,
+                                     float **c, int iC1, int iC2, int ice, int ncv)
+{
+  int i, j, incr;
+  float tol = static_cast<float>(1e-20);
+  float tolb = static_cast<float>(1e-24);
+  float cl, clinv, sm, b;
+  
+  if (lpivot < 0 || lpivot >= l1 || l1 > m - 1)
+    return;
+  cl = fabs(u[iU1][iU2 + lpivot]);
+  
+  // Construct the transformation
+  for (j = l1 - 1; j < m; j++)
+    cl = max(fabsf(u[iU1][iU2 + j]), cl);
+  if (cl < tol)
+    return;
+  clinv = 1 / cl;
+  sm = pow(u[iU1][iU2 + lpivot] * clinv, 2);
+  for (j = l1; j < m; j++) {
+    sm = sm + pow(u[iU1][iU2 + j] * clinv, 2);
+  }
+  cl *= sqrt(sm);
+  if (u[iU1][iU2 + lpivot] > 0)
+    cl = -cl;
+  *up = u[iU1][iU2 + lpivot] - cl;
+  u[iU1][iU2 + lpivot] = cl;
+  
+  if (ncv <= 0)
+    return;
+  b = (*up) * u[iU1][iU2 + lpivot];
+  if (fabs(b) < tolb)
+    return;
+  if (b >= 0)
+    return;
+  b = 1 / b;
+  incr = ice * (l1 - lpivot);
+  for (j = 0; j < ncv; j++) {
+    sm = c[iC1 + j][iC2 + lpivot] * (*up);
+    for (i = l1; i < m; i++) {
+      sm = sm + c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] * u[iU1][iU2 + i];
+    }
+    if (sm == 0)
+      continue;
+    sm *= b;
+    c[iC1 + j][iC2 + lpivot] = c[iC1 + j][iC2 + lpivot] + sm * (*up);
+    for (i = l1; i < m; i++) {
+      c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] =
+	c[iC1 + j][iC2 + lpivot + incr + (i - l1) * ice] + sm * u[iU1][iU2 + i];
+    }
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+int ResponseCalibration::MakeDir(const char *path)
+{
+  struct stat buf;
+  if (stat(path, &buf)) 
+    return mkdir(path, 0711);
+  return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+ResponseCalibration::ResponseCalibration(DRSBoard *board)
+  :fBoard(board)
+   ,fPrecision(0.1) // mV
+   ,fInitialized(false)
+   ,fRecorded(false)
+   ,fFitted(false)
+   ,fOffset(false)
+   ,fNumberOfPointsLowVolt(0)
+   ,fNumberOfPoints(0)
+   ,fNumberOfMode2Bins(0)
+   ,fNumberOfSamples(0)
+   ,fNumberOfGridPoints(0)
+   ,fNumberOfXConstPoints(0)
+   ,fNumberOfXConstGridPoints(0)
+   ,fTriggerFrequency(0)
+   ,fShowStatistics(0)
+   ,fCalibFile(0)
+   ,fCurrentLowVoltPoint(0)
+   ,fCurrentPoint(0)
+   ,fCurrentSample(0)
+   ,fCurrentFitChannel(0)
+   ,fCurrentFitBin(0)
+   ,fResponseY(0)
+   ,fSamples(0)
+   ,fSampleUsed(0)
+   ,fXXFit(0)
+   ,fYYFit(0)
+   ,fWWFit(0)
+   ,fYYFitRes(0)
+   ,fYYSave(0)
+   ,fXXSave(0)
+   ,fStatisticsApprox(0)
+   ,fStatisticsApproxExt(0)
+{
+  int i;
+  // Initializing the Calibration Class
+  CalibrationData::fIntRevers[0] = 0;
+  for (i = 1; i < 2 * kBSplineOrder - 2; i++) {
+    CalibrationData::fIntRevers[i] = static_cast<float>(1.) / i;
+  }
+  for (i = 0; i < kNumberOfChips; i++) {
+    fCalibrationData[i] = NULL;
+  }
+  // Initializing the Calibration Creation
+  fCalibrationValid[0] = false;
+  fCalibrationValid[1] = false;
+}
+
+/*------------------------------------------------------------------*/
+
+ResponseCalibration::~ResponseCalibration()
+{
+  // Deleting the Calibration Creation
+  DeleteFields();
+}
+
+/*------------------------------------------------------------------*/
+
+float ResponseCalibration::CalibrationData::fIntRevers[2 * kBSplineOrder - 2];
+ResponseCalibration::CalibrationData::CalibrationData(int numberOfGridPoints)
+  :fRead(false)
+   ,fNumberOfGridPoints(numberOfGridPoints)
+   ,fHasOffsetCalibration(0)
+   ,fStartTemperature(0)
+   ,fEndTemperature(0)
+   ,fMin(0)
+   ,fMax(0)
+   ,fNumberOfLimitGroups(0)
+{
+  int i;
+  for (i = 0; i < kNumberOfCalibChannels; i++) {
+    fChannel[i] = new CalibrationDataChannel(numberOfGridPoints);
+  }
+  for (i = 0; i < kNumberOfADCBins; i++) {
+    fBSplineOffsetLookUp[i] = NULL;
+    fBSplineLookUp[i] = NULL;
+  }
+};
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::CalibrationData::PreCalculateBSpline()
+{
+  int i, j;
+  float uu;
+  float xmin, xrange;
+  int nk = fNumberOfGridPoints - kBSplineOrder + 1;
+  for (i = 0; i < kNumberOfADCBins; i++) {
+    fBSplineLookUp[i] = new float *[fNumberOfLimitGroups];
+    fBSplineOffsetLookUp[i] = new int[fNumberOfLimitGroups];
+    for (j = 0; j < fNumberOfLimitGroups; j++) {
+      fBSplineLookUp[i][j] = new float[kBSplineOrder];
+      xmin = fMin + j * kBSplineXMinOffset;
+      xrange = fMax - xmin;
+      uu = (i - xmin) / xrange;
+      if (i < xmin) {
+	uu = 0;
+      }
+      if (i - xmin > xrange) {
+	uu = 1;
+      }
+      fBSplineOffsetLookUp[i][j] = static_cast<int>(uu * nk);
+      CalculateBSpline(fNumberOfGridPoints, uu, fBSplineLookUp[i][j]);
+    }
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::CalibrationData::DeletePreCalculatedBSpline()
+{
+  int i, j;
+  for (i = 0; i < kNumberOfADCBins; i++) {
+    if (fBSplineLookUp[i]!=NULL) {
+      for (j = 0; j < fNumberOfLimitGroups; j++)
+	delete fBSplineLookUp[i][j];
+    }
+    delete fBSplineLookUp[i];
+    delete fBSplineOffsetLookUp[i];
+  }
+}
+
+/*------------------------------------------------------------------*/
+
+ResponseCalibration::CalibrationData::~CalibrationData()
+{
+  int i, j;
+  for (i = 0; i < kNumberOfCalibChannels; i++) {
+    delete fChannel[i];
+  }
+  for (i = 0; i < kNumberOfADCBins; i++) {
+    if (fBSplineLookUp[i]!=NULL) {
+      for (j = 0; j < fNumberOfLimitGroups; j++) {
+	delete fBSplineLookUp[i][j];
+      }
+    }
+    delete fBSplineLookUp[i];
+    delete fBSplineOffsetLookUp[i];
+  }
+};
+
+/*------------------------------------------------------------------*/
+
+int ResponseCalibration::CalibrationData::CalculateBSpline(int nGrid, float value, float *bsplines)
+{
+  int minimum;
+  int maximum;
+  float xl;
+  
+  int nk = nGrid - kBSplineOrder + 1;
+  float vl = value * nk;
+  int ivl = static_cast<int>(vl);
+  
+  if (1 <= value) {
+    xl = vl - nk + 1;
+    minimum = 1 - nk;
+  } else if (value < 0) {
+    xl = vl;
+    minimum = 0;
+  } else {
+    xl = vl - ivl;
+    minimum = -ivl;
+  }
+  maximum = nk + minimum;
+  
+  // printf("xl = %f\n",xl);
+  float vm, vmprev;
+  int jl, ju;
+  int nb = 0;
+  
+  bsplines[0] = 1;
+  for (int i = 0; i < kBSplineOrder - 1; i++) {
+    vmprev = 0;
+    for (int j = 0; j < nb + 1; j++) {
+      jl = max(minimum, j - nb);
+      ju = min(maximum, j + 1);
+      vm = bsplines[j] * fIntRevers[ju - jl];
+      bsplines[j] = vm * (ju - xl) + vmprev;
+      vmprev = vm * (xl - jl);
+    }
+    nb++;
+    bsplines[nb] = vmprev;
+  }
+  return -minimum;
+}
+
+/*------------------------------------------------------------------*/
+
+void ResponseCalibration::Average(int method,float *points,int numberOfPoints,float &mean,float &error,float sigmaBoundary)
+{
+  // Methods :
+  // 0 : Average
+  // 1 : Average inside sigmaBoundary*sigma
+  int i;
+  float sum = 0;
+  float sumSquare = 0;
+  
+  if (method == 0 || method == 1) {
+    for (i = 0; i < numberOfPoints; i++) {
+      sum += points[i];
+      sumSquare += points[i]*points[i];
+    }
+    
+    mean = sum / numberOfPoints;
+    error = sqrt((sumSquare - sum * sum / numberOfPoints) / (numberOfPoints - 1));
+  }
+  if (method == 1) {
+    int numberOfGoodPoints = numberOfPoints;
+    bool found = true;
+    bool *goodSample = new bool[numberOfGoodPoints];
+    for (i = 0; i < numberOfGoodPoints; i++)
+      goodSample[i] = true;
+    
+    while (found) {
+      found = false;
+      for (i = 0; i < numberOfPoints; i++) {
+	if (goodSample[i] && fabs(points[i] - mean) > sigmaBoundary * error) {
+	  found = true;
+	  goodSample[i] = false;
+	  numberOfGoodPoints--;
+	  sum -= points[i];
+	  sumSquare -= points[i]*points[i];
+	  mean = sum/numberOfGoodPoints;
+	  error = sqrt((sumSquare - sum * sum / numberOfGoodPoints) / (numberOfGoodPoints - 1));
+	}
+      }
+    }
+    delete goodSample;
+  }
+}
+
Index: /drsdaq/DRS/DRS.h
===================================================================
--- /drsdaq/DRS/DRS.h	(revision 22)
+++ /drsdaq/DRS/DRS.h	(revision 22)
@@ -0,0 +1,632 @@
+
+#ifndef DRS_H
+#define DRS_H
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/time.h>
+#include <assert.h>
+#include <algorithm>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+
+#include "mxml.h"
+#include "strlcpy.h"
+
+// Concurrent Technologies VME single board computer
+#ifdef CT_VME 
+#include "rcc_error/rcc_error.h"   // Error reporting
+#include "vme_rcc/vme_rcc.h"       // VME access
+#include "cmem_rcc/cmem_rcc.h"     // Allocation of contiguous memory
+#include "rcc_time_stamp/tstamp.h" // Time stamp library
+#endif
+
+// Struck VME interface
+#ifdef STRUCK_VME
+#include "mvmestd.h"
+#endif
+
+// Control register bit definitions 
+#define BIT_START_TRIG        (1<<0)    // Write a "1" to start domino wave
+#define BIT_REINIT_TRIG       (1<<1)    // Write a "1" to stop & reset DRS
+#define BIT_SOFT_TRIG         (1<<2)    // Write a "1" to stop and read data to RAM
+#define BIT_FLASH_TRIG        (1<<3)    // Write a "1" to write DAC0 & DAC1 into serial EEPROM
+#define BIT_AUTOSTART        (1<<16)
+#define BIT_DMODE            (1<<17)    // 0: single shot, 1: circular
+#define BIT_LED              (1<<18)    // 1=on, 0=blink during readout
+#define BIT_TCAL_EN          (1<<19)    // Switch on (1) / off (0) for 33 MHz calib signal
+#define BIT_ZERO_SUPP        (1<<20)
+#define BIT_FREQ_AUTO_ADJ    (1<<21)
+#define BIT_ENABLE_TRIGGER   (1<<22)
+#define BIT_LONG_START_PULSE (1<<23)    // (*DRS2*) 0:short start pulse (> 0.8 GHz), 1:long start pulse (< 0.8 GHz)
+#define BIT_READOUT_MODE     (1<<23)    // (*DRS3*) 0:start from first bin, 1:start from domino stop
+#define BIT_DELAYED_START    (1<<24)    // Start domino wave 400 ns after soft trigger, used for waveform
+                                        // Generator startup
+#define BIT_ACAL_EN          (1<<25)    // Connect DRS to inputs (0) or to DAC6 (1)
+#define BIT_TRIGGER_DELAYED  (1<<26)    // Select delayed trigger from trigger bus
+#define BIT_DACTIVE          (1<<27)    // Keep domino wave running during readout
+
+// Status register bit definitions 
+#define BIT_RUNNING           (1<<0)    // One if domino wave running or readout in progress
+#define BIT_NEW_FREQ1         (1<<1)    // One if new frequency measurement available
+#define BIT_NEW_FREQ2         (1<<2)
+
+enum DRSBoardConstants {
+  kNumberOfChannels            =   10,
+  kNumberOfCalibChannels       =   10,
+  kNumberOfBins                = 1024,
+  kNumberOfChips               =    2,
+  kFrequencyCacheSize          =   10,
+  kBSplineOrder                =    4,
+  kPreCaliculatedBSplines      = 1000,
+  kPreCaliculatedBSplineGroups =    5,
+  kNumberOfADCBins             = 4096,
+  kBSplineXMinOffset           =   20,
+  kMaxNumberOfClockCycles      =  100,
+};
+
+enum DRSErrorCodes {
+  kSuccess                     =  0,
+  kInvalidTriggerSignal        = -1,
+  kWrongChannelOrChip          = -2,
+  kInvalidTransport            = -3,
+  kZeroSuppression             = -4,
+  kWaveNotAvailable            = -5
+};
+
+class DRSBoard;
+
+
+class ResponseCalibration {
+ protected:
+  
+  class CalibrationData {
+  public:
+    class CalibrationDataChannel {
+    public:
+      unsigned char   fLimitGroup[kNumberOfBins];           //!
+      float           fMin[kNumberOfBins];                  //!
+      float           fRange[kNumberOfBins];                //!
+      short           fOffset[kNumberOfBins];               //!
+      short           fGain[kNumberOfBins];                 //!
+      unsigned short  fOffsetADC[kNumberOfBins];            //!
+      short          *fData[kNumberOfBins];                 //!
+      unsigned char  *fLookUp[kNumberOfBins];               //!
+      unsigned short  fLookUpOffset[kNumberOfBins];         //!
+      unsigned char   fNumberOfLookUpPoints[kNumberOfBins]; //!
+      float          *fTempData;                            //!
+      
+    private:
+      CalibrationDataChannel(const CalibrationDataChannel &c);              // Not implemented
+      CalibrationDataChannel &operator=(const CalibrationDataChannel &rhs); // Not implemented
+      
+    public:
+      CalibrationDataChannel(int numberOfGridPoints)
+	:fTempData(new float[numberOfGridPoints]) {
+	int i;
+	for (i = 0; i < kNumberOfBins; i++) {
+	  fData[i] = new short[numberOfGridPoints];
+	  fLookUp[i] = NULL;
+	}
+      }
+      ~CalibrationDataChannel() {
+	int i;
+	delete fTempData;
+	for (i = 0; i < kNumberOfBins; i++) {
+	  delete fData[i];
+	  delete fLookUp[i];
+	}
+      }
+    };
+    
+    bool                    fRead;                                  //!
+    CalibrationDataChannel *fChannel[kNumberOfCalibChannels];       //!
+    unsigned char           fNumberOfGridPoints;                    //!
+    int                     fHasOffsetCalibration;                  //!
+    float                   fStartTemperature;                      //!
+    float                   fEndTemperature;                        //!
+    int                    *fBSplineOffsetLookUp[kNumberOfADCBins]; //!
+    float                 **fBSplineLookUp[kNumberOfADCBins];       //!
+    float                   fMin;                                   //!
+    float                   fMax;                                   //!
+    unsigned char           fNumberOfLimitGroups;                   //!
+    static float            fIntRevers[2 * kBSplineOrder - 2];
+    
+  private:
+    CalibrationData(const CalibrationData &c);              // Not implemented
+    CalibrationData &operator=(const CalibrationData &rhs); // Not implemented
+    
+  public:
+    CalibrationData(int numberOfGridPoints);
+    ~CalibrationData();
+    static int CalculateBSpline(int nGrid, float value, float *bsplines);
+    void       PreCalculateBSpline();
+    void       DeletePreCalculatedBSpline();
+  };
+  
+  // General Fields
+  DRSBoard        *fBoard;
+  
+  double           fPrecision;
+  
+  // Fields for creating the Calibration
+  bool             fInitialized;
+  bool             fRecorded;
+  bool             fFitted;
+  bool             fOffset;
+  bool             fCalibrationValid[2];
+  
+  int              fNumberOfPointsLowVolt;
+  int              fNumberOfPoints;
+  int              fNumberOfMode2Bins;
+  int              fNumberOfSamples;
+  int              fNumberOfGridPoints;
+  int              fNumberOfXConstPoints;
+  int              fNumberOfXConstGridPoints;
+  double           fTriggerFrequency;
+  int              fShowStatistics;
+  FILE            *fCalibFile;
+  
+  int              fCurrentLowVoltPoint;
+  int              fCurrentPoint;
+  int              fCurrentSample;
+  int              fCurrentFitChannel;
+  int              fCurrentFitBin;
+  
+  float           *fResponseX[kNumberOfCalibChannels][kNumberOfBins];
+  float           *fResponseY;
+  unsigned short **fWaveFormMode3[kNumberOfCalibChannels];
+  unsigned short **fWaveFormMode2[kNumberOfCalibChannels];
+  short          **fWaveFormOffset[kNumberOfCalibChannels];
+  unsigned short **fWaveFormOffsetADC[kNumberOfCalibChannels]; // Is this used?
+  unsigned short  *fSamples;
+  int             *fSampleUsed;
+  
+  float           *fPntX[2];
+  float           *fPntY[2];
+  float           *fUValues[2];
+  float           *fRes[kNumberOfBins];
+  float           *fResX[kNumberOfBins];
+  
+  double          *fXXFit;
+  double          *fYYFit;
+  double          *fWWFit;
+  double          *fYYFitRes;
+  double          *fYYSave;
+  double          *fXXSave;
+  
+  float          **fStatisticsApprox;
+  float          **fStatisticsApproxExt;
+  
+  // Fields for applying the Calibration
+  CalibrationData *fCalibrationData[kNumberOfChips];
+  
+ private:
+  ResponseCalibration(const ResponseCalibration &c);              // Not implemented
+  ResponseCalibration &operator=(const ResponseCalibration &rhs); // Not implemented
+  
+ public:
+  ResponseCalibration(DRSBoard* board);
+  ~ResponseCalibration();
+  
+  void   SetCalibrationParameters(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins,
+				  int numberOfSamples, int numberOfGridPoints, int numberOfXConstPoints,
+				  int numberOfXConstGridPoints, double triggerFrequency, int showStatistics = 0);
+  void   ResetCalibration();
+  bool   RecordCalibrationPoints(int chipNumber);
+  bool   RecordCalibrationPointsV3(int chipNumber);
+  bool   RecordCalibrationPointsV4(int chipNumber);
+  bool   FitCalibrationPoints(int chipNumber);
+  bool   FitCalibrationPointsV3(int chipNumber);
+  bool   FitCalibrationPointsV4(int chipNumber);
+  bool   OffsetCalibration(int chipNumber);
+  double GetTemperature(unsigned int chipIndex);
+  
+  bool   WriteCalibration(unsigned int chipIndex);
+  bool   WriteCalibrationV3(unsigned int chipIndex);
+  bool   WriteCalibrationV4(unsigned int chipIndex);
+  bool   ReadCalibration(unsigned int chipIndex);
+  bool   ReadCalibrationV3(unsigned int chipIndex);
+  bool   ReadCalibrationV4(unsigned int chipIndex);
+  bool   Calibrate(unsigned int chipIndex, unsigned int channel, float *adcWaveform,
+		   float *uWaveform, float threshold);
+  bool   Calibrate(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform, short *uWaveform,
+		   int triggerCell, float threshold);
+  bool   SubtractADCOffset(unsigned int chipIndex, unsigned int channel, unsigned short *adcWaveform,
+			   unsigned short *adcCalibratedWaveform, unsigned short newBaseLevel);
+  bool   IsRead(int chipIndex) const { return fCalibrationValid[chipIndex]; }
+  double GetPrecision() const { return fPrecision; };
+  
+  double GetOffsetAt(int chip,int chn,int bin) const { return fCalibrationData[chip]->fChannel[chn]->fOffset[bin]; };
+  double GetGainAt(int chip,int chn,int bin) const { return fCalibrationData[chip]->fChannel[chn]->fGain[bin]; };
+  double GetMeasPointXAt(int ip) const { return fXXSave[ip]; };
+  double GetMeasPointYAt(int ip) const { return fYYSave[ip]; };
+  
+ protected:
+  void   InitFields(int numberOfPointsLowVolt, int numberOfPoints, int numberOfMode2Bins, int numberOfSamples,
+		    int numberOfGridPoints, int numberOfXConstPoints, int numberOfXConstGridPoints,
+		    double triggerFrequency, int showStatistics);
+  void   DeleteFields();
+  void   CalibrationTrigger(int mode, double voltage);
+  void   CalibrationStart(double voltage);
+  
+  static float  GetValue(float *coefficients, float u, int n);
+  static int    Approx(float *p, float *uu, int np, int nu, float *coef);
+  static void   LeastSquaresAccumulation(float **matrix, int nb, int *ip, int *ir, int mt, int jt);
+  static int    LeastSquaresSolving(float **matrix, int nb, int ip, int ir, float *x, int n);
+  static void   Housholder(int lpivot, int l1, int m, float **u, int iU1, int iU2, float *up, float **c, int iC1,
+			   int iC2, int ice, int ncv);
+  
+  static int    MakeDir(const char *path);
+  static void   Average(int method,float *samples,int numberOfSamples,float &mean,float &error,float sigmaBoundary);
+};
+
+
+
+class DRSBoard {
+ protected:
+  class TimeData {
+  public:
+    class FrequencyData {
+    public:
+      int    fFrequency;
+      double fBin[kNumberOfBins];
+    };
+    
+    enum {
+      kMaxNumberOfFrequencies = 4000
+    };
+    int            fChip;
+    int            fNumberOfFrequencies;
+    FrequencyData *fFrequency[kMaxNumberOfFrequencies];
+    
+  private:
+    TimeData(const TimeData &c);              // Not implemented
+    TimeData &operator=(const TimeData &rhs); // Not implemented
+    
+  public:
+    TimeData()
+      :fChip(0)
+      ,fNumberOfFrequencies(0) {
+    }
+    ~TimeData() {
+      int i;
+      for (i = 0; i < fNumberOfFrequencies; i++) {
+	delete fFrequency[i];
+      }
+    }
+  };
+  
+ public:
+  // DAC channels (CMC Version 1 : DAC_COFSA,DAC_COFSB,DAC_DRA,DAC_DSA,DAC_TLEVEL,DAC_ACALIB,DAC_DSB,DAC_DRB)
+  unsigned int         fDAC_COFSA;
+  unsigned int         fDAC_COFSB;
+  unsigned int         fDAC_DRA;
+  unsigned int         fDAC_DSA;
+  unsigned int         fDAC_TLEVEL;
+  unsigned int         fDAC_ACALIB;
+  unsigned int         fDAC_DSB;
+  unsigned int         fDAC_DRB;
+  // DAC channels (CMC Version 2+3 : DAC_COFS,DAC_DSA,DAC_DSB,DAC_TLEVEL,DAC_ADCOFS,DAC_CLKOFS,DAC_ACALIB)
+  unsigned int         fDAC_COFS;
+  unsigned int         fDAC_ADCOFS;
+  unsigned int         fDAC_CLKOFS;
+  // DAC channels (CMC Version 4 : DAC_ROFS_1,DAC_DSA,DAC_DSB,DAC_ROFS_2,DAC_ADCOFS,DAC_ACALIB,DAC_INOFS,DAC_BIAS)
+  unsigned int         fDAC_ROFS_1;
+  unsigned int         fDAC_ROFS_2;
+  unsigned int         fDAC_INOFS;
+  unsigned int         fDAC_BIAS;
+ 
+ protected:
+  // Fields for DRS
+  int                  fRequiredFirmwareVersion;
+  int                  fFirmwareVersion;
+  int                  fChipVersion;
+  int                  fBoardVersion;
+  int                  fCMCSerialNumber;
+  unsigned int         fTransport;
+  unsigned int         fCtrlBits;
+  int                  fNumberOfReadoutChannels;
+  double               fExternalClockFrequency;
+
+  // VME
+#ifdef CT_VME 
+  VME_ErrorCode_t          ErrorCode;
+  VME_BlockTransferList_t  BLT_List;
+  
+  char                 ErrorString[VME_MAXSTRING];
+  
+  int                  CMEM_SegIdentifier; 
+
+  unsigned long        PCIAddress;        // Physical address of contiguous buffer
+  unsigned long        VirtualAddress;    // Virtual address of contiguous buffer  
+
+  unsigned int         fBaseAddress;
+  unsigned int         fBoardAddress;
+  int                  fMasterMapping;
+#endif
+#ifdef STRUCK_VME
+  mvme_addr_t          fBaseAddress;
+  MVME_INTERFACE      *fVMEInterface;
+#endif
+
+  int                  fSlotNumber;
+  double               fFrequency;
+  int                  fDominoMode;
+  int                  fReadoutMode;
+  int                  fTriggerEnable;
+  int                  fDelayedStart;
+  int                  fTriggerCell;
+  
+#ifdef STRUCK_VME
+  unsigned char        fWaveforms[kNumberOfChips * kNumberOfChannels * 2 * kNumberOfBins];
+#endif
+#ifdef CT_VME
+  unsigned long        fWaveforms[kNumberOfChannels * kNumberOfBins]; 
+#endif
+  
+  // Fields for Calibration
+  int                  fMaxChips;
+  char                 fCalibDirectory[1000];
+  
+  // Fields for Response Calibration
+  ResponseCalibration *fResponseCalibration;
+  
+  // Fields for Time Calibration
+  TimeData           **fTimeData;
+  int                  fNumberOfTimeData;
+  
+  // General debugging flag
+  int                  fDebug;
+  
+  // Fields for wave transfer
+  bool                 fWaveTransferred[kNumberOfChips * kNumberOfChannels];
+  
+  // Waveform Rotation
+  int                  fTriggerStartBin; // Start bin of the trigger
+  bool                 kRotateWave;
+  
+ private:
+  DRSBoard(const DRSBoard &c);              // Not implemented
+  DRSBoard &operator=(const DRSBoard &rhs); // Not implemented
+  
+ public:
+  
+  ~DRSBoard();
+  
+  void         SetCMCSerialNumber(unsigned int serialNumber) { fCMCSerialNumber = serialNumber; }
+  int          GetCMCSerialNumber() const { return fCMCSerialNumber; }
+  int          GetFirmwareVersion() const { return fFirmwareVersion; }
+  int          GetRequiredFirmwareVersion() const { return fRequiredFirmwareVersion; }
+  int          GetChipVersion() const { return fChipVersion; }
+  int          GetCMCVersion() const { return fBoardVersion; }
+  
+  // VME
+  int          GetSlotNumber() const { return fSlotNumber; }
+
+#ifdef CT_VME 
+  unsigned int GetBaseAddress() const {return fBaseAddress; }
+  unsigned int GetBoardAddress() const {return fBoardAddress; }
+#endif
+
+  int          Read(int type, void *data, unsigned int addr, int size);
+  int          Write(int type, unsigned int addr, void *data, int size);
+
+#ifdef CT_VME 
+  int          AllocateSegmentCMEM(unsigned int SegSize, int *CMEM_SegIdentifier);
+  int          AssignPhysicalSegAddressCMEM(int CMEM_SegIdentifier, unsigned long* PCIAddress);
+  int          AssignVirtualSegAddressCMEM(int CMEM_SegIdentifier, unsigned long* VirtualAddress);
+  int          FreeSegmentCMEM(int CMEM_SegIdentifier);
+#endif
+
+  void         RegisterTest(void);
+  int          RAMTest(int flag);
+  unsigned int GetCtrlReg(void);
+  unsigned int GetStatusReg(void);
+  
+  void         SetLED(int state);
+  
+  void         SetChannelConfig(int firstChannel, int lastChannel, int nConfigChannels);
+  void         SetNumberOfChannels(int nChannels);
+  int          EnableTrigger(int mode);
+  int          SetDelayedStart(int flag);
+  int          IsBusy(void);
+  int          IsNewFreq(unsigned char chipIndex);
+  int          SetDAC(unsigned char channel, double value);
+  int          ReadDAC(unsigned char channel, double *value);
+  int          GetRegulationDAC(double *value);
+  
+  int          StartDomino();
+  int          Reinit();
+  int          Init();
+  
+  void         SetDebug(int debug) { fDebug = debug; }
+  
+  int          SetDominoMode(unsigned char mode);
+  
+  int          SetDominoActive(unsigned char mode);
+  int          SetReadoutMode(unsigned char mode);
+  
+  int          SoftTrigger(void);
+  int          ReadFrequency(unsigned char chipIndex, double *f);
+  int          SetFrequency(double freq);
+  double       VoltToFreq(double volt);
+  double       FreqToVolt(double freq);
+  double       GetFrequency() const { return fFrequency; }
+  
+  int          RegulateFrequency(double freq);
+  int          SetExternalClockFrequency(double frequencyMHz);
+  double       GetExternalClockFrequency();
+  
+  void         SetVoltageOffset(double offset1, double offset2);
+
+
+  int          TestRead(unsigned int n, int type);
+ 
+  int          TransferWaves(int numberOfChannels = kNumberOfChips * kNumberOfChannels);
+  int          TransferWaves(unsigned char *p, int numberOfChannels = kNumberOfChips * kNumberOfChannels);
+  int          TransferWaves(unsigned char *p, int firstChannel, int lastChannel);
+  int          TransferWaves(unsigned long *p, int numberOfChannels = kNumberOfChips * kNumberOfChannels);
+  int          TransferWaves(unsigned long *p, int firstChannel, int lastChannel);
+  int          TransferWaves(int firstChannel, int lastChannel);
+
+  int          DecodeWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel,
+  			  unsigned short *waveform);
+  int          DecodeWave(unsigned long *waveforms, unsigned int chipIndex, unsigned char channel,
+			  unsigned short *waveform);
+  int          DecodeWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform);
+
+  int          GetWave(unsigned long *waveforms, unsigned int chipIndex, unsigned char channel, short *waveform, 
+		       bool responseCalib = false, int triggerCell = -1, bool adjustToClock = false, 
+		       float threshold = 0);
+  int          GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, short *waveform,
+		       bool responseCalib = false, int triggerCell = -1, bool adjustToClock = false,
+		       float threshold = 0);
+  int          GetWave(unsigned char *waveforms, unsigned int chipIndex, unsigned char channel, float *waveform,
+		       bool responseCalib = false, int triggerCell = -1, bool adjustToClock = false,
+		       float threshold = 0);
+  int          GetWave(unsigned int chipIndex, unsigned char channel, short *waveform, bool responseCalib = false,
+		       int triggerCell = -1, bool adjustToClock = false, float threshold = 0);
+  int          GetWave(unsigned int chipIndex, unsigned char channel, float *waveform, bool responseCalib = false,
+		       int triggerCell = -1, bool adjustToClock = false, float threshold = 0);
+  int          GetADCWave(unsigned int chipIndex, unsigned char channel, unsigned short *waveform);
+  int          GetADCWave(unsigned char *waveforms,unsigned int chipIndex, unsigned char channel,
+  		  unsigned short *waveform);
+  int          GetADCWave(unsigned long *waveforms,unsigned int chipIndex, unsigned char channel,
+  		  unsigned short *waveform);
+  
+  void         RotateWave(int triggerCell, short *waveform);  
+  void         RotateWave(int triggerCell, float *waveform);  
+  void         SetRotation(bool r) {kRotateWave = r;}
+
+  int          GetTime(unsigned int chipIndex, int frequencyMHz, float *time, int triggerCell);
+  int          GetTriggerCell(unsigned int chipIndex);
+  int          GetTriggerCell(unsigned char *waveforms,unsigned int chipIndex);
+  int          GetTriggerCell(unsigned long *waveforms,unsigned int chipIndex);
+  int          GetTriggerCell(float *waveform);
+
+  void         TestDAC(int channel);
+  void         MeasureSpeed();
+  void         InteractSpeed();
+  void         MonitorFrequency();
+  int          EnableTcal(int flag);
+  int          EnableAcal(int mode, double voltage);
+  int          SetCalibVoltage(double value);
+  int          SetCalibTiming(int t1, int t2);
+  double       GetTemperature();
+  int          GetTriggerBus();
+  int          FlashEEPROM(unsigned short serial_cmc);
+  bool         HasCorrectFirmware();
+  
+  bool         InitTimeCalibration(unsigned int chipIndex);
+  void         SetCalibrationDirectory(const char *calibrationDirectoryPath);
+  void         GetCalibrationDirectory(char *calibrationDirectoryPath);
+  
+  ResponseCalibration *GetResponseCalibration() const { return fResponseCalibration; }
+  
+  int          GetStoredTriggerCell() const { return fTriggerCell; }
+  double       GetPrecision() const { return fResponseCalibration->GetPrecision(); }
+  int          CalibrateWaveform(unsigned int chipIndex, unsigned char channel, unsigned short *adcWaveform,
+				 short *waveform, bool responseCalib, int triggerCell, bool adjustToClock,
+				 float threshold);
+  
+  static void  LinearRegression(double *x, double *y, int n, double *a, double *b);
+  
+ protected:
+  // Protected methods
+  void         ConstructBoard();
+  void         ReadSerialNumber();
+  
+  
+  TimeData    *GetTimeCalibration(unsigned int chipIndex, bool reinit = false);
+  
+  int          GetStretchedTime(float *time, float *measurement, int numberOfMeasurements, float period);
+  
+ public:
+  
+#ifdef CT_VME 
+  DRSBoard(int MasterMapping, unsigned int BaseAddress, unsigned int BoardAddress, int SlotNumber);
+#endif
+
+#ifdef STRUCK_VME
+  DRSBoard(MVME_INTERFACE * MVME_Interface, mvme_addr_t BaseAddress, int SlotNumber);
+  MVME_INTERFACE *GetVMEInterface() const { return fVMEInterface; };
+#endif
+
+  void PrintBinary32(unsigned int i);
+  long int GetMicroSeconds();
+  
+};
+
+
+
+class DRS {
+  
+ protected:
+  enum {
+    kMaxNumberOfBoards = 40
+  };
+  
+ protected:
+  
+  DRSBoard        *fBoard[kMaxNumberOfBoards];
+  
+#ifdef CT_VME 
+  VME_MasterMap_t  MasterMap;
+  VME_ErrorCode_t  ErrorCode;
+  
+  char             ErrorString[VME_MAXSTRING];
+  
+  int              MasterMapping[kMaxNumberOfBoards];
+#endif
+
+  int              fNumberOfBoards;
+  
+#ifdef STRUCK_VME
+  MVME_INTERFACE *fVMEInterface;
+#endif
+ 
+
+ private:
+  DRS(const DRS &c);              // Not implemented
+  DRS &operator=(const DRS &rhs); // Not implemented
+  
+
+#ifdef CT_VME 
+  int OpenVME();
+  int MasterMapVME(int* MMap);
+  int MasterUnMapVME(int MMap);
+  int CloseVME();
+  
+  int OpenCMEM();
+  int CloseCMEM();
+#endif
+
+  int First_VME_Slot; 
+  int Last_VME_Slot;  
+  
+ public:
+  // Public Methods
+  DRS();
+  ~DRS();
+  
+  DRSBoard        *GetBoard(int i) { return fBoard[i]; }
+  DRSBoard       **GetBoards() { return fBoard; }
+  int              GetNumberOfBoards() const { return fNumberOfBoards; }
+
+#ifdef STRUCK_VME
+   MVME_INTERFACE *GetVMEInterface() const { return fVMEInterface; };
+#endif
+
+  void             InitialScan();
+  void             SetFirstVMESlot(int s) { First_VME_Slot = s; }
+  void             SetLastVMESlot(int s) { Last_VME_Slot = s; }
+  int              GetFirstVMESlot() { return First_VME_Slot; }
+  int              GetLastVMESlot() { return Last_VME_Slot; }
+};
+
+#endif   // DRS_H
Index: /drsdaq/DRS/mxml.c
===================================================================
--- /drsdaq/DRS/mxml.c	(revision 22)
+++ /drsdaq/DRS/mxml.c	(revision 22)
@@ -0,0 +1,2301 @@
+/********************************************************************\
+
+   Name:         mxml.c
+   Created by:   Stefan Ritt
+
+   Contents:     Midas XML Library
+
+   This is a simple implementation of XML functions for writing and
+   reading XML files. For writing an XML file from scratch, following
+   functions can be used:
+
+   writer = mxml_open_file(file_name);
+     mxml_start_element(writer, name);
+     mxml_write_attribute(writer, name, value);
+     mxml_write_value(writer, value);
+     mxml_end_element(writer); 
+     ...
+   mxml_close_file(writer);
+
+   To read an XML file, the function
+
+   tree = mxml_parse_file(file_name, error, sizeof(error));
+
+   is used. It parses the complete XML file and stores it in a
+   hierarchical tree in memory. Nodes in that tree can be searched
+   for with
+
+   mxml_find_node(tree, xml_path);
+
+   or
+
+   mxml_find_nodes(tree, xml_path, &nodelist);
+
+   which support a subset of the XPath specification. Another set of
+   functions is availabe to retrieve attributes and values from nodes
+   in the tree and for manipulating nodes, like replacing, adding and
+   deleting nodes.
+
+   $Id: mxml.c 61 2007-10-22 13:39:10Z ritt@PSI.CH $
+
+\********************************************************************/
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#include <assert.h>
+
+#ifdef _MSC_VER
+
+#include <windows.h>
+#include <io.h>
+#include <time.h>
+
+#else
+
+#define TRUE 1
+#define FALSE 0
+
+#ifndef O_TEXT
+#define O_TEXT 0
+#define O_BINARY 0
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <errno.h>
+#ifndef OS_VXWORKS
+#include <sys/time.h>
+#endif
+#include <time.h>
+
+#endif
+
+#include "mxml.h"
+#include "strlcpy.h"
+
+#define XML_INDENT "  "
+
+#if defined(__GNUC__) && !defined(__MAKECINT__)
+#   define MXML_GNUC_PRINTF( format_idx, arg_idx )          \
+   __attribute__((format (printf, format_idx, arg_idx)))
+#   define MXML_GNUC_SCANF( format_idx, arg_idx )           \
+   __attribute__((format (scanf, format_idx, arg_idx)))
+#   define MXML_GNUC_FORMAT( arg_idx )                      \
+   __attribute__((format_arg (arg_idx)))
+#else
+#   define MXML_GNUC_PRINTF( format_idx, arg_idx )
+#   define MXML_GNUC_SCANF( format_idx, arg_idx )
+#   define MXML_GNUC_FORMAT( arg_idx )
+#endif
+
+static int mxml_suppress_date_flag = 0; /* suppress writing date at the top of file. */
+
+/* local prototypes */
+static PMXML_NODE read_error(PMXML_NODE root, const char *file_name, int line_number, char *error, int error_size,
+                             const char *format, ...) MXML_GNUC_PRINTF(6, 7);
+static void mxml_encode(char *src, int size, int translate);
+static void mxml_decode(char *str);
+static int mxml_write_subtree(MXML_WRITER *writer, PMXML_NODE tree, int indent);
+static int mxml_write_line(MXML_WRITER *writer, const char *line);
+static int mxml_start_element1(MXML_WRITER *writer, const char *name, int indent);
+static int mxml_add_resultnode(PMXML_NODE node, const char *xml_path, PMXML_NODE **nodelist, int *found);
+static int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found);
+
+/*------------------------------------------------------------------*/
+
+int mxml_write_line(MXML_WRITER *writer, const char *line)
+{
+   int len;
+   
+   len = strlen(line);
+
+   if (writer->buffer) {
+      if (writer->buffer_len + len >= writer->buffer_size) {
+         writer->buffer_size += 10000;
+         writer->buffer = (char *)realloc(writer->buffer, writer->buffer_size);
+      }
+      strcpy(writer->buffer + writer->buffer_len, line);
+      writer->buffer_len += len;
+      return len;
+   } else {
+      return write(writer->fh, line, len);
+   }
+
+   return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * open a memory buffer and write XML header
+ */
+MXML_WRITER *mxml_open_buffer(void)
+{
+   char str[256], line[1000];
+   time_t now;
+   MXML_WRITER *writer;
+
+   writer = (MXML_WRITER *)malloc(sizeof(MXML_WRITER));
+   memset(writer, 0, sizeof(MXML_WRITER));
+   writer->translate = 1;
+
+   writer->buffer_size = 10000;
+   writer->buffer = (char *)malloc(10000);
+   writer->buffer[0] = 0;
+   writer->buffer_len = 0;
+
+   /* write XML header */
+   strcpy(line, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
+   mxml_write_line(writer, line);
+   time(&now);
+   strcpy(str, ctime(&now));
+   str[24] = 0;
+   sprintf(line, "<!-- created by MXML on %s -->\n", str);
+   if (mxml_suppress_date_flag == 0)
+      mxml_write_line(writer, line);
+
+   /* initialize stack */
+   writer->level = 0;
+   writer->element_is_open = 0;
+
+   return writer;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * suppress writing date at the top of file.
+ */
+void mxml_suppress_date(int suppress)
+{
+   mxml_suppress_date_flag = suppress;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * open a file and write XML header
+ */
+MXML_WRITER *mxml_open_file(const char *file_name) 
+{
+   char str[256], line[1000];
+   time_t now;
+   MXML_WRITER *writer;
+
+   writer = (MXML_WRITER *)malloc(sizeof(MXML_WRITER));
+   memset(writer, 0, sizeof(MXML_WRITER));
+   writer->translate = 1;
+
+   writer->fh = open(file_name, O_RDWR | O_CREAT | O_TRUNC | O_TEXT, 0644);
+
+   if (writer->fh == -1) {
+      sprintf(line, "Unable to open file \"%s\": ", file_name);
+      perror(line);
+      free(writer);
+      return NULL;
+   }
+
+   /* write XML header */
+   strcpy(line, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
+   mxml_write_line(writer, line);
+   time(&now);
+   strcpy(str, ctime(&now));
+   str[24] = 0;
+   sprintf(line, "<!-- created by MXML on %s -->\n", str);
+   if (mxml_suppress_date_flag == 0)
+      mxml_write_line(writer, line);
+
+   /* initialize stack */
+   writer->level = 0;
+   writer->element_is_open = 0;
+
+   return writer;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * convert '<' '>' '&' '"' ''' into &xx;
+ */
+void mxml_encode(char *src, int size, int translate)
+{
+   char *ps, *pd;
+   static char *buffer = NULL;
+   static int buffer_size = 1000;
+
+   assert(size);
+
+   if (buffer == NULL)
+      buffer = (char *) malloc(buffer_size);
+
+   if (size > buffer_size) {
+      buffer = (char *) realloc(buffer, size*2);
+      buffer_size = size;
+   }
+
+   ps = src;
+   pd = buffer;
+   for (ps = src ; *ps && (size_t)pd - (size_t)buffer < (size_t)(size-10) ; ps++) {
+
+     if (translate) { /* tranlate "<", ">", "&", """, "'" */
+         switch (*ps) {
+         case '<':
+            strcpy(pd, "&lt;");
+            pd += 4;
+            break;
+         case '>':
+            strcpy(pd, "&gt;");
+            pd += 4;
+            break;
+         case '&':
+            strcpy(pd, "&amp;");
+            pd += 5;
+            break;
+         case '\"':
+            strcpy(pd, "&quot;");
+            pd += 6;
+            break;
+         case '\'':
+            strcpy(pd, "&apos;");
+            pd += 6;
+            break;
+         default:
+            *pd++ = *ps;
+         }
+      } else {
+       switch (*ps) { /* translate only illegal XML characters "<" and "&" */
+         case '<':
+            strcpy(pd, "&lt;");
+            pd += 4;
+            break;
+         case '&':
+            strcpy(pd, "&amp;");
+            pd += 5;
+            break;
+         default:
+            *pd++ = *ps;
+         }
+      }
+   }
+   *pd = 0;
+
+   strlcpy(src, buffer, size);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * reverse of mxml_encode, strip leading or trailing '"'
+ */
+void mxml_decode(char *str)
+{
+   char *p;
+
+   p = str;
+   while ((p = strchr(p, '&')) != NULL) {
+      if (strncmp(p, "&lt;", 4) == 0) {
+         *(p++) = '<';
+         memmove(p, p+3, strlen(p+3) + 1);
+      }
+      else if (strncmp(p, "&gt;", 4) == 0) {
+         *(p++) = '>';
+         memmove(p, p+3, strlen(p+3) + 1);
+      }
+      else if (strncmp(p, "&amp;", 5) == 0) {
+         *(p++) = '&';
+         memmove(p, p+4, strlen(p+4) + 1);
+      }
+      else if (strncmp(p, "&quot;", 6) == 0) {
+         *(p++) = '\"';
+         memmove(p, p+5, strlen(p+5) + 1);
+      }
+      else if (strncmp(p, "&apos;", 6) == 0) {
+         *(p++) = '\'';
+         memmove(p, p+5, strlen(p+5) + 1);
+      }
+      else {
+         p++; // skip unknown entity
+      }
+   }
+/*   if (str[0] == '\"' && str[strlen(str)-1] == '\"') {
+      memmove(str, str+1, strlen(str+1) + 1);
+      str[strlen(str)-1] = 0;
+   }*/
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * set translation of <,>,",',&, on/off in writer
+ */
+int mxml_set_translate(MXML_WRITER *writer, int flag)
+{
+   int old_flag;
+
+   old_flag = writer->translate;
+   writer->translate = flag;
+   return old_flag;
+}
+/*------------------------------------------------------------------*/
+
+/**
+ * start a new XML element, must be followed by mxml_end_elemnt
+ */
+int mxml_start_element1(MXML_WRITER *writer, const char *name, int indent)
+{
+   int i;
+   char line[1000], name_enc[1000];
+
+   if (writer->element_is_open) {
+      mxml_write_line(writer, ">\n");
+      writer->element_is_open = FALSE;
+   }
+
+   line[0] = 0;
+   if (indent)
+      for (i=0 ; i<writer->level ; i++)
+         strlcat(line, XML_INDENT, sizeof(line));
+   strlcat(line, "<", sizeof(line));
+   strlcpy(name_enc, name, sizeof(name_enc));
+   mxml_encode(name_enc, sizeof(name_enc), writer->translate);
+   strlcat(line, name_enc, sizeof(line));
+
+   /* put element on stack */
+   if (writer->level == 0)
+      writer->stack = (char **)malloc(sizeof(char *));
+   else
+      writer->stack = (char **)realloc(writer->stack, sizeof(char *)*(writer->level+1));
+   
+   writer->stack[writer->level] = (char *) malloc(strlen(name_enc)+1);
+   strcpy(writer->stack[writer->level], name_enc);
+   writer->level++;
+   writer->element_is_open = TRUE;
+   writer->data_was_written = FALSE;
+
+   return mxml_write_line(writer, line) == (int)strlen(line);
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_start_element(MXML_WRITER *writer, const char *name)
+{
+   return mxml_start_element1(writer, name, TRUE);
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_start_element_noindent(MXML_WRITER *writer, const char *name)
+{
+   return mxml_start_element1(writer, name, FALSE);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * close an open XML element
+ */
+int mxml_end_element(MXML_WRITER *writer)
+{
+   int i;
+   char line[1000];
+
+   if (writer->level == 0)
+      return 0;
+   
+   writer->level--;
+
+   if (writer->element_is_open) {
+      writer->element_is_open = FALSE;
+      free(writer->stack[writer->level]);
+      if (writer->level == 0)
+         free(writer->stack);
+      strcpy(line, "/>\n");
+      return mxml_write_line(writer, line) == (int)strlen(line);
+   }
+
+   line[0] = 0;
+   if (!writer->data_was_written) {
+      for (i=0 ; i<writer->level ; i++)
+         strlcat(line, XML_INDENT, sizeof(line));
+   }
+
+   strlcat(line, "</", sizeof(line));
+   strlcat(line, writer->stack[writer->level], sizeof(line));
+   free(writer->stack[writer->level]);
+   if (writer->level == 0)
+      free(writer->stack);
+   strlcat(line, ">\n", sizeof(line));
+   writer->data_was_written = FALSE;
+
+   return mxml_write_line(writer, line) == (int)strlen(line);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write an attribute to the currently open XML element
+ */
+int mxml_write_attribute(MXML_WRITER *writer, const char *name, const char *value)
+{
+   char name_enc[4096], val_enc[4096], line[8192];
+
+   if (!writer->element_is_open)
+      return FALSE;
+
+   strcpy(name_enc, name);
+   mxml_encode(name_enc, sizeof(name_enc), writer->translate);
+   strcpy(val_enc, value);
+   mxml_encode(val_enc, sizeof(val_enc), writer->translate);
+
+   sprintf(line, " %s=\"%s\"", name_enc, val_enc);
+
+   return mxml_write_line(writer, line) == (int)strlen(line);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write value of an XML element, like <[name]>[value]</[name]>
+ */
+int mxml_write_value(MXML_WRITER *writer, const char *data)
+{
+   static char *data_enc;
+   static int data_size = 0;
+
+   if (!writer->element_is_open)
+      return FALSE;
+
+   if (mxml_write_line(writer, ">") != 1)
+      return FALSE;
+   writer->element_is_open = FALSE;
+   writer->data_was_written = TRUE;
+
+   if (data_size == 0) {
+      data_enc = (char *)malloc(1000);
+      data_size = 1000;
+   } else if ((int)strlen(data)*2+1000 > data_size) {
+      data_size = 1000+strlen(data)*2;
+      data_enc = (char *)realloc(data_enc, data_size);
+   }
+
+   strcpy(data_enc, data);
+   mxml_encode(data_enc, data_size, writer->translate);
+   return mxml_write_line(writer, data_enc) == (int)strlen(data_enc);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write empty line
+ */
+int mxml_write_empty_line(MXML_WRITER *writer)
+{
+   if (writer->element_is_open) {
+      mxml_write_line(writer, ">\n");
+      writer->element_is_open = FALSE;
+   }
+
+   if (mxml_write_line(writer, "\n") != 1)
+      return FALSE;
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write a comment to an XML file, enclosed in "<!--" and "-->"
+ */
+int mxml_write_comment(MXML_WRITER *writer, const char *string)
+{
+   int  i;
+   char line[1000];
+
+   if (writer->element_is_open) {
+      mxml_write_line(writer, ">\n");
+      writer->element_is_open = FALSE;
+   }
+
+   line[0] = 0;
+   for (i=0 ; i<writer->level ; i++)
+      strlcat(line, XML_INDENT, sizeof(line));
+
+   strlcat(line, "<!-- ", sizeof(line));
+   strlcat(line, string, sizeof(line));
+   strlcat(line, " -->\n", sizeof(line));
+   if (mxml_write_line(writer, line) != (int)strlen(line))
+      return FALSE;
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * shortcut to write an element with a value but without attribute
+ */
+int mxml_write_element(MXML_WRITER *writer, const char *name, const char *value)
+{
+   int i;
+
+   i = mxml_start_element(writer, name);
+   i += mxml_write_value(writer, value);
+   i += mxml_end_element(writer);
+   return i;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * close a file opened with mxml_open_writer
+ */
+char *mxml_close_buffer(MXML_WRITER *writer)
+{
+   int i;
+   char *p;
+
+   if (writer->element_is_open) {
+      writer->element_is_open = FALSE;
+      if (mxml_write_line(writer, ">\n") != 2)
+         return NULL;
+   }
+
+   /* close remaining open levels */
+   for (i = 0 ; i<writer->level ; i++)
+      mxml_end_element(writer);
+
+   p = writer->buffer;
+   free(writer);
+   return p;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * close a file opened with mxml_open_writer
+ */
+int mxml_close_file(MXML_WRITER *writer)
+{
+   int i;
+
+   if (writer->element_is_open) {
+      writer->element_is_open = FALSE;
+      if (mxml_write_line(writer, ">\n") != 2)
+         return 0;
+   }
+
+   /* close remaining open levels */
+   for (i = 0 ; i<writer->level ; i++)
+      mxml_end_element(writer);
+
+   close(writer->fh);
+   free(writer);
+   return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * create root node of an XML tree
+ */
+PMXML_NODE mxml_create_root_node(void)
+{
+   PMXML_NODE root;
+
+   root = (PMXML_NODE)calloc(sizeof(MXML_NODE), 1);
+   strcpy(root->name, "root");
+   root->node_type = DOCUMENT_NODE;
+
+   return root;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add a subnode (child) to an existing parent node as a specific position
+ */
+PMXML_NODE mxml_add_special_node_at(PMXML_NODE parent, int node_type, const char *node_name, const char *value, int idx)
+{
+   PMXML_NODE pnode, pchild;
+   int i, j;
+
+   assert(parent);
+   if (parent->n_children == 0)
+      parent->child = (PMXML_NODE)malloc(sizeof(MXML_NODE));
+   else {
+      pchild = parent->child;
+      parent->child = (PMXML_NODE)realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1));
+
+   }
+   assert(parent->child);
+
+   /* move following nodes one down */
+   if (idx < parent->n_children) 
+      for (i=parent->n_children ; i > idx ; i--)
+         memcpy(&parent->child[i], &parent->child[i-1], sizeof(MXML_NODE));
+
+   /* correct parent pointer for children */
+   for (i=0 ; i<parent->n_children ; i++) {
+      pchild = parent->child+i;
+      for (j=0 ; j<pchild->n_children ; j++)
+         pchild->child[j].parent = pchild;
+   }
+
+   /* initialize new node */
+   pnode = &parent->child[idx];
+   memset(pnode, 0, sizeof(MXML_NODE));
+   strlcpy(pnode->name, node_name, sizeof(pnode->name));
+   pnode->node_type = node_type;
+   pnode->parent = parent;
+   
+   parent->n_children++;
+
+   if (value && *value) {
+      pnode->value = (char *)malloc(strlen(value)+1);
+      assert(pnode->value);
+      strcpy(pnode->value, value);
+   }
+
+   return pnode;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add a subnode (child) to an existing parent node at the end
+ */
+PMXML_NODE mxml_add_special_node(PMXML_NODE parent, int node_type, const char *node_name, const char *value)
+{
+   return mxml_add_special_node_at(parent, node_type, node_name, value, parent->n_children);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write value of an XML element, like <[name]>[value]</[name]>
+ */
+PMXML_NODE mxml_add_node(PMXML_NODE parent, const char *node_name, const char *value)
+{
+   return mxml_add_special_node_at(parent, ELEMENT_NODE, node_name, value, parent->n_children);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add a subnode (child) to an existing parent node at the end
+ */
+PMXML_NODE mxml_add_node_at(PMXML_NODE parent, const char *node_name, const char *value, int idx)
+{
+   return mxml_add_special_node_at(parent, ELEMENT_NODE, node_name, value, idx);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add a whole node tree to an existing parent node at a specific position
+ */
+int mxml_add_tree_at(PMXML_NODE parent, PMXML_NODE tree, int idx)
+{
+   PMXML_NODE pchild;
+   int i, j, k;
+
+   assert(parent);
+   assert(tree);
+   if (parent->n_children == 0)
+      parent->child = (PMXML_NODE)malloc(sizeof(MXML_NODE));
+   else {
+      pchild = parent->child;
+      parent->child = (PMXML_NODE)realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1));
+
+      if (parent->child != pchild) {
+         /* correct parent pointer for children */
+         for (i=0 ; i<parent->n_children ; i++) {
+            pchild = parent->child+i;
+            for (j=0 ; j<pchild->n_children ; j++)
+               pchild->child[j].parent = pchild;
+         }
+      }
+   }
+   assert(parent->child);
+
+   if (idx < parent->n_children) 
+      for (i=parent->n_children ; i > idx ; i--) {
+         /* move following nodes one down */
+         memcpy(&parent->child[i], &parent->child[i-1], sizeof(MXML_NODE));
+
+         /* correct parent pointer for children */
+         for (j=0 ; j<parent->n_children ; j++) {
+            pchild = parent->child+j;
+            for (k=0 ; k<pchild->n_children ; k++)
+               pchild->child[k].parent = pchild;
+         }
+      }
+
+   /* initialize new node */
+   memcpy(parent->child+idx, tree, sizeof(MXML_NODE));
+   parent->n_children++;
+   parent->child[idx].parent = parent;
+
+   /* correct parent pointer for children */
+   for (i=0 ; i<parent->n_children ; i++) {
+      pchild = parent->child+i;
+      for (j=0 ; j<pchild->n_children ; j++)
+         pchild->child[j].parent = pchild;
+   }
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add a whole node tree to an existing parent node at the end
+ */
+int mxml_add_tree(PMXML_NODE parent, PMXML_NODE tree)
+{
+   return mxml_add_tree_at(parent, tree, parent->n_children);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * add an attribute to an existing node
+ */
+int mxml_add_attribute(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value)
+{
+   if (pnode->n_attributes == 0) {
+      pnode->attribute_name  = (char*)malloc(MXML_NAME_LENGTH);
+      pnode->attribute_value = (char**)malloc(sizeof(char *));
+   } else {
+      pnode->attribute_name  = (char*)realloc(pnode->attribute_name,  MXML_NAME_LENGTH*(pnode->n_attributes+1));
+      pnode->attribute_value = (char**)realloc(pnode->attribute_value, sizeof(char *)*(pnode->n_attributes+1));
+   }
+
+   strlcpy(pnode->attribute_name+pnode->n_attributes*MXML_NAME_LENGTH, attrib_name, MXML_NAME_LENGTH);
+   pnode->attribute_value[pnode->n_attributes] = (char *)malloc(strlen(attrib_value)+1);
+   strcpy(pnode->attribute_value[pnode->n_attributes], attrib_value);
+   pnode->n_attributes++;
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * return number of subnodes (children) of a node
+ */
+int mxml_get_number_of_children(PMXML_NODE pnode)
+{
+   assert(pnode);
+   return pnode->n_children;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * return number of subnodes (children) of a node
+ */
+PMXML_NODE mxml_subnode(PMXML_NODE pnode, int idx)
+{
+   assert(pnode);
+   if (idx < pnode->n_children)
+      return &pnode->child[idx];
+   return NULL;
+}
+
+/*------------------------------------------------------------------*/
+
+
+int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found);
+
+int mxml_add_resultnode(PMXML_NODE node, const char *xml_path, PMXML_NODE **nodelist, int *found)
+{
+   /* if at end of path, add this node */
+   if (*xml_path == 0) {
+      if (*found == 0)
+         *nodelist = (PMXML_NODE *)malloc(sizeof(PMXML_NODE));
+      else
+         *nodelist = (PMXML_NODE *)realloc(*nodelist, sizeof(PMXML_NODE)*(*found + 1));
+
+      (*nodelist)[*found] = node;
+      (*found)++;
+   } else {
+      /* if not at end of path, branch into subtree */
+      return mxml_find_nodes1(node, xml_path+1, nodelist, found);
+   }
+
+   return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+   Return list of XML nodes with a subset of XPATH specifications.
+   Following elemets are possible
+
+   /<node>/<node>/..../<node>          Find a node in the tree hierarchy
+   /<node>[idx]                        Find child #[idx] of node (index starts from 1)
+   /<node>[idx]/<node>                 Find subnode of the above
+   /<node>[<subnode>=<value>]          Find a node which has a specific subnode
+   /<node>[<subnode>=<value>]/<node>   Find subnode of the above
+   /<node>[@<attrib>=<value>]/<node>   Find a node which has a specific attribute
+*/
+int mxml_find_nodes1(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist, int *found)
+{
+   PMXML_NODE pnode;
+   const char *p1,*p2;
+   char *p3, node_name[256], condition[256];
+   char cond_name[MXML_MAX_CONDITION][256], cond_value[MXML_MAX_CONDITION][256];
+   int  cond_type[MXML_MAX_CONDITION];
+   int i, j, k, idx, num_cond;
+   int cond_satisfied,cond_index;
+   size_t len;
+
+   p1 = xml_path;
+   pnode = tree;
+
+   /* skip leading '/' */
+   if (*p1 && *p1 == '/')
+      p1++;
+
+   do {
+      p2 = p1;
+      while (*p2 && *p2 != '/' && *p2 != '[')
+         p2++;
+      len = (size_t)p2 - (size_t)p1;
+      if (len >= sizeof(node_name))
+         return 0;
+
+      memcpy(node_name, p1, len);
+      node_name[len] = 0;
+      idx = 0;
+      num_cond = 0;
+      while (*p2 == '[') {
+         cond_name[num_cond][0] = cond_value[num_cond][0] = cond_type[num_cond] = 0;
+         p2++;
+         if (isdigit(*p2)) {
+            /* evaluate [idx] */
+            idx = atoi(p2);
+            p2 = strchr(p2, ']');
+            if (p2 == NULL)
+               return 0;
+            p2++;
+         } else {
+            /* evaluate [<@attrib>/<subnode>=<value>] */
+            while (*p2 && isspace((unsigned char)*p2))
+               p2++;
+            strlcpy(condition, p2, sizeof(condition));
+            if (strchr(condition, ']'))
+               *strchr(condition, ']') = 0;
+            else
+               return 0;
+            p2 = strchr(p2, ']')+1;
+            if ((p3 = strchr(condition, '=')) != NULL) {
+               if (condition[0] == '@') {
+                  cond_type[num_cond] = 1;
+                  strlcpy(cond_name[num_cond], &condition[1], sizeof(cond_name[num_cond]));
+               } else {
+                  strlcpy(cond_name[num_cond], condition, sizeof(cond_name[num_cond]));
+               }
+
+               *strchr(cond_name[num_cond], '=') = 0;
+               while (cond_name[num_cond][0] && isspace(cond_name[num_cond][strlen(cond_name[num_cond])-1]))
+                  cond_name[num_cond][strlen(cond_name[num_cond])-1] = 0;
+
+               p3++;
+               while (*p3 && isspace(*p3))
+                  p3++;
+               if (*p3 == '\"') {
+                  strlcpy(cond_value[num_cond], p3+1, sizeof(cond_value[num_cond]));
+                  while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1]))
+                     cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0;
+                  if (cond_value[num_cond][0] && cond_value[num_cond][strlen(cond_value[num_cond])-1] == '\"')
+                     cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0;
+               } else if (*p3 == '\'') {
+                  strlcpy(cond_value[num_cond], p3+1, sizeof(cond_value[num_cond]));
+                  while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1]))
+                     cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0;
+                  if (cond_value[num_cond][0] && cond_value[num_cond][strlen(cond_value[num_cond])-1] == '\'')
+                     cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0;
+               } else {
+                  strlcpy(cond_value[num_cond], p3, sizeof(cond_value[num_cond]));
+                  while (cond_value[num_cond][0] && isspace(cond_value[num_cond][strlen(cond_value[num_cond])-1]))
+                     cond_value[num_cond][strlen(cond_value[num_cond])-1] = 0;
+               }
+               num_cond++;
+            }
+         }
+      }
+
+      cond_index = 0;
+      for (i=j=0 ; i<pnode->n_children ; i++) {
+         if (num_cond) {
+            cond_satisfied = 0;
+            for (k=0;k<num_cond;k++) {
+               if (cond_type[k]) {
+                  /* search node with attribute */
+                  if (strcmp(pnode->child[i].name, node_name) == 0)
+                     if (mxml_get_attribute(pnode->child+i, cond_name[k]) &&
+                        strcmp(mxml_get_attribute(pnode->child+i, cond_name[k]), cond_value[k]) == 0)
+                        cond_satisfied++;
+               }
+               else {
+                  /* search subnode */
+                  for (j=0 ; j<pnode->child[i].n_children ; j++)
+                     if (strcmp(pnode->child[i].child[j].name, cond_name[k]) == 0)
+                        if (strcmp(pnode->child[i].child[j].value, cond_value[k]) == 0)
+                           cond_satisfied++;
+               }
+            }
+            if (cond_satisfied==num_cond) {
+               cond_index++;
+               if (idx == 0 || cond_index == idx) {
+                  if (!mxml_add_resultnode(pnode->child+i, p2, nodelist, found))
+                     return 0;
+               }
+            }
+         } else {
+            if (strcmp(pnode->child[i].name, node_name) == 0)
+               if (idx == 0 || ++j == idx)
+                  if (!mxml_add_resultnode(pnode->child+i, p2, nodelist, found))
+                     return 0;
+         }
+      }
+
+      if (i == pnode->n_children)
+         return 1;
+
+      pnode = &pnode->child[i];
+      p1 = p2;
+      if (*p1 == '/')
+         p1++;
+
+   } while (*p2);
+
+   return 1;
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_find_nodes(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist)
+{
+   int status, found = 0;
+   
+   status = mxml_find_nodes1(tree, xml_path, nodelist, &found);
+
+   if (status == 0)
+      return -1;
+
+   return found;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ *  Search for a specific XML node with a subset of XPATH specifications.
+ *  Return first found node. For syntax see mxml_find_nodes()
+ */
+PMXML_NODE mxml_find_node(PMXML_NODE tree, const char *xml_path)
+{
+   PMXML_NODE *node, pnode;
+   int n;
+
+   n = mxml_find_nodes(tree, xml_path, &node);
+   if (n > 0) {
+      pnode = node[0];
+      free(node);
+   } else 
+      pnode = NULL;
+
+   return pnode;
+}
+
+/*------------------------------------------------------------------*/
+
+char *mxml_get_name(PMXML_NODE pnode)
+{
+   assert(pnode);
+   return pnode->name;
+}
+
+/*------------------------------------------------------------------*/
+
+char *mxml_get_value(PMXML_NODE pnode)
+{
+   assert(pnode);
+   return pnode->value;
+}
+
+/*------------------------------------------------------------------*/
+
+char *mxml_get_attribute(PMXML_NODE pnode, const char *name)
+{
+   int i;
+
+   assert(pnode);
+   for (i=0 ; i<pnode->n_attributes ; i++) 
+      if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, name) == 0)
+         return pnode->attribute_value[i];
+
+   return NULL;
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_replace_node_name(PMXML_NODE pnode, const char *name)
+{
+   strlcpy(pnode->name, name, sizeof(pnode->name));
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_replace_node_value(PMXML_NODE pnode, const char *value)
+{
+   if (pnode->value)
+      pnode->value = (char *)realloc(pnode->value, strlen(value)+1);
+   else if (value)
+      pnode->value = (char *)malloc(strlen(value)+1);
+   else
+      pnode->value = NULL;
+   
+   if (value)
+      strcpy(pnode->value, value);
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+   replace value os a subnode, like
+
+   <parent>
+     <child>value</child>
+   </parent>
+
+   if pnode=parent, and "name"="child", then "value" gets replaced
+*/
+int mxml_replace_subvalue(PMXML_NODE pnode, const char *name, const char *value)
+{
+   int i;
+
+   for (i=0 ; i<pnode->n_children ; i++) 
+      if (strcmp(pnode->child[i].name, name) == 0)
+         break;
+
+   if (i == pnode->n_children)
+      return FALSE;
+
+   return mxml_replace_node_value(&pnode->child[i], value);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * change the name of an attribute, keep its value
+ */
+int mxml_replace_attribute_name(PMXML_NODE pnode, const char *old_name, const char *new_name)
+{
+   int i;
+
+   for (i=0 ; i<pnode->n_attributes ; i++) 
+      if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, old_name) == 0)
+         break;
+
+   if (i == pnode->n_attributes)
+      return FALSE;
+
+   strlcpy(pnode->attribute_name+i*MXML_NAME_LENGTH, new_name, MXML_NAME_LENGTH);
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * change the value of an attribute
+ */
+int mxml_replace_attribute_value(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value)
+{
+   int i;
+
+   for (i=0 ; i<pnode->n_attributes ; i++) 
+      if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, attrib_name) == 0)
+         break;
+
+   if (i == pnode->n_attributes)
+      return FALSE;
+
+   pnode->attribute_value[i] = (char *)realloc(pnode->attribute_value[i], strlen(attrib_value)+1);
+   strcpy(pnode->attribute_value[i], attrib_value);
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * free memory of a node and remove it from the parent's child list
+ */
+int mxml_delete_node(PMXML_NODE pnode)
+{
+   PMXML_NODE parent;
+   int i, j;
+
+   /* remove node from parent's list */
+   parent = pnode->parent;
+
+   if (parent) {
+      for (i=0 ; i<parent->n_children ; i++)
+         if (&parent->child[i] == pnode)
+            break;
+
+      /* free allocated node memory recursively */
+      mxml_free_tree(pnode);
+
+      if (i < parent->n_children) {
+         for (j=i ; j<parent->n_children-1 ; j++)
+            memcpy(&parent->child[j], &parent->child[j+1], sizeof(MXML_NODE));
+         parent->n_children--;
+         if (parent->n_children)
+            parent->child = (PMXML_NODE)realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children));
+         else
+            free(parent->child);
+      }
+   } else 
+      mxml_free_tree(pnode);
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+int mxml_delete_attribute(PMXML_NODE pnode, const char *attrib_name)
+{
+   int i, j;
+
+   for (i=0 ; i<pnode->n_attributes ; i++) 
+      if (strcmp(pnode->attribute_name+i*MXML_NAME_LENGTH, attrib_name) == 0)
+         break;
+
+   if (i == pnode->n_attributes)
+      return FALSE;
+
+   free(pnode->attribute_value[i]);
+   for (j=i ; j<pnode->n_attributes-1 ; j++) {
+      strcpy(pnode->attribute_name+j*MXML_NAME_LENGTH, pnode->attribute_name+(j+1)*MXML_NAME_LENGTH);
+      pnode->attribute_value[j] = pnode->attribute_value[j+1];
+   }
+
+   if (pnode->n_attributes > 0) {
+      pnode->attribute_name  = (char *)realloc(pnode->attribute_name,  MXML_NAME_LENGTH*(pnode->n_attributes-1));
+      pnode->attribute_value = (char **)realloc(pnode->attribute_value, sizeof(char *)*(pnode->n_attributes-1));
+   } else {
+      free(pnode->attribute_name);
+      free(pnode->attribute_value);
+   }
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+#define HERE root, file_name, line_number, error, error_size
+
+/**
+ * used inside mxml_parse_file for reporting errors
+ */
+PMXML_NODE read_error(PMXML_NODE root, const char *file_name, int line_number, char *error, int error_size, const char *format, ...)
+{
+   char *msg, str[1000];
+   va_list argptr;
+
+   if (file_name && file_name[0])
+      sprintf(str, "XML read error in file \"%s\", line %d: ", file_name, line_number);
+   else
+      sprintf(str, "XML read error, line %d: ", line_number);
+   msg = (char *)malloc(error_size);
+   strlcpy(error, str, error_size);
+
+   va_start(argptr, format);
+   vsprintf(str, (char *) format, argptr);
+   va_end(argptr);
+
+   strlcat(error, str, error_size);
+   free(msg);
+   mxml_free_tree(root);
+
+   return NULL;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * Parse a XML buffer and convert it into a tree of MXML_NODE's.
+ * Return NULL in case of an error, return error description.
+ * Optional file_name is used for error reporting if called from mxml_parse_file()
+ */
+PMXML_NODE mxml_parse_buffer(const char *buf, char *error, int error_size)
+{
+   char node_name[256], attrib_name[256], attrib_value[1000], quote;
+   const char *p, *pv;
+   int i,j, line_number;
+   PMXML_NODE root, ptree, pnew;
+   int end_element;
+   size_t len;
+   char *file_name = NULL; /* dummy for 'HERE' */
+
+   p = buf;
+   line_number = 1;
+
+   root = mxml_create_root_node();
+   ptree = root;
+
+   /* parse file contents */
+   do {
+      if (*p == '<') {
+
+         end_element = FALSE;
+
+         /* found new element */
+         p++;
+         while (*p && isspace(*p)) {
+            if (*p == '\n')
+               line_number++;
+            p++;
+         }
+         if (!*p)
+            return read_error(HERE, "Unexpected end of file");
+
+         if (strncmp(p, "!--", 3) == 0) {
+            
+            /* found comment */
+
+            pnew = mxml_add_special_node(ptree, COMMENT_NODE, "Comment", NULL);
+            pv = p+3;
+            while (*pv == ' ')
+               pv++;
+
+            p += 3;
+            if (strstr(p, "-->") == NULL)
+               return read_error(HERE, "Unterminated comment");
+            
+            while (strncmp(p, "-->", 3) != 0) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+
+            len = (size_t)p - (size_t)pv;
+            pnew->value = (char *)malloc(len+1);
+            memcpy(pnew->value, pv, len);
+            pnew->value[len] = 0;
+            mxml_decode(pnew->value);
+
+            p += 3;
+
+         } else if (*p == '?') {
+
+            /* found ?...? element */
+            pnew = mxml_add_special_node(ptree, PROCESSING_INSTRUCTION_NODE, "PI", NULL);
+            pv = p+1;
+
+            p++;
+            if (strstr(p, "?>") == NULL)
+               return read_error(HERE, "Unterminated ?...? element");
+            
+            while (strncmp(p, "?>", 2) != 0) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+
+            len = (size_t)p - (size_t)pv;
+            pnew->value = (char *)malloc(len+1);
+            memcpy(pnew->value, pv, len);
+            pnew->value[len] = 0;
+            mxml_decode(pnew->value);
+
+            p += 2;
+
+         } else if (strncmp(p, "!DOCTYPE", 8) == 0 ) {
+
+            /* found !DOCTYPE element , skip it */
+            p += 8;
+            if (strstr(p, ">") == NULL)
+               return read_error(HERE, "Unterminated !DOCTYPE element");
+
+            j = 0;
+            while (*p && (*p != '>' || j > 0)) {
+               if (*p == '\n')
+                  line_number++;
+               else if (*p == '<')
+                  j++;
+               else if (*p == '>')
+                  j--;
+               p++;
+            }
+            if (!*p)
+               return read_error(HERE, "Unexpected end of file");
+
+            p++;
+
+         } else {
+            
+            /* found normal element */
+            if (*p == '/') {
+               end_element = TRUE;
+               p++;
+               while (*p && isspace((unsigned char)*p)) {
+                  if (*p == '\n')
+                     line_number++;
+                  p++;
+               }
+               if (!*p)
+                  return read_error(HERE, "Unexpected end of file");
+            }
+
+            /* extract node name */
+            i = 0;
+            node_name[i] = 0;
+            while (*p && !isspace((unsigned char)*p) && *p != '/' && *p != '>' && *p != '<')
+               node_name[i++] = *p++;
+            node_name[i] = 0;
+            if (!*p)
+               return read_error(HERE, "Unexpected end of file");
+            if (*p == '<')
+               return read_error(HERE, "Unexpected \'<\' inside element \"%s\"", node_name);
+
+            mxml_decode(node_name);
+
+            if (end_element) {
+
+               if (!ptree)
+                  return read_error(HERE, "Found unexpected </%s>", node_name);
+
+               /* close previously opened element */
+               if (strcmp(ptree->name, node_name) != 0)
+                  return read_error(HERE, "Found </%s>, expected </%s>", node_name, ptree->name);
+            
+               /* go up one level on the tree */
+               ptree = ptree->parent;
+
+            } else {
+            
+               if (ptree == NULL)
+                  return read_error(HERE, "Unexpected second top level node");
+
+               /* allocate new element structure in parent tree */
+               pnew = mxml_add_node(ptree, node_name, NULL);
+
+               while (*p && isspace((unsigned char)*p)) {
+                  if (*p == '\n')
+                     line_number++;
+                  p++;
+               }
+               if (!*p)
+                  return read_error(HERE, "Unexpected end of file");
+
+               while (*p != '>' && *p != '/') {
+
+                  /* found attribute */
+                  pv = p;
+                  while (*pv && !isspace((unsigned char)*pv) && *pv != '=' && *pv != '<' && *pv != '>')
+                     pv++;
+                  if (!*pv)
+                     return read_error(HERE, "Unexpected end of file");
+                  if (*pv == '<' || *pv == '>')
+                     return read_error(HERE, "Unexpected \'%c\' inside element \"%s\"", *pv, node_name);
+
+                  /* extract attribute name */
+                  len = (size_t)pv - (size_t)p;
+                  if (len > sizeof(attrib_name)-1)
+                     len = sizeof(attrib_name)-1;
+                  memcpy(attrib_name, p, len);
+                  attrib_name[len] = 0;
+                  mxml_decode(attrib_name);
+
+                  p = pv;
+                  while (*p && isspace((unsigned char)*p)) {
+                     if (*p == '\n')
+                        line_number++;
+                     p++;
+                  }
+                  if (!*p)
+                     return read_error(HERE, "Unexpected end of file");
+                  if (*p != '=')
+                     return read_error(HERE, "Expect \"=\" here");
+
+                  p++;
+                  while (*p && isspace((unsigned char)*p)) {
+                     if (*p == '\n')
+                        line_number++;
+                     p++;
+                  }
+                  if (!*p)
+                     return read_error(HERE, "Unexpected end of file");
+                  if (*p != '\"' && *p != '\'')
+                     return read_error(HERE, "Expect \" or \' here");
+                  quote = *p;
+                  p++;
+
+                  /* extract attribute value */
+                  pv = p;
+                  while (*pv && *pv != quote)
+                     pv++;
+                  if (!*pv)
+                     return read_error(HERE, "Unexpected end of file");
+
+                  len = (size_t)pv - (size_t)p;
+                  if (len > sizeof(attrib_value)-1)
+                     len = sizeof(attrib_value)-1;
+                  memcpy(attrib_value, p, len);
+                  attrib_value[len] = 0;
+                  mxml_decode(attrib_value);
+
+                  /* add attribute to current node */
+                  mxml_add_attribute(pnew, attrib_name, attrib_value);
+
+                  p = pv+1;
+                  while (*p && isspace((unsigned char)*p)) {
+                     if (*p == '\n')
+                        line_number++;
+                     p++;
+                  }
+                  if (!*p)
+                     return read_error(HERE, "Unexpected end of file");
+               }
+
+               if (*p == '/') {
+
+                  /* found empty node, like <node/>, just skip closing bracket */
+                  p++;
+
+                  while (*p && isspace((unsigned char)*p)) {
+                     if (*p == '\n')
+                        line_number++;
+                     p++;
+                  }
+                  if (!*p)
+                     return read_error(HERE, "Unexpected end of file");
+                  if (*p != '>')
+                     return read_error(HERE, "Expected \">\" after \"/\"");
+                  p++;
+               }
+
+               if (*p == '>') {
+
+                  p++;
+
+                  /* check if we have sub-element or value */
+                  pv = p;
+                  while (*pv && isspace((unsigned char)*pv)) {
+                     if (*pv == '\n')
+                        line_number++;
+                     pv++;
+                  }
+                  if (!*pv)
+                     return read_error(HERE, "Unexpected end of file");
+
+                  if (*pv == '<' && *(pv+1) != '/') {
+
+                     /* start new subtree */
+                     ptree = pnew;
+                     p = pv;
+
+                  } else {
+
+                     /* extract value */
+                     while (*pv && *pv != '<') {
+                        if (*pv == '\n')
+                           line_number++;
+                        pv++;
+                     }
+                     if (!*pv)
+                        return read_error(HERE, "Unexpected end of file");
+
+                     len = (size_t)pv - (size_t)p;
+                     pnew->value = (char *)malloc(len+1);
+                     memcpy(pnew->value, p, len);
+                     pnew->value[len] = 0;
+                     mxml_decode(pnew->value);
+                     p = pv;
+
+                     ptree = pnew;
+                  }
+               }
+            }
+         }
+      }
+
+      /* go to next element */
+      while (*p && *p != '<') {
+         if (*p == '\n')
+            line_number++;
+         p++;
+      }
+   } while (*p);
+
+   return root;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * parse !ENTYTY entries of XML files and replace with references.
+ * Return 0 in case of no errors, return error description.
+ * Optional file_name is used for error reporting if called from mxml_parse_file()
+ */
+int mxml_parse_entity(char **buf, const char *file_name, char *error, int error_size)
+{
+   char *p;
+   char *pv;
+   char delimiter;
+   int i, j, k, line_number;
+   char *replacement;
+   char entity_name[MXML_MAX_ENTITY][256];
+   char entity_reference_name[MXML_MAX_ENTITY][256];
+   char *entity_value[MXML_MAX_ENTITY];
+   int entity_type[MXML_MAX_ENTITY];    /* internal or external */
+   int nentity;
+   int fh, length, len;
+   char *buffer;
+   PMXML_NODE root = mxml_create_root_node();   /* dummy for 'HERE' */
+   int ip;                      /* counter for entity value */
+   char directoryname[FILENAME_MAX];
+   char filename[FILENAME_MAX];
+   int entity_value_length[MXML_MAX_ENTITY];
+   int entity_name_length[MXML_MAX_ENTITY];
+
+   for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+      entity_value[ip] = NULL;
+
+   line_number = 1;
+   nentity = -1;
+
+   if (!buf || !(*buf) || !strlen(*buf))
+      return 0;
+
+   strcpy(directoryname, file_name);
+   mxml_dirname(directoryname);
+
+   /* copy string to temporary space */
+   buffer = (char *) malloc(strlen(*buf) + 1);
+   if (buffer == NULL) {
+      read_error(HERE, "Cannot allocate memory.");
+      free(buffer);
+      for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+         free(entity_value[ip]);
+      return 1;
+   }
+   strcpy(buffer, *buf);
+
+   p = strstr(buffer, "!DOCTYPE");
+   if (p == NULL) {             /* no entities */
+      mxml_free_tree(root);
+      free(buffer);
+      for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+         free(entity_value[ip]);
+      return 0;
+   }
+
+   pv = strstr(p, "[");
+   if (pv == NULL) {            /* no entities */
+      mxml_free_tree(root);
+      free(buffer);
+      for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+         free(entity_value[ip]);
+      return 0;
+   }
+
+   p = pv + 1;
+
+   /* search !ENTITY */
+   do {
+      if (*p == ']')
+         break;
+
+      if (*p == '<') {
+
+         /* found new entity */
+         p++;
+         while (*p && isspace((unsigned char)*p)) {
+            if (*p == '\n')
+               line_number++;
+            p++;
+         }
+         if (!*p) {
+            read_error(HERE, "Unexpected end of file");
+            free(buffer);
+            for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+               free(entity_value[ip]);
+            return 1;
+         }
+
+         if (strncmp(p, "!--", 3) == 0) {
+            /* found comment */
+            p += 3;
+            if (strstr(p, "-->") == NULL) {
+               read_error(HERE, "Unterminated comment");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            while (strncmp(p, "-->", 3) != 0) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+            p += 3;
+         }
+
+         else if (strncmp(p, "!ENTITY", 7) == 0) {
+            /* found entity */
+            nentity++;
+            if (nentity >= MXML_MAX_ENTITY) {
+               read_error(HERE, "Too much entities");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            pv = p + 7;
+            while (*pv == ' ')
+               pv++;
+
+            /* extract entity name */
+            p = pv;
+
+            while (*p && isspace((unsigned char)*p) && *p != '<' && *p != '>') {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*p == '<' || *p == '>') {
+               read_error(HERE, "Unexpected \'%c\' inside !ENTITY", *p);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            pv = p;
+            while (*pv && !isspace((unsigned char)*pv) && *pv != '<' && *pv != '>')
+               pv++;
+
+            if (!*pv) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*pv == '<' || *pv == '>') {
+               read_error(HERE, "Unexpected \'%c\' inside entity \"%s\"", *pv, &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            len = (size_t) pv - (size_t) p;
+
+            entity_name[nentity][0] = '&';
+            i = 1;
+            entity_name[nentity][i] = 0;
+            while (*p && !isspace((unsigned char)*p) && *p != '/' && *p != '>' && *p != '<' && i < 253)
+               entity_name[nentity][i++] = *p++;
+            entity_name[nentity][i++] = ';';
+            entity_name[nentity][i] = 0;
+
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*p == '<') {
+               read_error(HERE, "Unexpected \'<\' inside entity \"%s\"", &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            /* extract replacement or SYSTEM */
+            while (*p && isspace((unsigned char)*p)) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*p == '>') {
+               read_error(HERE, "Unexpected \'>\' inside entity \"%s\"", &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            /* check if SYSTEM */
+            if (strncmp(p, "SYSTEM", 6) == 0) {
+               entity_type[nentity] = EXTERNAL_ENTITY;
+               p += 6;
+            } else {
+               entity_type[nentity] = INTERNAL_ENTITY;
+            }
+
+            /* extract replacement */
+            while (*p && isspace((unsigned char)*p)) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*p == '>') {
+               read_error(HERE, "Unexpected \'>\' inside entity \"%s\"", &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            if (*p != '\"' && *p != '\'') {
+               read_error(HERE, "Replacement was not found for entity \"%s\"", &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            delimiter = *p;
+            p++;
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            pv = p;
+            while (*pv && *pv != delimiter)
+               pv++;
+
+            if (!*pv) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            if (*pv == '<') {
+               read_error(HERE, "Unexpected \'%c\' inside entity \"%s\"", *pv, &entity_name[nentity][1]);
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            len = (size_t) pv - (size_t) p;
+            replacement = (char *) malloc(len + 1);
+            if (replacement == NULL) {
+               read_error(HERE, "Cannot allocate memory.");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+
+            memcpy(replacement, p, len);
+            replacement[len] = 0;
+            mxml_decode(replacement);
+
+            if (entity_type[nentity] == EXTERNAL_ENTITY) {
+               strcpy(entity_reference_name[nentity], replacement);
+            } else {
+               entity_value[nentity] = (char *) malloc(strlen(replacement));
+               if (entity_value[nentity] == NULL) {
+                  read_error(HERE, "Cannot allocate memory.");
+                  free(buffer);
+                  for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                     free(entity_value[ip]);
+                  return 1;
+               }
+               strcpy(entity_value[nentity], replacement);
+            }
+            free(replacement);
+
+            p = pv;
+            while (*p && isspace((unsigned char)*p)) {
+               if (*p == '\n')
+                  line_number++;
+               p++;
+            }
+            if (!*p) {
+               read_error(HERE, "Unexpected end of file");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+         }
+      }
+
+      /* go to next element */
+      while (*p && *p != '<') {
+         if (*p == '\n')
+            line_number++;
+         p++;
+      }
+   } while (*p);
+   nentity++;
+
+   /* read external file */
+   for (i = 0; i < nentity; i++) {
+      if (entity_type[i] == EXTERNAL_ENTITY) {
+         if ( entity_reference_name[i][0] == DIR_SEPARATOR ) /* absolute path */
+            strcpy(filename, entity_reference_name[i]);
+         else /* relative path */
+            sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
+         fh = open(filename, O_RDONLY | O_TEXT, 0644);
+
+         if (fh == -1) {
+            entity_value[i] =
+                (char *) malloc(strlen(entity_reference_name[i]) + strlen("<!--  is missing -->") + 1);
+            if (entity_value[i] == NULL) {
+               read_error(HERE, "Cannot allocate memory.");
+               free(buffer);
+               for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                  free(entity_value[ip]);
+               return 1;
+            }
+            sprintf(entity_value[i], "<!-- %s is missing -->", entity_reference_name[i]);
+         } else {
+            length = lseek(fh, 0, SEEK_END);
+            lseek(fh, 0, SEEK_SET);
+            if (length == 0) {
+               entity_value[i] = (char *) malloc(1);
+               if (entity_value[i] == NULL) {
+                  read_error(HERE, "Cannot allocate memory.");
+                  free(buffer);
+                  for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                     free(entity_value[ip]);
+                  return 1;
+               }
+               entity_value[i][0] = 0;
+            } else {
+               entity_value[i] = (char *) malloc(length);
+               if (entity_value[i] == NULL) {
+                  read_error(HERE, "Cannot allocate memory.");
+                  free(buffer);
+                  for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                     free(entity_value[ip]);
+                  return 1;
+               }
+
+               /* read complete file at once */
+               length = read(fh, entity_value[i], length);
+               entity_value[i][length - 1] = 0;
+               close(fh);
+
+               /* recursive parse */
+               if (mxml_parse_entity(&entity_value[i], filename, error, error_size) != 0) {
+                  mxml_free_tree(root);
+                  free(buffer);
+                  for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+                     free(entity_value[ip]);
+                  return 1;
+               }
+            }
+         }
+      }
+   }
+
+   /* count length of output string */
+   length = strlen(buffer);
+   for (i = 0; i < nentity; i++) {
+      p = buffer;
+      entity_value_length[i] = strlen(entity_value[i]);
+      entity_name_length[i] = strlen(entity_name[i]);
+      while (1) {
+         pv = strstr(p, entity_name[i]);
+         if (pv) {
+            length += entity_value_length[i] - entity_name_length[i];
+            p = pv + 1;
+         } else {
+            break;
+         }
+      }
+   }
+
+   /* re-allocate memory */
+   free(*buf);
+   *buf = (char *) malloc(length + 1);
+   if (*buf == NULL) {
+      read_error(HERE, "Cannot allocate memory.");
+      free(buffer);
+      for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+         free(entity_value[ip]);
+      return 1;
+   }
+
+   /* replace entities */
+   p = buffer;
+   pv = *buf;
+   do {
+      if (*p == '&') {
+         /* found entity */
+         for (j = 0; j < nentity; j++) {
+            if (strncmp(p, entity_name[j], entity_name_length[j]) == 0) {
+               for (k = 0; k < (int) entity_value_length[j]; k++)
+                  *pv++ = entity_value[j][k];
+               p += entity_name_length[j];
+               break;
+            }
+         }
+      }
+      *pv++ = *p++;
+   } while (*p);
+   *pv = 0;
+
+   free(buffer);
+   for (ip = 0; ip < MXML_MAX_ENTITY; ip++)
+      free(entity_value[ip]);
+
+   mxml_free_tree(root);
+   return 0;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * parse a XML file and convert it into a tree of MXML_NODE's.
+ * Return NULL in case of an error, return error description
+ */
+PMXML_NODE mxml_parse_file(const char *file_name, char *error, int error_size)
+{
+   char *buf, line[1000];
+   int fh, length;
+   PMXML_NODE root;
+
+   if (error)
+      error[0] = 0;
+
+   fh = open(file_name, O_RDONLY | O_TEXT, 0644);
+
+   if (fh == -1) {
+      sprintf(line, "Unable to open file \"%s\": ", file_name);
+      strlcat(line, strerror(errno), sizeof(line));
+      strlcpy(error, line, error_size);
+      return NULL;
+   }
+
+   length = lseek(fh, 0, SEEK_END);
+   lseek(fh, 0, SEEK_SET);
+   buf = (char *)malloc(length+1);
+   if (buf == NULL) {
+      close(fh);
+      sprintf(line, "Cannot allocate buffer: ");
+      strlcat(line, strerror(errno), sizeof(line));
+      strlcpy(error, line, error_size);
+      return NULL;
+   }
+
+   /* read complete file at once */
+   length = read(fh, buf, length);
+   buf[length] = 0;
+   close(fh);
+
+   if (mxml_parse_entity(&buf, file_name, error, error_size) != 0) {
+      free(buf);
+      return NULL;
+   }
+
+   root = mxml_parse_buffer(buf, error, error_size);
+
+   free(buf);
+
+   return root;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write complete subtree recursively into file opened with mxml_open_document()
+ */
+int mxml_write_subtree(MXML_WRITER *writer, PMXML_NODE tree, int indent)
+{
+   int i;
+
+   mxml_start_element1(writer, tree->name, indent);
+   for (i=0 ; i<tree->n_attributes ; i++)
+      if (!mxml_write_attribute(writer, tree->attribute_name+i*MXML_NAME_LENGTH, tree->attribute_value[i]))
+         return FALSE;
+   
+   if (tree->value)
+      if (!mxml_write_value(writer, tree->value))
+         return FALSE;
+
+   for (i=0 ; i<tree->n_children ; i++)
+      if (!mxml_write_subtree(writer, &tree->child[i], (tree->value == NULL) || i > 0))
+         return FALSE;
+
+   return mxml_end_element(writer);
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * write a complete XML tree to a file
+ */
+int mxml_write_tree(const char *file_name, PMXML_NODE tree)
+{
+   MXML_WRITER *writer;
+   int i;
+
+   assert(tree);
+   writer = mxml_open_file(file_name);
+   if (!writer)
+      return FALSE;
+
+   for (i=0 ; i<tree->n_children ; i++)
+     if (tree->child[i].node_type == ELEMENT_NODE) /* skip PI and comments */
+         if (!mxml_write_subtree(writer, &tree->child[i], TRUE))
+            return FALSE;
+
+   if (!mxml_close_file(writer))
+      return FALSE;
+
+   return TRUE;
+}
+
+/*------------------------------------------------------------------*/
+
+PMXML_NODE mxml_clone_tree(PMXML_NODE tree)
+{
+   PMXML_NODE clone;
+   int i;
+
+   clone = (PMXML_NODE)calloc(sizeof(MXML_NODE), 1);
+
+   /* copy name, node_type, n_attributes and n_children */
+   memcpy(clone, tree, sizeof(MXML_NODE));
+
+   clone->value = NULL;
+   mxml_replace_node_value(clone, tree->value);
+
+   clone->attribute_name = NULL;
+   clone->attribute_value = NULL;
+   for (i=0 ; i<tree->n_attributes ; i++)
+      mxml_add_attribute(clone, tree->attribute_name+i*MXML_NAME_LENGTH, tree->attribute_value[i]);
+
+   clone->child = NULL;
+   clone->n_children = 0;
+   for (i=0 ; i<tree->n_children ; i++)
+      mxml_add_tree(clone, mxml_clone_tree(mxml_subnode(tree, i)));
+
+   return clone;
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * print XML tree for debugging
+ */
+void mxml_debug_tree(PMXML_NODE tree, int level)
+{
+   int i, j;
+
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("Name: %s\n", tree->name);
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("Valu: %s\n", tree->value);
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("Type: %d\n", tree->node_type);
+
+   for (j=0 ; j<tree->n_attributes ; j++) {
+      for (i=0 ; i<level ; i++)
+         printf("  ");
+      printf("%s: %s\n", tree->attribute_name+j*MXML_NAME_LENGTH, 
+         tree->attribute_value[j]);
+   }
+
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("Addr: %08zX\n", (size_t)tree);
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("Prnt: %08zX\n", (size_t)tree->parent);
+   for (i=0 ; i<level ; i++)
+      printf("  ");
+   printf("NCld: %d\n", tree->n_children);
+
+   for (i=0 ; i<tree->n_children ; i++)
+      mxml_debug_tree(tree->child+i, level+1);
+
+   if (level == 0)
+      printf("\n");
+}
+
+/*------------------------------------------------------------------*/
+
+/**
+ * free memory of XML tree, must be called after any 
+ * mxml_create_root_node() or mxml_parse_file()
+ */
+void mxml_free_tree(PMXML_NODE tree)
+{
+   int i;
+
+   /* first free children recursively */
+   for (i=0 ; i<tree->n_children ; i++)
+      mxml_free_tree(&tree->child[i]);
+   if (tree->n_children)
+      free(tree->child);
+
+   /* now free dynamic data */
+   for (i=0 ; i<tree->n_attributes ; i++)
+      free(tree->attribute_value[i]);
+
+   if (tree->n_attributes) {
+      free(tree->attribute_name);
+      free(tree->attribute_value);
+   }
+   
+   if (tree->value)
+      free(tree->value);
+
+   /* if we are the root node, free it */
+   if (tree->parent == NULL)
+      free(tree);
+}
+
+/*------------------------------------------------------------------*/
+
+/*
+void mxml_test()
+{
+   char err[256];
+   PMXML_NODE tree, tree2, node;
+
+   tree = mxml_parse_file("c:\\tmp\\test.xml", err, sizeof(err));
+   tree2 = mxml_clone_tree(tree);
+
+   printf("Orig:\n");
+   mxml_debug_tree(tree, 0);
+
+   printf("\nClone:\n");
+   mxml_debug_tree(tree2, 0);
+
+   printf("\nCombined:\n");
+   node = mxml_find_node(tree2, "cddb"); 
+   mxml_add_tree(tree, node);
+   mxml_debug_tree(tree, 0);
+
+   mxml_free_tree(tree);
+}
+*/
+
+/*------------------------------------------------------------------*/
+ /**
+   mxml_basename deletes any prefix ending with the last slash '/' character
+   present in path. mxml_dirname deletes the filename portion, beginning with
+   the last slash '/' character to the end of path. Followings are examples
+   from these functions
+
+    path               dirname   basename
+    "/"                "/"       ""
+    "."                "."       "."
+    ""                 ""        ""
+    "/test.txt"        "/"       "test.txt"
+    "path/to/test.txt" "path/to" "test.txt"
+    "test.txt          "."       "test.txt"
+
+   Under Windows, '\\' and ':' are recognized ad separator too.
+ */
+
+void mxml_basename(char *path)
+{
+   char str[FILENAME_MAX];
+   char *p;
+   char *name;
+
+   if (path) {
+      strcpy(str, path);
+      p = str;
+      name = str;
+      while (1) {
+         if (*p == 0)
+            break;
+         if (*p == '/'
+#ifdef _MSC_VER
+             || *p == ':' || *p == '\\'
+#endif
+             )
+            name = p + 1;
+         p++;
+      }
+      strcpy(path, name);
+   }
+
+   return;
+}
+
+void mxml_dirname(char *path)
+{
+   char *p;
+#ifdef _MSC_VER
+   char *pv;
+#endif
+
+   if (!path || strlen(path) == 0)
+      return;
+
+   p = strrchr(path, '/');
+#ifdef _MSC_VER
+   pv = strrchr(path, ':');
+   if (pv > p)
+      p = pv;
+   pv = strrchr(path, '\\');
+   if (pv > p)
+      p = pv;
+#endif
+
+   if (p == 0)                  /* current directory */
+      strcpy(path, ".");
+   else if (p == path)          /* root directory */
+      sprintf(path, "%c", *p);
+   else
+      *p = 0;
+
+   return;
+}
+
+/*------------------------------------------------------------------*/
Index: /drsdaq/DRS/mxml.h
===================================================================
--- /drsdaq/DRS/mxml.h	(revision 22)
+++ /drsdaq/DRS/mxml.h	(revision 22)
@@ -0,0 +1,137 @@
+/********************************************************************\
+
+   Name:         mxml.h
+   Created by:   Stefan Ritt
+
+   Contents:     Header file for mxml.c
+
+   $Id: mxml.h 62 2007-10-23 17:53:45Z sawada $
+
+\********************************************************************/
+
+/*------------------------------------------------------------------*/
+
+#ifndef _MXML_H_
+#define _MXML_H_
+
+#define MXML_NAME_LENGTH 64
+
+#define ELEMENT_NODE                  1
+#define TEXT_NODE                     2
+#define PROCESSING_INSTRUCTION_NODE   3
+#define COMMENT_NODE                  4
+#define DOCUMENT_NODE                 5
+
+#define INTERNAL_ENTITY               0
+#define EXTERNAL_ENTITY               1
+#define MXML_MAX_ENTITY             500
+
+#define MXML_MAX_CONDITION           10
+
+#ifdef _MSC_VER
+#define DIR_SEPARATOR              '\\'
+#else
+#define DIR_SEPARATOR               '/'
+#endif
+
+typedef struct {
+   int  fh;
+   char *buffer;
+   int  buffer_size;
+   int  buffer_len;
+   int  level;
+   int  element_is_open;
+   int  data_was_written;
+   char **stack;
+   int  translate;
+} MXML_WRITER;
+
+typedef struct mxml_struct *PMXML_NODE;
+
+typedef struct mxml_struct {
+   char       name[MXML_NAME_LENGTH];  // name of element    <[name]>[value]</[name]>
+   int        node_type;               // type of node XXX_NODE
+   char       *value;                  // value of element
+   int        n_attributes;            // list of attributes
+   char       *attribute_name;
+   char       **attribute_value;
+   int        line_number;             // line number for source file
+   PMXML_NODE parent;                  // pointer to parent element
+   int        n_children;              // list of children
+   PMXML_NODE child;
+} MXML_NODE;
+
+/*------------------------------------------------------------------*/
+
+/* make functions callable from a C++ program */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef EXPRT
+#if defined(EXPORT_DLL)
+#define EXPRT __declspec(dllexport)
+#else
+#define EXPRT
+#endif
+#endif
+
+void mxml_suppress_date(int suppress);
+MXML_WRITER *mxml_open_file(const char *file_name);
+MXML_WRITER *mxml_open_buffer(void); 
+int mxml_set_translate(MXML_WRITER *writer, int flag);
+int mxml_start_element(MXML_WRITER *writer, const char *name);
+int mxml_start_element_noindent(MXML_WRITER *writer, const char *name);
+int mxml_end_element(MXML_WRITER *writer); 
+int mxml_write_comment(MXML_WRITER *writer, const char *string);
+int mxml_write_element(MXML_WRITER *writer, const char *name, const char *value);
+int mxml_write_attribute(MXML_WRITER *writer, const char *name, const char *value);
+int mxml_write_value(MXML_WRITER *writer, const char *value);
+int mxml_write_empty_line(MXML_WRITER *writer);
+char *mxml_close_buffer(MXML_WRITER *writer);
+int mxml_close_file(MXML_WRITER *writer);
+
+int mxml_get_number_of_children(PMXML_NODE pnode);
+PMXML_NODE mxml_subnode(PMXML_NODE pnode, int idx);
+PMXML_NODE mxml_find_node(PMXML_NODE tree, const char *xml_path);
+int mxml_find_nodes(PMXML_NODE tree, const char *xml_path, PMXML_NODE **nodelist);
+char *mxml_get_name(PMXML_NODE pnode);
+char *mxml_get_value(PMXML_NODE pnode);
+char *mxml_get_attribute(PMXML_NODE pnode, const char *name);
+
+int mxml_add_attribute(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value);
+PMXML_NODE mxml_add_special_node(PMXML_NODE parent, int node_type, const char *node_name, const char *value);
+PMXML_NODE mxml_add_special_node_at(PMXML_NODE parent, int node_type, const char *node_name, const char *value, int idx);
+PMXML_NODE mxml_add_node(PMXML_NODE parent, const char *node_name, const char *value);
+PMXML_NODE mxml_add_node_at(PMXML_NODE parent, const char *node_name, const char *value, int idx);
+
+PMXML_NODE mxml_clone_tree(PMXML_NODE tree);
+int mxml_add_tree(PMXML_NODE parent, PMXML_NODE tree);
+int mxml_add_tree_at(PMXML_NODE parent, PMXML_NODE tree, int idx);
+
+int mxml_replace_node_name(PMXML_NODE pnode, const char *new_name);
+int mxml_replace_node_value(PMXML_NODE pnode, const char *value);
+int mxml_replace_subvalue(PMXML_NODE pnode, const char *name, const char *value);
+int mxml_replace_attribute_name(PMXML_NODE pnode, const char *old_name, const char *new_name);
+int mxml_replace_attribute_value(PMXML_NODE pnode, const char *attrib_name, const char *attrib_value);
+
+int mxml_delete_node(PMXML_NODE pnode);
+int mxml_delete_attribute(PMXML_NODE, const char *attrib_name);
+
+PMXML_NODE mxml_create_root_node(void);
+PMXML_NODE mxml_parse_file(const char *file_name, char *error, int error_size);
+PMXML_NODE mxml_parse_buffer(const char *buffer, char *error, int error_size);
+int mxml_parse_entity(char **buf, const char* file_name, char *error, int error_size);
+int mxml_write_tree(const char *file_name, PMXML_NODE tree);
+void mxml_debug_tree(PMXML_NODE tree, int level);
+void mxml_free_tree(PMXML_NODE tree);
+
+void mxml_dirname(char* path);
+void mxml_basename(char *path);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _MXML_H_ */
+/*------------------------------------------------------------------*/
Index: /drsdaq/DRS/strlcpy.c
===================================================================
--- /drsdaq/DRS/strlcpy.c	(revision 22)
+++ /drsdaq/DRS/strlcpy.c	(revision 22)
@@ -0,0 +1,82 @@
+/********************************************************************\
+
+   Name:         strlcpy.c
+   Created by:   Stefan Ritt
+
+   Contents:     Contains strlcpy and strlcat which are versions of
+                 strcpy and strcat, but which avoid buffer overflows
+
+   $Id: strlcpy.c 16 2005-10-07 13:05:38Z ritt $
+
+\********************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include "strlcpy.h"
+
+/*
+* Copy src to string dst of size siz.  At most siz-1 characters
+* will be copied.  Always NUL terminates (unless size == 0).
+* Returns strlen(src); if retval >= siz, truncation occurred.
+*/
+size_t strlcpy(char *dst, const char *src, size_t size)
+{
+   char *d = dst;
+   const char *s = src;
+   size_t n = size;
+
+   /* Copy as many bytes as will fit */
+   if (n != 0 && --n != 0) {
+      do {
+         if ((*d++ = *s++) == 0)
+            break;
+      } while (--n != 0);
+   }
+
+   /* Not enough room in dst, add NUL and traverse rest of src */
+   if (n == 0) {
+      if (size != 0)
+         *d = '\0';             /* NUL-terminate dst */
+      while (*s++);
+   }
+
+   return (s - src - 1);        /* count does not include NUL */
+}
+
+/*-------------------------------------------------------------------*/
+
+/*
+* Appends src to string dst of size siz (unlike strncat, siz is the
+* full size of dst, not space left).  At most siz-1 characters
+* will be copied.  Always NUL terminates (unless size <= strlen(dst)).
+* Returns strlen(src) + MIN(size, strlen(initial dst)).
+* If retval >= size, truncation occurred.
+*/
+size_t strlcat(char *dst, const char *src, size_t size)
+{
+   char *d = dst;
+   const char *s = src;
+   size_t n = size;
+   size_t dlen;
+
+   /* Find the end of dst and adjust bytes left but don't go past end */
+   while (n-- != 0 && *d != '\0')
+      d++;
+   dlen = d - dst;
+   n = size - dlen;
+
+   if (n == 0)
+      return (dlen + strlen(s));
+   while (*s != '\0') {
+      if (n != 1) {
+         *d++ = *s;
+         n--;
+      }
+      s++;
+   }
+   *d = '\0';
+
+   return (dlen + (s - src));   /* count does not include NUL */
+}
+
+/*-------------------------------------------------------------------*/
Index: /drsdaq/DRS/strlcpy.h
===================================================================
--- /drsdaq/DRS/strlcpy.h	(revision 22)
+++ /drsdaq/DRS/strlcpy.h	(revision 22)
@@ -0,0 +1,34 @@
+/********************************************************************\
+
+   Name:         strlcpy.h
+   Created by:   Stefan Ritt
+
+   Contents:     Header file for strlcpy.c
+
+   $Id: strlcpy.h 62 2007-10-23 17:53:45Z sawada $
+
+\********************************************************************/
+
+#ifndef _STRLCPY_H_
+#define _STRLCPY_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef EXPRT
+#if defined(EXPORT_DLL)
+#define EXPRT __declspec(dllexport)
+#else
+#define EXPRT
+#endif
+#endif
+
+size_t EXPRT strlcpy(char *dst, const char *src, size_t size);
+size_t EXPRT strlcat(char *dst, const char *src, size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_STRLCPY_H_ */
Index: /drsdaq/DRSDAQ.log
===================================================================
--- /drsdaq/DRSDAQ.log	(revision 22)
+++ /drsdaq/DRSDAQ.log	(revision 22)
@@ -0,0 +1,2382 @@
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: -1074501552Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2	LedTrigChip: 0	LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: ../config/HVFeedback.confInit. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2	LedTrigChip: 0	LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: ../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2	LedTrigChip: 0	LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2	LedTrigChip: 0	LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0	LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(25/03/09 10:12:41)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:14:20)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:14:50)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:16:28)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:22:17)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(25/03/09 10:23:18)> ls
+Unknown command: ls
+CONSOLE(25/03/09 10:23:21)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:24:13)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(25/03/09 10:24:15)> 
+CONSOLE(25/03/09 10:24:25)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:24:49)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(25/03/09 10:24:50)> 
+CONSOLE(25/03/09 10:24:52)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:25:28)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(25/03/09 10:25:31)> 
+CONSOLE(25/03/09 10:25:33)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:26:06)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:42:02)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:42:36)> uptime
+0:00:06
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:43:37)> uptime
+0:00:05
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(25/03/09 10:50:52)> uptime
+0:00:04
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(26/03/09 09:23:50)> help
+CONSOLE(26/03/09 09:23:55)> fconfig
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+CONSOLE(26/03/09 09:23:58)> help
+CONSOLE(26/03/09 09:24:11)> fresponse 5 10
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(26/03/09 09:24:55)> 
+CONSOLE(26/03/09 09:24:56)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(26/03/09 09:49:44)> fresponse 5 10
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(26/03/09 09:49:53)> 
+CONSOLE(26/03/09 09:49:53)> 
+CONSOLE(26/03/09 09:50:18)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(26/03/09 10:31:19)> fresponse 5 10
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(26/03/09 10:31:25)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(26/03/09 10:31:44)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(26/03/09 10:49:32)> fresponse 5 10
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(26/03/09 11:02:43)> make
+Unknown command: make
+CONSOLE(26/03/09 11:02:46)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 11:27:50)> fresponse 5 10
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 11:35:44)> q
+Unknown command: q
+CONSOLE(27/03/09 11:35:45)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(27/03/09 12:10:58)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 15:51:39)> fresponse 5 10
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage 5.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 15:52:44)> fmode 0
+Usage: fmode [off|active|targ]
+CONSOLE(27/03/09 15:53:01)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:15:29)> fresponse 10 12
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage 10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 16:15:52)> status
+********** DAQ STATUS **********
+ DAQ: stopped
+ Run number: -1
+ Run type: d
+ Event: 0
+ Requested events per run: 100
+ Storage directory: /ct3data
+ Disk space: 211036 MByte
+ Socket state: disconnected
+ Total number of CMC boards: 4
+ Active CMC boards: 4
+ Frequency of board 0 set: no
+ Frequency of board 1 set: no
+ Frequency of board 2 set: no
+ Frequency of board 3 set: no
+
+********** DRS STATUS **********
+ Mezz. board index:    0
+ Slot:                 3 upper
+ Chip version:         DRS2
+ Board version:        3
+ Serial number:        122
+ Firmware revision:    5268
+ Temperature:          28.8 C
+ Status reg.:          0X00000000
+ Control reg.:         0X00020000
+   DMODE circular
+ Trigger bus:          0X00000000
+ Domino wave stopped
+ Mezz. board index:    1
+ Slot:                 3 lower
+ Chip version:         DRS2
+ Board version:        3
+ Serial number:        123
+ Firmware revision:    5268
+ Temperature:          30.5 C
+ Status reg.:          0X00000000
+ Control reg.:         0X00020000
+   DMODE circular
+ Trigger bus:          0X00000000
+ Domino wave stopped
+ Mezz. board index:    2
+ Slot:                 4 upper
+ Chip version:         DRS2
+ Board version:        3
+ Serial number:        306
+ Firmware revision:    5268
+ Temperature:          28.2 C
+ Status reg.:          0X00000000
+ Control reg.:         0X00020000
+   DMODE circular
+ Trigger bus:          0X00000000
+ Domino wave stopped
+ Mezz. board index:    3
+ Slot:                 4 lower
+ Chip version:         DRS2
+ Board version:        3
+ Serial number:        130
+ Firmware revision:    5268
+ Temperature:          28.6 C
+ Status reg.:          0X00000000
+ Control reg.:         0X00020000
+   DMODE circular
+ Trigger bus:          0X00000000
+ Domino wave stopped
+CONSOLE(27/03/09 16:17:07)> 
+CONSOLE(27/03/09 16:17:09)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:28:12)> fresponse 10 20
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Error: Could not write (entire) command to HV socket (Broken pipe)
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage 10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 16:29:36)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:34:47)> fresponse 10 20
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 16:41:34)> 
+CONSOLE(27/03/09 16:41:56)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:42:35)> fresponse 10 20
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 16:43:27)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:46:20)> fresponse 10 20
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 16:47:03)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 16:52:48)> fresponse 10 20
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 17:02:02)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 2		LedTrigChip: 0		LedTrigChannel: 1
+LedTrigSample: 400	LedTrigThreshold: 40.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 17:02:34)> fres 10 20
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  10.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 17:04:23)> fmode
+Feedback measuring response with first voltage.
+CONSOLE(27/03/09 17:04:28)> fmode off
+CONSOLE(27/03/09 17:04:30)> fmode
+Feedback off.
+CONSOLE(27/03/09 17:05:08)> frespon 50 60
+Could not find pixel ID of board 2, chip 0, channel 4
+Could not find pixel ID of board 2, chip 0, channel 5
+Could not find pixel ID of board 2, chip 0, channel 6
+Could not find pixel ID of board 2, chip 0, channel 7
+Could not find pixel ID of board 2, chip 1, channel 0
+Could not find pixel ID of board 2, chip 1, channel 1
+Could not find pixel ID of board 2, chip 1, channel 2
+Could not find pixel ID of board 2, chip 1, channel 3
+Could not find pixel ID of board 2, chip 1, channel 4
+Could not find pixel ID of board 2, chip 1, channel 5
+Could not find pixel ID of board 2, chip 1, channel 6
+Could not find pixel ID of board 2, chip 1, channel 7
+Could not find pixel ID of board 3, chip 0, channel 0
+Could not find pixel ID of board 3, chip 0, channel 1
+Could not find pixel ID of board 3, chip 0, channel 2
+Could not find pixel ID of board 3, chip 0, channel 3
+Could not find pixel ID of board 3, chip 0, channel 4
+Could not find pixel ID of board 3, chip 0, channel 5
+Could not find pixel ID of board 3, chip 0, channel 6
+Could not find pixel ID of board 3, chip 0, channel 7
+Could not find pixel ID of board 3, chip 1, channel 0
+Could not find pixel ID of board 3, chip 1, channel 1
+Could not find pixel ID of board 3, chip 1, channel 2
+Could not find pixel ID of board 3, chip 1, channel 3
+Could not find pixel ID of board 3, chip 1, channel 4
+Could not find pixel ID of board 3, chip 1, channel 5
+Could not find pixel ID of board 3, chip 1, channel 6
+Could not find pixel ID of board 3, chip 1, channel 7
+HV Feedback: Setting first voltage  50.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 17:44:32)> fmode off
+Connected to client at 127.0.0.1 (localhost).
+CONSOLE(27/03/09 17:45:14)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 1.000 GHz
+Domino wave of board 1 is running at 1.000 GHz
+Domino wave of board 2 is running at 1.000 GHz
+Domino wave of board 3 is running at 0.999 GHz
+CONSOLE(27/03/09 17:45:17)> trig 1
+Usage: trigger <on|off>
+CONSOLE(27/03/09 17:45:22)> trig on
+Hardware trigger of board 0 enabled
+Hardware trigger of board 1 enabled
+Hardware trigger of board 2 enabled
+Hardware trigger of board 3 enabled
+CONSOLE(27/03/09 17:45:26)> b 0
+SOCKET(27/03/09 17:45:31)> stop
+Nothing to stop
+SOCKET(27/03/09 17:45:31)> read 0 0 0
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 206.0 67.0 60.0 64.0 65.0 58.0 50.0 54.0 53.0 55.0 50.0 51.0 47.0 50.0 54.0 60.0 52.0 54.0 49.0 46.0 45.0 60.0 44.0 61.0 59.0 66.0 49.0 46.0 43.0 39.0 37.0 42.0 44.0 52.0 53.0 58.0 52.0 41.0 47.0 60.0 44.0 59.0 55.0 46.0 53.0 61.0 58.0 47.0 47.0 41.0 40.0 48.0 52.0 42.0 40.0 52.0 52.0 55.0 60.0 60.0 56.0 51.0 46.0 48.0 58.0 47.0 53.0 48.0 44.0 51.0 53.0 59.0 49.0 44.0 52.0 42.0 49.0 47.0 53.0 48.0 43.0 50.0 50.0 42.0 55.0 51.0 52.0 55.0 51.0 59.0 49.0 48.0 41.0 49.0 53.0 57.0 61.0 50.0 44.0 44.0 57.0 58.0 54.0 45.0 55.0 49.0 55.0 56.0 50.0 49.0 46.0 54.0 61.0 54.0 64.0 54.0 48.0 47.0 39.0 56.0 64.0 54.0 53.0 55.0 35.0 50.0 49.0 49.0 49.0 46.0 58.0 44.0 58.0 60.0 60.0 43.0 54.0 52.0 43.0 51.0 49.0 46.0 47.0 49.0 50.0 52.0 48.0 44.0 46.0 58.0 64.0 57.0 51.0 45.0 42.0 42.0 47.0 56.0 55.0 52.0 53.0 58.0 52.0 46.0 54.0 48.0 62.0 59.0 58.0 56.0 51.0 42.0 66.0 59.0 58.0 66.0 49.0 38.0 37.0 48.0 49.0 52.0 58.0 55.0 50.0 54.0 57.0 46.0 46.0 43.0 49.0 54.0 51.0 50.0 56.0 47.0 52.0 48.0 57.0 55.0 57.0 47.0 46.0 49.0 56.0 51.0 57.0 44.0 45.0 51.0 50.0 45.0 62.0 57.0 58.0 58.0 51.0 56.0 50.0 51.0 48.0 44.0 65.0 61.0 45.0 51.0 46.0 63.0 46.0 52.0 52.0 51.0 53.0 54.0 51.0 61.0 55.0 40.0 40.0 34.0 54.0 49.0 50.0 53.0 49.0 56.0 58.0 41.0 47.0 51.0 38.0 55.0 57.0 51.0 60.0 48.0 69.0 63.0 53.0 51.0 63.0 54.0 53.0 69.0 78.0 52.0 51.0 56.0 52.0 49.0 56.0 52.0 56.0 58.0 64.0 59.0 60.0 52.0 51.0 43.0 64.0 62.0 57.0 58.0 57.0 52.0 50.0 57.0 58.0 59.0 68.0 63.0 62.0 56.0 55.0 42.0 56.0 54.0 52.0 64.0 66.0 52.0 50.0 53.0 55.0 54.0 63.0 56.0 48.0 44.0 63.0 57.0 57.0 53.0 50.0 64.0 56.0 56.0 58.0 59.0 57.0 62.0 70.0 54.0 64.0 54.0 66.0 55.0 56.0 58.0 64.0 52.0 51.0 56.0 49.0 60.0 54.0 56.0 52.0 40.0 50.0 44.0 50.0 64.0 65.0 57.0 44.0 63.0 54.0 45.0 55.0 54.0 47.0 67.0 60.0 57.0 55.0 61.0 47.0 60.0 51.0 40.0 49.0 50.0 41.0 45.0 60.0 60.0 58.0 61.0 66.0 58.0 71.0 51.0 49.0 57.0 59.0 58.0 54.0 53.0 62.0 54.0 50.0 64.0 52.0 49.0 63.0 55.0 57.0 52.0 62.0 47.0 64.0 46.0 51.0 50.0 63.0 75.0 56.0 54.0 45.0 45.0 62.0 57.0 63.0 61.0 64.0 65.0 62.0 65.0 61.0 61.0 45.0 55.0 64.0 69.0 64.0 53.0 50.0 53.0 52.0 61.0 57.0 62.0 59.0 66.0 63.0 63.0 49.0 53.0 61.0 52.0 56.0 58.0 56.0 54.0 40.0 53.0 52.0 55.0 63.0 50.0 55.0 53.0 61.0 61.0 50.0 56.0 55.0 45.0 66.0 55.0 41.0 55.0 63.0 53.0 58.0 51.0 51.0 58.0 57.0 61.0 58.0 47.0 49.0 41.0 44.0 57.0 53.0 61.0 59.0 51.0 47.0 56.0 44.0 51.0 66.0 63.0 49.0 52.0 51.0 67.0 49.0 45.0 52.0 48.0 56.0 61.0 61.0 56.0 53.0 58.0 60.0 65.0 55.0 61.0 53.0 50.0 52.0 54.0 47.0 58.0 54.0 59.0 61.0 55.0 54.0 57.0 65.0 51.0 54.0 68.0 59.0 50.0 51.0 49.0 52.0 62.0 57.0 54.0 61.0 61.0 56.0 62.0 62.0 55.0 45.0 40.0 44.0 45.0 49.0 68.0 62.0 54.0 44.0 50.0 54.0 56.0 54.0 60.0 61.0 61.0 59.0 48.0 53.0 53.0 56.0 49.0 52.0 58.0 50.0 53.0 40.0 56.0 50.0 50.0 54.0 54.0 51.0 45.0 49.0 53.0 60.0 35.0 55.0 59.0 55.0 60.0 51.0 52.0 45.0 42.0 48.0 63.0 52.0 55.0 51.0 53.0 53.0 58.0 59.0 49.0 41.0 56.0 56.0 68.0 59.0 50.0 53.0 55.0 49.0 49.0 54.0 51.0 59.0 61.0 50.0 55.0 58.0 48.0 51.0 57.0 64.0 54.0 57.0 59.0 54.0 50.0 53.0 53.0 57.0 48.0 51.0 54.0 60.0 55.0 44.0 55.0 56.0 54.0 55.0 60.0 47.0 46.0 48.0 51.0 58.0 66.0 62.0 50.0 39.0 49.0 56.0 54.0 56.0 69.0 54.0 59.0 49.0 60.0 50.0 51.0 49.0 40.0 54.0 58.0 47.0 65.0 61.0 59.0 57.0 51.0 43.0 50.0 50.0 61.0 62.0 54.0 49.0 46.0 36.0 45.0 43.0 49.0 59.0 64.0 57.0 49.0 54.0 49.0 51.0 54.0 56.0 55.0 53.0 52.0 39.0 49.0 54.0 48.0 46.0 55.0 61.0 44.0 54.0 60.0 51.0 48.0 64.0 52.0 44.0 54.0 51.0 51.0 59.0 45.0 64.0 70.0 66.0 63.0 48.0 52.0 57.0 53.0 58.0 61.0 51.0 55.0 55.0 55.0 65.0 49.0 48.0 48.0 47.0 46.0 66.0 60.0 52.0 60.0 56.0 43.0 57.0 58.0 50.0 49.0 43.0 56.0 43.0 70.0 45.0 53.0 54.0 47.0 54.0 53.0 53.0 43.0 48.0 41.0 53.0 53.0 56.0 44.0 53.0 54.0 55.0 54.0 54.0 43.0 57.0 55.0 53.0 53.0 51.0 45.0 49.0 46.0 57.0 67.0 63.0 47.0 51.0 52.0 43.0 53.0 52.0 44.0 43.0 44.0 54.0 56.0 68.0 60.0 45.0 44.0 62.0 46.0 46.0 53.0 60.0 51.0 52.0 56.0 47.0 53.0 50.0 53.0 52.0 49.0 60.0 49.0 52.0 55.0 55.0 54.0 61.0 47.0 48.0 42.0 39.0 40.0 43.0 57.0 55.0 53.0 54.0 48.0 55.0 63.0 43.0 47.0 55.0 54.0 60.0 57.0 57.0 46.0 48.0 43.0 59.0 46.0 53.0 46.0 50.0 56.0 57.0 47.0 50.0 51.0 48.0 55.0 66.0 54.0 54.0 52.0 57.0 57.0 53.0 47.0 46.0 53.0 45.0 50.0 57.0 53.0 47.0 46.0 49.0 46.0 61.0 59.0 49.0 46.0 45.0 49.0 54.0 64.0 49.0 39.0 56.0 48.0 55.0 46.0 53.0 43.0 47.0 59.0 64.0 46.0 53.0 57.0 52.0 42.0 44.0 50.0 60.0 54.0 56.0 42.0 53.0 53.0 58.0 50.0 54.0 46.0 66.0 48.0 53.0 55.0 41.0 47.0 52.0 49.0 51.0 53.0 56.0 45.0 49.0 45.0 56.0 63.0 53.0 40.0 37.0 36.0 51.0 52.0 44.0 61.0 67.0 58.0 54.0 67.0 62.0 56.0 72.0 71.0 59.0 60.0 64.0 58.0 60.0 53.0 69.0 58.0 46.0 41.0 23.0 24.0 48.0 75.0 119.0 143.0 134.0 96.0 67.0 35.0 42.0 63.0 73.0 73.0 52.0 45.0 46.0 77.0 69.0 68.0 63.0 48.0 68.0 63.0 67.0 55.0 63.0 52.0 60.0 58.0 64.0 69.0 59.0 82.0 75.0 80.0 74.0 66.0 73.0 56.0 60.0 54.0 57.0 56.0 74.0 53.0 49.0 43.0 41.0 34.0 53.0 45.0 42.0 59.0 41.0 60.0 45.0 56.0 45.0 47.0 54.0 55.0 52.0 38.0 39.0 44.0 40.0 50.0 48.0 51.0 62.0 56.0 51.0 50.0 53.0 37.0 44.0 52.0 45.0 61.0 61.0 82.0 79.0 81.0 70.0 54.0 12.0 22.0 61.0 131.0 171.0 160.0 183.0 146.0 204.0 161.0 ==END==
+SOCKET(27/03/09 17:45:35)> stop
+Nothing to stop
+SOCKET(27/03/09 17:45:35)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 206.0 67.0 60.0 64.0 65.0 58.0 50.0 54.0 53.0 55.0 50.0 51.0 47.0 50.0 54.0 60.0 52.0 54.0 49.0 46.0 45.0 60.0 44.0 61.0 59.0 66.0 49.0 46.0 43.0 39.0 37.0 42.0 44.0 52.0 53.0 58.0 52.0 41.0 47.0 60.0 44.0 59.0 55.0 46.0 53.0 61.0 58.0 47.0 47.0 41.0 40.0 48.0 52.0 42.0 40.0 52.0 52.0 55.0 60.0 60.0 56.0 51.0 46.0 48.0 58.0 47.0 53.0 48.0 44.0 51.0 53.0 59.0 49.0 44.0 52.0 42.0 49.0 47.0 53.0 48.0 43.0 50.0 50.0 42.0 55.0 51.0 52.0 55.0 51.0 59.0 49.0 48.0 41.0 49.0 53.0 57.0 61.0 50.0 44.0 44.0 57.0 58.0 54.0 45.0 55.0 49.0 55.0 56.0 50.0 49.0 46.0 54.0 61.0 54.0 64.0 54.0 48.0 47.0 39.0 56.0 64.0 54.0 53.0 55.0 35.0 50.0 49.0 49.0 49.0 46.0 58.0 44.0 58.0 60.0 60.0 43.0 54.0 52.0 43.0 51.0 49.0 46.0 47.0 49.0 50.0 52.0 48.0 44.0 46.0 58.0 64.0 57.0 51.0 45.0 42.0 42.0 47.0 56.0 55.0 52.0 53.0 58.0 52.0 46.0 54.0 48.0 62.0 59.0 58.0 56.0 51.0 42.0 66.0 59.0 58.0 66.0 49.0 38.0 37.0 48.0 49.0 52.0 58.0 55.0 50.0 54.0 57.0 46.0 46.0 43.0 49.0 54.0 51.0 50.0 56.0 47.0 52.0 48.0 57.0 55.0 57.0 47.0 46.0 49.0 56.0 51.0 57.0 44.0 45.0 51.0 50.0 45.0 62.0 57.0 58.0 58.0 51.0 56.0 50.0 51.0 48.0 44.0 65.0 61.0 45.0 51.0 46.0 63.0 46.0 52.0 52.0 51.0 53.0 54.0 51.0 61.0 55.0 40.0 40.0 34.0 54.0 49.0 50.0 53.0 49.0 56.0 58.0 41.0 47.0 51.0 38.0 55.0 57.0 51.0 60.0 48.0 69.0 63.0 53.0 51.0 63.0 54.0 53.0 69.0 78.0 52.0 51.0 56.0 52.0 49.0 56.0 52.0 56.0 58.0 64.0 59.0 60.0 52.0 51.0 43.0 64.0 62.0 57.0 58.0 57.0 52.0 50.0 57.0 58.0 59.0 68.0 63.0 62.0 56.0 55.0 42.0 56.0 54.0 52.0 64.0 66.0 52.0 50.0 53.0 55.0 54.0 63.0 56.0 48.0 44.0 63.0 57.0 57.0 53.0 50.0 64.0 56.0 56.0 58.0 59.0 57.0 62.0 70.0 54.0 64.0 54.0 66.0 55.0 56.0 58.0 64.0 52.0 51.0 56.0 49.0 60.0 54.0 56.0 52.0 40.0 50.0 44.0 50.0 64.0 65.0 57.0 44.0 63.0 54.0 45.0 55.0 54.0 47.0 67.0 60.0 57.0 55.0 61.0 47.0 60.0 51.0 40.0 49.0 50.0 41.0 45.0 60.0 60.0 58.0 61.0 66.0 58.0 71.0 51.0 49.0 57.0 59.0 58.0 54.0 53.0 62.0 54.0 50.0 64.0 52.0 49.0 63.0 55.0 57.0 52.0 62.0 47.0 64.0 46.0 51.0 50.0 63.0 75.0 56.0 54.0 45.0 45.0 62.0 57.0 63.0 61.0 64.0 65.0 62.0 65.0 61.0 61.0 45.0 55.0 64.0 69.0 64.0 53.0 50.0 53.0 52.0 61.0 57.0 62.0 59.0 66.0 63.0 63.0 49.0 53.0 61.0 52.0 56.0 58.0 56.0 54.0 40.0 53.0 52.0 55.0 63.0 50.0 55.0 53.0 61.0 61.0 50.0 56.0 55.0 45.0 66.0 55.0 41.0 55.0 63.0 53.0 58.0 51.0 51.0 58.0 57.0 61.0 58.0 47.0 49.0 41.0 44.0 57.0 53.0 61.0 59.0 51.0 47.0 56.0 44.0 51.0 66.0 63.0 49.0 52.0 51.0 67.0 49.0 45.0 52.0 48.0 56.0 61.0 61.0 56.0 53.0 58.0 60.0 65.0 55.0 61.0 53.0 50.0 52.0 54.0 47.0 58.0 54.0 59.0 61.0 55.0 54.0 57.0 65.0 51.0 54.0 68.0 59.0 50.0 51.0 49.0 52.0 62.0 57.0 54.0 61.0 61.0 56.0 62.0 62.0 55.0 45.0 40.0 44.0 45.0 49.0 68.0 62.0 54.0 44.0 50.0 54.0 56.0 54.0 60.0 61.0 61.0 59.0 48.0 53.0 53.0 56.0 49.0 52.0 58.0 50.0 53.0 40.0 56.0 50.0 50.0 54.0 54.0 51.0 45.0 49.0 53.0 60.0 35.0 55.0 59.0 55.0 60.0 51.0 52.0 45.0 42.0 48.0 63.0 52.0 55.0 51.0 53.0 53.0 58.0 59.0 49.0 41.0 56.0 56.0 68.0 59.0 50.0 53.0 55.0 49.0 49.0 54.0 51.0 59.0 61.0 50.0 55.0 58.0 48.0 51.0 57.0 64.0 54.0 57.0 59.0 54.0 50.0 53.0 53.0 57.0 48.0 51.0 54.0 60.0 55.0 44.0 55.0 56.0 54.0 55.0 60.0 47.0 46.0 48.0 51.0 58.0 66.0 62.0 50.0 39.0 49.0 56.0 54.0 56.0 69.0 54.0 59.0 49.0 60.0 50.0 51.0 49.0 40.0 54.0 58.0 47.0 65.0 61.0 59.0 57.0 51.0 43.0 50.0 50.0 61.0 62.0 54.0 49.0 46.0 36.0 45.0 43.0 49.0 59.0 64.0 57.0 49.0 54.0 49.0 51.0 54.0 56.0 55.0 53.0 52.0 39.0 49.0 54.0 48.0 46.0 55.0 61.0 44.0 54.0 60.0 51.0 48.0 64.0 52.0 44.0 54.0 51.0 51.0 59.0 45.0 64.0 70.0 66.0 63.0 48.0 52.0 57.0 53.0 58.0 61.0 51.0 55.0 55.0 55.0 65.0 49.0 48.0 48.0 47.0 46.0 66.0 60.0 52.0 60.0 56.0 43.0 57.0 58.0 50.0 49.0 43.0 56.0 43.0 70.0 45.0 53.0 54.0 47.0 54.0 53.0 53.0 43.0 48.0 41.0 53.0 53.0 56.0 44.0 53.0 54.0 55.0 54.0 54.0 43.0 57.0 55.0 53.0 53.0 51.0 45.0 49.0 46.0 57.0 67.0 63.0 47.0 51.0 52.0 43.0 53.0 52.0 44.0 43.0 44.0 54.0 56.0 68.0 60.0 45.0 44.0 62.0 46.0 46.0 53.0 60.0 51.0 52.0 56.0 47.0 53.0 50.0 53.0 52.0 49.0 60.0 49.0 52.0 55.0 55.0 54.0 61.0 47.0 48.0 42.0 39.0 40.0 43.0 57.0 55.0 53.0 54.0 48.0 55.0 63.0 43.0 47.0 55.0 54.0 60.0 57.0 57.0 46.0 48.0 43.0 59.0 46.0 53.0 46.0 50.0 56.0 57.0 47.0 50.0 51.0 48.0 55.0 66.0 54.0 54.0 52.0 57.0 57.0 53.0 47.0 46.0 53.0 45.0 50.0 57.0 53.0 47.0 46.0 49.0 46.0 61.0 59.0 49.0 46.0 45.0 49.0 54.0 64.0 49.0 39.0 56.0 48.0 55.0 46.0 53.0 43.0 47.0 59.0 64.0 46.0 53.0 57.0 52.0 42.0 44.0 50.0 60.0 54.0 56.0 42.0 53.0 53.0 58.0 50.0 54.0 46.0 66.0 48.0 53.0 55.0 41.0 47.0 52.0 49.0 51.0 53.0 56.0 45.0 49.0 45.0 56.0 63.0 53.0 40.0 37.0 36.0 51.0 52.0 44.0 61.0 67.0 58.0 54.0 67.0 62.0 56.0 72.0 71.0 59.0 60.0 64.0 58.0 60.0 53.0 69.0 58.0 46.0 41.0 23.0 24.0 48.0 75.0 119.0 143.0 134.0 96.0 67.0 35.0 42.0 63.0 73.0 73.0 52.0 45.0 46.0 77.0 69.0 68.0 63.0 48.0 68.0 63.0 67.0 55.0 63.0 52.0 60.0 58.0 64.0 69.0 59.0 82.0 75.0 80.0 74.0 66.0 73.0 56.0 60.0 54.0 57.0 56.0 74.0 53.0 49.0 43.0 41.0 34.0 53.0 45.0 42.0 59.0 41.0 60.0 45.0 56.0 45.0 47.0 54.0 55.0 52.0 38.0 39.0 44.0 40.0 50.0 48.0 51.0 62.0 56.0 51.0 50.0 53.0 37.0 44.0 52.0 45.0 61.0 61.0 82.0 79.0 81.0 70.0 54.0 12.0 22.0 61.0 131.0 171.0 160.0 183.0 146.0 204.0 161.0 ==END==
+SOCKET(27/03/09 17:46:01)> stop
+Nothing to stop
+SOCKET(27/03/09 17:46:01)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 206.0 67.0 60.0 64.0 65.0 58.0 50.0 54.0 53.0 55.0 50.0 51.0 47.0 50.0 54.0 60.0 52.0 54.0 49.0 46.0 45.0 60.0 44.0 61.0 59.0 66.0 49.0 46.0 43.0 39.0 37.0 42.0 44.0 52.0 53.0 58.0 52.0 41.0 47.0 60.0 44.0 59.0 55.0 46.0 53.0 61.0 58.0 47.0 47.0 41.0 40.0 48.0 52.0 42.0 40.0 52.0 52.0 55.0 60.0 60.0 56.0 51.0 46.0 48.0 58.0 47.0 53.0 48.0 44.0 51.0 53.0 59.0 49.0 44.0 52.0 42.0 49.0 47.0 53.0 48.0 43.0 50.0 50.0 42.0 55.0 51.0 52.0 55.0 51.0 59.0 49.0 48.0 41.0 49.0 53.0 57.0 61.0 50.0 44.0 44.0 57.0 58.0 54.0 45.0 55.0 49.0 55.0 56.0 50.0 49.0 46.0 54.0 61.0 54.0 64.0 54.0 48.0 47.0 39.0 56.0 64.0 54.0 53.0 55.0 35.0 50.0 49.0 49.0 49.0 46.0 58.0 44.0 58.0 60.0 60.0 43.0 54.0 52.0 43.0 51.0 49.0 46.0 47.0 49.0 50.0 52.0 48.0 44.0 46.0 58.0 64.0 57.0 51.0 45.0 42.0 42.0 47.0 56.0 55.0 52.0 53.0 58.0 52.0 46.0 54.0 48.0 62.0 59.0 58.0 56.0 51.0 42.0 66.0 59.0 58.0 66.0 49.0 38.0 37.0 48.0 49.0 52.0 58.0 55.0 50.0 54.0 57.0 46.0 46.0 43.0 49.0 54.0 51.0 50.0 56.0 47.0 52.0 48.0 57.0 55.0 57.0 47.0 46.0 49.0 56.0 51.0 57.0 44.0 45.0 51.0 50.0 45.0 62.0 57.0 58.0 58.0 51.0 56.0 50.0 51.0 48.0 44.0 65.0 61.0 45.0 51.0 46.0 63.0 46.0 52.0 52.0 51.0 53.0 54.0 51.0 61.0 55.0 40.0 40.0 34.0 54.0 49.0 50.0 53.0 49.0 56.0 58.0 41.0 47.0 51.0 38.0 55.0 57.0 51.0 60.0 48.0 69.0 63.0 53.0 51.0 63.0 54.0 53.0 69.0 78.0 52.0 51.0 56.0 52.0 49.0 56.0 52.0 56.0 58.0 64.0 59.0 60.0 52.0 51.0 43.0 64.0 62.0 57.0 58.0 57.0 52.0 50.0 57.0 58.0 59.0 68.0 63.0 62.0 56.0 55.0 42.0 56.0 54.0 52.0 64.0 66.0 52.0 50.0 53.0 55.0 54.0 63.0 56.0 48.0 44.0 63.0 57.0 57.0 53.0 50.0 64.0 56.0 56.0 58.0 59.0 57.0 62.0 70.0 54.0 64.0 54.0 66.0 55.0 56.0 58.0 64.0 52.0 51.0 56.0 49.0 60.0 54.0 56.0 52.0 40.0 50.0 44.0 50.0 64.0 65.0 57.0 44.0 63.0 54.0 45.0 55.0 54.0 47.0 67.0 60.0 57.0 55.0 61.0 47.0 60.0 51.0 40.0 49.0 50.0 41.0 45.0 60.0 60.0 58.0 61.0 66.0 58.0 71.0 51.0 49.0 57.0 59.0 58.0 54.0 53.0 62.0 54.0 50.0 64.0 52.0 49.0 63.0 55.0 57.0 52.0 62.0 47.0 64.0 46.0 51.0 50.0 63.0 75.0 56.0 54.0 45.0 45.0 62.0 57.0 63.0 61.0 64.0 65.0 62.0 65.0 61.0 61.0 45.0 55.0 64.0 69.0 64.0 53.0 50.0 53.0 52.0 61.0 57.0 62.0 59.0 66.0 63.0 63.0 49.0 53.0 61.0 52.0 56.0 58.0 56.0 54.0 40.0 53.0 52.0 55.0 63.0 50.0 55.0 53.0 61.0 61.0 50.0 56.0 55.0 45.0 66.0 55.0 41.0 55.0 63.0 53.0 58.0 51.0 51.0 58.0 57.0 61.0 58.0 47.0 49.0 41.0 44.0 57.0 53.0 61.0 59.0 51.0 47.0 56.0 44.0 51.0 66.0 63.0 49.0 52.0 51.0 67.0 49.0 45.0 52.0 48.0 56.0 61.0 61.0 56.0 53.0 58.0 60.0 65.0 55.0 61.0 53.0 50.0 52.0 54.0 47.0 58.0 54.0 59.0 61.0 55.0 54.0 57.0 65.0 51.0 54.0 68.0 59.0 50.0 51.0 49.0 52.0 62.0 57.0 54.0 61.0 61.0 56.0 62.0 62.0 55.0 45.0 40.0 44.0 45.0 49.0 68.0 62.0 54.0 44.0 50.0 54.0 56.0 54.0 60.0 61.0 61.0 59.0 48.0 53.0 53.0 56.0 49.0 52.0 58.0 50.0 53.0 40.0 56.0 50.0 50.0 54.0 54.0 51.0 45.0 49.0 53.0 60.0 35.0 55.0 59.0 55.0 60.0 51.0 52.0 45.0 42.0 48.0 63.0 52.0 55.0 51.0 53.0 53.0 58.0 59.0 49.0 41.0 56.0 56.0 68.0 59.0 50.0 53.0 55.0 49.0 49.0 54.0 51.0 59.0 61.0 50.0 55.0 58.0 48.0 51.0 57.0 64.0 54.0 57.0 59.0 54.0 50.0 53.0 53.0 57.0 48.0 51.0 54.0 60.0 55.0 44.0 55.0 56.0 54.0 55.0 60.0 47.0 46.0 48.0 51.0 58.0 66.0 62.0 50.0 39.0 49.0 56.0 54.0 56.0 69.0 54.0 59.0 49.0 60.0 50.0 51.0 49.0 40.0 54.0 58.0 47.0 65.0 61.0 59.0 57.0 51.0 43.0 50.0 50.0 61.0 62.0 54.0 49.0 46.0 36.0 45.0 43.0 49.0 59.0 64.0 57.0 49.0 54.0 49.0 51.0 54.0 56.0 55.0 53.0 52.0 39.0 49.0 54.0 48.0 46.0 55.0 61.0 44.0 54.0 60.0 51.0 48.0 64.0 52.0 44.0 54.0 51.0 51.0 59.0 45.0 64.0 70.0 66.0 63.0 48.0 52.0 57.0 53.0 58.0 61.0 51.0 55.0 55.0 55.0 65.0 49.0 48.0 48.0 47.0 46.0 66.0 60.0 52.0 60.0 56.0 43.0 57.0 58.0 50.0 49.0 43.0 56.0 43.0 70.0 45.0 53.0 54.0 47.0 54.0 53.0 53.0 43.0 48.0 41.0 53.0 53.0 56.0 44.0 53.0 54.0 55.0 54.0 54.0 43.0 57.0 55.0 53.0 53.0 51.0 45.0 49.0 46.0 57.0 67.0 63.0 47.0 51.0 52.0 43.0 53.0 52.0 44.0 43.0 44.0 54.0 56.0 68.0 60.0 45.0 44.0 62.0 46.0 46.0 53.0 60.0 51.0 52.0 56.0 47.0 53.0 50.0 53.0 52.0 49.0 60.0 49.0 52.0 55.0 55.0 54.0 61.0 47.0 48.0 42.0 39.0 40.0 43.0 57.0 55.0 53.0 54.0 48.0 55.0 63.0 43.0 47.0 55.0 54.0 60.0 57.0 57.0 46.0 48.0 43.0 59.0 46.0 53.0 46.0 50.0 56.0 57.0 47.0 50.0 51.0 48.0 55.0 66.0 54.0 54.0 52.0 57.0 57.0 53.0 47.0 46.0 53.0 45.0 50.0 57.0 53.0 47.0 46.0 49.0 46.0 61.0 59.0 49.0 46.0 45.0 49.0 54.0 64.0 49.0 39.0 56.0 48.0 55.0 46.0 53.0 43.0 47.0 59.0 64.0 46.0 53.0 57.0 52.0 42.0 44.0 50.0 60.0 54.0 56.0 42.0 53.0 53.0 58.0 50.0 54.0 46.0 66.0 48.0 53.0 55.0 41.0 47.0 52.0 49.0 51.0 53.0 56.0 45.0 49.0 45.0 56.0 63.0 53.0 40.0 37.0 36.0 51.0 52.0 44.0 61.0 67.0 58.0 54.0 67.0 62.0 56.0 72.0 71.0 59.0 60.0 64.0 58.0 60.0 53.0 69.0 58.0 46.0 41.0 23.0 24.0 48.0 75.0 119.0 143.0 134.0 96.0 67.0 35.0 42.0 63.0 73.0 73.0 52.0 45.0 46.0 77.0 69.0 68.0 63.0 48.0 68.0 63.0 67.0 55.0 63.0 52.0 60.0 58.0 64.0 69.0 59.0 82.0 75.0 80.0 74.0 66.0 73.0 56.0 60.0 54.0 57.0 56.0 74.0 53.0 49.0 43.0 41.0 34.0 53.0 45.0 42.0 59.0 41.0 60.0 45.0 56.0 45.0 47.0 54.0 55.0 52.0 38.0 39.0 44.0 40.0 50.0 48.0 51.0 62.0 56.0 51.0 50.0 53.0 37.0 44.0 52.0 45.0 61.0 61.0 82.0 79.0 81.0 70.0 54.0 12.0 22.0 61.0 131.0 171.0 160.0 183.0 146.0 204.0 161.0 ==END==
+Disconnected from client.
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+SOCKET(27/03/09 17:46:54)> stop
+Nothing to stop
+SOCKET(27/03/09 17:46:54)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 206.0 67.0 60.0 64.0 65.0 58.0 50.0 54.0 53.0 55.0 50.0 51.0 47.0 50.0 54.0 60.0 52.0 54.0 49.0 46.0 45.0 60.0 44.0 61.0 59.0 66.0 49.0 46.0 43.0 39.0 37.0 42.0 44.0 52.0 53.0 58.0 52.0 41.0 47.0 60.0 44.0 59.0 55.0 46.0 53.0 61.0 58.0 47.0 47.0 41.0 40.0 48.0 52.0 42.0 40.0 52.0 52.0 55.0 60.0 60.0 56.0 51.0 46.0 48.0 58.0 47.0 53.0 48.0 44.0 51.0 53.0 59.0 49.0 44.0 52.0 42.0 49.0 47.0 53.0 48.0 43.0 50.0 50.0 42.0 55.0 51.0 52.0 55.0 51.0 59.0 49.0 48.0 41.0 49.0 53.0 57.0 61.0 50.0 44.0 44.0 57.0 58.0 54.0 45.0 55.0 49.0 55.0 56.0 50.0 49.0 46.0 54.0 61.0 54.0 64.0 54.0 48.0 47.0 39.0 56.0 64.0 54.0 53.0 55.0 35.0 50.0 49.0 49.0 49.0 46.0 58.0 44.0 58.0 60.0 60.0 43.0 54.0 52.0 43.0 51.0 49.0 46.0 47.0 49.0 50.0 52.0 48.0 44.0 46.0 58.0 64.0 57.0 51.0 45.0 42.0 42.0 47.0 56.0 55.0 52.0 53.0 58.0 52.0 46.0 54.0 48.0 62.0 59.0 58.0 56.0 51.0 42.0 66.0 59.0 58.0 66.0 49.0 38.0 37.0 48.0 49.0 52.0 58.0 55.0 50.0 54.0 57.0 46.0 46.0 43.0 49.0 54.0 51.0 50.0 56.0 47.0 52.0 48.0 57.0 55.0 57.0 47.0 46.0 49.0 56.0 51.0 57.0 44.0 45.0 51.0 50.0 45.0 62.0 57.0 58.0 58.0 51.0 56.0 50.0 51.0 48.0 44.0 65.0 61.0 45.0 51.0 46.0 63.0 46.0 52.0 52.0 51.0 53.0 54.0 51.0 61.0 55.0 40.0 40.0 34.0 54.0 49.0 50.0 53.0 49.0 56.0 58.0 41.0 47.0 51.0 38.0 55.0 57.0 51.0 60.0 48.0 69.0 63.0 53.0 51.0 63.0 54.0 53.0 69.0 78.0 52.0 51.0 56.0 52.0 49.0 56.0 52.0 56.0 58.0 64.0 59.0 60.0 52.0 51.0 43.0 64.0 62.0 57.0 58.0 57.0 52.0 50.0 57.0 58.0 59.0 68.0 63.0 62.0 56.0 55.0 42.0 56.0 54.0 52.0 64.0 66.0 52.0 50.0 53.0 55.0 54.0 63.0 56.0 48.0 44.0 63.0 57.0 57.0 53.0 50.0 64.0 56.0 56.0 58.0 59.0 57.0 62.0 70.0 54.0 64.0 54.0 66.0 55.0 56.0 58.0 64.0 52.0 51.0 56.0 49.0 60.0 54.0 56.0 52.0 40.0 50.0 44.0 50.0 64.0 65.0 57.0 44.0 63.0 54.0 45.0 55.0 54.0 47.0 67.0 60.0 57.0 55.0 61.0 47.0 60.0 51.0 40.0 49.0 50.0 41.0 45.0 60.0 60.0 58.0 61.0 66.0 58.0 71.0 51.0 49.0 57.0 59.0 58.0 54.0 53.0 62.0 54.0 50.0 64.0 52.0 49.0 63.0 55.0 57.0 52.0 62.0 47.0 64.0 46.0 51.0 50.0 63.0 75.0 56.0 54.0 45.0 45.0 62.0 57.0 63.0 61.0 64.0 65.0 62.0 65.0 61.0 61.0 45.0 55.0 64.0 69.0 64.0 53.0 50.0 53.0 52.0 61.0 57.0 62.0 59.0 66.0 63.0 63.0 49.0 53.0 61.0 52.0 56.0 58.0 56.0 54.0 40.0 53.0 52.0 55.0 63.0 50.0 55.0 53.0 61.0 61.0 50.0 56.0 55.0 45.0 66.0 55.0 41.0 55.0 63.0 53.0 58.0 51.0 51.0 58.0 57.0 61.0 58.0 47.0 49.0 41.0 44.0 57.0 53.0 61.0 59.0 51.0 47.0 56.0 44.0 51.0 66.0 63.0 49.0 52.0 51.0 67.0 49.0 45.0 52.0 48.0 56.0 61.0 61.0 56.0 53.0 58.0 60.0 65.0 55.0 61.0 53.0 50.0 52.0 54.0 47.0 58.0 54.0 59.0 61.0 55.0 54.0 57.0 65.0 51.0 54.0 68.0 59.0 50.0 51.0 49.0 52.0 62.0 57.0 54.0 61.0 61.0 56.0 62.0 62.0 55.0 45.0 40.0 44.0 45.0 49.0 68.0 62.0 54.0 44.0 50.0 54.0 56.0 54.0 60.0 61.0 61.0 59.0 48.0 53.0 53.0 56.0 49.0 52.0 58.0 50.0 53.0 40.0 56.0 50.0 50.0 54.0 54.0 51.0 45.0 49.0 53.0 60.0 35.0 55.0 59.0 55.0 60.0 51.0 52.0 45.0 42.0 48.0 63.0 52.0 55.0 51.0 53.0 53.0 58.0 59.0 49.0 41.0 56.0 56.0 68.0 59.0 50.0 53.0 55.0 49.0 49.0 54.0 51.0 59.0 61.0 50.0 55.0 58.0 48.0 51.0 57.0 64.0 54.0 57.0 59.0 54.0 50.0 53.0 53.0 57.0 48.0 51.0 54.0 60.0 55.0 44.0 55.0 56.0 54.0 55.0 60.0 47.0 46.0 48.0 51.0 58.0 66.0 62.0 50.0 39.0 49.0 56.0 54.0 56.0 69.0 54.0 59.0 49.0 60.0 50.0 51.0 49.0 40.0 54.0 58.0 47.0 65.0 61.0 59.0 57.0 51.0 43.0 50.0 50.0 61.0 62.0 54.0 49.0 46.0 36.0 45.0 43.0 49.0 59.0 64.0 57.0 49.0 54.0 49.0 51.0 54.0 56.0 55.0 53.0 52.0 39.0 49.0 54.0 48.0 46.0 55.0 61.0 44.0 54.0 60.0 51.0 48.0 64.0 52.0 44.0 54.0 51.0 51.0 59.0 45.0 64.0 70.0 66.0 63.0 48.0 52.0 57.0 53.0 58.0 61.0 51.0 55.0 55.0 55.0 65.0 49.0 48.0 48.0 47.0 46.0 66.0 60.0 52.0 60.0 56.0 43.0 57.0 58.0 50.0 49.0 43.0 56.0 43.0 70.0 45.0 53.0 54.0 47.0 54.0 53.0 53.0 43.0 48.0 41.0 53.0 53.0 56.0 44.0 53.0 54.0 55.0 54.0 54.0 43.0 57.0 55.0 53.0 53.0 51.0 45.0 49.0 46.0 57.0 67.0 63.0 47.0 51.0 52.0 43.0 53.0 52.0 44.0 43.0 44.0 54.0 56.0 68.0 60.0 45.0 44.0 62.0 46.0 46.0 53.0 60.0 51.0 52.0 56.0 47.0 53.0 50.0 53.0 52.0 49.0 60.0 49.0 52.0 55.0 55.0 54.0 61.0 47.0 48.0 42.0 39.0 40.0 43.0 57.0 55.0 53.0 54.0 48.0 55.0 63.0 43.0 47.0 55.0 54.0 60.0 57.0 57.0 46.0 48.0 43.0 59.0 46.0 53.0 46.0 50.0 56.0 57.0 47.0 50.0 51.0 48.0 55.0 66.0 54.0 54.0 52.0 57.0 57.0 53.0 47.0 46.0 53.0 45.0 50.0 57.0 53.0 47.0 46.0 49.0 46.0 61.0 59.0 49.0 46.0 45.0 49.0 54.0 64.0 49.0 39.0 56.0 48.0 55.0 46.0 53.0 43.0 47.0 59.0 64.0 46.0 53.0 57.0 52.0 42.0 44.0 50.0 60.0 54.0 56.0 42.0 53.0 53.0 58.0 50.0 54.0 46.0 66.0 48.0 53.0 55.0 41.0 47.0 52.0 49.0 51.0 53.0 56.0 45.0 49.0 45.0 56.0 63.0 53.0 40.0 37.0 36.0 51.0 52.0 44.0 61.0 67.0 58.0 54.0 67.0 62.0 56.0 72.0 71.0 59.0 60.0 64.0 58.0 60.0 53.0 69.0 58.0 46.0 41.0 23.0 24.0 48.0 75.0 119.0 143.0 134.0 96.0 67.0 35.0 42.0 63.0 73.0 73.0 52.0 45.0 46.0 77.0 69.0 68.0 63.0 48.0 68.0 63.0 67.0 55.0 63.0 52.0 60.0 58.0 64.0 69.0 59.0 82.0 75.0 80.0 74.0 66.0 73.0 56.0 60.0 54.0 57.0 56.0 74.0 53.0 49.0 43.0 41.0 34.0 53.0 45.0 42.0 59.0 41.0 60.0 45.0 56.0 45.0 47.0 54.0 55.0 52.0 38.0 39.0 44.0 40.0 50.0 48.0 51.0 62.0 56.0 51.0 50.0 53.0 37.0 44.0 52.0 45.0 61.0 61.0 82.0 79.0 81.0 70.0 54.0 12.0 22.0 61.0 131.0 171.0 160.0 183.0 146.0 204.0 161.0 ==END==
+Disconnected from client.
+CONSOLE(27/03/09 17:47:38)> take d 100 test
+Hardware trigger of board 0 enabled
+
+Starting run #0 (data) on "test" with 100 event(s)
+
+Data file "/ct3data/20090327/20090327_00000000_test_d_0.raw" opened.
+Data file closed.
+
+data run #0 completed (100 event(s))
+Time for run 0.98 seconds, trigger rate 102.28 Hz.
+Run size 3 MByte, data rate 4.0 MByte/s.
+CONSOLE(27/03/09 17:52:57)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 17:56:38)> fresponse -1 1
+Usage: fresponse <V1> <V2>
+CONSOLE(27/03/09 17:57:05)> fres 0 1
+Usage: fresponse <V1> <V2>
+CONSOLE(27/03/09 17:57:17)> freponse 1 1
+Unknown command: freponse
+CONSOLE(27/03/09 17:57:28)> fres 1 1
+HV Feedback: Error, first and second voltage equal.
+CONSOLE(27/03/09 17:58:20)> fres 1 2
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 18:00:44)> b 0
+CONSOLE(27/03/09 18:01:32)> 
+CONSOLE(27/03/09 18:03:15)> fresponse 1 2
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+HV Feedback: Setting first voltage  1.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 18:04:34)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 18:06:18)> b 0
+CONSOLE(27/03/09 18:06:57)> fres 1 2
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+HV Feedback: Setting first voltage  1.000000 for response measurement, acquiring data.
+CONSOLE(27/03/09 18:07:49)> fave
+CONSOLE(27/03/09 18:08:02)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 0.999 GHz
+CONSOLE(27/03/09 18:08:17)> take d 200
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Hardware trigger of board 0 enabled
+
+Starting run #0 (data) on "DUMMY" with 200 event(s)
+
+Data file "/ct3data/20090327/20090327_00000001_DUMMY_d_0.raw" opened.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+CONSOLE(27/03/09 18:08:55)> fave
+Time-out of 5 seconds expired before receiving acknowledge from HV socket.
+HV Feedback: Setting second voltage 2.000000 for response measurement, acquiring data.
+Data file closed.
+
+data run #1 completed (200 event(s))
+Time for run 42.00 seconds, trigger rate 4.76 Hz.
+Run size 7 MByte, data rate 0.2 MByte/s.
+CONSOLE(27/03/09 18:10:16)> fmode
+Feedback measuring response with second voltage.
+CONSOLE(27/03/09 18:10:27)> take d 200
+Hardware trigger of board 0 enabled
+
+Starting run #1 (data) on "DUMMY" with 200 event(s)
+
+Data file "/ct3data/20090327/20090327_00000002_DUMMY_d_0.raw" opened.
+HV Feedback: Warning, response singular for board 0, chip 0, channel 4.
+HV Feedback: Warning, response singular for board 0, chip 0, channel 9.
+HV Feedback: Warning, response singular for board 0, chip 1, channel 5.
+HV Feedback: Warning, response singular for board 0, chip 1, channel 6.
+HV Feedback: Response measurements finished, switching off.
+Data file closed.
+
+data run #2 completed (200 event(s))
+Time for run 1.77 seconds, trigger rate 113.24 Hz.
+Run size 7 MByte, data rate 4.4 MByte/s.
+CONSOLE(27/03/09 18:11:02)> fmode
+Feedback off.
+CONSOLE(27/03/09 18:11:12)> help
+CONSOLE(27/03/09 18:11:30)> fresponse
+Usage: fresponse <V1> <V2>
+CONSOLE(27/03/09 18:13:32)> fave
+CONSOLE(27/03/09 18:13:43)> fmode target
+CONSOLE(27/03/09 18:13:44)> fmode
+Feedback acquiring new targets.
+CONSOLE(27/03/09 18:13:50)> fav
+CONSOLE(27/03/09 18:13:58)> ftarget
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+CONSOLE(27/03/09 18:14:09)> take d 120
+Hardware trigger of board 0 enabled
+
+Starting run #2 (data) on "DUMMY" with 120 event(s)
+
+Data file "/ct3data/20090327/20090327_00000003_DUMMY_d_0.raw" opened.
+HV Feedback: New targets set, switching off.
+Data file closed.
+
+data run #3 completed (120 event(s))
+Time for run 1.12 seconds, trigger rate 107.60 Hz.
+Run size 4 MByte, data rate 4.2 MByte/s.
+CONSOLE(27/03/09 18:14:22)> fmode
+Feedback off.
+CONSOLE(27/03/09 18:14:25)> ftar
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+CONSOLE(27/03/09 18:15:05)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 18:27:29)> f
+Unknown command: f
+CONSOLE(27/03/09 18:27:30)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 18:29:05)> fresponse
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+Board 1, chip 0, channel 0: 0.000000
+Board 1, chip 0, channel 1: 0.000000
+Board 1, chip 0, channel 2: 0.000000
+Board 1, chip 0, channel 3: 0.000000
+Board 1, chip 0, channel 4: 0.000000
+Board 1, chip 0, channel 5: 0.000000
+Board 1, chip 0, channel 6: 0.000000
+Board 1, chip 0, channel 7: 0.000000
+Board 1, chip 0, channel 8: 0.000000
+Board 1, chip 0, channel 9: 0.000000
+Board 1, chip 1, channel 0: 0.000000
+Board 1, chip 1, channel 1: 0.000000
+Board 1, chip 1, channel 2: 0.000000
+Board 1, chip 1, channel 3: 0.000000
+Board 1, chip 1, channel 4: 0.000000
+Board 1, chip 1, channel 5: 0.000000
+Board 1, chip 1, channel 6: 0.000000
+Board 1, chip 1, channel 7: 0.000000
+Board 1, chip 1, channel 8: 0.000000
+Board 1, chip 1, channel 9: 0.000000
+Board 2, chip 0, channel 0: 0.000000
+Board 2, chip 0, channel 1: 0.000000
+Board 2, chip 0, channel 2: 0.000000
+Board 2, chip 0, channel 3: 0.000000
+Board 2, chip 0, channel 4: 0.000000
+Board 2, chip 0, channel 5: 0.000000
+Board 2, chip 0, channel 6: 0.000000
+Board 2, chip 0, channel 7: 0.000000
+Board 2, chip 0, channel 8: 0.000000
+Board 2, chip 0, channel 9: 0.000000
+Board 2, chip 1, channel 0: 0.000000
+Board 2, chip 1, channel 1: 0.000000
+Board 2, chip 1, channel 2: 0.000000
+Board 2, chip 1, channel 3: 0.000000
+Board 2, chip 1, channel 4: 0.000000
+Board 2, chip 1, channel 5: 0.000000
+Board 2, chip 1, channel 6: 0.000000
+Board 2, chip 1, channel 7: 0.000000
+Board 2, chip 1, channel 8: 0.000000
+Board 2, chip 1, channel 9: 0.000000
+Board 3, chip 0, channel 0: 0.000000
+Board 3, chip 0, channel 1: 0.000000
+Board 3, chip 0, channel 2: 0.000000
+Board 3, chip 0, channel 3: 0.000000
+Board 3, chip 0, channel 4: 0.000000
+Board 3, chip 0, channel 5: 0.000000
+Board 3, chip 0, channel 6: 0.000000
+Board 3, chip 0, channel 7: 297576127135378465946301628416.000000
+Board 3, chip 0, channel 8: 0.000000
+Board 3, chip 0, channel 9: 1094709778416228397509246976.000000
+Board 3, chip 1, channel 0: 75553504981650634736603758592.000000
+Board 3, chip 1, channel 1: 18521688029792692885541355520.000000
+Board 3, chip 1, channel 2: 72064735434280472379539589169152.000000
+Board 3, chip 1, channel 3: 903086080000.000000
+Board 3, chip 1, channel 4: 267924208381851598848.000000
+Board 3, chip 1, channel 5: 1109462008586855400127594496.000000
+Board 3, chip 1, channel 6: 75553571094781394911636750336.000000
+Board 3, chip 1, channel 7: 0.000000
+Board 3, chip 1, channel 8: 17440080752331091498030333952.000000
+Board 3, chip 1, channel 9: 18729237321198497133226792845312.000000
+CONSOLE(27/03/09 18:31:36)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+
+Feedback connected to HV server eth-vme02.ethz.ch (port 3000).
+CONSOLE(27/03/09 18:43:21)> ftarget
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+Board 1, chip 0, channel 0: 0.000000
+Board 1, chip 0, channel 1: 0.000000
+Board 1, chip 0, channel 2: 0.000000
+Board 1, chip 0, channel 3: 0.000000
+Board 1, chip 0, channel 4: 0.000000
+Board 1, chip 0, channel 5: 0.000000
+Board 1, chip 0, channel 6: 0.000000
+Board 1, chip 0, channel 7: 0.000000
+Board 1, chip 0, channel 8: 0.000000
+Board 1, chip 0, channel 9: 0.000000
+Board 1, chip 1, channel 0: 0.000000
+Board 1, chip 1, channel 1: 0.000000
+Board 1, chip 1, channel 2: 0.000000
+Board 1, chip 1, channel 3: 0.000000
+Board 1, chip 1, channel 4: 0.000000
+Board 1, chip 1, channel 5: 0.000000
+Board 1, chip 1, channel 6: 0.000000
+Board 1, chip 1, channel 7: 0.000000
+Board 1, chip 1, channel 8: 0.000000
+Board 1, chip 1, channel 9: 0.000000
+Board 2, chip 0, channel 0: 0.000000
+Board 2, chip 0, channel 1: 0.000000
+Board 2, chip 0, channel 2: 0.000000
+Board 2, chip 0, channel 3: 0.000000
+Board 2, chip 0, channel 4: 0.000000
+Board 2, chip 0, channel 5: 0.000000
+Board 2, chip 0, channel 6: 0.000000
+Board 2, chip 0, channel 7: 0.000000
+Board 2, chip 0, channel 8: 0.000000
+Board 2, chip 0, channel 9: 0.000000
+Board 2, chip 1, channel 0: 0.000000
+Board 2, chip 1, channel 1: 0.000000
+Board 2, chip 1, channel 2: 0.000000
+Board 2, chip 1, channel 3: 0.000000
+Board 2, chip 1, channel 4: 0.000000
+Board 2, chip 1, channel 5: 0.000000
+Board 2, chip 1, channel 6: 0.000000
+Board 2, chip 1, channel 7: 0.000000
+Board 2, chip 1, channel 8: 0.000000
+Board 2, chip 1, channel 9: 0.000000
+Board 3, chip 0, channel 0: 0.000000
+Board 3, chip 0, channel 1: 0.000000
+Board 3, chip 0, channel 2: 0.000000
+Board 3, chip 0, channel 3: 0.000000
+Board 3, chip 0, channel 4: 0.000000
+Board 3, chip 0, channel 5: 0.000000
+Board 3, chip 0, channel 6: 0.000000
+Board 3, chip 0, channel 7: 0.000000
+Board 3, chip 0, channel 8: 0.000000
+Board 3, chip 0, channel 9: 0.000000
+Board 3, chip 1, channel 0: 0.000000
+Board 3, chip 1, channel 1: 0.000000
+Board 3, chip 1, channel 2: 0.000000
+Board 3, chip 1, channel 3: 0.000000
+Board 3, chip 1, channel 4: 0.000000
+Board 3, chip 1, channel 5: 0.000000
+Board 3, chip 1, channel 6: 0.000000
+Board 3, chip 1, channel 7: 0.000000
+Board 3, chip 1, channel 8: 0.000000
+Board 3, chip 1, channel 9: 0.000000
+CONSOLE(27/03/09 18:43:27)> fmode target
+CONSOLE(27/03/09 18:43:28)> fmode
+Feedback acquiring new targets.
+CONSOLE(27/03/09 18:43:32)> take p
+DRS sampling frequency of board 0 not set!
+CONSOLE(27/03/09 18:43:34)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 0.999 GHz
+Domino wave of board 1 is running at 1.000 GHz
+Domino wave of board 2 is running at 1.000 GHz
+Domino wave of board 3 is running at 0.999 GHz
+CONSOLE(27/03/09 18:43:39)> take d 110
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 1 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 2 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 3 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Hardware trigger of board 0 enabled
+Hardware trigger of board 1 enabled
+Hardware trigger of board 2 enabled
+Hardware trigger of board 3 enabled
+
+Starting run #0 (data) on "DUMMY" with 110 event(s)
+
+Data file "/ct3data/20090327/20090327_00000004_DUMMY_d_0.raw" opened.
+CONSOLE(27/03/09 18:43:43)> ev
+Current number of events: 0
+CONSOLE(27/03/09 18:43:44)> ev
+Current number of events: 0
+CONSOLE(27/03/09 18:43:50)> stop
+DAQ is busy
+DAQ is busy
+DAQ will stop.
+Domino wave stopped
+Data file closed.
+
+data run #4 stopped (1 event(s))
+Time for run 8.07 seconds, trigger rate 0.12 Hz.
+Run size 0 MByte, data rate 0.0 MByte/s.
+CONSOLE(27/03/09 18:43:54)> faver
+CONSOLE(27/03/09 18:46:49)> take p 1000
+Hardware trigger of board 0 disabled
+Hardware trigger of board 1 disabled
+Hardware trigger of board 2 disabled
+Hardware trigger of board 3 disabled
+
+Starting run #4 (pedestal) on "DUMMY" with 1000 event(s)
+
+Data file "/ct3data/20090327/20090327_00000005_DUMMY_p_0.raw" opened.
+CONSOLE(27/03/09 18:46:53)> ev
+Current number of events: 158
+CONSOLE(27/03/09 18:46:59)> ev
+Current number of events: 432
+CONSOLE(27/03/09 18:47:06)> ev
+Current number of events: 757
+CONSOLE(27/03/09 18:47:10)> ev
+Current number of events: 933
+Data file closed.
+
+pedestal run #5 completed (1000 event(s))
+Time for run 22.27 seconds, trigger rate 44.91 Hz.
+Run size 156 MByte, data rate 7.0 MByte/s.
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(30/03/09 09:42:53)> fgain
+CONSOLE(30/03/09 09:42:55)> fgain 2
+CONSOLE(30/03/09 09:42:59)> fgain 
+CONSOLE(30/03/09 09:43:01)> fgain 1
+CONSOLE(30/03/09 09:43:04)> fgain 1.2
+CONSOLE(30/03/09 09:43:05)> fgain
+CONSOLE(30/03/09 09:43:08)> fgain 1
+CONSOLE(30/03/09 09:43:10)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 1000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(30/03/09 09:43:50)> faverage 30
+CONSOLE(30/03/09 09:43:52)> faver
+CONSOLE(30/03/09 09:44:31)> ftargert
+Unknown command: ftargert
+CONSOLE(30/03/09 09:44:33)> ftarg
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+Board 1, chip 0, channel 0: 0.000000
+Board 1, chip 0, channel 1: 0.000000
+Board 1, chip 0, channel 2: 0.000000
+Board 1, chip 0, channel 3: 0.000000
+Board 1, chip 0, channel 4: 0.000000
+Board 1, chip 0, channel 5: 0.000000
+Board 1, chip 0, channel 6: 0.000000
+Board 1, chip 0, channel 7: 0.000000
+Board 1, chip 0, channel 8: 0.000000
+Board 1, chip 0, channel 9: 0.000000
+Board 1, chip 1, channel 0: 0.000000
+Board 1, chip 1, channel 1: 0.000000
+Board 1, chip 1, channel 2: 0.000000
+Board 1, chip 1, channel 3: 0.000000
+Board 1, chip 1, channel 4: 0.000000
+Board 1, chip 1, channel 5: 0.000000
+Board 1, chip 1, channel 6: 0.000000
+Board 1, chip 1, channel 7: 0.000000
+Board 1, chip 1, channel 8: 0.000000
+Board 1, chip 1, channel 9: 0.000000
+Board 2, chip 0, channel 0: 0.000000
+Board 2, chip 0, channel 1: 0.000000
+Board 2, chip 0, channel 2: 0.000000
+Board 2, chip 0, channel 3: 0.000000
+Board 2, chip 0, channel 4: 0.000000
+Board 2, chip 0, channel 5: 0.000000
+Board 2, chip 0, channel 6: 0.000000
+Board 2, chip 0, channel 7: 0.000000
+Board 2, chip 0, channel 8: 0.000000
+Board 2, chip 0, channel 9: 0.000000
+Board 2, chip 1, channel 0: 0.000000
+Board 2, chip 1, channel 1: 0.000000
+Board 2, chip 1, channel 2: 0.000000
+Board 2, chip 1, channel 3: 0.000000
+Board 2, chip 1, channel 4: 0.000000
+Board 2, chip 1, channel 5: 0.000000
+Board 2, chip 1, channel 6: 0.000000
+Board 2, chip 1, channel 7: 0.000000
+Board 2, chip 1, channel 8: 0.000000
+Board 2, chip 1, channel 9: 0.000000
+Board 3, chip 0, channel 0: 0.000000
+Board 3, chip 0, channel 1: 0.000000
+Board 3, chip 0, channel 2: 0.000000
+Board 3, chip 0, channel 3: 0.000000
+Board 3, chip 0, channel 4: 0.000000
+Board 3, chip 0, channel 5: 0.000000
+Board 3, chip 0, channel 6: 0.000000
+Board 3, chip 0, channel 7: 0.000000
+Board 3, chip 0, channel 8: 0.000000
+Board 3, chip 0, channel 9: 0.000000
+Board 3, chip 1, channel 0: 0.000000
+Board 3, chip 1, channel 1: 0.000000
+Board 3, chip 1, channel 2: 0.000000
+Board 3, chip 1, channel 3: 0.000000
+Board 3, chip 1, channel 4: 0.000000
+Board 3, chip 1, channel 5: 0.000000
+Board 3, chip 1, channel 6: 0.000000
+Board 3, chip 1, channel 7: 0.000000
+Board 3, chip 1, channel 8: 0.000000
+Board 3, chip 1, channel 9: 0.000000
+CONSOLE(30/03/09 09:44:38)> fmode
+Unknown command: fmode
+CONSOLE(30/03/09 09:44:40)> fmo
+Feedback off.
+CONSOLE(30/03/09 09:44:43)> b 0
+CONSOLE(30/03/09 09:44:45)> ftar
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+CONSOLE(30/03/09 09:44:52)> fmode
+Feedback off.
+CONSOLE(30/03/09 09:44:56)> ftarge
+Unknown command: ftarge
+CONSOLE(30/03/09 09:44:57)> t
+Usage: trigger <on|off>
+CONSOLE(30/03/09 09:44:59)> fmode targ
+CONSOLE(30/03/09 09:45:01)> fmode
+Feedback acquiring new targets.
+CONSOLE(30/03/09 09:45:24)> take d 50
+DRS sampling frequency of board 0 not set!
+CONSOLE(30/03/09 09:45:26)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 1.000 GHz
+CONSOLE(30/03/09 09:45:31)> take d 50
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Hardware trigger of board 0 enabled
+
+Starting run #0 (data) on "DUMMY" with 50 event(s)
+
+Data file "/ct3data/20090330/20090330_00000000_DUMMY_d_0.raw" opened.
+HV Feedback: New targets set, switching off.
+Data file closed.
+
+data run #0 completed (50 event(s))
+Time for run 0.46 seconds, trigger rate 109.63 Hz.
+Run size 1 MByte, data rate 4.3 MByte/s.
+CONSOLE(30/03/09 09:45:43)> ev
+DAQ not active.
+CONSOLE(30/03/09 09:45:48)> fmode
+Feedback off.
+CONSOLE(30/03/09 09:45:50)> ftar
+Board 0, chip 0, channel 0: 0.000000
+Board 0, chip 0, channel 1: 0.000000
+Board 0, chip 0, channel 2: 0.000000
+Board 0, chip 0, channel 3: 0.000000
+Board 0, chip 0, channel 4: 0.000000
+Board 0, chip 0, channel 5: 0.000000
+Board 0, chip 0, channel 6: 0.000000
+Board 0, chip 0, channel 7: 0.000000
+Board 0, chip 0, channel 8: 0.000000
+Board 0, chip 0, channel 9: 0.000000
+Board 0, chip 1, channel 0: 0.000000
+Board 0, chip 1, channel 1: 0.000000
+Board 0, chip 1, channel 2: 0.000000
+Board 0, chip 1, channel 3: 0.000000
+Board 0, chip 1, channel 4: 0.000000
+Board 0, chip 1, channel 5: 0.000000
+Board 0, chip 1, channel 6: 0.000000
+Board 0, chip 1, channel 7: 0.000000
+Board 0, chip 1, channel 8: 0.000000
+Board 0, chip 1, channel 9: 0.000000
+CONSOLE(30/03/09 09:48:46)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 5000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(30/03/09 09:59:48)> fmode target
+CONSOLE(30/03/09 09:59:49)> fmode
+Feedback acquiring new targets.
+CONSOLE(30/03/09 09:59:52)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 1.000 GHz
+Domino wave of board 1 is running at 1.000 GHz
+Domino wave of board 2 is running at 1.000 GHz
+Domino wave of board 3 is running at 0.999 GHz
+CONSOLE(30/03/09 09:59:54)> b 0
+CONSOLE(30/03/09 09:59:56)> take d 50
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Hardware trigger of board 0 enabled
+
+Starting run #0 (data) on "DUMMY" with 50 event(s)
+
+Data file "/ct3data/20090330/20090330_00000001_DUMMY_d_0.raw" opened.
+Data file closed.
+
+data run #1 completed (50 event(s))
+Time for run 0.42 seconds, trigger rate 117.99 Hz.
+Run size 1 MByte, data rate 4.6 MByte/s.
+CONSOLE(30/03/09 10:00:07)> fmode
+Feedback acquiring new targets.
+CONSOLE(30/03/09 10:00:26)> fave
+CONSOLE(30/03/09 10:00:31)> tk
+Unknown command: tk
+CONSOLE(30/03/09 10:00:35)> take d 100
+Hardware trigger of board 0 enabled
+
+Starting run #1 (data) on "DUMMY" with 100 event(s)
+
+Data file "/ct3data/20090330/20090330_00000002_DUMMY_d_0.raw" opened.
+Data file closed.
+
+data run #2 completed (100 event(s))
+Time for run 0.85 seconds, trigger rate 117.68 Hz.
+Run size 3 MByte, data rate 4.6 MByte/s.
+CONSOLE(30/03/09 10:01:04)> fave
+CONSOLE(30/03/09 10:01:07)> take d 100
+Hardware trigger of board 0 enabled
+
+Starting run #2 (data) on "DUMMY" with 100 event(s)
+
+Data file "/ct3data/20090330/20090330_00000003_DUMMY_d_0.raw" opened.
+Data file closed.
+
+data run #3 completed (100 event(s))
+Time for run 0.85 seconds, trigger rate 117.58 Hz.
+Run size 3 MByte, data rate 4.6 MByte/s.
+CONSOLE(30/03/09 10:01:14)> faver
+CONSOLE(30/03/09 10:01:22)> take d 500
+Hardware trigger of board 0 enabled
+
+Starting run #3 (data) on "DUMMY" with 500 event(s)
+
+Data file "/ct3data/20090330/20090330_00000004_DUMMY_d_0.raw" opened.
+HV Feedback: New targets set, switching off.
+Data file closed.
+
+data run #4 completed (500 event(s))
+Time for run 3.60 seconds, trigger rate 139.03 Hz.
+Run size 19 MByte, data rate 5.4 MByte/s.
+CONSOLE(30/03/09 10:01:32)> fmode
+Feedback off.
+CONSOLE(30/03/09 10:01:34)> ftarg
+Board 0, chip 0, channel 0: -0.099000
+Board 0, chip 0, channel 1: 0.034000
+Board 0, chip 0, channel 2: -0.120000
+Board 0, chip 0, channel 3: 0.179000
+Board 0, chip 0, channel 4: -0.037000
+Board 0, chip 0, channel 5: -0.158000
+Board 0, chip 0, channel 6: -0.159000
+Board 0, chip 0, channel 7: 0.109000
+Board 0, chip 0, channel 8: -0.470000
+Board 0, chip 0, channel 9: -0.176000
+Board 0, chip 1, channel 0: -0.024000
+Board 0, chip 1, channel 1: -0.079000
+Board 0, chip 1, channel 2: -0.071000
+Board 0, chip 1, channel 3: -0.015000
+Board 0, chip 1, channel 4: -0.037000
+Board 0, chip 1, channel 5: 0.071000
+Board 0, chip 1, channel 6: -0.086000
+Board 0, chip 1, channel 7: -0.045000
+Board 0, chip 1, channel 8: 0.635000
+Board 0, chip 1, channel 9: -0.002000
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+SOCKET(30/03/09 10:03:23)> stop
+Nothing to stop
+SOCKET(30/03/09 10:03:23)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+Disconnected from client.
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+SOCKET(30/03/09 10:34:51)> stop
+Nothing to stop
+SOCKET(30/03/09 10:34:51)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+SOCKET(30/03/09 10:35:06)> help
+SOCKET(30/03/09 10:35:21)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+SOCKET(30/03/09 10:36:24)> stop
+Nothing to stop
+SOCKET(30/03/09 10:36:24)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+CONSOLE(30/03/09 10:37:28)> 
+CONSOLE(30/03/09 10:37:30)> uptime
+0:37:49
+CONSOLE(30/03/09 10:37:38)> status
+********** DAQ STATUS **********
+ DAQ: stopped
+ Run number: -1
+ Run type: d
+ Event: 500
+ Requested events per run: 500
+ Storage directory: /ct3data
+ Disk space: 210824 MByte
+ Socket state: connected
+ Total number of CMC boards: 4
+ Active CMC boards: 1
+ Frequency of board 0 set: yes
+
+********** DRS STATUS **********
+ Mezz. board index:    0
+ Slot:                 3 upper
+ Chip version:         DRS2
+ Board version:        3
+ Serial number:        122
+ Firmware revision:    5268
+ Temperature:          27.5 C
+ Status reg.:          0X00000006
+   New Freq1 ready
+   New Freq2 ready
+ Control reg.:         0X00420004
+   DMODE circular
+   ENABLE_TRIGGER
+ Trigger bus:          0X000007FF
+ Domino wave stopped
+CONSOLE(30/03/09 10:37:57)> rr
+Unknown command: rr
+CONSOLE(30/03/09 10:37:59)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+CONSOLE(30/03/09 10:40:09)> 
+Disconnected from client.
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+SOCKET(30/03/09 10:40:31)> stop
+Nothing to stop
+SOCKET(30/03/09 10:40:31)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 -43.0 -39.0 -41.0 -48.0 -38.0 -58.0 -58.0 -45.0 -49.0 -53.0 -52.0 -44.0 -49.0 -44.0 -41.0 -30.0 -43.0 -68.0 -55.0 -57.0 -52.0 -48.0 -37.0 -54.0 -42.0 -40.0 -35.0 -45.0 -75.0 -58.0 -67.0 -62.0 -43.0 -43.0 -43.0 -48.0 -50.0 -56.0 -42.0 -58.0 -45.0 -50.0 -44.0 -44.0 -32.0 -66.0 -48.0 -46.0 -60.0 -44.0 -44.0 -42.0 -57.0 -45.0 -49.0 -58.0 -50.0 -49.0 -43.0 -47.0 -45.0 -52.0 -52.0 -64.0 -50.0 -36.0 -55.0 -53.0 -46.0 -41.0 -55.0 -66.0 -53.0 -67.0 -42.0 -51.0 -54.0 -56.0 -69.0 -71.0 -76.0 -49.0 -61.0 -36.0 -33.0 -55.0 -52.0 -37.0 -47.0 -65.0 -54.0 -51.0 -62.0 -48.0 -46.0 -55.0 -48.0 -56.0 -36.0 -55.0 -52.0 -66.0 -50.0 -59.0 -38.0 -61.0 -47.0 -49.0 -59.0 -47.0 -46.0 -43.0 -47.0 -53.0 -53.0 -53.0 -44.0 -53.0 -60.0 -49.0 -45.0 -47.0 -42.0 -52.0 -47.0 -51.0 -51.0 -58.0 -45.0 -51.0 -49.0 -54.0 -53.0 -35.0 -44.0 -44.0 -41.0 -68.0 -57.0 -49.0 -52.0 -44.0 -52.0 -47.0 -58.0 -54.0 -46.0 -53.0 -37.0 -39.0 -44.0 -48.0 -56.0 -52.0 -55.0 -49.0 -51.0 -63.0 -55.0 -42.0 -48.0 -62.0 -62.0 -57.0 -43.0 -44.0 -41.0 -45.0 -58.0 -50.0 -46.0 -47.0 -40.0 -55.0 -48.0 -51.0 -46.0 -57.0 -49.0 -48.0 -43.0 -33.0 -40.0 -58.0 -44.0 -53.0 -58.0 -46.0 -44.0 -33.0 -44.0 -48.0 -45.0 -67.0 -51.0 -72.0 -72.0 -38.0 -68.0 -42.0 -45.0 -45.0 -58.0 -60.0 -76.0 -69.0 -54.0 -69.0 -55.0 -40.0 -39.0 -38.0 -37.0 -47.0 -53.0 -68.0 -49.0 -50.0 -43.0 -50.0 -44.0 -48.0 -43.0 -62.0 -48.0 -55.0 -44.0 -54.0 -42.0 -59.0 -49.0 -44.0 -55.0 -65.0 -54.0 -54.0 -49.0 -61.0 -55.0 -68.0 -59.0 -57.0 -39.0 -41.0 -45.0 -43.0 -58.0 -63.0 -46.0 -65.0 -55.0 -47.0 -65.0 -58.0 -48.0 -49.0 -65.0 -62.0 -62.0 -54.0 -50.0 -40.0 -42.0 -50.0 -76.0 -57.0 -46.0 -74.0 -74.0 -56.0 -49.0 -65.0 -60.0 -41.0 -39.0 -46.0 -54.0 -70.0 -61.0 -51.0 -46.0 -50.0 -57.0 -52.0 -55.0 -53.0 -61.0 -55.0 -57.0 -45.0 -36.0 -47.0 -56.0 -61.0 -49.0 -61.0 -57.0 -50.0 -40.0 -56.0 -58.0 -54.0 -66.0 -52.0 -73.0 -56.0 -47.0 -61.0 -56.0 -60.0 -46.0 -58.0 -61.0 -59.0 -43.0 -48.0 -60.0 -54.0 -66.0 -65.0 -67.0 -48.0 -49.0 -57.0 -40.0 -56.0 -68.0 -49.0 -56.0 -74.0 -65.0 -65.0 -56.0 -47.0 -35.0 -41.0 -38.0 -39.0 -51.0 -64.0 -54.0 -53.0 -45.0 -44.0 -50.0 -43.0 -52.0 -67.0 -59.0 -62.0 -46.0 -38.0 -36.0 -35.0 -38.0 -66.0 -51.0 -53.0 -38.0 -57.0 -28.0 -54.0 -49.0 -61.0 -65.0 -45.0 -36.0 -43.0 -41.0 -65.0 -54.0 -46.0 -62.0 -47.0 -61.0 -79.0 -44.0 -61.0 -53.0 -40.0 -47.0 -62.0 -53.0 -39.0 -61.0 -39.0 -56.0 -60.0 -56.0 -50.0 -44.0 -51.0 -43.0 -60.0 -56.0 -56.0 -63.0 -48.0 -54.0 -41.0 -52.0 -50.0 -54.0 -58.0 -48.0 -49.0 -48.0 -45.0 -65.0 -67.0 -56.0 -47.0 -49.0 -52.0 -45.0 -50.0 -41.0 -47.0 -52.0 -65.0 -60.0 -42.0 -35.0 -39.0 -44.0 -50.0 -49.0 -72.0 -63.0 -54.0 -50.0 -44.0 -41.0 -49.0 -61.0 -67.0 -63.0 -54.0 -69.0 -68.0 -67.0 -52.0 -65.0 -57.0 -61.0 -65.0 -54.0 -67.0 -59.0 -43.0 -42.0 -61.0 -51.0 -51.0 -64.0 -55.0 -58.0 -54.0 -46.0 -43.0 -48.0 -36.0 -50.0 -50.0 -63.0 -61.0 -47.0 -70.0 -47.0 -48.0 -50.0 -38.0 -59.0 -46.0 -60.0 -48.0 -45.0 -46.0 -53.0 -46.0 -56.0 -50.0 -47.0 -54.0 -57.0 -45.0 -48.0 -46.0 -56.0 -61.0 -60.0 -65.0 -42.0 -42.0 -52.0 -50.0 -53.0 -66.0 -74.0 -66.0 -59.0 -48.0 -38.0 -43.0 -40.0 -69.0 -72.0 -64.0 -49.0 -47.0 -48.0 -41.0 -54.0 -53.0 -51.0 -52.0 -71.0 -51.0 -53.0 -58.0 -42.0 -51.0 -50.0 -45.0 -39.0 -57.0 -54.0 -48.0 -57.0 -52.0 -52.0 -45.0 -51.0 -41.0 -53.0 -71.0 -70.0 -48.0 -49.0 -49.0 -49.0 -58.0 -56.0 -62.0 -50.0 -51.0 -37.0 -55.0 -49.0 -79.0 -47.0 -50.0 -41.0 -71.0 -62.0 -45.0 -57.0 -50.0 -52.0 -75.0 -68.0 -59.0 -56.0 -44.0 -37.0 -43.0 -62.0 -47.0 -54.0 -48.0 -45.0 -57.0 -42.0 -41.0 -69.0 -49.0 -55.0 -45.0 -59.0 -54.0 -56.0 -51.0 -49.0 -47.0 -61.0 -58.0 -40.0 -62.0 -52.0 -44.0 -61.0 -45.0 -48.0 -44.0 -41.0 -60.0 -48.0 -53.0 -58.0 -39.0 -47.0 -27.0 -51.0 -64.0 -54.0 -46.0 -45.0 -57.0 -45.0 -47.0 -40.0 -46.0 -50.0 -52.0 -62.0 -49.0 -41.0 -52.0 -36.0 -40.0 -47.0 -57.0 -40.0 -44.0 -44.0 -55.0 -36.0 -74.0 -55.0 -50.0 -51.0 -68.0 -67.0 -54.0 -35.0 -41.0 -36.0 -46.0 -47.0 -48.0 -55.0 -51.0 -59.0 -42.0 -60.0 -65.0 -46.0 -38.0 -48.0 -46.0 -82.0 -52.0 -59.0 -45.0 -46.0 -58.0 -52.0 -56.0 -63.0 -66.0 -47.0 -48.0 -54.0 -45.0 -47.0 -58.0 -40.0 -53.0 -51.0 -53.0 -47.0 -51.0 -50.0 -54.0 -50.0 -60.0 -56.0 -54.0 -47.0 -50.0 -54.0 -58.0 -65.0 -51.0 -45.0 -67.0 -49.0 -61.0 -45.0 -46.0 -48.0 -59.0 -46.0 -62.0 -50.0 -49.0 -36.0 -33.0 -39.0 -50.0 -53.0 -46.0 -49.0 -51.0 -56.0 -48.0 -57.0 -52.0 -41.0 -55.0 -40.0 -51.0 -42.0 -55.0 -53.0 -53.0 -53.0 -54.0 -59.0 -54.0 -49.0 -67.0 -59.0 -38.0 -50.0 -64.0 -44.0 -40.0 -50.0 -56.0 -72.0 -65.0 -48.0 -44.0 -59.0 -38.0 -54.0 -58.0 -52.0 -51.0 -51.0 -36.0 -50.0 -48.0 -48.0 -45.0 -50.0 -71.0 -51.0 -58.0 -45.0 -41.0 -40.0 -52.0 -58.0 -47.0 -70.0 -50.0 -53.0 -51.0 -48.0 -47.0 -59.0 -70.0 -40.0 -72.0 -48.0 -51.0 -59.0 -56.0 -46.0 -57.0 -48.0 -31.0 -40.0 -42.0 -42.0 -51.0 -40.0 -52.0 -72.0 -46.0 -39.0 -43.0 -56.0 -56.0 -48.0 -45.0 -54.0 -52.0 -55.0 -49.0 -59.0 -47.0 -63.0 -51.0 -42.0 -42.0 -56.0 -64.0 -45.0 -67.0 -56.0 -73.0 -52.0 -47.0 -47.0 -47.0 -36.0 -32.0 -35.0 -55.0 -56.0 -47.0 -40.0 -60.0 -55.0 -42.0 -62.0 -56.0 -49.0 -58.0 -48.0 -46.0 -44.0 -60.0 -48.0 -38.0 -44.0 -65.0 -50.0 -56.0 -64.0 -60.0 -52.0 -62.0 -44.0 -42.0 -39.0 -38.0 -47.0 -41.0 -56.0 -54.0 -37.0 -45.0 -45.0 -44.0 -56.0 -49.0 -46.0 -44.0 -45.0 -38.0 -36.0 -46.0 -51.0 -43.0 -49.0 -47.0 -48.0 -51.0 -49.0 -46.0 -37.0 -41.0 -55.0 -58.0 -59.0 -67.0 -45.0 -28.0 -34.0 -43.0 -49.0 -58.0 -59.0 -44.0 -39.0 -46.0 -50.0 -61.0 -57.0 -35.0 -33.0 -54.0 -65.0 -72.0 -48.0 -47.0 -43.0 -52.0 -49.0 -44.0 -51.0 -52.0 -56.0 -54.0 -44.0 -59.0 -50.0 -52.0 -43.0 -41.0 -34.0 -50.0 -47.0 -57.0 -48.0 -57.0 -51.0 -54.0 -30.0 -45.0 -46.0 -48.0 -43.0 -59.0 -66.0 -53.0 -44.0 -49.0 -48.0 -39.0 -42.0 -74.0 -66.0 -68.0 -72.0 -82.0 -152.0 -179.0 -168.0 -232.0 -190.0 -81.0 54.0 105.0 139.0 58.0 51.0 20.0 22.0 2.0 -34.0 -66.0 -85.0 -91.0 -60.0 -32.0 -12.0 -9.0 18.0 76.0 130.0 135.0 103.0 -25.0 -109.0 -154.0 -174.0 -152.0 -152.0 -144.0 -129.0 -97.0 -56.0 -29.0 -21.0 -32.0 -48.0 -48.0 -60.0 -70.0 -63.0 -61.0 -88.0 -62.0 -54.0 -47.0 -42.0 -28.0 -25.0 -24.0 -39.0 -41.0 -60.0 -62.0 -52.0 -56.0 -72.0 -64.0 -61.0 -58.0 -53.0 -53.0 -50.0 -48.0 -45.0 -66.0 -68.0 -65.0 -52.0 -66.0 -50.0 -52.0 -54.0 -46.0 -46.0 -35.0 -28.0 -12.0 -44.0 -73.0 -69.0 -4.0 42.0 72.0 50.0 32.0 15.0 71.0 17.0 ==END==
+SOCKET(30/03/09 10:40:31)> start
+Domino wave started
+Disconnected from client.
+CONSOLE(30/03/09 10:45:23)> read 5 6 7
+Error: Board 5 does not exist
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 5000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+SOCKET(30/03/09 10:46:17)> stop
+Nothing to stop
+SOCKET(30/03/09 10:46:17)> read 0 0 0
+DRS sampling frequency of board 0 not set!
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 3802.0 3825.0 3827.0 3844.0 3822.0 3835.0 3823.0 3838.0 3838.0 3846.0 3833.0 3829.0 3833.0 3848.0 3836.0 3843.0 3849.0 3842.0 3816.0 3832.0 3840.0 3854.0 3830.0 3841.0 3845.0 3839.0 3836.0 3852.0 3837.0 3843.0 3818.0 3824.0 3851.0 3850.0 3840.0 3839.0 3822.0 3828.0 3827.0 3850.0 3833.0 3847.0 3830.0 3841.0 3827.0 3844.0 3823.0 3842.0 3845.0 3843.0 3813.0 3843.0 3839.0 3849.0 3834.0 3837.0 3831.0 3833.0 3821.0 3837.0 3818.0 3830.0 3841.0 3830.0 3836.0 3842.0 3834.0 3830.0 3836.0 3839.0 3833.0 3846.0 3832.0 3851.0 3824.0 3836.0 3842.0 3829.0 3832.0 3841.0 3841.0 3838.0 3832.0 3833.0 3828.0 3829.0 3830.0 3841.0 3826.0 3853.0 3830.0 3835.0 3851.0 3844.0 3828.0 3841.0 3846.0 3839.0 3841.0 3837.0 3832.0 3838.0 3828.0 3846.0 3838.0 3835.0 3843.0 3844.0 3842.0 3846.0 3826.0 3834.0 3834.0 3833.0 3825.0 3837.0 3857.0 3829.0 3826.0 3824.0 3830.0 3849.0 3837.0 3843.0 3843.0 3850.0 3839.0 3848.0 3821.0 3851.0 3815.0 3826.0 3807.0 3830.0 3839.0 3839.0 3840.0 3820.0 3824.0 3839.0 3827.0 3838.0 3828.0 3850.0 3829.0 3817.0 3828.0 3840.0 3830.0 3841.0 3822.0 3842.0 3837.0 3842.0 3828.0 3845.0 3832.0 3836.0 3816.0 3844.0 3822.0 3842.0 3832.0 3836.0 3838.0 3834.0 3836.0 3829.0 3810.0 3842.0 3829.0 3847.0 3836.0 3838.0 3812.0 3832.0 3843.0 3846.0 3828.0 3849.0 3827.0 3821.0 3832.0 3840.0 3830.0 3849.0 3833.0 3822.0 3823.0 3831.0 3820.0 3836.0 3853.0 3831.0 3827.0 3822.0 3857.0 3846.0 3844.0 3859.0 3831.0 3851.0 3837.0 3835.0 3842.0 3844.0 3819.0 3847.0 3820.0 3848.0 3824.0 3841.0 3835.0 3847.0 3821.0 3838.0 3837.0 3826.0 3836.0 3836.0 3835.0 3844.0 3820.0 3861.0 3839.0 3853.0 3835.0 3840.0 3851.0 3869.0 3836.0 3848.0 3814.0 3852.0 3826.0 3838.0 3831.0 3845.0 3853.0 3831.0 3847.0 3838.0 3832.0 3844.0 3833.0 3824.0 3820.0 3856.0 3828.0 3841.0 3820.0 3840.0 3824.0 3859.0 3847.0 3832.0 3840.0 3845.0 3831.0 3850.0 3841.0 3835.0 3837.0 3836.0 3839.0 3830.0 3840.0 3850.0 3831.0 3835.0 3851.0 3838.0 3830.0 3843.0 3839.0 3843.0 3830.0 3835.0 3821.0 3859.0 3822.0 3853.0 3835.0 3850.0 3838.0 3842.0 3829.0 3847.0 3833.0 3842.0 3823.0 3835.0 3837.0 3823.0 3847.0 3839.0 3827.0 3838.0 3847.0 3836.0 3823.0 3837.0 3831.0 3848.0 3832.0 3836.0 3834.0 3842.0 3828.0 3844.0 3827.0 3835.0 3827.0 3854.0 3836.0 3846.0 3841.0 3850.0 3850.0 3835.0 3838.0 3842.0 3841.0 3831.0 3831.0 3835.0 3828.0 3838.0 3816.0 3835.0 3836.0 3847.0 3838.0 3857.0 3834.0 3849.0 3826.0 3851.0 3838.0 3858.0 3824.0 3849.0 3832.0 3841.0 3830.0 3837.0 3834.0 3857.0 3833.0 3840.0 3839.0 3839.0 3836.0 3840.0 3840.0 3854.0 3827.0 3834.0 3824.0 3854.0 3839.0 3840.0 3853.0 3858.0 3831.0 3850.0 3824.0 3852.0 3838.0 3838.0 3836.0 3852.0 3850.0 3854.0 3827.0 3837.0 3848.0 3861.0 3821.0 3846.0 3837.0 3864.0 3823.0 3857.0 3835.0 3842.0 3832.0 3836.0 3805.0 3828.0 3838.0 3847.0 3818.0 3830.0 3841.0 3841.0 3826.0 3836.0 3836.0 3832.0 3848.0 3859.0 3833.0 3847.0 3821.0 3848.0 3833.0 3850.0 3822.0 3832.0 3831.0 3835.0 3837.0 3823.0 3813.0 3845.0 3835.0 3839.0 3839.0 3850.0 3858.0 3838.0 3830.0 3852.0 3839.0 3844.0 3823.0 3838.0 3828.0 3842.0 3826.0 3854.0 3824.0 3840.0 3834.0 3834.0 3851.0 3858.0 3828.0 3851.0 3824.0 3865.0 3842.0 3840.0 3834.0 3843.0 3840.0 3851.0 3835.0 3837.0 3836.0 3836.0 3828.0 3845.0 3821.0 3853.0 3840.0 3849.0 3818.0 3824.0 3837.0 3852.0 3836.0 3851.0 3848.0 3837.0 3838.0 3853.0 3837.0 3848.0 3843.0 3851.0 3828.0 3862.0 3846.0 3848.0 3828.0 3861.0 3846.0 3850.0 3853.0 3841.0 3828.0 3854.0 3854.0 3868.0 3835.0 3858.0 3845.0 3857.0 3836.0 3858.0 3840.0 3852.0 3841.0 3866.0 3836.0 3849.0 3844.0 3848.0 3846.0 3842.0 3831.0 3844.0 3851.0 3830.0 3854.0 3866.0 3845.0 3846.0 3824.0 3854.0 3837.0 3855.0 3826.0 3853.0 3830.0 3840.0 3845.0 3858.0 3847.0 3851.0 3848.0 3847.0 3831.0 3851.0 3842.0 3848.0 3832.0 3845.0 3834.0 3849.0 3841.0 3850.0 3852.0 3860.0 3851.0 3844.0 3840.0 3850.0 3846.0 3852.0 3823.0 3864.0 3845.0 3844.0 3860.0 3840.0 3853.0 3847.0 3858.0 3857.0 3853.0 3855.0 3849.0 3846.0 3842.0 3839.0 3838.0 3860.0 3844.0 3852.0 3846.0 3853.0 3844.0 3855.0 3849.0 3847.0 3855.0 3841.0 3849.0 3855.0 3842.0 3848.0 3835.0 3842.0 3839.0 3859.0 3848.0 3857.0 3854.0 3861.0 3844.0 3837.0 3838.0 3869.0 3827.0 3858.0 3846.0 3866.0 3848.0 3858.0 3845.0 3866.0 3839.0 3857.0 3848.0 3855.0 3854.0 3853.0 3857.0 3872.0 3848.0 3847.0 3860.0 3863.0 3847.0 3866.0 3858.0 3861.0 3860.0 3861.0 3850.0 3861.0 3861.0 3863.0 3830.0 3867.0 3858.0 3853.0 3850.0 3858.0 3854.0 3853.0 3841.0 3858.0 3839.0 3865.0 3847.0 3866.0 3849.0 3865.0 3839.0 3877.0 3855.0 3873.0 3848.0 3859.0 3847.0 3862.0 3847.0 3850.0 3852.0 3870.0 3843.0 3863.0 3850.0 3867.0 3837.0 3867.0 3858.0 3866.0 3842.0 3845.0 3842.0 3848.0 3854.0 3865.0 3842.0 3870.0 3856.0 3857.0 3860.0 3845.0 3849.0 3859.0 3839.0 3863.0 3855.0 3862.0 3850.0 3856.0 3855.0 3873.0 3843.0 3865.0 3853.0 3864.0 3866.0 3852.0 3865.0 3863.0 3849.0 3856.0 3848.0 3862.0 3847.0 3863.0 3845.0 3860.0 3852.0 3876.0 3859.0 3855.0 3860.0 3858.0 3851.0 3862.0 3842.0 3856.0 3850.0 3857.0 3861.0 3885.0 3857.0 3861.0 3863.0 3862.0 3854.0 3863.0 3846.0 3881.0 3867.0 3861.0 3850.0 3851.0 3854.0 3861.0 3845.0 3864.0 3845.0 3855.0 3835.0 3874.0 3841.0 3835.0 3850.0 3856.0 3847.0 3872.0 3864.0 3859.0 3849.0 3855.0 3849.0 3861.0 3852.0 3858.0 3862.0 3863.0 3850.0 3864.0 3853.0 3851.0 3854.0 3857.0 3843.0 3857.0 3850.0 3852.0 3865.0 3857.0 3862.0 3845.0 3837.0 3856.0 3845.0 3874.0 3858.0 3841.0 3843.0 3855.0 3864.0 3858.0 3835.0 3835.0 3855.0 3854.0 3858.0 3855.0 3845.0 3858.0 3860.0 3846.0 3849.0 3866.0 3861.0 3860.0 3854.0 3854.0 3852.0 3863.0 3845.0 3849.0 3843.0 3860.0 3854.0 3838.0 3850.0 3859.0 3836.0 3875.0 3848.0 3861.0 3829.0 3849.0 3863.0 3857.0 3849.0 3843.0 3840.0 3843.0 3856.0 3855.0 3860.0 3849.0 3845.0 3850.0 3849.0 3856.0 3849.0 3868.0 3845.0 3858.0 3853.0 3859.0 3850.0 3838.0 3823.0 3846.0 3848.0 3855.0 3853.0 3858.0 3812.0 3844.0 3862.0 3839.0 3831.0 3864.0 3837.0 3854.0 3825.0 3859.0 3849.0 3847.0 3839.0 3857.0 3840.0 3879.0 3836.0 3847.0 3840.0 3838.0 3834.0 3838.0 3844.0 3851.0 3842.0 3857.0 3848.0 3863.0 3845.0 3852.0 3860.0 3846.0 3849.0 3853.0 3851.0 3847.0 3836.0 3842.0 3848.0 3843.0 3848.0 3848.0 3841.0 3855.0 3832.0 3859.0 3829.0 3858.0 3839.0 3845.0 3847.0 3859.0 3856.0 3847.0 3842.0 3852.0 3828.0 3848.0 3844.0 3850.0 3849.0 3855.0 3840.0 3852.0 3868.0 3841.0 3835.0 3844.0 3837.0 3829.0 3837.0 3860.0 3825.0 3843.0 3846.0 3849.0 3852.0 3852.0 3835.0 3850.0 3838.0 3837.0 3852.0 3845.0 3856.0 3844.0 3861.0 3841.0 3839.0 3850.0 3830.0 3851.0 3853.0 3858.0 3828.0 3859.0 3843.0 3852.0 3833.0 3845.0 3842.0 3851.0 3850.0 3844.0 3841.0 3842.0 3848.0 3851.0 3856.0 3871.0 3878.0 3887.0 3887.0 3864.0 3835.0 3815.0 3790.0 3809.0 3809.0 3844.0 3823.0 3832.0 3834.0 3861.0 3842.0 3860.0 3838.0 3831.0 3836.0 3836.0 3821.0 3804.0 3789.0 3803.0 3805.0 3835.0 3869.0 3882.0 3874.0 3865.0 3858.0 3843.0 3837.0 3837.0 3825.0 3844.0 3841.0 3850.0 3855.0 3854.0 3831.0 3848.0 3841.0 3850.0 3846.0 3837.0 3853.0 3835.0 3829.0 3837.0 3828.0 3848.0 3828.0 3839.0 3834.0 3831.0 3823.0 3826.0 3845.0 3842.0 3840.0 3836.0 3829.0 3843.0 3827.0 3836.0 3827.0 3837.0 3823.0 3844.0 3835.0 3831.0 3844.0 3843.0 3832.0 3844.0 3823.0 3829.0 3824.0 3842.0 3840.0 3811.0 3811.0 3811.0 3814.0 3831.0 3810.0 3812.0 3818.0 3836.0 ==END==
+SOCKET(30/03/09 10:46:17)> start
+DRS sampling frequency of board 0 not set!
+SOCKET(30/03/09 10:46:23)> stop
+Nothing to stop
+SOCKET(30/03/09 10:46:23)> read 0 0 0
+DRS sampling frequency of board 0 not set!
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 3802.0 3825.0 3827.0 3844.0 3822.0 3835.0 3823.0 3838.0 3838.0 3846.0 3833.0 3829.0 3833.0 3848.0 3836.0 3843.0 3849.0 3842.0 3816.0 3832.0 3840.0 3854.0 3830.0 3841.0 3845.0 3839.0 3836.0 3852.0 3837.0 3843.0 3818.0 3824.0 3851.0 3850.0 3840.0 3839.0 3822.0 3828.0 3827.0 3850.0 3833.0 3847.0 3830.0 3841.0 3827.0 3844.0 3823.0 3842.0 3845.0 3843.0 3813.0 3843.0 3839.0 3849.0 3834.0 3837.0 3831.0 3833.0 3821.0 3837.0 3818.0 3830.0 3841.0 3830.0 3836.0 3842.0 3834.0 3830.0 3836.0 3839.0 3833.0 3846.0 3832.0 3851.0 3824.0 3836.0 3842.0 3829.0 3832.0 3841.0 3841.0 3838.0 3832.0 3833.0 3828.0 3829.0 3830.0 3841.0 3826.0 3853.0 3830.0 3835.0 3851.0 3844.0 3828.0 3841.0 3846.0 3839.0 3841.0 3837.0 3832.0 3838.0 3828.0 3846.0 3838.0 3835.0 3843.0 3844.0 3842.0 3846.0 3826.0 3834.0 3834.0 3833.0 3825.0 3837.0 3857.0 3829.0 3826.0 3824.0 3830.0 3849.0 3837.0 3843.0 3843.0 3850.0 3839.0 3848.0 3821.0 3851.0 3815.0 3826.0 3807.0 3830.0 3839.0 3839.0 3840.0 3820.0 3824.0 3839.0 3827.0 3838.0 3828.0 3850.0 3829.0 3817.0 3828.0 3840.0 3830.0 3841.0 3822.0 3842.0 3837.0 3842.0 3828.0 3845.0 3832.0 3836.0 3816.0 3844.0 3822.0 3842.0 3832.0 3836.0 3838.0 3834.0 3836.0 3829.0 3810.0 3842.0 3829.0 3847.0 3836.0 3838.0 3812.0 3832.0 3843.0 3846.0 3828.0 3849.0 3827.0 3821.0 3832.0 3840.0 3830.0 3849.0 3833.0 3822.0 3823.0 3831.0 3820.0 3836.0 3853.0 3831.0 3827.0 3822.0 3857.0 3846.0 3844.0 3859.0 3831.0 3851.0 3837.0 3835.0 3842.0 3844.0 3819.0 3847.0 3820.0 3848.0 3824.0 3841.0 3835.0 3847.0 3821.0 3838.0 3837.0 3826.0 3836.0 3836.0 3835.0 3844.0 3820.0 3861.0 3839.0 3853.0 3835.0 3840.0 3851.0 3869.0 3836.0 3848.0 3814.0 3852.0 3826.0 3838.0 3831.0 3845.0 3853.0 3831.0 3847.0 3838.0 3832.0 3844.0 3833.0 3824.0 3820.0 3856.0 3828.0 3841.0 3820.0 3840.0 3824.0 3859.0 3847.0 3832.0 3840.0 3845.0 3831.0 3850.0 3841.0 3835.0 3837.0 3836.0 3839.0 3830.0 3840.0 3850.0 3831.0 3835.0 3851.0 3838.0 3830.0 3843.0 3839.0 3843.0 3830.0 3835.0 3821.0 3859.0 3822.0 3853.0 3835.0 3850.0 3838.0 3842.0 3829.0 3847.0 3833.0 3842.0 3823.0 3835.0 3837.0 3823.0 3847.0 3839.0 3827.0 3838.0 3847.0 3836.0 3823.0 3837.0 3831.0 3848.0 3832.0 3836.0 3834.0 3842.0 3828.0 3844.0 3827.0 3835.0 3827.0 3854.0 3836.0 3846.0 3841.0 3850.0 3850.0 3835.0 3838.0 3842.0 3841.0 3831.0 3831.0 3835.0 3828.0 3838.0 3816.0 3835.0 3836.0 3847.0 3838.0 3857.0 3834.0 3849.0 3826.0 3851.0 3838.0 3858.0 3824.0 3849.0 3832.0 3841.0 3830.0 3837.0 3834.0 3857.0 3833.0 3840.0 3839.0 3839.0 3836.0 3840.0 3840.0 3854.0 3827.0 3834.0 3824.0 3854.0 3839.0 3840.0 3853.0 3858.0 3831.0 3850.0 3824.0 3852.0 3838.0 3838.0 3836.0 3852.0 3850.0 3854.0 3827.0 3837.0 3848.0 3861.0 3821.0 3846.0 3837.0 3864.0 3823.0 3857.0 3835.0 3842.0 3832.0 3836.0 3805.0 3828.0 3838.0 3847.0 3818.0 3830.0 3841.0 3841.0 3826.0 3836.0 3836.0 3832.0 3848.0 3859.0 3833.0 3847.0 3821.0 3848.0 3833.0 3850.0 3822.0 3832.0 3831.0 3835.0 3837.0 3823.0 3813.0 3845.0 3835.0 3839.0 3839.0 3850.0 3858.0 3838.0 3830.0 3852.0 3839.0 3844.0 3823.0 3838.0 3828.0 3842.0 3826.0 3854.0 3824.0 3840.0 3834.0 3834.0 3851.0 3858.0 3828.0 3851.0 3824.0 3865.0 3842.0 3840.0 3834.0 3843.0 3840.0 3851.0 3835.0 3837.0 3836.0 3836.0 3828.0 3845.0 3821.0 3853.0 3840.0 3849.0 3818.0 3824.0 3837.0 3852.0 3836.0 3851.0 3848.0 3837.0 3838.0 3853.0 3837.0 3848.0 3843.0 3851.0 3828.0 3862.0 3846.0 3848.0 3828.0 3861.0 3846.0 3850.0 3853.0 3841.0 3828.0 3854.0 3854.0 3868.0 3835.0 3858.0 3845.0 3857.0 3836.0 3858.0 3840.0 3852.0 3841.0 3866.0 3836.0 3849.0 3844.0 3848.0 3846.0 3842.0 3831.0 3844.0 3851.0 3830.0 3854.0 3866.0 3845.0 3846.0 3824.0 3854.0 3837.0 3855.0 3826.0 3853.0 3830.0 3840.0 3845.0 3858.0 3847.0 3851.0 3848.0 3847.0 3831.0 3851.0 3842.0 3848.0 3832.0 3845.0 3834.0 3849.0 3841.0 3850.0 3852.0 3860.0 3851.0 3844.0 3840.0 3850.0 3846.0 3852.0 3823.0 3864.0 3845.0 3844.0 3860.0 3840.0 3853.0 3847.0 3858.0 3857.0 3853.0 3855.0 3849.0 3846.0 3842.0 3839.0 3838.0 3860.0 3844.0 3852.0 3846.0 3853.0 3844.0 3855.0 3849.0 3847.0 3855.0 3841.0 3849.0 3855.0 3842.0 3848.0 3835.0 3842.0 3839.0 3859.0 3848.0 3857.0 3854.0 3861.0 3844.0 3837.0 3838.0 3869.0 3827.0 3858.0 3846.0 3866.0 3848.0 3858.0 3845.0 3866.0 3839.0 3857.0 3848.0 3855.0 3854.0 3853.0 3857.0 3872.0 3848.0 3847.0 3860.0 3863.0 3847.0 3866.0 3858.0 3861.0 3860.0 3861.0 3850.0 3861.0 3861.0 3863.0 3830.0 3867.0 3858.0 3853.0 3850.0 3858.0 3854.0 3853.0 3841.0 3858.0 3839.0 3865.0 3847.0 3866.0 3849.0 3865.0 3839.0 3877.0 3855.0 3873.0 3848.0 3859.0 3847.0 3862.0 3847.0 3850.0 3852.0 3870.0 3843.0 3863.0 3850.0 3867.0 3837.0 3867.0 3858.0 3866.0 3842.0 3845.0 3842.0 3848.0 3854.0 3865.0 3842.0 3870.0 3856.0 3857.0 3860.0 3845.0 3849.0 3859.0 3839.0 3863.0 3855.0 3862.0 3850.0 3856.0 3855.0 3873.0 3843.0 3865.0 3853.0 3864.0 3866.0 3852.0 3865.0 3863.0 3849.0 3856.0 3848.0 3862.0 3847.0 3863.0 3845.0 3860.0 3852.0 3876.0 3859.0 3855.0 3860.0 3858.0 3851.0 3862.0 3842.0 3856.0 3850.0 3857.0 3861.0 3885.0 3857.0 3861.0 3863.0 3862.0 3854.0 3863.0 3846.0 3881.0 3867.0 3861.0 3850.0 3851.0 3854.0 3861.0 3845.0 3864.0 3845.0 3855.0 3835.0 3874.0 3841.0 3835.0 3850.0 3856.0 3847.0 3872.0 3864.0 3859.0 3849.0 3855.0 3849.0 3861.0 3852.0 3858.0 3862.0 3863.0 3850.0 3864.0 3853.0 3851.0 3854.0 3857.0 3843.0 3857.0 3850.0 3852.0 3865.0 3857.0 3862.0 3845.0 3837.0 3856.0 3845.0 3874.0 3858.0 3841.0 3843.0 3855.0 3864.0 3858.0 3835.0 3835.0 3855.0 3854.0 3858.0 3855.0 3845.0 3858.0 3860.0 3846.0 3849.0 3866.0 3861.0 3860.0 3854.0 3854.0 3852.0 3863.0 3845.0 3849.0 3843.0 3860.0 3854.0 3838.0 3850.0 3859.0 3836.0 3875.0 3848.0 3861.0 3829.0 3849.0 3863.0 3857.0 3849.0 3843.0 3840.0 3843.0 3856.0 3855.0 3860.0 3849.0 3845.0 3850.0 3849.0 3856.0 3849.0 3868.0 3845.0 3858.0 3853.0 3859.0 3850.0 3838.0 3823.0 3846.0 3848.0 3855.0 3853.0 3858.0 3812.0 3844.0 3862.0 3839.0 3831.0 3864.0 3837.0 3854.0 3825.0 3859.0 3849.0 3847.0 3839.0 3857.0 3840.0 3879.0 3836.0 3847.0 3840.0 3838.0 3834.0 3838.0 3844.0 3851.0 3842.0 3857.0 3848.0 3863.0 3845.0 3852.0 3860.0 3846.0 3849.0 3853.0 3851.0 3847.0 3836.0 3842.0 3848.0 3843.0 3848.0 3848.0 3841.0 3855.0 3832.0 3859.0 3829.0 3858.0 3839.0 3845.0 3847.0 3859.0 3856.0 3847.0 3842.0 3852.0 3828.0 3848.0 3844.0 3850.0 3849.0 3855.0 3840.0 3852.0 3868.0 3841.0 3835.0 3844.0 3837.0 3829.0 3837.0 3860.0 3825.0 3843.0 3846.0 3849.0 3852.0 3852.0 3835.0 3850.0 3838.0 3837.0 3852.0 3845.0 3856.0 3844.0 3861.0 3841.0 3839.0 3850.0 3830.0 3851.0 3853.0 3858.0 3828.0 3859.0 3843.0 3852.0 3833.0 3845.0 3842.0 3851.0 3850.0 3844.0 3841.0 3842.0 3848.0 3851.0 3856.0 3871.0 3878.0 3887.0 3887.0 3864.0 3835.0 3815.0 3790.0 3809.0 3809.0 3844.0 3823.0 3832.0 3834.0 3861.0 3842.0 3860.0 3838.0 3831.0 3836.0 3836.0 3821.0 3804.0 3789.0 3803.0 3805.0 3835.0 3869.0 3882.0 3874.0 3865.0 3858.0 3843.0 3837.0 3837.0 3825.0 3844.0 3841.0 3850.0 3855.0 3854.0 3831.0 3848.0 3841.0 3850.0 3846.0 3837.0 3853.0 3835.0 3829.0 3837.0 3828.0 3848.0 3828.0 3839.0 3834.0 3831.0 3823.0 3826.0 3845.0 3842.0 3840.0 3836.0 3829.0 3843.0 3827.0 3836.0 3827.0 3837.0 3823.0 3844.0 3835.0 3831.0 3844.0 3843.0 3832.0 3844.0 3823.0 3829.0 3824.0 3842.0 3840.0 3811.0 3811.0 3811.0 3814.0 3831.0 3810.0 3812.0 3818.0 3836.0 ==END==
+SOCKET(30/03/09 10:46:23)> start
+DRS sampling frequency of board 0 not set!
+SOCKET(30/03/09 10:46:24)> stop
+Nothing to stop
+SOCKET(30/03/09 10:46:24)> read 0 0 0
+DRS sampling frequency of board 0 not set!
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 3802.0 3825.0 3827.0 3844.0 3822.0 3835.0 3823.0 3838.0 3838.0 3846.0 3833.0 3829.0 3833.0 3848.0 3836.0 3843.0 3849.0 3842.0 3816.0 3832.0 3840.0 3854.0 3830.0 3841.0 3845.0 3839.0 3836.0 3852.0 3837.0 3843.0 3818.0 3824.0 3851.0 3850.0 3840.0 3839.0 3822.0 3828.0 3827.0 3850.0 3833.0 3847.0 3830.0 3841.0 3827.0 3844.0 3823.0 3842.0 3845.0 3843.0 3813.0 3843.0 3839.0 3849.0 3834.0 3837.0 3831.0 3833.0 3821.0 3837.0 3818.0 3830.0 3841.0 3830.0 3836.0 3842.0 3834.0 3830.0 3836.0 3839.0 3833.0 3846.0 3832.0 3851.0 3824.0 3836.0 3842.0 3829.0 3832.0 3841.0 3841.0 3838.0 3832.0 3833.0 3828.0 3829.0 3830.0 3841.0 3826.0 3853.0 3830.0 3835.0 3851.0 3844.0 3828.0 3841.0 3846.0 3839.0 3841.0 3837.0 3832.0 3838.0 3828.0 3846.0 3838.0 3835.0 3843.0 3844.0 3842.0 3846.0 3826.0 3834.0 3834.0 3833.0 3825.0 3837.0 3857.0 3829.0 3826.0 3824.0 3830.0 3849.0 3837.0 3843.0 3843.0 3850.0 3839.0 3848.0 3821.0 3851.0 3815.0 3826.0 3807.0 3830.0 3839.0 3839.0 3840.0 3820.0 3824.0 3839.0 3827.0 3838.0 3828.0 3850.0 3829.0 3817.0 3828.0 3840.0 3830.0 3841.0 3822.0 3842.0 3837.0 3842.0 3828.0 3845.0 3832.0 3836.0 3816.0 3844.0 3822.0 3842.0 3832.0 3836.0 3838.0 3834.0 3836.0 3829.0 3810.0 3842.0 3829.0 3847.0 3836.0 3838.0 3812.0 3832.0 3843.0 3846.0 3828.0 3849.0 3827.0 3821.0 3832.0 3840.0 3830.0 3849.0 3833.0 3822.0 3823.0 3831.0 3820.0 3836.0 3853.0 3831.0 3827.0 3822.0 3857.0 3846.0 3844.0 3859.0 3831.0 3851.0 3837.0 3835.0 3842.0 3844.0 3819.0 3847.0 3820.0 3848.0 3824.0 3841.0 3835.0 3847.0 3821.0 3838.0 3837.0 3826.0 3836.0 3836.0 3835.0 3844.0 3820.0 3861.0 3839.0 3853.0 3835.0 3840.0 3851.0 3869.0 3836.0 3848.0 3814.0 3852.0 3826.0 3838.0 3831.0 3845.0 3853.0 3831.0 3847.0 3838.0 3832.0 3844.0 3833.0 3824.0 3820.0 3856.0 3828.0 3841.0 3820.0 3840.0 3824.0 3859.0 3847.0 3832.0 3840.0 3845.0 3831.0 3850.0 3841.0 3835.0 3837.0 3836.0 3839.0 3830.0 3840.0 3850.0 3831.0 3835.0 3851.0 3838.0 3830.0 3843.0 3839.0 3843.0 3830.0 3835.0 3821.0 3859.0 3822.0 3853.0 3835.0 3850.0 3838.0 3842.0 3829.0 3847.0 3833.0 3842.0 3823.0 3835.0 3837.0 3823.0 3847.0 3839.0 3827.0 3838.0 3847.0 3836.0 3823.0 3837.0 3831.0 3848.0 3832.0 3836.0 3834.0 3842.0 3828.0 3844.0 3827.0 3835.0 3827.0 3854.0 3836.0 3846.0 3841.0 3850.0 3850.0 3835.0 3838.0 3842.0 3841.0 3831.0 3831.0 3835.0 3828.0 3838.0 3816.0 3835.0 3836.0 3847.0 3838.0 3857.0 3834.0 3849.0 3826.0 3851.0 3838.0 3858.0 3824.0 3849.0 3832.0 3841.0 3830.0 3837.0 3834.0 3857.0 3833.0 3840.0 3839.0 3839.0 3836.0 3840.0 3840.0 3854.0 3827.0 3834.0 3824.0 3854.0 3839.0 3840.0 3853.0 3858.0 3831.0 3850.0 3824.0 3852.0 3838.0 3838.0 3836.0 3852.0 3850.0 3854.0 3827.0 3837.0 3848.0 3861.0 3821.0 3846.0 3837.0 3864.0 3823.0 3857.0 3835.0 3842.0 3832.0 3836.0 3805.0 3828.0 3838.0 3847.0 3818.0 3830.0 3841.0 3841.0 3826.0 3836.0 3836.0 3832.0 3848.0 3859.0 3833.0 3847.0 3821.0 3848.0 3833.0 3850.0 3822.0 3832.0 3831.0 3835.0 3837.0 3823.0 3813.0 3845.0 3835.0 3839.0 3839.0 3850.0 3858.0 3838.0 3830.0 3852.0 3839.0 3844.0 3823.0 3838.0 3828.0 3842.0 3826.0 3854.0 3824.0 3840.0 3834.0 3834.0 3851.0 3858.0 3828.0 3851.0 3824.0 3865.0 3842.0 3840.0 3834.0 3843.0 3840.0 3851.0 3835.0 3837.0 3836.0 3836.0 3828.0 3845.0 3821.0 3853.0 3840.0 3849.0 3818.0 3824.0 3837.0 3852.0 3836.0 3851.0 3848.0 3837.0 3838.0 3853.0 3837.0 3848.0 3843.0 3851.0 3828.0 3862.0 3846.0 3848.0 3828.0 3861.0 3846.0 3850.0 3853.0 3841.0 3828.0 3854.0 3854.0 3868.0 3835.0 3858.0 3845.0 3857.0 3836.0 3858.0 3840.0 3852.0 3841.0 3866.0 3836.0 3849.0 3844.0 3848.0 3846.0 3842.0 3831.0 3844.0 3851.0 3830.0 3854.0 3866.0 3845.0 3846.0 3824.0 3854.0 3837.0 3855.0 3826.0 3853.0 3830.0 3840.0 3845.0 3858.0 3847.0 3851.0 3848.0 3847.0 3831.0 3851.0 3842.0 3848.0 3832.0 3845.0 3834.0 3849.0 3841.0 3850.0 3852.0 3860.0 3851.0 3844.0 3840.0 3850.0 3846.0 3852.0 3823.0 3864.0 3845.0 3844.0 3860.0 3840.0 3853.0 3847.0 3858.0 3857.0 3853.0 3855.0 3849.0 3846.0 3842.0 3839.0 3838.0 3860.0 3844.0 3852.0 3846.0 3853.0 3844.0 3855.0 3849.0 3847.0 3855.0 3841.0 3849.0 3855.0 3842.0 3848.0 3835.0 3842.0 3839.0 3859.0 3848.0 3857.0 3854.0 3861.0 3844.0 3837.0 3838.0 3869.0 3827.0 3858.0 3846.0 3866.0 3848.0 3858.0 3845.0 3866.0 3839.0 3857.0 3848.0 3855.0 3854.0 3853.0 3857.0 3872.0 3848.0 3847.0 3860.0 3863.0 3847.0 3866.0 3858.0 3861.0 3860.0 3861.0 3850.0 3861.0 3861.0 3863.0 3830.0 3867.0 3858.0 3853.0 3850.0 3858.0 3854.0 3853.0 3841.0 3858.0 3839.0 3865.0 3847.0 3866.0 3849.0 3865.0 3839.0 3877.0 3855.0 3873.0 3848.0 3859.0 3847.0 3862.0 3847.0 3850.0 3852.0 3870.0 3843.0 3863.0 3850.0 3867.0 3837.0 3867.0 3858.0 3866.0 3842.0 3845.0 3842.0 3848.0 3854.0 3865.0 3842.0 3870.0 3856.0 3857.0 3860.0 3845.0 3849.0 3859.0 3839.0 3863.0 3855.0 3862.0 3850.0 3856.0 3855.0 3873.0 3843.0 3865.0 3853.0 3864.0 3866.0 3852.0 3865.0 3863.0 3849.0 3856.0 3848.0 3862.0 3847.0 3863.0 3845.0 3860.0 3852.0 3876.0 3859.0 3855.0 3860.0 3858.0 3851.0 3862.0 3842.0 3856.0 3850.0 3857.0 3861.0 3885.0 3857.0 3861.0 3863.0 3862.0 3854.0 3863.0 3846.0 3881.0 3867.0 3861.0 3850.0 3851.0 3854.0 3861.0 3845.0 3864.0 3845.0 3855.0 3835.0 3874.0 3841.0 3835.0 3850.0 3856.0 3847.0 3872.0 3864.0 3859.0 3849.0 3855.0 3849.0 3861.0 3852.0 3858.0 3862.0 3863.0 3850.0 3864.0 3853.0 3851.0 3854.0 3857.0 3843.0 3857.0 3850.0 3852.0 3865.0 3857.0 3862.0 3845.0 3837.0 3856.0 3845.0 3874.0 3858.0 3841.0 3843.0 3855.0 3864.0 3858.0 3835.0 3835.0 3855.0 3854.0 3858.0 3855.0 3845.0 3858.0 3860.0 3846.0 3849.0 3866.0 3861.0 3860.0 3854.0 3854.0 3852.0 3863.0 3845.0 3849.0 3843.0 3860.0 3854.0 3838.0 3850.0 3859.0 3836.0 3875.0 3848.0 3861.0 3829.0 3849.0 3863.0 3857.0 3849.0 3843.0 3840.0 3843.0 3856.0 3855.0 3860.0 3849.0 3845.0 3850.0 3849.0 3856.0 3849.0 3868.0 3845.0 3858.0 3853.0 3859.0 3850.0 3838.0 3823.0 3846.0 3848.0 3855.0 3853.0 3858.0 3812.0 3844.0 3862.0 3839.0 3831.0 3864.0 3837.0 3854.0 3825.0 3859.0 3849.0 3847.0 3839.0 3857.0 3840.0 3879.0 3836.0 3847.0 3840.0 3838.0 3834.0 3838.0 3844.0 3851.0 3842.0 3857.0 3848.0 3863.0 3845.0 3852.0 3860.0 3846.0 3849.0 3853.0 3851.0 3847.0 3836.0 3842.0 3848.0 3843.0 3848.0 3848.0 3841.0 3855.0 3832.0 3859.0 3829.0 3858.0 3839.0 3845.0 3847.0 3859.0 3856.0 3847.0 3842.0 3852.0 3828.0 3848.0 3844.0 3850.0 3849.0 3855.0 3840.0 3852.0 3868.0 3841.0 3835.0 3844.0 3837.0 3829.0 3837.0 3860.0 3825.0 3843.0 3846.0 3849.0 3852.0 3852.0 3835.0 3850.0 3838.0 3837.0 3852.0 3845.0 3856.0 3844.0 3861.0 3841.0 3839.0 3850.0 3830.0 3851.0 3853.0 3858.0 3828.0 3859.0 3843.0 3852.0 3833.0 3845.0 3842.0 3851.0 3850.0 3844.0 3841.0 3842.0 3848.0 3851.0 3856.0 3871.0 3878.0 3887.0 3887.0 3864.0 3835.0 3815.0 3790.0 3809.0 3809.0 3844.0 3823.0 3832.0 3834.0 3861.0 3842.0 3860.0 3838.0 3831.0 3836.0 3836.0 3821.0 3804.0 3789.0 3803.0 3805.0 3835.0 3869.0 3882.0 3874.0 3865.0 3858.0 3843.0 3837.0 3837.0 3825.0 3844.0 3841.0 3850.0 3855.0 3854.0 3831.0 3848.0 3841.0 3850.0 3846.0 3837.0 3853.0 3835.0 3829.0 3837.0 3828.0 3848.0 3828.0 3839.0 3834.0 3831.0 3823.0 3826.0 3845.0 3842.0 3840.0 3836.0 3829.0 3843.0 3827.0 3836.0 3827.0 3837.0 3823.0 3844.0 3835.0 3831.0 3844.0 3843.0 3832.0 3844.0 3823.0 3829.0 3824.0 3842.0 3840.0 3811.0 3811.0 3811.0 3814.0 3831.0 3810.0 3812.0 3818.0 3836.0 ==END==
+SOCKET(30/03/09 10:46:25)> start
+DRS sampling frequency of board 0 not set!
+SOCKET(30/03/09 10:46:37)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 1.000 GHz
+Domino wave of board 1 is running at 1.000 GHz
+Domino wave of board 2 is running at 1.000 GHz
+Domino wave of board 3 is running at 0.999 GHz
+SOCKET(30/03/09 10:46:40)> trig 1
+Usage: trigger <on|off>
+SOCKET(30/03/09 10:46:45)> trig on
+Hardware trigger of board 0 enabled
+Hardware trigger of board 1 enabled
+Hardware trigger of board 2 enabled
+Hardware trigger of board 3 enabled
+SOCKET(30/03/09 10:46:50)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:50)> read 0 0 0
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 1 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 2 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Reading response calibration file for board 3 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 182.0 41.0 50.0 47.0 49.0 40.0 51.0 54.0 41.0 40.0 35.0 32.0 44.0 45.0 42.0 49.0 40.0 32.0 38.0 37.0 37.0 43.0 40.0 41.0 47.0 45.0 36.0 40.0 25.0 23.0 36.0 45.0 53.0 43.0 35.0 35.0 34.0 29.0 47.0 39.0 38.0 43.0 37.0 37.0 46.0 50.0 42.0 32.0 31.0 33.0 39.0 47.0 43.0 54.0 44.0 44.0 35.0 41.0 36.0 45.0 34.0 29.0 47.0 36.0 33.0 40.0 31.0 44.0 38.0 37.0 45.0 32.0 27.0 31.0 43.0 38.0 46.0 41.0 46.0 50.0 38.0 34.0 33.0 32.0 36.0 48.0 48.0 33.0 25.0 35.0 30.0 34.0 26.0 31.0 24.0 41.0 32.0 39.0 26.0 29.0 36.0 29.0 30.0 23.0 33.0 43.0 46.0 33.0 26.0 14.0 40.0 48.0 41.0 32.0 38.0 38.0 47.0 50.0 42.0 46.0 34.0 30.0 46.0 47.0 41.0 52.0 31.0 40.0 27.0 35.0 38.0 42.0 43.0 45.0 42.0 38.0 34.0 32.0 39.0 30.0 43.0 45.0 51.0 29.0 24.0 18.0 30.0 36.0 36.0 34.0 33.0 25.0 28.0 37.0 34.0 33.0 28.0 32.0 38.0 45.0 40.0 36.0 36.0 28.0 31.0 40.0 37.0 51.0 34.0 47.0 33.0 42.0 42.0 36.0 38.0 40.0 34.0 37.0 52.0 39.0 35.0 33.0 23.0 27.0 38.0 37.0 36.0 30.0 34.0 24.0 35.0 40.0 28.0 39.0 37.0 41.0 36.0 42.0 36.0 28.0 33.0 38.0 44.0 48.0 35.0 36.0 28.0 34.0 44.0 40.0 42.0 29.0 47.0 43.0 48.0 44.0 41.0 32.0 38.0 37.0 44.0 40.0 39.0 29.0 27.0 35.0 41.0 47.0 48.0 33.0 38.0 44.0 49.0 29.0 27.0 35.0 33.0 24.0 36.0 53.0 43.0 40.0 25.0 32.0 31.0 32.0 40.0 41.0 48.0 41.0 32.0 43.0 33.0 26.0 26.0 37.0 32.0 56.0 34.0 28.0 31.0 36.0 30.0 46.0 43.0 41.0 39.0 29.0 34.0 31.0 22.0 19.0 35.0 46.0 37.0 50.0 34.0 27.0 24.0 31.0 40.0 41.0 43.0 32.0 31.0 38.0 35.0 25.0 37.0 41.0 32.0 36.0 52.0 35.0 42.0 42.0 31.0 21.0 36.0 32.0 42.0 37.0 52.0 41.0 46.0 36.0 34.0 36.0 36.0 30.0 33.0 37.0 44.0 32.0 28.0 37.0 29.0 32.0 30.0 47.0 40.0 41.0 29.0 35.0 30.0 33.0 41.0 43.0 44.0 38.0 18.0 19.0 31.0 27.0 46.0 44.0 30.0 30.0 38.0 34.0 35.0 40.0 39.0 40.0 33.0 37.0 41.0 36.0 32.0 32.0 33.0 43.0 51.0 44.0 40.0 31.0 26.0 35.0 35.0 37.0 32.0 32.0 33.0 28.0 37.0 49.0 43.0 30.0 23.0 25.0 31.0 36.0 52.0 36.0 35.0 44.0 29.0 40.0 44.0 38.0 45.0 38.0 47.0 44.0 31.0 37.0 33.0 30.0 41.0 46.0 40.0 34.0 24.0 21.0 36.0 49.0 39.0 39.0 34.0 36.0 33.0 31.0 30.0 30.0 33.0 36.0 49.0 37.0 38.0 32.0 21.0 35.0 43.0 35.0 38.0 38.0 33.0 30.0 27.0 31.0 37.0 32.0 19.0 25.0 33.0 39.0 36.0 52.0 44.0 33.0 24.0 28.0 34.0 32.0 37.0 44.0 45.0 36.0 38.0 37.0 31.0 27.0 45.0 54.0 52.0 48.0 39.0 29.0 31.0 35.0 46.0 42.0 29.0 26.0 28.0 30.0 39.0 27.0 29.0 25.0 31.0 47.0 45.0 42.0 33.0 33.0 25.0 26.0 29.0 38.0 38.0 22.0 22.0 33.0 29.0 40.0 47.0 27.0 41.0 43.0 45.0 43.0 33.0 33.0 33.0 32.0 31.0 44.0 41.0 43.0 56.0 40.0 38.0 29.0 26.0 31.0 28.0 38.0 42.0 46.0 27.0 29.0 30.0 29.0 32.0 41.0 48.0 45.0 39.0 37.0 30.0 33.0 24.0 28.0 36.0 33.0 34.0 44.0 44.0 38.0 25.0 29.0 39.0 40.0 42.0 36.0 43.0 28.0 25.0 33.0 39.0 38.0 44.0 32.0 37.0 25.0 47.0 36.0 36.0 44.0 42.0 45.0 45.0 55.0 53.0 39.0 45.0 43.0 41.0 47.0 60.0 54.0 48.0 53.0 60.0 50.0 50.0 49.0 43.0 40.0 48.0 51.0 65.0 50.0 47.0 53.0 38.0 35.0 34.0 42.0 48.0 51.0 48.0 62.0 50.0 45.0 35.0 39.0 42.0 44.0 68.0 55.0 46.0 37.0 29.0 28.0 47.0 46.0 52.0 56.0 51.0 58.0 44.0 55.0 50.0 46.0 48.0 40.0 35.0 49.0 45.0 48.0 49.0 35.0 14.0 22.0 23.0 34.0 41.0 38.0 42.0 33.0 32.0 29.0 32.0 41.0 36.0 43.0 38.0 38.0 43.0 38.0 35.0 36.0 28.0 34.0 20.0 35.0 41.0 47.0 42.0 46.0 35.0 37.0 28.0 30.0 40.0 44.0 40.0 51.0 36.0 29.0 41.0 36.0 37.0 48.0 49.0 39.0 26.0 37.0 37.0 25.0 34.0 35.0 35.0 30.0 34.0 40.0 39.0 37.0 27.0 31.0 24.0 37.0 36.0 32.0 31.0 30.0 26.0 18.0 26.0 33.0 37.0 46.0 37.0 43.0 36.0 44.0 38.0 54.0 27.0 26.0 27.0 39.0 37.0 51.0 40.0 52.0 44.0 33.0 30.0 25.0 29.0 42.0 49.0 38.0 30.0 31.0 29.0 21.0 31.0 38.0 34.0 29.0 32.0 35.0 36.0 38.0 29.0 33.0 33.0 33.0 39.0 29.0 27.0 29.0 24.0 27.0 32.0 38.0 49.0 40.0 36.0 25.0 27.0 40.0 41.0 44.0 39.0 26.0 28.0 31.0 31.0 39.0 35.0 26.0 37.0 29.0 41.0 35.0 25.0 26.0 19.0 29.0 27.0 28.0 28.0 37.0 44.0 44.0 49.0 38.0 32.0 29.0 25.0 41.0 41.0 49.0 43.0 32.0 29.0 28.0 25.0 32.0 37.0 34.0 38.0 41.0 40.0 32.0 44.0 27.0 18.0 37.0 37.0 33.0 41.0 38.0 22.0 27.0 35.0 49.0 36.0 46.0 49.0 44.0 29.0 40.0 28.0 35.0 36.0 44.0 36.0 27.0 37.0 23.0 34.0 36.0 29.0 44.0 40.0 36.0 38.0 36.0 31.0 31.0 27.0 27.0 22.0 38.0 43.0 36.0 51.0 44.0 35.0 51.0 31.0 30.0 37.0 43.0 40.0 32.0 35.0 34.0 31.0 33.0 37.0 37.0 46.0 46.0 36.0 28.0 27.0 27.0 29.0 44.0 41.0 44.0 32.0 30.0 21.0 39.0 38.0 35.0 40.0 38.0 42.0 32.0 38.0 26.0 36.0 32.0 39.0 39.0 42.0 47.0 42.0 33.0 31.0 26.0 38.0 40.0 40.0 47.0 30.0 37.0 45.0 35.0 28.0 28.0 37.0 43.0 42.0 37.0 48.0 44.0 42.0 35.0 37.0 43.0 46.0 41.0 33.0 52.0 35.0 30.0 31.0 32.0 34.0 53.0 36.0 36.0 22.0 34.0 28.0 40.0 50.0 36.0 32.0 36.0 32.0 33.0 31.0 39.0 33.0 39.0 49.0 39.0 35.0 31.0 35.0 29.0 40.0 36.0 54.0 36.0 35.0 38.0 36.0 41.0 26.0 35.0 47.0 38.0 38.0 34.0 36.0 31.0 29.0 37.0 27.0 16.0 -8.0 -40.0 -93.0 -158.0 -126.0 -92.0 -33.0 116.0 205.0 218.0 171.0 129.0 121.0 108.0 70.0 43.0 2.0 3.0 29.0 54.0 75.0 98.0 114.0 177.0 206.0 224.0 162.0 92.0 -14.0 -73.0 -95.0 -85.0 -53.0 -37.0 10.0 21.0 50.0 51.0 43.0 43.0 31.0 25.0 31.0 21.0 30.0 10.0 11.0 24.0 36.0 59.0 68.0 62.0 60.0 48.0 51.0 39.0 31.0 30.0 28.0 38.0 16.0 32.0 40.0 30.0 55.0 55.0 52.0 40.0 35.0 33.0 31.0 37.0 38.0 39.0 47.0 38.0 49.0 53.0 55.0 70.0 69.0 55.0 37.0 23.0 20.0 71.0 133.0 123.0 157.0 132.0 171.0 132.0 ==END==
+SOCKET(30/03/09 10:46:52)> start
+Domino wave started
+CONSOLE(30/03/09 10:46:53)> 
+SOCKET(30/03/09 10:46:56)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:56)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 100.0 21.0 13.0 19.0 13.0 12.0 13.0 4.0 2.0 10.0 13.0 4.0 8.0 3.0 -2.0 1.0 17.0 12.0 12.0 8.0 3.0 -9.0 13.0 5.0 1.0 11.0 18.0 17.0 1.0 10.0 2.0 -6.0 15.0 15.0 17.0 4.0 12.0 16.0 13.0 9.0 8.0 4.0 8.0 1.0 1.0 4.0 13.0 28.0 29.0 25.0 18.0 18.0 12.0 27.0 27.0 16.0 22.0 19.0 10.0 20.0 10.0 16.0 20.0 18.0 17.0 28.0 19.0 24.0 27.0 16.0 22.0 21.0 22.0 25.0 19.0 20.0 10.0 5.0 11.0 5.0 24.0 24.0 27.0 29.0 15.0 31.0 22.0 20.0 14.0 13.0 21.0 20.0 25.0 20.0 13.0 19.0 13.0 15.0 11.0 20.0 26.0 34.0 17.0 26.0 33.0 21.0 10.0 9.0 6.0 2.0 24.0 13.0 14.0 10.0 4.0 11.0 9.0 12.0 10.0 10.0 -2.0 4.0 14.0 17.0 18.0 7.0 0.0 -3.0 4.0 12.0 22.0 20.0 17.0 10.0 -4.0 1.0 -1.0 18.0 15.0 13.0 11.0 6.0 -1.0 13.0 6.0 6.0 7.0 18.0 8.0 17.0 11.0 19.0 2.0 -9.0 11.0 2.0 9.0 6.0 11.0 10.0 9.0 8.0 6.0 -2.0 13.0 6.0 4.0 25.0 -5.0 12.0 4.0 9.0 5.0 -4.0 5.0 2.0 6.0 6.0 14.0 11.0 17.0 19.0 8.0 8.0 -1.0 14.0 18.0 27.0 14.0 17.0 -1.0 7.0 -6.0 14.0 20.0 20.0 15.0 15.0 12.0 8.0 7.0 4.0 8.0 12.0 12.0 12.0 10.0 5.0 7.0 -8.0 2.0 -6.0 13.0 18.0 20.0 7.0 4.0 5.0 3.0 10.0 6.0 20.0 9.0 25.0 10.0 4.0 2.0 -1.0 4.0 6.0 9.0 30.0 17.0 12.0 11.0 4.0 13.0 6.0 8.0 2.0 2.0 22.0 13.0 30.0 29.0 25.0 -1.0 1.0 8.0 6.0 10.0 16.0 5.0 2.0 3.0 21.0 11.0 9.0 9.0 18.0 16.0 17.0 7.0 10.0 3.0 11.0 3.0 12.0 16.0 11.0 4.0 8.0 7.0 1.0 7.0 9.0 11.0 0.0 9.0 7.0 -2.0 6.0 8.0 5.0 7.0 15.0 10.0 13.0 3.0 1.0 -3.0 5.0 7.0 21.0 4.0 14.0 10.0 7.0 0.0 8.0 0.0 5.0 3.0 8.0 10.0 19.0 17.0 12.0 -2.0 7.0 11.0 7.0 2.0 13.0 7.0 5.0 9.0 19.0 4.0 4.0 6.0 2.0 12.0 29.0 15.0 2.0 -1.0 5.0 14.0 7.0 13.0 18.0 14.0 5.0 -1.0 -4.0 4.0 -1.0 3.0 13.0 13.0 6.0 9.0 16.0 -5.0 1.0 5.0 14.0 17.0 12.0 0.0 2.0 -5.0 8.0 -4.0 10.0 1.0 13.0 4.0 15.0 6.0 -2.0 -1.0 5.0 7.0 9.0 9.0 10.0 9.0 21.0 7.0 7.0 3.0 1.0 21.0 18.0 28.0 24.0 9.0 6.0 9.0 9.0 9.0 17.0 22.0 21.0 4.0 8.0 2.0 11.0 -2.0 12.0 13.0 23.0 22.0 18.0 -1.0 0.0 4.0 4.0 5.0 10.0 6.0 14.0 7.0 -1.0 -7.0 16.0 4.0 0.0 13.0 13.0 11.0 9.0 7.0 13.0 6.0 8.0 26.0 24.0 8.0 5.0 6.0 3.0 7.0 6.0 0.0 -2.0 9.0 19.0 20.0 12.0 5.0 2.0 -1.0 7.0 16.0 17.0 23.0 8.0 7.0 0.0 11.0 2.0 6.0 16.0 20.0 17.0 17.0 -1.0 -2.0 14.0 7.0 21.0 19.0 17.0 15.0 3.0 12.0 7.0 20.0 9.0 29.0 30.0 24.0 10.0 8.0 22.0 10.0 12.0 5.0 7.0 21.0 15.0 0.0 5.0 13.0 20.0 4.0 13.0 18.0 8.0 18.0 4.0 11.0 6.0 1.0 -4.0 12.0 13.0 29.0 18.0 25.0 19.0 21.0 -3.0 4.0 17.0 11.0 17.0 8.0 15.0 14.0 2.0 12.0 6.0 0.0 9.0 18.0 20.0 22.0 4.0 -1.0 5.0 13.0 18.0 16.0 23.0 8.0 10.0 2.0 9.0 3.0 2.0 15.0 27.0 12.0 7.0 25.0 0.0 -1.0 9.0 16.0 10.0 15.0 19.0 5.0 6.0 19.0 7.0 8.0 9.0 3.0 22.0 14.0 18.0 -1.0 0.0 -7.0 0.0 9.0 3.0 14.0 18.0 20.0 12.0 17.0 10.0 6.0 9.0 4.0 2.0 13.0 25.0 9.0 4.0 10.0 10.0 16.0 15.0 21.0 17.0 8.0 18.0 10.0 19.0 20.0 8.0 8.0 14.0 13.0 8.0 0.0 2.0 3.0 9.0 6.0 25.0 5.0 9.0 8.0 5.0 8.0 6.0 13.0 1.0 20.0 19.0 16.0 11.0 8.0 6.0 5.0 8.0 13.0 13.0 13.0 10.0 10.0 4.0 5.0 14.0 14.0 9.0 7.0 14.0 27.0 26.0 22.0 3.0 -21.0 0.0 8.0 20.0 21.0 23.0 0.0 6.0 2.0 18.0 9.0 9.0 5.0 8.0 17.0 15.0 8.0 13.0 3.0 7.0 5.0 9.0 9.0 19.0 0.0 -1.0 2.0 4.0 13.0 29.0 20.0 19.0 4.0 9.0 12.0 1.0 11.0 13.0 19.0 23.0 22.0 8.0 3.0 2.0 3.0 5.0 13.0 16.0 13.0 3.0 8.0 10.0 10.0 3.0 -3.0 0.0 0.0 18.0 22.0 25.0 21.0 12.0 5.0 11.0 -2.0 12.0 6.0 9.0 11.0 15.0 7.0 4.0 -2.0 2.0 6.0 6.0 26.0 13.0 20.0 5.0 -12.0 4.0 10.0 6.0 3.0 17.0 12.0 10.0 -6.0 1.0 5.0 1.0 13.0 6.0 14.0 19.0 9.0 0.0 12.0 2.0 10.0 5.0 9.0 13.0 5.0 -3.0 -4.0 10.0 6.0 6.0 10.0 5.0 12.0 15.0 10.0 3.0 2.0 9.0 15.0 13.0 14.0 23.0 11.0 16.0 6.0 12.0 11.0 20.0 15.0 6.0 18.0 17.0 15.0 3.0 4.0 1.0 13.0 18.0 25.0 22.0 17.0 4.0 6.0 3.0 11.0 15.0 17.0 26.0 11.0 11.0 11.0 -3.0 8.0 9.0 21.0 28.0 18.0 6.0 -11.0 5.0 12.0 5.0 3.0 18.0 8.0 7.0 12.0 8.0 7.0 14.0 3.0 7.0 17.0 19.0 8.0 7.0 3.0 11.0 2.0 12.0 3.0 6.0 5.0 11.0 22.0 24.0 16.0 5.0 10.0 3.0 19.0 18.0 17.0 13.0 10.0 8.0 5.0 2.0 14.0 12.0 4.0 19.0 13.0 3.0 9.0 -2.0 21.0 24.0 22.0 18.0 11.0 6.0 3.0 -3.0 12.0 17.0 10.0 16.0 9.0 19.0 5.0 -1.0 7.0 8.0 -2.0 4.0 8.0 19.0 7.0 0.0 0.0 3.0 10.0 20.0 20.0 10.0 5.0 9.0 13.0 14.0 11.0 6.0 2.0 3.0 26.0 23.0 25.0 8.0 14.0 10.0 17.0 17.0 11.0 24.0 16.0 8.0 8.0 17.0 11.0 12.0 8.0 16.0 19.0 16.0 16.0 10.0 6.0 1.0 7.0 3.0 10.0 21.0 7.0 12.0 2.0 5.0 4.0 9.0 13.0 22.0 6.0 8.0 5.0 -6.0 6.0 8.0 14.0 17.0 16.0 13.0 7.0 2.0 2.0 4.0 12.0 9.0 14.0 9.0 0.0 10.0 16.0 3.0 -3.0 -4.0 -1.0 9.0 11.0 18.0 5.0 -2.0 -39.0 -54.0 -100.0 -156.0 -174.0 -143.0 -66.0 49.0 178.0 190.0 174.0 100.0 76.0 98.0 68.0 31.0 -2.0 -32.0 -14.0 -2.0 36.0 57.0 77.0 115.0 177.0 194.0 165.0 116.0 -10.0 -61.0 -99.0 -116.0 -84.0 -77.0 -52.0 -25.0 -5.0 4.0 36.0 29.0 21.0 7.0 -13.0 -13.0 -9.0 -4.0 -26.0 -21.0 -7.0 9.0 22.0 30.0 33.0 25.0 12.0 6.0 -4.0 -12.0 -5.0 8.0 4.0 11.0 18.0 10.0 2.0 0.0 1.0 1.0 12.0 18.0 11.0 8.0 -5.0 -2.0 -6.0 -7.0 10.0 11.0 27.0 23.0 36.0 50.0 31.0 10.0 -18.0 28.0 79.0 147.0 128.0 141.0 73.0 110.0 72.0 100.0 ==END==
+SOCKET(30/03/09 10:46:56)> start
+Domino wave started
+SOCKET(30/03/09 10:46:57)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:57)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 62.0 14.0 9.0 22.0 28.0 13.0 10.0 2.0 5.0 9.0 1.0 9.0 21.0 11.0 10.0 13.0 13.0 9.0 12.0 3.0 20.0 14.0 18.0 1.0 8.0 7.0 6.0 5.0 12.0 16.0 14.0 11.0 13.0 4.0 5.0 6.0 6.0 13.0 9.0 15.0 5.0 5.0 2.0 1.0 9.0 -8.0 19.0 11.0 12.0 16.0 0.0 11.0 3.0 -3.0 -6.0 9.0 5.0 13.0 21.0 17.0 12.0 12.0 8.0 -2.0 7.0 8.0 16.0 9.0 19.0 17.0 3.0 -1.0 4.0 12.0 12.0 9.0 10.0 14.0 14.0 2.0 -1.0 9.0 16.0 12.0 4.0 4.0 5.0 7.0 -3.0 -8.0 9.0 11.0 20.0 17.0 24.0 8.0 -3.0 1.0 7.0 11.0 10.0 19.0 10.0 5.0 12.0 5.0 16.0 13.0 18.0 15.0 15.0 21.0 5.0 3.0 4.0 7.0 0.0 3.0 2.0 10.0 16.0 24.0 17.0 12.0 7.0 -7.0 5.0 12.0 26.0 14.0 12.0 6.0 10.0 -1.0 7.0 20.0 23.0 16.0 30.0 15.0 10.0 12.0 9.0 2.0 3.0 9.0 15.0 7.0 3.0 -5.0 5.0 8.0 8.0 8.0 13.0 13.0 4.0 5.0 8.0 11.0 6.0 1.0 16.0 8.0 18.0 15.0 2.0 6.0 3.0 9.0 22.0 13.0 9.0 3.0 9.0 3.0 11.0 14.0 7.0 7.0 -2.0 19.0 22.0 26.0 24.0 12.0 0.0 -1.0 10.0 13.0 13.0 16.0 23.0 8.0 10.0 -6.0 19.0 3.0 6.0 11.0 14.0 16.0 11.0 10.0 5.0 7.0 16.0 11.0 10.0 15.0 14.0 1.0 2.0 10.0 11.0 12.0 17.0 7.0 13.0 14.0 8.0 7.0 12.0 3.0 12.0 14.0 3.0 9.0 3.0 10.0 8.0 17.0 6.0 19.0 27.0 13.0 11.0 4.0 1.0 -6.0 -8.0 10.0 14.0 20.0 29.0 25.0 9.0 8.0 5.0 6.0 4.0 5.0 13.0 17.0 19.0 17.0 16.0 -8.0 2.0 3.0 19.0 15.0 15.0 15.0 9.0 -7.0 -7.0 -1.0 2.0 9.0 9.0 20.0 19.0 2.0 -5.0 -4.0 6.0 5.0 16.0 8.0 9.0 8.0 6.0 10.0 8.0 14.0 14.0 14.0 17.0 3.0 6.0 8.0 17.0 11.0 -1.0 8.0 13.0 17.0 20.0 9.0 7.0 -20.0 6.0 -2.0 13.0 17.0 14.0 10.0 12.0 12.0 7.0 2.0 5.0 3.0 3.0 9.0 14.0 13.0 14.0 5.0 -6.0 -2.0 8.0 21.0 25.0 10.0 4.0 9.0 9.0 7.0 11.0 7.0 28.0 15.0 14.0 17.0 -4.0 -1.0 2.0 3.0 10.0 13.0 12.0 9.0 3.0 4.0 7.0 5.0 3.0 5.0 12.0 10.0 10.0 14.0 1.0 5.0 -4.0 20.0 11.0 13.0 12.0 -4.0 2.0 6.0 11.0 7.0 9.0 -7.0 -3.0 6.0 14.0 11.0 18.0 8.0 5.0 3.0 4.0 10.0 14.0 8.0 13.0 2.0 2.0 14.0 9.0 9.0 1.0 9.0 15.0 10.0 10.0 1.0 -4.0 8.0 2.0 6.0 17.0 4.0 3.0 -15.0 -3.0 0.0 14.0 14.0 16.0 10.0 19.0 12.0 11.0 6.0 3.0 6.0 4.0 15.0 17.0 14.0 8.0 11.0 12.0 6.0 12.0 7.0 5.0 5.0 6.0 14.0 12.0 0.0 -9.0 -6.0 11.0 18.0 14.0 33.0 6.0 17.0 8.0 10.0 3.0 6.0 7.0 5.0 17.0 11.0 15.0 11.0 1.0 -4.0 9.0 9.0 15.0 27.0 6.0 4.0 0.0 7.0 21.0 20.0 18.0 12.0 -1.0 8.0 4.0 3.0 19.0 7.0 11.0 9.0 15.0 8.0 -1.0 -5.0 11.0 12.0 16.0 8.0 10.0 -3.0 11.0 14.0 11.0 1.0 13.0 22.0 15.0 19.0 14.0 3.0 8.0 2.0 -4.0 0.0 7.0 9.0 8.0 8.0 11.0 13.0 13.0 1.0 2.0 4.0 29.0 18.0 21.0 7.0 -9.0 3.0 17.0 12.0 9.0 14.0 16.0 9.0 -1.0 1.0 -1.0 7.0 8.0 13.0 8.0 12.0 19.0 -1.0 -4.0 8.0 7.0 5.0 16.0 7.0 14.0 5.0 1.0 5.0 19.0 20.0 16.0 6.0 11.0 8.0 7.0 1.0 -8.0 -6.0 18.0 13.0 17.0 -1.0 7.0 0.0 -4.0 4.0 -3.0 3.0 4.0 8.0 16.0 5.0 16.0 6.0 0.0 -6.0 -7.0 7.0 18.0 14.0 13.0 3.0 -4.0 6.0 5.0 0.0 1.0 9.0 13.0 2.0 4.0 14.0 2.0 -2.0 4.0 18.0 8.0 8.0 9.0 3.0 -2.0 7.0 4.0 16.0 16.0 23.0 9.0 0.0 10.0 7.0 3.0 -3.0 8.0 11.0 1.0 3.0 1.0 -3.0 2.0 6.0 14.0 12.0 4.0 2.0 9.0 6.0 6.0 7.0 5.0 1.0 3.0 3.0 23.0 14.0 15.0 10.0 0.0 -9.0 6.0 14.0 6.0 7.0 12.0 11.0 1.0 -2.0 7.0 6.0 3.0 9.0 8.0 16.0 7.0 4.0 -9.0 -5.0 4.0 18.0 14.0 17.0 7.0 -5.0 2.0 16.0 6.0 10.0 23.0 13.0 9.0 18.0 10.0 6.0 4.0 8.0 10.0 12.0 8.0 -5.0 4.0 4.0 6.0 -2.0 2.0 6.0 17.0 9.0 9.0 8.0 10.0 -4.0 -4.0 3.0 2.0 4.0 9.0 14.0 15.0 19.0 5.0 16.0 6.0 1.0 0.0 6.0 7.0 13.0 8.0 5.0 -4.0 0.0 -4.0 22.0 12.0 17.0 13.0 8.0 6.0 8.0 12.0 13.0 12.0 2.0 10.0 5.0 8.0 8.0 3.0 -2.0 1.0 2.0 4.0 16.0 16.0 3.0 -4.0 3.0 0.0 6.0 1.0 5.0 7.0 1.0 6.0 10.0 4.0 1.0 3.0 3.0 16.0 12.0 8.0 18.0 13.0 13.0 4.0 8.0 7.0 5.0 12.0 1.0 24.0 33.0 29.0 30.0 22.0 16.0 7.0 27.0 28.0 26.0 27.0 28.0 24.0 14.0 12.0 15.0 6.0 25.0 16.0 23.0 24.0 27.0 28.0 22.0 21.0 26.0 25.0 19.0 23.0 26.0 8.0 11.0 15.0 16.0 24.0 31.0 29.0 15.0 15.0 10.0 20.0 14.0 17.0 13.0 20.0 17.0 16.0 22.0 23.0 2.0 11.0 7.0 20.0 31.0 25.0 17.0 26.0 24.0 17.0 10.0 9.0 12.0 6.0 20.0 -3.0 14.0 14.0 13.0 3.0 -3.0 0.0 -2.0 0.0 3.0 8.0 6.0 21.0 13.0 3.0 8.0 9.0 -8.0 4.0 10.0 16.0 17.0 14.0 0.0 1.0 -1.0 10.0 15.0 22.0 7.0 0.0 3.0 9.0 -4.0 10.0 3.0 14.0 0.0 13.0 16.0 23.0 7.0 1.0 3.0 7.0 13.0 22.0 16.0 2.0 9.0 0.0 2.0 3.0 5.0 6.0 4.0 10.0 -1.0 22.0 0.0 13.0 -4.0 0.0 8.0 6.0 2.0 18.0 6.0 7.0 5.0 12.0 8.0 13.0 3.0 5.0 14.0 27.0 6.0 13.0 7.0 11.0 -2.0 -6.0 0.0 16.0 11.0 19.0 12.0 -4.0 -1.0 4.0 0.0 0.0 17.0 8.0 6.0 9.0 7.0 -8.0 -2.0 2.0 17.0 18.0 16.0 15.0 -4.0 5.0 7.0 5.0 14.0 8.0 14.0 12.0 -4.0 9.0 24.0 11.0 8.0 -2.0 -4.0 -5.0 -41.0 -88.0 -129.0 -172.0 -211.0 -106.0 -4.0 122.0 205.0 198.0 126.0 113.0 98.0 82.0 59.0 -4.0 -28.0 -38.0 -10.0 24.0 49.0 64.0 67.0 97.0 156.0 197.0 182.0 107.0 -36.0 -78.0 -133.0 -102.0 -85.0 -77.0 -49.0 -24.0 16.0 24.0 37.0 28.0 0.0 1.0 -18.0 -3.0 -5.0 -16.0 -28.0 -17.0 -6.0 10.0 20.0 37.0 24.0 19.0 10.0 8.0 -2.0 1.0 1.0 5.0 -8.0 2.0 4.0 19.0 2.0 7.0 5.0 8.0 4.0 12.0 -6.0 -4.0 10.0 19.0 4.0 24.0 6.0 -2.0 18.0 48.0 48.0 49.0 -9.0 27.0 64.0 121.0 128.0 103.0 72.0 48.0 82.0 66.0 113.0 ==END==
+SOCKET(30/03/09 10:46:57)> start
+Domino wave started
+SOCKET(30/03/09 10:46:57)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:57)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 67.0 6.0 14.0 12.0 9.0 11.0 15.0 10.0 13.0 17.0 -3.0 -3.0 5.0 12.0 17.0 8.0 14.0 -3.0 -1.0 5.0 12.0 4.0 5.0 7.0 8.0 2.0 15.0 0.0 8.0 -6.0 -2.0 7.0 19.0 6.0 13.0 -9.0 -3.0 -3.0 11.0 8.0 12.0 6.0 -6.0 8.0 20.0 19.0 14.0 3.0 -3.0 -6.0 15.0 -2.0 18.0 6.0 2.0 -1.0 11.0 -1.0 12.0 -1.0 -1.0 3.0 17.0 9.0 12.0 -1.0 -3.0 5.0 10.0 17.0 3.0 0.0 -6.0 -15.0 -4.0 8.0 10.0 6.0 0.0 4.0 15.0 11.0 6.0 -1.0 1.0 3.0 13.0 9.0 -6.0 -7.0 5.0 -3.0 19.0 3.0 8.0 7.0 5.0 7.0 11.0 17.0 -2.0 0.0 1.0 -3.0 21.0 22.0 12.0 8.0 8.0 2.0 7.0 5.0 4.0 5.0 7.0 7.0 13.0 7.0 4.0 0.0 -4.0 -3.0 10.0 19.0 6.0 -3.0 3.0 1.0 12.0 4.0 8.0 -8.0 1.0 -1.0 -3.0 -3.0 9.0 11.0 0.0 17.0 24.0 18.0 5.0 -14.0 -1.0 7.0 10.0 15.0 10.0 -7.0 0.0 10.0 12.0 5.0 2.0 3.0 7.0 16.0 17.0 19.0 12.0 -8.0 -8.0 3.0 12.0 2.0 12.0 7.0 17.0 17.0 11.0 3.0 10.0 -2.0 8.0 14.0 17.0 11.0 10.0 -1.0 2.0 10.0 9.0 16.0 21.0 19.0 10.0 4.0 5.0 15.0 3.0 1.0 -1.0 21.0 11.0 -5.0 1.0 -10.0 -8.0 17.0 13.0 18.0 4.0 9.0 4.0 6.0 6.0 16.0 6.0 8.0 13.0 20.0 14.0 -4.0 -1.0 -6.0 14.0 4.0 9.0 11.0 13.0 -9.0 -1.0 1.0 7.0 2.0 -2.0 0.0 5.0 18.0 20.0 7.0 8.0 -1.0 -5.0 -2.0 13.0 11.0 19.0 8.0 6.0 2.0 9.0 7.0 6.0 6.0 10.0 4.0 3.0 15.0 10.0 -5.0 5.0 11.0 15.0 10.0 -1.0 -7.0 -2.0 2.0 -1.0 4.0 13.0 3.0 -1.0 1.0 3.0 7.0 0.0 -2.0 0.0 -1.0 11.0 4.0 18.0 0.0 0.0 4.0 14.0 14.0 23.0 -4.0 -3.0 -6.0 9.0 -6.0 -8.0 -15.0 -2.0 2.0 7.0 25.0 21.0 17.0 5.0 -6.0 -6.0 10.0 13.0 8.0 10.0 3.0 12.0 4.0 7.0 -1.0 4.0 15.0 5.0 0.0 14.0 13.0 -7.0 -5.0 -6.0 5.0 13.0 6.0 2.0 2.0 3.0 -4.0 -2.0 1.0 0.0 8.0 5.0 8.0 10.0 -6.0 4.0 -3.0 2.0 24.0 17.0 7.0 2.0 -2.0 4.0 1.0 7.0 4.0 5.0 12.0 16.0 21.0 15.0 -10.0 -9.0 -10.0 8.0 13.0 -1.0 5.0 12.0 8.0 11.0 5.0 13.0 8.0 -1.0 -3.0 -6.0 5.0 19.0 5.0 -11.0 -6.0 8.0 13.0 25.0 24.0 24.0 4.0 -9.0 2.0 -4.0 -1.0 13.0 6.0 10.0 7.0 4.0 -5.0 -3.0 -5.0 -5.0 8.0 12.0 25.0 11.0 4.0 3.0 10.0 11.0 9.0 4.0 5.0 0.0 10.0 7.0 13.0 0.0 -5.0 7.0 13.0 16.0 6.0 6.0 1.0 -9.0 -5.0 -1.0 13.0 22.0 6.0 10.0 2.0 18.0 12.0 20.0 -7.0 -6.0 -5.0 10.0 13.0 13.0 2.0 -2.0 -1.0 5.0 9.0 1.0 5.0 10.0 6.0 2.0 13.0 0.0 0.0 -6.0 -6.0 9.0 14.0 8.0 -10.0 -7.0 -4.0 2.0 18.0 11.0 2.0 0.0 0.0 3.0 -2.0 3.0 -18.0 -6.0 2.0 17.0 10.0 13.0 11.0 -4.0 -2.0 4.0 11.0 5.0 0.0 6.0 14.0 4.0 0.0 -9.0 -11.0 -9.0 -6.0 1.0 29.0 22.0 7.0 8.0 10.0 -2.0 11.0 11.0 13.0 12.0 11.0 1.0 -1.0 9.0 0.0 -1.0 5.0 11.0 18.0 2.0 -11.0 0.0 7.0 9.0 7.0 10.0 0.0 3.0 -12.0 -4.0 -13.0 14.0 -5.0 -1.0 -6.0 19.0 12.0 11.0 -5.0 -14.0 -3.0 12.0 3.0 18.0 -3.0 3.0 5.0 7.0 6.0 13.0 18.0 15.0 14.0 2.0 -1.0 3.0 6.0 -4.0 -15.0 12.0 5.0 8.0 16.0 11.0 5.0 -2.0 9.0 6.0 4.0 15.0 8.0 10.0 7.0 6.0 -13.0 -7.0 -5.0 1.0 6.0 16.0 9.0 7.0 1.0 -1.0 11.0 4.0 8.0 8.0 4.0 9.0 3.0 4.0 0.0 3.0 15.0 12.0 15.0 10.0 5.0 -3.0 13.0 4.0 16.0 16.0 10.0 3.0 3.0 3.0 5.0 -8.0 -2.0 -2.0 13.0 17.0 11.0 11.0 4.0 0.0 4.0 1.0 3.0 12.0 8.0 8.0 10.0 20.0 16.0 15.0 2.0 -3.0 7.0 -2.0 2.0 29.0 15.0 0.0 2.0 -11.0 0.0 9.0 1.0 5.0 2.0 12.0 9.0 -2.0 6.0 4.0 -2.0 3.0 4.0 17.0 11.0 -10.0 -8.0 0.0 12.0 13.0 -1.0 -3.0 0.0 6.0 11.0 3.0 -3.0 8.0 -5.0 1.0 11.0 5.0 -3.0 -10.0 -14.0 2.0 8.0 13.0 2.0 9.0 10.0 1.0 -3.0 5.0 1.0 -5.0 -12.0 7.0 14.0 15.0 14.0 8.0 1.0 -6.0 -6.0 6.0 -1.0 12.0 11.0 5.0 2.0 11.0 -2.0 3.0 1.0 0.0 12.0 11.0 -8.0 7.0 0.0 -4.0 9.0 6.0 13.0 3.0 -1.0 -8.0 6.0 1.0 -2.0 7.0 3.0 9.0 2.0 2.0 11.0 -4.0 -4.0 -6.0 -4.0 3.0 0.0 0.0 4.0 1.0 2.0 2.0 10.0 12.0 9.0 5.0 0.0 6.0 4.0 4.0 3.0 2.0 -11.0 -7.0 6.0 19.0 11.0 2.0 8.0 6.0 5.0 10.0 2.0 3.0 5.0 12.0 5.0 6.0 -10.0 -4.0 3.0 4.0 17.0 5.0 4.0 10.0 -7.0 -8.0 -3.0 4.0 2.0 2.0 1.0 8.0 0.0 3.0 6.0 -7.0 -8.0 -4.0 0.0 4.0 16.0 1.0 8.0 -15.0 -9.0 6.0 5.0 12.0 5.0 6.0 6.0 -1.0 6.0 -1.0 17.0 0.0 12.0 0.0 18.0 9.0 23.0 0.0 4.0 4.0 1.0 16.0 9.0 24.0 20.0 21.0 22.0 22.0 20.0 19.0 12.0 8.0 22.0 16.0 28.0 28.0 10.0 8.0 20.0 18.0 13.0 20.0 23.0 20.0 23.0 20.0 26.0 17.0 6.0 17.0 15.0 20.0 30.0 15.0 11.0 5.0 4.0 19.0 19.0 41.0 23.0 23.0 18.0 24.0 23.0 21.0 13.0 11.0 9.0 12.0 13.0 15.0 13.0 15.0 3.0 15.0 22.0 16.0 25.0 26.0 20.0 13.0 10.0 0.0 20.0 10.0 12.0 5.0 -2.0 6.0 8.0 18.0 9.0 15.0 -6.0 -5.0 -7.0 8.0 10.0 9.0 -2.0 7.0 4.0 5.0 0.0 0.0 -2.0 8.0 9.0 14.0 12.0 1.0 -6.0 2.0 0.0 5.0 7.0 14.0 3.0 5.0 -19.0 6.0 3.0 6.0 -4.0 9.0 1.0 9.0 20.0 -4.0 15.0 12.0 5.0 6.0 6.0 10.0 9.0 8.0 10.0 3.0 -3.0 6.0 8.0 10.0 11.0 17.0 0.0 13.0 2.0 12.0 2.0 6.0 6.0 6.0 10.0 7.0 13.0 12.0 8.0 18.0 -9.0 -30.0 -55.0 -102.0 -130.0 -159.0 -161.0 -77.0 -6.0 130.0 179.0 185.0 112.0 107.0 81.0 70.0 42.0 24.0 -32.0 -24.0 0.0 19.0 37.0 44.0 82.0 121.0 179.0 184.0 138.0 86.0 -32.0 -109.0 -124.0 -111.0 -89.0 -90.0 -54.0 -36.0 -12.0 21.0 28.0 27.0 2.0 -13.0 -1.0 -6.0 -12.0 -13.0 -31.0 -23.0 -9.0 4.0 18.0 26.0 24.0 14.0 7.0 26.0 -3.0 2.0 4.0 0.0 7.0 1.0 0.0 -14.0 -6.0 8.0 10.0 15.0 11.0 8.0 -4.0 -7.0 1.0 10.0 8.0 10.0 7.0 23.0 24.0 19.0 34.0 45.0 29.0 -1.0 0.0 49.0 111.0 110.0 108.0 74.0 109.0 50.0 100.0 ==END==
+SOCKET(30/03/09 10:46:58)> start
+Domino wave started
+SOCKET(30/03/09 10:46:58)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:58)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 136.0 42.0 33.0 11.0 19.0 14.0 24.0 32.0 37.0 17.0 11.0 9.0 12.0 17.0 15.0 13.0 19.0 16.0 20.0 22.0 25.0 17.0 18.0 24.0 17.0 22.0 13.0 16.0 10.0 12.0 1.0 -6.0 2.0 -11.0 3.0 17.0 9.0 2.0 5.0 7.0 8.0 -7.0 5.0 8.0 -1.0 4.0 9.0 -8.0 -4.0 2.0 4.0 9.0 10.0 8.0 5.0 14.0 18.0 0.0 5.0 -5.0 3.0 -5.0 -3.0 6.0 10.0 20.0 30.0 8.0 9.0 -4.0 -1.0 12.0 10.0 11.0 17.0 1.0 -2.0 6.0 2.0 -4.0 4.0 2.0 -2.0 9.0 10.0 8.0 10.0 -5.0 2.0 -4.0 9.0 9.0 8.0 5.0 2.0 -14.0 -2.0 -6.0 -5.0 1.0 8.0 4.0 8.0 -5.0 0.0 -7.0 8.0 -2.0 5.0 -1.0 3.0 6.0 -6.0 -12.0 0.0 -9.0 1.0 3.0 8.0 -1.0 9.0 -8.0 0.0 0.0 0.0 -2.0 -3.0 11.0 7.0 10.0 14.0 13.0 14.0 4.0 -1.0 -16.0 13.0 7.0 -5.0 6.0 4.0 0.0 -7.0 -4.0 -6.0 7.0 7.0 13.0 11.0 4.0 -5.0 -1.0 7.0 11.0 9.0 13.0 2.0 4.0 2.0 2.0 2.0 -7.0 -8.0 8.0 12.0 3.0 15.0 0.0 6.0 -6.0 4.0 5.0 2.0 3.0 17.0 1.0 1.0 -3.0 -5.0 -4.0 -2.0 7.0 15.0 -1.0 -1.0 3.0 -4.0 -8.0 -5.0 -4.0 -1.0 14.0 9.0 2.0 9.0 11.0 0.0 -4.0 -1.0 -6.0 2.0 12.0 21.0 7.0 5.0 2.0 3.0 -7.0 1.0 5.0 5.0 7.0 10.0 0.0 2.0 -3.0 3.0 5.0 4.0 0.0 1.0 3.0 4.0 -2.0 10.0 8.0 16.0 14.0 7.0 11.0 7.0 -6.0 2.0 -5.0 -7.0 9.0 11.0 12.0 12.0 10.0 2.0 8.0 15.0 7.0 10.0 10.0 13.0 14.0 3.0 -2.0 2.0 2.0 -6.0 -6.0 -4.0 4.0 17.0 -5.0 3.0 0.0 -3.0 5.0 8.0 7.0 5.0 -10.0 6.0 -11.0 -2.0 4.0 2.0 5.0 12.0 4.0 -3.0 6.0 4.0 9.0 5.0 6.0 15.0 9.0 5.0 7.0 1.0 -3.0 2.0 -3.0 9.0 7.0 15.0 11.0 -2.0 7.0 0.0 -1.0 3.0 9.0 15.0 9.0 -3.0 -3.0 5.0 2.0 -1.0 1.0 13.0 -2.0 11.0 1.0 0.0 0.0 -5.0 2.0 3.0 14.0 20.0 12.0 8.0 -3.0 10.0 -10.0 2.0 11.0 7.0 5.0 16.0 8.0 8.0 0.0 -3.0 3.0 5.0 2.0 13.0 -2.0 4.0 8.0 -2.0 8.0 1.0 10.0 7.0 11.0 14.0 -5.0 -14.0 -11.0 0.0 10.0 20.0 17.0 6.0 -1.0 -5.0 -4.0 5.0 15.0 8.0 11.0 12.0 3.0 2.0 -6.0 0.0 -5.0 9.0 8.0 7.0 8.0 10.0 3.0 3.0 6.0 2.0 -2.0 7.0 7.0 17.0 5.0 -1.0 6.0 11.0 -4.0 -10.0 4.0 13.0 10.0 16.0 9.0 -1.0 -3.0 -1.0 -5.0 9.0 8.0 12.0 8.0 9.0 -2.0 -4.0 9.0 12.0 16.0 10.0 11.0 6.0 0.0 -3.0 5.0 6.0 11.0 11.0 13.0 18.0 -4.0 13.0 -1.0 9.0 -1.0 7.0 14.0 12.0 7.0 6.0 5.0 -3.0 5.0 5.0 17.0 8.0 4.0 10.0 -2.0 8.0 1.0 5.0 4.0 6.0 10.0 4.0 7.0 14.0 6.0 1.0 -4.0 -13.0 5.0 15.0 11.0 9.0 6.0 -6.0 5.0 4.0 -3.0 6.0 6.0 7.0 12.0 21.0 3.0 13.0 1.0 13.0 7.0 20.0 8.0 8.0 -6.0 -5.0 -1.0 3.0 10.0 8.0 12.0 2.0 10.0 9.0 -4.0 2.0 4.0 9.0 9.0 4.0 10.0 10.0 -2.0 -1.0 6.0 17.0 8.0 14.0 6.0 4.0 10.0 -2.0 8.0 6.0 -7.0 12.0 -4.0 2.0 7.0 23.0 20.0 20.0 5.0 4.0 -7.0 5.0 8.0 11.0 13.0 5.0 1.0 15.0 2.0 7.0 -4.0 6.0 9.0 4.0 8.0 9.0 13.0 6.0 2.0 12.0 5.0 6.0 9.0 -3.0 3.0 2.0 13.0 21.0 1.0 3.0 -1.0 5.0 8.0 16.0 -3.0 7.0 -5.0 1.0 -2.0 3.0 1.0 -1.0 -7.0 12.0 -1.0 7.0 15.0 17.0 13.0 3.0 -3.0 -11.0 -3.0 4.0 0.0 -6.0 10.0 8.0 13.0 25.0 10.0 -1.0 -6.0 -15.0 7.0 11.0 3.0 8.0 6.0 18.0 -3.0 -4.0 -1.0 7.0 7.0 10.0 8.0 4.0 9.0 11.0 13.0 10.0 15.0 11.0 13.0 8.0 -5.0 5.0 -2.0 10.0 21.0 8.0 15.0 11.0 3.0 -3.0 1.0 -6.0 6.0 11.0 3.0 -1.0 8.0 7.0 1.0 -4.0 -8.0 -2.0 12.0 20.0 -2.0 -1.0 0.0 -2.0 3.0 1.0 -3.0 6.0 -1.0 9.0 9.0 6.0 1.0 -2.0 -2.0 6.0 5.0 4.0 8.0 6.0 -6.0 -3.0 -6.0 3.0 -5.0 1.0 0.0 19.0 10.0 6.0 -6.0 -10.0 -4.0 3.0 6.0 11.0 14.0 4.0 -2.0 -7.0 -2.0 3.0 3.0 16.0 2.0 12.0 7.0 -10.0 5.0 -2.0 2.0 -4.0 5.0 7.0 -6.0 6.0 -6.0 -3.0 12.0 2.0 12.0 8.0 6.0 13.0 1.0 3.0 1.0 -3.0 3.0 1.0 11.0 13.0 12.0 19.0 13.0 7.0 -2.0 -6.0 -6.0 0.0 12.0 13.0 7.0 18.0 -4.0 3.0 3.0 8.0 11.0 24.0 3.0 3.0 -1.0 5.0 4.0 11.0 -1.0 16.0 12.0 8.0 8.0 -2.0 5.0 3.0 0.0 11.0 16.0 9.0 2.0 3.0 4.0 -6.0 3.0 3.0 2.0 4.0 0.0 7.0 5.0 -4.0 4.0 7.0 9.0 8.0 9.0 -2.0 0.0 5.0 3.0 2.0 -5.0 -9.0 3.0 5.0 3.0 13.0 6.0 8.0 1.0 7.0 1.0 4.0 2.0 4.0 18.0 4.0 -4.0 14.0 -5.0 4.0 0.0 7.0 5.0 12.0 7.0 6.0 17.0 5.0 13.0 9.0 11.0 1.0 -2.0 3.0 3.0 -1.0 5.0 4.0 10.0 14.0 8.0 -2.0 3.0 3.0 0.0 12.0 4.0 1.0 7.0 4.0 0.0 0.0 0.0 8.0 6.0 10.0 2.0 1.0 2.0 -2.0 -2.0 9.0 -5.0 4.0 10.0 14.0 4.0 9.0 9.0 5.0 -6.0 -4.0 -10.0 10.0 10.0 8.0 14.0 3.0 4.0 1.0 -1.0 2.0 -8.0 0.0 8.0 5.0 4.0 1.0 -4.0 2.0 7.0 17.0 12.0 8.0 -5.0 -3.0 3.0 5.0 5.0 6.0 11.0 2.0 4.0 -4.0 -6.0 1.0 2.0 -14.0 12.0 15.0 9.0 7.0 -2.0 7.0 -1.0 7.0 2.0 8.0 11.0 -10.0 14.0 6.0 -5.0 8.0 3.0 1.0 2.0 -1.0 15.0 11.0 9.0 0.0 -4.0 -1.0 -4.0 -5.0 10.0 8.0 18.0 14.0 5.0 -1.0 -1.0 -3.0 1.0 6.0 14.0 7.0 8.0 9.0 -2.0 -6.0 1.0 8.0 4.0 2.0 4.0 -7.0 0.0 -4.0 4.0 -4.0 -2.0 10.0 6.0 12.0 -3.0 1.0 0.0 -2.0 8.0 8.0 7.0 -2.0 -1.0 -3.0 6.0 -1.0 7.0 -19.0 -40.0 -82.0 -119.0 -200.0 -170.0 -129.0 -43.0 139.0 172.0 173.0 130.0 90.0 92.0 80.0 55.0 29.0 -32.0 -42.0 -32.0 -4.0 52.0 54.0 66.0 101.0 159.0 171.0 161.0 151.0 6.0 -59.0 -143.0 -120.0 -108.0 -76.0 -53.0 -54.0 -32.0 -5.0 16.0 32.0 18.0 2.0 -3.0 -6.0 -18.0 -16.0 -14.0 -21.0 -12.0 -4.0 -3.0 20.0 31.0 29.0 27.0 20.0 12.0 4.0 -7.0 -4.0 -3.0 4.0 5.0 5.0 10.0 31.0 20.0 19.0 12.0 20.0 6.0 19.0 5.0 4.0 18.0 12.0 20.0 35.0 29.0 24.0 35.0 40.0 44.0 44.0 22.0 1.0 2.0 29.0 89.0 152.0 126.0 169.0 122.0 171.0 129.0 ==END==
+SOCKET(30/03/09 10:46:58)> start
+Domino wave started
+SOCKET(30/03/09 10:46:59)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:46:59)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 90.0 5.0 12.0 14.0 10.0 17.0 8.0 -1.0 -1.0 0.0 -4.0 0.0 13.0 7.0 8.0 4.0 0.0 0.0 0.0 1.0 0.0 2.0 13.0 -3.0 3.0 -10.0 5.0 -1.0 4.0 -2.0 1.0 8.0 17.0 -3.0 5.0 2.0 4.0 -5.0 2.0 6.0 8.0 14.0 13.0 16.0 17.0 11.0 6.0 -3.0 0.0 12.0 16.0 14.0 17.0 12.0 2.0 -1.0 13.0 7.0 8.0 15.0 9.0 3.0 5.0 5.0 10.0 16.0 6.0 8.0 0.0 6.0 13.0 2.0 1.0 -3.0 15.0 13.0 15.0 8.0 19.0 4.0 -1.0 -2.0 4.0 1.0 10.0 2.0 2.0 -1.0 8.0 3.0 -3.0 6.0 3.0 19.0 15.0 9.0 -4.0 -12.0 -5.0 -8.0 3.0 0.0 8.0 5.0 6.0 17.0 7.0 -5.0 7.0 1.0 6.0 6.0 19.0 13.0 13.0 10.0 -6.0 6.0 0.0 4.0 6.0 0.0 -12.0 0.0 4.0 8.0 1.0 2.0 2.0 2.0 4.0 9.0 5.0 -4.0 2.0 -8.0 -8.0 -1.0 6.0 9.0 5.0 10.0 7.0 15.0 2.0 0.0 6.0 5.0 10.0 10.0 -1.0 5.0 0.0 1.0 6.0 0.0 5.0 8.0 8.0 13.0 -3.0 0.0 6.0 -2.0 -4.0 1.0 4.0 2.0 14.0 9.0 16.0 0.0 8.0 -2.0 1.0 12.0 16.0 0.0 8.0 7.0 -4.0 8.0 -5.0 1.0 -9.0 18.0 17.0 13.0 2.0 -2.0 -6.0 1.0 -1.0 8.0 8.0 2.0 8.0 5.0 5.0 -2.0 0.0 4.0 4.0 9.0 12.0 9.0 20.0 20.0 17.0 14.0 22.0 16.0 23.0 17.0 20.0 14.0 19.0 15.0 20.0 18.0 20.0 25.0 26.0 17.0 16.0 23.0 12.0 13.0 4.0 18.0 17.0 14.0 17.0 23.0 23.0 26.0 19.0 15.0 15.0 12.0 4.0 19.0 25.0 19.0 19.0 10.0 8.0 14.0 13.0 25.0 24.0 25.0 12.0 13.0 15.0 13.0 19.0 20.0 25.0 12.0 25.0 17.0 14.0 12.0 13.0 18.0 13.0 20.0 15.0 29.0 9.0 2.0 -2.0 -11.0 -1.0 9.0 6.0 6.0 15.0 -2.0 8.0 1.0 9.0 -2.0 -5.0 12.0 14.0 4.0 12.0 10.0 16.0 5.0 6.0 0.0 1.0 4.0 2.0 10.0 5.0 11.0 10.0 7.0 13.0 1.0 6.0 -5.0 10.0 4.0 13.0 6.0 19.0 -8.0 -9.0 3.0 7.0 5.0 6.0 11.0 2.0 -4.0 4.0 -2.0 -2.0 5.0 6.0 0.0 -6.0 -5.0 7.0 -8.0 1.0 2.0 0.0 5.0 14.0 22.0 10.0 6.0 -1.0 1.0 8.0 -4.0 23.0 7.0 10.0 1.0 13.0 -2.0 5.0 7.0 3.0 10.0 18.0 8.0 20.0 11.0 1.0 -2.0 -4.0 3.0 -1.0 4.0 8.0 4.0 8.0 14.0 13.0 11.0 2.0 -2.0 -2.0 5.0 18.0 12.0 7.0 -8.0 5.0 -1.0 10.0 2.0 4.0 9.0 3.0 6.0 9.0 7.0 11.0 4.0 6.0 9.0 16.0 8.0 -3.0 -5.0 -12.0 -11.0 6.0 4.0 6.0 7.0 14.0 1.0 12.0 -8.0 4.0 -1.0 6.0 8.0 6.0 2.0 0.0 -5.0 -3.0 -7.0 -2.0 6.0 9.0 9.0 14.0 4.0 2.0 -3.0 2.0 -1.0 -5.0 -1.0 8.0 20.0 7.0 4.0 12.0 7.0 5.0 2.0 9.0 11.0 4.0 4.0 3.0 2.0 10.0 0.0 5.0 7.0 10.0 6.0 3.0 13.0 1.0 -3.0 1.0 17.0 6.0 0.0 10.0 -3.0 -1.0 0.0 4.0 8.0 1.0 3.0 12.0 6.0 10.0 0.0 4.0 6.0 -2.0 7.0 11.0 6.0 9.0 -5.0 1.0 9.0 7.0 8.0 4.0 10.0 10.0 4.0 15.0 -1.0 2.0 -1.0 -3.0 4.0 11.0 3.0 10.0 14.0 2.0 9.0 1.0 -1.0 -16.0 3.0 21.0 13.0 10.0 9.0 -7.0 -9.0 17.0 5.0 22.0 13.0 12.0 4.0 2.0 10.0 8.0 0.0 6.0 6.0 8.0 4.0 0.0 -9.0 -6.0 4.0 17.0 11.0 13.0 5.0 6.0 1.0 1.0 -3.0 3.0 15.0 5.0 3.0 5.0 7.0 7.0 1.0 11.0 13.0 9.0 5.0 1.0 2.0 17.0 4.0 -1.0 -6.0 -1.0 1.0 4.0 9.0 26.0 17.0 18.0 -5.0 -8.0 4.0 -4.0 9.0 10.0 10.0 6.0 2.0 3.0 9.0 16.0 8.0 17.0 -4.0 13.0 7.0 9.0 2.0 0.0 11.0 16.0 26.0 24.0 -7.0 1.0 -4.0 7.0 11.0 18.0 10.0 2.0 5.0 4.0 0.0 8.0 9.0 2.0 7.0 7.0 12.0 -3.0 7.0 8.0 2.0 4.0 15.0 17.0 15.0 12.0 11.0 13.0 4.0 7.0 -2.0 -3.0 3.0 17.0 19.0 21.0 6.0 7.0 7.0 12.0 15.0 9.0 21.0 16.0 15.0 15.0 -8.0 1.0 10.0 3.0 5.0 11.0 21.0 7.0 0.0 5.0 -5.0 12.0 8.0 13.0 3.0 0.0 5.0 -4.0 1.0 2.0 6.0 16.0 22.0 9.0 5.0 10.0 1.0 -1.0 -1.0 18.0 8.0 13.0 -1.0 9.0 -1.0 3.0 1.0 7.0 7.0 10.0 9.0 9.0 -3.0 10.0 -13.0 -4.0 -5.0 10.0 13.0 18.0 1.0 15.0 12.0 10.0 10.0 9.0 -5.0 -6.0 6.0 10.0 12.0 15.0 0.0 0.0 -5.0 13.0 6.0 6.0 15.0 9.0 -3.0 16.0 15.0 15.0 8.0 17.0 7.0 9.0 5.0 8.0 -5.0 12.0 -2.0 8.0 9.0 15.0 14.0 8.0 5.0 4.0 12.0 10.0 -2.0 -1.0 -4.0 7.0 -1.0 1.0 9.0 8.0 5.0 23.0 16.0 11.0 6.0 13.0 -4.0 10.0 10.0 9.0 5.0 -2.0 12.0 23.0 27.0 16.0 -4.0 -8.0 3.0 -1.0 11.0 15.0 15.0 14.0 3.0 -3.0 -1.0 -6.0 9.0 9.0 16.0 10.0 12.0 11.0 0.0 -2.0 1.0 12.0 23.0 13.0 13.0 10.0 6.0 0.0 9.0 14.0 9.0 13.0 -1.0 10.0 18.0 21.0 -4.0 3.0 4.0 5.0 17.0 20.0 9.0 3.0 -5.0 1.0 6.0 26.0 13.0 4.0 -7.0 8.0 -1.0 3.0 2.0 5.0 -12.0 3.0 1.0 14.0 22.0 24.0 -5.0 -6.0 -10.0 4.0 5.0 9.0 15.0 9.0 -6.0 3.0 7.0 -4.0 3.0 3.0 10.0 14.0 12.0 0.0 -1.0 2.0 7.0 10.0 -2.0 0.0 13.0 -1.0 4.0 -9.0 -10.0 3.0 9.0 8.0 0.0 10.0 10.0 1.0 1.0 4.0 0.0 7.0 13.0 20.0 6.0 2.0 1.0 -1.0 7.0 9.0 8.0 12.0 11.0 1.0 -8.0 8.0 4.0 -10.0 -7.0 -1.0 10.0 23.0 13.0 9.0 17.0 14.0 -6.0 5.0 5.0 11.0 1.0 2.0 10.0 6.0 5.0 0.0 -4.0 6.0 10.0 9.0 18.0 13.0 0.0 13.0 4.0 14.0 6.0 16.0 6.0 5.0 8.0 -1.0 -2.0 -1.0 -2.0 19.0 10.0 34.0 14.0 8.0 7.0 8.0 2.0 8.0 3.0 15.0 -5.0 6.0 6.0 4.0 0.0 -5.0 -11.0 15.0 9.0 9.0 12.0 -2.0 12.0 0.0 10.0 13.0 1.0 7.0 9.0 17.0 15.0 15.0 -1.0 -3.0 -12.0 -11.0 -39.0 -57.0 -122.0 -162.0 -196.0 -175.0 52.0 92.0 191.0 183.0 115.0 82.0 74.0 67.0 36.0 4.0 -25.0 -21.0 9.0 23.0 43.0 54.0 72.0 146.0 195.0 195.0 159.0 60.0 -87.0 -113.0 -145.0 -101.0 -94.0 -55.0 -30.0 -1.0 14.0 31.0 25.0 3.0 -2.0 0.0 0.0 -3.0 -7.0 -16.0 -20.0 -13.0 5.0 13.0 24.0 18.0 21.0 29.0 18.0 10.0 7.0 -9.0 -1.0 -3.0 -5.0 -3.0 6.0 8.0 5.0 3.0 1.0 8.0 2.0 0.0 13.0 4.0 12.0 4.0 11.0 -4.0 17.0 24.0 32.0 49.0 24.0 2.0 -3.0 13.0 98.0 164.0 132.0 127.0 48.0 116.0 53.0 ==END==
+SOCKET(30/03/09 10:46:59)> start
+Domino wave started
+SOCKET(30/03/09 10:47:01)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:47:01)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 130.0 13.0 24.0 26.0 22.0 13.0 17.0 -1.0 3.0 4.0 12.0 12.0 21.0 7.0 4.0 8.0 8.0 10.0 16.0 6.0 10.0 6.0 1.0 -3.0 -7.0 10.0 21.0 7.0 16.0 10.0 5.0 8.0 9.0 1.0 5.0 10.0 8.0 9.0 10.0 6.0 0.0 -2.0 3.0 -4.0 13.0 7.0 22.0 7.0 0.0 4.0 1.0 -1.0 5.0 4.0 -6.0 7.0 17.0 12.0 21.0 3.0 -3.0 -1.0 -11.0 1.0 2.0 11.0 14.0 0.0 -8.0 6.0 1.0 -6.0 6.0 12.0 15.0 9.0 11.0 -7.0 3.0 9.0 11.0 6.0 8.0 11.0 6.0 -2.0 -2.0 -5.0 0.0 3.0 5.0 11.0 11.0 15.0 3.0 -3.0 4.0 -4.0 3.0 13.0 7.0 15.0 8.0 14.0 3.0 1.0 -1.0 7.0 7.0 11.0 20.0 10.0 7.0 13.0 -11.0 -6.0 -2.0 6.0 8.0 8.0 14.0 8.0 -2.0 10.0 -4.0 4.0 1.0 2.0 6.0 2.0 12.0 1.0 -3.0 0.0 6.0 4.0 4.0 19.0 10.0 4.0 -3.0 -6.0 -5.0 11.0 11.0 8.0 10.0 14.0 5.0 -2.0 -5.0 1.0 8.0 9.0 11.0 5.0 12.0 8.0 4.0 1.0 1.0 0.0 6.0 3.0 4.0 5.0 8.0 -2.0 10.0 13.0 4.0 12.0 18.0 6.0 17.0 12.0 4.0 -4.0 -4.0 3.0 -4.0 3.0 5.0 6.0 23.0 9.0 12.0 1.0 2.0 -2.0 -6.0 1.0 11.0 17.0 16.0 -8.0 4.0 -3.0 1.0 3.0 12.0 4.0 11.0 9.0 12.0 1.0 16.0 20.0 13.0 18.0 36.0 20.0 11.0 2.0 4.0 6.0 19.0 15.0 16.0 18.0 12.0 29.0 14.0 9.0 8.0 15.0 12.0 18.0 16.0 18.0 9.0 6.0 13.0 11.0 16.0 14.0 11.0 15.0 38.0 24.0 32.0 15.0 18.0 8.0 19.0 10.0 16.0 28.0 17.0 25.0 28.0 21.0 16.0 9.0 3.0 20.0 15.0 24.0 29.0 22.0 25.0 25.0 14.0 16.0 17.0 22.0 32.0 20.0 15.0 20.0 13.0 6.0 -2.0 -1.0 7.0 5.0 0.0 10.0 5.0 -2.0 0.0 14.0 17.0 18.0 19.0 4.0 1.0 4.0 8.0 -2.0 0.0 1.0 10.0 4.0 5.0 9.0 10.0 5.0 5.0 -5.0 0.0 -5.0 22.0 16.0 14.0 7.0 18.0 0.0 5.0 1.0 -1.0 2.0 6.0 23.0 30.0 17.0 14.0 16.0 -10.0 -12.0 0.0 2.0 -2.0 5.0 10.0 8.0 10.0 -1.0 -3.0 4.0 9.0 9.0 4.0 5.0 10.0 14.0 6.0 14.0 -1.0 5.0 8.0 12.0 13.0 3.0 10.0 -3.0 3.0 2.0 5.0 7.0 11.0 10.0 14.0 4.0 4.0 -9.0 11.0 8.0 0.0 3.0 19.0 4.0 4.0 -4.0 4.0 2.0 17.0 11.0 7.0 10.0 10.0 13.0 6.0 4.0 -1.0 -4.0 5.0 11.0 20.0 10.0 8.0 5.0 7.0 1.0 -1.0 11.0 7.0 8.0 15.0 4.0 7.0 -6.0 2.0 -5.0 -4.0 9.0 14.0 8.0 2.0 7.0 10.0 5.0 7.0 0.0 16.0 7.0 11.0 12.0 -2.0 -2.0 8.0 0.0 7.0 -2.0 21.0 1.0 14.0 1.0 10.0 0.0 6.0 2.0 10.0 16.0 3.0 -5.0 8.0 0.0 -5.0 -4.0 8.0 11.0 17.0 7.0 5.0 7.0 4.0 0.0 -1.0 -2.0 22.0 0.0 13.0 16.0 15.0 6.0 -2.0 -2.0 5.0 5.0 5.0 2.0 17.0 4.0 14.0 -3.0 3.0 10.0 12.0 0.0 5.0 -1.0 4.0 6.0 15.0 0.0 16.0 10.0 7.0 7.0 7.0 -2.0 -6.0 -1.0 5.0 9.0 15.0 4.0 8.0 6.0 10.0 0.0 5.0 -1.0 6.0 10.0 5.0 9.0 -1.0 -7.0 6.0 2.0 -2.0 14.0 6.0 -1.0 4.0 -9.0 3.0 3.0 6.0 -3.0 3.0 16.0 17.0 5.0 14.0 9.0 3.0 4.0 -2.0 10.0 21.0 20.0 18.0 1.0 0.0 4.0 10.0 6.0 10.0 23.0 17.0 11.0 5.0 9.0 14.0 1.0 9.0 -3.0 15.0 -1.0 1.0 12.0 0.0 3.0 11.0 9.0 11.0 13.0 1.0 5.0 5.0 2.0 -5.0 4.0 17.0 14.0 3.0 -2.0 4.0 0.0 11.0 7.0 8.0 7.0 12.0 4.0 4.0 1.0 18.0 -6.0 -6.0 -3.0 7.0 1.0 24.0 12.0 13.0 4.0 18.0 -9.0 5.0 7.0 9.0 6.0 12.0 3.0 3.0 8.0 1.0 1.0 -1.0 7.0 14.0 19.0 6.0 1.0 12.0 15.0 16.0 13.0 2.0 3.0 -1.0 0.0 1.0 11.0 8.0 11.0 8.0 20.0 7.0 6.0 4.0 3.0 0.0 8.0 11.0 -2.0 10.0 12.0 13.0 6.0 12.0 6.0 14.0 7.0 12.0 24.0 9.0 1.0 21.0 -4.0 10.0 -4.0 9.0 19.0 16.0 1.0 15.0 7.0 3.0 5.0 1.0 8.0 16.0 13.0 13.0 -2.0 8.0 9.0 4.0 16.0 10.0 16.0 16.0 12.0 9.0 5.0 10.0 11.0 3.0 4.0 14.0 0.0 1.0 3.0 13.0 3.0 7.0 9.0 16.0 12.0 10.0 0.0 1.0 5.0 5.0 22.0 16.0 8.0 5.0 3.0 8.0 6.0 10.0 8.0 10.0 19.0 14.0 15.0 -2.0 1.0 -4.0 0.0 -5.0 5.0 5.0 7.0 13.0 16.0 10.0 5.0 -1.0 1.0 2.0 2.0 15.0 12.0 9.0 3.0 -1.0 1.0 -2.0 3.0 8.0 14.0 8.0 14.0 7.0 4.0 8.0 10.0 12.0 17.0 10.0 2.0 9.0 0.0 -3.0 13.0 5.0 14.0 8.0 25.0 18.0 6.0 11.0 6.0 13.0 4.0 10.0 -6.0 19.0 5.0 8.0 8.0 6.0 17.0 12.0 12.0 12.0 7.0 19.0 11.0 15.0 0.0 9.0 8.0 9.0 12.0 6.0 17.0 9.0 16.0 2.0 7.0 3.0 -4.0 2.0 9.0 16.0 13.0 1.0 -7.0 6.0 6.0 8.0 9.0 6.0 14.0 13.0 -9.0 10.0 3.0 4.0 6.0 7.0 8.0 9.0 -1.0 4.0 1.0 3.0 -15.0 1.0 6.0 26.0 5.0 -6.0 -19.0 0.0 4.0 11.0 11.0 17.0 8.0 -1.0 9.0 -6.0 5.0 9.0 -5.0 -1.0 2.0 12.0 9.0 17.0 10.0 4.0 -1.0 -9.0 7.0 11.0 7.0 13.0 10.0 14.0 7.0 -4.0 -1.0 -13.0 3.0 15.0 3.0 4.0 9.0 -5.0 13.0 3.0 10.0 7.0 13.0 8.0 10.0 10.0 6.0 7.0 9.0 8.0 10.0 7.0 -2.0 2.0 -4.0 2.0 11.0 7.0 3.0 4.0 -2.0 2.0 6.0 1.0 2.0 -2.0 8.0 5.0 3.0 4.0 10.0 14.0 -2.0 -11.0 7.0 6.0 -1.0 13.0 5.0 -4.0 5.0 -2.0 -6.0 2.0 -3.0 0.0 8.0 14.0 6.0 9.0 4.0 3.0 0.0 9.0 4.0 6.0 18.0 6.0 6.0 10.0 4.0 7.0 14.0 7.0 14.0 9.0 6.0 9.0 -6.0 -7.0 7.0 16.0 10.0 12.0 7.0 10.0 -5.0 6.0 6.0 12.0 5.0 3.0 9.0 11.0 9.0 5.0 8.0 6.0 7.0 0.0 6.0 13.0 6.0 -1.0 1.0 12.0 7.0 11.0 7.0 1.0 -12.0 -46.0 -79.0 -105.0 -166.0 -166.0 -121.0 -70.0 160.0 198.0 178.0 144.0 94.0 78.0 57.0 37.0 -5.0 -21.0 -21.0 -1.0 22.0 45.0 56.0 82.0 121.0 206.0 199.0 122.0 79.0 -38.0 -115.0 -101.0 -115.0 -81.0 -64.0 -27.0 -6.0 3.0 19.0 18.0 8.0 3.0 6.0 -4.0 -10.0 -18.0 -15.0 -24.0 -20.0 3.0 21.0 27.0 32.0 18.0 8.0 15.0 8.0 -6.0 -5.0 -4.0 -5.0 9.0 3.0 5.0 6.0 -4.0 -3.0 -1.0 9.0 8.0 7.0 4.0 18.0 8.0 12.0 4.0 -1.0 4.0 21.0 38.0 50.0 45.0 33.0 -2.0 21.0 45.0 115.0 164.0 112.0 131.0 52.0 112.0 57.0 ==END==
+SOCKET(30/03/09 10:47:01)> start
+Domino wave started
+SOCKET(30/03/09 10:47:02)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:47:02)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 94.0 6.0 -3.0 18.0 11.0 14.0 14.0 12.0 17.0 18.0 8.0 -10.0 -3.0 9.0 4.0 20.0 11.0 9.0 3.0 9.0 6.0 4.0 29.0 13.0 18.0 -1.0 -4.0 -1.0 17.0 12.0 1.0 19.0 16.0 -3.0 3.0 5.0 -11.0 -3.0 4.0 23.0 8.0 8.0 19.0 3.0 0.0 4.0 7.0 5.0 12.0 15.0 10.0 5.0 9.0 1.0 -1.0 1.0 21.0 10.0 15.0 8.0 3.0 1.0 0.0 -2.0 -2.0 -2.0 3.0 7.0 11.0 16.0 8.0 4.0 -3.0 -1.0 0.0 8.0 16.0 10.0 20.0 6.0 5.0 2.0 1.0 2.0 8.0 18.0 21.0 3.0 0.0 -2.0 5.0 12.0 17.0 9.0 9.0 2.0 4.0 -15.0 2.0 2.0 0.0 14.0 13.0 12.0 13.0 15.0 2.0 -3.0 -4.0 8.0 9.0 19.0 9.0 12.0 10.0 3.0 8.0 -3.0 16.0 7.0 5.0 11.0 9.0 13.0 10.0 6.0 14.0 4.0 9.0 2.0 13.0 18.0 1.0 12.0 -5.0 1.0 3.0 -7.0 11.0 14.0 15.0 18.0 8.0 1.0 -2.0 6.0 6.0 7.0 8.0 15.0 1.0 11.0 19.0 -2.0 3.0 1.0 4.0 0.0 3.0 4.0 -5.0 5.0 4.0 1.0 10.0 13.0 11.0 7.0 2.0 6.0 11.0 -2.0 7.0 18.0 9.0 -2.0 -2.0 1.0 0.0 4.0 6.0 0.0 3.0 0.0 4.0 -4.0 11.0 -6.0 -2.0 2.0 0.0 1.0 9.0 16.0 26.0 11.0 8.0 3.0 2.0 -11.0 5.0 10.0 15.0 11.0 8.0 4.0 2.0 5.0 10.0 14.0 7.0 9.0 24.0 9.0 11.0 5.0 5.0 13.0 8.0 9.0 9.0 8.0 -10.0 -7.0 -12.0 1.0 0.0 -2.0 10.0 1.0 0.0 -4.0 3.0 -2.0 5.0 12.0 12.0 0.0 8.0 7.0 -9.0 3.0 10.0 1.0 -4.0 9.0 17.0 5.0 10.0 6.0 -1.0 6.0 -1.0 -7.0 4.0 -3.0 0.0 13.0 17.0 18.0 16.0 12.0 1.0 9.0 0.0 9.0 24.0 25.0 17.0 22.0 18.0 16.0 7.0 17.0 16.0 22.0 23.0 23.0 16.0 10.0 12.0 20.0 22.0 13.0 24.0 23.0 20.0 3.0 16.0 8.0 21.0 18.0 13.0 19.0 31.0 22.0 8.0 19.0 25.0 12.0 24.0 23.0 25.0 19.0 19.0 14.0 4.0 19.0 17.0 13.0 15.0 25.0 20.0 22.0 19.0 9.0 19.0 16.0 10.0 7.0 16.0 21.0 26.0 33.0 24.0 18.0 19.0 12.0 2.0 12.0 9.0 10.0 6.0 -1.0 11.0 5.0 3.0 -2.0 0.0 7.0 13.0 6.0 21.0 8.0 11.0 0.0 9.0 8.0 16.0 14.0 20.0 9.0 10.0 4.0 5.0 -1.0 10.0 15.0 13.0 3.0 10.0 3.0 13.0 1.0 10.0 3.0 18.0 12.0 9.0 16.0 14.0 2.0 1.0 11.0 7.0 5.0 14.0 11.0 6.0 13.0 4.0 6.0 -7.0 5.0 3.0 -4.0 2.0 3.0 2.0 12.0 13.0 -1.0 8.0 5.0 2.0 -2.0 6.0 10.0 16.0 5.0 4.0 8.0 3.0 3.0 14.0 -3.0 13.0 6.0 17.0 11.0 11.0 6.0 6.0 4.0 16.0 6.0 15.0 3.0 8.0 7.0 4.0 -4.0 8.0 4.0 12.0 18.0 13.0 11.0 -13.0 6.0 14.0 13.0 10.0 8.0 7.0 4.0 5.0 7.0 5.0 10.0 12.0 5.0 21.0 10.0 14.0 11.0 -1.0 13.0 11.0 0.0 -1.0 -6.0 17.0 15.0 9.0 13.0 10.0 8.0 -6.0 2.0 10.0 13.0 12.0 8.0 4.0 11.0 6.0 0.0 -2.0 6.0 20.0 19.0 15.0 3.0 17.0 6.0 5.0 9.0 6.0 12.0 13.0 -8.0 -2.0 -1.0 -1.0 -1.0 8.0 24.0 7.0 4.0 8.0 11.0 1.0 12.0 14.0 11.0 4.0 -4.0 11.0 6.0 10.0 4.0 9.0 3.0 10.0 14.0 8.0 8.0 5.0 -7.0 9.0 7.0 6.0 -4.0 6.0 2.0 7.0 10.0 20.0 4.0 5.0 -1.0 8.0 -6.0 19.0 13.0 24.0 6.0 -2.0 -1.0 7.0 2.0 9.0 3.0 18.0 9.0 7.0 0.0 8.0 10.0 10.0 26.0 15.0 3.0 2.0 6.0 -3.0 9.0 11.0 3.0 14.0 10.0 5.0 9.0 6.0 -1.0 4.0 3.0 13.0 17.0 17.0 -3.0 12.0 -1.0 9.0 5.0 22.0 21.0 21.0 15.0 10.0 5.0 12.0 4.0 3.0 1.0 4.0 9.0 20.0 21.0 15.0 13.0 -3.0 -1.0 9.0 1.0 10.0 13.0 9.0 12.0 19.0 -1.0 -5.0 16.0 9.0 11.0 24.0 9.0 6.0 18.0 9.0 5.0 9.0 22.0 12.0 1.0 8.0 10.0 -1.0 -5.0 4.0 13.0 19.0 17.0 13.0 3.0 -4.0 0.0 0.0 5.0 10.0 10.0 -2.0 -3.0 -1.0 5.0 16.0 12.0 8.0 4.0 1.0 3.0 1.0 7.0 9.0 6.0 0.0 13.0 8.0 18.0 13.0 15.0 23.0 15.0 -2.0 19.0 2.0 9.0 8.0 20.0 16.0 9.0 2.0 7.0 7.0 8.0 17.0 15.0 20.0 2.0 12.0 7.0 12.0 2.0 8.0 7.0 9.0 8.0 -5.0 -2.0 5.0 12.0 17.0 19.0 30.0 2.0 14.0 16.0 21.0 24.0 9.0 11.0 26.0 10.0 10.0 8.0 5.0 -2.0 7.0 13.0 15.0 17.0 19.0 15.0 5.0 4.0 12.0 0.0 9.0 3.0 13.0 18.0 12.0 21.0 22.0 11.0 11.0 12.0 5.0 20.0 18.0 16.0 15.0 13.0 18.0 -4.0 9.0 7.0 17.0 8.0 15.0 9.0 21.0 7.0 6.0 9.0 18.0 5.0 24.0 7.0 -4.0 4.0 0.0 8.0 13.0 16.0 15.0 12.0 10.0 6.0 19.0 7.0 2.0 11.0 6.0 8.0 7.0 5.0 10.0 16.0 9.0 6.0 15.0 20.0 4.0 10.0 11.0 19.0 3.0 4.0 13.0 12.0 4.0 9.0 13.0 16.0 24.0 8.0 12.0 -1.0 3.0 4.0 8.0 25.0 16.0 8.0 6.0 -10.0 14.0 -4.0 2.0 4.0 13.0 19.0 4.0 0.0 2.0 11.0 20.0 11.0 9.0 0.0 10.0 -2.0 4.0 10.0 3.0 4.0 10.0 27.0 12.0 0.0 -18.0 -9.0 -6.0 20.0 25.0 10.0 14.0 -7.0 9.0 -1.0 -2.0 9.0 9.0 6.0 10.0 -3.0 -5.0 -4.0 -2.0 1.0 4.0 3.0 -3.0 8.0 6.0 15.0 17.0 9.0 6.0 14.0 9.0 3.0 14.0 22.0 21.0 1.0 3.0 -6.0 9.0 12.0 16.0 17.0 19.0 0.0 -4.0 2.0 13.0 9.0 4.0 5.0 12.0 12.0 7.0 8.0 9.0 -7.0 3.0 9.0 14.0 13.0 14.0 0.0 -1.0 6.0 4.0 5.0 21.0 15.0 19.0 -1.0 -3.0 7.0 1.0 -5.0 8.0 23.0 14.0 22.0 8.0 7.0 7.0 3.0 0.0 3.0 4.0 17.0 19.0 17.0 10.0 24.0 7.0 1.0 -4.0 0.0 5.0 14.0 7.0 17.0 8.0 5.0 3.0 3.0 12.0 11.0 6.0 11.0 11.0 21.0 9.0 8.0 2.0 11.0 19.0 16.0 13.0 8.0 0.0 13.0 4.0 15.0 18.0 13.0 13.0 22.0 14.0 4.0 9.0 5.0 -4.0 -11.0 -18.0 -90.0 -126.0 -159.0 -172.0 -116.0 -10.0 102.0 207.0 177.0 131.0 85.0 77.0 68.0 32.0 -10.0 -44.0 -30.0 -5.0 37.0 57.0 65.0 96.0 134.0 179.0 184.0 142.0 57.0 -22.0 -93.0 -104.0 -94.0 -84.0 -61.0 -40.0 -10.0 10.0 30.0 33.0 20.0 7.0 -6.0 -9.0 -6.0 -3.0 -4.0 -18.0 -8.0 4.0 24.0 21.0 35.0 29.0 27.0 22.0 3.0 1.0 -1.0 -7.0 -4.0 -1.0 13.0 11.0 10.0 6.0 9.0 0.0 3.0 -3.0 3.0 10.0 12.0 11.0 -2.0 8.0 7.0 33.0 11.0 24.0 39.0 45.0 30.0 15.0 -5.0 36.0 96.0 126.0 117.0 125.0 62.0 91.0 61.0 ==END==
+SOCKET(30/03/09 10:47:02)> start
+Domino wave started
+SOCKET(30/03/09 10:47:03)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:47:03)> read 0 0 0
+Waveform from board 0, chip 0, channel 0
+Note: The first number is the number of numbers that follows.
+==START== 1024 134.0 18.0 9.0 15.0 20.0 21.0 20.0 17.0 8.0 13.0 9.0 -2.0 8.0 12.0 4.0 5.0 12.0 1.0 16.0 10.0 5.0 14.0 22.0 24.0 27.0 22.0 16.0 18.0 19.0 15.0 16.0 14.0 20.0 25.0 18.0 17.0 12.0 19.0 16.0 18.0 28.0 31.0 17.0 14.0 25.0 19.0 20.0 14.0 5.0 15.0 25.0 24.0 24.0 23.0 29.0 27.0 19.0 6.0 12.0 28.0 21.0 25.0 11.0 21.0 12.0 9.0 15.0 13.0 24.0 16.0 29.0 26.0 29.0 33.0 18.0 24.0 13.0 18.0 19.0 12.0 23.0 20.0 -3.0 -2.0 -2.0 -16.0 -1.0 17.0 9.0 6.0 15.0 3.0 8.0 1.0 5.0 3.0 7.0 12.0 9.0 0.0 8.0 2.0 20.0 5.0 2.0 4.0 5.0 9.0 14.0 10.0 22.0 -5.0 -3.0 -5.0 1.0 -4.0 22.0 11.0 26.0 20.0 13.0 11.0 14.0 16.0 1.0 7.0 12.0 5.0 2.0 16.0 10.0 9.0 8.0 -2.0 8.0 5.0 6.0 20.0 18.0 7.0 12.0 8.0 9.0 -4.0 0.0 5.0 14.0 14.0 10.0 -2.0 -1.0 1.0 4.0 12.0 23.0 7.0 18.0 5.0 18.0 -2.0 13.0 7.0 11.0 2.0 14.0 8.0 8.0 6.0 1.0 3.0 0.0 -9.0 19.0 4.0 8.0 8.0 0.0 6.0 -3.0 3.0 -3.0 -2.0 10.0 5.0 10.0 12.0 19.0 4.0 -3.0 -1.0 10.0 10.0 8.0 0.0 12.0 6.0 14.0 -3.0 -5.0 4.0 11.0 4.0 16.0 13.0 7.0 11.0 -4.0 -6.0 10.0 16.0 10.0 11.0 2.0 1.0 7.0 -4.0 12.0 3.0 6.0 12.0 6.0 10.0 16.0 0.0 -3.0 3.0 8.0 6.0 9.0 13.0 10.0 4.0 6.0 -8.0 10.0 8.0 7.0 12.0 16.0 12.0 -1.0 12.0 3.0 0.0 9.0 -3.0 5.0 19.0 18.0 9.0 7.0 -2.0 2.0 -4.0 13.0 16.0 19.0 10.0 8.0 -2.0 5.0 -3.0 13.0 17.0 14.0 8.0 10.0 2.0 -1.0 5.0 8.0 12.0 9.0 7.0 15.0 2.0 10.0 8.0 8.0 2.0 7.0 11.0 23.0 10.0 2.0 -9.0 -3.0 1.0 7.0 8.0 12.0 6.0 2.0 -4.0 10.0 -1.0 10.0 10.0 5.0 9.0 11.0 -2.0 -10.0 -7.0 5.0 -6.0 -14.0 4.0 8.0 7.0 6.0 13.0 6.0 5.0 8.0 3.0 1.0 10.0 18.0 13.0 8.0 0.0 -2.0 -5.0 12.0 16.0 14.0 15.0 8.0 23.0 15.0 16.0 10.0 18.0 13.0 15.0 5.0 9.0 6.0 -3.0 -7.0 2.0 15.0 19.0 8.0 7.0 9.0 -1.0 7.0 -3.0 20.0 9.0 5.0 5.0 1.0 -3.0 3.0 4.0 17.0 2.0 15.0 12.0 8.0 5.0 11.0 2.0 -2.0 -1.0 4.0 12.0 8.0 9.0 6.0 19.0 2.0 11.0 10.0 13.0 8.0 16.0 8.0 4.0 13.0 16.0 5.0 7.0 5.0 15.0 16.0 22.0 13.0 18.0 -3.0 10.0 11.0 7.0 22.0 15.0 6.0 -7.0 0.0 5.0 20.0 13.0 6.0 3.0 11.0 4.0 5.0 11.0 4.0 2.0 4.0 7.0 21.0 6.0 4.0 -1.0 9.0 8.0 20.0 8.0 14.0 7.0 21.0 19.0 12.0 6.0 10.0 3.0 7.0 5.0 14.0 16.0 26.0 15.0 10.0 8.0 5.0 -2.0 7.0 13.0 11.0 2.0 7.0 10.0 9.0 4.0 0.0 8.0 13.0 8.0 8.0 18.0 8.0 11.0 10.0 11.0 11.0 8.0 18.0 10.0 2.0 6.0 7.0 9.0 18.0 17.0 13.0 7.0 13.0 -1.0 -1.0 9.0 16.0 7.0 10.0 5.0 1.0 1.0 10.0 12.0 8.0 16.0 20.0 8.0 8.0 11.0 15.0 8.0 6.0 -6.0 -6.0 3.0 10.0 15.0 14.0 8.0 20.0 10.0 5.0 7.0 5.0 11.0 6.0 20.0 14.0 5.0 2.0 6.0 7.0 8.0 13.0 17.0 13.0 9.0 8.0 7.0 16.0 -2.0 4.0 14.0 15.0 4.0 18.0 10.0 4.0 12.0 23.0 2.0 14.0 4.0 -8.0 4.0 5.0 4.0 8.0 5.0 14.0 11.0 3.0 6.0 9.0 0.0 18.0 6.0 19.0 15.0 18.0 12.0 10.0 13.0 12.0 -4.0 2.0 11.0 14.0 20.0 25.0 5.0 19.0 3.0 5.0 -1.0 -2.0 13.0 1.0 11.0 10.0 12.0 7.0 0.0 10.0 5.0 16.0 18.0 9.0 8.0 14.0 2.0 12.0 -3.0 19.0 14.0 17.0 7.0 2.0 -2.0 8.0 1.0 3.0 12.0 9.0 12.0 16.0 1.0 7.0 5.0 6.0 2.0 18.0 21.0 9.0 -1.0 12.0 -1.0 7.0 -1.0 13.0 13.0 16.0 9.0 14.0 9.0 9.0 0.0 -1.0 2.0 4.0 5.0 13.0 15.0 14.0 4.0 3.0 7.0 6.0 -1.0 8.0 2.0 10.0 12.0 -4.0 3.0 2.0 11.0 15.0 3.0 16.0 5.0 7.0 4.0 -1.0 5.0 11.0 17.0 16.0 -5.0 -5.0 2.0 4.0 1.0 8.0 10.0 7.0 3.0 16.0 6.0 6.0 11.0 -1.0 12.0 14.0 8.0 -3.0 1.0 1.0 -3.0 8.0 8.0 20.0 13.0 9.0 10.0 -2.0 -7.0 1.0 2.0 6.0 -1.0 5.0 5.0 16.0 18.0 15.0 2.0 14.0 13.0 0.0 0.0 10.0 14.0 13.0 14.0 -2.0 -5.0 5.0 4.0 10.0 14.0 11.0 14.0 15.0 0.0 -1.0 18.0 15.0 10.0 14.0 15.0 9.0 6.0 -2.0 3.0 8.0 6.0 12.0 25.0 28.0 15.0 10.0 6.0 4.0 5.0 11.0 4.0 20.0 4.0 5.0 12.0 14.0 17.0 4.0 6.0 17.0 11.0 11.0 9.0 17.0 15.0 6.0 3.0 1.0 8.0 19.0 13.0 20.0 23.0 10.0 -6.0 5.0 3.0 1.0 11.0 18.0 8.0 15.0 3.0 4.0 -1.0 9.0 11.0 7.0 4.0 15.0 8.0 15.0 7.0 16.0 12.0 8.0 13.0 10.0 5.0 3.0 0.0 7.0 20.0 17.0 14.0 7.0 9.0 2.0 -1.0 3.0 6.0 0.0 10.0 -8.0 -3.0 -4.0 -4.0 3.0 1.0 8.0 9.0 2.0 4.0 20.0 8.0 6.0 7.0 6.0 -1.0 1.0 3.0 9.0 10.0 8.0 9.0 11.0 1.0 -1.0 11.0 0.0 13.0 8.0 12.0 9.0 7.0 4.0 -4.0 3.0 15.0 16.0 20.0 23.0 5.0 -3.0 9.0 9.0 11.0 21.0 10.0 11.0 -2.0 -5.0 1.0 0.0 10.0 10.0 17.0 12.0 3.0 -1.0 4.0 16.0 8.0 9.0 7.0 8.0 8.0 4.0 10.0 4.0 11.0 5.0 6.0 5.0 2.0 8.0 2.0 5.0 3.0 4.0 -2.0 -3.0 12.0 5.0 13.0 17.0 14.0 16.0 0.0 2.0 -2.0 -4.0 10.0 3.0 12.0 9.0 3.0 2.0 -13.0 4.0 8.0 13.0 19.0 13.0 12.0 14.0 3.0 -7.0 2.0 12.0 7.0 5.0 11.0 13.0 -3.0 2.0 11.0 6.0 16.0 13.0 6.0 5.0 6.0 -4.0 7.0 10.0 9.0 15.0 8.0 15.0 -1.0 3.0 -2.0 4.0 6.0 14.0 14.0 6.0 3.0 0.0 -1.0 -7.0 -2.0 -5.0 -18.0 -29.0 -71.0 -116.0 -156.0 -165.0 -136.0 -37.0 97.0 174.0 188.0 147.0 99.0 80.0 57.0 47.0 1.0 -29.0 -26.0 -5.0 23.0 46.0 48.0 59.0 130.0 167.0 188.0 169.0 67.0 -32.0 -135.0 -128.0 -112.0 -129.0 -70.0 -42.0 -18.0 8.0 25.0 25.0 8.0 6.0 4.0 -4.0 3.0 -6.0 -16.0 -27.0 -18.0 -17.0 3.0 11.0 28.0 35.0 22.0 18.0 10.0 3.0 5.0 0.0 1.0 -9.0 -10.0 -4.0 13.0 8.0 25.0 13.0 4.0 10.0 3.0 4.0 9.0 4.0 2.0 2.0 26.0 12.0 16.0 8.0 18.0 21.0 48.0 50.0 16.0 -12.0 3.0 50.0 96.0 109.0 133.0 155.0 94.0 117.0 94.0 ==END==
+SOCKET(30/03/09 10:47:03)> start
+Domino wave started
+SOCKET(30/03/09 10:47:09)> stop
+Domino wave stopped
+SOCKET(30/03/09 10:47:09)> read 7 0 0
+Error: Board 7 does not exist
+Disconnected from client.
+CONSOLE(30/03/09 10:49:00)>  exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 5000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(30/03/09 11:56:47)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 5000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+CONSOLE(30/03/09 11:58:21)> f 1
+Setting frequency without regulation:
+Domino wave of board 0 is running at 1.000 GHz
+Domino wave of board 1 is running at 1.000 GHz
+Domino wave of board 2 is running at 1.001 GHz
+Domino wave of board 3 is running at 0.999 GHz
+CONSOLE(30/03/09 11:58:24)> b 0
+CONSOLE(30/03/09 11:58:27)> take d 100
+Warning: Response calibration of board 0 chip 0 not yet read!
+Reading response calibration file for board 0 from: "/home/ogrimm/fact_repos/drsdaq/calib"
+Hardware trigger of board 0 enabled
+
+Starting run #0 (data) on "DUMMY" with 100 event(s)
+
+Data file "/ct3data/20090330/20090330_00000005_DUMMY_d_0.raw" opened.
+Data file closed.
+
+data run #5 completed (100 event(s))
+Time for run 3.63 seconds, trigger rate 27.54 Hz.
+Run size 3 MByte, data rate 1.1 MByte/s.
+CONSOLE(30/03/09 12:00:43)> exit
+Feeback socket closed.
+********** Logging ended **********
+
+********** Logging started **********
+LogFile: DRSDAQ.log	RawDataPath: /ct3data
+RotateWave: 1		FirstSample: 0		LastSample: 1023
+MinDiskSpaceMB: 1000	MaxFileSizeMB: 5000	CCPort: 2000
+FirstVMESlot: 1		LastVMESlot: 7
+HVFeedbackConfig: 	../config/HVFeedback.conf
+Init. mezz. board  0 on VME slot  3 upper, serial #122, firmware revision 5268
+Init. mezz. board  1 on VME slot  3 lower, serial #123, firmware revision 5268
+Init. mezz. board  2 on VME slot  4 upper, serial #306, firmware revision 5268
+Init. mezz. board  3 on VME slot  4 lower, serial #130, firmware revision 5268
+LedTrigBoard: 0		LedTrigChip: 1		LedTrigChannel: 7
+LedTrigSample: 940	LedTrigThreshold: 100.00
+LedSignalSample: 400	LedBaselineSample: 100	DefaultNumAverage: 100
+HVControlServer: eth-vme02.ethz.ch	HVControlPort: 3000
+MaxCmdAckDelay: 5
+Could not connect to HV server eth-vme02.ethz.ch at port 3000 (Connection refused)
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+Disconnected from client.
+Connected to client at 192.33.98.222 (ihp-pc26.ethz.ch).
+Disconnected from client.
+CONSOLE(30/03/09 16:45:51)> exit
+Feeback socket closed.
+********** Logging ended **********
+
Index: /drsdaq/HVFeedback.cc
===================================================================
--- /drsdaq/HVFeedback.cc	(revision 22)
+++ /drsdaq/HVFeedback.cc	(revision 22)
@@ -0,0 +1,307 @@
+/********************************************************************\
+
+  HVFeedback.cc
+
+  Class handling the feedback of GAPD high voltage
+    
+  Oliver Grimm
+
+\********************************************************************/
+
+#include "HVFeedback.h"
+#include "PixelMap.h"
+
+#include <sys/socket.h>
+#include <netdb.h>
+#include <signal.h>
+
+#define MAX_RETRY 5
+
+// Constructor: Initialise feedback 
+HVFeedback::HVFeedback(DAQReadout* DAQClass, char* Configfile) {
+  struct sockaddr_in SocketAddress;
+  
+  m = DAQClass;
+  PixMap = new PixelMap("../config/PixelMap.txt", false);
+  
+  // Read configuration file
+  FILE *File;
+  if ((File = fopen(Configfile,"r")) == NULL) {
+    printf("Error: Could not open feedback configuration file '%s'\n", Configfile);
+  }
+  else {
+    printf("Reading feedback configuration file %s\n", Configfile);
+    ReadCard("LedTrigBoard",       &fLedTrigBoard,      'I', File);
+    ReadCard("LedTrigChannel",     &fLedTrigChannel,    'I', File);
+    ReadCard("LedTrigChip",        &fLedTrigChip,       'I', File);
+    ReadCard("LedTrigSample",      &fLedTrigSample,     'I', File);
+    ReadCard("LedTrigThreshold",   &fLedTrigThreshold,  'f', File);
+    ReadCard("LedSignalSample",    &fLedSignalSample,   'I', File);
+    ReadCard("LedBaselineSample",  &fLedBaselineSample, 'I', File);
+    ReadCard("DefaultNumAverage",  &fDefaultNumAverage, 'I', File);
+    ReadCard("HVControlServer",     fHVControlServer,   's', File);
+    ReadCard("HVControlPort",      &fHVControlPort,     'I', File);
+    ReadCard("MaxCmdAckDelay",     &fMaxCmdAckDelay,    'I', File);
+    fclose(File);
+  }
+  PrintConfig();
+
+  // Initialise
+  Average    = new float [m->NumCMCBoards][kNumberOfChips][kNumberOfChannels];
+  Response   = new float [m->NumCMCBoards][kNumberOfChips][kNumberOfChannels];
+  Target     = new float [m->NumCMCBoards][kNumberOfChips][kNumberOfChannels];
+  Buffer     = new float [m->NumCMCBoards][kNumberOfChips][kNumberOfChannels];  
+ 
+  Gain = 1;
+  SetFBMode(FB_Off);
+  SetNumAverages(fDefaultNumAverage);
+
+  // Opening socket client to HV control program
+  if ((SocketDescriptor = socket(PF_INET, SOCK_STREAM, 0)) == -1)
+    m->PrintMessage("Could not open client socket, no HV control available.\n");
+
+  // Resolve hostname and try to connect to server
+  struct hostent *hostent = gethostbyname(fHVControlServer);
+  if (hostent==0)
+    m->PrintMessage("Could not resolve HV server host name \"%s\".\n", fHVControlServer);
+  else {
+    SocketAddress.sin_family = PF_INET;
+    SocketAddress.sin_port = htons((unsigned short) fHVControlPort);
+    SocketAddress.sin_addr = *(struct in_addr*) hostent->h_addr;
+  
+    if (connect(SocketDescriptor, (struct sockaddr *) &SocketAddress, sizeof(SocketAddress))==-1)
+      m->PrintMessage("Could not connect to HV server %s at port %d (%s)\n", fHVControlServer, fHVControlPort, strerror(errno));
+    else m->PrintMessage("\nFeedback connected to HV server %s (port %d).\n", fHVControlServer, fHVControlPort);
+    signal(SIGPIPE,SIG_IGN);  // Do not kill process if writing to closed socket
+  }
+}
+
+// Destructor
+HVFeedback::~HVFeedback() {
+  if (SocketDescriptor!=-1) {
+    close(SocketDescriptor);
+    m->PrintMessage("Feeback socket closed.\n");
+  }
+  delete[] Average;   	delete[] Response;
+  delete[] Target;   	delete[] Buffer;
+  delete PixMap;
+}
+
+
+// Check if LED trigger present, if yes accumulate feedback data and
+// calculate new high voltages if the required number of events is reached.
+bool HVFeedback::ProcessEvent() {
+  float Correction;
+  
+  // Check for LED trigger channel on given channel and if feedback running
+  if (FBMode==FB_Off || m->WaveForm[fLedTrigBoard][fLedTrigChip][fLedTrigChannel][fLedTrigSample] < fLedTrigThreshold)
+    return false;
+  Count++;
+  
+  // Add signal at LED bin for all channels
+  for (int i=m->FirstBoard; i<=m->LastBoard; i++)
+    for (int j=0; j<kNumberOfChips; j++)
+      for (int k=0; k<kNumberOfChannels; k++)
+        Average[i][j][k] += (m->WaveForm[i][j][k][fLedSignalSample] - m->WaveForm[i][j][k][fLedBaselineSample])*m->BStruct[i].ScaleFactor;
+  
+  // Acquired number of event requires action
+  if (Count==NumAverages) {
+    for (int i=m->FirstBoard; i<=m->LastBoard; i++)
+      for (int j=0; j<kNumberOfChips; j++)
+        for (int k=0; k<kNumberOfChannels; k++) {
+	  Average[i][j][k] /= Count;
+	  switch (FBMode) {
+	    case FB_Active:   // Determine correction from response maxtrix and change voltages
+              Correction = (Target[i][j][k] - Average[i][j][k])*Response[i][j][k]*Gain;
+              if(Target[i][j][k]!=0 && !PixMap->DRS_to_Pixel(i,j,k).empty())
+		WriteHVCommand("hvdiff %s %f\n",PixMap->DRS_to_Pixel(i,j,k).c_str(),Correction);
+	      break;
+	    case FB_Targets:  // Take average as new targets  
+	      Target[i][j][k] = Average[i][j][k];
+	      break;
+      	    case FB_ResponseFirst:  // First point of response measurement done  
+	      Buffer[i][j][k] = Average[i][j][k];
+	      if(!PixMap->DRS_to_Pixel(i,j,k).empty()) WriteHVCommand("hvdiff %s %f",PixMap->DRS_to_Pixel(i,j,k).c_str(), Voltage2);
+	      break;
+      	    case FB_ResponseSecond: // Determine response from signal variation
+	      if(Buffer[i][j][k] == Average[i][j][k]) {
+		m->PrintMessage("HV Feedback: Warning, response singular for board %d, chip %d, channel %d.\n",i,j,k);
+		Response[i][j][k] = 0;
+	      }
+	      else Response[i][j][k] = Voltage2/(Buffer[i][j][k]-Average[i][j][k]);
+	      break;
+	    default: break;  // to suppress warning abount not handled enumeration value
+          }			
+        }
+    switch (FBMode) {
+      case FB_Active:
+      	m->PrintMessage("HV Feedback: Acted.\n");
+	break;
+      case FB_Targets:
+	m->PrintMessage("HV Feedback: New targets set, switching off.\n");
+	FBMode = FB_Off;
+	break;
+      case FB_ResponseFirst:
+        FBMode = FB_ResponseSecond;
+	m->PrintMessage("HV Feedback: Setting second voltage %f for response measurement, acquiring data.\n", Voltage2);
+	break;
+      case FB_ResponseSecond:
+	m->PrintMessage("HV Feedback: Response measurements finished, switching off.\n");
+	FBMode = FB_Off;
+	break;
+      default: break;  // to suppress warning abount not handled enumeration value
+    }			
+    ClearAverages();
+    return true;
+  }
+  else return false;   
+}
+
+// Clear average values and event counter
+void HVFeedback::ClearAverages() {
+  for (int i=m->FirstBoard; i<=m->LastBoard; i++)
+    for (int j=0; j<kNumberOfChips; j++)
+      for (int k=0; k<kNumberOfChannels; k++) Average[i][j][k] = 0;
+  Count = 0;
+}
+
+// Number of events to accumulate before correction acts
+void HVFeedback::SetNumAverages(unsigned int Averages) {
+  NumAverages = Averages;
+}
+
+// Get requested number of events
+unsigned int HVFeedback::GetNumAverages() {
+  return NumAverages;
+}
+
+// Set feedback gain
+void HVFeedback::SetGain(float FBGain) {
+  Gain = FBGain;
+}
+
+// Get feedback gain
+float HVFeedback::GetGain() {
+  return Gain;
+}
+
+// Set feedback mode and clear averages
+void HVFeedback::SetFBMode(FBState Mode) {
+  if(Mode==FB_ResponseFirst || Mode==FB_ResponseFirst)
+      m->PrintMessage("Start reponse measurement by calling MeasureResponse().\n");
+  else {
+    FBMode = Mode;
+    ClearAverages();
+  }
+}
+
+// Set feedback mode and clear averages
+FBState HVFeedback::GetFBMode() {
+  switch (FBMode) {
+    case FB_Off: m->PrintMessage("Feedback off.\n");   break;
+    case FB_Active: m->PrintMessage("Feedback active.\n");   break;
+    case FB_Targets: m->PrintMessage("Feedback acquiring new targets.\n");   break;
+    case FB_ResponseFirst: m->PrintMessage("Feedback measuring response with first voltage.\n");   break;
+    case FB_ResponseSecond: m->PrintMessage("Feedback measuring response with second voltage.\n");   break; 
+  }
+  return FBMode;			
+}
+
+// Return current number of events
+unsigned int HVFeedback::GetCurrentCount() {
+  return Count;
+}
+
+// Set target values
+void HVFeedback::SetTarget(int Board, int Chip, int Channel, float TargetVal) {
+  if(Board<m->NumCMCBoards && Chip<kNumberOfChips && Channel<kNumberOfChannels)
+    Target[Board][Chip][Channel] = TargetVal;
+  else printf("Invalid board, chip or channel number.\n");
+}
+
+// Print target values
+void HVFeedback::GetTargets() {
+  for (int i=m->FirstBoard; i<=m->LastBoard; i++)
+    for (int j=0; j<kNumberOfChips; j++)
+      for (int k=0; k<kNumberOfChannels; k++)
+         m->PrintMessage("Board %d, chip %d, channel %d: %.2f\n",i,j,k,Target[i][j][k]);
+}
+
+// Measure response matrix
+void HVFeedback::MeasureResponse(float U1, float U2) {
+
+  if (U2 == 0)
+    m->PrintMessage("HV Feedback: Error, econd voltage must not be zero.\n");
+  else {
+    for (int i=m->FirstBoard; i<=m->LastBoard; i++) 
+      for (int j=0; j<kNumberOfChips; j++) 
+        for (int k=0; k<kNumberOfChannels-2; k++) {
+	  if(PixMap->DRS_to_Pixel(i,j,k).empty()) m->PrintMessage("Could not find pixel ID of board %d, chip %d, channel %d\n",i,j,k);
+          else WriteHVCommand("hvdiff %s %f\n",PixMap->DRS_to_Pixel(i,j,k).c_str(), U1);
+        }
+    Voltage1 = U1;   Voltage2 = U2;
+    FBMode = FB_ResponseFirst;
+    ClearAverages();  
+    m->PrintMessage("HV Feedback: Setting first voltage  %f for response measurement, acquiring data.\n",U1);
+  }
+}
+
+// Print response values
+void HVFeedback::GetResponse() {
+  for (int i=m->FirstBoard; i<=m->LastBoard; i++)
+    for (int j=0; j<kNumberOfChips; j++)
+      for (int k=0; k<kNumberOfChannels; k++)
+         m->PrintMessage("Board %d, chip %d, channel %d: %f\n",i,j,k,Response[i][j][k]);
+}
+
+// Write commmand to socket
+bool HVFeedback::WriteHVCommand(char *Format, ...) {
+  char Textbuffer[MAX_COM_SIZE];
+  fd_set SelectDescriptor;
+  int RetryCount=0;
+  
+  do {
+    va_list ArgumentPointer;  va_start(ArgumentPointer, Format); 
+    vsprintf(Textbuffer, Format, ArgumentPointer);
+
+    printf("%s", Textbuffer);
+    // Write command to socket
+    if(write(SocketDescriptor, Textbuffer, strlen(Textbuffer)+1)!=(int) strlen(Textbuffer)+1) {
+      m->PrintMessage("Error: Could not write (entire) command to HV socket (%s)\n", strerror(errno));
+      return false;
+    }
+
+    // Wait for command acknowledge from hvcontrol program
+    FD_ZERO(&SelectDescriptor);   FD_SET(SocketDescriptor, &SelectDescriptor);
+    struct timeval WaitTime = {fMaxCmdAckDelay, 0};
+    if (select(((int) SocketDescriptor)+1, &SelectDescriptor, NULL, NULL, &WaitTime)==-1) {
+      m->PrintMessage("Error with select() in command acknowledge (%s)\n", strerror(errno));
+      return false;
+    }
+    if (!FD_ISSET(SocketDescriptor, &SelectDescriptor)) { // Time-out expired
+      m->PrintMessage("Time-out of %d seconds expired before receiving acknowledge from HV socket.\n", fMaxCmdAckDelay);
+      return false;
+    }
+    if (read(SocketDescriptor, Textbuffer, MAX_COM_SIZE) == -1) {
+      m->PrintMessage("Error reading acknowledge from HV socket (%s)\n", strerror(errno));
+      return false;
+    }
+  } while (strstr(Textbuffer,"WC ok")==NULL && ++RetryCount<=MAX_RETRY);
+  if(RetryCount==MAX_RETRY) {
+    m->PrintMessage("Could not set high voltage after %d tries.\n", MAX_RETRY);
+    return false;
+  }
+  return true;
+}
+
+// Print feedback configuration
+void HVFeedback::PrintConfig() {
+  m->PrintMessage("LedTrigBoard: %d\t\tLedTrigChip: %d\t\tLedTrigChannel: %d\n"
+        "LedTrigSample: %d\tLedTrigThreshold: %.2f\n"
+        "LedSignalSample: %d\tLedBaselineSample: %d\tDefaultNumAverage: %d\n"
+        "HVControlServer: %s\tHVControlPort: %d\n"
+	"MaxCmdAckDelay: %d\n",
+    fLedTrigBoard, fLedTrigChip, fLedTrigChannel, fLedTrigSample,
+    fLedTrigThreshold, fLedSignalSample, fLedBaselineSample,
+    fDefaultNumAverage, fHVControlServer, fHVControlPort, fMaxCmdAckDelay);
+}
Index: /drsdaq/HVFeedback.h
===================================================================
--- /drsdaq/HVFeedback.h	(revision 22)
+++ /drsdaq/HVFeedback.h	(revision 22)
@@ -0,0 +1,65 @@
+#ifndef HVFEEDBACK_H_SEEN
+#define HVFEEDBACK_H_SEEN
+
+#define BUF_LENGTH 1000
+
+#include <stdlib.h>
+
+#include "RawDataCTX.h"
+#include "DAQReadout.h"
+
+enum FBState {FB_Off, FB_Active, FB_Targets, FB_ResponseFirst, FB_ResponseSecond};
+
+class HVFeedback {
+
+    class DAQReadout *m;
+    class PixelMap *PixMap;    
+    FBState FBMode;
+    
+    float (*Average)[kNumberOfChips][kNumberOfChannels];
+    float (*Response)[kNumberOfChips][kNumberOfChannels];
+    float (*Target)[kNumberOfChips][kNumberOfChannels];
+    float (*Buffer)[kNumberOfChips][kNumberOfChannels];
+    
+    unsigned int NumAverages;	// Events to take before feedback acts
+    unsigned int Count;		// Number of currently integrated events
+    
+    float Gain;     	    	// Feedback gain
+    float Voltage1, Voltage2;	// for response measurement	
+    int SocketDescriptor;
+    char TextBuf[BUF_LENGTH];
+	
+    int fLedTrigBoard;
+    int fLedTrigChip;
+    int fLedTrigChannel;
+    int fLedTrigSample;
+    float fLedTrigThreshold;
+    int fLedSignalSample;
+    int fLedBaselineSample;
+    int fDefaultNumAverage;
+    char fHVControlServer[BUF_LENGTH];
+    int fHVControlPort;
+    int fMaxCmdAckDelay;
+   	    	  
+  public:
+    HVFeedback(class DAQReadout*, char*);
+    ~HVFeedback();
+
+    bool ProcessEvent();
+    void SetTarget(int, int, int, float);
+    void GetTargets();
+    void SetGain(float);
+    float GetGain();
+    void SetNumAverages(unsigned int);
+    unsigned int GetNumAverages();
+    void SetFBMode(FBState);
+    FBState GetFBMode();
+    unsigned int GetCurrentCount();
+    void MeasureResponse(float, float);
+    void GetResponse();
+    void ClearAverages();
+    bool WriteHVCommand(char *, ...);
+    void PrintConfig();
+};
+
+#endif
Index: /drsdaq/History.txt
===================================================================
--- /drsdaq/History.txt	(revision 22)
+++ /drsdaq/History.txt	(revision 22)
@@ -0,0 +1,10 @@
+Modification history of drsdaq program
+--------------------------------------
+
+23/3/2009   Changed 'Events' entry in run header. It now gives the number of
+    	    events in the current file.
+24/3/2009   Copied into FACT subversion directory. Updated location of
+    	    configuration file and PixelMap.txt (in config/ in repository).
+	    Improved PrintMessage() and error outputs.
+26/3/2009   Added PixelMap translation to communication with HV control.
+30/3/2009   Added feedback gain. Checked into repository.
Index: /drsdaq/Makefile
===================================================================
--- /drsdaq/Makefile	(revision 22)
+++ /drsdaq/Makefile	(revision 22)
@@ -0,0 +1,53 @@
+#
+#  Makefile for the DRS DAQ 
+#
+# Compiled and streamlined from original makefiles - O. Grimm, Nov 2008
+# Use the VMECTRL flag to switch between different VME controllers: -DCT_VME
+# for Concurrent Technologies, -DSTRUCK_VME for Struck
+
+VMECTRL = -DCT_VME
+
+#CC  	= g++   	# Compiler to use
+
+SOURCES = HVFeedback.cc DAQReadout.cc RawDataCTX.cc ../pixelmap/Pixel.cc ../pixelmap/PixelMap.cc DRS/DRS.cc DRS/mxml.c DRS/strlcpy.c drsdaq.cpp
+OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
+
+SOBJECTS = RawDataCTX
+INCDIRS   = -I. -IDRS -I../pixelmap
+
+ifeq ($(VMECTRL),-DCT_VME)
+ VMELIB = -L./VME/atlas/lib -lvme_rcc -lcmem_rcc -lrcc_time_stamp
+ INCDIRS := $(INCDIRS) -I./VME/atlas/include/
+else
+ VMELIB = -L./VME/struck
+ INCDIRS := $(INCDIRS) -I./VME/struck/
+ OBJECTS := $(OBJECTS) ./VME/struck/sis3100.o ./VME/struck/sis3100_vme_calls.o
+endif
+
+CFLAGS = -pipe -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX
+CPPFLAGS = -pipe -fPIC -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX $(VMECTRL)
+LIBS = -lstdc++ -lz -lpthread -lutil -lfl $(VMELIB)
+
+drsdaq: $(OBJECTS)
+	$(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS)
+	$(CC) -shared -Wl,-soname,$(SOBJECTS).so -o $(SOBJECTS).so $(SOBJECTS).o -lc
+
+clean:
+	@rm -f $(OBJECTS) $(SOBJECTS).so
+	@rm -f *.d
+	@rm -f *~
+
+-include Dep.d
+	
+# Implicit rules
+
+%.o : %.c
+	$(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
+%.o : %.cc
+	$(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
+%.o : %.cpp
+	$(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $< 
+%.d : 
+	@echo "Generating dependencies" $@
+	@$(CC) -MM $(SOURCES) $(INCDIRS) \
+	| sed 's/^\(.*\).o:/$@ \1.o:/' > $@
Index: /drsdaq/RawDataCTX.cc
===================================================================
--- /drsdaq/RawDataCTX.cc	(revision 22)
+++ /drsdaq/RawDataCTX.cc	(revision 22)
@@ -0,0 +1,178 @@
+/********************************************************************\
+
+  RawDataCTX.cc
+
+  Class for raw data handling of the DRS 2-based DAQ
+
+  Oliver Grimm
+  
+\********************************************************************/
+
+#include "RawDataCTX.h"
+
+// *** Constructor
+RawDataCTX::RawDataCTX(bool BeSilent) {
+  RHeader = new RunHeader; 
+  EHeader = new EventHeader;
+  FileOpen = false;
+  Silent = BeSilent;
+}
+
+// *** Destructor
+RawDataCTX::~RawDataCTX() {
+  if(FileOpen) CloseDataFile();
+
+  delete RHeader;
+  delete EHeader;
+}
+
+// *** Open raw data file
+CTX_ErrCode RawDataCTX::OpenDataFile(char *Filename, FILE *fptr) {
+    
+  if(FileOpen) CloseDataFile();
+  // Open file
+  if ((Rawfile = fopen(Filename, "r")) == NULL) {
+    if(!Silent) printf("Error: Could not open file: %s\n", Filename);
+    return CTX_FOPEN;
+  }
+  // Read run header
+  if (fread(RHeader, sizeof(RunHeader), 1, Rawfile) != 1) {
+    if(!Silent) printf("Error: Could not read run header\n");
+    fclose(Rawfile);
+    return CTX_RHEADER;  
+  }
+  // Read board structures
+  BStruct = new BoardStructure [RHeader->NCMCBoards];
+  if(fread(BStruct, sizeof(BoardStructure), RHeader->NCMCBoards, Rawfile) != RHeader->NCMCBoards) {
+    if(!Silent) printf("Error: Could not read (all) board structures\n");
+    fclose(Rawfile);
+    delete[] BStruct;
+    return CTX_BSTRUCT;
+  }
+  // Allocate memory for event data
+  Data = new short[RHeader->NCMCBoards*RHeader->NChips*RHeader->NChannels*RHeader->Samples];
+  FileOpen = true;
+  
+  // If requested, print run header (including board structures) to file 
+  if(fptr != NULL) {
+    int RAhour, RAmin, RAsec, DEChour, DECmin, DECsec;
+
+    fprintf(fptr, "Magic number      %x\n", RHeader->MagicNum);
+    fprintf(fptr, "Data format:      %d\n", RHeader->DataFormat);
+    fprintf(fptr, "DAQ compilation:  %s\n", RHeader->DAQVersion);         
+    fprintf(fptr, "Source:           %s\n", RHeader->Source);
+    fprintf(fptr, "Run type:         %c\n", RHeader->Type);
+    fprintf(fptr, "Run number:       %u\n", RHeader->RunNumber);
+    fprintf(fptr, "Events:           %u\n", RHeader->Events);
+    fprintf(fptr, "CMC Boards:       %u\n", RHeader->NCMCBoards);
+    fprintf(fptr, "DRS chips:        %u\n", RHeader->NChips);
+    fprintf(fptr, "Channels/chip:    %u\n", RHeader->NChannels);
+    fprintf(fptr, "Samples:          %u\n", RHeader->Samples);
+    fprintf(fptr, "Offset:           %d\n", RHeader->Offset);
+
+    RAsec   = (int) (RHeader->SourceRA)%60;
+    RAmin   = (int) (RHeader->SourceRA/60)%60;
+    RAhour  = (int) (RHeader->SourceRA/3600);
+    DECsec  = (int) (RHeader->SourceDEC)%60;
+    DECmin  = (int) (RHeader->SourceDEC/60)%60;
+    DEChour = (int) (RHeader->SourceDEC/3600);
+
+    fprintf(fptr, "Source RA:        %f (%d %d %d)\n", RHeader->SourceRA, RAhour, RAmin, RAsec);
+    fprintf(fptr, "Source DEC:       %f (%d %d %d)\n", RHeader->SourceDEC, DEChour, DECmin, DECsec);
+
+    RAsec   = (int) (RHeader->TelescopeRA)%60;
+    RAmin   = (int) (RHeader->TelescopeRA/60)%60;
+    RAhour  = (int) (RHeader->TelescopeRA/3600);
+    DECsec  = (int) (RHeader->TelescopeDEC)%60;
+    DECmin  = (int) (RHeader->TelescopeDEC/60)%60;
+    DEChour = (int) (RHeader->TelescopeDEC/3600);
+
+    fprintf(fptr, "Telescope RA:     %f (%d %d %d)\n", RHeader->TelescopeRA, RAhour, RAmin, RAsec);
+    fprintf(fptr, "Telescope DEC:    %f (%d %d %d)\n", RHeader->TelescopeDEC, DEChour, DECmin, DECsec);
+
+    fprintf(fptr, "Start year:       %u\n", RHeader->StartYear);
+    fprintf(fptr, "Start month:      %u\n", RHeader->StartMonth);
+    fprintf(fptr, "Start day:        %u\n", RHeader->StartDay);
+    fprintf(fptr, "Start hour:       %u\n", RHeader->StartHour);
+    fprintf(fptr, "Start minute:     %u\n", RHeader->StartMinute);
+    fprintf(fptr, "Start second:     %u\n", RHeader->StartSecond);
+    fprintf(fptr, "End year:         %u\n", RHeader->EndYear);
+    fprintf(fptr, "End month:        %u\n", RHeader->EndMonth);
+    fprintf(fptr, "End day:          %u\n", RHeader->EndDay);
+    fprintf(fptr, "End hour:         %u\n", RHeader->EndHour);
+    fprintf(fptr, "End minute:       %u\n", RHeader->EndMinute);
+    fprintf(fptr, "End second:       %u\n", RHeader->EndSecond);
+
+    for (unsigned int i=0; i<RHeader->NCMCBoards; i++) {
+      fprintf(fptr, "*** Board %d ***\n", i);
+      fprintf(fptr, "Serial number:            %d\n", BStruct[i].SerialNo);
+      fprintf(fptr, "Sampling frequency [GHz]: %.3f\n", BStruct[i].NomFreq);
+      fprintf(fptr, "Temperature [C]:          %.3f\n", BStruct[i].BoardTemp);  
+      fprintf(fptr, "Scale factor:             %.3f\n", BStruct[i].ScaleFactor);
+    }     
+  }
+  return CTX_OK;
+}
+
+// *** Close raw data file
+CTX_ErrCode RawDataCTX::CloseDataFile() {
+
+  if(!FileOpen) return CTX_NOTOPEN;
+
+  if (fclose(Rawfile) == EOF) {
+    if(!Silent) perror("Could not close file");
+    return CTX_FCLOSE;
+  }
+  
+  delete[] BStruct;
+  delete[] Data;
+  
+  FileOpen = false;
+  return CTX_OK;
+}
+
+// *** Read next event from file
+CTX_ErrCode RawDataCTX::ReadEvent(int EventNo, FILE *fptr) {
+    
+  if(!FileOpen) {
+    if(!Silent) printf("Error: No data file open.\n");
+    return CTX_NOTOPEN;
+  }
+  
+  // Move file pointer to desired event header (if zero read next event)
+  if(EventNo!=0 && fseek(Rawfile, sizeof(RunHeader)+sizeof(BoardStructure)*RHeader->NCMCBoards+(EventNo-1)*(sizeof(EventHeader)+RHeader->NCMCBoards*RHeader->NChips*
+      RHeader->NChannels*RHeader->Samples*sizeof(short)), SEEK_SET)!=0) {
+    if(!Silent) printf("Error: Could not move to requested event\n");
+    return CTX_SEEK;
+  }
+
+  // Read event header
+  if (fread(EHeader, sizeof(EventHeader), 1, Rawfile) != 1) {
+    if(feof(Rawfile)==0) {
+      if(!Silent) printf("Error: Could not read event header\n");
+      return CTX_EHEADER;
+    }
+    else return CTX_EOF;  
+  }
+  if(fread(Data, sizeof(short), RHeader->NCMCBoards*RHeader->NChips*RHeader->NChannels*RHeader->Samples, Rawfile)
+	  != RHeader->NCMCBoards*RHeader->NChips*RHeader->NChannels*RHeader->Samples) {
+    if(!Silent) printf("Error: Could not read (all) data\n");
+    return CTX_DATA;    
+  }
+
+  // If requested, print event header to file 
+  if(fptr != NULL) {
+    fprintf(fptr, "Name:            %s\n",    EHeader->Name);
+    fprintf(fptr, "Event number:    %u\n",    EHeader->EventNumber);
+    fprintf(fptr, "Time [s]:        %f\n",    EHeader->TimeSec);
+    fprintf(fptr, "Trigger type:    0X%0X\n", EHeader->TriggerType);
+  }
+  
+  return CTX_OK;
+}
+
+// *** Check if file currently open
+bool RawDataCTX::IsFileOpen() {
+  return FileOpen;
+}
+
Index: /drsdaq/RawDataCTX.h
===================================================================
--- /drsdaq/RawDataCTX.h	(revision 22)
+++ /drsdaq/RawDataCTX.h	(revision 22)
@@ -0,0 +1,114 @@
+/* Data organisation on disk:
+
+                      Board 1      Board 2      ...     Board 1      Board 2      ...
+   RH  BS1 BS2 ... EH C1 C2 C3 ... C1 C2 C3 ... ...  EH C1 C2 C3 ... C1 C2 C3 ... ...
+                   --------------------------------  --------------------------------
+                   Event 1                           Event 2
+
+  RH Run header   BSx Board structures   EV Event header   Cx Channel (0-19 for 2 chips)
+  Channel data are written as shorts, lenght of channel data is in the run header
+
+  Structures are defined using #pragma pack (1) to not include any padding. Note that
+  using the gcc attribute __attribute__((__packed__)) is incompatible with root.
+*/
+
+#ifndef RAWDATACTX_H_SEEN
+#define RAWDATACTX_H_SEEN
+
+#include <stdio.h>
+
+#define DATA_FORMAT 1
+
+#define I8      char
+#define U8      unsigned char
+#define I16     short
+#define U16     unsigned short
+#define I32     int
+#define U32     unsigned int
+#define F32     float
+
+#define MAGICNUM_FILE_OPEN 0xe0e1    // Magic number for run header while file open
+#define MAGICNUM_FILE_CLOSED 0xe0e0  //    ... and when file is closed
+
+// Error codes
+enum CTX_ErrCode {CTX_OK, CTX_FOPEN, CTX_FCLOSE, CTX_NOTOPEN, CTX_RHEADER,
+    	    	  CTX_BSTRUCT, CTX_EHEADER, CTX_DATA, CTX_SEEK, CTX_EOF};
+
+#pragma pack (1)  // Switch padding off
+
+// Run header
+typedef struct {
+  U16 MagicNum;
+  U16 DataFormat;       // Increasing whenever header format changes
+  I8  DAQVersion[12]; 	// contains result of __DATE__ macro
+  I8  Source[16];
+  I8  Type;          // run type (char): pedestal, data, ...
+  U32 RunNumber;
+  
+  U16 StartYear;
+  U8  StartMonth;
+  U8  StartDay;
+  U8  StartHour;
+  U8  StartMinute;
+  U8  StartSecond;
+  
+  U16 EndYear;
+  U8  EndMonth;
+  U8  EndDay;
+  U8  EndHour;
+  U8  EndMinute;
+  U8  EndSecond;
+
+  F32 SourceRA;
+  F32 SourceDEC;
+  F32 TelescopeRA;
+  F32 TelescopeDEC;
+  
+  U32 Events;                     // Number of events in the run 
+  U32 NCMCBoards;                 // Number of used boards
+  U32 NChips;			  // Number of DRS chips per board
+  U32 NChannels;		  // Number of channels per chip
+  U32 Samples;                    // Number of samples
+  I32 Offset;                     // Offset from first sample
+} RunHeader;
+
+// Board structure
+typedef struct {
+  I32 Index; 	   // Index number (data written in this order)
+  I32 SerialNo;    // Board serial number
+  F32 NomFreq;     // Nominal sampling frequency [GHz]
+  F32 BoardTemp;   // Board temperature [deg C]
+  F32 ScaleFactor; // Factor for conversion to mV 
+} BoardStructure;
+
+// Event header
+typedef struct {
+  I8  Name[5];          // "EVTH", NULL-terminated
+  U32 EventNumber;
+  F32 TimeSec;          // event time stamp in seconds, ms precision
+  U16 TriggerType;
+} EventHeader;
+
+#pragma pack ()     // Set default padding
+
+// Class definition
+class RawDataCTX {
+    FILE *Rawfile;
+    bool FileOpen;
+    bool Silent;
+    
+  public:
+    RunHeader   *RHeader; 
+    EventHeader *EHeader;
+    BoardStructure *BStruct;
+    short *Data; 
+
+    RawDataCTX(bool = false);
+    ~RawDataCTX();
+    
+    CTX_ErrCode OpenDataFile(char*, FILE* = NULL);
+    CTX_ErrCode CloseDataFile();
+    CTX_ErrCode ReadEvent(int = 0, FILE* = NULL);
+    bool IsFileOpen();
+};
+#endif
Index: /drsdaq/VME/atlas/include/DFDebug/DFDebug.h
===================================================================
--- /drsdaq/VME/atlas/include/DFDebug/DFDebug.h	(revision 22)
+++ /drsdaq/VME/atlas/include/DFDebug/DFDebug.h	(revision 22)
@@ -0,0 +1,97 @@
+/********************************************************/
+/* file: DFDebug.h (originally ROSDebug.h)		*/
+/* description: Nice macros for debugging purposesq	*/
+/* maintainer: Markus Joos, CERN/PH-ESS			*/
+/********************************************************/
+
+#include <iostream>
+#include <sys/types.h>
+#include <unistd.h>
+#include <pthread.h>
+#include "DFDebug/GlobalDebugSettings.h"
+
+#ifndef DFDEBUG_H
+#define DFDEBUG_H
+
+  #if (DEBUG_LEVEL>0)
+  #define DEBUG_TEXT(my_package, level, text)\
+    {\
+      int oldState;\
+      pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState);\
+      DF::GlobalDebugSettings::lock();\
+      pthread_t my_tid;\
+      my_tid = pthread_self();\
+      if ((my_package == DF::GlobalDebugSettings::packageId()) || (DF::GlobalDebugSettings::packageId() == 0))\
+        if (DF::GlobalDebugSettings::traceLevel() >= level)\
+          std::cout << std::dec << "Debug(" << my_package << "," << my_tid << "): " << text << std::endl;\
+      DF::GlobalDebugSettings::unlock();\
+      pthread_setcancelstate(oldState, 0);\
+    }
+  #else
+    #define DEBUG_TEXT(my_package, level, text)
+  #endif
+
+  #define OUT_TEXT(my_package, text)\
+    {\
+      int oldState;\
+      pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState);\
+      std::cout << "Printout(" << my_package << "): " << text << std::endl;\
+      pthread_setcancelstate(oldState, 0);\
+    }
+
+  #define ERR_TEXT(my_package, text)\
+    {\
+      int oldState;\
+      pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState);\
+      std::cerr << "Error(" << my_package << "): " << text << std::endl;\
+      pthread_setcancelstate(oldState, 0);\
+    }
+
+  #define HEX(n) std::hex << n << std::dec 
+
+  // Definition of some package identifiers
+  // Naming convention:
+  // DFDB_<A>_<B> with:
+  // A = (abbreviated) package name without underscores
+  // B = Suidentifier within package
+  //
+  // NOTE:
+  // IF YOU ARE ADDING A NEW PACKAGE HERE DO NOT FORGET TO ALSO ADD
+  // IT TO THE DFDEBUG_MENU TEST PROGRAM IN ../SRC/TEST
+  //
+  
+  enum
+  {
+    DFDB_ROSFM = 1,          //ROSFragmentManagement
+    DFDB_ROSEF,              //ROSEventFragment
+    DFDB_ROSSWROBIN,         //ROSSWRobin
+    DFDB_ROSFILAR,           //ROSfilar
+    DFDB_ROSMEMPOOL, 	     //ROSMemoryPool
+    DFDB_ROSEIM,             //ROSEventInputManager
+    DFDB_ROSIO,              //ROSIO
+    DFDB_ROSTG,              //Trigger generator in ROSIO
+    DFDB_SLINK,              //ROSslink
+    DFDB_ROSSOLAR,           //ROSsolar
+    DFDB_ROSQUEST,           //ROSsolar (QUEST)
+    DFDB_QUEUE,              //Queue debugging (ROSSWRobin, ROSIO, ROSCore)
+    DFDB_ROSCORE,            //ROSCore
+    DFDB_ROSROBIN,           //ROSRobin
+    DFDB_DFDB,               //DFDebug
+    DFDB_CMEMRCC = 100,      //cmem_rcc
+    DFDB_IORCC,              //io_rcc
+    DFDB_VMERCC,             //vme_rcc
+    DFDB_RCCTS,              //rcc_time_stamp
+    DFDB_RCDEXAMPLE = 300,   //RCDExample
+    DFDB_RCDBITSTRING,       //RCDBitString
+    DFDB_RCDMENU,            //RCDMenu
+    DFDB_RCDMODULE,          //RCDModule
+    DFDB_RCDTTC,             //RCDTtc
+    DFDB_RCDVME,             //RCDVme
+    DFDB_RCDLTP,             //RCDLTPModule and RCDLTPConfiguration
+    DFDB_RCDRODBUSY,         //rcc_rodbusy and RODBusyModule
+    DFDB_RCDTTCVIMODULE,     //RCDTtcviModule
+    DFDB_RF2TTC,             //RF2TTC and RFRX modules
+    DFDB_TTCVI = 400         //Ttcvi
+  };
+
+#endif //DFDEBUG_H
Index: /drsdaq/VME/atlas/include/DFDebug/GlobalDebugSettings.h
===================================================================
--- /drsdaq/VME/atlas/include/DFDebug/GlobalDebugSettings.h	(revision 22)
+++ /drsdaq/VME/atlas/include/DFDebug/GlobalDebugSettings.h	(revision 22)
@@ -0,0 +1,66 @@
+// -*- c++ -*-
+/************************************************/
+/* file: GlobalDebugSettings.h			*/
+/* description: Class GlobalDebugSettings	*/
+/* maintainer: Markus Joos, CERN/PH-ESS		*/
+/************************************************/
+
+#ifndef DFGLOBALDEBUGSETTINGS_H
+#define DFGLOBALDEBUGSETTINGS_H
+
+#include <pthread.h>
+
+namespace DF 
+{
+  class GlobalDebugSettings 
+  {
+    public:
+      static unsigned int traceLevel();
+      static unsigned int packageId();
+      static void lock();
+      static void unlock();
+      static void setup(unsigned int traceLevel,unsigned int packageId = 0); 
+    private:
+      static unsigned int s_traceLevel;
+      static unsigned int s_packageId;
+      static int s_mutexLocked;
+      static pthread_mutex_t debug_mutex;
+      static pthread_t s_mutexOwner;
+  };
+  
+  inline unsigned int GlobalDebugSettings::traceLevel() 
+  {
+    return(s_traceLevel);
+  }
+
+  inline unsigned int GlobalDebugSettings::packageId() 
+  {
+    return(s_packageId);
+  }
+
+  inline void GlobalDebugSettings::lock() 
+  {
+    if ((s_mutexLocked == 0) || (pthread_equal(s_mutexOwner, pthread_self()) == 0)) 
+    {
+       pthread_mutex_lock(&debug_mutex);
+       s_mutexOwner = pthread_self();
+    }
+    s_mutexLocked++;
+  }      
+  
+  inline void GlobalDebugSettings::unlock() 
+  {
+    s_mutexLocked--;
+    if (s_mutexLocked == 0) 
+      pthread_mutex_unlock(&debug_mutex);
+  }
+  
+  inline void GlobalDebugSettings::setup(unsigned int traceLevel, unsigned int packageId) 
+  {
+    s_traceLevel = traceLevel;
+    s_packageId = packageId;
+  }
+
+} // end of namespace DF
+#endif //DFGLOBALDEBUGSETTINGS_H
+
Index: /drsdaq/VME/atlas/include/ROSGetInput/get_input.h
===================================================================
--- /drsdaq/VME/atlas/include/ROSGetInput/get_input.h	(revision 22)
+++ /drsdaq/VME/atlas/include/ROSGetInput/get_input.h	(revision 22)
@@ -0,0 +1,34 @@
+/********************************************************/
+/*  file : get_input.h					*/
+/*							*/
+/*  prototypes for get_input functions			*/
+/*							*/
+/*  Maintained by: Markus Joos, CERN PH/ESS		*/
+/********************************************************/
+
+#ifndef _GET_INPUT_H
+#define _GET_INPUT_H
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+
+  long getdec(void);
+  long getdecd(long defa);
+  unsigned long gethex(void);
+  unsigned long gethexd(unsigned long defa);
+  char getfstchar(void);
+  void getstrd(char* a, char* defa);
+  float getfloatd(float defa);
+
+  int ReadCard_int (char* filename, char* tag, int nr, int* i);
+  int ReadCard_uint(char* filename, char* tag, int nr, unsigned int* u);
+  int ReadCard_str (char* filename, char* tag, int nr, char* c);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
Index: /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc.h
===================================================================
--- /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc.h	(revision 22)
+++ /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc.h	(revision 22)
@@ -0,0 +1,61 @@
+/************************************************************************/
+/*									*/
+/*  This is the common header file for the CMEM_RCC 			*/
+/*  library & applications						*/
+/*									*/
+/*  12. Dec. 01  MAJO  created						*/
+/*									*/
+/*******C 2001 - The software with that certain something****************/
+
+#ifndef _CMEM_RCC_H
+#define _CMEM_RCC_H
+
+#include <sys/types.h>
+#include "cmem_rcc_common.h"
+
+//Error strings
+#define CMEM_RCC_SUCCESS_STR      "No error"
+#define CMEM_RCC_ERROR_FAIL_STR   "Failed to install the error library"
+#define CMEM_RCC_FILE_STR         "Failed to open /dev/cmem_rcc"
+#define CMEM_RCC_NOTOPEN_STR      "Library has not yet been opened"
+#define CMEM_RCC_IOCTL_STR        "Error from call to ioctl function"
+#define CMEM_RCC_MMAP_STR         "Error from call to mmap function"
+#define CMEM_RCC_MUNMAP_STR       "Error from call to munmap function"
+#define CMEM_RCC_NO_CODE_STR      "Unknown error"
+#define CMEM_RCC_OVERFLOW_STR     "All descriptors are in use"
+#define CMEM_RCC_TOOBIG_STR       "Size is too big"
+#define CMEM_RCC_ILLHAND_STR      "Invalid handle"
+#define CMEM_RCC_GETP_STR         "Error from call to CMEM_SegmentGet"
+#define CMEM_RCC_NOSIZE_STR       "The <size> paremeter is zero"
+#define CMEM_RCC_CFU_STR          "Error from the driver in call to copy_from_user"
+#define CMEM_RCC_GFP_STR          "Error from the driver in call to __get_free_pages"
+#define CMEM_RCC_BPA_STR          "Error from the driver in call to BPA function"
+#define CMEM_RCC_CTU_STR          "Error from the driver in call to copy_To_user"
+#define CMEM_RCC_KMALLOC_STR      "Error from the driver in call to kmalloc"
+/************/
+/*Prototypes*/
+/************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+CMEM_Error_code_t CMEM_Open(void);
+CMEM_Error_code_t CMEM_Close(void);
+CMEM_Error_code_t CMEM_SegmentAllocate(u_int size, char *name, int *segment_identifier);
+CMEM_Error_code_t CMEM_SegmentFree(int segment_identifier);
+CMEM_Error_code_t CMEM_SegmentSize(int segment_identifier, u_int *actual_size);
+CMEM_Error_code_t CMEM_SegmentLock(int segment_identifier);
+CMEM_Error_code_t CMEM_SegmentUnlock(int segment_identifier);
+CMEM_Error_code_t CMEM_SegmentPhysicalAddress(int segment_identifier, u_long *physical_address);
+CMEM_Error_code_t CMEM_SegmentVirtualAddress(int segment_identifier, u_long *virtual_address);
+CMEM_Error_code_t CMEM_Dump(void);
+CMEM_Error_code_t CMEM_err_get(err_pack err, err_str pid, err_str code);
+CMEM_Error_code_t CMEM_BPASegmentAllocate(u_int size, char *name, int *segment_identifier);
+CMEM_Error_code_t CMEM_BPASegmentFree(int segment_identifier);
+CMEM_Error_code_t CMEM_SegmentGet(int segment_identifier, cmem_rcc_t *params);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_common.h
===================================================================
--- /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_common.h	(revision 22)
+++ /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_common.h	(revision 22)
@@ -0,0 +1,63 @@
+/************************************************************************/
+/*									*/
+/*  This is the common header file for the CMEM_RCC 			*/
+/*  driver, library & applications					*/
+/*									*/
+/*  12. Dec. 01  MAJO  created						*/
+/*									*/
+/*******C 2005 - The software with that certain something****************/
+
+#ifndef _CMEM_RCC_COMMON_H
+#define _CMEM_RCC_COMMON_H
+
+#define CMEM_MAX_NAME    40
+#define TYPE_GFP         1
+#define TYPE_BPA         2
+
+#ifdef __KERNEL__
+  #include <linux/types.h>
+  #define P_ID_CMEM_RCC 7   // Needs to be re-defined here since we do not want to include rcc_error.h at this level
+#else
+  #include "rcc_error/rcc_error.h"
+  #include <sys/types.h>
+#endif
+
+// Error codes
+enum
+{
+  CMEM_RCC_SUCCESS = 0,
+  CMEM_RCC_ERROR_FAIL = (P_ID_CMEM_RCC << 8) + 1,
+  CMEM_RCC_FILE,
+  CMEM_RCC_NOTOPEN,
+  CMEM_RCC_IOCTL,
+  CMEM_RCC_MMAP,
+  CMEM_RCC_MUNMAP,
+  CMEM_RCC_OVERFLOW,
+  CMEM_RCC_TOOBIG,
+  CMEM_RCC_ILLHAND,
+  CMEM_RCC_NOSIZE,
+  CMEM_RCC_GETP,
+  CMEM_RCC_CFU,
+  CMEM_RCC_GFP,
+  CMEM_RCC_BPA,
+  CMEM_RCC_CTU,
+  CMEM_RCC_KMALLOC,
+  CMEM_RCC_NO_CODE
+};
+
+typedef struct
+{
+  u_long paddr;
+  u_long uaddr;
+  u_long kaddr;
+  u_int size;
+  u_int order;
+  u_int locked;
+  u_int type;
+  u_int handle;
+  char name[CMEM_MAX_NAME];
+} cmem_rcc_t;
+
+typedef u_int CMEM_Error_code_t;
+
+#endif
Index: /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_drv.h
===================================================================
--- /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_drv.h	(revision 22)
+++ /drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_drv.h	(revision 22)
@@ -0,0 +1,87 @@
+/************************************************************************/
+/*									*/
+/*  This is the common header file for the CMEM_RCC driver & library	*/
+/*									*/
+/*  12. Dec. 01  MAJO  created						*/
+/*									*/
+/*******C 2005 - The software with that certain something****************/
+
+#ifndef _CMEM_RCC_IOCTL_H
+#define _CMEM_RCC_IOCTL_H
+
+#include "cmem_rcc_common.h"
+
+// Constants
+#define MAX_BUFFS          1000    // Max. number of buffers for all processes
+#define TEXT_SIZE          3000    // For ioctl(CMEM_RCC_DUMP)
+#define MAX_PROC_TEXT_SIZE 0x10000 //The output of "more /proc/cmem_rcc" must not generate more characters than that
+
+/********/
+/*Macros*/
+/********/
+#ifdef DRIVER_DEBUG
+  #define kdebug(x) {if (debug) printk x;}
+#else
+  #define kdebug(x)
+#endif
+
+#ifdef DRIVER_ERROR
+  #define kerror(x) {if (errorlog) printk x;}
+#else
+  #define kerror(x)
+#endif
+
+
+// Types
+typedef struct
+{
+  u_long paddr;
+  u_long kaddr;
+  u_long uaddr;
+  u_int size;
+  u_int locked;
+  u_int order;
+  u_int type;
+  u_int used;
+  int pid;
+  char name[40];
+} buffer_t;
+
+typedef struct
+{
+  u_int buffer[MAX_BUFFS];
+} private_stuff;  
+
+struct cmem_proc_data_t
+{
+  char name[10];
+  char value[100];
+};
+
+  
+/*************/
+/*ioctl codes*/
+/*************/
+enum
+{
+  CMEM_RCC_GET = 1,
+  CMEM_RCC_FREE,
+  CMEM_RCC_LOCK,
+  CMEM_RCC_UNLOCK,
+  CMEM_RCC_GETPARAMS,
+  CMEM_RCC_SETUADDR,
+  CMEM_RCC_DUMP
+};
+
+/******************************/
+/*Standard function prototypes*/
+/******************************/
+static int cmem_rcc_open(struct inode *inode, struct file *file);
+static int cmem_rcc_release(struct inode *inode, struct file *file);
+static int cmem_rcc_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg);
+static int cmem_rcc_mmap(struct file *file, struct vm_area_struct *vma);
+static int cmem_rcc_proc_write(struct file *file, const char *buffer, u_long count, void *data);
+static int cmem_rcc_proc_read(char *buf, char **start, off_t offset, int count, int *eof, void *data);
+
+#endif
+
Index: /drsdaq/VME/atlas/include/io_rcc/io_rcc.h
===================================================================
--- /drsdaq/VME/atlas/include/io_rcc/io_rcc.h	(revision 22)
+++ /drsdaq/VME/atlas/include/io_rcc/io_rcc.h	(revision 22)
@@ -0,0 +1,74 @@
+/************************************************************************/
+/*									*/
+/*  This is the application  header file for the IO_RCC 		*/
+/*  library & applications						*/
+/*									*/
+/*   6. Jun. 02  MAJO  created						*/
+/*									*/
+/*******C 2002 - The software with that certain something****************/
+
+#ifndef _IO_RCC_H
+#define _IO_RCC_H
+
+#include "io_rcc_common.h"
+
+//Definitions used in IO_GetHostInfo
+//Board type definitions are in io_rcc_common.h
+
+//Board manufacturers
+#define CCT 1
+
+//Operating system type
+#define LINUX 1
+
+//Operating system version
+#define K249 1
+
+//Error strings
+#define IO_RCC_SUCCESS_STR       "No error"
+#define IO_RCC_ERROR_FAIL_STR    "Failed to install the error library"
+#define IO_RCC_FILE_STR          "Failed to open /dev/io_rcc"
+#define IO_RCC_NOTOPEN_STR       "Library has not yet been opened"
+#define IO_RCC_MMAP_STR          "Error from call to mmap function"
+#define IO_RCC_MUNMAP_STR        "Error from call to munmap function"
+#define IO_RCC_ILLMANUF_STR      "Unable to determine board manufacturer"
+#define IO_RCC_IOFAIL_STR        "Error from IO_IOPeek or IO_IOPoke"
+#define IO_RCC_NO_CODE_STR       "Unknown error"
+#define IO_PCI_TABLEFULL_STR     "Internal device table is full"
+#define IO_PCI_NOT_FOUND_STR     "PCI Device not found"
+#define IO_PCI_ILL_HANDLE_STR    "Illegal handle"
+#define IO_PCI_CONFIGRW_STR      "Error from pci_(read/write)_config_dword system call"
+#define IO_PCI_UNKNOWN_BOARD_STR "Board type can not be determined"
+#define IO_RCC_ILL_OFFSET_STR    "Illegal offset (alignment)"
+#define IO_PCI_REMAP_STR         "Error from remap_page_range system call"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+IO_ErrorCode_t IO_Open(void);
+IO_ErrorCode_t IO_Close(void);
+IO_ErrorCode_t IO_PCIMemMap(u_int pci_addr, u_int size, u_long *virt_addr);
+IO_ErrorCode_t IO_PCIMemUnmap(u_long virt_addr, u_int size);
+IO_ErrorCode_t IO_IOPeekUInt(u_int address, u_int *data);
+IO_ErrorCode_t IO_IOPokeUInt(u_int address, u_int data);
+IO_ErrorCode_t IO_IOPeekUShort(u_int address, u_short *data);
+IO_ErrorCode_t IO_IOPokeUShort(u_int address, u_short data);
+IO_ErrorCode_t IO_IOPeekUChar(u_int address, u_char *data);
+IO_ErrorCode_t IO_IOPokeUChar(u_int address, u_char data);
+IO_ErrorCode_t IO_PCIDeviceLink(u_int vendor_id, u_int device_id, u_int occurrence, u_int *handle);
+IO_ErrorCode_t IO_PCIDeviceUnlink(u_int handle);
+IO_ErrorCode_t IO_PCIDeviceInfo(u_int handle, pci_info_t *info);
+IO_ErrorCode_t IO_PCIConfigReadUInt(u_int handle, u_int offset, u_int *data);
+IO_ErrorCode_t IO_PCIConfigWriteUInt(u_int handle, u_int offset, u_int data);
+IO_ErrorCode_t IO_PCIConfigReadUShort(u_int handle, u_int offset, u_short *data);
+IO_ErrorCode_t IO_PCIConfigWriteUShort(u_int handle, u_int offset, u_short data);
+IO_ErrorCode_t IO_PCIConfigReadUChar(u_int handle, u_int offset, u_char *data);
+IO_ErrorCode_t IO_PCIConfigWriteUChar(u_int handle, u_int offset, u_char data);
+IO_ErrorCode_t IO_GetHostInfo(HostInfo_t *host_info);
+IO_ErrorCode_t IO_Mark(u_int bus);
+unsigned int IO_RCC_err_get(err_pack err, err_str pid, err_str code);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/include/io_rcc/io_rcc_common.h
===================================================================
--- /drsdaq/VME/atlas/include/io_rcc/io_rcc_common.h	(revision 22)
+++ /drsdaq/VME/atlas/include/io_rcc/io_rcc_common.h	(revision 22)
@@ -0,0 +1,100 @@
+/************************************************************************/
+/*									*/
+/*  This is the common header file for the IO_RCC 			*/
+/*  library & applications						*/
+/*									*/
+/*   6. Jun. 02  MAJO  created						*/
+/*									*/
+/*******C 2002 - The software with that certain something****************/
+
+#ifndef _IO_RCC_COMMON_H
+#define _IO_RCC_COMMON_H
+
+#ifdef __KERNEL__
+  #include <linux/types.h>
+  #define P_ID_IO_RCC 8   // Needs to be re-defined here since we do not want to include rcc_error.h at this level
+#else
+  #include <sys/types.h>
+#endif
+
+typedef u_int IO_ErrorCode_t;
+
+//Board types
+#define VP_UNKNOWN 0
+#define VP_PSE     1
+#define VP_PMC     2
+#define VP_100     3
+#define VP_CP1     4
+
+//Stolen from /usr/src/linuxcern/includelinux/ioport.h
+#define IORESOURCE_IO           0x00000100
+#define IORESOURCE_MEM          0x00000200
+
+typedef struct
+{
+  u_int offset;
+  u_int data;
+  u_int size;
+} IO_RCC_IO_t;
+
+typedef struct
+{
+  u_int board_manufacturer;
+  u_int board_type;
+  u_int operating_system_type;
+  u_int operating_system_version;
+} HostInfo_t;
+
+typedef struct
+{
+  u_int vid;
+  u_int did;
+  u_int occ;
+  u_int handle;
+} IO_PCI_FIND_t;
+
+typedef struct
+{
+  u_int handle;
+  u_int offs;
+  u_int func;
+  u_int data;
+  u_int size;
+} IO_PCI_CONF_t;
+
+typedef struct
+{
+  u_int base;
+  u_int size;
+  u_int flags;
+} pci_bar;
+
+typedef struct
+{
+  u_int handle;
+  pci_bar bar[6];
+} pci_info_t;
+
+
+// Error codes
+enum
+{
+  IO_RCC_SUCCESS = 0,
+  IO_RCC_ERROR_FAIL = (P_ID_IO_RCC <<8)+1,
+  IO_RCC_FILE,
+  IO_RCC_NOTOPEN,
+  IO_RCC_MMAP,
+  IO_RCC_MUNMAP,
+  IO_RCC_ILLMANUF,
+  IO_RCC_IOFAIL,
+  IO_PCI_TABLEFULL,
+  IO_PCI_NOT_FOUND,
+  IO_PCI_ILL_HANDLE,
+  IO_PCI_UNKNOWN_BOARD,
+  IO_PCI_CONFIGRW,
+  IO_PCI_REMAP,
+  IO_RCC_ILL_OFFSET,
+  IO_RCC_NO_CODE
+};
+
+#endif
Index: /drsdaq/VME/atlas/include/io_rcc/io_rcc_driver.h
===================================================================
--- /drsdaq/VME/atlas/include/io_rcc/io_rcc_driver.h	(revision 22)
+++ /drsdaq/VME/atlas/include/io_rcc/io_rcc_driver.h	(revision 22)
@@ -0,0 +1,92 @@
+/************************************************************************/
+/*									*/
+/*  This is the driver header file for the IO_RCC package		*/
+/*									*/
+/*   6. Jun. 02  MAJO  created						*/
+/*									*/
+/*******C 2002 - The software with that certain something****************/
+
+#ifndef _IO_RCC_DRIVER_H
+#define _IO_RCC_DRIVER_H
+
+#include "io_rcc/io_rcc_common.h"   
+
+#define IO_MAX_PCI         100     //Max. number of PCI devices linked at any time
+#define MAX_PROC_TEXT_SIZE 0x10000 //The output of "more /proc/io_rcc" must not generate more characters than that
+
+#define CMOSA              0x70
+#define CMOSD              0x71
+#define BID1               0x35
+#define BID2               0x36
+
+
+/********/
+/*Macros*/
+/********/
+#ifdef DRIVER_DEBUG
+  #define kdebug(x) {if (debug) printk x;}
+#else
+  #define kdebug(x)
+#endif
+
+#ifdef DRIVER_ERROR
+  #define kerror(x) {if (errorlog) printk x;}
+#else
+  #define kerror(x)
+#endif
+
+
+/*********/
+/* Types */
+/*********/
+typedef struct
+{
+  struct pci_dev *dev_ptr;
+  u_int vid;
+  u_int did;
+  u_int occ;
+  u_int pid;
+} pci_devices_t;
+
+typedef struct
+{
+  u_int linked[IO_MAX_PCI];
+} private_stuff; 
+
+struct io_proc_data_t
+{
+  char name[10];
+  char value[100];
+};
+
+
+/************/
+/*Prototypes*/
+/************/
+static void io_rcc_vmaClose(struct vm_area_struct *vma);
+static void io_rcc_vmaOpen(struct vm_area_struct *vma);
+static int io_rcc_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg);
+static int io_rcc_open(struct inode *ino, struct file *filep);
+static int io_rcc_mmap(struct file *file, struct vm_area_struct *vma);
+static int io_rcc_release(struct inode *ino, struct file *filep);
+static int io_rcc_write_procmem(struct file *file, const char *buffer, u_long count, void *data);
+static int io_rcc_read_procmem(char *buf, char **start, off_t offset, int count, int *eof, void *data);
+
+
+/*************/
+/*ioctl codes*/
+/*************/
+enum
+{
+  IOPEEK=1,
+  IOPOKE,
+  IOGETID,
+  IOPCILINK,
+  IOPCIUNLINK,
+  IOPCICONFR,
+  IOPCICONFW,
+  IOPCIINFO
+};
+
+
+#endif
Index: /drsdaq/VME/atlas/include/rcc_error/rcc_error.h
===================================================================
--- /drsdaq/VME/atlas/include/rcc_error/rcc_error.h	(revision 22)
+++ /drsdaq/VME/atlas/include/rcc_error/rcc_error.h	(revision 22)
@@ -0,0 +1,139 @@
+/*
+ * rcc_error.h (originally iom_error)
+ *
+ * ref : ATLAS Technical Note 51
+ *       "Error reporting in the I/O module libraries"
+ *
+ * HP Beck  26-01-1998
+ * HP Beck  21-04-1998  revised
+ * HP Beck  04-05-1998  Package IDs and Package ID strings added
+ * JOP      27-05-1998  LS package added 
+ * MAJO     06-11-2001  Adapted to RCC environment
+ */
+
+#ifndef _RCC_ERROR_H_
+#define _RCC_ERROR_H_
+
+#include <stdio.h>
+
+/* Package Identifers */
+
+typedef enum 
+{
+  P_ID_RCC_ERROR =  1,
+  P_ID_VMERCC    =  2,  //Do not change
+  P_ID_UIO,
+  P_ID_SMEM,
+  P_ID_TS,
+  P_ID_CORBO,
+  P_ID_CMEM_RCC,
+  P_ID_IO_RCC,          // = 8; Do not change
+  P_ID_FILAR,           // = 9; Do not change
+  P_ID_SOLAR,           // = 10; Do not change
+  P_ID_QUEST,           // = 11; Do not change
+  P_ID_EM_RCC,
+  P_ID_LL_RCC,
+  P_ID_SLINK,
+  P_ID_S5933,
+  P_ID_RODBUSY,
+  P_ID_ROBIN,           // = 17; Do not change
+  P_ID_RF2TTC
+} err_pid;              // Package ID Type
+
+/* Definitions for error types */
+
+typedef unsigned int  err_type ;     /* full error information             */
+typedef unsigned int  err_pack ;     /* only major or only minor error     */
+typedef unsigned int  err_field;     /* error number                       */
+typedef char          err_str[256] ; /* textual representation of errors   */
+
+/* Textual representations for Package Identifiers */
+
+#define P_ID_RCC_ERROR_STR       "RCC Error"
+#define P_ID_UIO_STR             "UIO library"
+#define P_ID_SMEM_STR            "Smem library in iom_utils"
+#define P_ID_TS_STR              "Time stamping library"
+#define P_ID_LL_RCC_STR          "Linked List Library"
+#define P_ID_EM_RCC_STR          "FILAR EM library"
+#define P_ID_CORBO_STR           "Corbo library"
+#define P_ID_RODBUSY_STR         "ROD-BUSY library"
+#define P_ID_VMERCC_STR          "VMEbus driver/library for the RCC"
+#define P_ID_CMEM_RCC_STR        "CMEM RCC library"
+#define P_ID_IO_RCC_STR          "IO RCC library"
+#define P_ID_FILAR_STR           "FILAR library"
+#define P_ID_SOLAR_STR           "SOLAR library"
+#define P_ID_SLINK_STR           "AMCC based S-Link library"
+#define P_ID_S5933_STR           "S5933 library"
+#define P_ID_ROBIN_STR           "ROBIN library"
+#define P_ID_RF2TTC_STR          "Library for RF2TTC and RFRX"
+
+/* Errors from the RCC_error package */
+
+enum {ERCC_OK      = 0 ,
+      ERCC_NOTOPEN = (P_ID_RCC_ERROR<<8) + 1 ,
+      ERCC_NOINIT ,
+      ERCC_STREAM ,
+      ERCC_NOCODE 
+} ;
+
+/* ... and their textual representation */
+
+#define ERCC_OK_STR       "all OK"
+#define ERCC_NOTOPEN_STR  "no open performed"
+#define ERCC_NOINIT_STR   "packX_err_get is NULL pointer"
+#define ERCC_STREAM_STR   "stream not writeable"
+#define ERCC_NOCODE_STR   "no such error code"
+
+
+/* MACRO definitions */
+
+#define RCC_ERROR_RETURN(maj, min) \
+              (    !(min) ? 0 : \
+                ( ( (maj) & 0xffff0000 ) ? \
+                  ( ((maj) & 0xffff0000) + ((min) & 0xffff) ) : \
+                  ( ((maj)<<16) + ((min) & 0xffff) ) ) )
+
+
+#define RCC_ERROR_MAJOR(error_code) \
+                ( ((error_code) & 0xffff0000) ? \
+                  ((error_code) & 0xffff0000)>>16 : \
+                  ((error_code) & 0x0000ffff) )
+
+#define RCC_ERROR_MINOR(error_code) \
+                 ( (error_code) & 0x0000ffff )
+
+#define RCC_ERROR_MINOR_PID(error_code) \
+                ( ((error_code) & 0x0000ff00)>>8 )
+
+#define RCC_ERROR_MINOR_ERRNO(error_code) \
+               (  (error_code) & 0x000000ff )
+
+#define RCC_ERROR_MAJOR_PID(error_code) \
+                ( ((error_code) & 0xffff0000) ? \
+                  ((error_code) & 0xff000000)>>24 : \
+                  ((error_code) & 0x0000ff00)>>8 )
+
+#define RCC_ERROR_MAJOR_ERRNO(error_code) \
+                ( ((error_code) & 0xffff0000) ? \
+                  ((error_code) & 0x00ff0000)>>16 : \
+                  ((error_code) & 0x000000ff) )
+
+/* The rcc_error API prototyping */ 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+err_type rcc_error_open( void ) ;
+err_type rcc_error_close( void ) ;
+err_type rcc_error_init(err_pid, err_type (*)(err_pack, err_str, err_str) );
+err_type iom_error_init(err_pid, err_type (*)(err_pack, err_str, err_str) );
+err_type rcc_error_print(FILE* stream, err_type) ;
+err_type rcc_error_get(err_type, err_str, err_str, err_str, err_str);
+err_type rcc_error_string(char *text, err_type err);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/include/rcc_time_stamp/my_ts_events.h
===================================================================
--- /drsdaq/VME/atlas/include/rcc_time_stamp/my_ts_events.h	(revision 22)
+++ /drsdaq/VME/atlas/include/rcc_time_stamp/my_ts_events.h	(revision 22)
@@ -0,0 +1,18 @@
+
+enum
+  {
+  F1_START = 1,
+  F1_PRINT,
+  F1_OVERHEAD, 
+  F1_END
+  };
+
+enum 
+  {
+  F2_START = 100,
+  F2_PRINT,
+  F2_END,
+  F2_PAUSE,
+  F2_RESUME
+  };
+
Index: /drsdaq/VME/atlas/include/rcc_time_stamp/tstamp.h
===================================================================
--- /drsdaq/VME/atlas/include/rcc_time_stamp/tstamp.h	(revision 22)
+++ /drsdaq/VME/atlas/include/rcc_time_stamp/tstamp.h	(revision 22)
@@ -0,0 +1,175 @@
+/************************************************************************/
+/*                                                                      */
+/*   file: tstamplib.h                                                  */
+/*   author: Markus Joos, CERN-EP/ESS                                   */
+/*                                                                      */
+/*   This is the header of the timestamping library.                    */
+/*                                                                      */
+/*   History:                                                           */
+/*   22.Sep.98  MAJO  created                                           */
+/*    3.Mar.99  MAJO  major rewrite; macros added                       */
+/*    5.Mar.99  MAJO  default handles and include statement for		*/
+/*                    event symbols added                               */
+/*    27.Jul.99 JOP   move my_ts_events.h out                           */
+/*    16.Jul.02 MAJO  Ported to RCC environment				*/
+/*                                                                      */
+/*******Copyright Ecosoft 2007 - Made from 80% recycled bytes************/
+ 
+#include <sys/types.h>
+#include "rcc_error/rcc_error.h"
+
+#ifndef _TSTAMPLIB_H
+  #define _TSTAMPLIB_H
+
+  typedef struct tstamp
+  { 
+    u_int high;
+    u_int low;
+    u_int data;
+  } tstamp;
+  
+  typedef u_int TS_ErrorCode_t;
+  
+  
+  #define TS_DUMMY       0
+  #define TS_MODE_NORING 0
+  #define TS_MODE_RING   1
+ 
+  #ifdef TSTAMP
+    // Constants
+    #define FREQUENCY_LOW     16500000.0
+    #define FREQUENCY_HIGH    (1.0/256.0)
+    #define TS_FULL           1
+    #define TS_STOP_TS        2
+    #define TS_START_TS       ~TS_STOP_TS
+    #define MAX_OPENS         10
+  
+    enum
+      {
+      TS_H1 = 1,
+      TS_H2,
+      TS_H3,
+      TS_H4,
+      TS_H5,
+      TS_H6,
+      TS_H7,
+      TS_H8,
+      TS_H9,
+      TS_H10
+      };
+
+    // Macros
+    static int tstamp_ret;
+
+      #define TS_OPEN(size, ts_handle)\
+      {\
+      tstamp_ret = ts_open(size, ts_handle);\
+      if (tstamp_ret)\
+        rcc_error_print(stdout, tstamp_ret);\
+      }
+
+      #define TS_SAVE(handle, name)\
+      {\
+      tstamp_ret=ts_save(handle, name);\
+      if (tstamp_ret)\
+        rcc_error_print(stdout, tstamp_ret);\
+      }
+      
+      #define TS_CLOSE(handle)\
+      {\
+      tstamp_ret = ts_close(handle);\
+      if (tstamp_ret)\
+        rcc_error_print(stdout, tstamp_ret);\
+      }
+      
+      #define TS_RECORD(handle, udata)      ts_record(handle, udata)
+      #define TS_START(handle)              ts_start(handle)
+      #define TS_SETT0                      ts_sett0()
+      #define TS_PAUSE(handle)              ts_pause(handle) 
+      #define TS_RESUME(handle)             ts_resume(handle)
+      #define TS_DURATION( t1, t2)          ts_duration(t1, t2)
+      #define TS_CLOCK(time)                ts_clock(time)
+      #define TS_DELAY(time)                ts_delay(time)
+      #define TS_MODE(handle, mode)         ts_mode(handle, mode)
+      #define TS_COMPARE(t1, t2)            ts_compare(t1, t2)
+      #define TS_OFFSET(ts, usecs)          ts_offset(ts, usecs)
+      #define TS_WAIT_UNTIL(target, nyield) ts_wait_until(target, nyield)
+  #else
+      #define TS_OPEN(size, ts_handle)
+      #define TS_SAVE(handle, name)
+      #define TS_CLOSE(handle)
+      #define TS_RECORD(handle,udata)
+      #define TS_START(handle)
+      #define TS_PAUSE(handle)
+      #define TS_RESUME(handle)
+      #define TS_DURATION(t1, t2)
+      #define TS_CLOCK(time) 
+      #define TS_DELAY(time) 
+      #define TS_MODE(handle, mode)
+      #define TS_COMPARE(t1, t2)
+      #define TS_OFFSET(ts, usecs)
+      #define TS_WAIT_UNTIL(target, nyield)
+      #define TS_SETT0
+  #endif
+
+  // Error codes
+  enum
+  {
+    TSE_OK = 0,
+    TSE_IS_CLOSED = (P_ID_TS << 8) + 1,
+    TSE_WHAT,
+    TSE_SMEM,
+    TSE_NO_FREQ,
+    TSE_FILE,
+    TSE_ILL_HANDLE,
+    TSE_ILL_SIZE,
+    TSE_PFILE,
+    TSE_NO_REF,
+    TSE_ERROR_FAIL,
+    TSE_ILL_MODE,
+    TSE_NOCODE
+  };
+  
+  #define TSE_OK_STR           "No error"  
+  #define TSE_NO_FREQ_STR      "Failed to set frequency"
+  #define TSE_FILE_STR         "Failed to open /proc/cpuinfo"
+  #define TSE_ILL_HANDLE_STR   "Parameter >handle< is out of range"
+  #define TSE_IS_CLOSED_STR    "The library has not been opened"
+  #define TSE_ILL_SIZE_STR     "Parameter >size< is out of range"
+  #define TSE_PFILE_STR        "Failed to open/close data file"
+  #define TSE_NO_REF_STR       "Reference time missing (ts_sett0)"
+  #define TSE_ERROR_FAIL_STR   "Failed to initialise the error system"
+  #define TSE_ILL_MODE_STR     "Parameter >mode< is out of range"
+  #define TSE_NOCODE_STR       "Unknown error code"
+   
+  #ifdef __cplusplus
+    extern "C" {
+  #endif
+
+  /*prototypes*/
+  float ts_duration(tstamp t1, tstamp t2); 
+  int ts_compare(tstamp t1, tstamp t2);
+  TS_ErrorCode_t ts_offset(tstamp *ts, u_int usecs);
+  TS_ErrorCode_t ts_open(int size, int handle);
+  TS_ErrorCode_t ts_close(int handle);
+  TS_ErrorCode_t ts_save(int handle, char *name);
+  TS_ErrorCode_t ts_elapsed (tstamp t1, float *time);
+  TS_ErrorCode_t ts_get_freq(void);
+  TS_ErrorCode_t ts_record(int handle, int udata);
+  TS_ErrorCode_t ts_sett0(void);
+  TS_ErrorCode_t ts_start(int handle);
+  TS_ErrorCode_t ts_pause(int handle); 
+  TS_ErrorCode_t ts_resume(int handle);
+  TS_ErrorCode_t ts_clock(tstamp *time);
+  TS_ErrorCode_t ts_delay(u_int usecs);
+  TS_ErrorCode_t ts_mode(int handle, u_int mode);
+  TS_ErrorCode_t ts_wait(u_int usecs, u_int *nyield);
+  TS_ErrorCode_t ts_wait_until(tstamp target, u_int *nyield);
+  TS_ErrorCode_t packTS_err_get (err_pack err, err_str pid_str, err_str en_str);
+
+  #ifdef __cplusplus
+    }
+  #endif
+#endif
+
+
Index: /drsdaq/VME/atlas/include/vme_rcc/cct_berr.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/cct_berr.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/cct_berr.h	(revision 22)
@@ -0,0 +1,16 @@
+// $Id: cct_berr.h,v 1.2 2003/07/09 06:47:18 joos Exp $
+/************************************************************************/
+/*                                                                      */
+/* File: cct_berr.h                                                     */
+/*                                                                      */
+/* VME bus error register for VP PMC/C1x and VP CPI/Pxx boards          */
+/* "borrowed" from the CCT driver                                       */
+/*                                                                      */
+/*  29. Nov. 01  MAJO  created                                          */
+/*                                                                      */
+/************ C 2001 - The software with that certain something *********/
+
+#define BERR_INT_PORT           0x212
+#define BERR_INT_ENABLE         0x10
+#define BERR_INT_MASK           0x20
+#define BERR_VP100              0x213
Index: /drsdaq/VME/atlas/include/vme_rcc/universe.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/universe.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/universe.h	(revision 22)
@@ -0,0 +1,333 @@
+// $Id: universe.h,v 1.3 2004/06/15 09:03:26 joos Exp $
+#ifndef __universe_h
+#define __universe_h
+
+/* Full register space of Tundra Universe ASIC */
+
+/* UCSR Registers */
+typedef struct {
+volatile unsigned int pci_id;				/* 000 */
+volatile unsigned int pci_csr;				/* 004 */
+volatile unsigned int pci_class;			/* 008 */
+volatile unsigned int pci_misc0;			/* 00C */
+volatile unsigned int pci_bs;				/* 010 */
+volatile unsigned int pci_bs1;				/* 014 */
+volatile unsigned int reserved1 [9];			/* 018 - 038 */
+volatile unsigned int pci_misc1;			/* 03C */
+volatile unsigned int reserved2[48];			/* 040 */
+volatile unsigned int lsi0_ctl;		   	        /* 100 */
+volatile unsigned int lsi0_bs;	        		/* 104 */
+volatile unsigned int lsi0_bd;	        		/* 108 */
+volatile unsigned int lsi0_to;	        		/* 10C */
+volatile unsigned int reserved3;        		/* 110 */
+volatile unsigned int lsi1_ctl;	        	        /* 114 */
+volatile unsigned int lsi1_bs;		        	/* 118 */
+volatile unsigned int lsi1_bd;		        	/* 11C */
+volatile unsigned int lsi1_to;		        	/* 120 */
+volatile unsigned int reserved4;	        	/* 124 */
+volatile unsigned int lsi2_ctl;	        		/* 128 */
+volatile unsigned int lsi2_bs;		        	/* 12C */
+volatile unsigned int lsi2_bd;		        	/* 130 */
+volatile unsigned int lsi2_to;		        	/* 134 */
+volatile unsigned int reserved5;	        	/* 138 */
+volatile unsigned int lsi3_ctl;	        		/* 13C */
+volatile unsigned int lsi3_bs;		        	/* 140 */
+volatile unsigned int lsi3_bd;		        	/* 144 */
+volatile unsigned int lsi3_to;		        	/* 148 */
+volatile unsigned int reserved6[9];	        	/* 14C-16C */
+volatile unsigned int scyc_ctl;				/* 170 */
+volatile unsigned int scyc_addr;			/* 174 */
+volatile unsigned int scyc_en;				/* 178 */
+volatile unsigned int scyc_cmp;				/* 17C */
+volatile unsigned int scyc_swp;				/* 180 */
+volatile unsigned int lmisc;				/* 184 */
+volatile unsigned int slsi;            			/* 188 */
+volatile unsigned int l_cmderr;				/* 18C */
+volatile unsigned int laerr;				/* 190 */
+volatile unsigned int reserved7[3]; 			/* 194-19C */
+volatile unsigned int lsi4_ctl;	        		/* 1A0 */
+volatile unsigned int lsi4_bs;		        	/* 1A4 */
+volatile unsigned int lsi4_bd;		        	/* 1A8 */
+volatile unsigned int lsi4_to;		        	/* 1AC */
+volatile unsigned int reserved8;	        	/* 1B0 */
+volatile unsigned int lsi5_ctl;	        		/* 1B4 */
+volatile unsigned int lsi5_bs;		        	/* 1B8 */
+volatile unsigned int lsi5_bd;		        	/* 1BC */
+volatile unsigned int lsi5_to;		        	/* 1C0 */
+volatile unsigned int reserved9;	        	/* 1C4 */
+volatile unsigned int lsi6_ctl;	        		/* 1C8 */
+volatile unsigned int lsi6_bs;		        	/* 1CC */
+volatile unsigned int lsi6_bd;		        	/* 1D0 */
+volatile unsigned int lsi6_to;		        	/* 1D4 */
+volatile unsigned int reserved10;	        	/* 1D8 */
+volatile unsigned int lsi7_ctl;	        		/* 1DC */
+volatile unsigned int lsi7_bs;		        	/* 1E0 */
+volatile unsigned int lsi7_bd;		        	/* 1E4 */
+volatile unsigned int lsi7_to;		        	/* 1E8 */
+volatile unsigned int reserved11[5];	        	/* 1EC - 1FC*/
+volatile unsigned int dctl;				/* 200 */
+volatile unsigned int dtbc;				/* 204 */
+volatile unsigned int dla;				/* 208 */
+volatile unsigned int reserved12;			/* 20c */
+volatile unsigned int dva;				/* 210 */
+volatile unsigned int reserved13;			/* 214 */
+volatile unsigned int dcpp;				/* 218 */
+volatile unsigned int reserved14;			/* 21C */
+volatile unsigned int dgcs;				/* 220 */
+volatile unsigned int d_llue;				/* 224 */
+volatile unsigned int reserved15[(0x300-0x228)/4];	/* 228 - 2FC */
+volatile unsigned int lint_en;				/* 300 */
+volatile unsigned int lint_stat;			/* 304 */
+volatile unsigned int lint_map0;			/* 308 */
+volatile unsigned int lint_map1;			/* 30C */
+volatile unsigned int vint_en;				/* 310 */
+volatile unsigned int vint_stat;			/* 314 */
+volatile unsigned int vint_map0;			/* 318 */
+volatile unsigned int vint_map1;			/* 31C */
+volatile unsigned int statid;				/* 320 */
+volatile unsigned int vx_statid[7];			/* 324 - 33C */
+volatile unsigned int lint_map2;			/* 340 */
+volatile unsigned int vint_map2;			/* 344 */
+volatile unsigned int mbox0;				/* 348 */
+volatile unsigned int mbox1;				/* 34C */
+volatile unsigned int mbox2;				/* 350 */
+volatile unsigned int mbox3;				/* 354 */
+volatile unsigned int sema0;				/* 358 */
+volatile unsigned int sema1;			 	/* 35C */
+volatile unsigned int reserved16[(0x400-0x360)/4];      /* 360 - 3FC */
+volatile unsigned int mast_ctl;				/* 400 */
+volatile unsigned int misc_ctl;				/* 404 */
+volatile unsigned int misc_stat;			/* 408 */
+volatile unsigned int user_am;				/* 40C */
+volatile unsigned int reserved17[(0x4fC-0x410)/4];      /* 410 - 4F8 */
+volatile unsigned int u2spec;				/* 4FC */
+volatile unsigned int reserved17b[(0xf00-0x500)/4];     /* 500 - EFC */
+volatile unsigned int vsi0_ctl;				/* F00 */
+volatile unsigned int vsi0_bs;				/* F04 */
+volatile unsigned int vsi0_bd;				/* F08 */
+volatile unsigned int vsi0_to;				/* F0C */
+volatile unsigned int reserved18;			/* F10 */
+volatile unsigned int vsi1_ctl;				/* F14 */
+volatile unsigned int vsi1_bs;				/* F18 */
+volatile unsigned int vsi1_bd;				/* F1C */
+volatile unsigned int vsi1_to;				/* F20 */
+volatile unsigned int reserved19;			/* F24 */
+volatile unsigned int vsi2_ctl;				/* F28 */
+volatile unsigned int vsi2_bs;				/* F2C */
+volatile unsigned int vsi2_bd;				/* F30 */
+volatile unsigned int vsi2_to;				/* F34 */
+volatile unsigned int reserved20;			/* F38 */
+volatile unsigned int vsi3_ctl;				/* F3C */
+volatile unsigned int vsi3_bs;				/* F40 */
+volatile unsigned int vsi3_bd;				/* F44 */
+volatile unsigned int vsi3_to;				/* F48 */
+volatile unsigned int reserved21[(0xf64-0xf4c)/4];      /* FC4 - F60 */
+volatile unsigned int lm_ctl;				/* F64 */
+volatile unsigned int tl_bs;				/* F68 */
+volatile unsigned int reserved22;		        /* F6C */
+volatile unsigned int vrai_ctl;				/* F70 */
+volatile unsigned int vrai_bs;				/* F74 */
+volatile unsigned int reserved23[2];                    /* F78 - F7C */
+volatile unsigned int vcsr_ctl;                   	/* F80 */
+volatile unsigned int vcsr_to;                   	/* F84 */
+volatile unsigned int v_amerr;				/* F88 */
+volatile unsigned int vaerr;				/* F8C */
+volatile unsigned int vsi4_ctl;				/* F90 */
+volatile unsigned int vsi4_bs;				/* F94 */
+volatile unsigned int vsi4_bd;				/* F98 */
+volatile unsigned int vsi4_to;				/* F9C */
+volatile unsigned int reserved24;			/* FA0 */
+volatile unsigned int vsi5_ctl;				/* FA4 */
+volatile unsigned int vsi5_bs;				/* FA8 */
+volatile unsigned int vsi5_bd;				/* FAC */
+volatile unsigned int vsi5_to;				/* FB0 */
+volatile unsigned int reserved25;			/* FB4 */
+volatile unsigned int vsi6_ctl;				/* FB8 */
+volatile unsigned int vsi6_bs;				/* FBC */
+volatile unsigned int vsi6_bd;				/* FC0 */
+volatile unsigned int vsi6_to;				/* FC4 */
+volatile unsigned int reserved26;			/* FC8 */
+volatile unsigned int vsi7_ctl;				/* FCC */
+volatile unsigned int vsi7_bs;				/* FD0 */
+volatile unsigned int vsi7_bd;				/* FD4 */
+volatile unsigned int vsi7_to;				/* FD8 */
+volatile unsigned int reserved27[6];     		/* FDC - FF0 */
+volatile unsigned int vcsr_clr;                   	/* FF4 */
+volatile unsigned int vcsr_set;                   	/* FF8 */
+volatile unsigned int vcsr_bs;                   	/* FFC */
+}universe_regs_t;
+
+/* Universe II Register Offsets */
+
+#define PCI_ID		0x0000
+#define PCI_CSR		0x0004
+#define PCI_CLASS	0x0008
+#define PCI_MISC0	0x000C
+#define PCI_BS0		0x0010
+#define PCI_BS1		0x0014
+#define PCI_MISC1	0x003C
+
+#define LSI0_CTL	0x0100
+#define LSI0_BS		0x0104
+#define LSI0_BD		0x0108
+#define LSI0_TO		0x010C
+
+#define LSI1_CTL	0x0114
+#define LSI1_BS		0x0118
+#define LSI1_BD		0x011C
+#define LSI1_TO		0x0120
+#define LSI2_CTL	0x0128
+#define LSI2_BS		0x012C
+#define LSI2_BD		0x0130
+#define LSI2_TO		0x0134
+
+#define LSI3_CTL	0x013C
+#define LSI3_BS		0x0140
+#define LSI3_BD		0x0144
+#define LSI3_T		O0x0148
+
+#define SCYC_CTL	0x0170
+#define SCYC_ADDR	0x0174
+#define SCYC_EN		0x0178
+#define SCYC_CMP	0x017C
+#define SCYC_SWP	0x0180
+#define LMISC		0x0184
+#define SLSI		0x0188
+#define L_CMDERR	0x018C
+#define LAERR		0x0190
+
+#define LSI4_CTL	0x01A0
+#define LSI4_BS		0x01A4
+#define LSI4_BD		0x01A8
+#define LSI4_TO		0x01AC
+
+#define LSI5_CTL	0x01B4
+#define LSI5_BS		0x01B8
+#define LSI5_BD		0x01BC
+#define LSI5_TO		0x01C0
+
+#define LSI6_CTL	0x01C8
+#define LSI6_BS		0x01CC
+#define LSI6_BD		0x01D0
+#define LSI6_TO		0x01D4
+
+#define LSI7_CTL	0x01DC
+#define LSI7_BS		0x01E0
+#define LSI7_BD		0x01E4
+#define LSI7_TO		0x01E8
+
+#define DCTL		0x0200
+#define DTBC		0x0204
+#define DLA		0x0208
+#define DVA		0x0210
+#define DCPP		0x0218
+#define DGCS		0x0220
+#define D_LLUE		0x0224
+
+#define LINT_EN		0x0300
+#define LINT_STAT       0x0304
+#define LINT_MAP0       0x0308
+#define LINT_MAP1       0x030C
+#define VINT_EN		0x0310
+#define VINT_STAT       0x0314
+#define VINT_MAP0       0x0318
+#define VINT_MAP1       0x031C
+#define STATID		0x0320
+#define V1_STATID       0x0324
+#define V2_STATID       0x0328
+#define V3_STATID       0x032C
+#define V4_STATID       0x0330
+#define V5_STATID       0x0334
+#define V6_STATID       0x0338
+#define V7_STATID       0x033C
+
+#define LINT_MAP2	0x340
+#define VINT_MAP2	0x344
+#define MBOX0		0x348
+#define MBOX1		0x34C
+#define MBOX2		0x350
+#define MBOX3		0x354
+#define SEMA0		0x358
+#define SEMA1		0x35C
+
+#define MAST_CTL	0x0400
+#define MISC_CTL	0x0404
+#define MISC_STAT	0x0408
+#define USER_AM		0x040C
+
+#define VSI0_CTL	0x0F00
+#define VSI0_BS		0x0F04
+#define VSI0_BD		0x0F08
+#define VSI0_TO		0x0F0C
+
+#define VSI1_CTL	0x0F14
+#define VSI1_BS		0x0F18
+#define VSI1_BD		0x0F1C
+#define VSI1_TO		0x0F20
+
+#define VSI2_CT		L0x0F28
+#define VSI2_BS		0x0F2C
+#define VSI2_BD		0x0F30
+#define VSI2_TO		0x0F34
+
+#define VSI3_CTL	0x0F3C
+#define VSI3_BS		0x0F40
+#define VSI3_BD		0x0F44
+#define VSI3_TO		0x0F48
+
+#define LM_CTL		0xF64
+#define LM_BS		0xF68
+
+#define VRAI_CTL	0x0F70
+#define VRAI_BS		0x0F74
+#define VCSR_CTL	0x0F80
+#define VCSR_TO		0x0F84
+#define V_AMERR		0x0F88
+#define VAERR		0x0F8C
+
+#define VSI4_CTL	0x0F90
+#define VSI4_BS		0x0F94
+#define VSI4_BD		0x0F98
+#define VSI4_TO		0x0F9C
+
+#define VSI5_CTL	0x0FA4
+#define VSI5_BS		0x0FA8
+#define VSI5_BD		0x0FAC
+#define VSI5_TO		0x0FB0
+
+#define VSI6_CTL	0x0FB8
+#define VSI6_BS		0x0FBC
+#define VSI6_BD		0x0FC0
+#define VSI6_TO		0x0FC4
+
+#define VSI7_CTL	0x0FCC
+#define VSI7_BS		0x0FD0
+#define VSI7_BD		0x0FD4
+#define VSI7_TO		0x0FD8
+
+#define VCSR_CLR	0x0FF4
+#define VCSR_SET	0x0FF8
+#define VCSR_BS		0x0FFC
+
+/* Interrupt Control Registers - "borrowed" from the Hannapel driver */
+#define BM_LINT_ACFAIL             0x00008000
+#define BM_LINT_SYSFAIL            0x00004000
+#define BM_LINT_SW_INT             0x00002000
+#define BM_LINT_SW_IACK            0x00001000
+#define BM_LINT_VERR               0x00000400
+#define BM_LINT_LERR               0x00000200
+#define BM_LINT_DMA                0x00000100
+#define BM_LINT_VIRQ               0x000000FE
+#define BM_LINT_VIRQ7              0x00000080
+#define BM_LINT_VIRQ6              0x00000040
+#define BM_LINT_VIRQ5              0x00000020
+#define BM_LINT_VIRQ4              0x00000010
+#define BM_LINT_VIRQ3              0x00000008
+#define BM_LINT_VIRQ2              0x00000004
+#define BM_LINT_VIRQ1              0x00000002
+#define BM_LINT_VOWN               0x00000001
+#define BM_VX_STATID_STATID        0x000000FF
+#define OF_VX_STATID_STATID        0
+#define BM_VX_STATID_ERR           0x00000100
+
+#endif /* __universe_h */
Index: /drsdaq/VME/atlas/include/vme_rcc/vme_rcc.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/vme_rcc.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/vme_rcc.h	(revision 22)
@@ -0,0 +1,205 @@
+// $Id: vme_rcc.h,v 1.11 2007/11/08 07:56:44 joos Exp $
+/************************************************************************/
+/*									*/
+/* File: vme_rcc.h							*/
+/*									*/
+/* This is the public header file for RCC VMEbus library		*/
+/*									*/
+/* 12. Oct. 01  MAJO  created						*/
+/*									*/
+/* 011101 JOP add error codes						*/
+/* 020418 JOP ROAK / RORA						*/
+/* 020527 JOP update interrupt API					*/
+/*									*/
+/************ C 2003 - The software with that certain something *********/
+
+#ifndef _VME_RCC_H 
+#define _VME_RCC_H
+
+#include <linux/types.h>
+#include "vme_rcc_common.h"
+
+/***********************************/
+/*VMEbus transfer type  definitions*/
+/***********************************/
+#define VME_RP             0x01
+#define VME_WP             0x02
+#define VME_A16            0x0
+#define VME_A24            0x1
+#define VME_A32            0x2
+#define VME_CRCSR          0x5
+#define VME_USER1          0x6
+#define VME_USER2          0x7
+#define VME_AM09           (VME_A32)
+#define VME_AM39           (VME_A24)
+#define VME_AM29           (VME_A16)
+#define VME_AM2f           (VME_CRCSR)
+#define VME_AM_PROGRAM     0x00004000
+#define VME_AM_DATA        0x00000000
+#define VME_AM_USER        0x00000000
+#define VME_AM_SUPERVISOR  0x00001000
+#define VME_DMA_READ       0x00000000
+#define VME_DMA_WRITE      0x80000000
+#define VME_DMA_D32        0x00800000
+#define VME_DMA_D64        0x00c00000
+#define VME_DMA_DEF        0x00020100 //A32, user, data, BLT
+#define VME_DMA_D32W       (VME_DMA_DEF | VME_DMA_D32 | VME_DMA_WRITE)
+#define VME_DMA_D32R       (VME_DMA_DEF | VME_DMA_D32 | VME_DMA_READ)
+#define VME_DMA_D64W       (VME_DMA_DEF | VME_DMA_D64 | VME_DMA_WRITE)
+#define VME_DMA_D64R       (VME_DMA_DEF | VME_DMA_D64 | VME_DMA_READ)
+#define VME_DMA_DEF_A24    0x00010100 //A24, user, data, BLT
+#define VME_DMA_A24D32W    (VME_DMA_DEF_A24 | VME_DMA_D32 | VME_DMA_WRITE)
+#define VME_DMA_A24D32R    (VME_DMA_DEF_A24 | VME_DMA_D32 | VME_DMA_READ)
+#define VME_FIFO_DMA_D32W  0x80820200  //Write in A32/D32 single cycle mode to a constant address
+#define VME_FIFO_DMA_D32R  0x00820200  //Read in A32/D32 single cycle mode from a constant address
+
+/************************************************/
+/*Identifier definitions for CR/CSR space access*/
+/*                                              */
+/* Bits 31..28  Number of bytes to read         */
+/* Bits 27..24  Data width		        */
+/*              0 = D08				*/
+/*              1 = D16				*/
+/*              2 = D32				*/
+/* Bits 19..00  Offset of first byte            */
+/************************************************/
+#define ONE_BYTE           0x10000000
+#define TWO_BYTE           0x20000000
+#define THREE_BYTE         0x30000000
+#define FOUR_BYTE          0x40000000
+
+#define CRCSR_D08          0x00000000
+#define CRCSR_D16          0x01000000
+#define CRCSR_D32          0x02000000
+
+#define CR_CHECKSUM        (CRCSR_D08 | ONE_BYTE   | 0x00003)
+#define CR_LENGTH          (CRCSR_D08 | THREE_BYTE | 0x00007)
+#define CR_CRACCESSWIDTH   (CRCSR_D08 | ONE_BYTE   | 0x00013)
+#define CR_CSRACCESSWIDTH  (CRCSR_D08 | ONE_BYTE   | 0x00017)
+#define CR_CRCSRSPEC       (CRCSR_D08 | ONE_BYTE   | 0x0001b)
+#define CR_ASCII1          (CRCSR_D08 | ONE_BYTE   | 0x0001f)
+#define CR_ASCII2          (CRCSR_D08 | ONE_BYTE   | 0x00023)
+#define CR_MANUFID         (CRCSR_D08 | THREE_BYTE | 0x00027)
+#define CR_BOARDID         (CRCSR_D08 | FOUR_BYTE  | 0x00033)
+#define CR_REVID           (CRCSR_D08 | FOUR_BYTE  | 0x00043)
+       
+#define CSR_BAR            (CRCSR_D08 | ONE_BYTE   | 0x7ffff)
+#define CSR_BSR            (CRCSR_D08 | ONE_BYTE   | 0x7fffb)
+#define CSR_BCR            (CRCSR_D08 | ONE_BYTE   | 0x7fff7)
+#define CSR_ADER7          (CRCSR_D08 | FOUR_BYTE  | 0x7ffd3)
+#define CSR_ADER6          (CRCSR_D08 | FOUR_BYTE  | 0x7ffc3)
+#define CSR_ADER5          (CRCSR_D08 | FOUR_BYTE  | 0x7ffb3)
+#define CSR_ADER4          (CRCSR_D08 | FOUR_BYTE  | 0x7ffa3)
+#define CSR_ADER3          (CRCSR_D08 | FOUR_BYTE  | 0x7ff93)
+#define CSR_ADER2          (CRCSR_D08 | FOUR_BYTE  | 0x7ff83)
+#define CSR_ADER1          (CRCSR_D08 | FOUR_BYTE  | 0x7ff73)
+#define CSR_ADER0          (CRCSR_D08 | FOUR_BYTE  | 0x7ff63)
+
+/***************************************/
+/*various upper limits for arrays, etc.*/
+/***************************************/
+#define VME_MAXSTRING   256 
+
+
+/******************/
+/*type definitions*/
+/******************/
+typedef struct
+{
+  int                     number_of_items;
+  VME_BlockTransferItem_t list_of_items[VME_MAXCHAINEL];
+} VME_BlockTransferList_t;
+
+typedef struct
+{
+  int                 number_of_items;
+  VME_InterruptItem_t list_of_items[VME_MAXINTERRUPT];
+} VME_InterruptList_t;
+
+
+/************/
+/*Prototypes*/
+/************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*******************************/ 
+/*Official functions of the API*/
+/*******************************/ 
+int VME_ErrorPrint(VME_ErrorCode_t error_code);
+int VME_ErrorString(VME_ErrorCode_t error_code, char *error_string);
+int VME_ErrorNumber(VME_ErrorCode_t error_code, int *error_number);
+VME_ErrorCode_t VME_Open(void);
+VME_ErrorCode_t VME_Close(void);
+VME_ErrorCode_t VME_ReadCRCSR(int slot_number, u_int crcsr_identifier, u_int *value);
+VME_ErrorCode_t VME_WriteCRCSR(int slot_number, u_int crcsr_identifier, u_int value);
+VME_ErrorCode_t VME_MasterMap(VME_MasterMap_t *master_map, int *master_mapping);
+VME_ErrorCode_t VME_MasterMapVirtualAddress(int master_mapping, u_int *virtual_address);
+VME_ErrorCode_t VME_ReadSafeUInt(int master_mapping, u_int address_offset, u_int *value);
+VME_ErrorCode_t VME_ReadSafeUShort(int master_mapping, u_int address_offset, u_short *value);
+VME_ErrorCode_t VME_ReadSafeUChar(int master_mapping, u_int address_offset, u_char *value);
+VME_ErrorCode_t VME_WriteSafeUInt(int master_mapping, u_int address_offset, u_int value);
+VME_ErrorCode_t VME_WriteSafeUShort(int master_mapping, u_int address_offset, u_short value);
+VME_ErrorCode_t VME_WriteSafeUChar(int master_mapping, u_int address_offset, u_char value);
+VME_ErrorCode_t VME_MasterUnmap(int master_mapping);
+VME_ErrorCode_t VME_MasterMapDump(void);
+VME_ErrorCode_t VME_BusErrorRegisterSignal(int signal_number);
+VME_ErrorCode_t VME_BusErrorInfoGet(VME_BusErrorInfo_t *bus_error_info);
+VME_ErrorCode_t VME_SlaveMap(VME_SlaveMap_t *slave_map, int *slave_mapping);
+VME_ErrorCode_t VME_SlaveMapVmebusAddress(int slave_mapping, u_int *vmebus_address);
+VME_ErrorCode_t VME_SlaveUnmap(int slave_mapping);
+VME_ErrorCode_t VME_SlaveMapDump(void);
+VME_ErrorCode_t VME_BlockTransferInit(VME_BlockTransferList_t *block_transfer_list, int *block_transfer);
+VME_ErrorCode_t VME_BlockTransferStart(int block_transfer);
+VME_ErrorCode_t VME_BlockTransferWait(int block_transfer, int time_out, VME_BlockTransferList_t *block_transfer_list);
+VME_ErrorCode_t VME_BlockTransferEnd(int block_transfer);
+VME_ErrorCode_t VME_BlockTransfer(VME_BlockTransferList_t *block_transfer_list, int time_out);
+VME_ErrorCode_t VME_BlockTransferDump(void);
+VME_ErrorCode_t VME_BlockTransferStatus(VME_BlockTransferList_t *block_transfer_list, int position_of_block, VME_ErrorCode_t *status);
+VME_ErrorCode_t VME_BlockTransferRemaining(VME_BlockTransferList_t *block_transfer_list, int position_of_block, int *remaining);
+VME_ErrorCode_t VME_InterruptLink(VME_InterruptList_t* vmebus_interrupt_list, int *interrupt);
+VME_ErrorCode_t VME_InterruptReenable(int interrupt);
+VME_ErrorCode_t VME_InterruptWait(int interrupt, int time_out, VME_InterruptInfo_t* ir_info);
+VME_ErrorCode_t VME_InterruptRegisterSignal(int interrupt, int signal_number);
+VME_ErrorCode_t VME_InterruptInfoGet(int interrupt, VME_InterruptInfo_t* ir_info);
+VME_ErrorCode_t VME_InterruptUnlink(int interrupt);
+VME_ErrorCode_t VME_InterruptGenerate(int level, u_char vector);
+VME_ErrorCode_t VME_InterruptDump(void);
+VME_ErrorCode_t VME_SysfailInterruptLink(void);
+VME_ErrorCode_t VME_SysfailInterruptRegisterSignal(int signal_number);
+VME_ErrorCode_t VME_SysfailInterruptWait(int time_out);
+VME_ErrorCode_t VME_SysfailInterruptUnlink(void);
+VME_ErrorCode_t VME_SysfailInterruptReenable(void);
+VME_ErrorCode_t VME_SysfailSet(void);
+VME_ErrorCode_t VME_SysfailReset(void);
+VME_ErrorCode_t VME_SysfailPoll(int *flag);
+VME_ErrorCode_t VME_UniverseMap(u_int *virtual_address);
+VME_ErrorCode_t VME_UniverseUnmap(u_int virtual_address);
+VME_ErrorCode_t VME_CCTSetSwap(u_char data);
+VME_ErrorCode_t VME_Update(u_int *data);
+VME_ErrorCode_t VME_SendSysreset(void);
+void VME_ReadFastUInt(int master_mapping, u_int address_offset, u_int *value);
+void VME_ReadFastUShort(int master_mapping, u_int address_offset, u_short *value);
+void VME_ReadFastUChar(int master_mapping, u_int address_offset, u_char *value);
+void VME_WriteFastUInt(int master_mapping, u_int address_offset, u_int value);
+void VME_WriteFastUShort(int master_mapping, u_int address_offset, u_short value);
+void VME_WriteFastUChar(int master_mapping, u_int address_offset, u_char value);
+
+/******************************/
+/* Internal service functions */
+/******************************/
+VME_ErrorCode_t vmercc_err_get(err_pack err, err_str pid, err_str code);
+
+/**********************************/ 
+/*Additional (temporary) functions*/
+/**********************************/
+VME_ErrorCode_t VME_test(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_common.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_common.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_common.h	(revision 22)
@@ -0,0 +1,331 @@
+// $Id: vme_rcc_common.h,v 1.13 2007/11/08 07:56:44 joos Exp $
+/************************************************************************/
+/*									*/
+/* File: vme_rcc_common.h						*/
+/*									*/
+/* This is the common public header file for RCC VMEbus library		*/
+/* and driver								*/
+/*									*/
+/*  2. Nov. 01  MAJO  created						*/
+/*  2. Nov. 01  JOP   interrupts					*/
+/*  26 Nov. 01  JOP   bus errors					*/
+/*  19 Apr. 02  JOP   ROAK / RORA					*/
+/*  27 May. 02  JOP   modify interrupt API				*/
+/*									*/
+/************ C 2005 - The software with that certain something *********/
+
+#ifndef _VME_RCC_COMMON_H 
+#define _VME_RCC_COMMON_H
+
+#ifdef __KERNEL__
+  #include <linux/types.h>
+  #define P_ID_VMERCC 2   // Needs to be re-defined here since we do not want to include rcc_error.h at this level
+#else
+  #include <sys/types.h>
+#endif
+
+/***************/
+/*CCT SBC types*/
+/***************/
+#define VP_UNKNOWN 0
+#define VP_PSE     1
+#define VP_PMC     2
+#define VP_100     3
+#define VP_CP1     4
+#define VP_110     5
+#define VP_315     6
+#define VP_317     7
+#define VP_325     8
+
+/*******************/
+/* Other constants */
+/*******************/
+#define TEXT_SIZE1              3000
+#define TEXT_SIZE2              20000
+#define VME_MAXINTERRUPT        256	// Max # vectors per handle
+#define VME_MAX_BERR_PROCS      10	// Max # processes with BERR handling
+#define VME_MAX_MASTERMAP       200  // Max # of concurrent master mappings in all processes
+#define VME_MAXCHAINEL          32       //Max number of elements in DMA chain 
+#define VME_MAXCHAIN            16       //Max number of internal DMA chains
+#define DMA_DESC_SIZE           (VME_MAXCHAINEL * VME_MAXCHAIN * sizeof(VME_DmaChain_t)) 
+
+enum 
+{
+  VME_LEVELISDISABLED = 0,
+  VME_INT_ROAK,
+  VME_INT_RORA
+};
+
+/*************/
+/*error codes*/
+/*************/
+
+//error codes
+enum
+{
+  VME_SUCCESS = 0,
+  VME_NOTKNOWN = (P_ID_VMERCC << 8) + 1,
+  VME_UNKNOWN,
+  VME_NOTOPEN,
+  VME_RANGE,
+  VME_BUSERROR,
+  VME_ALIGN,
+  VME_NOCHAINMEM,
+  VME_NOBUSERROR,
+  VME_TOOLONG,
+  VME_DMABUSY,          // 10
+  VME_TIMEOUT,
+  VME_FILE,
+  VME_NOMAP,
+  VME_NOSTATMAP,
+  VME_IRGBUSY,
+  VME_EIO,
+  VME_EFAULT,
+  VME_VIRT,
+  VME_REMAP,
+  VME_ENOSYS,		// 20
+  VME_NOSIZE,
+  VME_CMEM_FAIL,
+  VME_ERESTARTSYS,
+  VME_DMAERR,
+  VME_PCI_ERR,
+  VME_VME_ERR,
+  VME_PROTOCOL_ERR,
+  VME_NOT_EXECUTED,     
+  VME_MUNMAP,
+  VME_ILLREV,		// 30
+  VME_IOREMAP,
+  VME_REQIRQ,
+  VME_TOOMANYINT,
+  VME_TOOMANYHDL,
+  VME_INTUSED,
+  VME_ILLINTLEVEL,
+  VME_ILLINTTYPE,
+  VME_INTCONF,
+  VME_LVLDISABLED,
+  VME_LVLISNOTRORA,	// 40
+  VME_ILLINTHANDLE,
+  VME_INTBYSIGNAL,
+  VME_NOINTERRUPT,
+  VME_ENOMEM,           
+  VME_KMALLOC,
+  VME_BERRTBLFULL,
+  VME_BERRNOTFOUND,
+  VME_ERROR_FAIL,
+  VME_ILL_TO,
+  VME_NODOMEMEM,	// 50
+  VME_NO_CODE,
+  VME_UNKNOWN_BOARD,
+  VME_IO_FAIL,
+  VME_SYSFAILTBLFULL,
+  VME_SYSFAILTBLNOTLINKED,
+  VME_SYSFAILNOTLINKED,
+  VME_NOSTATMAP2,
+  VME_IOUNMAP,
+  VME_INTDISABLED,
+  VME_NOCRCSRMAP
+};
+
+
+/*************/
+/*ioctl codes*/
+/*************/
+enum 
+{
+  VMEMASTERMAP = 1,
+  VMEMASTERUNMAP,
+  VMEMASTERMAPDUMP,
+  VMEBERRREGISTERSIGNAL,
+  VMEBERRINFO,
+  VMESLAVEMAP,
+  VMESLAVEMAPDUMP,
+  VMESCSAFE,
+  VMEDMASTART,
+  VMEDMAPOLL,               //10
+  VMEDMADUMP,
+  VMELINK,
+  VMEINTENABLE,
+  VMEINTDISABLE,
+  VMEWAIT,
+  VMEREGISTERSIGNAL,
+  VMEINTERRUPTINFOGET,
+  VMEUNLINK,
+  VMETSTART,
+  VMETSTOP,                 //20
+  VMEUPDATE,
+  VMESYSFAILUNLINK,
+  VMESYSFAILWAIT,
+  VMESYSFAILREGISTERSIGNAL,
+  VMESYSFAILLINK,
+  VMESYSFAILREENABLE,
+  VMESYSFAILPOLL,
+  VMESYSFAILSET,
+  VMESYSFAILRESET,
+  VMESYSRST,                //30
+  VMETEST
+};
+
+
+/******************/
+/*type definitions*/
+/******************/
+typedef struct 
+{
+  u_int vmebus_address;
+  u_int window_size;
+  u_int address_modifier;
+  u_int options; 
+} VME_MasterMap_t;
+
+typedef struct 
+{
+  VME_MasterMap_t  in;
+  u_int            pci_address;
+  u_int            virt_address;  //for the user
+  u_int            kvirt_address; //for the kernel
+  u_int            used;
+}VME_MasterMapInt_t;
+
+typedef struct 
+{
+  u_int system_iobus_address;
+  u_int window_size;
+  u_int address_width;
+  u_int options;
+} VME_SlaveMap_t;
+
+typedef struct 
+{
+  VME_SlaveMap_t  in;
+  u_int           vme_address;
+  u_int           used;
+}VME_SlaveMapInt_t;
+
+typedef struct 
+{
+  u_int kvirt_address;
+  u_int offset;
+  u_int data;
+  u_int nbytes;
+  u_int rw;
+}VME_SingleCycle_t;
+
+typedef struct 
+{
+  u_int dctl;         //Universe chain descriptor
+  u_int dtbc;         //Universe chain descriptor
+  u_int dla;          //Universe chain descriptor
+  u_int reserved1;    //Universe chain descriptor
+  u_int dva;          //Universe chain descriptor
+  u_int reserved2;    //Universe chain descriptor
+  u_int dcpp;         //Universe chain descriptor
+  u_int reserved3;    //Universe chain descriptor
+  u_int ref;          //used by the library
+  u_int reserved4[7]; //the size of the whole structure has to be a multiple of 32 bytes
+} VME_DmaChain_t;
+
+typedef struct
+{
+  u_int handle;
+  u_int pid;  
+  u_int ctrl;
+  u_int counter;
+  u_int timeout;
+  u_int index;
+  int timeoutval;
+} VME_DMAhandle_t;
+
+typedef struct
+{
+  u_int nvectors;
+  u_int vector[VME_MAXINTERRUPT];    // use int internally
+  u_int level;			     // SAME for all vectors
+  u_int type;			     // SAME for all vectors
+} VME_IntHandle_t;
+
+typedef struct
+{
+  u_int level;
+  u_int type;
+} VME_IntEnable_t;
+
+typedef struct
+{
+  VME_IntHandle_t int_handle;
+  int timeout;
+  u_int level;
+  u_int type;
+  u_int vector;	// use int internally
+  u_int multiple;
+} VME_WaitInt_t;
+
+typedef struct
+{
+  VME_IntHandle_t int_handle;
+  int signum;
+} VME_RegSig_t;
+
+typedef struct
+{
+  u_int paddr;
+  u_int handle;
+} VME_DMAstart_t;
+
+typedef struct
+{
+  u_int irq_mode[9];
+} VME_Update_t;
+
+typedef u_int   VME_ErrorCode_t;
+
+typedef struct 
+{
+  u_int vmebus_address;
+  u_int system_iobus_address;
+  u_int size_requested;
+  u_int control_word;
+  u_int size_remaining;
+  u_int status_word;
+} VME_BlockTransferItem_t;
+
+typedef struct
+{
+  u_char vector;
+  u_int level;
+  u_int type;
+} VME_InterruptItem_t;
+
+typedef struct 
+{
+  u_char vector;
+  u_int level;
+  u_int type;
+  u_int multiple;
+} VME_InterruptInfo_t;
+
+typedef struct
+{
+  u_int vmebus_address;
+  u_int address_modifier;
+  u_int lword;
+  u_int iack;
+  u_int ds0;
+  u_int ds1;
+  u_int wr;
+  int  multiple;
+} VME_BusErrorInfo_t;
+
+/********/
+/*Macros*/
+/********/
+#ifdef __powerpc__
+  #define BSWAP(x) bswap(x)
+  #define SYNC __asm__("eieio")
+#endif
+
+#ifdef __i386__
+  #define BSWAP(x) (x)
+  #define SYNC
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_driver.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_driver.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_driver.h	(revision 22)
@@ -0,0 +1,200 @@
+// $Id: vme_rcc_driver.h,v 1.13 2007/09/28 15:18:25 joos Exp $
+/************************************************************************/
+/*									*/
+/* File: vme_rcc_driver.h						*/
+/*									*/
+/* This is the private header file for RCC VMEbus driver		*/
+/*									*/
+/* 26. Oct. 01  MAJO  created						*/
+/* 02. Nov. 01  JOP   interrupts					*/
+/* 26. Nov. 01  JOP   bus errors					*/
+/* 17. Apr. 02  JOP   RORA						*/
+/*									*/
+/************ C 2005 - The software with that certain something *********/
+
+#ifndef _VME_RCC_DRIVER_H 
+#define _VME_RCC_DRIVER_H
+
+#include <linux/types.h>
+#include "vme_rcc_common.h"
+
+#define VME_VCTSIZE        256
+#define VME_DMADONESIZE    64      //max. number of completed DMA transactions
+#define MAX_PROC_TEXT_SIZE 0x10000 //The output of "more /proc/vme_rcc" must not generate more characters than that
+#define BAR0               0
+
+// I/O registers
+#define CMOSA              0x70
+#define CMOSD              0x71
+#define BID1               0x35
+#define BID2               0x36
+
+
+/********/
+/*Macros*/
+/********/
+#ifdef DRIVER_DEBUG
+  #define kdebug(x) {if (debug) printk x;}
+#else
+  #define kdebug(x)
+#endif
+
+#ifdef DRIVER_ERROR
+  #define kerror(x) {if (errorlog) printk x;}
+#else
+  #define kerror(x)
+#endif
+
+
+/******************/
+/*Type definitions*/
+/******************/
+typedef struct 
+{
+  u_int vbase;
+  u_int vtop;
+  u_int pbase;
+  u_int ptop;
+  u_int am;   
+  u_int enab; 
+  u_int wp;   
+  u_int rp;   
+  u_int space;
+  u_int options;
+} mstslvmap_t;
+
+typedef struct 
+{
+  mstslvmap_t master[8];
+  mstslvmap_t slave[8]; 
+} all_mstslvmap_t;  
+
+//  a link between an interrupt and a program is described by a LINK DESCRIPTOR
+typedef struct
+{
+  int                 pid;            // pid of linked process, 0 if not linked 
+  u_int               vct;            // vector #
+  u_int               lvl;            // level
+  u_int               type;           // type
+  u_int               pending;        // interrupt pending 
+  u_int               total_count;    // total # interrupts with this vector (after LINK)
+  VME_IntHandle_t*    group_ptr;      // pointer to the structure of vectors with same handle 
+  struct semaphore    sem;            // its semaphore
+  int                 sig;            // its signal
+} link_dsc_t;
+
+typedef struct
+{
+  link_dsc_t          link_dsc[VME_VCTSIZE];
+  struct semaphore    link_dsc_sem;
+} link_dsc_table_t;
+
+//  a link between BERR and a program is described by a BERR LINK DESCRIPTOR
+typedef struct
+{
+  int                 pid;            // pid of linked process, 0 if not linked 
+  int                 sig;            // its signal
+} berr_link_dsc_t;
+
+typedef struct
+{
+  berr_link_dsc_t     berr_link_dsc[VME_MAX_BERR_PROCS];
+  struct semaphore    proc_sem;
+} berr_proc_table_t;
+
+// holds info about the bus errors - filled by the BERR ISR
+typedef struct
+{
+  u_int    vmeadd;            // last latched VMEbus address 
+  u_int    am;                // and its AM code
+  u_int    iack;              // indicates BERR for IACK cycle
+  u_int    lword;             // Only for VP-100 & VP-110
+  u_int    ds0;               // Only for VP-100 & VP-110
+  u_int    ds1;               // Only for VP-100 & VP-110
+  u_int    wr;                // Only for VP-100 & VP-110
+  int	   multiple;
+  int      flag;
+} berr_dsc_t;
+  
+typedef struct
+{
+  int                pid;         // pid of linked process, 0 if not linked 
+  int                sig;         // the signal (0 if semaphore used)
+  u_int              num;         // number of interrupts received
+  struct semaphore   sem;         // external semaphore
+  struct semaphore   proc_sem;    // internal semaphore
+} sysfail_link_dsc_t; 
+
+typedef struct
+{
+  int                pid;         // pid of process owning the master mapping
+  u_int              vaddr;       // address returned by ioremap
+} master_map_dsc_t;
+
+typedef struct
+{
+  master_map_dsc_t map[VME_MAX_MASTERMAP];
+  struct semaphore sem;
+} master_map_t;
+
+typedef struct
+{       
+  u_int              berr_dsc_flag[VME_MAX_BERR_PROCS];
+  u_int              link_dsc_flag[VME_VCTSIZE];
+  u_int              sysfail_dsc_flag;
+  u_int              dma[VME_DMADONESIZE];
+  u_int              mastermap[VME_MAX_MASTERMAP];
+  VME_BusErrorInfo_t VME_BerrInfo;
+  VME_IntHandle_t    VME_int_handle2;
+  VME_IntEnable_t    VME_IntEnable;
+} private_data_t;
+
+typedef struct InterruptCounters_t 
+{
+  u_int acfail;
+  u_int sysfail;
+  u_int sw_int;
+  u_int sw_iack;
+  u_int verr;
+  u_int lerr;
+  u_int dma;
+  u_int virq[7];
+  u_int vown;
+} InterruptCounters_t;
+
+struct vme_proc_data_t
+{
+  char name[10];
+  char value[100];
+};
+ 
+
+/******************************/
+/*Standard function prototypes*/
+/******************************/
+static int vme_rcc_open(struct inode *ino, struct file *filep);
+static int vme_rcc_release(struct inode *ino, struct file *filep);
+static int vme_rcc_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg);
+static int vme_rcc_mmap(struct file *file, struct vm_area_struct *vma);
+static int vme_rcc_write_procmem(struct file *file, const char *buffer, u_long count, void *data);
+static int vme_rcc_read_procmem(char *buf, char **start, off_t offset, int count, int *eof, void *data);
+static void vme_rcc_vmaClose(struct vm_area_struct *vma);
+
+/*****************************/
+/*Special function prototypes*/
+/*****************************/
+static int berr_check(u_int *addr, u_int *multi, u_int *am);
+static int cct_berrInt(void);
+static void fill_mstmap(u_int d1, u_int d2, u_int d3, u_int d4, mstslvmap_t *mstslvmap);
+static void fill_slvmap(u_int d1, u_int d2, u_int d3, u_int d4, mstslvmap_t *mstslvmap);
+static void vme_dmaTimeout(u_long arg);
+static void vme_intTimeout(u_long arg);
+static void vme_intSysfailTimeout(u_long arg);
+static void vme_dma_handler(void);
+static void vme_irq_handler(int level);
+static void init_cct_berr(void);
+static void mask_cct_berr(void);
+static void send_berr_signals(void);
+static void read_berr_capture(void);
+
+#endif
Index: /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_lib.h
===================================================================
--- /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_lib.h	(revision 22)
+++ /drsdaq/VME/atlas/include/vme_rcc/vme_rcc_lib.h	(revision 22)
@@ -0,0 +1,117 @@
+// $Id: vme_rcc_lib.h,v 1.9 2007/11/08 07:56:44 joos Exp $
+/************************************************************************/
+/*									*/
+/* File: vme_rcc_lib.h							*/
+/*									*/
+/* This is the private header file for RCC VMEbus library		*/
+/*									*/
+/*  2. Nov. 01  MAJO  created						*/
+/*  2. Nov. 01  JOP   interrupts					*/
+/*									*/
+/************ C 2001 - The software with that certain something *********/
+
+#ifndef _VME_RCC_LIB_H 
+#define _VME_RCC_LIB_H
+
+#include <linux/types.h>
+#include "vme_rcc_common.h"
+
+/***************/
+/*error strings*/
+/***************/
+#define VME_SUCCESS_STR             "Function successfully executed"
+#define VME_NOTKNOWN_STR            "Input parameter has illegal value"
+#define VME_UNKNOWN_STR             "Unknown type of error"
+#define VME_NOTOPEN_STR             "The library has not yet been opened"
+#define VME_RANGE_STR               "Input parameter is out ofrange"
+#define VME_BUSERROR_STR            "VMEbus bus error received"
+#define VME_ALIGN_STR               "Misaligned address/size"
+#define VME_NOCHAINMEM_STR          "Not enough memory available for DMA chain"
+#define VME_NOBUSERROR_STR          "There was no bus error information"
+#define VME_TOOLONG_STR             "Overflow of internal chain"
+#define VME_DMABUSY_STR             "The DMA controller is busy"
+#define VME_TIMEOUT_STR             "The time-out has expired"
+#define VME_FILE_STR                "Error from file operation (open/close)"
+#define VME_NOMAP_STR               "All master mappings are in use"
+#define VME_NOSTATMAP_STR           "Static mapping does not fit parameters"
+#define VME_IRGBUSY_STR             "The interrupg generator is busy"
+#define VME_EIO_STR                 "Unix: I/O error"
+#define VME_EFAULT_STR              "Unix: Bad address"
+#define VME_VIRT_STR                "Failed to get user virtual address"
+#define VME_REMAP_STR               "Error from remap_page_range() kernel function"
+#define VME_ENOSYS_STR              "Unix: Function not implemented"
+#define VME_NOSIZE_STR              "A <size> parameter is zero"
+#define VME_CMEM_FAIL_STR           "Error from CMEM_RCC library"
+#define VME_ERESTARTSYS_STR         "Unix: driver got interrupted in down_interruptible"
+#define VME_DMAERR_STR              "Error in DMA transfer, see status words in transfer list"
+#define VME_PCI_ERR_STR             "Error on PCI"
+#define VME_VME_ERR_STR             "VMEbus BERR"
+#define VME_PROTOCOL_ERR_STR        "Protocol error"
+#define VME_NOT_EXECUTED_STR        "This transfer has not been executed"
+#define VME_MUNMAP_STR              "Error from call to munmap()"
+#define VME_ILLREV_STR              "Universe has wrong revision (too old)"
+#define VME_IOREMAP_STR             "Error from call to ioremap()"
+#define VME_REQIRQ_STR              "Error from call to request_irq()"
+#define VME_TOOMANYINT_STR          "Too many interrupt items"
+#define VME_TOOMANYHDL_STR          "Too many Interrupt handles"
+#define VME_INTUSED_STR             "Vector already in use"
+#define VME_ILLINTLEVEL_STR         "Illegal Interrupt Level"
+#define VME_ILLINTTYPE_STR          "Illegal Interrupt Type"
+#define VME_INTCONF_STR             "Illegal level, type combination"
+#define VME_LVLDISABLED_STR         "Level is disabled"
+#define VME_LVLISNOTRORA_STR        "Level is not RORA"
+#define VME_ILLINTHANDLE_STR        "Illegal interrupt handle"
+#define VME_INTBYSIGNAL_STR         "Interrupted by signal"
+#define VME_NOINTERRUPT_STR         "No pending interrupt found"
+#define VME_ENOMEM_STR              "No memory"
+#define VME_KMALLOC_STR             "Error in driver from call to kmalloc"
+#define VME_BERRTBLFULL_STR         "BERR process table full"
+#define VME_BERRNOTFOUND_STR        "Entry in BERR process table not found"
+#define VME_ILL_TO_STR              "Value for time_out is out of range"
+#define VME_NODOMEMEM_STR           "No morememory left in DMA done list"
+#define VME_NO_CODE_STR             "No error code available"
+#define VME_UNKNOWN_BOARD_STR       "Failed to determine board type"
+#define VME_IO_FAIL_STR             "Error from IO_RCC library"
+#define VME_NOCRCSRMAP_STR          "There is no mapping for CR/CSR space access"
+#define VME_SYSFAILTBLFULL_STR      "An other process has already linked the SYSFAIL interrupt"
+#define VME_SYSFAILTBLNOTLINKED_STR "The SYSFAIL interrupt is not linked by your process"
+#define VME_SYSFAILNOTLINKED_STR    "You have to link the SYSFAIL interrupt before you can register a signal"
+#define VME_NOSTATMAP2_STR          "All master maps are in use"
+#define VME_IOUNMAP_STR             "The kernel virtual address for the given master mapping could not be found"
+#define VME_INTDISABLED_STR         "You are trying to link to a disabled interrupt level. Check the status with vmeconfig"
+
+/***************************************/
+/*Various upper limits for arrays, etc.*/
+/***************************************/
+#define VME_MAX_SLAVEMAP         4        //Max number of slave mappings
+#define VME_DMA_MAX_BLOCK_SIZE   0x800000 //Max size of single DMA
+#define VME_MAX_INTHANDLE	 10	  // Max # interrupt handles
+
+/***************************************/
+/*Definitions to be used in the library*/
+/*do not modify                        */
+/***************************************/
+#define DEVICE                  "/dev/vme_rcc"
+#define DMA_CHAIN_END           1
+#define CRCSR_BASE              0
+#define CRCSR_SIZE              0x01000000
+#define CRCSR_OPT               0
+#define CRCSR_OFF               0x80000
+
+/********/
+/*Macros*/
+/********/
+#define ISOPEN {if(!is_open) return(VME_NOTOPEN);}
+#define PE(x) {printf("Error from vme_rcc library: %s\n",x);     break;}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/******************************/
+/* Internal service functions */
+/******************************/
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /drsdaq/VME/atlas/lib/libcmem_rcc.a
===================================================================
--- /drsdaq/VME/atlas/lib/libcmem_rcc.a	(revision 22)
+++ /drsdaq/VME/atlas/lib/libcmem_rcc.a	(revision 22)
@@ -0,0 +1,1 @@
+!<arch>
Index: /drsdaq/VME/atlas/lib/libvme_rcc.a
===================================================================
--- /drsdaq/VME/atlas/lib/libvme_rcc.a	(revision 22)
+++ /drsdaq/VME/atlas/lib/libvme_rcc.a	(revision 22)
@@ -0,0 +1,1 @@
+!<arch>
Index: /drsdaq/VME/struck/Dep.d
===================================================================
--- /drsdaq/VME/struck/Dep.d	(revision 22)
+++ /drsdaq/VME/struck/Dep.d	(revision 22)
@@ -0,0 +1,3 @@
+Dep.d sis3100.o: sis3100.c sis3100_vme_calls.h mvmestd.h
+Dep.d sis3100_vme_calls.o: sis3100_vme_calls.c sis1100_var.h \
+  sis3100_vme_calls.h
Index: /drsdaq/VME/struck/Makefile
===================================================================
--- /drsdaq/VME/struck/Makefile	(revision 22)
+++ /drsdaq/VME/struck/Makefile	(revision 22)
@@ -0,0 +1,26 @@
+#
+#  Makefile 
+#
+
+CC  = gcc
+CFLAGS = -pipe -fthread-jumps -funroll-all-loops -g -O3 -Wall -Wuninitialized -Wmissing-prototypes -DOS_LINUX
+
+OBJECTS = sis3100.o sis3100_vme_calls.o 
+SOURCES = sis3100.c  sis3100_vme_calls.c
+
+all: $(OBJECTS)
+
+clean:
+	@rm -f *.o
+	@rm -f *~
+	@rm -f *.d		
+
+include Dep.d
+
+%.d : 
+	@echo " - Generating dependencies" $@
+	@$(CC) -MM $(SOURCES) $(INCDIRS) \
+	| sed 's/^\(.*\).o:/$@ \1.o:/' > $@
+
+%.o : %.c
+	$(CC) $(CFLAGS) -c -o $@ $<
Index: /drsdaq/VME/struck/mvmestd.h
===================================================================
--- /drsdaq/VME/struck/mvmestd.h	(revision 22)
+++ /drsdaq/VME/struck/mvmestd.h	(revision 22)
@@ -0,0 +1,346 @@
+/*********************************************************************
+
+  Name:         mvmestd.h
+  Created by:   Stefan Ritt
+
+  Cotents:      Midas VME standard routines (MVMESTD) supplying an
+                abstract layer to all supported VME interfaces.
+                
+  $Id: mvmestd.h 3783 2007-07-30 16:03:49Z ritt@PSI.CH $
+
+*********************************************************************/
+
+#ifndef MVMESTD_H
+#define MVMESTD_H
+
+/**dox***************************************************************/
+/** @file mvmestd.h
+The Midas VME include file
+*/
+
+/** @defgroup mvmestdinclude Midas VME standard 
+ */
+/** @defgroup mvmestdfunctionh VME Functions (mvme_xxx) 
+ */
+
+/**dox***************************************************************/
+/** @addtogroup mvmestdinclude
+ *  
+ *  @{  */
+
+/**dox***************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/*---- replacements if not running under MIDAS ---------------------*/
+
+#ifndef MIDAS_TYPE_DEFINED
+#define MIDAS_TYPE_DEFINED
+
+typedef unsigned short int WORD;
+
+#ifndef _MSC_VER
+typedef unsigned int DWORD;
+#endif
+
+#define SUCCESS  1
+
+#endif                          /* MIDAS_TYPE_DEFINED */
+
+/* make functions under WinNT dll exportable */
+#if defined(_MSC_VER) && defined(MIDAS_DLL)
+#define EXPRT __declspec(dllexport)
+#else
+#define EXPRT
+#endif
+
+/**dox***************************************************************/
+#endif                          /* DOXYGEN_SHOULD_SKIP_THIS */
+
+/*---- status codes ------------------------------------------------*/
+
+#define MVME_SUCCESS                  1
+#define MVME_NO_INTERFACE             2
+#define MVME_NO_CRATE                 3
+#define MVME_UNSUPPORTED              4
+#define MVME_INVALID_PARAM            5
+#define MVME_NO_MEM                   6
+#define MVME_ACCESS_ERROR             7
+
+/*---- types -------------------------------------------------------*/
+
+typedef unsigned int mvme_addr_t;
+typedef unsigned int mvme_locaddr_t;
+typedef unsigned int mvme_size_t;
+
+/*---- constants ---------------------------------------------------*/
+
+/**
+data modes
+*/
+#define MVME_DMODE_D8                 1   /**< D8 */
+#define MVME_DMODE_D16                2   /**< D16 */
+#define MVME_DMODE_D32                3   /**< D32 */
+#define MVME_DMODE_D64                4   /**< D64 */
+#define MVME_DMODE_RAMD16             5   /**< RAM memory of VME adapter */
+#define MVME_DMODE_RAMD32             6   /**< RAM memory of VME adapter */
+#define MVME_DMODE_LM                 7   /**< local memory mapped to VME  */
+
+#define MVME_DMODE_DEFAULT MVME_DMODE_D32
+
+/* block transfer modes */
+
+#define MVME_BLT_NONE                 1   /**< normal programmed IO */
+#define MVME_BLT_BLT32                2   /**< 32-bit block transfer */
+#define MVME_BLT_MBLT64               3   /**< multiplexed 64-bit block transfer */
+#define MVME_BLT_2EVME                4   /**< two edge block transfer */
+#define MVME_BLT_2ESST                5   /**< two edge source synchrnous transfer */
+#define MVME_BLT_BLT32FIFO            6   /**< FIFO mode, don't increment address */
+#define MVME_BLT_MBLT64FIFO           7   /**< FIFO mode, don't increment address */
+#define MVME_BLT_2EVMEFIFO            8   /**< two edge block transfer with FIFO mode */
+
+/* vme bus address modifiers */
+
+#define MVME_AM_A32_SB     (0x0F)      /**< A32 Extended Supervisory Block */
+#define MVME_AM_A32_SP     (0x0E)      /**< A32 Extended Supervisory Program */
+#define MVME_AM_A32_SD     (0x0D)      /**< A32 Extended Supervisory Data */
+#define MVME_AM_A32_NB     (0x0B)      /**< A32 Extended Non-Privileged Block */
+#define MVME_AM_A32_NP     (0x0A)      /**< A32 Extended Non-Privileged Program */
+#define MVME_AM_A32_ND     (0x09)      /**< A32 Extended Non-Privileged Data */
+#define MVME_AM_A32_SMBLT  (0x0C)      /**< A32 Multiplexed Block Transfer (D64) */
+#define MVME_AM_A32_NMBLT  (0x08)      /**< A32 Multiplexed Block Transfer (D64) */
+
+#define MVME_AM_A32     MVME_AM_A32_SD
+#define MVME_AM_A32_D64 MVME_AM_A32_SMBLT
+
+#define MVME_AM_A24_SB     (0x3F)      /**< A24 Standard Supervisory Block Transfer      */
+#define MVME_AM_A24_SP     (0x3E)      /**< A24 Standard Supervisory Program Access      */
+#define MVME_AM_A24_SD     (0x3D)      /**< A24 Standard Supervisory Data Access         */
+#define MVME_AM_A24_NB     (0x3B)      /**< A24 Standard Non-Privileged Block Transfer   */
+#define MVME_AM_A24_NP     (0x3A)      /**< A24 Standard Non-Privileged Program Access   */
+#define MVME_AM_A24_ND     (0x39)      /**< A24 Standard Non-Privileged Data Access      */
+#define MVME_AM_A24_SMBLT  (0x3C)      /**< A24 Multiplexed Block Transfer (D64) */
+#define MVME_AM_A24_NMBLT  (0x38)      /**< A24 Multiplexed Block Transfer (D64) */
+
+#define MVME_AM_A24     MVME_AM_A24_SD
+#define MVME_AM_A24_D64 MVME_AM_A24_SMBLT
+
+#define MVME_AM_A16_SD  (0x2D) /**< A16 Short Supervisory Data Access            */
+#define MVME_AM_A16_ND  (0x29) /**< A16 Short Non-Privileged Data Access         */
+
+#define MVME_AM_A16     MVME_AM_A16_SD
+
+#define MVME_AM_DEFAULT MVME_AM_A32
+
+/*---- interface structure -----------------------------------------*/
+typedef struct {
+   int  handle;              /**< internal handle */
+   int  index;               /**< index of interface 0..n */
+   void *info;               /**< internal info structure */
+   int  am;                  /**< Address modifier */
+   int  dmode;               /**< Data mode (D8,D16,D32,D64) */
+   int  blt_mode;            /**< Block transfer mode */
+   void *table;              /**< Optional table for some drivers */
+} MVME_INTERFACE;
+
+/*---- function declarations ---------------------------------------*/
+
+/* make functions callable from a C++ program */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**dox***************************************************************/
+/** @addtogroup mvmestdfunctionh
+ *  
+ *  @{  */
+
+/********************************************************************/
+/** VME open
+The code below summarize the use of most of the mvme calls included in this
+interface.
+\code
+#include "vmicvme.h"  // or other VME interface driver.
+
+int main () {
+  int i, status, vmeio_status, data;
+  MVME_INTERFACE *myvme;
+
+  // Open VME channel 
+  status = mvme_open(&myvme, 0);
+
+  // Reset VME 
+  // Under VMIC reboot CPU!!
+  //  status = mvme_sysreset(myvme);
+
+  // Setup AM 
+  status = mvme_set_am(myvme, MVME_AM_A24_ND);
+
+  // Setup Data size 
+  status = mvme_set_dmode(myvme, MVME_DMODE_D32);
+
+  // Read VMEIO status 
+  status = mvme_read(myvme, &vmeio_status, 0x78001C, 4); 
+  printf("VMEIO status : 0x%x\n", vmeio_status);
+
+  // Write Single value 
+  mvme_write_value(myvme, 0x780010, 0x3);
+
+  // Read Single Value 
+  printf("Value : 0x%x\n", mvme_read_value(myvme, 0x780018));
+
+  // Write to the VMEIO in latch mode 
+  for (i=0;i<10000;i++) {
+    data = 0xF;
+    status = mvme_write(myvme, 0x780010, &data, 4);
+    data = 0x0;
+    status = mvme_write(myvme, 0x780010, &data, 4);
+  }
+
+  // Close VME channel 
+  status = mvme_close(myvme);
+  return 1;
+}
+\endcode
+@param **vme user VME pointer to the interface
+@param index interface number should be used to distingush multiple VME 
+interface access within the same program.
+@return status MVME_SUCCESS, MVME_NO_INTERFACE, MVME_INVALID_PARAM, MVME_ACCESS_ERROR
+*/
+int EXPRT mvme_open(MVME_INTERFACE **vme, int idx);
+
+/********************************************************************/
+/**
+Close and release ALL the opened VME channel.
+See example in @ref mvme_open()
+@param *vme     VME structure.
+@return MVME_SUCCESS, MVME_ACCESS_ERROR              
+*/
+int EXPRT mvme_close(MVME_INTERFACE *vme);
+
+/********************************************************************/
+/**
+VME bus reset.
+Effect of the VME bus reset is dependent of the type of VME interface used.
+See example in @ref mvme_open()
+@param *vme     VME structure.
+@return MVME_SUCCESS, MVME_ACCESS_ERROR             
+*/
+int EXPRT mvme_sysreset(MVME_INTERFACE *vme);
+
+/********************************************************************/
+/**
+Read from VME bus.
+Implementation of the read can include automatic DMA transfer based on the 
+size of the data. See example in @ref mvme_open()
+@param *vme VME structure
+@param *dst  destination pointer
+@param vme_addr source address (VME location).
+@param n_bytes requested transfer size.
+@return MVME_SUCCESS              
+*/
+int EXPRT mvme_read(MVME_INTERFACE *vme, void *dst, mvme_addr_t vme_addr, mvme_size_t n_bytes);
+
+/********************************************************************/
+/**
+Read single data from VME bus.
+Useful for register access. See example in @ref mvme_open()
+@param *vme VME structure
+@param vme_addr source address (VME location).
+@return MVME_SUCCESS              
+*/
+unsigned int EXPRT mvme_read_value(MVME_INTERFACE *vme, mvme_addr_t vme_addr);
+
+/********************************************************************/
+/**
+Write data to VME bus.
+Implementation of the write can include automatic DMA transfer based on the 
+size of the data. See example in @ref mvme_open()
+@param *vme VME structure
+@param vme_addr source address (VME location).
+@param *src source array
+@param n_bytes  size of the array in bytes
+@return MVME_SUCCESS               
+*/
+int EXPRT mvme_write(MVME_INTERFACE *vme, mvme_addr_t vme_addr, void *src, mvme_size_t n_bytes);
+
+/********************************************************************/
+/**
+Write single data to VME bus.
+Useful for register access. See example in @ref mvme_open()
+@param *vme VME structure
+@param vme_addr source address (VME location).
+@param value Value to be written to the VME bus
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_write_value(MVME_INTERFACE *vme, mvme_addr_t vme_addr, unsigned int value);
+
+/********************************************************************/
+/**
+Set Address Modifier.
+@param *vme VME structure
+@param am address modifier
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_set_am(MVME_INTERFACE *vme, int am);
+
+/********************************************************************/
+/**
+Get Address Modifier.
+@param *vme VME structure
+@param *am returned address modifier
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_get_am(MVME_INTERFACE *vme, int *am);
+
+/********************************************************************/
+/**
+Set Data mode.
+@param *vme VME structure
+@param dmode Data mode
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_set_dmode(MVME_INTERFACE *vme, int dmode);
+
+/********************************************************************/
+/**
+Get current Data mode.
+@param *vme VME structure
+@param *dmode returned address modifier
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_get_dmode(MVME_INTERFACE *vme, int *dmode);
+
+/********************************************************************/
+/**
+Set Block Transfer mode.
+@param *vme VME structure
+@param mode BLT mode
+@return MVME_SUCCESS
+*/
+int EXPRT mvme_set_blt(MVME_INTERFACE *vme, int mode);
+
+/********************************************************************/
+/**
+Get current Data mode.
+@param *vme VME structure
+@param *mode returned BLT mode
+@return MVME_SUCCESS
+*/
+  int EXPRT mvme_get_blt(MVME_INTERFACE *vme, int *mode);
+  int EXPRT mvme_interrupt_generate(MVME_INTERFACE *mvme, int level, int vector, void *info);
+  int EXPRT mvme_interrupt_attach(MVME_INTERFACE *mvme, int level, int vector,
+                                  void (*isr)(int, void*, void *), void *info);
+  int EXPRT mvme_interrupt_detach(MVME_INTERFACE *mvme, int level, int vector, void *info);
+  int EXPRT mvme_interrupt_enable(MVME_INTERFACE *mvme, int level, int vector, void *info);
+  int EXPRT mvme_interrupt_disable(MVME_INTERFACE *mvme, int level, int vector, void *info);
+  
+#ifdef __cplusplus
+}
+#endif
+
+/**dox***************************************************************/
+/** @} */ /* end of mvmestdfunctionh */
+/**dox***************************************************************/
+/** @} */ /* end of mvmestdinclude */
+
+#endif // MVMESTD_H
Index: /drsdaq/VME/struck/sis1100/V2.02/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/CVS/Entries	(revision 22)
@@ -0,0 +1,6 @@
+D/netbsd////
+D/test////
+D/eeprom_tools////
+D/common////
+D/jtag_tools////
+D/linux////
Index: /drsdaq/VME/struck/sis1100/V2.02/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100
Index: /drsdaq/VME/struck/sis1100/V2.02/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile	(revision 22)
@@ -0,0 +1,150 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis330x_ram_test_loop_all: sis330x_ram_test_loop_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test_all: sis330x_ram_test_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test1: sis330x_ram_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test2: sis330x_ram_test2.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sis330x_ram_test1.o: sis330x_ram_test1.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../../sis3100_calls/sis3100_vme_calls.h
+sis330x_ram_test2.o: sis330x_ram_test2.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../../sis3100_calls/sis3100_vme_calls.h
+sis330x_ram_test_all.o: sis330x_ram_test_all.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../../sis3100_calls/sis3100_vme_calls.h
+sis330x_ram_test_loop_all.o: sis330x_ram_test_loop_all.c \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile.bak	(revision 22)
@@ -0,0 +1,50 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis330x_ram_test_loop_all: sis330x_ram_test_loop_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test_all: sis330x_ram_test_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test1: sis330x_ram_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test2: sis330x_ram_test2.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/Makefile~	(revision 22)
@@ -0,0 +1,50 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis330x_ram_test_loop_all: sis330x_ram_test_loop_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test_all: sis330x_ram_test_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test1: sis330x_ram_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis330x_ram_test2: sis330x_ram_test2.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test1.c	(revision 22)
@@ -0,0 +1,714 @@
+/***********************************************************************************/
+/*                                                                                 */
+/*   sis330x Ram test 1                                                             */
+/*   write with A32DMA_D32  pattern                                                */
+/*   read with BLT32, MBLT64 and 2EVME                                             */
+/*   check data                                                                    */
+/*                                                                                 */
+/*                                                                                 */
+/***********************************************************************************/
+
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_sis330x_ram_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int i;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+
+
+
+for (i=0;i<20;i++)    {
+    return_code = vme_sis330x_ram_test(p, addr, no_of_lwords) ;
+    if (return_code != 0)  {
+        printf("Error in VME_SIS330x Ram Test1:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );
+        return -1 ;
+       }
+    printf("Test VME_SIS330x Ram Test1                                                        OK\n");
+ }
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_sis330x_ram_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords)
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with vme_A32DMA_D32_read */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])  {
+             printf(" Error0 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error (read BLT32) at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error (read MBLT64) at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+   /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with vme_A32DMA_D32_read */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error0 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+   /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with vme_A32DMA_D32_read */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error0 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+
+   /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with vme_A32DMA_D32_read */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error0 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error3 vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test2.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test2.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test2.c	(revision 22)
@@ -0,0 +1,941 @@
+/********************************************************************************************/
+/*                                                                                          */
+/*   sis330x Ram test 2                                                                     */
+/*   write with A32DMA_D32  pattern                                                         */
+/*   read with BLT32, MBLT64 and 2EVME                                                      */
+/*   read with BLT32FIFO, MBLT64FIFO and 2EVMEFIFO  (do not cross ADC address boundary)     */
+/*   check data                                                                             */
+/*                                                                                          */
+/*                                                                                          */
+/********************************************************************************************/
+
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10
+#define MAX_NUMBER_LWORDS 0x20000       /* 512KBytes */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_sis330x_ram_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int i;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+   printf("ERROR :   NO_OF_LWORDS > MAX_NUMBER_LWORDS) !!! \n");
+  return -1;
+  }
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+
+
+
+for (i=0;i<20;i++)    {
+    return_code = vme_sis330x_ram_test(p, addr, no_of_lwords) ;
+    if (return_code != 0)  {
+        printf("Error in VME_SIS330x Ram Test1:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );
+        return -1 ;
+       }
+    printf("Test VME_SIS330x Ram Test2                                                        OK\n");
+ }
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_sis330x_ram_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords)
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32FIFO_read */
+           return_code =   vme_A32BLT32FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error1FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64FIFO_read */
+           return_code =   vme_A32MBLT64FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error2FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVMEFIFO_read */
+           return_code =   vme_A32_2EVMEFIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32FIFO_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVMEFIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])
+           {
+             printf(" Error3FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32FIFO_read */
+           return_code =   vme_A32BLT32FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error1FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64FIFO_read */
+           return_code =   vme_A32MBLT64FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error2FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVMEFIFO_read */
+           return_code =   vme_A32_2EVMEFIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVMEFIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVMEFIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)   {
+          if (wblt_data[i] != rblt_data[i])       {
+             printf(" Error3FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error3 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32FIFO_read */
+           return_code =   vme_A32BLT32FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error1FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64FIFO_read */
+           return_code =   vme_A32MBLT64FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error2FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVMEFIFO_read */
+           return_code =   vme_A32_2EVMEFIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVMEFIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVMEFIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)  {
+          if (wblt_data[i] != rblt_data[i])   {
+             printf(" Error3FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+
+    /* VME write data */
+    addr =  vme_start_addr ;
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );
+              return -1 ;
+             }
+
+
+
+ 
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32_read */
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error1 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error2 at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVME_read */
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error3 vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32BLT32FIFO_read */
+           return_code =   vme_A32BLT32FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error1FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+
+  /* read data with  vme_A32MBLT64_read */
+           return_code =   vme_A32MBLT64FIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64FIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64FIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" Error2FIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  /* clear read pattern */
+    for (i=0;i<no_of_lwords;i++)    { rblt_data[i] = 0 ;  }
+  /* read data with  vme_A32_2EVMEFIFO_read */
+           return_code =   vme_A32_2EVMEFIFO_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVMEFIFO_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );
+              return -1 ;
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error3 vme_A32_2EVMEFIFO_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );
+              return -1 ;
+             }
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)      {
+          if (wblt_data[i] != rblt_data[i])      {
+             printf(" ErrorFIFO at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c	(revision 22)
@@ -0,0 +1,799 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+
+#define VME_READ_MODE_D32	 0x0      
+#define VME_READ_MODE_DMA_D32	 0x1      
+#define VME_READ_MODE_BLT32	 0x2      
+#define VME_READ_MODE_MBLT64	 0x3
+#define VME_READ_MODE_2EVME	 0x4
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int vme_wr_mode, vme_rd_mode ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100_00remote", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+/*   printf("usage:  VME_WRITE/READ_MODE = 0  D32 \n");     */
+/*   printf("usage:  VME_WRITE/READ_MODE = 1  DMA D32 \n"); */
+/*   printf("usage:  VME_WRITE/READ_MODE = 2  BLT32  \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 3  MBLT64 \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 4  2EVME  \n");  */
+
+
+
+
+for (vme_rd_mode=0;vme_rd_mode<5;vme_rd_mode++)    { 
+   for (vme_wr_mode=0;vme_wr_mode<2;vme_wr_mode++)    { 
+    return_code = vme_memory_test(p, addr, no_of_lwords, vme_wr_mode, vme_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    printf("Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = %1d  and  VME_READ_MODE = %1d OK\n",vme_wr_mode, vme_rd_mode);         
+    } /* for vme_wr_mode */
+ } /* for vme_rd_mode */
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode )
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr, data ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+*/
+
+    /* VME write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+  /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_all.c~	(revision 22)
@@ -0,0 +1,799 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+
+#define VME_READ_MODE_D32	 0x0      
+#define VME_READ_MODE_DMA_D32	 0x1      
+#define VME_READ_MODE_BLT32	 0x2      
+#define VME_READ_MODE_MBLT64	 0x3
+#define VME_READ_MODE_2EVME	 0x4
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int vme_wr_mode, vme_rd_mode ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+/*   printf("usage:  VME_WRITE/READ_MODE = 0  D32 \n");     */
+/*   printf("usage:  VME_WRITE/READ_MODE = 1  DMA D32 \n"); */
+/*   printf("usage:  VME_WRITE/READ_MODE = 2  BLT32  \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 3  MBLT64 \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 4  2EVME  \n");  */
+
+
+
+
+for (vme_rd_mode=0;vme_rd_mode<5;vme_rd_mode++)    { 
+   for (vme_wr_mode=0;vme_wr_mode<2;vme_wr_mode++)    { 
+    return_code = vme_memory_test(p, addr, no_of_lwords, vme_wr_mode, vme_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    printf("Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = %1d  and  VME_READ_MODE = %1d OK\n",vme_wr_mode, vme_rd_mode);         
+    } /* for vme_wr_mode */
+ } /* for vme_rd_mode */
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode )
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr, data ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+*/
+
+    /* VME write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+  /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_loop_all.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_loop_all.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_ram_test/sis330x_ram_test_loop_all.c	(revision 22)
@@ -0,0 +1,801 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+
+#define VME_READ_MODE_D32	 0x0      
+#define VME_READ_MODE_DMA_D32	 0x1      
+#define VME_READ_MODE_BLT32	 0x2      
+#define VME_READ_MODE_MBLT64	 0x3
+#define VME_READ_MODE_2EVME	 0x4
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int vme_wr_mode, vme_rd_mode ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+/*   printf("usage:  VME_WRITE/READ_MODE = 0  D32 \n");     */
+/*   printf("usage:  VME_WRITE/READ_MODE = 1  DMA D32 \n"); */
+/*   printf("usage:  VME_WRITE/READ_MODE = 2  BLT32  \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 3  MBLT64 \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 4  2EVME  \n");  */
+
+
+do {
+
+for (vme_rd_mode=0;vme_rd_mode<5;vme_rd_mode++)    { 
+   for (vme_wr_mode=0;vme_wr_mode<2;vme_wr_mode++)    { 
+    return_code = vme_memory_test(p, addr, no_of_lwords, vme_wr_mode, vme_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    printf("Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = %1d  and  VME_READ_MODE = %1d OK\n",vme_wr_mode, vme_rd_mode);         
+    } /* for vme_wr_mode */
+ } /* for vme_rd_mode */
+
+} while (1) ;
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode )
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr, data ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+*/
+
+    /* VME write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+  /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+
+
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32DMA_D32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32MBLT64_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32DMA_D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32DMA_D32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32MBLT64_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32MBLT64_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_2EVME: 
+           return_code =   vme_A32_2EVME_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32_2EVME_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32_2EVME_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile	(revision 22)
@@ -0,0 +1,64 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sis330x_register_test1.o: sis330x_register_test1.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../../sis3100_calls/sis3100_vme_calls.h \
+  ../header/sis3300.h
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile.bak	(revision 22)
@@ -0,0 +1,38 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/Makefile~	(revision 22)
@@ -0,0 +1,51 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis330x_register_test1: sis330x_register_test1.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c	(revision 22)
@@ -0,0 +1,1875 @@
+/***********************************************************************************/
+/*                                                                                 */
+/*   sis330x Register test 1                                                       */
+/*   key reset                                                                     */
+/*   1. check all default register values after reset                              */
+/*   2. test each register by writing and reading                                  */
+/*   3. test all "ALL_ADC" groups registers                                        */
+/*   4. test all registers by writing to each register different values and read   */
+/*                                                                                 */
+/***********************************************************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+#include "../header/sis3300.h"
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x20
+
+u_int32_t test1_data[16] ;
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int check_register_default_values(int ip, u_int32_t vme_addr, u_int32_t id_value)  ;
+
+int sis330x_register_test(int ip, u_int32_t vme_addr, u_int32_t id_value) ;
+int vme_D_register_test(int ip, u_int32_t vme_addr, u_int32_t mask_32bit)    ;
+int vme_D_all_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit) ;
+int check_register_addresses(int p, u_int32_t vme_addr)  ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int32_t mod_base ;
+u_int32_t addr, data ;
+u_int32_t id_value ;
+
+int return_code ;
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  VME_BASE_ADDRESS of SIS3300/SIS3301    \n");
+  return -1;
+  }
+
+mod_base  = strtoul(argv[1],NULL,0);
+
+
+
+/******************************************************************/
+/*                                                                */
+/* SIS3300/SIS3301    register Test                               */
+/*                                                                */
+/******************************************************************/
+
+addr = mod_base + SIS3300_MODID ;                    /* ID */
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+if ((data == 0x33000302) || (data == 0x33010302)) {
+      id_value = data  ;
+     }
+    else  {
+      printf("wrong ID or Version (must be Version 0x301) \n");
+      printf(" Modul Identification register:  0x%08x\n", data );
+      return -1  ;
+     }
+
+
+/* reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after Key Reset                                                   OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = sis330x_register_test(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: sis330x register  \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x register test                                                            OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_addresses(p, addr)  ;
+if (return_code != 0) {
+      printf("Error:   \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x check_register_addresses                                                 OK\n");
+    }
+
+
+/* second reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after second Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after second Key Reset                                            OK\n");
+    }
+
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = sis330x_register_test(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: sis330x register  \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x second register test                                                     OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_addresses(p, addr)  ;
+if (return_code != 0) {
+      printf("Error:   \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x second check_register_addresses                                          OK\n");
+    }
+
+
+/* second reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after third Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after third Key Reset                                             OK\n");
+    }
+
+
+
+
+
+
+
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+
+
+int check_register_default_values(int p, u_int32_t vme_addr, u_int32_t id_value)
+{
+
+   u_int32_t addr, read_data ;
+   u_int32_t default_data ;
+   int error_cnt ;
+   int return_code ;
+
+   error_cnt = 0 ;
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   default_data =    SIS3300_DEFAULT_STATUS ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+      printf(" Error:default values after reset: addr = 0x%08x  default_data = 0x%08x  read = 0x%08x\n",addr,default_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   addr = vme_addr + SIS3300_IRQ_CONFIG         ;
+   default_data =    SIS3300_DEFAULT_IRQ_CONFIG ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   addr = vme_addr + SIS3300_IRQ_CONTROL          ;
+   default_data =    SIS3300_DEFAULT_IRQ_CONTROL    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   default_data =    SIS3300_DEFAULT_ACQ_CONTROL   ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+         printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   default_data =    SIS3300_DEFAULT_START_DELAY  ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   default_data =  SIS3300_DEFAULT_STOP_DELAY    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   default_data =    SIS3300_DEFAULT_TIMEST_PREDI  ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf("Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data,read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC12    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC34    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC56    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC78    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   if ((id_value & 0xFFFF0000) == 0x33000000) {
+                                         default_data =  SIS3300_DEFAULT_TRIG_THRESHOLD   ;
+                                     }
+                                     else  {
+                                         default_data =  SIS3301_DEFAULT_TRIG_THRESHOLD     ;
+                                     }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+   default_data =  SIS3300_DEFAULT_TRIG_FLAG_CLR_CNT     ;
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+   default_data =  SIS3300_DEFAULT_CLOCK_PREDIVIDER    ;
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   default_data =   SIS3300_DEFAULT_NO_OF_SAMPLE   ;
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   default_data =   SIS3300_DEFAULT_TRIGGER_SETUP   ;
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   default_data =   SIS3300_DEFAULT_MAX_NO_OF_EVENTS   ;
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+
+   default_data =  SIS3300_DEFAULT_TRIGGER_SETUP    ;
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC12           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC34           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC56           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC78           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   default_data =    SIS3300_DEFAULT_MAX_NO_OF_EVENTS  ;
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC12        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC34        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC56        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC78        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+int sis330x_register_test(int p, u_int32_t mod_base, u_int32_t id_value)
+{
+
+   u_int32_t addr;
+   u_int32_t   test_bit32_mask ;
+   int error_cnt ;
+
+   error_cnt =  0 ;
+
+  addr = mod_base +  SIS3300_IRQ_CONFIG ;
+  test_bit32_mask = 0x1fff ; /* onlx 12 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+  addr = mod_base + SIS3300_START_DELAY  ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_STOP_DELAY  ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TIMESTAMP_PREDIVIDER ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC12 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC34 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC56 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC78 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  if ((id_value & 0xFFFF0000) == 0x33000000) test_bit32_mask =  0xfff ; /* only 12 bits */
+                                     else    test_bit32_mask = 0x3fff ; /* only 14 bits */
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC12  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC34  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC56  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC78  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC12  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC34  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC56  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC78  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC12  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC34  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC56  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC78  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC12   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC34   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC56   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC78   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC12 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC34 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC56 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC78 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+/* test all adc register address */
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ALL_ADC ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  if ((id_value & 0xFFFF0000) == 0x33000000) test_bit32_mask =  0xfff ; /* only 12 bits */
+                                     else    test_bit32_mask = 0x3fff ; /* only 14 bits */
+  addr = mod_base +  SIS3300_TRIGGER_THRESHOLD_ALL_ADC   ;
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ALL_ADC ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_CLOCK_PREDIVIDER_ALL_ADC ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_NO_OF_SAMPLE_ALL_ADC ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base +  SIS3300_TRIGGER_SETUP_ALL_ADC  ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ALL_ADC ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+int vme_D_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit)
+{
+
+   u_int32_t addr, data, read_data ;
+
+   int i;
+   int error_cnt ;
+   int return_code ;
+
+
+   addr =  vme_addr ;
+   error_cnt =  0 ;
+
+   if ((addr & 0xffffff) == SIS3300_EVENT_CONFIG_ALL_ADC)  printf("addr = 0x%08x\n",addr);
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+   for (i=0;i<32;i++)  {
+      data = (0x1 << (i&0x1f))   & mask_32bit  ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+/******************************************************************/
+/*                                                                */
+/* step 2:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<32;i++)  {
+      data = (test1_data[i&0xf] & mask_32bit);
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    random                                              */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<0x1000;i++)  {
+      data = random() & mask_32bit ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+/*************************************************************************************************************************/
+/* special test for the SIS330x   xxxxx_ADC_ALL registers                                                                */
+/* vme_addr has to be the _ALL_ADC address                                                                               */
+
+int vme_D_all_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit)
+{
+
+   u_int32_t addr, data, read_data ;
+   u_int32_t addr12, addr34, addr56, addr78  ;
+
+   int i;
+   int error_cnt ;
+   int return_code ;
+
+
+   addr     =  vme_addr ;
+   addr12   =  vme_addr +  0x100000 ;
+   addr34   =  vme_addr +  0x180000  ;
+   addr56   =  vme_addr +  0x200000  ;
+   addr78   =  vme_addr +  0x280000  ;
+
+   error_cnt =  0 ;
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+   for (i=0;i<32;i++)  {
+      data = (0x1 << (i&0x1f))   & mask_32bit  ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+/******************************************************************/
+/*                                                                */
+/* step 2:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<32;i++)  {
+      data = (test1_data[i&0xf] & mask_32bit);
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    random                                              */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<0x1000;i++)  {
+      data = random() & mask_32bit ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+/*************************************************************************************************************************/
+/* write to each register different values                                                                               */
+
+
+int check_register_addresses(int p, u_int32_t vme_addr)
+{
+   u_int32_t addr, read_data ;
+   u_int32_t test_data ;
+   int error_cnt ;
+   int return_code ;
+
+   error_cnt = 0 ;
+
+ /* write test_datas to all register */
+
+   test_data = 0x1 ; /* SIS3300_CONTROL_STATUS */
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x2 ;  /* SIS3300_IRQ_CONTROL */
+   addr = vme_addr + SIS3300_IRQ_CONTROL ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x3 ; /* SIS3300_IRQ_CONFIG */
+   addr = vme_addr + SIS3300_IRQ_CONFIG ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x8  ; /*  */
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x9  ; /*  */
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xA  ; /*  */
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0xB  ; /*  */
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0xC   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xD   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xE  ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xF   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x10  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x11  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x12  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x13  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x14  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x15  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x16  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x17  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x18  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x19  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1A  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1B  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x1C  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1D  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1E  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1F  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x200  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x201  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x202  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x203  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+
+   test_data = 0x24  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x25  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x26  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x27  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+
+
+
+ /* read and test_datas from all register */
+   test_data = 0x1 ;
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x2 ;  /* SIS3300_IRQ_CONTROL */
+   addr = vme_addr + SIS3300_IRQ_CONTROL ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x3 ; /* SIS3300_IRQ_CONFIG */
+   addr = vme_addr + SIS3300_IRQ_CONFIG ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   test_data = 0x8  ; /*  */
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x9  ; /*  */
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+
+
+   test_data = 0xA  ; /*  */
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xB  ; /*  */
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0xC + SIS3300_DEFAULT_EVENT_CONFIG_ADC12 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xD + SIS3300_DEFAULT_EVENT_CONFIG_ADC34 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xE + SIS3300_DEFAULT_EVENT_CONFIG_ADC56; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xF + SIS3300_DEFAULT_EVENT_CONFIG_ADC78 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   test_data = 0x10  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x11  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x12  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x13  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+   test_data = 0x14  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x15  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x16  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x17  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   test_data = 0x18  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x19  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1A  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1B  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+   test_data = 0x1C  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1D  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1E  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1F  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x200  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x201  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x202  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x203  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x24  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x25  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x26  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x27  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/330x_register_test/sis330x_register_test1.c~	(revision 22)
@@ -0,0 +1,1875 @@
+/***********************************************************************************/
+/*                                                                                 */
+/*   sis330x Register test 1                                                       */
+/*   key reset                                                                     */
+/*   1. check all default register values after reset                              */
+/*   2. test each register by writing and reading                                  */
+/*   3. test all "ALL_ADC" groups registers                                        */
+/*   4. test all registers by writing to each register different values and read   */
+/*                                                                                 */
+/***********************************************************************************/
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+#include "../../header/sis3300.h"
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x20
+
+u_int32_t test1_data[16] ;
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int check_register_default_values(int ip, u_int32_t vme_addr, u_int32_t id_value)  ;
+
+int sis330x_register_test(int ip, u_int32_t vme_addr, u_int32_t id_value) ;
+int vme_D_register_test(int ip, u_int32_t vme_addr, u_int32_t mask_32bit)    ;
+int vme_D_all_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit) ;
+int check_register_addresses(int p, u_int32_t vme_addr)  ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int32_t mod_base ;
+u_int32_t addr, data ;
+u_int32_t id_value ;
+
+int return_code ;
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  VME_BASE_ADDRESS of SIS3300/SIS3301    \n");
+  return -1;
+  }
+
+mod_base  = strtoul(argv[1],NULL,0);
+
+
+
+/******************************************************************/
+/*                                                                */
+/* SIS3300/SIS3301    register Test                               */
+/*                                                                */
+/******************************************************************/
+
+addr = mod_base + SIS3300_MODID ;                    /* ID */
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+if ((data == 0x33000302) || (data == 0x33010302)) {
+      id_value = data  ;
+     }
+    else  {
+      printf("wrong ID or Version (must be Version 0x301) \n");
+      printf(" Modul Identification register:  0x%08x\n", data );
+      return -1  ;
+     }
+
+
+/* reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after Key Reset                                                   OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = sis330x_register_test(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: sis330x register  \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x register test                                                            OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_addresses(p, addr)  ;
+if (return_code != 0) {
+      printf("Error:   \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x check_register_addresses                                                 OK\n");
+    }
+
+
+/* second reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after second Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after second Key Reset                                            OK\n");
+    }
+
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = sis330x_register_test(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: sis330x register  \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x second register test                                                     OK\n");
+    }
+
+
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_addresses(p, addr)  ;
+if (return_code != 0) {
+      printf("Error:   \n");
+      return -1 ;
+    }
+   else {
+    printf("sis330x second check_register_addresses                                          OK\n");
+    }
+
+
+/* second reset */
+addr = mod_base + SIS3300_KEY_RESET ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+addr = mod_base  ;                    /* module base address */
+return_code = check_register_default_values(p, addr, id_value)  ;
+if (return_code != 0) {
+      printf("Error: register default values after third Key Reset \n");
+      return -1 ;
+    }
+   else {
+    printf("Register value after third Key Reset                                             OK\n");
+    }
+
+
+
+
+
+
+
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+
+
+int check_register_default_values(int p, u_int32_t vme_addr, u_int32_t id_value)
+{
+
+   u_int32_t addr, read_data ;
+   u_int32_t default_data ;
+   int error_cnt ;
+   int return_code ;
+
+   error_cnt = 0 ;
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   default_data =    SIS3300_DEFAULT_STATUS ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+      printf(" Error:default values after reset: addr = 0x%08x  default_data = 0x%08x  read = 0x%08x\n",addr,default_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   addr = vme_addr + SIS3300_IRQ_CONFIG         ;
+   default_data =    SIS3300_DEFAULT_IRQ_CONFIG ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   addr = vme_addr + SIS3300_IRQ_CONTROL          ;
+   default_data =    SIS3300_DEFAULT_IRQ_CONTROL    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   default_data =    SIS3300_DEFAULT_ACQ_CONTROL   ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+         printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   default_data =    SIS3300_DEFAULT_START_DELAY  ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   default_data =  SIS3300_DEFAULT_STOP_DELAY    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   default_data =    SIS3300_DEFAULT_TIMEST_PREDI  ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf("Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data,read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC12    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC34    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC56    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   default_data =  SIS3300_DEFAULT_EVENT_CONFIG_ADC78    ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+   if ((id_value & 0xFFFF0000) == 0x33000000) {
+                                         default_data =  SIS3300_DEFAULT_TRIG_THRESHOLD   ;
+                                     }
+                                     else  {
+                                         default_data =  SIS3301_DEFAULT_TRIG_THRESHOLD     ;
+                                     }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (read_data != (default_data)) {
+          printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+          error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+
+
+
+   default_data =  SIS3300_DEFAULT_TRIG_FLAG_CLR_CNT     ;
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+   default_data =  SIS3300_DEFAULT_CLOCK_PREDIVIDER    ;
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   default_data =   SIS3300_DEFAULT_NO_OF_SAMPLE   ;
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   default_data =   SIS3300_DEFAULT_TRIGGER_SETUP   ;
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   default_data =   SIS3300_DEFAULT_MAX_NO_OF_EVENTS   ;
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+
+   default_data =  SIS3300_DEFAULT_TRIGGER_SETUP    ;
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC12           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC34           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC56           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr + SIS3300_TRIGGER_SETUP_ADC78           ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   default_data =    SIS3300_DEFAULT_MAX_NO_OF_EVENTS  ;
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC12        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC34        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC56        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+   addr = vme_addr +   SIS3300_MAX_NO_OF_EVENTS_ADC78        ;
+   return_code =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data != (default_data)) {
+       printf(" Error:default values after reset at addr = 0x%08x  default_data = 0x%08x   read = 0x%08x\n",addr,default_data, read_data);
+       error_cnt = error_cnt + 1;
+       if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+int sis330x_register_test(int p, u_int32_t mod_base, u_int32_t id_value)
+{
+
+   u_int32_t addr;
+   u_int32_t   test_bit32_mask ;
+   int error_cnt ;
+
+   error_cnt =  0 ;
+
+  addr = mod_base +  SIS3300_IRQ_CONFIG ;
+  test_bit32_mask = 0x1fff ; /* onlx 12 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+  addr = mod_base + SIS3300_START_DELAY  ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_STOP_DELAY  ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TIMESTAMP_PREDIVIDER ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC12 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC34 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC56 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ADC78 ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  if ((id_value & 0xFFFF0000) == 0x33000000) test_bit32_mask =  0xfff ; /* only 12 bits */
+                                     else    test_bit32_mask = 0x3fff ; /* only 14 bits */
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC12  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC34  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC56  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +   SIS3300_TRIGGER_THRESHOLD_ADC78  ;
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC12  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC34  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC56  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_CLOCK_PREDIVIDER_ADC78  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC12  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC34  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC56  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_NO_OF_SAMPLE_ADC78  ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC12   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC34   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC56   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base + SIS3300_TRIGGER_SETUP_ADC78   ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC12 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC34 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC56 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ADC78 ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+
+/* test all adc register address */
+  addr = mod_base +  SIS3300_EVENT_CONFIG_ALL_ADC ;
+  test_bit32_mask = 0xfeCff ; /* only 17 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  if ((id_value & 0xFFFF0000) == 0x33000000) test_bit32_mask =  0xfff ; /* only 12 bits */
+                                     else    test_bit32_mask = 0x3fff ; /* only 14 bits */
+  addr = mod_base +  SIS3300_TRIGGER_THRESHOLD_ALL_ADC   ;
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_TRIGGER_FLAG_CLR_CNT_ALL_ADC ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_CLOCK_PREDIVIDER_ALL_ADC ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_NO_OF_SAMPLE_ALL_ADC ;
+  test_bit32_mask = 0xff ; /* only 8 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+
+  addr = mod_base +  SIS3300_TRIGGER_SETUP_ALL_ADC  ;
+  test_bit32_mask = 0x110f0f0f ; /* only x bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+  addr = mod_base +  SIS3300_MAX_NO_OF_EVENTS_ALL_ADC ;
+  test_bit32_mask = 0xffff ; /* only 16 bits */
+  if (vme_D_all_register_test(p, addr, test_bit32_mask) != 0x0) return -1  ;
+
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************************************************************************/
+
+int vme_D_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit)
+{
+
+   u_int32_t addr, data, read_data ;
+
+   int i;
+   int error_cnt ;
+   int return_code ;
+
+
+   addr =  vme_addr ;
+   error_cnt =  0 ;
+
+   if ((addr & 0xffffff) == SIS3300_EVENT_CONFIG_ALL_ADC)  printf("addr = 0x%08x\n",addr);
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+   for (i=0;i<32;i++)  {
+      data = (0x1 << (i&0x1f))   & mask_32bit  ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+/******************************************************************/
+/*                                                                */
+/* step 2:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<32;i++)  {
+      data = (test1_data[i&0xf] & mask_32bit);
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    random                                              */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<0x1000;i++)  {
+      data = random() & mask_32bit ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read */
+      return_code =  vme_A32D32_read(p, addr, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+/*************************************************************************************************************************/
+/* special test for the SIS330x   xxxxx_ADC_ALL registers                                                                */
+/* vme_addr has to be the _ALL_ADC address                                                                               */
+
+int vme_D_all_register_test(int p, u_int32_t vme_addr, u_int32_t mask_32bit)
+{
+
+   u_int32_t addr, data, read_data ;
+   u_int32_t addr12, addr34, addr56, addr78  ;
+
+   int i;
+   int error_cnt ;
+   int return_code ;
+
+
+   addr     =  vme_addr ;
+   addr12   =  vme_addr +  0x100000 ;
+   addr34   =  vme_addr +  0x180000  ;
+   addr56   =  vme_addr +  0x200000  ;
+   addr78   =  vme_addr +  0x280000  ;
+
+   error_cnt =  0 ;
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+   for (i=0;i<32;i++)  {
+      data = (0x1 << (i&0x1f))   & mask_32bit  ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+/******************************************************************/
+/*                                                                */
+/* step 2:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<32;i++)  {
+      data = (test1_data[i&0xf] & mask_32bit);
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    random                                              */
+/*                                                                */
+/******************************************************************/
+
+   for (i=0;i<0x1000;i++)  {
+      data = random() & mask_32bit ;
+   /* write */
+      return_code =  vme_A32D32_write(p, addr, data) ;
+      if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   /* read from addr12*/
+      return_code =  vme_A32D32_read(p, addr12, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr12);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr12, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr34 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr34);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr34, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr56 */
+      return_code =  vme_A32D32_read(p, addr34, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr56);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr56, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+   /* read from addr78 */
+      return_code =  vme_A32D32_read(p, addr78, &read_data) ;
+      if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr78);return -1;}
+   /* check */
+      if (data != (read_data & mask_32bit)) {
+          printf(" Error at i = : 0x%04x  addr = 0x%08x  written = 0x%08x   read = 0x%08x\n", i, addr78, data, read_data);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+       }
+    }
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+/*************************************************************************************************************************/
+/* write to each register different values                                                                               */
+
+
+int check_register_addresses(int p, u_int32_t vme_addr)
+{
+   u_int32_t addr, read_data ;
+   u_int32_t test_data ;
+   int error_cnt ;
+   int return_code ;
+
+   error_cnt = 0 ;
+
+ /* write test_datas to all register */
+
+   test_data = 0x1 ; /* SIS3300_CONTROL_STATUS */
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x2 ;  /* SIS3300_IRQ_CONTROL */
+   addr = vme_addr + SIS3300_IRQ_CONTROL ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x3 ; /* SIS3300_IRQ_CONFIG */
+   addr = vme_addr + SIS3300_IRQ_CONFIG ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x8  ; /*  */
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x9  ; /*  */
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xA  ; /*  */
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0xB  ; /*  */
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0xC   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xD   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xE  ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0xF   ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x10  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x11  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x12  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x13  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x14  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x15  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x16  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x17  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x18  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x19  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1A  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1B  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   test_data = 0x1C  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1D  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1E  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x1F  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+   test_data = 0x200  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x201  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x202  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x203  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+
+   test_data = 0x24  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x25  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x26  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+   test_data = 0x27  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code =  vme_A32D32_write(p, addr, test_data) ;
+   if (return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+
+
+
+ /* read and test_datas from all register */
+   test_data = 0x1 ;
+   addr = vme_addr + SIS3300_CONTROL_STATUS ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x2 ;  /* SIS3300_IRQ_CONTROL */
+   addr = vme_addr + SIS3300_IRQ_CONTROL ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x3 ; /* SIS3300_IRQ_CONFIG */
+   addr = vme_addr + SIS3300_IRQ_CONFIG ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+   test_data = 0x8  ; /*  */
+   addr = vme_addr + SIS3300_ACQUISTION_CONTROL         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x9  ; /*  */
+   addr = vme_addr + SIS3300_START_DELAY         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+
+
+
+   test_data = 0xA  ; /*  */
+   addr = vme_addr + SIS3300_STOP_DELAY          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xB  ; /*  */
+   addr = vme_addr +  SIS3300_TIMESTAMP_PREDIVIDER         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0xC + SIS3300_DEFAULT_EVENT_CONFIG_ADC12 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xD + SIS3300_DEFAULT_EVENT_CONFIG_ADC34 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xE + SIS3300_DEFAULT_EVENT_CONFIG_ADC56; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0xF + SIS3300_DEFAULT_EVENT_CONFIG_ADC78 ; /*  */
+   addr = vme_addr +  SIS3300_EVENT_CONFIG_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   test_data = 0x10  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x11  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x12  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x13  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_THRESHOLD_ADC78          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+   test_data = 0x14  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x15  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x16  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x17  ; /*  */
+   addr = vme_addr + SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+   test_data = 0x18  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x19  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1A  ; /*  */
+   addr = vme_addr + SIS3300_CLOCK_PREDIVIDER_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1B  ; /*  */
+   addr = vme_addr +  SIS3300_CLOCK_PREDIVIDER_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+
+   test_data = 0x1C  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1D  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1E  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x1F  ; /*  */
+   addr = vme_addr +  SIS3300_NO_OF_SAMPLE_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x200  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC12         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x201  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC34         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x202  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC56         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x203  ; /*  */
+   addr = vme_addr +  SIS3300_TRIGGER_SETUP_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+   test_data = 0x24  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC12          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x25  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC34          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x26  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC56          ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+   test_data = 0x27  ; /*  */
+   addr = vme_addr + SIS3300_MAX_NO_OF_EVENTS_ADC78         ;
+   return_code  =  vme_A32D32_read(p, addr, &read_data) ;
+   if (return_code != 0) { printf("vme_A32D32_read:  return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+   /* check */
+   if (read_data !=  test_data) {
+      printf(" Error check_register_addresses: addr = 0x%08x  test_data = 0x%08x  read = 0x%08x\n",addr,test_data,read_data);
+         error_cnt = error_cnt + 1;
+          if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+    }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/header/sis3300.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/header/sis3300.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/applications/sis330x/header/sis3300.h	(revision 22)
@@ -0,0 +1,393 @@
+/***************************************************************************/
+/*                                                                         */
+/*  Filename: sis3300.h                                                    */
+/*                                                                         */
+/*  Funktion: headerfile for SIS3300 and SIS3301                           */
+/*                                                                         */
+/*  Autor:                TH                                               */
+/*  date:                 10.05.2002                                       */
+/*  last modification:    06.06.2002                                       */
+/*                                                                         */
+/* ----------------------------------------------------------------------- */
+/*                                                                         */
+/*  SIS  Struck Innovative Systeme GmbH                                    */
+/*                                                                         */
+/*  Harksheider Str. 102A                                                  */
+/*  22399 Hamburg                                                          */
+/*                                                                         */
+/*  Tel. +49 (0)40 60 87 305 0                                             */
+/*  Fax  +49 (0)40 60 87 305 20                                            */
+/*                                                                         */
+/*  http://www.struck.de                                                   */
+/*                                                                         */
+/*  © 2002                                                                 */
+/*                                                                         */
+/***************************************************************************/
+
+
+
+
+
+/* SIS3300 12-bit,100MHz */
+/* addresses  */
+
+/* general registers */
+#define SIS3300_CONTROL_STATUS                       0x0	  /* read/write; D32 */
+#define SIS3300_MODID                                0x4	  /* read only; D32 */
+#define SIS3300_IRQ_CONFIG                           0x8      /* read/write; D32 */
+#define SIS3300_IRQ_CONTROL                          0xC      /* read/write; D32 */
+
+#define SIS3300_ACQUISTION_CONTROL                  0x10      /* read/write; D32 */
+#define SIS3300_START_DELAY                         0x14      /* read/write; D32 */
+#define SIS3300_STOP_DELAY                          0x18      /* read/write; D32 */
+#define SIS3300_TIMESTAMP_PREDIVIDER                0x1C      /* read/write; D32 */
+
+#define SIS3300_KEY_RESET                           0x20	  /* write only; D32 */
+												    
+#define SIS3300_KEY_START                           0x30	  /* write only; D32 */
+#define SIS3300_KEY_STOP                            0x34	  /* write only; D32 */
+
+#define SIS3300_KEY_START_AUTO_BANK_SWITCH          0x40	  /* write only; D32 */
+#define SIS3300_KEY_STOP_AUTO_BANK_SWITCH           0x44	  /* write only; D32 */
+#define SIS3300_KEY_BANK1_FULL_FLAG                 0x48	  /* write only; D32 */
+#define SIS3300_KEY_BANK2_FULL_FLAG                 0x4C	  /* write only; D32 */
+
+
+#define SIS3300_EVENT_TIMESTAMP_DIR_BANK1         0x1000  	  /* read only; D32, BLT32; size: 0x1000 */
+#define SIS3300_EVENT_TIMESTAMP_DIR_BANK2         0x2000	  /* read only; D32, BLT32; size: 0x1000 */
+
+
+
+/* registers specified for all ADC groups */
+#define SIS3300_EVENT_CONFIG_ALL_ADC            0x100000      /* write only; D32 */
+#define SIS3300_TRIGGER_THRESHOLD_ALL_ADC       0x100004      /* write only; D32 */
+#define SIS3300_TRIGGER_FLAG_CLR_CNT_ALL_ADC    0x10001C      /* write only; D32 */
+#define SIS3300_CLOCK_PREDIVIDER_ALL_ADC        0x100020      /* write only; D32 */
+#define SIS3300_NO_OF_SAMPLE_ALL_ADC            0x100024      /* write only; D32 */
+#define SIS3300_TRIGGER_SETUP_ALL_ADC           0x100028      /* write only; D32 */
+#define SIS3300_MAX_NO_OF_EVENTS_ALL_ADC        0x10002C      /* write only; D32 */
+
+#define SIS3300_EVENT_DIRECTORY_BANK1_ALL_ADC   0x101000	  /* read only; D32, BLT32 */
+#define SIS3300_EVENT_DIRECTORY_BANK2_ALL_ADC   0x102000	  /* read only; D32, BLT32 */
+
+
+/* registers specified for ADC group 1 (ADC1 and ADC2) */
+#define SIS3300_EVENT_CONFIG_ADC12              0x200000      /* read/write; D32 */
+#define SIS3300_TRIGGER_THRESHOLD_ADC12         0x200004      /* read/write; D32 */
+#define SIS3300_BANK1_ADDR_CNT_ADC12            0x200008      /* read only; D32 */
+#define SIS3300_BANK2_ADDR_CNT_ADC12            0x20000C      /* read only; D32 */
+
+#define SIS3300_BANK1_EVENT_CNT_ADC12           0x200010      /* read only; D32 */
+#define SIS3300_BANK2_EVENT_CNT_ADC12           0x200014      /* read only; D32 */
+#define SIS3300_ACTUAL_SAMPLE_VALUE_ADC12       0x200018      /* read only; D32 */
+#define SIS3300_TRIGGER_FLAG_CLR_CNT_ADC12      0x20001C      /* read/write; D32 */
+
+#define SIS3300_CLOCK_PREDIVIDER_ADC12          0x200020      /* read/write; D32 */
+#define SIS3300_NO_OF_SAMPLE_ADC12              0x200024      /* read/write; D32 */
+#define SIS3300_TRIGGER_SETUP_ADC12             0x200028      /* read/write; D32 */
+#define SIS3300_MAX_NO_OF_EVENTS_ADC12          0x20002C      /* read/write; D32 */
+
+#define SIS3300_EVENT_DIRECTORY_BANK1_ADC12     0x201000	  /* read only; D32, BLT32; size: 0x1000 */
+#define SIS3300_EVENT_DIRECTORY_BANK2_ADC12     0x202000	  /* read only; D32, BLT32; size: 0x1000 */
+
+
+/* registers specified for ADC group 2 (ADC3 and ADC4) */
+#define SIS3300_EVENT_CONFIG_ADC34              0x280000      /* read/write; D32 */
+#define SIS3300_TRIGGER_THRESHOLD_ADC34         0x280004      /* read/write; D32 */
+#define SIS3300_BANK1_ADDR_CNT_ADC34            0x280008      /* read only; D32 */
+#define SIS3300_BANK2_ADDR_CNT_ADC34            0x28000C      /* read only; D32 */
+
+#define SIS3300_BANK1_EVENT_CNT_ADC34           0x280010      /* read only; D32 */
+#define SIS3300_BANK2_EVENT_CNT_ADC34           0x280014      /* read only; D32 */
+#define SIS3300_ACTUAL_SAMPLE_VALUE_ADC34       0x280018      /* read only; D32 */
+#define SIS3300_TRIGGER_FLAG_CLR_CNT_ADC34      0x28001C      /* read/write; D32 */
+
+#define SIS3300_CLOCK_PREDIVIDER_ADC34          0x280020      /* read/write; D32 */
+#define SIS3300_NO_OF_SAMPLE_ADC34              0x280024      /* read/write; D32 */
+#define SIS3300_TRIGGER_SETUP_ADC34             0x280028      /* read/write; D32 */
+#define SIS3300_MAX_NO_OF_EVENTS_ADC34          0x28002C      /* read/write; D32 */
+
+#define SIS3300_EVENT_DIRECTORY_BANK1_ADC34     0x281000	  /* read only; D32, BLT32; size: 0x1000 */
+#define SIS3300_EVENT_DIRECTORY_BANK2_ADC34     0x282000	  /* read only; D32, BLT32; size: 0x1000 */
+
+
+/* registers specified for ADC group 3 (ADC5 and ADC6) */
+#define SIS3300_EVENT_CONFIG_ADC56              0x300000      /* read/write; D32 */
+#define SIS3300_TRIGGER_THRESHOLD_ADC56         0x300004      /* read/write; D32 */
+#define SIS3300_BANK1_ADDR_CNT_ADC56            0x300008      /* read only; D32 */
+#define SIS3300_BANK2_ADDR_CNT_ADC56            0x30000C      /* read only; D32 */
+
+#define SIS3300_BANK1_EVENT_CNT_ADC56           0x300010      /* read only; D32 */
+#define SIS3300_BANK2_EVENT_CNT_ADC56           0x300014      /* read only; D32 */
+#define SIS3300_ACTUAL_SAMPLE_VALUE_ADC56       0x300018      /* read only; D32 */
+#define SIS3300_TRIGGER_FLAG_CLR_CNT_ADC56      0x30001C      /* read/write; D32 */
+
+#define SIS3300_CLOCK_PREDIVIDER_ADC56          0x300020      /* read/write; D32 */
+#define SIS3300_NO_OF_SAMPLE_ADC56              0x300024      /* read/write; D32 */
+#define SIS3300_TRIGGER_SETUP_ADC56             0x300028      /* read/write; D32 */
+#define SIS3300_MAX_NO_OF_EVENTS_ADC56          0x30002C      /* read/write; D32 */
+
+#define SIS3300_EVENT_DIRECTORY_BANK1_ADC56     0x301000	  /* read only; D32, BLT32; size: 0x1000 */
+#define SIS3300_EVENT_DIRECTORY_BANK2_ADC56     0x302000	  /* read only; D32, BLT32; size: 0x1000 */
+
+
+/* registers specified for ADC group 4 (ADC7 and ADC7) */
+#define SIS3300_EVENT_CONFIG_ADC78              0x380000      /* read/write; D32 */
+#define SIS3300_TRIGGER_THRESHOLD_ADC78         0x380004      /* read/write; D32 */
+#define SIS3300_BANK1_ADDR_CNT_ADC78            0x380008      /* read only; D32 */
+#define SIS3300_BANK2_ADDR_CNT_ADC78            0x38000C      /* read only; D32 */
+
+#define SIS3300_BANK1_EVENT_CNT_ADC78           0x380010      /* read only; D32 */
+#define SIS3300_BANK2_EVENT_CNT_ADC78           0x380014      /* read only; D32 */
+#define SIS3300_ACTUAL_SAMPLE_VALUE_ADC78       0x380018      /* read only; D32 */
+#define SIS3300_TRIGGER_FLAG_CLR_CNT_ADC78      0x38001C      /* read/write; D32 */
+
+#define SIS3300_CLOCK_PREDIVIDER_ADC78          0x380020      /* read/write; D32 */
+#define SIS3300_NO_OF_SAMPLE_ADC78              0x380024      /* read/write; D32 */
+#define SIS3300_TRIGGER_SETUP_ADC78             0x380028      /* read/write; D32 */
+#define SIS3300_MAX_NO_OF_EVENTS_ADC78          0x38002C      /* read/write; D32 */
+
+#define SIS3300_EVENT_DIRECTORY_BANK1_ADC78     0x381000	  /* read only; D32, BLT32; size: 0x1000 */
+#define SIS3300_EVENT_DIRECTORY_BANK2_ADC78     0x382000	  /* read only; D32, BLT32; size: 0x1000 */
+
+
+
+
+
+
+/* memory specified for Bank1  */
+/* write D32; read D32, BLT32, MBL64, 2eVME; size: 0x80000 bytes (0x20000 Lwords) */
+#define SIS3300_MEMBASE_BANK1_ADC12             0x400000
+#define SIS3300_MEMBASE_BANK1_ADC34             0x480000
+#define SIS3300_MEMBASE_BANK1_ADC56             0x500000
+#define SIS3300_MEMBASE_BANK1_ADC78             0x580000
+
+
+/* memory specified for Bank2  */
+/* write D32; read D32, BLT32, MBL64, 2eVME; size: 0x80000 bytes (0x20000 Lwords) */
+#define SIS3300_MEMBASE_BANK2_ADC12             0x600000
+#define SIS3300_MEMBASE_BANK2_ADC34             0x680000
+#define SIS3300_MEMBASE_BANK2_ADC56             0x700000
+#define SIS3300_MEMBASE_BANK2_ADC78             0x780000
+
+
+
+
+
+
+
+/* register default values after power up or KEY_RESET */
+#define SIS3300_DEFAULT_STATUS                       0x0
+#define SIS3300_DEFAULT_IRQ_CONFIG                   0x0
+#define SIS3300_DEFAULT_IRQ_CONTROL                  0x0
+
+#define SIS3300_DEFAULT_ACQ_CONTROL                  0x0
+#define SIS3300_DEFAULT_START_DELAY                  0x0
+#define SIS3300_DEFAULT_STOP_DELAY                   0x0
+#define SIS3300_DEFAULT_TIMEST_PREDI                 0x0
+
+
+#define SIS3300_DEFAULT_EVENT_CONFIG_ADC12        0x1000
+#define SIS3300_DEFAULT_EVENT_CONFIG_ADC34        0x1100
+#define SIS3300_DEFAULT_EVENT_CONFIG_ADC56        0x1200
+#define SIS3300_DEFAULT_EVENT_CONFIG_ADC78        0x1300
+
+#define SIS3300_DEFAULT_TRIG_THRESHOLD        0x0FFF0FFF
+#define SIS3301_DEFAULT_TRIG_THRESHOLD        0x3FFF3FFF
+
+#define SIS3300_DEFAULT_TRIG_FLAG_CLR_CNT            0x0
+#define SIS3300_DEFAULT_CLOCK_PREDIVIDER             0x0
+
+#define SIS3300_DEFAULT_NO_OF_SAMPLE                 0x0
+#define SIS3300_DEFAULT_TRIGGER_SETUP                0x0
+#define SIS3300_DEFAULT_MAX_NO_OF_EVENTS             0x0
+
+
+
+
+/* bits */
+
+
+/* maskbits of Bankx memory */
+#define SIS3300_ADC_MASK                            0x0FFF0FFF
+#define SIS3301_ADC_MASK                            0x3FFF3FFF
+
+#define SIS3300_GATE_CHAINING_START_BIT             0x00008000
+
+
+
+/* bits of SIS3300_CONTROL register ; J-K register*/
+
+/* disable bits ; default after Reset */
+#define CTRL_DISABLE_BANK_FULL_PULSE_ON_OUTPUT3      0x3000000      /* default after Reset */
+#define CTRL_DISABLE_BANK_FULL_PULSE_ON_OUTPUT2      0x2000000      /* default after Reset */
+#define CTRL_DISABLE_BANK_FULL_PULSE_ON_OUTPUT1      0x1000000      /* default after Reset */
+
+#define CTRL_DISABLE_INTERNAL_TRIGGER_STOP           0x400000      /* default after Reset */
+#define CTRL_DISABLE_TRIGGER_OUT_UPON_STARTED        0x200000      /* default after Reset */
+#define CTRL_DISABLE_TRIGGER_OUT_INVERT              0x100000      /* default after Reset */
+
+#define CTRL_USE_USER_OUTPUT_ON_OUTPUT1               0x40000      /* default after Reset */
+#define CTRL_CLR_USER_OUTPUT                          0x20000	   /* default after Reset */
+#define CTRL_USER_LED_OFF                             0x10000	   /* default after Reset */
+
+
+/* enable bits */
+
+#define CTRL_ENABLE_BANK_FULL_PULSE_ON_OUTPUT3          0x300
+#define CTRL_ENABLE_BANK_FULL_PULSE_ON_OUTPUT2          0x200
+#define CTRL_ENABLE_BANK_FULL_PULSE_ON_OUTPUT1          0x100      /* higher priority as CTRL_USE_TRIGGER_OUTPUT_ON_OUTPUT1 */
+
+#define CTRL_ENABLE_INTERNAL_TRIGGER_STOP                0x40
+#define CTRL_ENABLE_TRIGGER_OUT_UPON_STARTED             0x20
+#define CTRL_ENABLE_TRIGGER_OUT_INVERT                   0x10
+
+#define CTRL_USE_TRIGGER_OUTPUT_ON_OUTPUT1                0x4
+#define CTRL_SET_USER_OUTPUT                              0x2
+#define CTRL_USER_LED_ON                                  0x1
+
+
+
+/* bits of SIS3300_AQC register ; J-K register*/
+
+/* disable bits ; default after Reset */
+#define ACQ_DISABLE_MULTIPLEXER_MODE            0x80000000  /* default after Reset  */
+
+#define ACQ_DISABLE_RANDOM_CLOCK_MODE            0x8000000  /* default after Reset  */
+#define ACQ_DISABLE_GATE_MODE                    0x4000000  /* default after Reset  */
+#define ACQ_DISABLE_P2_START_STOP                0x2000000  /* default after Reset  */
+#define ACQ_DISABLE_LEMO_START_STOP              0x1000000  /* default after Reset  */
+
+#define ACQ_DISABLE_STOP_DELAY                    0x800000  /* default after Reset  */
+#define ACQ_DISABLE_START_DELAY                   0x400000  /* default after Reset  */
+#define ACQ_DISABLE_MULTI_EVENT_MODE              0x200000  /* default after Reset  */
+#define ACQ_DISABLE_AUTOSTART                     0x100000  /* default after Reset  */
+
+#define ACQ_DISABLE_BANK_SWITCH_MODE               0x40000  /* default after Reset  */
+#define ACQ_DISABLE_CLOCK_TO_BANK2                 0x20000  /* default after Reset  */
+#define ACQ_DISABLE_CLOCK_TO_BANK1                 0x10000  /* default after Reset  */
+
+
+/* enable bits */
+#define ACQ_ENABLE_MULTIPLEXER_MODE                 0x8000
+
+#define ACQ_ENABLE_RANDOM_CLOCK_MODE                 0x800
+#define ACQ_ENABLE_GATE_MODE                         0x400
+#define ACQ_ENABLE_P2_START_STOP                     0x200
+#define ACQ_ENABLE_LEMO_START_STOP                   0x100
+
+#define ACQ_ENABLE_STOP_DELAY                         0x80
+#define ACQ_ENABLE_START_DELAY                        0x40
+#define ACQ_ENABLE_MULTI_EVENT_MODE                   0x20
+#define ACQ_ENABLE_AUTOSTART                          0x10
+
+#define ACQ_ENABLE_BANK_SWITCH_MODE                    0x4
+#define ACQ_ENABLE_CLOCK_TO_BANK2                      0x2  /* arm Bank2 */
+#define ACQ_ENABLE_CLOCK_TO_BANK1                      0x1  /* arm Bank1 */
+
+
+/* define sample clock */
+#define ACQ_SET_CLOCK_TO_100MHZ                 0x70000000  /* default after Reset  */
+#define ACQ_SET_CLOCK_TO_50MHZ                  0x60001000
+#define ACQ_SET_CLOCK_TO_25MHZ                  0x50002000
+#define ACQ_SET_CLOCK_TO_12_5MHZ                0x40003000
+#define ACQ_SET_CLOCK_TO_6_25MHZ                0x30004000
+#define ACQ_SET_CLOCK_TO_3_125MHZ               0x20005000
+#define ACQ_SET_CLOCK_TO_LEMO_CLOCK_IN          0x10006000
+#define ACQ_SET_CLOCK_TO_P2_CLOCK_IN            0x00007000
+
+
+/* Status bits */
+#define ACQ_STATUS_SWITCH_MODE_BANK2_FULL         0x800000
+#define ACQ_STATUS_SWITCH_MODE_BANK2_BUSY         0x400000
+#define ACQ_STATUS_SWITCH_MODE_BANK1_FULL         0x200000
+#define ACQ_STATUS_SWITCH_MODE_BANK1_BUSY         0x100000
+
+#define ACQ_STATUS_BANK_SWITCH_BUSY                0x40000
+
+#define ACQ_STATUS_ADC_BUSY                        0x10000
+
+#define ACQ_STATUS_CLOCK_TO_BANK2                      0x2
+#define ACQ_STATUS_CLOCK_TO_BANK1                      0x1
+
+
+
+
+/* bits of SIS3300_Configuration register ; D-register*/
+
+#define CONF_ENABLE_GATE_CHAINING_MODE               0x10
+
+
+#define CONF_PAGE_SIZE_128K_AUTOSTOP                  0x0
+#define CONF_PAGE_SIZE_16K_AUTOSTOP                   0x1
+#define CONF_PAGE_SIZE_4K_AUTOSTOP                    0x2
+#define CONF_PAGE_SIZE_2K_AUTOSTOP                    0x3
+#define CONF_PAGE_SIZE_1K_AUTOSTOP                    0x4
+#define CONF_PAGE_SIZE_512_AUTOSTOP                   0x5
+#define CONF_PAGE_SIZE_256_AUTOSTOP                   0x6
+#define CONF_PAGE_SIZE_128_AUTOSTOP                   0x7
+
+#define CONF_PAGE_SIZE_128K_WRAP                      0x8
+#define CONF_PAGE_SIZE_16K_WRAP                       0x9
+#define CONF_PAGE_SIZE_4K_WRAP                        0xA
+#define CONF_PAGE_SIZE_2K_WRAP                        0xB
+#define CONF_PAGE_SIZE_1K_WRAP                        0xC
+#define CONF_PAGE_SIZE_512_WRAP                       0xD
+#define CONF_PAGE_SIZE_256_WRAP                       0xE
+#define CONF_PAGE_SIZE_128_WRAP                       0xF
+
+
+
+/* bits of Trigger Setuo register  */
+
+#define TRIG_SETUP_ENABLE_PULS                 0x10000000
+#define TRIG_SETUP_PULS_1_CLK                     0x10000
+#define TRIG_SETUP_PULS_2_CLK                     0x20000
+#define TRIG_SETUP_PULS_3_CLK                     0x30000
+#define TRIG_SETUP_PULS_4_CLK                     0x40000
+#define TRIG_SETUP_PULS_5_CLK                     0x50000
+#define TRIG_SETUP_PULS_6_CLK                     0x60000
+#define TRIG_SETUP_PULS_7_CLK                     0x70000
+#define TRIG_SETUP_PULS_8_CLK                     0x80000
+#define TRIG_SETUP_PULS_9_CLK                     0x90000
+#define TRIG_SETUP_PULS_10_CLK                    0xA0000
+#define TRIG_SETUP_PULS_11_CLK                    0xB0000
+#define TRIG_SETUP_PULS_12_CLK                    0xC0000
+#define TRIG_SETUP_PULS_13_CLK                    0xD0000
+#define TRIG_SETUP_PULS_14_CLK                    0xE0000
+#define TRIG_SETUP_PULS_15_CLK                    0xF0000
+
+#define TRIG_SETUP_ENABLE_NM_MODE               0x1000000
+
+#define TRIG_SETUP_N_OVER_1_CLK                     0x100
+#define TRIG_SETUP_N_OVER_2_CLK                     0x200
+#define TRIG_SETUP_N_OVER_3_CLK                     0x300
+
+#define TRIG_SETUP_N_OVER_13_CLK                    0xC00
+#define TRIG_SETUP_N_OVER_14_CLK                    0xE00
+#define TRIG_SETUP_N_OVER_15_CLK                    0xF00
+
+
+#define TRIG_SETUP_M_UNDER_1_CLK                      0x1
+#define TRIG_SETUP_M_UNDER_2_CLK                      0x2
+#define TRIG_SETUP_M_UNDER_3_CLK                      0x3
+
+#define TRIG_SETUP_M_UNDER_15_CLK                     0xF
+
+
+
+
+#define ARMEDSTARTED                   0x20
+#define STOP_DELAY_ENABLE              0x80
+#define FP_LEMO                       0x100
+
+#define CLOCK_TO_BANK1                 0x01
+#define CLOCK_TO_BANK2                 0x02
+
+#define WRAP                            0x8
+#define EXTCLOCK                        0x6
+
+#define MEMSIZE                     0x20000
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries	(revision 22)
@@ -0,0 +1,1 @@
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries.Log
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries.Log	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Entries.Log	(revision 22)
@@ -0,0 +1,1 @@
+A D/pci////
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/dev
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_init_sdram.c#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_init_sdram.c#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_init_sdram.c#	(revision 22)
@@ -0,0 +1,205 @@
+/* $ZEL: sis1100_init_sdram.c,v 1.2 2004/05/27 23:10:21 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Kirsch, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+static int
+sis1100_spd_write(struct sis1100_softc* sc, u_int32_t val)
+{
+    u_int32_t error;
+    
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, 0x0f060402);
+    wmb_reg();
+    sis1100writereg(sc, t_dal, val);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, SDRAM_EEPROM_CTRL_STAT);
+    mb_reg();
+    do {
+        error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
+
+static int
+sis1100_spd_read(struct sis1100_softc* sc, u_int32_t* val)
+{
+    u_int32_t error;
+    
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, 0x0f060002);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, SDRAM_EEPROM_CTRL_STAT);
+    mb_reg();
+    do {
+	error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    rmb_reg();
+    *val=sis1100readreg(sc, tc_dal);
+    SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
+  
+static int
+sdram_eeprom_start(struct sis1100_softc* sc)
+{
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SDA_OE);
+    sis1100_spd_write(sc, 0) ;
+    return 0;
+}
+
+static int
+sdram_eeprom_stop(struct sis1100_softc* sc)
+{
+  sis1100_spd_write(sc, 0);
+  sis1100_spd_write(sc, SDRAM_SDA_OE);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SCL);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA);
+  sis1100_spd_write(sc, 0);
+  return 0;
+}
+
+static int
+sdram_eeprom_read(struct sis1100_softc* sc, int noack, u_int8_t* val)
+{
+    u_int32_t d;
+    u_int8_t data;
+    int i;
+
+    data=0;
+    for (i=0; i<8; i++) {
+        sis1100_spd_write(sc, 0);
+        sis1100_spd_write(sc, SDRAM_SCL);
+        sis1100_spd_write(sc, SDRAM_SCL);
+        sis1100_spd_read(sc, &d);
+
+        data<<=1;
+        data|=((d & 0x100)>>8);
+    }
+
+    *val=data;
+
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL:SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL:SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE);
+    sis1100_spd_write(sc, 0);
+    return 0 ;
+}
+
+static int
+sdram_eeprom_write(struct sis1100_softc* sc, u_int8_t val)
+{
+    u_int32_t data ;
+    int i ;
+
+    for (i=0; i<8; i++) {
+        data=(val&0x80)?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE;
+        sis1100_spd_write(sc, data);
+        sis1100_spd_write(sc, data);
+
+        sis1100_spd_write(sc, data|SDRAM_SCL);
+
+        sis1100_spd_write(sc, data);
+        val<<=1;
+    }
+
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SCL);
+    sis1100_spd_write(sc, 0);
+    return 0 ;
+}
+
+int
+sis1100_init_sdram(struct sis1100_softc* sc)
+{
+    u_int32_t eeprom_signature;
+    u_int8_t eeprom_bytes[8];
+    u_int8_t dummy;
+    int i;
+
+    sdram_eeprom_start(sc) ;
+    sdram_eeprom_write(sc, 0xA0); /* device Write cmd  */
+    sdram_eeprom_write(sc, 0x00); /* write address */
+
+    sdram_eeprom_start(sc) ;
+
+    sdram_eeprom_write(sc, 0xA1); /* device Read cmd  */
+
+    for (i=0; i<8; i++) sdram_eeprom_read(sc, 0, eeprom_bytes+i);
+
+    sdram_eeprom_read(sc, 1, &dummy);
+    sdram_eeprom_stop(sc);
+/*
+    for (i=0; i<8; i++)
+        printk(KERN_INFO "eeprom[%d]=0x%03x\n", i, eeprom_bytes[i]);
+*/
+    eeprom_signature=(eeprom_bytes[3]<<16)|(eeprom_bytes[4]<<8)|(eeprom_bytes[5]);
+/*
+    printk(KERN_INFO "eeprom_signature=0x%04x\n", eeprom_signature);
+*/
+    switch (eeprom_signature) {
+    case 0x0c0901:
+        sc->ram_size=64*1024*1024;
+        break;
+    case 0x0c0902:
+        sc->ram_size=128*1024*1024;
+        break;
+    case 0x0d0a01:
+        sc->ram_size=256*1024*1024;
+        sis1100_spd_write(sc, 1<<16);
+        break;
+    case 0x0d0a02:
+        sc->ram_size=512*1024*1024;
+        sis1100_spd_write(sc, 1<<16);
+        break;
+    case 0xffffff:
+        sc->ram_size=0;
+        pINFO(sc, "no SDRAM installed");
+        break;
+    default:
+        pERROR(sc, "SDRAM not supported: row=%d col=%d banks=%d",
+                eeprom_bytes[3], eeprom_bytes[4], eeprom_bytes[5]);
+        sc->ram_size=0;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_ioctl.c#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_ioctl.c#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_ioctl.c#	(revision 22)
@@ -0,0 +1,860 @@
+/* $ZEL: sis1100_ioctl.c,v 1.5 2004/05/27 23:10:22 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+static int
+test_super(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+return 0;
+#ifdef __NetBSD__
+    if (suser(fd->p->p_ucred, &fd->p->p_acflag)) return EPERM;
+#elif __linux__
+    if (!capable(CAP_SYS_RAWIO)) return EPERM;
+#endif
+    return 0;
+}
+
+#ifdef SIS1100_NEW_CTRL
+static int
+ioctl_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        d->val=plxreadlocal0(sc, d->offset&0x7ff);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 1);
+    }
+    return 0;
+}
+
+static int
+ioctl_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        plxwritelocal0(sc, d->offset&0x7ff, d->val);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    }
+    return 0;
+}
+
+#else
+
+static int
+ioctl_local_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    d->val=plxreadlocal0(sc, d->offset&0x7ff);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_local_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    plxwritelocal0(sc, d->offset&0x7ff, d->val);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 0);
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    return 0;
+}
+#endif
+
+static int
+ioctl_ident(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ident* d)
+{
+    d->local.hw_type=sc->local_ident&0xff;
+    d->local.hw_version=(sc->local_ident>>8)&0xff;
+    d->local.fw_type=(sc->local_ident>>16)&0xff;
+    d->local.fw_version=(sc->local_ident>>24)&0xff;
+
+    d->remote.hw_type=sc->remote_ident&0xff;
+    d->remote.hw_version=(sc->remote_ident>>8)&0xff;
+    d->remote.fw_type=(sc->remote_ident>>16)&0xff;
+    d->remote.fw_version=(sc->remote_ident>>24)&0xff;
+
+    d->remote_ok=sc->remote_hw!=sis1100_hw_invalid;
+    d->remote_online=(sis1100readreg(sc, sr)&sr_synch)==sr_synch;
+    return 0;
+}
+
+static int
+ioctl_remote_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+#if 0
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, cr, cr_rem_reset);
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid:
+        SEM_UNLOCK(sc->sem_hw);
+        return ENXIO;
+    case sis1100_hw_pci:
+        /* do nothing */
+        break;
+    case sis1100_hw_vme:
+        sis3100writeremreg(sc, vme_master_sc, 8, 1);
+        break;
+    case sis1100_hw_camac:
+        break;
+    }
+    SEM_UNLOCK(sc->sem_hw);
+    mdelay(500);
+    sis1100_init_remote(sc);
+#endif
+    return ENOTTY;
+}
+
+static int
+ioctl_devtype(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=fd->subdev;
+    return 0;
+}
+
+static int
+ioctl_driverversion(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=SIS1100_Version;
+    return 0;
+}
+
+static int
+ioctl_mindmalen(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    int* d)
+{
+/*
+ *   0: never use DMA
+ *   1: always use DMA (if size>4)
+ *  >1: use DMA if transfersize (in Bytes) is >= mindmalen
+ *  -1: don't change old value
+ */
+    int tmp[2];
+
+    tmp[0]=fd->mindmalen_r;
+    tmp[1]=fd->mindmalen_w;
+    if (d[0]>=0) fd->mindmalen_r=d[0];
+    if (d[1]>=0) fd->mindmalen_w=d[1];
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_setvmespace(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct vmespace* d)
+{
+    if ((d->datasize!=1) && (d->datasize!=2) && (d->datasize!=4))
+        return EINVAL;
+    fd->vmespace_am=d->am;
+    fd->vmespace_datasize=d->datasize;
+    if (d->swap>=0) {
+        sc->user_wants_swap=d->swap;
+        sis1100_update_swapping(sc, "ioctl_setvmespace");
+    }
+    if (d->mindmalen>=0) {
+        fd->mindmalen_r=d->mindmalen;
+        fd->mindmalen_w=d->mindmalen;
+    }
+    return 0;
+}
+
+static int
+ioctl_swap(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int old;
+
+    old=sc->user_wants_swap;
+    sc->user_wants_swap=*d;
+    sis1100_update_swapping(sc, "ioctl_swap");
+    *d=old;
+    return 0;
+}
+
+static int
+ioctl_3100_timeouts(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+/*
+ *  d[0]: bus error terms of 10**-9 s
+ *  d[1]: arbitration timeout in terms of 10**-3 s
+ */
+    int tmp[2];
+    if ((fd->subdev!=sis1100_subdev_remote)
+        || (sc->remote_hw!=sis1100_hw_vme))
+                return ENXIO;
+    if (sis3100_get_timeouts(sc, tmp+0, tmp+1)) return EIO;
+    if (sis3100_set_timeouts(sc, d[0], d[1])) return EIO;
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_front_io(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_io(sc, d, 0);
+}
+
+static int
+ioctl_front_pulse(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_pulse(sc, d, 0);
+}
+
+static int
+ioctl_front_latch(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_latch(sc, d, 0);
+}
+
+static int
+ioctl_last_error(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    *d=fd->last_prot_err;
+    return 0;
+}
+
+static int
+ioctl_mapsize(struct sis1100_softc* sc, struct sis1100_fdata* fd, u_int32_t* d)
+{
+    switch (fd->subdev) {
+        case sis1100_subdev_remote:
+	    *d=sc->rem_size;
+	    break;
+	case sis1100_subdev_ram:
+	    *d=sc->ram_size;
+	    break;
+	case sis1100_subdev_ctrl:
+	    *d=sc->reg_size;
+	    break;
+	case sis1100_subdev_dsp:
+	    *d=0;
+	    break;
+	default:
+	    return EINVAL;
+    }
+    return 0;
+}
+
+static int
+ioctl_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_pipe* d)
+{
+    int res;
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_read_pipe(sc, d);
+    return res;
+}
+
+static int
+ioctl_write_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_writepipe* d)
+{
+    u_int32_t* list;
+    int res;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+
+#ifdef __NetBSD__
+    list=malloc(d->num*2*sizeof(u_int32_t), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    list=kmalloc(d->num*2*sizeof(u_int32_t), GFP_KERNEL);
+#endif
+    if (!list) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->data, list, d->num*2*sizeof(u_int32_t))
+#elif __linux__
+        copy_from_user(list, d->data, d->num*2*sizeof(u_int32_t))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    res=0;
+    d->error=sis1100_write_pipe(sc, d->am, 1/*space*/, d->num, list);
+
+    raus:
+#ifdef __NetBSD__
+    free(list, M_IOCTLOPS);
+#elif __linux__
+    kfree(list);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_probe(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int dummy;
+    if (sc->remote_hw!=sis1100_hw_vme) return ENXIO;
+    if (sis1100_tmp_read(sc, *d, fd->vmespace_am,
+	    fd->vmespace_datasize, 1/*space*/, &dummy))
+	return EIO;
+    return 0;
+}
+
+static int
+ioctl_vme_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_read(sc, d->addr, d->am, d->size,
+	    1/*space*/, &d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_write(sc, d->addr, d->am, d->size,
+	    1/*space*/, d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+    int space=1;
+#if 0
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: return ENXIO;
+    case sis1100_hw_pci: space=1; break;
+    case sis1100_hw_vme: space=1; break;
+    case sis1100_hw_camac: space=1; break;
+    case sis1100_hw_f1: space=1; break;
+    case sis1100_hw_vertex: space=1; break;
+    }
+#else
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#endif
+    res=sis1100_read_block(sc, fd, d->size, d->fifo, d->num, &d->num,
+        space, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_vme_super_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_super_block_req* d)
+{
+    struct sis1100_vme_block_req* reqs;
+    int res, i;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#ifdef __NetBSD__
+    reqs=malloc(d->n*sizeof(struct sis1100_vme_block_req), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    reqs=kmalloc(d->n*sizeof(struct sis1100_vme_block_req), GFP_KERNEL);
+#endif
+    if (!reqs) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->reqs, reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_from_user(reqs, d->reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    d->error=0;
+    for (i=0; i<d->n; i++) {
+        struct sis1100_vme_block_req* r=reqs+i;
+	res=sis1100_read_block(sc, fd, r->size, r->fifo, r->num,
+        &r->num, 1/*space*/, r->am, r->addr, r->data, &r->error);
+	if (res) {
+            d->n=i;
+            d->error=res;
+            break;
+        }
+    }
+    res=0;
+    if (
+#ifdef __NetBSD__
+        copyout(reqs, d->reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_to_user(d->reqs, reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) res=EFAULT;
+
+    raus:
+#ifdef __NetBSD__
+    free(reqs, M_IOCTLOPS);
+#elif __linux__
+    kfree(reqs);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_block_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+ 
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_write_block(sc, fd, d->size, d->fifo, d->num,
+        &d->num, 1/*space*/, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_fifomode(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int tmp;
+    tmp=fd->fifo_mode;
+    if (*d>=0) fd->fifo_mode=!!*d;
+    *d=tmp;
+    return 0;
+}
+
+static int
+ioctl_irq_ctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ctl* d)
+{
+    return sis1100_irq_ctl(sc, fd, d);
+}
+
+static int
+ioctl_irq_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_get(sc, fd, d);
+}
+
+static int
+ioctl_irq_ack(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ack* d)
+{
+    return sis1100_irq_ack(sc, fd, d);
+}
+
+static int
+ioctl_irq_wait(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_wait(sc, fd, d);
+}
+
+static int
+ioctl_dma_alloc(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+#ifdef __NetBSD__
+    return sis1100_dma_alloc(sc, fd, d);
+#elif __linux__
+    return ENOTTY;
+#endif
+}
+
+static int
+ioctl_dma_free(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+    /*return sis1100_dma_free(sc, fd, d);*/
+    return ENOTTY;
+}
+#if 0
+static int
+ioctl_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    return sis1100_reset(sc);
+}
+#endif
+
+static int
+ioctl_cccz(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 8, 26), &data);
+pINFO(sc, "CCCZ: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cccc(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 9, 26), &data);
+pINFO(sc, "CCCC: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_ccci(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    u_int32_t data;
+    int res;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis5100writeremreg(sc, camac_sc, *d?1:0x1000, 0);
+
+    /*res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(30, 9, *d?26:24), &data);*/
+pINFO(sc, "CCCI(%d): res=0x%x", *d, res);
+    res=sis5100readremreg(sc, camac_sc, &data, 0);
+pINFO(sc, "CCCI    : data=0x%x, res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cnaf(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_camac_req* d)
+{
+    u_int32_t addr;
+    int res;
+
+    addr=SIS5100_CAMACaddr(d->N, d->A, d->F);
+    if ((d->F&0x18)==0x10) { /* write */
+        res=sis1100_tmp_camacwrite(sc, addr, d->data);
+        d->data=(~res<<24)&0xc0000000;
+        if ((res&~0x2c0)==0) { /* X or Q missing; not an error */
+            res=0;
+        }
+    } else { /* read or control */
+        res=sis1100_tmp_camacread(sc, addr, &d->data);
+        d->data^=0xc0000000;
+    }
+    d->error=res;
+    return 0;
+}
+
+static int
+ioctl_read_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_eeprom_req* d)
+{
+    return sis1100_read_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_write_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+        struct sis1100_eeprom_req* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    return sis1100_write_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_jtag_enable(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    *d<<=8;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_ctrl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrb[1], *d);
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+ioctl_jtag_data(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_data);
+    return 0;
+}
+
+static int
+ioctl_jtag_put(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+_sis1100_ioctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    unsigned int cmd, void* data)
+{
+    int res=0;
+
+    switch (cmd) {
+    case SIS1100_SETVMESPACE:
+        res=ioctl_setvmespace(sc, fd, (struct vmespace*)data); break;
+    case SIS3100_VME_PROBE:
+        res=ioctl_vme_probe(sc, fd, (int*)data); break;
+    case SIS3100_VME_READ:
+        res=ioctl_vme_read(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_WRITE:
+        res=ioctl_vme_write(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_BLOCK_READ:
+        res=ioctl_vme_block_read(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+    case SIS3100_VME_BLOCK_WRITE:
+        res=ioctl_vme_block_write(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+#ifdef SIS1100_NEW_CTRL
+    case SIS1100_CTRL_READ:
+        res=ioctl_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_CTRL_WRITE:
+        res=ioctl_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#else
+    case SIS1100_LOCAL_CTRL_READ:
+        res=ioctl_local_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_LOCAL_CTRL_WRITE:
+        res=ioctl_local_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_READ:
+        res=ioctl_remote_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_WRITE:
+        res=ioctl_remote_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#endif
+    case SIS1100_PIPE:
+        res=ioctl_pipe(sc, fd, (struct sis1100_pipe*)data); break;
+    case SIS1100_MAPSIZE:
+        res=ioctl_mapsize(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_LAST_ERROR:
+        res=ioctl_last_error(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_IDENT:
+        res=ioctl_ident(sc, fd, (struct sis1100_ident*)data); break;
+    case SIS1100_FIFOMODE:
+        res=ioctl_fifomode(sc, fd, (int*)data); break;
+
+    case SIS1100_IRQ_CTL:
+        res=ioctl_irq_ctl(sc, fd, (struct sis1100_irq_ctl*)data); break;
+    case SIS1100_IRQ_GET:
+        res=ioctl_irq_get(sc, fd, (struct sis1100_irq_get*)data); break;
+    case SIS1100_IRQ_ACK:
+        res=ioctl_irq_ack(sc, fd, (struct sis1100_irq_ack*)data); break;
+    case SIS1100_IRQ_WAIT:
+        res=ioctl_irq_wait(sc, fd, (struct sis1100_irq_get*)data); break;
+
+    case SIS1100_MINDMALEN:
+        res=ioctl_mindmalen(sc, fd, (int*)data); break;
+
+    case SIS1100_FRONT_IO:
+        res=ioctl_front_io(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_PULSE:
+        res=ioctl_front_pulse(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_LATCH:
+        res=ioctl_front_latch(sc, fd, (u_int32_t*)data); break;
+
+    case SIS3100_VME_SUPER_BLOCK_READ:
+        res=ioctl_vme_super_block_read(sc, fd,
+                (struct sis1100_vme_super_block_req*)data);
+        break;
+    case SIS1100_WRITE_PIPE:
+        res=ioctl_write_pipe(sc, fd, (struct sis1100_writepipe*)data); break;
+
+    case SIS1100_DMA_ALLOC:
+        res=ioctl_dma_alloc(sc, fd, (struct sis1100_dma_alloc*)data); break;
+    case SIS1100_DMA_FREE:
+        res=ioctl_dma_free(sc, fd, (struct sis1100_dma_alloc*)data); break;
+
+    case SIS5100_CCCZ:
+        res=ioctl_cccz(sc, fd); break;
+    case SIS5100_CCCC:
+        res=ioctl_cccc(sc, fd); break;
+    case SIS5100_CCCI:
+        res=ioctl_ccci(sc, fd, (int*)data); break;
+    case SIS5100_CNAF:
+        res=ioctl_cnaf(sc, fd, (struct sis1100_camac_req*)data); break;
+    case SIS1100_SWAP:
+        res=ioctl_swap(sc, fd, (int*)data); break;
+    case SIS3100_TIMEOUTS:
+        res=ioctl_3100_timeouts(sc, fd, (int*)data); break;
+
+    case SIS1100_DSP_LOAD:
+        res=sis1100_dsp_load(sc, fd, (struct sis1100_dsp_code*)data); break;
+    case SIS1100_DSP_RESET:
+        res=sis1100_dsp_reset(sc, fd); break;
+    case SIS1100_DSP_START:
+        res=sis1100_dsp_start(sc, fd); break;
+
+#if 0
+    case SIS1100_RESET:
+        res=ioctl_reset(sc, fd); break;
+#endif
+    case SIS1100_REMOTE_RESET:
+        res=ioctl_remote_reset(sc, fd); break;
+    case SIS1100_DEVTYPE:
+        res=ioctl_devtype(sc, fd, (int*)data); break;
+    case SIS1100_DRIVERVERSION:
+        res=ioctl_driverversion(sc, fd, (int*)data); break;
+    case SIS1100_READ_EEPROM:
+        res=ioctl_read_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+    case SIS1100_WRITE_EEPROM:
+        res=ioctl_write_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+
+    case SIS1100_JTAG_ENABLE:
+        res=ioctl_jtag_enable(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_CTRL:
+        res=ioctl_jtag_ctrl(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_DATA:
+        res=ioctl_jtag_data(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_PUT:
+        res=ioctl_jtag_put(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_GET:
+        res=ioctl_jtag_get(sc, fd, (u_int32_t*)data); break;
+
+    default:
+        res=ENOTTY; break;
+    }
+    return res;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    fd->p=p;
+    return _sis1100_ioctl(sc, fd, cmd, data);
+}
+#elif __linux__
+
+union alles {
+    struct vmespace                               vmespace;
+    struct sis1100_vme_req                         vme_req;
+    struct sis1100_vme_block_req             vme_block_req;
+    struct sis1100_ctrl_reg                       ctrl_reg;
+    struct sis1100_pipe                               pipe;
+    struct sis1100_ident                             ident;
+    struct sis1100_irq_ctl                         irq_ctl;
+    struct sis1100_irq_get                         irq_get;
+    struct sis1100_irq_ack                  irq_ackirq_ack;
+    struct sis1100_vme_super_block_req vme_super_block_req;
+    struct sis1100_writepipe                     writepipe;
+    struct sis1100_dma_alloc                     dma_alloc;
+    struct sis1100_camac_req                     camac_req;
+    struct sis1100_dsp_code                       dsp_code;
+    struct sis1100_eeprom_req                   eeprom_req;
+};
+
+#define MAX_DATA (sizeof(union alles))
+
+int
+sis1100_ioctl(struct inode *inode, struct file *file,
+	      unsigned int cmd, unsigned long arg)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    u_int8_t data[MAX_DATA];
+    int res;
+
+    if ((cmd&IOC_INOUT) && (_IOC_SIZE(cmd)>MAX_DATA)) {
+        pINFO(sc, "sis1100_ioctl: cmd=0x%08x _IOC_SIZE(cmd)=%d",
+            cmd, _IOC_SIZE(cmd));
+        return -EINVAL;
+    }
+
+    if (cmd&IOC_IN) {
+        if (copy_from_user(&data, (void *)arg, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    if ((res=_sis1100_ioctl(sc, fd, cmd, &data)))
+            return -res;
+
+    if (cmd&IOC_OUT) {
+        if (copy_to_user((void *)arg, &data, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    return 0;
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_read_dma_linux.c#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_read_dma_linux.c#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/#sis1100_read_dma_linux.c#	(revision 22)
@@ -0,0 +1,262 @@
+/* $ZEL: sis1100_read_dma_linux.c,v 1.5 2004/05/27 23:10:31 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+_sis1100_read_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 or 2 */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_error,          /* protocol error (or 0) */
+    int* eot                  /* end of transport indicator */
+    )
+{
+    int res, i, sgcount, aborted=0;
+    u_int32_t head, dmamode;
+    sigset_t oldset;
+#ifdef USE_SGL
+    int nr_pages;
+#else
+    struct kiobuf* iobuf=sc->iobuf;
+    int err, offs;
+#endif
+    /*
+    printk(KERN_ERR "r addr=%d size=%d fifo=%d count=%lld data=%p\n",
+                addr, size, fifo_mode, (unsigned long long)count, data);
+    */
+    count*=size;
+    if (count>DMA_MAX) count=DMA_MAX;
+    /*
+    printk(KERN_ERR "DMA_MAX=%ld count=%lld SGL_SIZE=%d\n",
+            DMA_MAX, (unsigned long long)count, SGL_SIZE);
+    */
+    {
+        u_int32_t val;
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) {
+            printk(KERN_CRIT "sis1100_read_dma: DMACSR0=%04x\n", val);
+            printk(KERN_CRIT "sis1100_read_dma: old DMA still active.\n");
+            return EIO;
+        }
+    }
+
+#ifdef USE_SGL
+    nr_pages=sgl_map_user_pages(sc->sglist, SGL_SIZE, data, count, READ);
+    /*printk(KERN_ERR "R nr_pages=%d\n", nr_pages);*/
+    if (nr_pages<0) {
+        printk(KERN_INFO "sis1100[%d] sgl_map_user_pages failed\n", sc->unit);
+        return -nr_pages;
+    }
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, nr_pages,
+        PCI_DMA_FROMDEVICE/*|0xf000*/);
+    /*printk(KERN_ERR "R sgcount=%d\n", sgcount);*/
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] read_dma: pci_map_sg failed\n", sc->unit);
+        sgl_unmap_user_pages(sc->sglist, nr_pages, 0);
+        return EIO;
+    }
+#else
+    err=map_user_kiobuf(READ, iobuf, (unsigned long)data, count);
+    if (err) {
+        printk(KERN_INFO "sis1100[%d] map_user_kiobuf failed\n", sc->unit);
+        return err;
+    }
+    offs=iobuf->offset;
+    for (i=0; i<iobuf->nr_pages-1; i++) {
+        sc->sglist[i].address=0;
+        sc->sglist[i].page=iobuf->maplist[i];
+        sc->sglist[i].offset=offs;
+        sc->sglist[i].length=PAGE_SIZE-offs;
+        sc->sglist[i].dma_length=0;
+        offs=0;
+    }
+    sc->sglist[i].address=0;
+    sc->sglist[i].page=iobuf->maplist[i];
+    sc->sglist[i].offset=offs;
+    sc->sglist[i].length=iobuf->length-i*PAGE_SIZE+iobuf->offset-offs;
+    sc->sglist[i].dma_length=0;
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, iobuf->nr_pages,
+            PCI_DMA_FROMDEVICE);
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] read_dma: pci_map_sg failed\n",
+            sc->unit);
+        unmap_kiobuf(iobuf);
+        return EIO;
+    }
+#endif
+
+    dmamode=0x43|(1<<7)|(1<<8)|(1<<10)|(1<<11)|(1<<12)|(1<<14)|(1<<17);
+    if (sgcount>1) { /* use scatter/gather mode */
+        struct plx9054_dmadesc* desclist=
+            (struct plx9054_dmadesc*)sc->descbuf.cpu_addr;
+        struct scatterlist* sgl=sc->sglist;
+        dma_addr_t next_handle=sc->descbuf.dma_handle;
+        dmamode|=1<<9;
+        for (i=sgcount; i; i--) {
+            next_handle+=sizeof(struct plx9054_dmadesc);
+            desclist->pcistart=cpu_to_le32(sg_dma_address(sgl));
+            desclist->localstart=cpu_to_le32(0);
+            desclist->size=cpu_to_le32(sg_dma_len(sgl));
+            desclist->next=cpu_to_le32(next_handle|9);
+            desclist++; sgl++;
+        }
+        desclist[-1].next|=2;
+        plxwritereg(sc, DMADPR0, sc->descbuf.dma_handle|1);
+    } else { /* only one page --> use block mode */
+        plxwritereg(sc, DMAPADR0, sg_dma_address(sc->sglist));
+        plxwritereg(sc, DMALADR0, 0);
+        plxwritereg(sc, DMASIZ0, sg_dma_len(sc->sglist));
+        plxwritereg(sc, DMADPR0, 8);
+    }
+
+/* prepare PLX */
+    plxwritereg(sc, DMACSR0_DMACSR1, 1<<3); /* clear irq */
+    plxwritereg(sc, DMAMODE0, dmamode);
+
+/* prepare add on logic */
+    /* 4 Byte, local space 2, BT, EOT, start with t_adl */
+    head=0x0080A002|((0x00f00000<<size)&0x0f000000)|(space&0x3f)<<16;
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    if (fifo_mode) head|=0x4000;
+    sis1100writereg(sc, t_hdr, head);
+    wmb();
+    sis1100writereg(sc, t_dal, count);
+
+    sis1100writereg(sc, d0_bc, 0);
+    sis1100writereg(sc, d0_bc_buf, 0);
+
+    sis1100writereg(sc, p_balance, 0);
+    sis1100writereg(sc, sr, 0x200); /* clear EOT */
+
+/* block signals */
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    oldset = current->blocked;
+    sigfillset(&current->blocked);
+    sigdelset(&current->blocked, SIGKILL);
+    /* dangerous, should be removed later */
+    /*if (!sigismember(&oldset, SIGINT)) sigdelset(&current->blocked, SIGINT);*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+/* enable dma */
+    plxwritereg(sc, DMACSR0_DMACSR1, 3);
+
+/* enable irq */
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, plxirq_dma0, irq_synch_chg|irq_prot_l_err);
+
+/* start transfer */
+    mb();
+    sis1100writereg(sc, t_adl, addr);
+    wmb();
+
+/* wait for dma */
+    res=wait_event_interruptible(
+	sc->local_wait,
+	(sc->got_irqs & (got_dma0|got_sync|got_l_err))
+	);
+    sis1100_disable_irq(sc, plxirq_dma0, irq_prot_l_err);
+/*
+    if (sc->got_irqs&got_dma0) pINFO(sc, "got_dma0");
+    if (sc->got_irqs&got_sync) pINFO(sc, "got_sync");
+    if (sc->got_irqs&got_l_err) pINFO(sc, "got_l_err");
+*/
+    if (sc->got_irqs&(got_dma0|got_l_err)) { /* transfer complete or error */
+        *count_read=sis1100readreg(sc, d0_bc)/size;
+    } else /*(res||(sc->got_irqs&(got_sync)))*/ { /* fatal */
+        aborted=0x300;
+        if (res) {
+            printk(KERN_WARNING "sis1100[%d] read_dma: interrupted\n", sc->unit);
+            aborted|=1;
+        }
+        if (sc->got_irqs&got_sync) {
+            printk(KERN_WARNING "sis1100[%d] read_dma: synchronisation lost\n",
+                    sc->unit);
+            aborted|=2;
+        }
+        if (aborted==0x300) {
+            printk(KERN_CRIT "sis1100[%d] read_dma: got_irqs=0x%x\n",
+                    sc->unit, sc->got_irqs);
+        }
+    }
+    if (!(sc->got_irqs&got_dma0)) {
+        u_int32_t val;
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) { /* DMA not stopped yet; abort it */
+            sis1100writereg(sc, sr, sr_abort_dma);
+            do {
+                val=plxreadreg(sc, DMACSR0_DMACSR1);
+            } while (!(val&0x10));
+        }
+    }
+
+    plxwritereg(sc, DMACSR0_DMACSR1, 0);
+
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    current->blocked = oldset;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+#ifdef USE_SGL
+    pci_unmap_sg(sc->pcidev, sc->sglist, nr_pages, PCI_DMA_FROMDEVICE);
+    sgl_unmap_user_pages(sc->sglist, nr_pages, 1);
+#else
+    pci_unmap_sg(sc->pcidev, sc->sglist, iobuf->nr_pages, PCI_DMA_FROMDEVICE);
+    unmap_kiobuf(iobuf);
+#endif
+
+    *prot_error=sis1100readreg(sc, prot_error);
+    *eot=!!(sis1100readreg(sc, sr)&0x200);
+
+    /*if (aborted) sis1100_dump_glink_status(sc, "after abort", 1);*/
+    if (aborted) sis1100_flush_fifo(sc, "after abort", 0);
+    if (aborted) *prot_error=aborted;
+    if ((*prot_error!=0) && ((*prot_error&0x200)!=0x200)) res=EIO;
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.f1_rem_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.f1_rem_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.f1_rem_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.f1_rem_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=f1_rem_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_f1_rem_init.o /home/luster/sis3100/V2.02/dev/pci/f1_rem_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/f1_rem_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.pcisupport_linux2.4.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.pcisupport_linux2.4.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.pcisupport_linux2.4.o.cmd	(revision 22)
@@ -0,0 +1,273 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.pcisupport_linux2.4.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=pcisupport_linux2.4 -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_pcisupport_linux2.4.o /home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o := \
+  /home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.c \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/module.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/security.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+    $(wildcard include/config/preempt.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/spinlock.h \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/linux/thread_info.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/processor.h \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/cpufeature.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/stringify.h \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+    $(wildcard include/config/pci/msi.h) \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/init.h \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/linux/kref.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/device.h \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+
+/home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.plx9054_reset.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.plx9054_reset.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.plx9054_reset.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.plx9054_reset.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=plx9054_reset -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_plx9054_reset.o /home/luster/sis3100/V2.02/dev/pci/plx9054_reset.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o := \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054_reset.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.ko.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.ko.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.ko.cmd	(revision 22)
@@ -0,0 +1,1 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100.ko := ld -m elf_i386 -r -o /home/luster/sis3100/V2.02/dev/pci/sis1100.ko /home/luster/sis3100/V2.02/dev/pci/sis1100.o /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.mod.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.mod.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.mod.o.cmd	(revision 22)
@@ -0,0 +1,214 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100.mod.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default    -DKBUILD_BASENAME=sis1100 -DKBUILD_MODNAME=sis1100 -DMODULE -c -o /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.c \
+    $(wildcard include/config/module/unload.h) \
+  include/linux/module.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/security.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+    $(wildcard include/config/preempt.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/spinlock.h \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/linux/thread_info.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/processor.h \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/cpufeature.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/stringify.h \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+    $(wildcard include/config/pci/msi.h) \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/init.h \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/linux/kref.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/vermagic.h \
+  include/linux/version.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100.o.cmd	(revision 22)
@@ -0,0 +1,1 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100.o := ld -m elf_i386  -r -o /home/luster/sis3100/V2.02/dev/pci/sis1100.o /home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o /home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o /home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o /home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o /home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o /home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o /home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o /home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o /home/luster/sis3100/V2.02/dev/pci/sis1100_open.o /home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_autoconf_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_autoconf_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_autoconf_linux.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_autoconf_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_autoconf_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_autoconf_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_dsp.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_dsp.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_dsp.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_dsp.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_dsp -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_dsp.o /home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_eeprom.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_eeprom.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_eeprom.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_eeprom.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_eeprom -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_eeprom.o /home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_front_io.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_front_io.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_front_io.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_front_io.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_front_io -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_remote.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_remote.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_remote.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_init_remote.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_init_remote -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_init_remote.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_sdram.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_sdram.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_init_sdram.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_init_sdram.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_init_sdram -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_init_sdram.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_ioctl.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_ioctl.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_ioctl.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_ioctl.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_ioctl -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_ioctl.o /home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_irq.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_irq -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_irq.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_irq.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_handler.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_handler.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_handler.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_irq_handler.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_irq_handler -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_irq_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_thread.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_thread.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_irq_thread.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_irq_thread.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_irq_thread -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_irq_thread.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_lemo_handler.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_lemo_handler.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_lemo_handler.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_lemo_handler.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_lemo_handler -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_lemo_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_llseek_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_llseek_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_llseek_linux.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_llseek_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_llseek_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_llseek_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mbx0_handler.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mbx0_handler.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mbx0_handler.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_mbx0_handler.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_mbx0_handler -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_mbx0_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mmap.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mmap.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_mmap.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_mmap.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_mmap -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_mmap.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_open.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_open.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_open.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_open.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_open.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_open -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_open.o /home/luster/sis3100/V2.02/dev/pci/sis1100_open.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_open.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_open.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_open.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_open.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_open.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_pipe_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_pipe_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_pipe_linux.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_pipe_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_pipe_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_pipe_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_poll.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_poll.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_poll.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_poll.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_poll -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_poll.o /home/luster/sis3100/V2.02/dev/pci/sis1100_poll.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_poll.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_read.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_read.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_read -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_read.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_read.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_block.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_block.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_block.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_read_block.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_read_block -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_read_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_read_dma.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_read_dma -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_read_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_dma_linux.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_read_dma_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_read_dma_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_read_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_loop.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_loop.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_read_loop.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_read_loop.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_read_loop -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_read_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_sgl_map_user_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_sgl_map_user_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_sgl_map_user_linux.o.cmd	(revision 22)
@@ -0,0 +1,304 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_sgl_map_user_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_sgl_map_user_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_sgl_map_user_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.c \
+    $(wildcard include/config/sparc64.h) \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/module.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/security.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+    $(wildcard include/config/preempt.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/spinlock.h \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/linux/thread_info.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/processor.h \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/cpufeature.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/stringify.h \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+    $(wildcard include/config/pci/msi.h) \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/init.h \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/linux/kref.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/version.h \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/device.h \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/pagemap.h \
+  include/linux/highmem.h \
+  include/asm/cacheflush.h \
+  include/asm/highmem.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/asm/tlbflush.h \
+    $(wildcard include/config/x86/invlpg.h) \
+    $(wildcard include/config/x86/switch/pagetables.h) \
+  include/asm/atomic_kmap.h \
+    $(wildcard include/config/debug/highmem.h) \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_synch_handler.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_synch_handler.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_synch_handler.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_synch_handler.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_synch_handler -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_synch_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_read.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_read.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_read.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_tmp_read.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_tmp_read -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_tmp_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_write.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_write.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_tmp_write.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_tmp_write.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_tmp_write -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_tmp_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_block.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_block.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_block.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write_block.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write_block -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write_dma.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write_dma -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma_linux.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma_linux.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_dma_linux.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write_dma_linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write_dma_linux -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_loop.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_loop.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_loop.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write_loop.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write_loop -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_pipe.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_pipe.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100_write_pipe.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100_write_pipe.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100_write_pipe -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100_write_pipe.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_front_io.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_front_io.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_front_io.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100rem_front_io.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100rem_front_io -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis1100rem_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis1100rem_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis1100rem_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis1100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_front_io.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_front_io.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_front_io.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis3100rem_front_io.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis3100rem_front_io -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis3100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis3100rem_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis3100rem_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis3100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_irq.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_irq.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis3100rem_irq.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis3100rem_irq.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis3100rem_irq -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis3100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_front_io.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_front_io.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_front_io.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis5100rem_front_io.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis5100rem_front_io -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis5100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis5100rem_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis5100rem_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis5100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_irq.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_irq.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.sis5100rem_irq.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.sis5100rem_irq.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=sis5100rem_irq -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_sis5100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o := \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.tmp_versions/sis1100.mod
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.tmp_versions/sis1100.mod	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.tmp_versions/sis1100.mod	(revision 22)
@@ -0,0 +1,2 @@
+/home/luster/sis3100/V2.02/dev/pci/sis1100.ko
+/home/luster/sis3100/V2.02/dev/pci/f1_rem_init.o /home/luster/sis3100/V2.02/dev/pci/pcisupport_linux2.4.o /home/luster/sis3100/V2.02/dev/pci/plx9054_reset.o /home/luster/sis3100/V2.02/dev/pci/sis1100_autoconf_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_dsp.o /home/luster/sis3100/V2.02/dev/pci/sis1100_eeprom.o /home/luster/sis3100/V2.02/dev/pci/sis1100_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_remote.o /home/luster/sis3100/V2.02/dev/pci/sis1100_init_sdram.o /home/luster/sis3100/V2.02/dev/pci/sis1100_ioctl.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_irq_thread.o /home/luster/sis3100/V2.02/dev/pci/sis1100_lemo_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_llseek_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mbx0_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_mmap.o /home/luster/sis3100/V2.02/dev/pci/sis1100.mod.o /home/luster/sis3100/V2.02/dev/pci/sis1100_open.o /home/luster/sis3100/V2.02/dev/pci/sis1100_pipe_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_poll.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_read_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis1100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis1100_sgl_map_user_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_synch_handler.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_read.o /home/luster/sis3100/V2.02/dev/pci/sis1100_tmp_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_block.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_dma_linux.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_loop.o /home/luster/sis3100/V2.02/dev/pci/sis1100_write_pipe.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis3100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_front_io.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_init.o /home/luster/sis3100/V2.02/dev/pci/sis5100rem_irq.o /home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.vertex_rem_init.o.cmd
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.vertex_rem_init.o.cmd	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/.vertex_rem_init.o.cmd	(revision 22)
@@ -0,0 +1,306 @@
+cmd_/home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o := gcc -Wp,-MD,/home/luster/sis3100/V2.02/dev/pci/.vertex_rem_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -fno-optimize-sibling-calls  -mregparm=3 -Iinclude/asm-i386/mach-default -DMODULENAME=sis1100  -DMODULE -DKBUILD_BASENAME=vertex_rem_init -DKBUILD_MODNAME=sis1100 -c -o /home/luster/sis3100/V2.02/dev/pci/.tmp_vertex_rem_init.o /home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.c
+
+deps_/home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o := \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.c \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc.h \
+  /home/luster/sis3100/V2.02/dev/pci/compat_linux.h \
+  include/linux/config.h \
+    $(wildcard include/config/h.h) \
+  include/linux/version.h \
+  include/linux/init.h \
+    $(wildcard include/config/modules.h) \
+    $(wildcard include/config/hotplug.h) \
+  include/linux/compiler.h \
+  include/linux/compiler-gcc3.h \
+  include/linux/compiler-gcc.h \
+  include/linux/types.h \
+    $(wildcard include/config/uid16.h) \
+  include/linux/posix_types.h \
+  include/linux/stddef.h \
+  include/asm/posix_types.h \
+  include/asm/types.h \
+    $(wildcard include/config/highmem64g.h) \
+    $(wildcard include/config/lbd.h) \
+  include/linux/pci.h \
+    $(wildcard include/config/pci/names.h) \
+    $(wildcard include/config/pci.h) \
+    $(wildcard include/config/isa.h) \
+    $(wildcard include/config/eisa.h) \
+    $(wildcard include/config/pci/msi.h) \
+    $(wildcard include/config/pci/domains.h) \
+  include/linux/mod_devicetable.h \
+  include/linux/pci_ids.h \
+  include/linux/ioport.h \
+  include/linux/list.h \
+  include/linux/prefetch.h \
+  include/asm/processor.h \
+    $(wildcard include/config/smp.h) \
+    $(wildcard include/config/x86/high/entry.h) \
+    $(wildcard include/config/mk8.h) \
+    $(wildcard include/config/mk7.h) \
+  include/asm/vm86.h \
+  include/asm/math_emu.h \
+  include/asm/sigcontext.h \
+  include/asm/segment.h \
+  include/asm/page.h \
+    $(wildcard include/config/x86/use/3dnow.h) \
+    $(wildcard include/config/x86/pae.h) \
+    $(wildcard include/config/hugetlb/page.h) \
+    $(wildcard include/config/highmem4g.h) \
+    $(wildcard include/config/x86/4g/vm/layout.h) \
+    $(wildcard include/config/discontigmem.h) \
+  include/asm/cpufeature.h \
+  include/linux/bitops.h \
+  include/asm/bitops.h \
+  include/asm/msr.h \
+  include/asm/system.h \
+    $(wildcard include/config/x86/cmpxchg.h) \
+    $(wildcard include/config/x86/oostore.h) \
+  include/linux/kernel.h \
+    $(wildcard include/config/preempt/voluntary.h) \
+    $(wildcard include/config/debug/spinlock/sleep.h) \
+  /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h \
+  include/linux/linkage.h \
+  include/asm/linkage.h \
+    $(wildcard include/config/regparm.h) \
+    $(wildcard include/config/x86/alignment/16.h) \
+  include/asm/byteorder.h \
+    $(wildcard include/config/x86/bswap.h) \
+  include/linux/byteorder/little_endian.h \
+  include/linux/byteorder/swab.h \
+  include/linux/byteorder/generic.h \
+  include/asm/bug.h \
+  include/asm-generic/bug.h \
+  include/linux/cache.h \
+  include/asm/cache.h \
+    $(wildcard include/config/x86/l1/cache/shift.h) \
+  include/linux/threads.h \
+    $(wildcard include/config/nr/cpus.h) \
+  include/linux/errno.h \
+  include/asm/errno.h \
+  include/asm-generic/errno.h \
+  include/asm-generic/errno-base.h \
+  include/linux/device.h \
+  include/linux/kobject.h \
+  include/linux/sysfs.h \
+    $(wildcard include/config/sysfs.h) \
+  include/asm/atomic.h \
+    $(wildcard include/config/m386.h) \
+  include/linux/rwsem.h \
+    $(wildcard include/config/rwsem/generic/spinlock.h) \
+  include/asm/rwsem.h \
+  include/linux/spinlock.h \
+    $(wildcard include/config/preempt.h) \
+    $(wildcard include/config/debug/spinlock.h) \
+    $(wildcard include/config/lockmeter.h) \
+  include/linux/preempt.h \
+  include/linux/thread_info.h \
+  include/asm/thread_info.h \
+    $(wildcard include/config/4kstacks.h) \
+    $(wildcard include/config/debug/stack/usage.h) \
+  include/linux/stringify.h \
+  include/linux/kref.h \
+  include/linux/module.h \
+    $(wildcard include/config/modversions.h) \
+    $(wildcard include/config/module/unload.h) \
+    $(wildcard include/config/kallsyms.h) \
+  include/linux/sched.h \
+    $(wildcard include/config/keys.h) \
+    $(wildcard include/config/schedstats.h) \
+    $(wildcard include/config/numa.h) \
+    $(wildcard include/config/security.h) \
+  include/asm/param.h \
+  include/linux/capability.h \
+  include/linux/timex.h \
+    $(wildcard include/config/time/interpolation.h) \
+  include/asm/timex.h \
+    $(wildcard include/config/x86/elan.h) \
+    $(wildcard include/config/x86/tsc.h) \
+    $(wildcard include/config/x86/generic.h) \
+  include/linux/time.h \
+  include/linux/seqlock.h \
+  include/asm/div64.h \
+  include/linux/jiffies.h \
+  include/linux/rbtree.h \
+  include/linux/cpumask.h \
+    $(wildcard include/config/hotplug/cpu.h) \
+  include/linux/bitmap.h \
+  include/linux/string.h \
+  include/asm/string.h \
+  include/asm/semaphore.h \
+  include/linux/wait.h \
+  include/asm/ptrace.h \
+    $(wildcard include/config/frame/pointer.h) \
+  include/asm/mmu.h \
+  include/linux/smp.h \
+  include/asm/smp.h \
+    $(wildcard include/config/x86/local/apic.h) \
+    $(wildcard include/config/x86/io/apic.h) \
+  include/asm/fixmap.h \
+    $(wildcard include/config/x86/visws/apic.h) \
+    $(wildcard include/config/x86/cyclone/timer.h) \
+    $(wildcard include/config/acpi/boot.h) \
+    $(wildcard include/config/pci/mmconfig.h) \
+  include/asm/acpi.h \
+    $(wildcard include/config/acpi/pci.h) \
+    $(wildcard include/config/acpi/sleep.h) \
+  include/asm/apicdef.h \
+  include/asm/kmap_types.h \
+  include/asm/mpspec.h \
+  include/asm/mpspec_def.h \
+  include/asm-i386/mach-default/mach_mpspec.h \
+  include/asm/io_apic.h \
+  include/asm/apic.h \
+    $(wildcard include/config/x86/good/apic.h) \
+  include/linux/pm.h \
+    $(wildcard include/config/pm.h) \
+  include/linux/sem.h \
+    $(wildcard include/config/sysvipc.h) \
+  include/linux/ipc.h \
+  include/asm/ipcbuf.h \
+  include/asm/sembuf.h \
+  include/linux/signal.h \
+  include/asm/signal.h \
+  include/asm/siginfo.h \
+  include/asm-generic/siginfo.h \
+  include/linux/resource.h \
+  include/asm/resource.h \
+  include/linux/securebits.h \
+  include/linux/fs_struct.h \
+  include/linux/completion.h \
+  include/linux/pid.h \
+  include/linux/percpu.h \
+  include/linux/slab.h \
+    $(wildcard include/config/.h) \
+  include/linux/gfp.h \
+  include/linux/mmzone.h \
+    $(wildcard include/config/force/max/zoneorder.h) \
+  include/linux/numa.h \
+  include/linux/topology.h \
+  include/asm/topology.h \
+  include/asm-generic/topology.h \
+  include/linux/kmalloc_sizes.h \
+    $(wildcard include/config/mmu.h) \
+    $(wildcard include/config/large/allocs.h) \
+  include/asm/percpu.h \
+  include/asm-generic/percpu.h \
+  include/linux/param.h \
+  include/linux/timer.h \
+  include/linux/aio.h \
+  include/linux/workqueue.h \
+  include/linux/aio_abi.h \
+  include/asm/current.h \
+  include/linux/stat.h \
+  include/asm/stat.h \
+  include/linux/kmod.h \
+    $(wildcard include/config/kmod.h) \
+  include/linux/elf.h \
+  include/asm/elf.h \
+  include/asm/user.h \
+  include/asm/desc.h \
+  include/asm/ldt.h \
+  include/linux/utsname.h \
+  include/linux/moduleparam.h \
+  include/asm/local.h \
+  include/asm/module.h \
+    $(wildcard include/config/m486.h) \
+    $(wildcard include/config/m586.h) \
+    $(wildcard include/config/m586tsc.h) \
+    $(wildcard include/config/m586mmx.h) \
+    $(wildcard include/config/m686.h) \
+    $(wildcard include/config/mpentiumii.h) \
+    $(wildcard include/config/mpentiumiii.h) \
+    $(wildcard include/config/mpentiumm.h) \
+    $(wildcard include/config/mpentium4.h) \
+    $(wildcard include/config/mk6.h) \
+    $(wildcard include/config/mcrusoe.h) \
+    $(wildcard include/config/mwinchipc6.h) \
+    $(wildcard include/config/mwinchip2.h) \
+    $(wildcard include/config/mwinchip3d.h) \
+    $(wildcard include/config/mcyrixiii.h) \
+    $(wildcard include/config/mviac3/2.h) \
+  include/linux/dmapool.h \
+  include/asm/io.h \
+    $(wildcard include/config/x86/ppro/fence.h) \
+    $(wildcard include/config/x86/numaq.h) \
+  include/asm-generic/iomap.h \
+  include/linux/vmalloc.h \
+  include/asm/scatterlist.h \
+  include/asm/pci.h \
+  include/linux/mm.h \
+    $(wildcard include/config/sysctl.h) \
+    $(wildcard include/config/stack/growsup.h) \
+    $(wildcard include/config/highmem.h) \
+    $(wildcard include/config/shmem.h) \
+    $(wildcard include/config/proc/fs.h) \
+    $(wildcard include/config/debug/pagealloc.h) \
+    $(wildcard include/config/arch/gate/area.h) \
+  include/linux/prio_tree.h \
+  include/linux/fs.h \
+    $(wildcard include/config/quota.h) \
+    $(wildcard include/config/epoll.h) \
+    $(wildcard include/config/auditsyscall.h) \
+  include/linux/limits.h \
+  include/linux/kdev_t.h \
+  include/linux/ioctl.h \
+  include/asm/ioctl.h \
+  include/linux/dcache.h \
+  include/linux/rcupdate.h \
+  include/linux/radix-tree.h \
+  include/linux/quota.h \
+  include/linux/dqblk_xfs.h \
+  include/linux/dqblk_v1.h \
+  include/linux/dqblk_v2.h \
+  include/linux/nfs_fs_i.h \
+  include/linux/nfs.h \
+  include/linux/sunrpc/msg_prot.h \
+  include/linux/fcntl.h \
+  include/asm/fcntl.h \
+  include/linux/err.h \
+  include/asm/pgtable.h \
+    $(wildcard include/config/highpte.h) \
+  include/asm/mm_track.h \
+    $(wildcard include/config/mem/mirror.h) \
+  include/asm/pgtable-2level-defs.h \
+  include/asm/pgtable-2level.h \
+  include/asm-generic/pgtable.h \
+  include/linux/page-flags.h \
+    $(wildcard include/config/swap.h) \
+  include/asm-generic/pci-dma-compat.h \
+  include/linux/dma-mapping.h \
+  include/asm/dma-mapping.h \
+  include/asm-generic/pci.h \
+  include/linux/interrupt.h \
+  include/linux/hardirq.h \
+  include/linux/smp_lock.h \
+  include/asm/hardirq.h \
+  include/linux/irq.h \
+    $(wildcard include/config/arch/s390.h) \
+  include/asm/irq.h \
+    $(wildcard include/config/irqbalance.h) \
+  include/asm-i386/mach-default/irq_vectors.h \
+  include/asm-i386/mach-default/irq_vectors_limits.h \
+  include/asm/hw_irq.h \
+  include/linux/profile.h \
+    $(wildcard include/config/profiling.h) \
+  include/asm/sections.h \
+  include/asm-generic/sections.h \
+  include/linux/irq_cpustat.h \
+  include/linux/poll.h \
+  include/asm/poll.h \
+  include/asm/uaccess.h \
+    $(wildcard include/config/x86/intel/usercopy.h) \
+    $(wildcard include/config/x86/wp/works/ok.h) \
+    $(wildcard include/config/x86/uaccess/indirect.h) \
+  /home/luster/sis3100/V2.02/dev/pci/plx9054reg.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis3100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis5100_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/f1_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/vertex_map.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_var.h \
+  /home/luster/sis3100/V2.02/dev/pci/sis1100_sc_linux.h \
+
+/home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o: $(deps_/home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o)
+
+$(deps_/home/luster/sis3100/V2.02/dev/pci/vertex_rem_init.o):
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/BUGS
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/BUGS	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/BUGS	(revision 22)
@@ -0,0 +1,7 @@
+sis1100_read_block und sis1100_read_loop werden von read und blockread(ioctl)
+benutzt.
+Fehlermeldung:
+    read: EIO wenn keine Daten gelesen wurden, sonst Anzahl der Daten
+    blockread: Anzahl der Daten, auch wenn 0
+Verhalten zur Zeit: inconsistent
+
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Entries	(revision 22)
@@ -0,0 +1,71 @@
+/BUGS/1.1/Sat Aug 30 21:31:55 2003//
+/Kconfig/1.1/Sat Aug 30 21:31:55 2003//
+/pcisupport_netbsd.h/1.1/Sat Aug 30 21:32:00 2003//
+/plx9054_reset.c/1.1/Sat Aug 30 21:32:01 2003//
+/vme_irq.txt/1.1/Sat Aug 30 21:32:43 2003//
+/sis1100_open.c/1.5/Tue Feb 10 16:29:44 2004//
+/sis1100_write_dma_linux.c/1.2/Tue Feb 10 16:33:35 2004//
+/load_module/1.3/Tue Feb 10 13:28:06 2004//
+/Makefile/1.3/Fri Mar 26 15:47:52 2004//
+/compat_linux.h/1.5/Thu May 27 23:10:12 2004//
+/compat_netbsd.h/1.4/Thu May 27 23:10:12 2004//
+/f1_map.h/1.2/Thu May 27 23:10:14 2004//
+/f1_rem_init.c/1.2/Thu May 27 23:10:15 2004//
+/pcisupport_linux2.4.c/1.3/Thu May 27 23:10:15 2004//
+/plx9054dma_netbsd.c/1.2/Thu May 27 23:10:16 2004//
+/plx9054dma_netbsd.h/1.2/Thu May 27 23:10:16 2004//
+/plx9054reg.h/1.2/Thu May 27 23:10:17 2004//
+/sis1100_autoconf_linux.c/1.5/Thu May 27 23:10:17 2004//
+/sis1100_autoconf_netbsd.c/1.6/Thu May 27 23:10:18 2004//
+/sis1100_dma_alloc_netbsd.c/1.4/Thu May 27 23:10:18 2004//
+/sis1100_dsp.c/1.2/Thu May 27 23:10:19 2004//
+/sis1100_eeprom.c/1.2/Thu May 27 23:10:19 2004//
+/sis1100_front_io.c/1.4/Thu May 27 23:10:20 2004//
+/sis1100_init.c/1.5/Thu May 27 23:10:20 2004//
+/sis1100_init_remote.c/1.7/Thu May 27 23:10:21 2004//
+/sis1100_init_sdram.c/1.2/Thu May 27 23:10:21 2004//
+/sis1100_ioctl.c/1.5/Thu May 27 23:10:22 2004//
+/sis1100_irq.c/1.7/Thu May 27 23:10:23 2004//
+/sis1100_irq_handler.c/1.4/Thu May 27 23:10:23 2004//
+/sis1100_irq_thread.c/1.5/Thu May 27 23:10:24 2004//
+/sis1100_lemo_handler.c/1.3/Thu May 27 23:10:24 2004//
+/sis1100_llseek_linux.c/1.2/Thu May 27 23:10:25 2004//
+/sis1100_map.h/1.4/Thu May 27 23:10:25 2004//
+/sis1100_mbx0_handler.c/1.2/Thu May 27 23:10:26 2004//
+/sis1100_mmap.c/1.4/Thu May 27 23:10:27 2004//
+/sis1100_pipe_linux.c/1.2/Thu May 27 23:10:27 2004//
+/sis1100_pipe_netbsd.c/1.2/Thu May 27 23:10:28 2004//
+/sis1100_poll.c/1.3/Thu May 27 23:10:29 2004//
+/sis1100_read.c/1.5/Thu May 27 23:10:29 2004//
+/sis1100_read_block.c/1.2/Thu May 27 23:10:30 2004//
+/sis1100_read_dma.c/1.3/Thu May 27 23:10:30 2004//
+/sis1100_read_dma_linux.c/1.5/Thu May 27 23:10:31 2004//
+/sis1100_read_dma_netbsd.c/1.3/Thu May 27 23:10:31 2004//
+/sis1100_read_loop.c/1.3/Thu May 27 23:10:32 2004//
+/sis1100_sc.h/1.6/Thu May 27 23:10:32 2004//
+/sis1100_sc_linux.h/1.5/Thu May 27 23:10:33 2004//
+/sis1100_sc_netbsd.h/1.4/Thu May 27 23:10:34 2004//
+/sis1100_sgl_map_user_linux.c/1.2/Thu May 27 23:10:34 2004//
+/sis1100_synch_handler.c/1.4/Thu May 27 23:10:35 2004//
+/sis1100_var.h/1.5/Thu May 27 23:10:37 2004//
+/sis1100_write.c/1.2/Thu May 27 23:10:38 2004//
+/sis1100_write_block.c/1.2/Thu May 27 23:10:38 2004//
+/sis1100_write_dma.c/1.2/Thu May 27 23:10:39 2004//
+/sis1100_write_dma_netbsd.c/1.3/Thu May 27 23:10:39 2004//
+/sis1100_write_loop.c/1.2/Thu May 27 23:10:40 2004//
+/sis1100_write_pipe.c/1.2/Thu May 27 23:10:40 2004//
+/sis1100rem_front_io.c/1.2/Thu May 27 23:10:41 2004//
+/sis1100rem_init.c/1.2/Thu May 27 23:10:41 2004//
+/sis3100_map.h/1.2/Thu May 27 23:10:42 2004//
+/sis3100rem_front_io.c/1.2/Thu May 27 23:10:43 2004//
+/sis3100rem_init.c/1.3/Thu May 27 23:10:44 2004//
+/sis3100rem_irq.c/1.3/Thu May 27 23:10:45 2004//
+/sis5100_map.h/1.2/Thu May 27 23:10:46 2004//
+/sis5100rem_front_io.c/1.2/Thu May 27 23:10:46 2004//
+/sis5100rem_init.c/1.2/Thu May 27 23:10:47 2004//
+/sis5100rem_irq.c/1.2/Thu May 27 23:10:48 2004//
+/vertex_map.h/1.2/Thu May 27 23:10:48 2004//
+/vertex_rem_init.c/1.2/Thu May 27 23:10:49 2004//
+/sis1100_tmp_read.c/1.3/Thu May 27 23:23:28 2004//
+/sis1100_tmp_write.c/1.3/Thu May 27 23:23:28 2004//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/dev/pci
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Kconfig
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Kconfig	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Kconfig	(revision 22)
@@ -0,0 +1,19 @@
+#
+# SIS1100 Configuration
+#
+menu "VME drivers"
+
+config SIS1100
+        depends on PCI
+	tristate "SIS1100 device driver"
+	---help---
+	  By default, the kernel contains no VME device.
+
+	  When in doubt, say Y.
+
+config SIS1100_DMA
+        depends on SIS1100
+	bool "use DMA for SIS1100"
+	---help---
+	  When in doubt, say N.
+endmenu
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/Makefile	(revision 22)
@@ -0,0 +1,37 @@
+# $ZEL: Makefile,v 1.3 2004/02/10 16:36:27 wuestner Exp $
+
+KERNVER := $(shell uname -r)
+#KERNVER := 2.6.0
+
+.PHONY: driver
+
+driver:
+	make -C /lib/modules/$(KERNVER)/build SUBDIRS=$(shell pwd) modules
+
+install:
+	make -C /lib/modules/$(KERNVER)/build SUBDIRS=$(shell pwd) modules_install
+
+MODULENAME := sis1100
+
+ifndef src
+    src:=$(shell pwd)
+endif
+
+SOURCES:=$(notdir $(wildcard $(src)/*.c))
+sis1100-objs := $(patsubst %.c, %.o, $(filter-out %netbsd.c, $(SOURCES)))
+
+ifneq (,$(findstring 2.6.,$(KERNVER)))
+
+EXTRA_CFLAGS += -DMODULENAME=$(MODULENAME)
+
+obj-m += sis1100.o
+#obj-$(CONFIG_SIS1100) += sis1100.o
+
+else
+
+modules: sis1100.o
+
+sis1100.o: $(sis1100-objs)
+	$(LD) -r -o $@ $^
+
+endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_linux.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_linux.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_linux.h	(revision 22)
@@ -0,0 +1,109 @@
+/* $ZEL: compat_linux.h,v 1.5 2004/05/27 23:10:12 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _compat_linux_h_
+#define _compat_linux_h_
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/mm.h>
+#include <linux/poll.h>
+#include <asm/poll.h>
+#include <asm/uaccess.h>
+
+#define ofs(what, elem) ((off_t)&(((what *)0)->elem))
+
+#define _plxreadreg_4(sc, offset) readl((sc)->plxmembase+(offset))
+#define _plxwritereg_4(sc, offset, val) writel(val, (sc)->plxmembase+(offset))
+#define _plxreadreg_1(sc, offset) readb((sc)->plxmembase+(offset))
+#define _plxwritereg_1(sc, offset, val) writeb(val, (sc)->plxmembase+(offset))
+
+#define _plxreadlocal0_4(sc, offset) readl((sc)->reg_base+(offset))
+#define _plxwritelocal0_4(sc, offset, val) writel(val, (sc)->reg_base+(offset))
+#define _plxrawreadlocal0_4(sc, offset) __raw_readl((sc)->reg_base+(offset))
+#define _plxrawwritelocal0_4(sc, offset, val) __raw_writel(val, (sc)->reg_base+(offset))
+
+#define _plxreadlocal1_4(sc, offset) readl((sc)->rem_base+(offset))
+#define _plxwritelocal1_4(sc, offset, val) writel(val, (sc)->rem_base+(offset))
+#define _plxreadlocal1_2(sc, offset) readw((sc)->rem_base+(offset))
+#define _plxwritelocal1_2(sc, offset, val) writew(val, (sc)->rem_base+(offset))
+
+#define pINFOsc(fmt, arg...) \
+    printk(KERN_INFO "sis1100: " fmt "\n" , ## arg)
+#define pINFO(sc, fmt, arg...) \
+    printk(KERN_INFO "sis1100[%d]: " fmt "\n", sc->unit , ## arg)
+#define pERROR(sc, fmt, arg...) \
+    printk(KERN_ERR "sis1100[%d]: " fmt "\n", sc->unit , ## arg)
+
+#define DECLARE_SPINLOCKFLAGS(flags) unsigned long flags;
+#define SPIN_LOCK_IRQSAVE(lock, flags) spin_lock_irqsave(&(lock), flags)
+#define SPIN_UNLOCK_IRQRESTORE(lock, flags) spin_unlock_irqrestore(&(lock), flags)
+
+#define SEM_LOCK(sem) down(&(sem))
+#define SEM_UNLOCK(sem) up(&(sem))
+
+#define ACCESS_OK(buf, count, write) \
+    access_ok(write?VERIFY_READ:VERIFY_WRITE, buf, count)
+
+#define RMB(t, h, o, l) rmb()
+#define WMB(t, h, o, l) wmb()
+#define MB(t, h, o, l) mb()
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
+typedef void irqreturn_t;
+#define IRQ_NONE
+#define IRQ_HANDLED
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#define SIGMASK_LOCK sigmask_lock
+#else
+#define SIGMASK_LOCK sighand->siglock
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+static inline unsigned iminor(struct inode *inode)
+{
+	return MINOR(inode->i_rdev);
+}
+#endif
+
+#define LINUX_RETURN(x) return -(x)
+
+int sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages, 
+        const char* uaddr, size_t count, int rw);
+int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_pages,
+        int dirtied);
+void dump_sgl(struct scatterlist *sgl, int nr_pages);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_netbsd.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_netbsd.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/compat_netbsd.h	(revision 22)
@@ -0,0 +1,168 @@
+/* $ZEL: compat_netbsd.h,v 1.4 2004/05/27 23:10:12 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _compat_netbsd_h_
+#define _compat_netbsd_h_
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+#include <sys/kernel.h>
+#include <sys/device.h>
+#include <sys/ioctl.h>
+#include <sys/fcntl.h>
+#include <sys/select.h>
+#include <sys/poll.h>
+#include <sys/proc.h>
+#include <sys/kthread.h>
+#include <sys/signalvar.h>
+#include <sys/malloc.h>
+#include <sys/buf.h>
+#include <sys/types.h>
+#include <machine/db_machdep.h>
+#include <machine/bus.h>
+#include <machine/intr.h>
+#include <uvm/uvm.h>
+#include <uvm/uvm_extern.h>
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcidevs.h>
+#include <dev/pci/pcireg.h>
+
+#define ofs(what, elem) ((off_t)&(((what *)0)->elem))
+
+#define _plxreadreg_4(sc, offset) \
+    bus_space_read_4(sc->plx_t, sc->plx_h, offset)
+#define _plxwritereg_4(sc, offset, val) \
+    bus_space_write_4(sc->plx_t, sc->plx_h, offset, val)
+
+#define _plxreadreg_1(sc, offset) \
+    bus_space_read_1(sc->plx_t, sc->plx_h, offset)
+#define _plxwritereg_1(sc, offset, val) \
+    bus_space_write_1(sc->plx_t, sc->plx_h, offset, val)
+
+#define _plxreadlocal0_4(sc, offset) \
+    bus_space_read_4(sc->reg_t, sc->reg_h, offset)
+#define _plxwritelocal0_4(sc, offset, val) \
+    bus_space_write_4(sc->reg_t, sc->reg_h, offset, val)
+
+#define _plxreadlocal1_4(sc, offset) \
+    bus_space_read_4(sc->rem_t, sc->rem_h, offset)
+#define _plxwritelocal1_4(sc, offset, val) \
+    bus_space_write_4(sc->rem_t, sc->rem_h, offset, val)
+#define _plxreadlocal1_2(sc, offset) \
+    bus_space_read_2(sc->rem_t, sc->rem_h, offset)
+#define _plxwritelocal1_2(sc, offset, val) \
+    bus_space_write_2(sc->rem_t, sc->rem_h, offset, val)
+
+#define pINFOsc(fmt, arg...) \
+    printf("sis1100: " fmt "\n" , ## arg)
+#define pINFO(sc, fmt, arg...) \
+    printf("%s: " fmt "\n", sc->sc_dev.dv_xname , ## arg)
+#define pERROR(sc, fmt, arg...) \
+    printf("%s: " fmt "\n", sc->sc_dev.dv_xname , ## arg)
+
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+#   undef  __BIG_ENDIAN
+#   define __LITTLE_ENDIAN
+#elif _BYTE_ORDER == _BIG_ENDIAN
+#   undef  __LITTLE_ENDIAN
+#   define __BIG_ENDIAN
+#else
+#   error UNKNOWN ENDIAN (bsd)
+#endif
+
+#define DECLARE_SPINLOCKFLAGS(s) int s;
+#define SPIN_LOCK_IRQSAVE(lock, s) do { \
+            s=splbio(); \
+            simple_lock(&lock); \
+        } while (0)
+#define SPIN_UNLOCK_IRQRESTORE(lock, s) do { \
+            simple_unlock(&lock); \
+            splx(s); \
+        } while (0)
+
+#define SEM_LOCK(sem) lockmgr(&(sem), LK_EXCLUSIVE, 0)
+#define SEM_UNLOCK(sem) lockmgr(&(sem), LK_RELEASE, 0)
+
+#define ACCESS_OK(buf, count, write) \
+    uvm_useracc(buf, count, write?B_READ:B_WRITE)
+
+/*
+ * copied from linux/include/linux/list.h
+ */
+struct list_head {
+	struct list_head *next, *prev;
+};
+
+#define INIT_LIST_HEAD(ptr) do { \
+	(ptr)->next = (ptr); (ptr)->prev = (ptr); \
+} while (0)
+
+static inline void __list_add(struct list_head *new,
+			      struct list_head *prev,
+			      struct list_head *next)
+{
+	next->prev = new;
+	new->next = next;
+	new->prev = prev;
+	prev->next = new;
+}
+
+static inline void
+list_add(struct list_head *new, struct list_head *head)
+{
+	__list_add(new, head, head->next);
+}
+
+static inline void __list_del(struct list_head * prev, struct list_head * next)
+{
+	next->prev = prev;
+	prev->next = next;
+}
+
+static inline void list_del(struct list_head *entry)
+{
+	__list_del(entry->prev, entry->next);
+}
+
+#define container_of(ptr, type, member) ({			\
+        const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+        (type *)( (char *)__mptr - offsetof(type,member) );})
+
+#define list_for_each(pos, head) \
+        for (pos = (head)->next; pos != (head); pos = pos->next)
+
+#define list_entry(ptr, type, member) container_of(ptr, type, member)
+
+typedef int irqreturn_t;
+#define IRQ_NONE 0
+#define IRQ_HANDLED 1
+
+#define LINUX_RETURN(x) return (x)
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_map.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_map.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_map.h	(revision 22)
@@ -0,0 +1,88 @@
+/* $ZEL: f1_map.h,v 1.2 2004/05/27 23:10:14 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _straw_map_h_
+#define _straw_map_h_
+
+struct straw_cm_regs {
+        u_int32_t   ident;
+        u_int32_t   sr;                     /* Status Register */
+#define SR_EVENT        0x0010L
+#define SR_DATA_AVAIL   0x0020L
+#define SR_ATTENT       0x0040L
+
+        u_int32_t   cr;                     /* Control Register, 4 bit */
+/* noch unbenutzt */
+
+        u_int32_t   res1;
+        u_int32_t   jtag_csr;               /* JTAG control/status */
+        u_int32_t   jtag_data;              /* JTAG data */
+};
+
+struct straw_reg {
+    u_int32_t ident;
+    u_int32_t sc;
+    u_int32_t optical_cr;
+    u_int32_t dsp_sc;
+    u_int32_t dummy;
+};
+
+/* bits in in_out */
+#define straw_io_flat_out1 (1<<0)
+#define straw_io_flat_out2 (1<<1)
+#define straw_io_flat_out3 (1<<2)
+#define straw_io_flat_out4 (1<<3)
+#define straw_io_lemo_out1 (1<<4)
+#define straw_io_lemo_out2 (1<<5)
+#define straw_io_lemo_out3 (1<<6)
+/* clear is (io_*_out?)<<16 */
+#define straw_io_flat_in1 (1<<16)
+#define straw_io_flat_in2 (1<<17)
+#define straw_io_flat_in3 (1<<18)
+#define straw_io_flat_in4 (1<<19)
+#define straw_io_lemo_in1 (1<<20)
+#define straw_io_lemo_in2 (1<<21)
+#define straw_io_lemo_in3 (1<<22)
+
+/* bits in dsp_sc */
+#define straw_dsp_run        (1<<8)
+#define straw_dsp_boot_eprom (1<<9)
+#define straw_dsp_boot_ctrl  (1<<11)
+
+#define straw_dsp_available  (1<<24)
+#define straw_dsp_flag0      (1<<28)
+#define straw_dsp_flag1      (1<<29)
+#define straw_dsp_flag2      (1<<30)
+#define straw_dsp_flag3      (1<<31)
+
+/* error codes */
+#define straw_sis3100_re_berr        0x211 /* Bus Error */
+#define straw_sis3100_re_retr        0x212 /* Retry */
+#define straw_sis3100_re_atimeout    0x214 /* Arbitration timeout */
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_rem_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_rem_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/f1_rem_init.c	(revision 22)
@@ -0,0 +1,72 @@
+/* $ZEL: f1_rem_init.c,v 1.2 2004/05/27 23:10:15 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	MPeter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+f1_rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 1
+#define MAX_FV 1
+    u_int32_t hv, fk, fv;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00000100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "f1: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "f1: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pERROR(sc, "f1: remote hw/fw type not supported");
+        return -1;
+    }
+
+    sc->dsp_present=0;
+
+    SEM_LOCK(sc->sem_hw);
+    /*f1_writeremreg(sc, vme_irq_sc, 0x00fe0001, 1);*/ /* disable IRQs */
+    /*f1_readremreg(sc, sc, &stat, 1);*/
+    
+    SEM_UNLOCK(sc->sem_hw);
+
+    /*pINFO(sc, "f1: remote stat=0x%08x", stat);*/
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/load_module
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/load_module	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/load_module	(revision 22)
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# These definitions must match the definitions in sis1100_var.h
+MINORBITS=8
+MINORCARDBITS=2
+MINORTYPEBITS=2
+MINORUSERBITS=`expr $MINORBITS - $MINORCARDBITS - $MINORTYPEBITS`
+# USERBITS overwrites MINORUSERBITS
+USERBITS=1
+
+# minornumber: ccttuuuu
+
+saved_ifs=$IFS
+IFS='. '
+read kern_a kern_b kern_c << END
+`uname -r`
+END
+IFS=$saved_ifs
+
+modulename=sis1100
+
+if [ $kern_b -gt 4 ]; then
+    module=$modulename.ko
+else
+    module=$modulename
+fi
+
+basename=${modulename}_
+devdir=/tmp
+mode=666
+owner=root
+group=root
+
+types0="remote"
+types1="ram"
+types2="ctrl"
+types3="dsp"
+
+mkname () {
+    card=$1
+    type=$2
+    user=$3
+    tname=`eval echo \\\$types$type`
+    name=$devdir/${basename}`printf '%d%d' $card $user`$tname
+    echo $name
+}
+
+shiftv () {
+    val=$1
+    i=$2
+    while [ $i -gt 0 ]; do
+        val=`expr $val \* 2`
+        i=`expr $i - 1`
+    done
+    echo $val
+}
+
+MAXCARDS=`shiftv 1 $MINORCARDBITS`
+#echo MAXCARDS $MAXCARDS
+CARDSHIFT=`expr $MINORUSERBITS + $MINORTYPEBITS`
+TYPESHIFT=$MINORUSERBITS
+MAXTYPES=`shiftv 1 $MINORTYPEBITS`
+#echo MAXTYPES $MAXTYPES
+MAXUSER=`shiftv 1 $USERBITS`
+#echo MAXUSER $MAXUSER
+
+if grep -q $modulename /proc/devices; then
+    echo $modulename already loaded!
+else
+    # invoke insmod or modpobe with all arguments we got
+    if [ -f $module ]; then
+        insmod $module $* || exit 1
+    else
+        modprobe $modulename $* || exit 1
+    fi
+fi
+
+major=`cat /proc/devices | awk "\\$2==\"$modulename\" {print \\$1}"`
+echo major $device: $major
+
+rm -f $devdir/${basename}*
+
+card=`expr $MAXCARDS - 1`
+while [ $card -ge 0 ]; do
+    #echo card $card
+    type=`expr $MAXTYPES - 1`
+        while [ $type -ge 0 ]; do
+            #echo "  " type $type
+            user=`expr $MAXUSER - 1`
+            while [ $user -ge 0 ]; do
+                echo "    " user $user
+                cardbits=`shiftv $card $CARDSHIFT`
+                typebits=`shiftv $type $TYPESHIFT`
+                minorbits=`expr $cardbits + $typebits + $user`
+                #echo "      " bits `printf '%x' $minorbits`
+                name=`mkname $card $type $user`
+                echo mknod $name c $major $minorbits
+                mknod $name c $major $minorbits
+                user=`expr $user - 1`
+            done
+            type=`expr $type - 1`
+        done
+    card=`expr $card - 1`
+done
+
+chown $owner $devdir/${basename}*
+chgrp $group $devdir/${basename}*
+chmod $mode $devdir/${basename}*
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_linux2.4.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_linux2.4.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_linux2.4.c	(revision 22)
@@ -0,0 +1,104 @@
+/* $ZEL: pcisupport_linux2.4.c,v 1.3 2004/05/27 23:10:15 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001
+ * 	Matthias Drochner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <linux/pci.h>
+
+#ifndef MODULENAME
+#define MODULENAME sis1100
+#endif
+
+#define __CONCAT(x,y)	x ## y
+#define __STRING(x)	#x
+#define DEVINITFUNC(mn) __CONCAT(mn, _linux_init)
+#define DEVDONEFUNC(mn) __CONCAT(mn, _linux_done)
+#define DRVINITFUNC(mn) __CONCAT(mn, _linux_drvinit)
+#define DRVDONEFUNC(mn) __CONCAT(mn, _linux_drvdone)
+#define PCITBLNAME(mn) __CONCAT(mn, _table)
+#define MODULINFOFUNC(mn) __CONCAT(mn, _print_info)
+#define __SS(s) __STRING(s)
+
+int DEVINITFUNC(MODULENAME)(struct pci_dev *);
+void DEVDONEFUNC(MODULENAME)(struct pci_dev *);
+int DRVINITFUNC(MODULENAME)(void);
+void DRVDONEFUNC(MODULENAME)(void);
+void MODULINFOFUNC(MODULENAME)(void);
+
+static int
+device_init(struct pci_dev *pdev, const struct pci_device_id *ent)
+{
+	int res;
+
+	res = pci_enable_device (pdev);
+	if (res)
+		return (res);
+	return (DEVINITFUNC(MODULENAME)(pdev));
+}
+
+static void
+device_done(struct pci_dev *pdev)
+{
+	DEVDONEFUNC(MODULENAME)(pdev);
+}
+
+extern struct pci_device_id PCITBLNAME(MODULENAME)[];
+
+static struct pci_driver driver = {
+	name:		__SS(MODULENAME),
+	id_table:	PCITBLNAME(MODULENAME),
+	probe:		device_init,
+	remove:		device_done,
+};
+
+static int __init
+init_pcidrv_module(void)
+{
+    	int res;
+
+    	MODULINFOFUNC(MODULENAME)();
+	res = pci_module_init(&driver);
+	if (res)
+	    return (res);
+
+        return (DRVINITFUNC(MODULENAME)());
+}
+
+static void __exit
+cleanup_pcidrv_module(void)
+{
+    	printk(KERN_INFO __SS(MODULENAME) " exit\n");
+	pci_unregister_driver(&driver);
+	DRVDONEFUNC(MODULENAME)();
+}
+
+module_init(init_pcidrv_module);
+module_exit(cleanup_pcidrv_module);
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_netbsd.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_netbsd.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/pcisupport_netbsd.h	(revision 22)
@@ -0,0 +1,29 @@
+/* $Id: pcisupport_netbsd.h,v 1.1 2003/08/30 21:32:00 wuestner Exp $ */
+/*
+ * Copyright (c) 2001
+ * 	Matthias Drochner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+int pcidev_load(struct cfdata *);
+int pcidev_unload(struct cfdata *);
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054_reset.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054_reset.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054_reset.c	(revision 22)
@@ -0,0 +1,60 @@
+/* $ZEL: plx9054_reset.c,v 1.1 2003/08/30 21:32:01 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001, 2003
+ * 	Willi Erven, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/* only used in initialisation; no need for semaphores */
+
+void sis1100_reset_plx(struct sis1100_softc* sc)
+{
+    u_int32_t conf_3C=0;
+    int c;
+
+/* save value of irq-line, it will be cleared during reset */
+#ifdef __NetBSD__
+    conf_3C=pci_conf_read(sc->sc_pc, sc->sc_pcitag, PCI_INTERRUPT_REG);
+#elif __linux__
+    pci_read_config_dword(sc->pcidev, 0x3c, &conf_3C);
+#endif
+    _plxwritereg_1(sc, 0x6f, 0x40);
+    wmb_plx();
+    _plxwritereg_1(sc, 0x6f, 0x00);
+    wmb_plx();
+    _plxwritereg_1(sc, 0x6f, 0x20);
+    mb_plx();
+    c=0;
+    while ((!(plxreadreg(sc, LAS0RR)) || (c<10)) && (++c<50));
+    _plxwritereg_1(sc, 0x6f, 0x00);
+
+/* restore value of irq-line */
+#ifdef __NetBSD__
+    pci_conf_write(sc->sc_pc, sc->sc_pcitag, PCI_INTERRUPT_REG, conf_3C);
+#elif __linux__
+    pci_write_config_dword(sc->pcidev, 0x3c, conf_3C);
+#endif
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.c	(revision 22)
@@ -0,0 +1,87 @@
+/* $ZEL: plx9054dma_netbsd.c,v 1.2 2004/05/27 23:10:16 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+plx9054_dmaalloc(struct plx9054dma* sc, int maxlen)
+{
+	bus_dma_tag_t dmat = sc->dmat;
+	int res, rsegs;
+
+	sc->nsegs = (maxlen + NBPG - 2) / NBPG + 1;
+#ifdef PLXDEBUG
+	printf("dma: allocating %d descriptors\n", sc->numdescs);
+#endif
+
+	res = bus_dmamem_alloc(dmat, sc->nsegs*16, 16, 0, &sc->descsegs, 1,
+			       &rsegs, 0);
+	if (res) {
+		printf("%s: bus_dmamem_alloc failed\n", sc->devname);
+		return (res);
+	}
+	res = bus_dmamem_map(dmat, &sc->descsegs, 1, sc->nsegs * 16,
+			     (caddr_t *)&sc->descs, 0);
+	if (res) {
+		printf("%s: bus_dmamem_map failed\n", sc->devname);
+		return (res);
+	}
+
+	res = bus_dmamap_create(dmat, sc->nsegs*16, 1, sc->nsegs*16, 0, 0,
+				&sc->descdma);
+	if (res) {
+		printf("%s: bus_dmamap_create failed\n", sc->devname);
+		return (res);
+	}
+	res = bus_dmamap_load(dmat, sc->descdma, sc->descs, sc->nsegs * 16,
+			      NULL, 0);
+	if (res) {
+		printf("%s: bus_dmamap_load failed\n", sc->devname);
+		return (res);
+	}
+
+	res = bus_dmamap_create(dmat, maxlen, sc->nsegs, maxlen, 0,
+				BUS_DMA_WAITOK|BUS_DMA_ALLOCNOW, &sc->userdma);
+	if (res) {
+		printf("%s: bus_dmamap_create failed\n", sc->devname);
+		return (res);
+	}
+        sc->userdma->dm_mapsize=0;
+	return (0);
+}
+
+void
+plx9054_dmafree(struct plx9054dma* sc)
+{
+	if (sc->descdma)
+		bus_dmamap_destroy(sc->dmat, sc->descdma);
+	if (sc->userdma)
+		bus_dmamap_destroy(sc->dmat, sc->userdma);
+	if (sc->descs)
+		bus_dmamem_free(sc->dmat, &sc->descsegs, 1);
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054dma_netbsd.h	(revision 22)
@@ -0,0 +1,50 @@
+/* $ZEL: plx9054dma_netbsd.h,v 1.2 2004/05/27 23:10:16 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _plx9054dma_h_
+#define _plx9054dma_h_
+
+struct plx9054dma {
+        char *devname;
+        bus_space_tag_t iot;
+        bus_space_handle_t ioh;
+        bus_dma_tag_t dmat;
+
+        int nsegs, rsegs;
+        bus_dmamap_t userdma;
+        bus_dma_segment_t descsegs;
+        bus_dma_segment_t segs;
+        struct plx9054_dmadesc *descs; /* kva of descsegs */
+        bus_dmamap_t descdma;
+        caddr_t kva; /* kva of segs */
+};
+
+int plx9054_dmaalloc(struct plx9054dma* sc, int maxlen);
+void plx9054_dmafree(struct plx9054dma* sc);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054reg.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054reg.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/plx9054reg.h	(revision 22)
@@ -0,0 +1,73 @@
+/* $ZEL: plx9054reg.h,v 1.2 2004/05/27 23:10:17 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _plx9054reg_h_
+#define _plx9054reg_h_
+
+struct plx9045reg {
+	u_int32_t LAS0RR, LAS0BA, MARBR, BIGEND_LMISC_PROT_AREA;
+	u_int32_t EROMRR, EROMBA, LBRD0, DMRR;
+	u_int32_t DMLBAM, DMLDAI, DMPBAM, DMCFGA;
+/* 30 */
+	u_int32_t OPQIS, OPQIM, _dummy1, _dummy2;
+/* 40 */
+	u_int32_t IQP, OQP, MBOX2, MBOX3;
+	u_int32_t MBOX4, MBOX5, MBOX6, MBOX7;
+	u_int32_t P2LDBELL, L2PDBELL, INTCSR, CNTRL;
+	u_int32_t PCIHIDR, PCIHREV, MBOX0, MBOX1;
+/* 80 */
+	u_int32_t DMAMODE0, DMAPADR0, DMALADR0, DMASIZ0;
+	u_int32_t DMADPR0, DMAMODE1, DMAPADR1, DMALADR1;
+	u_int32_t DMASIZ1, DMADPR1, DMACSR0_DMACSR1, DMAARB;
+	u_int32_t DMATHR, DMADAC0, DMADAC1, _dummy3;
+/* c0 */
+	u_int32_t MQCR, QBAR, IFHPR, IFTPR;
+	u_int32_t IPHPR, IPTPR, OFHPR, OFTPR;
+	u_int32_t OPHPR, OPTPR, QSR, _dummy4;
+/* f0 */
+	u_int32_t LAS1RR, LAS1BA, LBRD1, DMDAC;
+};
+
+struct plx9054_dmadesc {
+	volatile u_int32_t pcistart, localstart, size, next;
+};
+
+                                /* to clear the interrupt you must ... */
+#define plxirq_mbox     (1<< 3) /* read the mailbox */
+#define plxirq_pci      (1<< 8)
+#define plxirq_doorbell (1<< 9) /* clear the doorbell bits */
+#define plxirq_local    (1<<11) /* clear the local irq source */
+#define plxirq_dma0     (1<<18) /* clear the dma status bits */
+#define plxirq_dma1     (1<<19) /* clear the dma status bits */
+
+#define plxirq_doorbell_active (1<<13)
+#define plxirq_local_active    (1<<15)
+#define plxirq_dma0_active     (1<<21)
+#define plxirq_dma1_active     (1<<22)
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100.mod.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100.mod.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100.mod.c	(revision 22)
@@ -0,0 +1,84 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+#undef unix
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = __stringify(KBUILD_MODNAME),
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+};
+
+static const struct modversion_info ____versions[]
+__attribute_used__
+__attribute__((section("__versions"))) = {
+	{ 0x65b4e613, "struct_module" },
+	{ 0x39681cfa, "device_remove_file" },
+	{ 0x7da8156e, "__kmalloc" },
+	{ 0x87d59f9b, "complete_and_exit" },
+	{ 0x43ca7336, "mem_map" },
+	{ 0x1683aa15, "del_timer" },
+	{ 0x9c72b530, "autoremove_wake_function" },
+	{ 0x6c3397fb, "malloc_sizes" },
+	{ 0xb02b2495, "pci_release_regions" },
+	{ 0xd16ac615, "__get_user_1" },
+	{ 0xda02d67, "jiffies" },
+	{ 0x9925ce9c, "__might_sleep" },
+	{ 0xd7474566, "__copy_to_user_ll" },
+	{ 0x9ef719e7, "remap_page_range" },
+	{ 0x80eca12a, "wait_for_completion" },
+	{ 0xc2669443, "pci_set_master" },
+	{ 0x1af40e18, "__copy_from_user_ll" },
+	{ 0x863d23a3, "pci_set_dma_mask" },
+	{ 0x1b7d4074, "printk" },
+	{ 0x5d1d2e36, "rwsem_wake" },
+	{ 0x1075bf0, "panic" },
+	{ 0x9774eaa5, "dma_free_coherent" },
+	{ 0x3425df38, "pci_bus_write_config_dword" },
+	{ 0x17136545, "mod_timer" },
+	{ 0xe1e0a7ea, "dma_alloc_coherent" },
+	{ 0xe8d95495, "flush_signals" },
+	{ 0xcad363f, "device_create_file" },
+	{ 0x49e79940, "__cond_resched" },
+	{ 0x123d3b6a, "kmem_cache_alloc" },
+	{ 0x3762cb6e, "ioremap_nocache" },
+	{ 0xbf758c44, "pci_bus_read_config_dword" },
+	{ 0xe68b49b8, "get_user_pages" },
+	{ 0x26e96637, "request_irq" },
+	{ 0x4292364c, "schedule" },
+	{ 0xfb6af58d, "recalc_sigpending" },
+	{ 0x6506d836, "register_chrdev" },
+	{ 0x6d172fe6, "pci_unregister_driver" },
+	{ 0xab821cad, "__wake_up" },
+	{ 0x37a0cba, "kfree" },
+	{ 0x932da67e, "kill_proc" },
+	{ 0x2e60bace, "memcpy" },
+	{ 0xd4bde4d6, "pci_request_regions" },
+	{ 0xe419f205, "prepare_to_wait" },
+	{ 0xedc03953, "iounmap" },
+	{ 0xc192d491, "unregister_chrdev" },
+	{ 0xc3d60c67, "put_page" },
+	{ 0x1105e73c, "finish_wait" },
+	{ 0x7e9ebb05, "kernel_thread" },
+	{ 0xd22b546, "__up_wakeup" },
+	{ 0x4888a014, "__get_user_2" },
+	{ 0x25da070, "snprintf" },
+	{ 0xf2520b76, "__down_failed" },
+	{ 0x7a93221b, "pci_enable_device" },
+	{ 0x18076ad, "pci_set_consistent_dma_mask" },
+	{ 0xdc43a9c8, "daemonize" },
+	{ 0xd347765c, "rwsem_down_read_failed" },
+	{ 0xf20dabd8, "free_irq" },
+	{ 0xaaa30118, "pci_register_driver" },
+};
+
+static const char __module_depends[]
+__attribute_used__
+__attribute__((section(".modinfo"))) =
+"depends=";
+
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c	(revision 22)
@@ -0,0 +1,453 @@
+/* $ZEL: sis1100_autoconf_linux.c,v 1.5 2004/05/27 23:10:17 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int sis1100_major = -1;
+
+struct pci_device_id sis1100_table[]={
+    {
+    PCI_VENDOR_FZJZEL, PCI_PRODUCT_FZJZEL_GIGALINK,
+    PCI_ANY_ID, PCI_ANY_ID,
+    0, 0,
+    0
+    },
+    { 0 }
+};
+
+MODULE_AUTHOR("Peter Wuestner <P.Wuestner@fz-juelich.de>");
+MODULE_DESCRIPTION("SIS1100 PCI-VME link/interface (http://zelweb.zel.kfa-juelich.de/projects/gigalink/)");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
+MODULE_SUPPORTED_DEVICE("sis1100/sis3100/sis5100; http://www.struck.de/pcivme.htm");
+
+#define DRIVER_VERSION "2.02 alpha mki"
+
+struct sis1100_softc *sis1100_devdata[sis1100_MAXCARDS];
+
+struct file_operations sis1100_fops = {
+	.owner   = THIS_MODULE,
+	.llseek  = sis1100_llseek,
+	.read    = sis1100_read,
+	.write   = sis1100_write,
+	.ioctl   = sis1100_ioctl,
+	.mmap    = sis1100_mmap,
+        .poll    = sis1100_poll,
+	.open    = sis1100_open,
+	.release = sis1100_release,
+};
+
+/*
+struct module *owner;
+loff_t (*llseek) (struct file *, loff_t, int);
+ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
+ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
+ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
+ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t);
+int (*readdir) (struct file *, void *, filldir_t);
+unsigned int (*poll) (struct file *, struct poll_table_struct *);
+int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
+int (*mmap) (struct file *, struct vm_area_struct *);
+int (*open) (struct inode *, struct file *);
+int (*flush) (struct file *);
+int (*release) (struct inode *, struct file *);
+int (*fsync) (struct file *, struct dentry *, int datasync);
+int (*aio_fsync) (struct kiocb *, int datasync);
+int (*fasync) (int, struct file *, int);
+int (*lock) (struct file *, int, struct file_lock *);
+ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
+ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
+ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void __user *);
+ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
+unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
+*/
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+
+#define dev2pci(d) container_of(d, struct pci_dev, dev)
+#define dev2sc(d) pci_get_drvdata(dev2pci(d))
+
+ssize_t
+show_driver_version(struct device* d, char *buf)
+{
+    return snprintf(buf, PAGE_SIZE, DRIVER_VERSION "\n");
+}
+ssize_t
+show_physaddr_plx(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->plx_addr);
+}
+ssize_t
+show_physaddr_reg(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->reg_addr);
+}
+ssize_t
+show_physaddr_rem(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->rem_addr);
+}
+ssize_t
+show_remote_size(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%x\n", sc->rem_size);
+}
+ssize_t
+show_local_version(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "%d %d %d %d\n",
+        sc->local_ident&0xff,
+        (sc->local_ident>>8)&0xff,
+        (sc->local_ident>>16)&0xff,
+        (sc->local_ident>>24)&0xff);
+}
+ssize_t
+show_remote_version(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    if (sc->remote_hw==sis1100_hw_invalid) {
+        return snprintf(buf, PAGE_SIZE, "0 0 0 0\n");
+    } else {
+        return snprintf(buf, PAGE_SIZE, "%d %d %d %d\n",
+            sc->remote_ident&0xff,
+            (sc->remote_ident>>8)&0xff,
+            (sc->remote_ident>>16)&0xff,
+            (sc->remote_ident>>24)&0xff);
+    }
+}
+
+ssize_t
+dummy_store(struct device* d, const char *buf, size_t count)
+{
+    return 0;
+}
+
+DEVICE_ATTR(driver_version, 0444, show_driver_version, dummy_store);
+DEVICE_ATTR(physaddr_plx, 0444, show_physaddr_plx, dummy_store);
+DEVICE_ATTR(physaddr_reg, 0444, show_physaddr_reg, dummy_store);
+DEVICE_ATTR(physaddr_rem, 0444, show_physaddr_rem, dummy_store);
+DEVICE_ATTR(remote_size, 0444, show_remote_size, dummy_store);
+DEVICE_ATTR(local_version, 0444, show_local_version, dummy_store);
+DEVICE_ATTR(remote_version, 0444, show_remote_version, dummy_store);
+
+#endif /* KERNEL_VERSION >= 2.6.0 */
+
+void __init sis1100_print_info(void)
+{
+    printk(KERN_INFO "SIS1100 driver V" DRIVER_VERSION
+            " (c) 08.Jan.2004 FZ Juelich\n");
+}
+
+int __init
+sis1100_linux_init(struct pci_dev *dev)
+{
+	struct sis1100_softc *sc;
+	int i, idx, res;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	printk(KERN_INFO "sis1100: found %s at %s\n", dev->name, dev->slot_name);
+#else
+	printk(KERN_INFO "sis1100: found sis1100 at %s\n", dev->slot_name);
+#endif
+/*
+        printk(KERN_INFO "vendor=0x%04x\n", dev->vendor);
+        printk(KERN_INFO "device=0x%04x\n", dev->device);
+        printk(KERN_INFO "sub_vendor=0x%04x\n", dev->subsystem_vendor);
+        printk(KERN_INFO "sub_device=0x%04x\n", dev->subsystem_device);
+        printk(KERN_INFO "class=%d\n", dev->class);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+        printk(KERN_INFO "name=>%s<\n", dev->name);
+#else
+        printk(KERN_INFO "name=>%s<\n", dev->dev.name);
+#endif
+        printk(KERN_INFO "slot_name=>%s<\n", dev->slot_name);
+*/
+	for (idx = 0; idx < sis1100_MAXCARDS; idx++) {
+		if (!sis1100_devdata[idx]) break;
+	}
+	if (idx == sis1100_MAXCARDS) return -ENOMEM;
+
+	sc = kmalloc(sizeof(struct sis1100_softc), GFP_KERNEL);
+	if (!sc) return -ENOMEM;
+	sis1100_devdata[idx] = sc;
+	sc->unit = idx;
+
+        for (i=0; i<=sis1100_MINORUTMASK; i++) sc->fdatalist[i]=0;
+
+	init_waitqueue_head(&sc->handler_wait);
+	init_waitqueue_head(&sc->local_wait);
+	init_waitqueue_head(&sc->remoteirq_wait);
+	init_timer(&sc->link_up_timer);
+        sc->link_up_timer.function=sis1100_link_up_handler;
+        sc->link_up_timer.data=(unsigned long)sc;
+
+        init_MUTEX (&sc->sem_hw);
+        init_MUTEX (&sc->sem_fdata_list);
+        spin_lock_init(&sc->lock_intcsr);
+        spin_lock_init(&sc->handlercommand.lock);
+        spin_lock_init(&sc->lock_doorbell);
+        spin_lock_init(&sc->lock_lemo_status);
+        sc->handlercommand.command=0;
+        INIT_LIST_HEAD(&sc->fdata_list_head);
+        init_completion(&sc->handler_completion);
+
+        sc->handler_pid=kernel_thread(sis1100_irq_thread, sc, 0);
+        if (sc->handler_pid<0) {
+            printk(KERN_ERR "create sis1100_irq_handler: %d\n", sc->handler_pid);
+            res=sc->handler_pid;
+            goto fehler_kmalloc_sc;
+        }
+
+        sc->plxmembase=0;
+        sc->reg_base=0;
+        sc->rem_base=0;
+
+	sc->plx_addr = pci_resource_start(dev, 0);
+	sc->plxmemlen = pci_resource_len(dev, 0);
+	sc->plxmembase = ioremap_nocache(sc->plx_addr, sc->plxmemlen);
+        printk(KERN_INFO "sis1100: plx_addr=0x%08lx\n", sc->plx_addr);
+        printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->plxmembase, sc->plxmemlen);
+	if (!sc->plxmembase) {
+            res=-ENOMEM;
+            printk(KERN_ERR "sis1100: can't map plx space\n");
+	    goto fehler_ioremap;
+        }
+	sc->reg_addr = pci_resource_start(dev, 2);
+	sc->reg_size = pci_resource_len(dev, 2);
+	sc->reg_base = ioremap_nocache(sc->reg_addr, sc->reg_size);
+        printk(KERN_INFO "sis1100: reg_addr=0x%08lx\n", sc->reg_addr);
+        printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->reg_base, sc->reg_size);
+	if (!sc->reg_base) {
+	    res=-ENOMEM;
+            printk(KERN_ERR "sis1100: can't map register space\n");
+	    goto fehler_ioremap;
+        }
+	sc->rem_addr = pci_resource_start(dev, 3);
+	sc->rem_size = pci_resource_len(dev, 3);
+        printk(KERN_INFO "sis1100: rem_addr=0x%08lx\n", sc->rem_addr);
+        printk(KERN_INFO "sis1100: rem_size=0x%08lx\n", (unsigned long)sc->rem_size);
+        do {
+	    sc->rem_base = ioremap_nocache(sc->rem_addr, sc->rem_size);
+            if (!sc->rem_base) sc->rem_size>>=1;
+        } while (!sc->rem_base && sc->rem_size);
+	if (sc->rem_base) {
+            printk(KERN_INFO "sis1100: rem_addr=0x%08lx\n", sc->rem_addr);
+            printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->rem_base, sc->rem_size);
+        } else {
+            printk(KERN_WARNING "sis1100: can't map remote space (size=0x%x)\n", sc->rem_size);
+	    printk(KERN_WARNING "sis1100: mmap not available\n");
+            sc->rem_size=0;
+        }
+	res = pci_request_regions(dev, "sis1100");
+	if (res)
+		goto fehler_ioremap;
+
+	res = request_irq(dev->irq, sis1100_intr, SA_SHIRQ, "sis1100", sc);
+	if (res) {
+            printk(KERN_WARNING "sis1100: error installing irq\n");
+	    goto fehler_request_regions;
+        }
+
+	sc->pcidev = dev;
+	pci_set_drvdata(dev, sc);
+
+	pci_set_master(dev);
+
+#if 0
+        sc->no_dma=0;
+        /*if (!pci_set_dma_mask(dev, 0xffffffffffffffff)) {
+            printk(KERN_WARNING "sis1100: 64bit DMA available (but not used yet).\n");
+            sc->dma_dac=1;
+        } else*/ if (!pci_set_dma_mask(dev, 0xffffffff)) {
+            sc->dma_dac=0;
+        } else {
+            printk(KERN_WARNING "sis1100: DMA not available.\n");
+            sc->no_dma=1; /* not used yet */
+        }
+#endif
+        if (pci_set_dma_mask(dev, 0xffffffff)) {
+            printk(KERN_WARNING "sis1100: DMA not available.\n");
+	    goto fehler_request_irq;
+        }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+        pci_set_consistent_dma_mask(dev, 0xffffffff);
+#endif
+
+#ifndef USE_SGL
+        if ((res=alloc_kiovec(1, &sc->iobuf))<0) {
+                sc->iobuf=0;
+                goto fehler_request_irq;
+        }
+#endif
+        sc->descbuf.size=SGL_SIZE*sizeof(struct plx9054_dmadesc);
+        sc->descbuf.cpu_addr=pci_alloc_consistent(sc->pcidev,
+    	        sc->descbuf.size, &sc->descbuf.dma_handle);
+        if (!sc->descbuf.cpu_addr) {
+                printk(KERN_ERR "sis1100: pci_alloc_consistent failed\n");
+                res=-ENOMEM;
+                goto fehler_alloc_kiovec;
+        }
+        /*mem_map_reserve(virt_to_page(sc->descbuf.cpu_addr));*/
+        printk(KERN_INFO "sis1100: descbuf.dma_handle=0x%08llx\n",
+                (unsigned long long)sc->descbuf.dma_handle);
+        /*
+        printk(KERN_INFO "sis1100: descbuf.cpu_addr=0x%08llx\n",
+                (unsigned long long)sc->descbuf.cpu_addr);
+        */
+    	res=-sis1100_init(sc);
+	if (res) {
+	    goto fehler_alloc_descbuf;
+	}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+/* create files for sysfs */
+        device_create_file(&dev->dev, &dev_attr_driver_version);
+        device_create_file(&dev->dev, &dev_attr_physaddr_plx);
+        device_create_file(&dev->dev, &dev_attr_physaddr_reg);
+        device_create_file(&dev->dev, &dev_attr_physaddr_rem);
+        device_create_file(&dev->dev, &dev_attr_remote_size);
+        device_create_file(&dev->dev, &dev_attr_local_version);
+        device_create_file(&dev->dev, &dev_attr_remote_version);
+#endif
+
+    	return 0;
+
+/*fehler_sis1100_init:*/
+        sis1100_done(sc);
+
+fehler_alloc_descbuf:
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+        pci_free_consistent(sc->pcidev, sc->descbuf.size,
+                sc->descbuf.cpu_addr, sc->descbuf.dma_handle);
+
+fehler_alloc_kiovec:
+#ifndef USE_SGL
+        free_kiovec(1, &sc->iobuf);
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+#endif
+
+fehler_request_irq:
+        free_irq(dev->irq, sc);
+
+fehler_request_regions:
+	pci_release_regions(dev);
+
+fehler_ioremap:
+	if (sc->plxmembase) iounmap((void *)sc->plxmembase);
+	if (sc->reg_base) iounmap((void *)sc->reg_base);
+	if (sc->rem_base) iounmap((void *)sc->rem_base);
+
+/*fehler_irq_thread:*/
+	{
+            unsigned long flags;
+            spin_lock_irqsave(&sc->handlercommand.lock, flags);
+            sc->handlercommand.command=handlercomm_die;
+            spin_unlock_irqrestore(&sc->handlercommand.lock, flags);
+            wake_up(&sc->handler_wait);
+            wait_for_completion (&sc->handler_completion);
+	}
+
+fehler_kmalloc_sc:
+	sis1100_devdata[sc->unit] = 0;
+	kfree(sc);
+	pci_set_drvdata(dev, NULL);
+        if (res>=0) {
+            printk(KERN_ERR "sis1100_linux_init: res=%d\n", res);
+            res=-EINVAL;
+        }
+    	return res;
+}
+
+void __exit
+sis1100_linux_done(struct pci_dev *dev)
+{
+	struct sis1100_softc *sc;
+
+	sc = pci_get_drvdata(dev);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+/* delete files from sysfs */
+        device_remove_file(&dev->dev, &dev_attr_driver_version);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_plx);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_reg);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_rem);
+        device_remove_file(&dev->dev, &dev_attr_remote_size);
+        device_remove_file(&dev->dev, &dev_attr_local_version);
+        device_remove_file(&dev->dev, &dev_attr_remote_version);
+#endif
+
+#ifndef USE_SGL
+        free_kiovec(1, &sc->iobuf);
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+#endif
+        pci_free_consistent(sc->pcidev, sc->descbuf.size,
+                sc->descbuf.cpu_addr, sc->descbuf.dma_handle);
+
+	sis1100_done(sc);
+	free_irq(dev->irq, sc);
+	del_timer_sync(&sc->link_up_timer);
+	if (sc->handler_pid>=0) {
+            unsigned long flags;
+            spin_lock_irqsave(&sc->handlercommand.lock, flags);
+            sc->handlercommand.command=handlercomm_die;
+            spin_unlock_irqrestore(&sc->handlercommand.lock, flags);
+            wake_up(&sc->handler_wait);
+            wait_for_completion (&sc->handler_completion);
+	}
+	iounmap((void *)sc->plxmembase);
+	iounmap((void *)sc->reg_base);
+	iounmap((void *)sc->rem_base);
+	sis1100_devdata[sc->unit] = 0;
+
+	kfree(sc);
+	pci_release_regions(dev);
+	pci_set_drvdata(dev, NULL);
+}
+
+int __init
+sis1100_linux_drvinit(void)
+{
+    sis1100_major=register_chrdev(0, "sis1100", &sis1100_fops);
+    if (sis1100_major<0) {
+        printk(KERN_WARNING "sis1100: unable to register device\n");
+        return -EBUSY;
+    }
+    return 0;
+}
+
+void __exit
+sis1100_linux_drvdone(void)
+{
+    unregister_chrdev(sis1100_major, "sis1100");
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c.~1.5.~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c.~1.5.~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_linux.c.~1.5.~	(revision 22)
@@ -0,0 +1,453 @@
+/* $ZEL: sis1100_autoconf_linux.c,v 1.5 2004/05/27 23:10:17 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int sis1100_major = -1;
+
+struct pci_device_id sis1100_table[]={
+    {
+    PCI_VENDOR_FZJZEL, PCI_PRODUCT_FZJZEL_GIGALINK,
+    PCI_ANY_ID, PCI_ANY_ID,
+    0, 0,
+    0
+    },
+    { 0 }
+};
+
+MODULE_AUTHOR("Peter Wuestner <P.Wuestner@fz-juelich.de>");
+MODULE_DESCRIPTION("SIS1100 PCI-VME link/interface (http://zelweb.zel.kfa-juelich.de/projects/gigalink/)");
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
+MODULE_SUPPORTED_DEVICE("sis1100/sis3100/sis5100; http://www.struck.de/pcivme.htm");
+
+#define DRIVER_VERSION "2.02 alpha"
+
+struct sis1100_softc *sis1100_devdata[sis1100_MAXCARDS];
+
+struct file_operations sis1100_fops = {
+	.owner   = THIS_MODULE,
+	.llseek  = sis1100_llseek,
+	.read    = sis1100_read,
+	.write   = sis1100_write,
+	.ioctl   = sis1100_ioctl,
+	.mmap    = sis1100_mmap,
+        .poll    = sis1100_poll,
+	.open    = sis1100_open,
+	.release = sis1100_release,
+};
+
+/*
+struct module *owner;
+loff_t (*llseek) (struct file *, loff_t, int);
+ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
+ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
+ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
+ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t);
+int (*readdir) (struct file *, void *, filldir_t);
+unsigned int (*poll) (struct file *, struct poll_table_struct *);
+int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
+int (*mmap) (struct file *, struct vm_area_struct *);
+int (*open) (struct inode *, struct file *);
+int (*flush) (struct file *);
+int (*release) (struct inode *, struct file *);
+int (*fsync) (struct file *, struct dentry *, int datasync);
+int (*aio_fsync) (struct kiocb *, int datasync);
+int (*fasync) (int, struct file *, int);
+int (*lock) (struct file *, int, struct file_lock *);
+ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
+ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
+ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void __user *);
+ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
+unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
+*/
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+
+#define dev2pci(d) container_of(d, struct pci_dev, dev)
+#define dev2sc(d) pci_get_drvdata(dev2pci(d))
+
+ssize_t
+show_driver_version(struct device* d, char *buf)
+{
+    return snprintf(buf, PAGE_SIZE, DRIVER_VERSION "\n");
+}
+ssize_t
+show_physaddr_plx(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->plx_addr);
+}
+ssize_t
+show_physaddr_reg(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->reg_addr);
+}
+ssize_t
+show_physaddr_rem(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%08lx\n", sc->rem_addr);
+}
+ssize_t
+show_remote_size(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "0x%x\n", sc->rem_size);
+}
+ssize_t
+show_local_version(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    return snprintf(buf, PAGE_SIZE, "%d %d %d %d\n",
+        sc->local_ident&0xff,
+        (sc->local_ident>>8)&0xff,
+        (sc->local_ident>>16)&0xff,
+        (sc->local_ident>>24)&0xff);
+}
+ssize_t
+show_remote_version(struct device* d, char *buf)
+{
+    struct sis1100_softc *sc=dev2sc(d);
+    if (sc->remote_hw==sis1100_hw_invalid) {
+        return snprintf(buf, PAGE_SIZE, "0 0 0 0\n");
+    } else {
+        return snprintf(buf, PAGE_SIZE, "%d %d %d %d\n",
+            sc->remote_ident&0xff,
+            (sc->remote_ident>>8)&0xff,
+            (sc->remote_ident>>16)&0xff,
+            (sc->remote_ident>>24)&0xff);
+    }
+}
+
+ssize_t
+dummy_store(struct device* d, const char *buf, size_t count)
+{
+    return 0;
+}
+
+DEVICE_ATTR(driver_version, 0444, show_driver_version, dummy_store);
+DEVICE_ATTR(physaddr_plx, 0444, show_physaddr_plx, dummy_store);
+DEVICE_ATTR(physaddr_reg, 0444, show_physaddr_reg, dummy_store);
+DEVICE_ATTR(physaddr_rem, 0444, show_physaddr_rem, dummy_store);
+DEVICE_ATTR(remote_size, 0444, show_remote_size, dummy_store);
+DEVICE_ATTR(local_version, 0444, show_local_version, dummy_store);
+DEVICE_ATTR(remote_version, 0444, show_remote_version, dummy_store);
+
+#endif /* KERNEL_VERSION >= 2.6.0 */
+
+void __init sis1100_print_info(void)
+{
+    printk(KERN_INFO "SIS1100 driver V" DRIVER_VERSION
+            " (c) 08.Jan.2004 FZ Juelich\n");
+}
+
+int __init
+sis1100_linux_init(struct pci_dev *dev)
+{
+	struct sis1100_softc *sc;
+	int i, idx, res;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	printk(KERN_INFO "sis1100: found %s at %s\n", dev->name, dev->slot_name);
+#else
+	printk(KERN_INFO "sis1100: found sis1100 at %s\n", dev->slot_name);
+#endif
+/*
+        printk(KERN_INFO "vendor=0x%04x\n", dev->vendor);
+        printk(KERN_INFO "device=0x%04x\n", dev->device);
+        printk(KERN_INFO "sub_vendor=0x%04x\n", dev->subsystem_vendor);
+        printk(KERN_INFO "sub_device=0x%04x\n", dev->subsystem_device);
+        printk(KERN_INFO "class=%d\n", dev->class);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+        printk(KERN_INFO "name=>%s<\n", dev->name);
+#else
+        printk(KERN_INFO "name=>%s<\n", dev->dev.name);
+#endif
+        printk(KERN_INFO "slot_name=>%s<\n", dev->slot_name);
+*/
+	for (idx = 0; idx < sis1100_MAXCARDS; idx++) {
+		if (!sis1100_devdata[idx]) break;
+	}
+	if (idx == sis1100_MAXCARDS) return -ENOMEM;
+
+	sc = kmalloc(sizeof(struct sis1100_softc), GFP_KERNEL);
+	if (!sc) return -ENOMEM;
+	sis1100_devdata[idx] = sc;
+	sc->unit = idx;
+
+        for (i=0; i<=sis1100_MINORUTMASK; i++) sc->fdatalist[i]=0;
+
+	init_waitqueue_head(&sc->handler_wait);
+	init_waitqueue_head(&sc->local_wait);
+	init_waitqueue_head(&sc->remoteirq_wait);
+	init_timer(&sc->link_up_timer);
+        sc->link_up_timer.function=sis1100_link_up_handler;
+        sc->link_up_timer.data=(unsigned long)sc;
+
+        init_MUTEX (&sc->sem_hw);
+        init_MUTEX (&sc->sem_fdata_list);
+        spin_lock_init(&sc->lock_intcsr);
+        spin_lock_init(&sc->handlercommand.lock);
+        spin_lock_init(&sc->lock_doorbell);
+        spin_lock_init(&sc->lock_lemo_status);
+        sc->handlercommand.command=0;
+        INIT_LIST_HEAD(&sc->fdata_list_head);
+        init_completion(&sc->handler_completion);
+
+        sc->handler_pid=kernel_thread(sis1100_irq_thread, sc, 0);
+        if (sc->handler_pid<0) {
+            printk(KERN_ERR "create sis1100_irq_handler: %d\n", sc->handler_pid);
+            res=sc->handler_pid;
+            goto fehler_kmalloc_sc;
+        }
+
+        sc->plxmembase=0;
+        sc->reg_base=0;
+        sc->rem_base=0;
+
+	sc->plx_addr = pci_resource_start(dev, 0);
+	sc->plxmemlen = pci_resource_len(dev, 0);
+	sc->plxmembase = ioremap_nocache(sc->plx_addr, sc->plxmemlen);
+        printk(KERN_INFO "sis1100: plx_addr=0x%08lx\n", sc->plx_addr);
+        printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->plxmembase, sc->plxmemlen);
+	if (!sc->plxmembase) {
+            res=-ENOMEM;
+            printk(KERN_ERR "sis1100: can't map plx space\n");
+	    goto fehler_ioremap;
+        }
+	sc->reg_addr = pci_resource_start(dev, 2);
+	sc->reg_size = pci_resource_len(dev, 2);
+	sc->reg_base = ioremap_nocache(sc->reg_addr, sc->reg_size);
+        printk(KERN_INFO "sis1100: reg_addr=0x%08lx\n", sc->reg_addr);
+        printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->reg_base, sc->reg_size);
+	if (!sc->reg_base) {
+	    res=-ENOMEM;
+            printk(KERN_ERR "sis1100: can't map register space\n");
+	    goto fehler_ioremap;
+        }
+	sc->rem_addr = pci_resource_start(dev, 3);
+	sc->rem_size = pci_resource_len(dev, 3);
+        printk(KERN_INFO "sis1100: rem_addr=0x%08lx\n", sc->rem_addr);
+        printk(KERN_INFO "sis1100: rem_size=0x%08lx\n", (unsigned long)sc->rem_size);
+        do {
+	    sc->rem_base = ioremap_nocache(sc->rem_addr, sc->rem_size);
+            if (!sc->rem_base) sc->rem_size>>=1;
+        } while (!sc->rem_base && sc->rem_size);
+	if (sc->rem_base) {
+            printk(KERN_INFO "sis1100: rem_addr=0x%08lx\n", sc->rem_addr);
+            printk(KERN_INFO "mapped at %p (size=0x%x)\n", sc->rem_base, sc->rem_size);
+        } else {
+            printk(KERN_WARNING "sis1100: can't map remote space (size=0x%x)\n", sc->rem_size);
+	    printk(KERN_WARNING "sis1100: mmap not available\n");
+            sc->rem_size=0;
+        }
+	res = pci_request_regions(dev, "sis1100");
+	if (res)
+		goto fehler_ioremap;
+
+	res = request_irq(dev->irq, sis1100_intr, SA_SHIRQ, "sis1100", sc);
+	if (res) {
+            printk(KERN_WARNING "sis1100: error installing irq\n");
+	    goto fehler_request_regions;
+        }
+
+	sc->pcidev = dev;
+	pci_set_drvdata(dev, sc);
+
+	pci_set_master(dev);
+
+#if 0
+        sc->no_dma=0;
+        /*if (!pci_set_dma_mask(dev, 0xffffffffffffffff)) {
+            printk(KERN_WARNING "sis1100: 64bit DMA available (but not used yet).\n");
+            sc->dma_dac=1;
+        } else*/ if (!pci_set_dma_mask(dev, 0xffffffff)) {
+            sc->dma_dac=0;
+        } else {
+            printk(KERN_WARNING "sis1100: DMA not available.\n");
+            sc->no_dma=1; /* not used yet */
+        }
+#endif
+        if (pci_set_dma_mask(dev, 0xffffffff)) {
+            printk(KERN_WARNING "sis1100: DMA not available.\n");
+	    goto fehler_request_irq;
+        }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+        pci_set_consistent_dma_mask(dev, 0xffffffff);
+#endif
+
+#ifndef USE_SGL
+        if ((res=alloc_kiovec(1, &sc->iobuf))<0) {
+                sc->iobuf=0;
+                goto fehler_request_irq;
+        }
+#endif
+        sc->descbuf.size=SGL_SIZE*sizeof(struct plx9054_dmadesc);
+        sc->descbuf.cpu_addr=pci_alloc_consistent(sc->pcidev,
+    	        sc->descbuf.size, &sc->descbuf.dma_handle);
+        if (!sc->descbuf.cpu_addr) {
+                printk(KERN_ERR "sis1100: pci_alloc_consistent failed\n");
+                res=-ENOMEM;
+                goto fehler_alloc_kiovec;
+        }
+        /*mem_map_reserve(virt_to_page(sc->descbuf.cpu_addr));*/
+        printk(KERN_INFO "sis1100: descbuf.dma_handle=0x%08llx\n",
+                (unsigned long long)sc->descbuf.dma_handle);
+        /*
+        printk(KERN_INFO "sis1100: descbuf.cpu_addr=0x%08llx\n",
+                (unsigned long long)sc->descbuf.cpu_addr);
+        */
+    	res=-sis1100_init(sc);
+	if (res) {
+	    goto fehler_alloc_descbuf;
+	}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+/* create files for sysfs */
+        device_create_file(&dev->dev, &dev_attr_driver_version);
+        device_create_file(&dev->dev, &dev_attr_physaddr_plx);
+        device_create_file(&dev->dev, &dev_attr_physaddr_reg);
+        device_create_file(&dev->dev, &dev_attr_physaddr_rem);
+        device_create_file(&dev->dev, &dev_attr_remote_size);
+        device_create_file(&dev->dev, &dev_attr_local_version);
+        device_create_file(&dev->dev, &dev_attr_remote_version);
+#endif
+
+    	return 0;
+
+/*fehler_sis1100_init:*/
+        sis1100_done(sc);
+
+fehler_alloc_descbuf:
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+        pci_free_consistent(sc->pcidev, sc->descbuf.size,
+                sc->descbuf.cpu_addr, sc->descbuf.dma_handle);
+
+fehler_alloc_kiovec:
+#ifndef USE_SGL
+        free_kiovec(1, &sc->iobuf);
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+#endif
+
+fehler_request_irq:
+        free_irq(dev->irq, sc);
+
+fehler_request_regions:
+	pci_release_regions(dev);
+
+fehler_ioremap:
+	if (sc->plxmembase) iounmap((void *)sc->plxmembase);
+	if (sc->reg_base) iounmap((void *)sc->reg_base);
+	if (sc->rem_base) iounmap((void *)sc->rem_base);
+
+/*fehler_irq_thread:*/
+	{
+            unsigned long flags;
+            spin_lock_irqsave(&sc->handlercommand.lock, flags);
+            sc->handlercommand.command=handlercomm_die;
+            spin_unlock_irqrestore(&sc->handlercommand.lock, flags);
+            wake_up(&sc->handler_wait);
+            wait_for_completion (&sc->handler_completion);
+	}
+
+fehler_kmalloc_sc:
+	sis1100_devdata[sc->unit] = 0;
+	kfree(sc);
+	pci_set_drvdata(dev, NULL);
+        if (res>=0) {
+            printk(KERN_ERR "sis1100_linux_init: res=%d\n", res);
+            res=-EINVAL;
+        }
+    	return res;
+}
+
+void __exit
+sis1100_linux_done(struct pci_dev *dev)
+{
+	struct sis1100_softc *sc;
+
+	sc = pci_get_drvdata(dev);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+/* delete files from sysfs */
+        device_remove_file(&dev->dev, &dev_attr_driver_version);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_plx);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_reg);
+        device_remove_file(&dev->dev, &dev_attr_physaddr_rem);
+        device_remove_file(&dev->dev, &dev_attr_remote_size);
+        device_remove_file(&dev->dev, &dev_attr_local_version);
+        device_remove_file(&dev->dev, &dev_attr_remote_version);
+#endif
+
+#ifndef USE_SGL
+        free_kiovec(1, &sc->iobuf);
+        /*mem_map_unreserve(virt_to_page(sc->descbuf.cpu_addr));*/
+#endif
+        pci_free_consistent(sc->pcidev, sc->descbuf.size,
+                sc->descbuf.cpu_addr, sc->descbuf.dma_handle);
+
+	sis1100_done(sc);
+	free_irq(dev->irq, sc);
+	del_timer_sync(&sc->link_up_timer);
+	if (sc->handler_pid>=0) {
+            unsigned long flags;
+            spin_lock_irqsave(&sc->handlercommand.lock, flags);
+            sc->handlercommand.command=handlercomm_die;
+            spin_unlock_irqrestore(&sc->handlercommand.lock, flags);
+            wake_up(&sc->handler_wait);
+            wait_for_completion (&sc->handler_completion);
+	}
+	iounmap((void *)sc->plxmembase);
+	iounmap((void *)sc->reg_base);
+	iounmap((void *)sc->rem_base);
+	sis1100_devdata[sc->unit] = 0;
+
+	kfree(sc);
+	pci_release_regions(dev);
+	pci_set_drvdata(dev, NULL);
+}
+
+int __init
+sis1100_linux_drvinit(void)
+{
+    sis1100_major=register_chrdev(0, "sis1100", &sis1100_fops);
+    if (sis1100_major<0) {
+        printk(KERN_WARNING "sis1100: unable to register device\n");
+        return -EBUSY;
+    }
+    return 0;
+}
+
+void __exit
+sis1100_linux_drvdone(void)
+{
+    unregister_chrdev(sis1100_major, "sis1100");
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_autoconf_netbsd.c	(revision 22)
@@ -0,0 +1,320 @@
+/* $ZEL: sis1100_autoconf_netbsd.c,v 1.6 2004/05/27 23:10:18 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <dev/pci/sis1100_sc.h>
+
+struct sis1100_softc *sis1100_devdata[sis1100_MAXCARDS];
+
+struct cdevsw sis1100cdevsw = {
+	sis1100_open,
+	sis1100_close,
+	sis1100_read,
+	sis1100_write,
+	sis1100_ioctl,
+	(dev_type_stop((*))) enodev,
+	0,
+	sis1100_poll,
+	sis1100_mmap,
+	0
+};
+
+#if __NetBSD_Version__ < 106000000
+struct cfdriver sis1100cfdriver = {
+	NULL,
+	"sis1100_",
+	DV_DULL,
+	0
+};
+#else
+struct cfdriver {
+	LIST_ENTRY(cfdriver) cd_list;	/* link on allcfdrivers */
+	struct cfattachlist cd_attach;	/* list of all attachments */
+	void	**cd_devs;		/* devices found */
+	const char *cd_name;		/* device name */
+	enum	devclass cd_class;	/* device classification */
+	int	cd_ndevs;		/* size of cd_devs array */
+	const char * const *cd_attrs;	/* attributes for this device */
+};
+#endif
+
+int sis1100match(struct device *, struct cfdata *, void *);
+void sis1100attach(struct device *, struct device *, void *);
+int sis1100detach(struct device *, int);
+
+int sis1100intr(void *);
+
+struct cfattach sis1100cfattach = {
+	sizeof(struct sis1100_softc),
+	sis1100match,
+	sis1100attach,
+	sis1100detach,
+	0
+};
+
+int sis1100locs[] = {-1, -1};
+extern const char *pcicf_locnames[];
+
+struct cfdata sis1100cfdata = {
+	&sis1100cfattach,
+	&sis1100cfdriver,
+	0,
+	FSTATE_STAR,
+	sis1100locs,
+	0,
+	NULL,
+	pcicf_locnames
+};
+
+int
+sis1100match(parent, match, aux)
+	struct device *parent;
+	struct cfdata *match;
+	void *aux;
+{
+#define MIN_FV 5
+#define MAX_FV 7
+
+	struct pci_attach_args *pa = aux;
+        int revision;
+	bus_space_tag_t reg_t;
+	bus_space_handle_t reg_h;
+	bus_size_t reg_size;
+        u_int32_t ident;
+        int hw_type, hw_ver, fw_code, fw_ver;
+
+	if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_FZJZEL ||
+	    PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_FZJZEL_GIGALINK)
+	        return (0);
+        
+        revision=PCI_REVISION(pci_conf_read(pa->pa_pc, pa->pa_tag,
+                PCI_CLASS_REG));
+        if (revision!=1) {
+                printf("sis1100: pci_revision=%d\n", revision);
+	        return (0);
+        }
+
+	if (pci_mapreg_map(pa, 0x18, PCI_MAPREG_TYPE_MEM, 0,
+	    &reg_t, &reg_h, NULL, &reg_size)) {
+		printf("sis1100: can't map register space\n");
+		return 0;
+	}
+        ident=bus_space_read_4(reg_t, reg_h, ofs(struct sis1100_reg, ident));
+        printf("sis1100: ident=0x%08x\n", ident);
+        bus_space_unmap(reg_t, reg_h, reg_size);
+        hw_type= ident     &0xff;
+        hw_ver =(ident>> 8)&0xff;
+        fw_code=(ident>>16)&0xff;
+        fw_ver =(ident>>24)&0xff;
+        if (hw_type!=1) {
+                printf("sis1100: wrong hw_type %d\n", hw_type);
+		return 0;
+        }
+        if (hw_ver!=1) {
+                printf("sis1100: wrong hw_version %d\n", hw_ver);
+		return 0;
+        }
+        if (fw_code!=1) {
+                printf("sis1100: wrong fw_code %d\n", fw_code);
+		return 0;
+        }
+        if (fw_ver<MIN_FV) {
+                printf("sis1100: Firmware version (%d) too old;"
+                        " at least version %d is required.\n", fw_ver, MIN_FV);
+		return 0;
+        }
+        if (fw_ver>MAX_FV) {
+                printf("sis1100: Firmware version (%d) too new;"
+                    "Driver not tested with"
+                    " versions greater than %d.\n", fw_ver, MAX_FV);
+        }
+	return (1);
+#undef MIN_FV
+#undef MAX_FV
+}
+
+void
+sis1100attach(parent, self, aux)
+	struct device *parent, *self;
+	void *aux;
+{
+	struct sis1100_softc *sc = (void *)self;
+	struct pci_attach_args *pa = aux;
+	pci_chipset_tag_t pc = pa->pa_pc;
+	int i;
+	pci_intr_handle_t ih;
+	const char *intrstr = NULL;
+
+        printf("\n");
+#if 0
+        printf("MINORBITS    =%d\n", sis1100_MINORBITS);
+        printf("MINORCARDBITS=%d\n", sis1100_MINORCARDBITS);
+        printf("MAXCARDS     =%d\n", sis1100_MAXCARDS);
+        printf("MINORUSERBITS=%d\n", sis1100_MINORUSERBITS);
+        printf("MINORCARDMASK=0x%08x\n",sis1100_MINORCARDMASK );
+        printf("MINORTYPEMASK=0x%08x\n", sis1100_MINORTYPEMASK);
+        printf("MINORUSERMASK=0x%08x\n", sis1100_MINORUSERMASK);
+        printf("MINORUTMASK  =0x%08x\n", sis1100_MINORUTMASK);
+        printf("sc=%p\n", sc);
+        printf("clearing fdatalist[0..%d]\n", sis1100_MINORUTMASK+1);
+#endif
+        for (i=0; i<=sis1100_MINORUTMASK; i++) sc->fdatalist[i]=0;
+
+	if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_MEM, 0,
+	    &sc->plx_t, &sc->plx_h, NULL, &sc->plx_size)) {
+		printf("%s: can't map plx space\n", sc->sc_dev.dv_xname);
+                sc->plx_size=0;
+		return;
+	}
+
+	if (pci_mapreg_map(pa, 0x18, PCI_MAPREG_TYPE_MEM, 0,
+	    &sc->reg_t, &sc->reg_h, &sc->reg_addr, &sc->reg_size)) {
+		printf("%s: can't map register space\n", sc->sc_dev.dv_xname);
+                sc->reg_size=0;
+		return;
+	}
+
+	if (pci_mapreg_map(pa, 0x1c, PCI_MAPREG_TYPE_MEM, 0,
+	    &sc->rem_t, &sc->rem_h, &sc->rem_addr, &sc->rem_size)) {
+		printf("%s: can't map remote space\n", sc->sc_dev.dv_xname);
+		printf("%s: mmap not available\n", sc->sc_dev.dv_xname);
+                sc->rem_size=0;
+	}
+
+        pINFO(sc, "reg_addr=0x%08x, reg_size=%ld",
+            (unsigned int)sc->reg_addr, sc->reg_size);
+        pINFO(sc, "rem_addr=0x%08x, rem_size=%ld",
+            (unsigned int)sc->rem_addr, sc->rem_size);
+
+/*
+        {
+        int rev;
+	rev = PCI_REVISION(pci_conf_read(pc, pa->pa_tag, PCI_CLASS_REG));
+	printf("%s: PCI revision %d\n", sc->sc_dev.dv_xname, rev);
+        }
+*/
+#ifdef NEVER
+        {
+        pcitag_t bridgetag;
+        int i;
+
+        bridgetag=pci_make_tag(pc, 0, 18, 0);
+        for (i=0; i<0x40; i+=4) {
+            pcireg_t x=pci_conf_read(pc, bridgetag, i);
+            printf("bridge[%02x]: 0x%08x\n", i, x);
+        }
+        }
+#endif
+	sc->sc_pc = pc;
+	sc->sc_pcitag = pa->pa_tag;
+        sc->sc_dmat=pa->pa_dmat;
+
+        simple_lock_init(&sc->lock_intcsr);
+        simple_lock_init(&sc->lock_sc_inuse);
+        lockinit(&sc->sem_hw, 0, "sem_hw", 0, 0);
+        lockinit(&sc->sem_fdata_list, 0, "sem_fdata_list", 0, 0);
+
+        callout_init(&sc->link_up_timer);
+
+        simple_lock_init(&sc->handlercommand.lock);
+        sc->handlercommand.command=0;
+        INIT_LIST_HEAD(&sc->fdata_list_head);
+        kthread_create1(sis1100_irq_thread, sc, &sc->vmeirq_pp, "%s", "sis1100_irq");
+        simple_lock_init(&sc->remoteirq_wait);
+        simple_lock_init(&sc->local_wait);
+
+        sc->sc_dma.devname=sc->sc_dev.dv_xname;
+        sc->sc_dma.iot=sc->plx_t;
+        sc->sc_dma.ioh=sc->plx_h;
+        sc->sc_dma.dmat=pa->pa_dmat;
+
+        if (plx9054_dmaalloc(&sc->sc_dma, MAX_DMA_LEN))
+                return;
+
+	if (sis1100_init(sc)) {
+                printf("%s: cannot initialize device\n", sc->sc_dev.dv_xname);
+                return;
+        }
+
+	/* Map and establish the interrupt. */
+	if (pci_intr_map(pc, pa->pa_intrtag, pa->pa_intrpin,
+			 pa->pa_intrline, &ih)) {
+		printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
+		return;
+	}
+	intrstr = pci_intr_string(pc, ih);
+
+	sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, sis1100_intr, sc);
+	if (sc->sc_ih == NULL) {
+		printf("%s: couldn't establish interrupt",
+		       sc->sc_dev.dv_xname);
+		if (intrstr != NULL)
+			printf(" at %s", intrstr);
+		printf("\n");
+		return;
+	}
+	printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
+}
+
+int
+sis1100detach(self, flags)
+	struct device *self;
+	int flags;
+{
+	struct sis1100_softc *sc = (void *)self;
+        int i;
+
+	if (sc->sc_inuse)
+		return (EBUSY);
+
+	sis1100_done(sc);
+        callout_stop(&sc->link_up_timer);
+
+        simple_lock(&sc->handlercommand.lock);
+        sc->handlercommand.command=handlercomm_die;
+        wakeup(&sc->handler_wait);
+        /* XXX PNORELOCK??? */
+        ltsleep(sc, PCATCH|PNORELOCK, "terminate_sync", 0,
+            &sc->handlercommand.lock);
+
+        for (i=0; i<=sis1100_MINORUTMASK; i++) {
+                if (sc->fdatalist[i]) free(sc->fdatalist[i], M_DEVBUF);
+        }
+
+	if (sc->sc_ih)
+		pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
+
+        plx9054_dmafree(&sc->sc_dma);
+
+	if (sc->plx_size)
+		bus_space_unmap(sc->plx_t, sc->plx_h, sc->plx_size);
+	if (sc->reg_size)
+		bus_space_unmap(sc->reg_t, sc->reg_h, sc->reg_size);
+	if (sc->rem_size)
+		bus_space_unmap(sc->rem_t, sc->rem_h, sc->rem_size);
+	return (0);
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dma_alloc_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dma_alloc_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dma_alloc_netbsd.c	(revision 22)
@@ -0,0 +1,160 @@
+/* $ZEL: sis1100_dma_alloc_netbsd.c,v 1.4 2004/05/27 23:10:18 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__)
+#error Invalid Operating System
+#endif
+
+/*
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/device.h>
+#include <sys/select.h>
+#include <sys/malloc.h>
+#include <sys/callout.h>
+#include <sys/signalvar.h>
+#include <sys/kernel.h>
+#include <vm/vm.h>
+
+#include <dev/pci/pcivar.h>
+#include <dev/pci/pcidevs.h>
+
+#include <dev/pci/sis1100_var.h>
+#include <dev/pci/sis1100_sc.h>
+*/
+
+#if 0
+paddr_t
+sis1100_mmap(dev_t dev, off_t off, int prot)
+{
+    struct sis1100_softc *sc = SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    paddr_t addr=0;
+
+    switch (fd->subdev) {
+        case sis1100_subdev_remote:
+            if (off>=sc->rem_size)
+                return -1;
+            addr=i386_btop(sc->rem_addr+off);
+            break;
+        case sis1100_subdev_ram:
+            return -1;
+        case sis1100_subdev_ctrl:
+            if (off<sc->reg_size) {
+                addr=i386_btop(sc->reg_addr+off);
+            } else { /* mapped for DMA in userspace ? */
+                if ((off>=fd->mmapdma.off) &&
+                                (off-fd->mmapdma.off<fd->mmapdma.size))
+                    addr=bus_dmamem_mmap(fd->mmapdma.dmat,
+                            &fd->mmapdma.segs, 1,
+                            off-fd->mmapdma.off,
+                            VM_PROT_READ|VM_PROT_WRITE,
+                            BUS_DMA_WAITOK|BUS_DMA_COHERENT);
+                else
+                    return -1;
+            }
+            break;
+        case sis1100_subdev_dsp:
+            return -1;
+    }
+    /*
+    printf("mmap(dev=%d, %lld): 0x%08x\n", fd->subdev, off, (unsigned int)addr);
+    */
+    return addr;
+}
+#endif
+
+int
+sis1100_dma_alloc(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+    int rsegs, res;
+
+    if (fd->mmapdma.valid) {
+        pINFO(sc, "mmapdma already valid");
+        return EINVAL;
+    }
+
+    fd->mmapdma.dmat=sc->sc_dmat;
+    fd->mmapdma.size=d->size;
+    fd->mmapdma.off=i386_round_page(sc->reg_size);
+
+    res=bus_dmamem_alloc(fd->mmapdma.dmat, fd->mmapdma.size, 0, 0,
+             &fd->mmapdma.segs, 1, &rsegs, BUS_DMA_WAITOK);
+    if (res) {
+        printf("%s: dmamem_alloc(%d) failed\n", sc->sc_dev.dv_xname, d->size);
+        return res;
+    }
+
+    res=bus_dmamem_map(fd->mmapdma.dmat, &fd->mmapdma.segs, 1,
+            fd->mmapdma.size, &fd->mmapdma.kva,
+            BUS_DMA_WAITOK|BUS_DMA_COHERENT);
+    if (res) {
+        printf("%s: bus_dmamem_map(%ld) failed\n", sc->sc_dev.dv_xname,
+                fd->mmapdma.size);
+        return res;
+    }
+
+    res=bus_dmamap_create(fd->mmapdma.dmat, fd->mmapdma.size, 1,
+             fd->mmapdma.size, 0, BUS_DMA_WAITOK,
+             &fd->mmapdma.dm);
+    if (res) {
+        printf("%s: bus_dmamap_create(%ld) failed\n", sc->sc_dev.dv_xname,
+                fd->mmapdma.size);
+        return res;
+    }
+
+    res=bus_dmamap_load(fd->mmapdma.dmat, fd->mmapdma.dm, fd->mmapdma.kva,
+             fd->mmapdma.size, NULL, BUS_DMA_WAITOK);
+    if (res) {
+        printf("%s: bus_dmamap_load(%ld) failed\n", sc->sc_dev.dv_xname,
+                fd->mmapdma.size);
+        return res;
+    }
+    fd->mmapdma.valid=1;
+    d->size=fd->mmapdma.size;
+    d->offset=fd->mmapdma.off;
+    d->dma_addr=fd->mmapdma.segs.ds_addr;
+    pINFO(sc, "%ld bytes for DMA mapped", fd->mmapdma.size);
+    return 0;
+}
+
+int
+sis1100_dma_free(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+    if (!fd->mmapdma.valid) return 0;
+    fd->mmapdma.valid=0;
+    bus_dmamap_destroy(fd->mmapdma.dmat, fd->mmapdma.dm);
+    bus_dmamem_unmap(fd->mmapdma.dmat, fd->mmapdma.kva, fd->mmapdma.size);
+    bus_dmamem_free(fd->mmapdma.dmat, &fd->mmapdma.segs, 1);
+    pINFO(sc, "%ld bytes for DMA unmapped", fd->mmapdma.size);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dsp.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dsp.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_dsp.c	(revision 22)
@@ -0,0 +1,127 @@
+/* $ZEL: sis1100_dsp.c,v 1.2 2004/05/27 23:10:19 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+int
+sis1100_dsp_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    int error;
+
+    if (!sc->dsp_present) return ENXIO;
+    switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            SEM_LOCK(sc->sem_hw);
+            error=sis3100writeremreg(sc, dsp_sc, sis3100_dsp_boot_ctrl, 1);
+            if (!error) error=sis3100writeremreg(sc, dsp_sc, sis3100_dsp_run<<16, 1);
+            SEM_UNLOCK(sc->sem_hw);
+            break;
+        case sis1100_hw_camac:
+            SEM_LOCK(sc->sem_hw);
+            error=sis5100writeremreg(sc, dsp_sc, sis5100_dsp_boot_ctrl, 1);
+            if (!error) error=sis5100writeremreg(sc, dsp_sc, sis5100_dsp_run<<16, 1);
+            SEM_UNLOCK(sc->sem_hw);
+            break;
+        default:
+            return ENOTTY;
+    }
+/*
+    if (error) {
+        pINFO(sc, "dsp_reset: error=0x%x", error);
+        return EIO;
+    }
+*/
+    return error?EIO:0;
+}
+
+int
+sis1100_dsp_start(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    int error;
+
+    if (!sc->dsp_present) return ENXIO;
+    switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            error=sis3100writeremreg(sc, dsp_sc, sis3100_dsp_run, 0);
+            break;
+        case sis1100_hw_camac:
+            error=sis5100writeremreg(sc, dsp_sc, sis5100_dsp_run, 0);
+            break;
+        default:
+            return ENOTTY;
+    }
+    return error?EIO:0;
+}
+
+#define SHARCRAM  0x81200000
+#define D48REG    0x81300000
+
+int
+sis1100_dsp_load(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dsp_code* d)
+{
+    u_int8_t* code=d->src;
+    u_int8_t v[6];
+    u_int32_t addr, w0, w12;
+    int error=0, i, j;
+
+    if (!sc->dsp_present) return ENXIO;
+if (sc->remote_hw!=sis1100_hw_vme) return ENXIO;
+
+    if (d->dst%4) return EINVAL;
+    if (d->size%6) return EINVAL;
+
+    addr=d->dst+SHARCRAM;
+    for (i=d->size/6; i && !error; i--) {
+        for (j=0; j<6; j++) {
+#ifdef __NetBSD__
+            v[j]=fubyte(code);
+#elif __linux__
+            get_user(v[j], code);
+#endif
+            code++;
+        }
+#if 0
+        pINFO("%08x %02x%02x%02x%02x%02x%02x",
+                (addr-SHARCRAM)>>2,
+                v[0], v[1], v[2], v[3], v[4], v[5]);
+#endif
+        w0=v[5]|(v[4]<<8);
+        w12=(v[3] | (v[2]<<8) | (v[1]<<16) | (v[0]<<24));
+        SEM_LOCK(sc->sem_hw);
+        error=sis1100_remote_reg_write(sc, D48REG, w0, 1);
+        error|=sis1100_remote_reg_write(sc, addr, w12, 1);
+        SEM_UNLOCK(sc->sem_hw);
+        addr+=4;
+    }
+    return error?EIO:0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_eeprom.c	(revision 22)
@@ -0,0 +1,255 @@
+/* $ZEL: sis1100_eeprom.c,v 1.2 2004/05/27 23:10:19 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+/*
+Procedures in this file are used to read and write the serial EEPROM
+(FAIRCHILD NM93CS66) which holds values for PLX-Initialisation.
+
+!!Modification of the EEPROM content can render the SIS1100 unusable!!
+*/
+
+#define EEP_L16 0x80                    // length of 16 bit words (2048 Bit)
+#define EEP_L8          (2*EEP_L16)     // length of bytes
+
+#define EEP_C           0x01            // Clock
+#define EEP_S           0x02            // Select
+#define EEP_D           0x04            // Data Out
+#define EEP_Q           0x08            // Data In
+#define EEP_P           0x10            // EEPROM Present
+#define EEP_ALEN        8               // Address Field
+
+#define EEPROM (ofs(struct plx9045reg, CNTRL)+3)
+
+static void
+clock_eeprom(struct sis1100_softc* sc)
+{
+        u_int32_t tmp;
+        u_int i;
+
+        for (i=0; i < 2; i++) {
+                tmp=_plxreadreg_1(sc, EEPROM);
+                _plxwritereg_1(sc, EEPROM, tmp|=EEP_C);
+        }
+        for (i=0; i < 2; i++) {
+                tmp=_plxreadreg_1(sc, EEPROM);
+                _plxwritereg_1(sc, EEPROM, tmp & ~EEP_C);
+        }
+}
+
+static void
+deselect_eeprom(struct sis1100_softc* sc)
+{
+        u_int32_t tmp;
+        u_int i;
+
+        for (i=0; i < 5; i++) {
+                tmp=_plxreadreg_1(sc, EEPROM);
+                _plxwritereg_1(sc, EEPROM, tmp & 0xF0);
+        }
+        clock_eeprom(sc);
+}
+
+static void
+setup_eeprom(struct sis1100_softc* sc,
+        int len,        /* # of bits */
+        u_int32_t val   /* bit pattern */
+        )
+{
+        u_int32_t epv;  /* base value */
+        u_int32_t mx;
+
+        mx=1L <<(len-1);
+        deselect_eeprom(sc);
+        epv =(_plxreadreg_1(sc, EEPROM) & 0xF0) |EEP_S;            /* select */
+        _plxwritereg_1(sc, EEPROM, epv);
+        clock_eeprom(sc);
+
+        do {
+                if (!(val & mx)) {
+                        /* reset D(ata), reset C(lock) */
+                        _plxwritereg_1(sc, EEPROM, epv);
+                } else {
+                        /* set D(ata), reset C(lock) */
+                        _plxwritereg_1(sc, EEPROM, epv|EEP_D);
+                }
+
+                clock_eeprom(sc);
+
+                mx >>=1;
+        } while (mx);
+}
+
+static void
+setup_eeprom1(struct sis1100_softc* sc, u_int8_t command, u_int8_t address)
+{
+        u_int32_t val;
+
+        val=(1<<2|command)<<EEP_ALEN|address;
+        setup_eeprom(sc, EEP_ALEN+3, val);
+}
+
+static void
+setup_eeprom2(struct sis1100_softc* sc, u_int8_t command, u_int8_t address,
+        u_int16_t data)
+{
+        u_int32_t val;
+
+        val=((1<<2|command)<<EEP_ALEN|address)<<16|data;
+        setup_eeprom(sc, EEP_ALEN+19, val);
+}
+
+static u_int16_t
+read_eeprom_word(struct sis1100_softc* sc, u_int8_t addr)
+{
+        u_int32_t tmp;
+        u_int16_t mx;
+        int i;
+
+        setup_eeprom1(sc, 6, addr);
+
+        /* select, float the EEDO pin for read */
+        tmp=_plxreadreg_1(sc, EEPROM);
+        _plxwritereg_1(sc, EEPROM, tmp|EEP_D|EEP_S);
+
+        tmp=_plxreadreg_1(sc, EEPROM); /* dummy bit */
+
+        for (i=0, mx=0; i<16; i++) {
+                clock_eeprom(sc);
+                mx <<=1;
+                tmp=_plxreadreg_1(sc, EEPROM);
+                if ((tmp & EEP_Q) != 0) mx |=1;
+
+        }
+
+        deselect_eeprom(sc);
+        return mx;
+}
+
+int
+sis1100_read_eeprom(struct sis1100_softc* sc,
+        u_int8_t num, u_int8_t addr, u_int16_t* data)
+{
+        u_int32_t tmp;
+        u_int16_t mx;
+        int i, n, res=0;
+
+        setup_eeprom1(sc, 6, addr);
+
+        /* select, float the EEDO pin for read */
+        tmp=_plxreadreg_1(sc, EEPROM);
+        _plxwritereg_1(sc, EEPROM, tmp|EEP_D|EEP_S);
+
+        tmp=_plxreadreg_1(sc, EEPROM); /* dummy bit */
+        if (tmp & EEP_Q) {
+                deselect_eeprom(sc);
+                pINFO(sc, "read_eeprom 0x%x: select error", addr);
+                return EIO;
+        }
+
+        for (n=0; n<num; n++) {
+            for (i=0, mx=0; i<16; i++) {
+                    clock_eeprom(sc);
+                    mx <<=1;
+                    tmp=_plxreadreg_1(sc, EEPROM);
+                    if ((tmp & EEP_Q) != 0) mx |=1;
+
+            }
+#ifdef __NetBSD__
+	    res=susword(data, mx)?EFAULT:0;
+#elif __linux__
+	    res=-put_user(mx, data);
+#endif
+            if (res) break;
+            data++;
+        }
+
+        deselect_eeprom(sc);
+        return res;
+}
+
+int
+sis1100_write_eeprom(struct sis1100_softc* sc,
+        u_int8_t num, u_int8_t addr, u_int16_t* data)
+{
+        u_int32_t tmp;
+        u_int16_t mx, omx;
+        int n, res=0;
+
+        /* enable write */
+        setup_eeprom1(sc, 0, 0xc0);
+        deselect_eeprom(sc);
+
+        for (n=0; n<num; n++) {
+#ifdef __NetBSD__
+            {
+            int x=fusword(data);
+	    res=(x==-1)?EFAULT:0;
+            mx=x;
+            }
+#elif __linux__
+	    res=-get_user(mx, data);
+#endif
+            if (res) break;
+
+            omx=read_eeprom_word(sc, addr);
+            if (omx!=mx) {
+                int i=10000;
+
+                setup_eeprom2(sc, 1, addr, mx);
+                deselect_eeprom(sc);
+
+                /* select, float the EEDO pin for read */
+                for (i=0; i<4; i++) {
+                    tmp=_plxreadreg_1(sc, EEPROM);
+                    _plxwritereg_1(sc, EEPROM, tmp|EEP_D|EEP_S);
+                }
+
+                do {
+                    tmp=_plxreadreg_1(sc, EEPROM);
+                } while (--i && !(tmp & EEP_Q));
+                /*pINFO(sc, "write_eeprom: i=%d", i);*/
+                if (!(tmp & EEP_Q)) {
+                    pINFO(sc, "write_eeprom: timeout");
+                }
+                deselect_eeprom(sc);
+            }
+            data++; addr++;
+        }
+
+        /* disable write */
+        setup_eeprom1(sc, 0, 0);
+        deselect_eeprom(sc);
+
+        return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_front_io.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_front_io.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_front_io.c	(revision 22)
@@ -0,0 +1,160 @@
+/* $ZEL: sis1100_front_io.c,v 1.4 2004/05/27 23:10:20 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * pseudoregister front_io:
+ * bit write function        read function
+ * 27  res pci_led_1         free
+ * 26  res pci_led_0         free
+ * 25  res pci_lemo_out_1    status pci_lemo_in_1
+ * 24  res pci_lemo_out_0    status pci_lemo_in_0
+ * 11  set pci_led_1         status pci_led_1
+ * 10  set pci_led_0         status pci_led_0
+ *  9  set pci_lemo_out_1    status pci_lemo_out_1
+ *  8  set pci_lemo_out_0    status pci_lemo_out_0
+ */
+/*
+ * set_pci_lemo_out_?=0x00000300
+ * res_pci_lemo_out_?=0x03000000
+ * set_pci_led_?     =0x00000c00
+ * res_pci_led_?     =0x0c000000
+ */
+
+/*
+ * sis1100_front_io
+ *   sis1100rem_front_io
+ *   sis3100rem_front_io
+ *   sis5100rem_front_io
+ * 
+ * sis1100_front_pulse
+ *   sis1100rem_front_pulse
+ *   sis3100rem_front_pulse
+ *   sis5100rem_front_pulse
+ * 
+ * sis1100_front_latch
+ *   sis1100rem_front_latch
+ *   sis3100rem_front_latch
+ *   sis5100rem_front_latch
+ */
+
+int
+sis1100_front_io(struct sis1100_softc* sc, u_int32_t* data, int locked)
+{
+    u_int32_t opt1100, _data;
+
+    if (!locked) SEM_LOCK(sc->sem_hw);
+
+    opt1100=sis1100readreg(sc, opt_csr);
+
+    _data = ((opt1100&0xf0)<<4) |  /* 1100 lemo out and led */
+            ((opt1100&0x300)<<16); /* 1100 lemo in */
+
+    opt1100&=0xff;
+    opt1100&=~((*data>>20) & 0xf0);
+    opt1100|=(*data>>4) & 0xf0;
+    sis1100writereg(sc, opt_csr, opt1100);
+
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: break;
+    case sis1100_hw_pci:
+        sis1100rem_front_io(sc, data);
+        break;
+    case sis1100_hw_vme:
+        sis3100rem_front_io(sc, data);
+        break;
+    case sis1100_hw_camac:
+        sis5100rem_front_io(sc, data);
+        break;
+    case sis1100_hw_f1: break;
+    case sis1100_hw_vertex: break;
+    default:
+        pINFO(sc, "front_io: remote_hw %d not known", sc->remote_hw);
+    }
+
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+    *data|=_data;
+    return 0;
+}
+
+int
+sis1100_front_pulse(struct sis1100_softc* sc, u_int32_t* data, int locked)
+{
+    if (!locked) SEM_LOCK(sc->sem_hw);
+
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: break;
+    case sis1100_hw_pci: break;
+    case sis1100_hw_vme:
+        sis3100rem_front_pulse(sc, data);
+        break;
+    case sis1100_hw_camac: break;
+    case sis1100_hw_f1: break;
+    case sis1100_hw_vertex: break;
+    default:
+        pINFO(sc, "front_pulse: remote_hw %d not known", sc->remote_hw);
+    }
+
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+
+    return 0;
+}
+
+int
+sis1100_front_latch(struct sis1100_softc* sc, u_int32_t* data, int locked)
+{
+    if (!locked) SEM_LOCK(sc->sem_hw);
+
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: break;
+    case sis1100_hw_pci: break;
+    case sis1100_hw_vme:
+        sis3100rem_front_latch(sc, data);
+        break;
+    case sis1100_hw_camac: break;
+    case sis1100_hw_f1: break;
+    case sis1100_hw_vertex: break;
+    default:
+        pINFO(sc, "front_latch: remote_hw %d not known", sc->remote_hw);
+    }
+
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+
+    return 0;
+}
+/*
+void
+_front_pulse(struct sis1100_softc* sc, u_int32_t data)
+{
+    u_int32_t opt1100;
+    opt1100=sis1100readreg(sc, opt_csr)&0xf;
+    opt1100|=(data<<4)&0xf0;
+    sis1100writereg(sc, opt_csr, opt1100);
+}
+*/
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init.c	(revision 22)
@@ -0,0 +1,270 @@
+/* $ZEL: sis1100_init.c,v 1.5 2004/05/27 23:10:20 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+void
+sis1100_dump_glink_status(struct sis1100_softc* sc, char* text, int locked)
+{
+    u_int32_t v;
+    if (!locked) SEM_LOCK(sc->sem_hw);
+    pINFO(sc, "%s:", text);
+    pINFO(sc, "  ident       =%08x", sis1100readreg(sc, ident));
+    pINFO(sc, "  sr          =%08x", sis1100readreg(sc, sr));
+    pINFO(sc, "  cr          =%08x", sis1100readreg(sc, cr));
+    pINFO(sc, "  t_hdr       =%08x", sis1100readreg(sc, t_hdr));
+    pINFO(sc, "  t_am        =%08x", sis1100readreg(sc, t_am));
+    pINFO(sc, "  t_adl       =%08x", sis1100readreg(sc, t_adl));
+    pINFO(sc, "  t_dal       =%08x", sis1100readreg(sc, t_dal));
+    pINFO(sc, "  tc_hdr      =%08x", sis1100readreg(sc, tc_hdr));
+    pINFO(sc, "  tc_dal      =%08x", sis1100readreg(sc, tc_dal));
+    pINFO(sc, "  p_balance   =%08x", sis1100readreg(sc, p_balance));
+    pINFO(sc, "  prot_error  =%08x", sis1100readreg(sc, prot_error));
+    pINFO(sc, "  d0_bc       =%08x", sis1100readreg(sc, d0_bc));
+    pINFO(sc, "  d0_bc_buf   =%08x", sis1100readreg(sc, d0_bc_buf));
+    pINFO(sc, "  d0_bc_blen  =%08x", sis1100readreg(sc, d0_bc_blen));
+    pINFO(sc, "  d_hdr       =%08x", sis1100readreg(sc, d_hdr));
+    pINFO(sc, "  d_am        =%08x", sis1100readreg(sc, d_am));
+    pINFO(sc, "  d_adl       =%08x", sis1100readreg(sc, d_adl));
+    pINFO(sc, "  d_bc        =%08x", sis1100readreg(sc, d_bc));
+    pINFO(sc, "  rd_pipe_buf =%08x", sis1100readreg(sc, rd_pipe_buf));
+    pINFO(sc, "  rd_pipe_blen=%08x", sis1100readreg(sc, rd_pipe_blen));
+    pINFO(sc, "");
+    v=sis1100readreg(sc, opt_csr);
+    pINFO(sc, "  opt_csr     =%08x", v);
+    sis1100writereg(sc, opt_csr, v&0xc0f50000);
+    pINFO(sc, "  opt_csr     =%08x", sis1100readreg(sc, opt_csr));
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+}
+
+int
+sis1100_flush_fifo(struct sis1100_softc* sc, const char* text, int silent)
+{
+    u_int32_t sr, special, data;
+    int count=0;
+
+    sis1100writereg(sc, cr, cr_transparent);
+    mb_reg();
+    sr=sis1100readreg(sc, sr);
+    while (sr&(sr_tp_special|sr_tp_data)) {
+        while (sr&sr_tp_data) {
+            data=sis1100readreg(sc, tp_data);
+            if (!silent) pINFO(sc, "data   =          0x%08x\n", data);
+            sr=sis1100readreg(sc, sr);
+            count++;
+            if (count>100) {
+                sis1100writereg(sc, cr, cr_transparent<<16);
+                pINFO(sc, "too many data in fifo; giving up");
+                return -1;
+            }
+        }
+        while ((sr&(sr_tp_special|sr_tp_data))==sr_tp_special) {
+            special=sis1100readreg(sc, tp_special);
+            if (!silent) pINFO(sc, "special=0x%08x\n", special);
+            sr=sis1100readreg(sc, sr);
+            count++;
+            if (count>100) {
+                sis1100writereg(sc, cr, cr_transparent<<16);
+                pINFO(sc, "too many data in fifo; giving up");
+                return -1;
+            }
+        }
+        if ((!silent) && (count>100)) {
+            pINFO(sc, "too many data in fifo; switching to 'silent'");
+            silent=1;
+        }
+        if (count>10000) {
+            sis1100writereg(sc, cr, cr_transparent<<16);
+            pINFO(sc, "too many data in fifo; giving up");
+            return -1;
+        }
+    }
+    sis1100writereg(sc, cr, cr_transparent<<16);
+    if (count && silent)
+        pINFO(sc, "flushed %d words from fifo", count);
+    return 0;
+}
+
+static void
+sis1100_set_swapping(struct sis1100_softc* sc, int swap)
+{
+    u_int32_t tmp;
+
+    /*pINFO(sc, "set swap to %d", swap);*/
+    tmp=plxreadreg(sc, BIGEND_LMISC_PROT_AREA);
+    if (swap) {
+        sis1100writereg(sc, cr, 0x8);
+        plxwritereg(sc, BIGEND_LMISC_PROT_AREA, tmp|(3<<6));
+    } else {
+        sis1100writereg(sc, cr, 0x80000);
+        plxwritereg(sc, BIGEND_LMISC_PROT_AREA, tmp&~(3<<6));
+    }
+}
+
+void
+sis1100_update_swapping(struct sis1100_softc* sc, const char* caller)
+{
+    int swap;
+#if defined(__LITTLE_ENDIAN)
+    int local_endian=0;
+#elif defined(__BIG_ENDIAN)
+    int local_endian=1;
+#else
+#   error UNKNOWN ENDIAN
+#endif
+
+    /*
+    pINFO(sc, "local endian is %s; remote endian is %s; user swap is %d "
+    "(called from %s)",
+        local_endian?"big":"little",
+        sc->remote_endian?"big":"little",
+        sc->user_wants_swap,
+        caller);
+    */
+
+    swap=0;
+    if (local_endian) swap=!swap;
+    if (sc->remote_endian) swap=!swap;
+    if (sc->user_wants_swap) swap=!swap;
+    sis1100_set_swapping(sc, swap);
+}
+
+int
+sis1100_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 5
+#define MAX_FV 7
+
+    u_int32_t typ, hv, fk, fv;
+    int res, i;
+
+    sc->local_ident=sis1100readreg(sc, ident);
+    typ=sc->local_ident&0xff;
+    hv=(sc->local_ident>>8)&0xff;
+    fk=(sc->local_ident>>16)&0xff;
+    fv=(sc->local_ident>>24)&0xff;
+
+    if (typ!=1) {
+    	pERROR(sc, "ident=08x%x; claims not to be a PCI Device", typ);
+    	res=ENXIO;
+    	goto raus;
+    }
+    pINFO(sc, "HW version %d; FW code %d; FW version %d", hv, fk, fv);
+    /*pINFO(sc, "LAS1RR=0x%08x LAS1BA=0x%08x LBRD1=0x%08x\n",
+        plxreadreg(sc, LAS1RR), plxreadreg(sc, LAS1BA),
+        plxreadreg(sc, LBRD1));*/
+    switch (sc->local_ident&0xffff00) { /* HW version and FW code */
+    	case 0x010100: {
+    	    if (fv<MIN_FV) {
+                pERROR(sc, "Firmware version too old;"
+                        " at least version %d is required.",
+                        MIN_FV);
+                res=ENXIO;
+    	    	goto raus;
+            }
+            if (fv>MAX_FV)
+                pINFO(sc, "Driver not tested with"
+                        " firmware versions greater than %d.",
+                        MAX_FV);
+    	    if (sc->reg_size!=0x1000) {
+    	    	pERROR(sc, "wrong size of space 0: 0x%lx instead of 0x1000",
+                    (unsigned long)sc->reg_size);
+    	    	res=ENXIO;
+    	    	goto raus;
+    	    }
+	    pINFO(sc, "size of space 1: 0x%lx (%ld MByte)",
+		(u_long)sc->rem_size, (u_long)sc->rem_size>>20);
+        } break;
+    	default:
+    	    pERROR(sc, "Hard- or Firmware not known");
+    	    res=ENXIO;
+    	    goto raus;
+    }
+
+    /* reset all we can */
+    sis1100writereg(sc, cr, cr_reset); /* master reset */
+    sis1100writereg(sc, cr, cr_rem_reset); /* reset remote, ignore wether it exists */
+    if (sis1100_flush_fifo(sc, "init", 0)) { /* clear local fifo */
+        res=EIO;
+        goto raus;
+    }
+    sis1100writereg(sc, cr, cr_reset); /* master reset again */
+    sis1100_reset_plx(sc);             /* reset PLX */
+    sis1100writereg(sc, p_balance, 0);
+    sis1100readreg(sc, prot_error);
+
+    /* sis1100_dump_glink_status(sc, "INITIAL DUMP"); */
+
+    /* enable PCI Initiator-to-PCI Memory */
+    plxwritereg(sc, DMRR, 0);
+    plxwritereg(sc, DMLBAM, 0);
+    plxwritereg(sc, DMPBAM, 1);
+
+    sis1100writereg(sc, cr, 8); /* big endian */
+
+    sc->got_irqs=0;
+    for (i=0; i<=7; i++) sc->irq_vects[i].valid=0;
+    sc->pending_irqs=0;
+    sc->doorbell=0;
+    sc->lemo_status=0;
+
+    /* enable IRQs */
+    sis1100_disable_irq(sc, 0xffffffff, 0xffffffff);
+    sis1100_enable_irq(sc, plxirq_pci|plxirq_mbox|plxirq_doorbell|plxirq_local,
+	    irq_synch_chg|irq_inh_chg|irq_sema_chg|
+	    irq_rec_violation|irq_reset_req);
+
+    sc->user_wants_swap=0;
+    sc->dsp_present=0;
+    sc->ram_size=0;
+    sc->remote_ident=0;
+    sc->old_remote_hw=sis1100_hw_invalid;
+    sc->remote_hw=sis1100_hw_invalid;
+    sc->remote_endian=1;
+
+    if ((sis1100readreg(sc, sr)&sr_synch)==sr_synch) {
+    	sis1100_init_remote(sc);
+    } else {
+    	pINFO(sc, "init: remote interface not reachable");
+    }
+    res=0;
+
+    raus:
+    return res;
+#undef MIN_FV
+#undef MAX_FV
+}
+
+void
+sis1100_done(struct sis1100_softc* sc)
+{
+    /* DMA Ch. 0/1: not enabled */
+    plxwritereg(sc, DMACSR0_DMACSR1, 0);
+    /* disable interrupts */
+    plxwritereg(sc, INTCSR, 0);
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_remote.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_remote.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_remote.c	(revision 22)
@@ -0,0 +1,110 @@
+/* $ZEL: sis1100_init_remote.c,v 1.7 2004/05/27 23:10:21 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static char* rnames[]= {
+    "PCI",
+    "VME",
+    "CAMAC",
+    "f1",
+    "VERTEX",
+};
+
+void
+sis1100_init_remote(struct sis1100_softc* sc)
+{
+    u_int32_t ident, error, balance, typ, hv, fk, fv;
+    int res;
+
+    SEM_LOCK(sc->sem_hw);
+
+    /*sis1100writereg(sc, cr, cr_rem_reset);*/ /* reset remote */
+    if (sis1100_flush_fifo(sc, "init_remote" , 0)) return; /* clear local fifo */
+    sis1100writereg(sc, p_balance, 0);
+    sis1100readreg(sc, prot_error);
+
+    ident=plxreadlocal0(sc, 0x800);
+    error=sis1100readreg(sc, prot_error);
+    balance=sis1100readreg(sc, p_balance);
+    SEM_UNLOCK(sc->sem_hw);
+
+    if (error || balance) {
+        pERROR(sc, "error reading remote ident");
+        pERROR(sc, "error=0x%x balance=%d", error, balance);
+        sis1100_flush_fifo(sc, "after reading ident" , 0); /* clear local fifo */
+        /*sis1100_dump_glink_status(sc, "init remote");*/
+        return;
+    }
+
+    typ=ident&0xff;
+    hv=(ident>>8)&0xff;
+    fk=(ident>>16)&0xff;
+    fv=(ident>>24)&0xff;
+    pINFO(sc, "remote ident: 0x%08x", ident);
+    if ((typ>0) && (typ<=sizeof(rnames)/sizeof(char*)))
+        pINFO(sc, "remote is %s", rnames[typ-1]);
+    else
+        pERROR(sc, "unknown remote type %d", ident&0xff);
+    pINFO(sc, "remote HW_ver %d FW_code %d FW_ver %d", hv, fk, fv);
+    sc->remote_ident=ident;
+
+/* swapping is undefind here; it even would depend on arbitrary user settings */
+    switch (typ) {
+        case sis1100_hw_pci: /* PCI */
+            res=sis1100rem_init(sc);
+            sc->remote_endian=1; /* big endian; the remote side has to swap */
+            break;
+        case sis1100_hw_vme: /* VME */
+            res=sis3100rem_init(sc);
+            sc->remote_endian=1; /* big endian */
+            break;
+        case sis1100_hw_camac: /* CAMAC */
+            res=sis5100rem_init(sc);
+            sc->remote_endian=1; /* CAMAC is not yet known */
+            break;
+        case sis1100_hw_f1: /* (ACAM TDC-F1) */
+            res=f1_rem_init(sc);
+            sc->remote_endian=0; /* Willi always uses little endian */
+            break;
+        case sis1100_hw_vertex: /* VERTEX (COSY-ANKE) */
+            res=vertex_rem_init(sc);
+            sc->remote_endian=0; /* Willi always uses little endian */
+            break;
+        default:
+            pINFO(sc, "remote device type not (yet) supported.");
+            sc->remote_endian=1; /* just a default */
+            res=-1;
+            break;
+    }
+    if (res) return;
+    sis1100_update_swapping(sc, "init_remote");
+
+    sc->old_remote_hw=sc->remote_hw;
+    sc->remote_hw=typ;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_sdram.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_sdram.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_init_sdram.c	(revision 22)
@@ -0,0 +1,205 @@
+/* $ZEL: sis1100_init_sdram.c,v 1.2 2004/05/27 23:10:21 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Kirsch, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+static int
+sis1100_spd_write(struct sis1100_softc* sc, u_int32_t val)
+{
+    u_int32_t error;
+    
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, 0x0f060402);
+    wmb_reg();
+    sis1100writereg(sc, t_dal, val);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, SDRAM_EEPROM_CTRL_STAT);
+    mb_reg();
+    do {
+        error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
+
+static int
+sis1100_spd_read(struct sis1100_softc* sc, u_int32_t* val)
+{
+    u_int32_t error;
+    
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, 0x0f060002);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, SDRAM_EEPROM_CTRL_STAT);
+    mb_reg();
+    do {
+	error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    rmb_reg();
+    *val=sis1100readreg(sc, tc_dal);
+    SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
+
+static int
+sdram_eeprom_start(struct sis1100_softc* sc)
+{
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SDA_OE);
+    sis1100_spd_write(sc, 0) ;
+    return 0;
+}
+
+static int
+sdram_eeprom_stop(struct sis1100_softc* sc)
+{
+  sis1100_spd_write(sc, 0);
+  sis1100_spd_write(sc, SDRAM_SDA_OE);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SCL);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL);
+  sis1100_spd_write(sc, SDRAM_SDA_OE|SDRAM_SDA);
+  sis1100_spd_write(sc, 0);
+  return 0;
+}
+
+static int
+sdram_eeprom_read(struct sis1100_softc* sc, int noack, u_int8_t* val)
+{
+    u_int32_t d;
+    u_int8_t data;
+    int i;
+
+    data=0;
+    for (i=0; i<8; i++) {
+        sis1100_spd_write(sc, 0);
+        sis1100_spd_write(sc, SDRAM_SCL);
+        sis1100_spd_write(sc, SDRAM_SCL);
+        sis1100_spd_read(sc, &d);
+
+        data<<=1;
+        data|=((d & 0x100)>>8);
+    }
+
+    *val=data;
+
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL:SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA|SDRAM_SCL:SDRAM_SDA_OE|SDRAM_SCL);
+    sis1100_spd_write(sc, noack?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE);
+    sis1100_spd_write(sc, 0);
+    return 0 ;
+}
+
+static int
+sdram_eeprom_write(struct sis1100_softc* sc, u_int8_t val)
+{
+    u_int32_t data ;
+    int i ;
+
+    for (i=0; i<8; i++) {
+        data=(val&0x80)?SDRAM_SDA_OE|SDRAM_SDA:SDRAM_SDA_OE;
+        sis1100_spd_write(sc, data);
+        sis1100_spd_write(sc, data);
+
+        sis1100_spd_write(sc, data|SDRAM_SCL);
+
+        sis1100_spd_write(sc, data);
+        val<<=1;
+    }
+
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, 0);
+    sis1100_spd_write(sc, SDRAM_SCL);
+    sis1100_spd_write(sc, SDRAM_SCL);
+    sis1100_spd_write(sc, 0);
+    return 0 ;
+}
+
+int
+sis1100_init_sdram(struct sis1100_softc* sc)
+{
+    u_int32_t eeprom_signature;
+    u_int8_t eeprom_bytes[8];
+    u_int8_t dummy;
+    int i;
+
+    sdram_eeprom_start(sc) ;
+    sdram_eeprom_write(sc, 0xA0); /* device Write cmd  */
+    sdram_eeprom_write(sc, 0x00); /* write address */
+
+    sdram_eeprom_start(sc) ;
+
+    sdram_eeprom_write(sc, 0xA1); /* device Read cmd  */
+
+    for (i=0; i<8; i++) sdram_eeprom_read(sc, 0, eeprom_bytes+i);
+
+    sdram_eeprom_read(sc, 1, &dummy);
+    sdram_eeprom_stop(sc);
+/*
+    for (i=0; i<8; i++)
+        printk(KERN_INFO "eeprom[%d]=0x%03x\n", i, eeprom_bytes[i]);
+*/
+    eeprom_signature=(eeprom_bytes[3]<<16)|(eeprom_bytes[4]<<8)|(eeprom_bytes[5]);
+/*
+    printk(KERN_INFO "eeprom_signature=0x%04x\n", eeprom_signature);
+*/
+    switch (eeprom_signature) {
+    case 0x0c0901:
+        sc->ram_size=64*1024*1024;
+        break;
+    case 0x0c0902:
+        sc->ram_size=128*1024*1024;
+        break;
+    case 0x0d0a01:
+        sc->ram_size=256*1024*1024;
+        sis1100_spd_write(sc, 1<<16);
+        break;
+    case 0x0d0a02:
+        sc->ram_size=512*1024*1024;
+        sis1100_spd_write(sc, 1<<16);
+        break;
+    case 0xffffff:
+        sc->ram_size=0;
+        pINFO(sc, "no SDRAM installed");
+        break;
+    default:
+        pERROR(sc, "SDRAM not supported: row=%d col=%d banks=%d",
+                eeprom_bytes[3], eeprom_bytes[4], eeprom_bytes[5]);
+        sc->ram_size=0;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c	(revision 22)
@@ -0,0 +1,860 @@
+/* $ZEL: sis1100_ioctl.c,v 1.5 2004/05/27 23:10:22 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+static int
+test_super(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+return 0;
+#ifdef __NetBSD__
+    if (suser(fd->p->p_ucred, &fd->p->p_acflag)) return EPERM;
+#elif __linux__
+    if (!capable(CAP_SYS_RAWIO)) return EPERM;
+#endif
+    return 0;
+}
+
+#ifdef SIS1100_NEW_CTRL
+static int
+ioctl_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        d->val=plxreadlocal0(sc, d->offset&0x7ff);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 1);
+    }
+    return 0;
+}
+
+static int
+ioctl_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        plxwritelocal0(sc, d->offset&0x7ff, d->val);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    }
+    return 0;
+}
+
+#else
+
+static int
+ioctl_local_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    d->val=plxreadlocal0(sc, d->offset&0x7ff);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_local_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    plxwritelocal0(sc, d->offset&0x7ff, d->val);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 0);
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    return 0;
+}
+#endif
+
+static int
+ioctl_ident(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ident* d)
+{
+    d->local.hw_type=sc->local_ident&0xff;
+    d->local.hw_version=(sc->local_ident>>8)&0xff;
+    d->local.fw_type=(sc->local_ident>>16)&0xff;
+    d->local.fw_version=(sc->local_ident>>24)&0xff;
+
+    d->remote.hw_type=sc->remote_ident&0xff;
+    d->remote.hw_version=(sc->remote_ident>>8)&0xff;
+    d->remote.fw_type=(sc->remote_ident>>16)&0xff;
+    d->remote.fw_version=(sc->remote_ident>>24)&0xff;
+
+    d->remote_ok=sc->remote_hw!=sis1100_hw_invalid;
+    d->remote_online=(sis1100readreg(sc, sr)&sr_synch)==sr_synch;
+    return 0;
+}
+
+static int
+ioctl_remote_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+#if 0
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, cr, cr_rem_reset);
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid:
+        SEM_UNLOCK(sc->sem_hw);
+        return ENXIO;
+    case sis1100_hw_pci:
+        /* do nothing */
+        break;
+    case sis1100_hw_vme:
+        sis3100writeremreg(sc, vme_master_sc, 8, 1);
+        break;
+    case sis1100_hw_camac:
+        break;
+    }
+    SEM_UNLOCK(sc->sem_hw);
+    mdelay(500);
+    sis1100_init_remote(sc);
+#endif
+    return ENOTTY;
+}
+
+static int
+ioctl_devtype(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=fd->subdev;
+    return 0;
+}
+
+static int
+ioctl_driverversion(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=SIS1100_Version;
+    return 0;
+}
+
+static int
+ioctl_mindmalen(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    int* d)
+{
+/*
+ *   0: never use DMA
+ *   1: always use DMA (if size>4)
+ *  >1: use DMA if transfersize (in Bytes) is >= mindmalen
+ *  -1: don't change old value
+ */
+    int tmp[2];
+
+    tmp[0]=fd->mindmalen_r;
+    tmp[1]=fd->mindmalen_w;
+    if (d[0]>=0) fd->mindmalen_r=d[0];
+    if (d[1]>=0) fd->mindmalen_w=d[1];
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_setvmespace(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct vmespace* d)
+{
+    if ((d->datasize!=1) && (d->datasize!=2) && (d->datasize!=4))
+        return EINVAL;
+    fd->vmespace_am=d->am;
+    fd->vmespace_datasize=d->datasize;
+    if (d->swap>=0) {
+        sc->user_wants_swap=d->swap;
+        sis1100_update_swapping(sc, "ioctl_setvmespace");
+    }
+    if (d->mindmalen>=0) {
+        fd->mindmalen_r=d->mindmalen;
+        fd->mindmalen_w=d->mindmalen;
+    }
+    return 0;
+}
+
+static int
+ioctl_swap(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int old;
+
+    old=sc->user_wants_swap;
+    sc->user_wants_swap=*d;
+    sis1100_update_swapping(sc, "ioctl_swap");
+    *d=old;
+    return 0;
+}
+
+static int
+ioctl_3100_timeouts(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+/*
+ *  d[0]: bus error terms of 10**-9 s
+ *  d[1]: arbitration timeout in terms of 10**-3 s
+ */
+    int tmp[2];
+    if ((fd->subdev!=sis1100_subdev_remote)
+        || (sc->remote_hw!=sis1100_hw_vme))
+                return ENXIO;
+    if (sis3100_get_timeouts(sc, tmp+0, tmp+1)) return EIO;
+    if (sis3100_set_timeouts(sc, d[0], d[1])) return EIO;
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_front_io(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_io(sc, d, 0);
+}
+
+static int
+ioctl_front_pulse(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_pulse(sc, d, 0);
+}
+
+static int
+ioctl_front_latch(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_latch(sc, d, 0);
+}
+
+static int
+ioctl_last_error(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    *d=fd->last_prot_err;
+    return 0;
+}
+
+static int
+ioctl_mapsize(struct sis1100_softc* sc, struct sis1100_fdata* fd, u_int32_t* d)
+{
+    switch (fd->subdev) {
+        case sis1100_subdev_remote:
+	    *d=sc->rem_size;
+	    break;
+	case sis1100_subdev_ram:
+	    *d=sc->ram_size;
+	    break;
+	case sis1100_subdev_ctrl:
+	    *d=sc->reg_size;
+	    break;
+	case sis1100_subdev_dsp:
+	    *d=0;
+	    break;
+	default:
+	    return EINVAL;
+    }
+    return 0;
+}
+
+static int
+ioctl_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_pipe* d)
+{
+    int res;
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_read_pipe(sc, d);
+    return res;
+}
+
+static int
+ioctl_write_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_writepipe* d)
+{
+    u_int32_t* list;
+    int res;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+
+#ifdef __NetBSD__
+    list=malloc(d->num*2*sizeof(u_int32_t), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    list=kmalloc(d->num*2*sizeof(u_int32_t), GFP_KERNEL);
+#endif
+    if (!list) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->data, list, d->num*2*sizeof(u_int32_t))
+#elif __linux__
+        copy_from_user(list, d->data, d->num*2*sizeof(u_int32_t))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    res=0;
+    d->error=sis1100_write_pipe(sc, d->am, 1/*space*/, d->num, list);
+
+    raus:
+#ifdef __NetBSD__
+    free(list, M_IOCTLOPS);
+#elif __linux__
+    kfree(list);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_probe(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int dummy;
+    if (sc->remote_hw!=sis1100_hw_vme) return ENXIO;
+    if (sis1100_tmp_read(sc, *d, fd->vmespace_am,
+	    fd->vmespace_datasize, 1/*space*/, &dummy))
+	return EIO;
+    return 0;
+}
+
+static int
+ioctl_vme_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_read(sc, d->addr, d->am, d->size,
+	    1/*space*/, &d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_write(sc, d->addr, d->am, d->size,
+	    1/*space*/, d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+    int space=1;
+#if 0
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: return ENXIO;
+    case sis1100_hw_pci: space=1; break;
+    case sis1100_hw_vme: space=1; break;
+    case sis1100_hw_camac: space=1; break;
+    case sis1100_hw_f1: space=1; break;
+    case sis1100_hw_vertex: space=1; break;
+    }
+#else
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#endif
+    res=sis1100_read_block(sc, fd, d->size, d->fifo, d->num, &d->num,
+        space, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_vme_super_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_super_block_req* d)
+{
+    struct sis1100_vme_block_req* reqs;
+    int res, i;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#ifdef __NetBSD__
+    reqs=malloc(d->n*sizeof(struct sis1100_vme_block_req), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    reqs=kmalloc(d->n*sizeof(struct sis1100_vme_block_req), GFP_KERNEL);
+#endif
+    if (!reqs) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->reqs, reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_from_user(reqs, d->reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    d->error=0;
+    for (i=0; i<d->n; i++) {
+        struct sis1100_vme_block_req* r=reqs+i;
+	res=sis1100_read_block(sc, fd, r->size, r->fifo, r->num,
+        &r->num, 1/*space*/, r->am, r->addr, r->data, &r->error);
+	if (res) {
+            d->n=i;
+            d->error=res;
+            break;
+        }
+    }
+    res=0;
+    if (
+#ifdef __NetBSD__
+        copyout(reqs, d->reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_to_user(d->reqs, reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) res=EFAULT;
+
+    raus:
+#ifdef __NetBSD__
+    free(reqs, M_IOCTLOPS);
+#elif __linux__
+    kfree(reqs);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_block_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+ 
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_write_block(sc, fd, d->size, d->fifo, d->num,
+        &d->num, 1/*space*/, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_fifomode(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int tmp;
+    tmp=fd->fifo_mode;
+    if (*d>=0) fd->fifo_mode=!!*d;
+    *d=tmp;
+    return 0;
+}
+
+static int
+ioctl_irq_ctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ctl* d)
+{
+    return sis1100_irq_ctl(sc, fd, d);
+}
+
+static int
+ioctl_irq_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_get(sc, fd, d);
+}
+
+static int
+ioctl_irq_ack(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ack* d)
+{
+    return sis1100_irq_ack(sc, fd, d);
+}
+
+static int
+ioctl_irq_wait(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_wait(sc, fd, d);
+}
+
+static int
+ioctl_dma_alloc(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+#ifdef __NetBSD__
+    return sis1100_dma_alloc(sc, fd, d);
+#elif __linux__
+    return ENOTTY;
+#endif
+}
+
+static int
+ioctl_dma_free(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+    /*return sis1100_dma_free(sc, fd, d);*/
+    return ENOTTY;
+}
+#if 0
+static int
+ioctl_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    return sis1100_reset(sc);
+}
+#endif
+
+static int
+ioctl_cccz(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 8, 26), &data);
+pINFO(sc, "CCCZ: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cccc(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 9, 26), &data);
+pINFO(sc, "CCCC: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_ccci(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    u_int32_t data;
+    int res;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis5100writeremreg(sc, camac_sc, *d?1:0x1000, 0);
+
+    /*res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(30, 9, *d?26:24), &data);*/
+pINFO(sc, "CCCI(%d): res=0x%x", *d, res);
+    res=sis5100readremreg(sc, camac_sc, &data, 0);
+pINFO(sc, "CCCI    : data=0x%x, res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cnaf(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_camac_req* d)
+{
+    u_int32_t addr;
+    int res;
+
+    addr=SIS5100_CAMACaddr(d->N, d->A, d->F);
+    if (d->F>15) { /* write */
+        res=sis1100_tmp_camacwrite(sc, addr, d->data);
+        d->data=(~res<<24)&0xc0000000;
+        if ((res&~0x2c0)==0) { /* X or Q missing; not an error */
+	  /* res=0; */ /* mki 29.06.04 */
+        }
+    } else { /* read or control */
+        res=sis1100_tmp_camacread(sc, addr, &d->data);
+        d->data^=0xc0000000;
+    }
+    d->error=res;
+    return 0;
+}
+
+static int
+ioctl_read_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_eeprom_req* d)
+{
+    return sis1100_read_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_write_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+        struct sis1100_eeprom_req* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    return sis1100_write_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_jtag_enable(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    *d<<=8;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_ctrl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrb[1], *d);
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+ioctl_jtag_data(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_data);
+    return 0;
+}
+
+static int
+ioctl_jtag_put(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+_sis1100_ioctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    unsigned int cmd, void* data)
+{
+    int res=0;
+
+    switch (cmd) {
+    case SIS1100_SETVMESPACE:
+        res=ioctl_setvmespace(sc, fd, (struct vmespace*)data); break;
+    case SIS3100_VME_PROBE:
+        res=ioctl_vme_probe(sc, fd, (int*)data); break;
+    case SIS3100_VME_READ:
+        res=ioctl_vme_read(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_WRITE:
+        res=ioctl_vme_write(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_BLOCK_READ:
+        res=ioctl_vme_block_read(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+    case SIS3100_VME_BLOCK_WRITE:
+        res=ioctl_vme_block_write(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+#ifdef SIS1100_NEW_CTRL
+    case SIS1100_CTRL_READ:
+        res=ioctl_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_CTRL_WRITE:
+        res=ioctl_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#else
+    case SIS1100_LOCAL_CTRL_READ:
+        res=ioctl_local_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_LOCAL_CTRL_WRITE:
+        res=ioctl_local_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_READ:
+        res=ioctl_remote_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_WRITE:
+        res=ioctl_remote_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#endif
+    case SIS1100_PIPE:
+        res=ioctl_pipe(sc, fd, (struct sis1100_pipe*)data); break;
+    case SIS1100_MAPSIZE:
+        res=ioctl_mapsize(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_LAST_ERROR:
+        res=ioctl_last_error(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_IDENT:
+        res=ioctl_ident(sc, fd, (struct sis1100_ident*)data); break;
+    case SIS1100_FIFOMODE:
+        res=ioctl_fifomode(sc, fd, (int*)data); break;
+
+    case SIS1100_IRQ_CTL:
+        res=ioctl_irq_ctl(sc, fd, (struct sis1100_irq_ctl*)data); break;
+    case SIS1100_IRQ_GET:
+        res=ioctl_irq_get(sc, fd, (struct sis1100_irq_get*)data); break;
+    case SIS1100_IRQ_ACK:
+        res=ioctl_irq_ack(sc, fd, (struct sis1100_irq_ack*)data); break;
+    case SIS1100_IRQ_WAIT:
+        res=ioctl_irq_wait(sc, fd, (struct sis1100_irq_get*)data); break;
+
+    case SIS1100_MINDMALEN:
+        res=ioctl_mindmalen(sc, fd, (int*)data); break;
+
+    case SIS1100_FRONT_IO:
+        res=ioctl_front_io(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_PULSE:
+        res=ioctl_front_pulse(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_LATCH:
+        res=ioctl_front_latch(sc, fd, (u_int32_t*)data); break;
+
+    case SIS3100_VME_SUPER_BLOCK_READ:
+        res=ioctl_vme_super_block_read(sc, fd,
+                (struct sis1100_vme_super_block_req*)data);
+        break;
+    case SIS1100_WRITE_PIPE:
+        res=ioctl_write_pipe(sc, fd, (struct sis1100_writepipe*)data); break;
+
+    case SIS1100_DMA_ALLOC:
+        res=ioctl_dma_alloc(sc, fd, (struct sis1100_dma_alloc*)data); break;
+    case SIS1100_DMA_FREE:
+        res=ioctl_dma_free(sc, fd, (struct sis1100_dma_alloc*)data); break;
+
+    case SIS5100_CCCZ:
+        res=ioctl_cccz(sc, fd); break;
+    case SIS5100_CCCC:
+        res=ioctl_cccc(sc, fd); break;
+    case SIS5100_CCCI:
+        res=ioctl_ccci(sc, fd, (int*)data); break;
+    case SIS5100_CNAF:
+        res=ioctl_cnaf(sc, fd, (struct sis1100_camac_req*)data); break;
+    case SIS1100_SWAP:
+        res=ioctl_swap(sc, fd, (int*)data); break;
+    case SIS3100_TIMEOUTS:
+        res=ioctl_3100_timeouts(sc, fd, (int*)data); break;
+
+    case SIS1100_DSP_LOAD:
+        res=sis1100_dsp_load(sc, fd, (struct sis1100_dsp_code*)data); break;
+    case SIS1100_DSP_RESET:
+        res=sis1100_dsp_reset(sc, fd); break;
+    case SIS1100_DSP_START:
+        res=sis1100_dsp_start(sc, fd); break;
+
+#if 0
+    case SIS1100_RESET:
+        res=ioctl_reset(sc, fd); break;
+#endif
+    case SIS1100_REMOTE_RESET:
+        res=ioctl_remote_reset(sc, fd); break;
+    case SIS1100_DEVTYPE:
+        res=ioctl_devtype(sc, fd, (int*)data); break;
+    case SIS1100_DRIVERVERSION:
+        res=ioctl_driverversion(sc, fd, (int*)data); break;
+    case SIS1100_READ_EEPROM:
+        res=ioctl_read_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+    case SIS1100_WRITE_EEPROM:
+        res=ioctl_write_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+
+    case SIS1100_JTAG_ENABLE:
+        res=ioctl_jtag_enable(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_CTRL:
+        res=ioctl_jtag_ctrl(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_DATA:
+        res=ioctl_jtag_data(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_PUT:
+        res=ioctl_jtag_put(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_GET:
+        res=ioctl_jtag_get(sc, fd, (u_int32_t*)data); break;
+
+    default:
+        res=ENOTTY; break;
+    }
+    return res;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    fd->p=p;
+    return _sis1100_ioctl(sc, fd, cmd, data);
+}
+#elif __linux__
+
+union alles {
+    struct vmespace                               vmespace;
+    struct sis1100_vme_req                         vme_req;
+    struct sis1100_vme_block_req             vme_block_req;
+    struct sis1100_ctrl_reg                       ctrl_reg;
+    struct sis1100_pipe                               pipe;
+    struct sis1100_ident                             ident;
+    struct sis1100_irq_ctl                         irq_ctl;
+    struct sis1100_irq_get                         irq_get;
+    struct sis1100_irq_ack                  irq_ackirq_ack;
+    struct sis1100_vme_super_block_req vme_super_block_req;
+    struct sis1100_writepipe                     writepipe;
+    struct sis1100_dma_alloc                     dma_alloc;
+    struct sis1100_camac_req                     camac_req;
+    struct sis1100_dsp_code                       dsp_code;
+    struct sis1100_eeprom_req                   eeprom_req;
+};
+
+#define MAX_DATA (sizeof(union alles))
+
+int
+sis1100_ioctl(struct inode *inode, struct file *file,
+	      unsigned int cmd, unsigned long arg)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    u_int8_t data[MAX_DATA];
+    int res;
+
+    if ((cmd&IOC_INOUT) && (_IOC_SIZE(cmd)>MAX_DATA)) {
+        pINFO(sc, "sis1100_ioctl: cmd=0x%08x _IOC_SIZE(cmd)=%d",
+            cmd, _IOC_SIZE(cmd));
+        return -EINVAL;
+    }
+
+    if (cmd&IOC_IN) {
+        if (copy_from_user(&data, (void *)arg, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    if ((res=_sis1100_ioctl(sc, fd, cmd, &data)))
+            return -res;
+
+    if (cmd&IOC_OUT) {
+        if (copy_to_user((void *)arg, &data, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    return 0;
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c.~1.5.~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c.~1.5.~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_ioctl.c.~1.5.~	(revision 22)
@@ -0,0 +1,860 @@
+/* $ZEL: sis1100_ioctl.c,v 1.5 2004/05/27 23:10:22 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+static int
+test_super(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+return 0;
+#ifdef __NetBSD__
+    if (suser(fd->p->p_ucred, &fd->p->p_acflag)) return EPERM;
+#elif __linux__
+    if (!capable(CAP_SYS_RAWIO)) return EPERM;
+#endif
+    return 0;
+}
+
+#ifdef SIS1100_NEW_CTRL
+static int
+ioctl_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        d->val=plxreadlocal0(sc, d->offset&0x7ff);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 1);
+    }
+    return 0;
+}
+
+static int
+ioctl_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    if (fd->subdev==sis1100_subdev_ctrl) {
+        SEM_LOCK(sc->sem_hw);
+        plxwritelocal0(sc, d->offset&0x7ff, d->val);
+        SEM_UNLOCK(sc->sem_hw);
+        d->error=0;
+    } else {
+        if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+        d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    }
+    return 0;
+}
+
+#else
+
+static int
+ioctl_local_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    d->val=plxreadlocal0(sc, d->offset&0x7ff);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_local_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+    struct sis1100_ctrl_reg* d)
+{
+    SEM_LOCK(sc->sem_hw);
+    plxwritelocal0(sc, d->offset&0x7ff, d->val);
+    SEM_UNLOCK(sc->sem_hw);
+    d->error=0;
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_read(sc, d->offset, &d->val, 0);
+    return 0;
+}
+
+static int
+ioctl_remote_ctrl_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ctrl_reg* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_remote_reg_write(sc, d->offset, d->val, 0);
+    return 0;
+}
+#endif
+
+static int
+ioctl_ident(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_ident* d)
+{
+    d->local.hw_type=sc->local_ident&0xff;
+    d->local.hw_version=(sc->local_ident>>8)&0xff;
+    d->local.fw_type=(sc->local_ident>>16)&0xff;
+    d->local.fw_version=(sc->local_ident>>24)&0xff;
+
+    d->remote.hw_type=sc->remote_ident&0xff;
+    d->remote.hw_version=(sc->remote_ident>>8)&0xff;
+    d->remote.fw_type=(sc->remote_ident>>16)&0xff;
+    d->remote.fw_version=(sc->remote_ident>>24)&0xff;
+
+    d->remote_ok=sc->remote_hw!=sis1100_hw_invalid;
+    d->remote_online=(sis1100readreg(sc, sr)&sr_synch)==sr_synch;
+    return 0;
+}
+
+static int
+ioctl_remote_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+#if 0
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, cr, cr_rem_reset);
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid:
+        SEM_UNLOCK(sc->sem_hw);
+        return ENXIO;
+    case sis1100_hw_pci:
+        /* do nothing */
+        break;
+    case sis1100_hw_vme:
+        sis3100writeremreg(sc, vme_master_sc, 8, 1);
+        break;
+    case sis1100_hw_camac:
+        break;
+    }
+    SEM_UNLOCK(sc->sem_hw);
+    mdelay(500);
+    sis1100_init_remote(sc);
+#endif
+    return ENOTTY;
+}
+
+static int
+ioctl_devtype(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=fd->subdev;
+    return 0;
+}
+
+static int
+ioctl_driverversion(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    *d=SIS1100_Version;
+    return 0;
+}
+
+static int
+ioctl_mindmalen(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    int* d)
+{
+/*
+ *   0: never use DMA
+ *   1: always use DMA (if size>4)
+ *  >1: use DMA if transfersize (in Bytes) is >= mindmalen
+ *  -1: don't change old value
+ */
+    int tmp[2];
+
+    tmp[0]=fd->mindmalen_r;
+    tmp[1]=fd->mindmalen_w;
+    if (d[0]>=0) fd->mindmalen_r=d[0];
+    if (d[1]>=0) fd->mindmalen_w=d[1];
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_setvmespace(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct vmespace* d)
+{
+    if ((d->datasize!=1) && (d->datasize!=2) && (d->datasize!=4))
+        return EINVAL;
+    fd->vmespace_am=d->am;
+    fd->vmespace_datasize=d->datasize;
+    if (d->swap>=0) {
+        sc->user_wants_swap=d->swap;
+        sis1100_update_swapping(sc, "ioctl_setvmespace");
+    }
+    if (d->mindmalen>=0) {
+        fd->mindmalen_r=d->mindmalen;
+        fd->mindmalen_w=d->mindmalen;
+    }
+    return 0;
+}
+
+static int
+ioctl_swap(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int old;
+
+    old=sc->user_wants_swap;
+    sc->user_wants_swap=*d;
+    sis1100_update_swapping(sc, "ioctl_swap");
+    *d=old;
+    return 0;
+}
+
+static int
+ioctl_3100_timeouts(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+/*
+ *  d[0]: bus error terms of 10**-9 s
+ *  d[1]: arbitration timeout in terms of 10**-3 s
+ */
+    int tmp[2];
+    if ((fd->subdev!=sis1100_subdev_remote)
+        || (sc->remote_hw!=sis1100_hw_vme))
+                return ENXIO;
+    if (sis3100_get_timeouts(sc, tmp+0, tmp+1)) return EIO;
+    if (sis3100_set_timeouts(sc, d[0], d[1])) return EIO;
+    d[0]=tmp[0];
+    d[1]=tmp[1];
+    return 0;
+}
+
+static int
+ioctl_front_io(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_io(sc, d, 0);
+}
+
+static int
+ioctl_front_pulse(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_pulse(sc, d, 0);
+}
+
+static int
+ioctl_front_latch(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    return sis1100_front_latch(sc, d, 0);
+}
+
+static int
+ioctl_last_error(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t* d)
+{
+    *d=fd->last_prot_err;
+    return 0;
+}
+
+static int
+ioctl_mapsize(struct sis1100_softc* sc, struct sis1100_fdata* fd, u_int32_t* d)
+{
+    switch (fd->subdev) {
+        case sis1100_subdev_remote:
+	    *d=sc->rem_size;
+	    break;
+	case sis1100_subdev_ram:
+	    *d=sc->ram_size;
+	    break;
+	case sis1100_subdev_ctrl:
+	    *d=sc->reg_size;
+	    break;
+	case sis1100_subdev_dsp:
+	    *d=0;
+	    break;
+	default:
+	    return EINVAL;
+    }
+    return 0;
+}
+
+static int
+ioctl_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_pipe* d)
+{
+    int res;
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_read_pipe(sc, d);
+    return res;
+}
+
+static int
+ioctl_write_pipe(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_writepipe* d)
+{
+    u_int32_t* list;
+    int res;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+
+#ifdef __NetBSD__
+    list=malloc(d->num*2*sizeof(u_int32_t), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    list=kmalloc(d->num*2*sizeof(u_int32_t), GFP_KERNEL);
+#endif
+    if (!list) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->data, list, d->num*2*sizeof(u_int32_t))
+#elif __linux__
+        copy_from_user(list, d->data, d->num*2*sizeof(u_int32_t))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    res=0;
+    d->error=sis1100_write_pipe(sc, d->am, 1/*space*/, d->num, list);
+
+    raus:
+#ifdef __NetBSD__
+    free(list, M_IOCTLOPS);
+#elif __linux__
+    kfree(list);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_probe(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int dummy;
+    if (sc->remote_hw!=sis1100_hw_vme) return ENXIO;
+    if (sis1100_tmp_read(sc, *d, fd->vmespace_am,
+	    fd->vmespace_datasize, 1/*space*/, &dummy))
+	return EIO;
+    return 0;
+}
+
+static int
+ioctl_vme_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_read(sc, d->addr, d->am, d->size,
+	    1/*space*/, &d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_req* d)
+{
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    d->error=sis1100_tmp_write(sc, d->addr, d->am, d->size,
+	    1/*space*/, d->data);
+    return 0;
+}
+
+static int
+ioctl_vme_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+    int space=1;
+#if 0
+    switch (sc->remote_hw) {
+    case sis1100_hw_invalid: return ENXIO;
+    case sis1100_hw_pci: space=1; break;
+    case sis1100_hw_vme: space=1; break;
+    case sis1100_hw_camac: space=1; break;
+    case sis1100_hw_f1: space=1; break;
+    case sis1100_hw_vertex: space=1; break;
+    }
+#else
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#endif
+    res=sis1100_read_block(sc, fd, d->size, d->fifo, d->num, &d->num,
+        space, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_vme_super_block_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_super_block_req* d)
+{
+    struct sis1100_vme_block_req* reqs;
+    int res, i;
+
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+#ifdef __NetBSD__
+    reqs=malloc(d->n*sizeof(struct sis1100_vme_block_req), M_IOCTLOPS,
+            M_WAITOK/*|M_CANFAIL*/);
+#elif __linux__
+    reqs=kmalloc(d->n*sizeof(struct sis1100_vme_block_req), GFP_KERNEL);
+#endif
+    if (!reqs) return ENOMEM;
+
+    if (
+#ifdef __NetBSD__
+        copyin(d->reqs, reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_from_user(reqs, d->reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) {
+	res=EFAULT;
+        goto raus;
+    }
+
+    d->error=0;
+    for (i=0; i<d->n; i++) {
+        struct sis1100_vme_block_req* r=reqs+i;
+	res=sis1100_read_block(sc, fd, r->size, r->fifo, r->num,
+        &r->num, 1/*space*/, r->am, r->addr, r->data, &r->error);
+	if (res) {
+            d->n=i;
+            d->error=res;
+            break;
+        }
+    }
+    res=0;
+    if (
+#ifdef __NetBSD__
+        copyout(reqs, d->reqs, d->n*sizeof(struct sis1100_vme_block_req))
+#elif __linux__
+        copy_to_user(d->reqs, reqs,
+            d->n*sizeof(struct sis1100_vme_block_req))
+#endif
+        ) res=EFAULT;
+
+    raus:
+#ifdef __NetBSD__
+    free(reqs, M_IOCTLOPS);
+#elif __linux__
+    kfree(reqs);
+#endif
+    return res;
+}
+
+static int
+ioctl_vme_block_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_vme_block_req* d)
+{
+    int res;
+ 
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+    res=sis1100_write_block(sc, fd, d->size, d->fifo, d->num,
+        &d->num, 1/*space*/, d->am, d->addr, d->data, &d->error);
+    return res;
+}
+
+static int
+ioctl_fifomode(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    int tmp;
+    tmp=fd->fifo_mode;
+    if (*d>=0) fd->fifo_mode=!!*d;
+    *d=tmp;
+    return 0;
+}
+
+static int
+ioctl_irq_ctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ctl* d)
+{
+    return sis1100_irq_ctl(sc, fd, d);
+}
+
+static int
+ioctl_irq_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_get(sc, fd, d);
+}
+
+static int
+ioctl_irq_ack(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_ack* d)
+{
+    return sis1100_irq_ack(sc, fd, d);
+}
+
+static int
+ioctl_irq_wait(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_irq_get* d)
+{
+    return sis1100_irq_wait(sc, fd, d);
+}
+
+static int
+ioctl_dma_alloc(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+#ifdef __NetBSD__
+    return sis1100_dma_alloc(sc, fd, d);
+#elif __linux__
+    return ENOTTY;
+#endif
+}
+
+static int
+ioctl_dma_free(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d)
+{
+    /*return sis1100_dma_free(sc, fd, d);*/
+    return ENOTTY;
+}
+#if 0
+static int
+ioctl_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    return sis1100_reset(sc);
+}
+#endif
+
+static int
+ioctl_cccz(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 8, 26), &data);
+pINFO(sc, "CCCZ: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cccc(struct sis1100_softc* sc, struct sis1100_fdata* fd)
+{
+    u_int32_t data;
+    int res;
+    return 0;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(28, 9, 26), &data);
+pINFO(sc, "CCCC: data=0x%x res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_ccci(struct sis1100_softc* sc, struct sis1100_fdata* fd, int* d)
+{
+    u_int32_t data;
+    int res;
+
+    if (sc->remote_hw!=sis1100_hw_camac) return ENXIO;
+    res=sis5100writeremreg(sc, camac_sc, *d?1:0x1000, 0);
+
+    /*res=sis1100_tmp_camacread(sc, SIS5100_CAMACaddr(30, 9, *d?26:24), &data);*/
+pINFO(sc, "CCCI(%d): res=0x%x", *d, res);
+    res=sis5100readremreg(sc, camac_sc, &data, 0);
+pINFO(sc, "CCCI    : data=0x%x, res=0x%x", data, res);
+    return 0;
+}
+
+static int
+ioctl_cnaf(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_camac_req* d)
+{
+    u_int32_t addr;
+    int res;
+
+    addr=SIS5100_CAMACaddr(d->N, d->A, d->F);
+    if ((d->F&0x18)==0x10) { /* write */
+        res=sis1100_tmp_camacwrite(sc, addr, d->data);
+        d->data=(~res<<24)&0xc0000000;
+        if ((res&~0x2c0)==0) { /* X or Q missing; not an error */
+            res=0;
+        }
+    } else { /* read or control */
+        res=sis1100_tmp_camacread(sc, addr, &d->data);
+        d->data^=0xc0000000;
+    }
+    d->error=res;
+    return 0;
+}
+
+static int
+ioctl_read_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_eeprom_req* d)
+{
+    return sis1100_read_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_write_eeprom(struct sis1100_softc* sc, struct sis1100_fdata* fd, 
+        struct sis1100_eeprom_req* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    return sis1100_write_eeprom(sc, d->num, d->addr, d->data);
+}
+
+static int
+ioctl_jtag_enable(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    *d<<=8;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_ctrl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrb[1], *d);
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+ioctl_jtag_data(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_data);
+    return 0;
+}
+
+static int
+ioctl_jtag_put(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    if (test_super(sc, fd)) return EPERM;
+    sis1100writereg(sc, jtag_csr.jtag_csrl, *d);
+    return 0;
+}
+
+static int
+ioctl_jtag_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        u_int32_t* d)
+{
+    *d=sis1100readreg(sc, jtag_csr.jtag_csrl);
+    return 0;
+}
+
+static int
+_sis1100_ioctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    unsigned int cmd, void* data)
+{
+    int res=0;
+
+    switch (cmd) {
+    case SIS1100_SETVMESPACE:
+        res=ioctl_setvmespace(sc, fd, (struct vmespace*)data); break;
+    case SIS3100_VME_PROBE:
+        res=ioctl_vme_probe(sc, fd, (int*)data); break;
+    case SIS3100_VME_READ:
+        res=ioctl_vme_read(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_WRITE:
+        res=ioctl_vme_write(sc, fd, (struct sis1100_vme_req*)data); break;
+    case SIS3100_VME_BLOCK_READ:
+        res=ioctl_vme_block_read(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+    case SIS3100_VME_BLOCK_WRITE:
+        res=ioctl_vme_block_write(sc, fd, (struct sis1100_vme_block_req*)data);
+        break;
+#ifdef SIS1100_NEW_CTRL
+    case SIS1100_CTRL_READ:
+        res=ioctl_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_CTRL_WRITE:
+        res=ioctl_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#else
+    case SIS1100_LOCAL_CTRL_READ:
+        res=ioctl_local_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_LOCAL_CTRL_WRITE:
+        res=ioctl_local_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_READ:
+        res=ioctl_remote_ctrl_read(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+    case SIS1100_REMOTE_CTRL_WRITE:
+        res=ioctl_remote_ctrl_write(sc, fd, (struct sis1100_ctrl_reg*)data);
+        break;
+#endif
+    case SIS1100_PIPE:
+        res=ioctl_pipe(sc, fd, (struct sis1100_pipe*)data); break;
+    case SIS1100_MAPSIZE:
+        res=ioctl_mapsize(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_LAST_ERROR:
+        res=ioctl_last_error(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_IDENT:
+        res=ioctl_ident(sc, fd, (struct sis1100_ident*)data); break;
+    case SIS1100_FIFOMODE:
+        res=ioctl_fifomode(sc, fd, (int*)data); break;
+
+    case SIS1100_IRQ_CTL:
+        res=ioctl_irq_ctl(sc, fd, (struct sis1100_irq_ctl*)data); break;
+    case SIS1100_IRQ_GET:
+        res=ioctl_irq_get(sc, fd, (struct sis1100_irq_get*)data); break;
+    case SIS1100_IRQ_ACK:
+        res=ioctl_irq_ack(sc, fd, (struct sis1100_irq_ack*)data); break;
+    case SIS1100_IRQ_WAIT:
+        res=ioctl_irq_wait(sc, fd, (struct sis1100_irq_get*)data); break;
+
+    case SIS1100_MINDMALEN:
+        res=ioctl_mindmalen(sc, fd, (int*)data); break;
+
+    case SIS1100_FRONT_IO:
+        res=ioctl_front_io(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_PULSE:
+        res=ioctl_front_pulse(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_FRONT_LATCH:
+        res=ioctl_front_latch(sc, fd, (u_int32_t*)data); break;
+
+    case SIS3100_VME_SUPER_BLOCK_READ:
+        res=ioctl_vme_super_block_read(sc, fd,
+                (struct sis1100_vme_super_block_req*)data);
+        break;
+    case SIS1100_WRITE_PIPE:
+        res=ioctl_write_pipe(sc, fd, (struct sis1100_writepipe*)data); break;
+
+    case SIS1100_DMA_ALLOC:
+        res=ioctl_dma_alloc(sc, fd, (struct sis1100_dma_alloc*)data); break;
+    case SIS1100_DMA_FREE:
+        res=ioctl_dma_free(sc, fd, (struct sis1100_dma_alloc*)data); break;
+
+    case SIS5100_CCCZ:
+        res=ioctl_cccz(sc, fd); break;
+    case SIS5100_CCCC:
+        res=ioctl_cccc(sc, fd); break;
+    case SIS5100_CCCI:
+        res=ioctl_ccci(sc, fd, (int*)data); break;
+    case SIS5100_CNAF:
+        res=ioctl_cnaf(sc, fd, (struct sis1100_camac_req*)data); break;
+    case SIS1100_SWAP:
+        res=ioctl_swap(sc, fd, (int*)data); break;
+    case SIS3100_TIMEOUTS:
+        res=ioctl_3100_timeouts(sc, fd, (int*)data); break;
+
+    case SIS1100_DSP_LOAD:
+        res=sis1100_dsp_load(sc, fd, (struct sis1100_dsp_code*)data); break;
+    case SIS1100_DSP_RESET:
+        res=sis1100_dsp_reset(sc, fd); break;
+    case SIS1100_DSP_START:
+        res=sis1100_dsp_start(sc, fd); break;
+
+#if 0
+    case SIS1100_RESET:
+        res=ioctl_reset(sc, fd); break;
+#endif
+    case SIS1100_REMOTE_RESET:
+        res=ioctl_remote_reset(sc, fd); break;
+    case SIS1100_DEVTYPE:
+        res=ioctl_devtype(sc, fd, (int*)data); break;
+    case SIS1100_DRIVERVERSION:
+        res=ioctl_driverversion(sc, fd, (int*)data); break;
+    case SIS1100_READ_EEPROM:
+        res=ioctl_read_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+    case SIS1100_WRITE_EEPROM:
+        res=ioctl_write_eeprom(sc, fd, (struct sis1100_eeprom_req*)data); break;
+
+    case SIS1100_JTAG_ENABLE:
+        res=ioctl_jtag_enable(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_CTRL:
+        res=ioctl_jtag_ctrl(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_DATA:
+        res=ioctl_jtag_data(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_PUT:
+        res=ioctl_jtag_put(sc, fd, (u_int32_t*)data); break;
+    case SIS1100_JTAG_GET:
+        res=ioctl_jtag_get(sc, fd, (u_int32_t*)data); break;
+
+    default:
+        res=ENOTTY; break;
+    }
+    return res;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    fd->p=p;
+    return _sis1100_ioctl(sc, fd, cmd, data);
+}
+#elif __linux__
+
+union alles {
+    struct vmespace                               vmespace;
+    struct sis1100_vme_req                         vme_req;
+    struct sis1100_vme_block_req             vme_block_req;
+    struct sis1100_ctrl_reg                       ctrl_reg;
+    struct sis1100_pipe                               pipe;
+    struct sis1100_ident                             ident;
+    struct sis1100_irq_ctl                         irq_ctl;
+    struct sis1100_irq_get                         irq_get;
+    struct sis1100_irq_ack                  irq_ackirq_ack;
+    struct sis1100_vme_super_block_req vme_super_block_req;
+    struct sis1100_writepipe                     writepipe;
+    struct sis1100_dma_alloc                     dma_alloc;
+    struct sis1100_camac_req                     camac_req;
+    struct sis1100_dsp_code                       dsp_code;
+    struct sis1100_eeprom_req                   eeprom_req;
+};
+
+#define MAX_DATA (sizeof(union alles))
+
+int
+sis1100_ioctl(struct inode *inode, struct file *file,
+	      unsigned int cmd, unsigned long arg)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    u_int8_t data[MAX_DATA];
+    int res;
+
+    if ((cmd&IOC_INOUT) && (_IOC_SIZE(cmd)>MAX_DATA)) {
+        pINFO(sc, "sis1100_ioctl: cmd=0x%08x _IOC_SIZE(cmd)=%d",
+            cmd, _IOC_SIZE(cmd));
+        return -EINVAL;
+    }
+
+    if (cmd&IOC_IN) {
+        if (copy_from_user(&data, (void *)arg, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    if ((res=_sis1100_ioctl(sc, fd, cmd, &data)))
+            return -res;
+
+    if (cmd&IOC_OUT) {
+        if (copy_to_user((void *)arg, &data, _IOC_SIZE(cmd)))
+                return -EFAULT;
+    }
+    return 0;
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq.c	(revision 22)
@@ -0,0 +1,213 @@
+/* $ZEL: sis1100_irq.c,v 1.7 2004/05/27 23:10:23 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100_enable_irq(struct sis1100_softc* sc,
+    u_int32_t plx_mask, u_int32_t sis_mask)
+{
+    DECLARE_SPINLOCKFLAGS(flags)
+    if (plx_mask) {
+        SPIN_LOCK_IRQSAVE(sc->lock_intcsr, flags);
+        plxwritereg(sc, INTCSR, plxreadreg(sc, INTCSR)|plx_mask);
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_intcsr, flags);
+    }
+
+    if (sis_mask) {
+        sis_mask&=sis1100_all_irq;
+        sis1100writereg(sc, sr, sis_mask); /* clear pending irqs */
+        sis1100writereg(sc, cr, sis_mask); /* enable irqs */
+    }
+    return 0;
+}
+
+int
+sis1100_disable_irq(struct sis1100_softc* sc,
+    u_int32_t plx_mask, u_int32_t sis_mask)
+{
+    DECLARE_SPINLOCKFLAGS(flags)
+    if (plx_mask) {
+        SPIN_LOCK_IRQSAVE(sc->lock_intcsr, flags);
+        plxwritereg(sc, INTCSR, plxreadreg(sc, INTCSR)&~plx_mask);
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_intcsr, flags);
+    }
+
+    if (sis_mask) sis1100writereg(sc, cr, (sis_mask&sis1100_all_irq)<<16);
+    return 0;
+}
+
+/* Doorbell | Local | DMA0 | DMA1 */
+#define HANDLED_IRQS (plxirq_doorbell_active|plxirq_local_active|\
+                      plxirq_dma0_active|plxirq_dma1_active)
+
+#ifdef __NetBSD__
+int
+sis1100_intr(void* vsc)
+#elif __linux__
+irqreturn_t
+sis1100_intr(int irq, void *vsc, struct pt_regs *regs)
+#endif
+{
+    DECLARE_SPINLOCKFLAGS(flags)
+    struct sis1100_softc* sc=(struct sis1100_softc*)vsc;
+    u_int32_t intcsr;
+    int local, handler_command, wakeup_handler, wakeup_local;
+
+    intcsr=plxreadreg(sc, INTCSR);
+    if (!(intcsr & HANDLED_IRQS)) return IRQ_NONE;
+
+    local=0;
+    handler_command=0;
+    wakeup_handler=0;
+    wakeup_local=0;
+
+    if (intcsr&plxirq_doorbell_active) { /* == VME/CAMAC IRQ */
+        u_int32_t help=plxreadreg(sc, L2PDBELL);
+        pINFO(sc, "doorbell irq: doorbell=0x%x", help);
+        SPIN_LOCK_IRQSAVE(sc->lock_doorbell, flags);
+        sc->doorbell|=help;
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_doorbell, flags);
+        plxwritereg(sc, L2PDBELL, help);
+        handler_command|=handlercomm_doorbell;
+        wakeup_handler=1;
+    }
+    if (intcsr&plxirq_local_active) { /* local Interrupt */
+        local=1;
+    }
+    if (intcsr&plxirq_dma0_active) { /* DMA0 Interrupt */
+        SPIN_LOCK_IRQSAVE(sc->lock_intcsr, flags);
+        plxwritereg(sc, INTCSR, intcsr&~plxirq_dma0);
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_intcsr, flags);
+        sc->got_irqs|=got_dma0;
+        wakeup_local=1;
+    }
+    if (intcsr&plxirq_dma1_active) { /* DMA1 Interrupt */
+        SPIN_LOCK_IRQSAVE(sc->lock_intcsr, flags);
+        plxwritereg(sc, INTCSR, intcsr&~plxirq_dma1);
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_intcsr, flags);
+        sc->got_irqs|=got_dma1;
+        wakeup_local=1;
+    }
+    if (local) {
+        u_int32_t status;
+
+        status=sis1100readreg(sc, sr);
+
+        if (status&irq_synch_chg) {
+            sis1100_disable_irq(sc, 0, irq_synch_chg|
+                irq_reset_req|irq_prot_end|irq_prot_l_err);
+
+            sc->got_irqs|=got_sync;
+            wakeup_local=1;
+
+            if ((status&3)==3) {
+                pINFO(sc, "link is UP   status =0x%08x", status);
+            } else {
+                pINFO(sc, "link is DOWN status =0x%08x", status);
+                sc->old_remote_hw=sc->remote_hw;
+                sc->remote_hw=sis1100_hw_invalid;
+                handler_command|=handlercomm_synch;
+                wakeup_handler=1;
+            }
+#ifdef __NetBSD__
+            callout_reset(&sc->link_up_timer, hz, sis1100_link_up_handler, sc);
+#elif __linux__
+            mod_timer(&sc->link_up_timer, jiffies+HZ);
+#endif
+        }
+        if (status&irq_inh_chg)
+                        pERROR(sc, "INH_CHG");
+        if (status&irq_sema_chg)
+                        pERROR(sc, "SEMA_CHG");
+        if (status&irq_rec_violation)
+                        pERROR(sc, "REC_VIOLATION");
+        if (status&irq_reset_req)
+                        pERROR(sc, "RESET_REQ");
+        if (status&irq_dma_eot) {
+            sc->got_irqs|=got_eot;
+            wakeup_local=1;
+        }
+        if (status&irq_mbx0) {
+            sc->mbx0=sis1100readreg(sc, mailext[0]);
+            /*pINFO(sc, "irq: mbx0=0x%x", sc->mbx0);*/
+            handler_command|=handlercomm_mbx0;
+            wakeup_handler=1;
+        }
+#ifdef NEVER
+        if (status&irq_s_xoff) {
+            pINFO(sc, "S_XOFF");
+            pINFO(sc, "status=0x%08x", status);
+            sc->got_irqs|=got_xoff;
+            wakeup_local=1;
+        }
+#endif
+        if (status&irq_lemo_in_chg) {
+            /* pINFO(sc, "LEMO_IN_CHG, status=0x%08x", status); */
+            SPIN_LOCK_IRQSAVE(sc->lock_lemo_status, flags);
+            sc->lemo_status|=(status<<4)&0x30000;
+            SPIN_UNLOCK_IRQRESTORE(sc->lock_lemo_status, flags);
+            sc->last_opt_csr=sis1100readreg(sc, opt_csr);
+            handler_command|=handlercomm_lemo;
+            wakeup_handler=1;
+        }
+        if (status&irq_prot_end) {
+            sc->got_irqs|=got_end;
+            wakeup_local=1;
+        }
+        if (status&irq_prot_l_err) {
+            /*pINFO(sc, "PROT_L_ERR");*/
+            sc->got_irqs|=got_l_err;
+            wakeup_local=1;
+        }
+/*
+ *         pINFO(sc, "irq: write 0x%x to sr", status);
+ */
+        sis1100writereg(sc, sr, status);
+    }
+
+    if (wakeup_local)
+#ifdef __NetBSD__
+        wakeup(&sc->local_wait);
+#elif __linux__
+        wake_up_interruptible(&sc->local_wait);
+#endif
+
+    if (wakeup_handler) {
+        SPIN_LOCK_IRQSAVE(sc->lock_intcsr, flags); /* XXX warum? */
+        sc->handlercommand.command=handler_command;
+        SPIN_UNLOCK_IRQRESTORE(sc->lock_intcsr, flags);
+#ifdef __NetBSD__
+        wakeup(&sc->handler_wait);
+#elif __linux__
+        wake_up(&sc->handler_wait);
+#endif
+    }
+
+    return IRQ_HANDLED;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_handler.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_handler.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_handler.c	(revision 22)
@@ -0,0 +1,222 @@
+/* $ZEL: sis1100_irq_handler.c,v 1.4 2004/05/27 23:10:23 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Wrong Operating System
+#endif
+
+int
+sis1100_irq_ctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_ctl* data)
+{
+    int foreign_irqs;
+    struct list_head* curr;
+    u_int32_t mask;
+
+/*pINFO(sc, "irq_ctl: signal=%d mask=0x%x", data->signal, data->irq_mask);*/
+
+    if (data->signal) {
+        foreign_irqs=0;
+        SEM_LOCK(sc->sem_fdata_list);
+        /* irq already in use? */
+        list_for_each(curr, &sc->fdata_list_head) {
+            struct sis1100_fdata* fd;
+            fd=list_entry(curr, struct sis1100_fdata, list);
+            foreign_irqs |= fd->owned_irqs;
+        }
+        SEM_UNLOCK(sc->sem_fdata_list);
+        if (foreign_irqs & data->irq_mask) {
+            pINFO(sc, "irq_ctl: IRQs owned by other programs: 0x%08x\n",
+                    foreign_irqs);
+            return  EBUSY;
+        }
+
+#ifdef __NetBSD__
+        fd->pid=fd->p->p_pid;
+#elif __linux__
+        fd->pid=current->pid;
+#endif
+        fd->sig=data->signal;
+        fd->owned_irqs |= data->irq_mask;
+        fd->old_remote_hw=sc->remote_hw;
+
+        switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            sis3100rem_enable_irqs(sc, fd, data->irq_mask);
+            break;
+        case sis1100_hw_camac:
+            sis5100rem_enable_irqs(sc, fd, data->irq_mask);
+            break;
+        case sis1100_hw_pci:     break; /* do nothing */
+        case sis1100_hw_f1:      break; /* nothing to be done */
+        case sis1100_hw_vertex:  break; /* do nothing */
+        case sis1100_hw_invalid: break; /* do nothing */
+        }
+        /* enable PCI-FRONT-IRQs and MBX0_IRQ */
+        mask=0;
+        if (data->irq_mask & SIS1100_FRONT_IRQS) {
+            mask|=(data->irq_mask & SIS1100_FRONT_IRQS)>>4;
+        }
+        if (data->irq_mask & SIS1100_MBX0_IRQ) {
+            mask|=0x400;
+        }
+        if (mask) sis1100_enable_irq(sc, 0, mask);
+    } else {
+        int irqs;
+        irqs=fd->owned_irqs & data->irq_mask;
+
+        switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            sis3100rem_disable_irqs(sc, fd, irqs);
+            break;
+        case sis1100_hw_camac:
+            sis5100rem_disable_irqs(sc, fd, irqs);
+            break;
+        case sis1100_hw_pci:     break; /* do nothing */
+        case sis1100_hw_f1:   break; /* do nothing */
+        case sis1100_hw_vertex:  break; /* do nothing */
+        case sis1100_hw_invalid: break; /* do nothing */
+        }
+        /* disable PCI-FRONT-IRQs and MBX0_IRQ */
+        mask=0;
+        if (irqs & SIS1100_FRONT_IRQS) {
+            mask|=(irqs & SIS1100_FRONT_IRQS)>>4;
+        }
+        if (irqs & SIS1100_MBX0_IRQ) {
+            mask|=irq_mbx0;
+        }
+        if (mask) sis1100_disable_irq(sc, 0, mask);
+
+        fd->owned_irqs &= ~data->irq_mask;
+    }
+    /*pINFO(sc, "irq_ctl: sig=%d owned_irqs=0x%x old_remote_hw=%d",
+        fd->sig, fd->owned_irqs, fd->old_remote_hw);*/
+    return 0;
+}
+
+int
+sis1100_irq_ack(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_ack* data)
+{
+    int irqs;
+
+/*
+ * pINFO(sc, "irq_ack: mask=0x%x", data->irq_mask);
+ */
+    irqs=fd->owned_irqs & data->irq_mask & sc->pending_irqs;
+    sc->pending_irqs&=~irqs;
+
+    switch (sc->remote_hw) {
+    case sis1100_hw_vme:
+        sis3100rem_irq_ack(sc, irqs);
+        break;
+    case sis1100_hw_camac:
+        sis5100rem_irq_ack(sc, irqs);
+        break;
+    case sis1100_hw_pci:     break; /* do nothing */
+    case sis1100_hw_f1:   break; /* do nothing */
+    case sis1100_hw_vertex:  break; /* do nothing */
+    case sis1100_hw_invalid: break; /* do nothing */
+    }
+
+    return 0;
+}
+
+int
+sis1100_irq_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_get* data)
+{
+    data->irqs=sc->pending_irqs & fd->owned_irqs;
+    if (fd->old_remote_hw!=sc->remote_hw) {
+        if (sc->remote_hw!=sis1100_hw_invalid)
+            data->remote_status=1;
+        else
+            data->remote_status=-1;
+        fd->old_remote_hw=sc->remote_hw;
+    } else
+        data->remote_status=0;
+
+    if (sc->remote_hw==sis1100_hw_vme)
+        sis3100rem_get_vector(sc, data->irqs & data->irq_mask, data);
+    else {
+        data->level=0;
+        data->vector=0;
+    }
+    return 0;
+}
+
+int
+sis1100_irq_wait(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_get* data)
+{
+    int res=0;
+/*
+    pINFO(sc, "irq_wait: pending=0x%x mask=0x%x",
+            sc->pending_irqs, data->irq_mask);
+*/
+#ifdef __NetBSD__
+    {
+    int s;
+    s = splbio();
+    while (!(res || irq_pending(sc, fd, data->irq_mask))) {
+        res = tsleep(&sc->remoteirq_wait, PCATCH, "sis1100_irq", 0);
+    }
+    splx(s);
+    }
+#elif __linux__
+    res=wait_event_interruptible(sc->remoteirq_wait,
+            irq_pending(sc, fd, data->irq_mask)
+            );
+
+    if (res) return EINTR;
+#endif
+    data->irqs=sc->pending_irqs & fd->owned_irqs;
+    if (fd->old_remote_hw!=sc->remote_hw) {
+        if (sc->remote_hw!=sis1100_hw_invalid)
+            data->remote_status=1;
+        else
+            data->remote_status=-1;
+        fd->old_remote_hw=sc->remote_hw;
+    } else
+        data->remote_status=0;
+
+    data->opt_status=sc->last_opt_csr;
+
+    if (sc->remote_hw==sis1100_hw_vme)
+        sis3100rem_get_vector(sc, data->irqs & data->irq_mask, data);
+    else {
+        data->level=0;
+        data->vector=0;
+    }
+
+    data->mbx0=sc->mbx0;
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c	(revision 22)
@@ -0,0 +1,172 @@
+/* $ZEL: sis1100_irq_thread.c,v 1.5 2004/05/27 23:10:24 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2002-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * this is a kernel thread which sleeps on sc->handler_wait;
+ * it is waked up by doorbell irq,  irq_synch_chg, irq_lemo_in_chg
+ * and link_up_timer;
+ * it is responsable to inform the user process about VME interrupts,
+ * CAMAC LAMs, interrupts caused by front panel IO and insertion or removal
+ * of the optical link
+ */
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Wrong Operating System
+#endif
+
+static void
+_sis1100_irq_thread(struct sis1100_softc* sc, enum handlercomm command)
+{
+    struct list_head* curr;
+    if (command&handlercomm_doorbell) {
+        switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            sis3100rem_irq_handler(sc);
+            break;
+        case sis1100_hw_camac:
+            sis5100rem_irq_handler(sc);
+            break;
+        case sis1100_hw_pci:     break; /* do nothing */
+        case sis1100_hw_f1:      break; /* do nothing */
+        case sis1100_hw_vertex:  break; /* do nothing */
+        case sis1100_hw_invalid: break; /* do nothing */
+        }
+    }
+
+    if (command&handlercomm_lemo) {
+        sis1100_lemo_handler(sc);
+    }
+
+    if (command&handlercomm_mbx0) {
+        sis1100_mbox0_handler(sc);
+    }
+
+    if (command&handlercomm_synch) {
+        sis1100_synch_handler(sc);
+    }
+
+    list_for_each(curr, &sc->fdata_list_head) {
+        struct sis1100_fdata* fd;
+        fd=list_entry(curr, struct sis1100_fdata, list);
+        if (fd->sig && (fd->sig!=-1) &&
+                ((sc->new_irqs & fd->owned_irqs)||
+                        (sc->old_remote_hw!=sc->remote_hw))) {
+#ifdef __linux__
+            int res;
+	    /*            res=kill_proc_info(fd->sig, (void*)0, fd->pid); */
+	    /* replaced according to struck  */
+	    res=kill_proc(fd->pid,fd->sig,0);
+            if (res)
+                pINFO(sc, "send sig %d to %d: res=%d", fd->sig, fd->pid, res);
+#elif __NetBSD__
+            psignal(fd->p, fd->sig);
+#endif
+        }
+    }
+#ifdef __NetBSD__
+    wakeup(&sc->remoteirq_wait);
+    selwakeup(&sc->sel);
+#elif __linux__
+    wake_up_interruptible(&sc->remoteirq_wait);
+#endif
+}
+
+#ifdef __linux__
+int
+#else
+void
+#endif
+sis1100_irq_thread(void* data)
+{
+    struct sis1100_softc* sc=(struct sis1100_softc*)data;
+    enum handlercomm command;
+    DECLARE_SPINLOCKFLAGS(flags);
+
+    pINFO(sc, "sis1100_irq_thread started");
+
+#ifdef __linux__
+#if LINUX_VERSION_CODE < 0x20600
+    daemonize();
+    snprintf(current->comm, sizeof(current->comm), "sis1100_%02d", sc->unit);
+    SPIN_LOCK_IRQSAVE(current->sigmask_lock, flags);
+    sigemptyset(&current->blocked);
+    recalc_sigpending(current);
+    SPIN_UNLOCK_IRQRESTORE(current->sigmask_lock, flags);
+#else
+    daemonize("sis1100_%02d", sc->unit);
+    SPIN_LOCK_IRQSAVE(current->sighand->siglock, flags);
+    sigemptyset(&current->blocked);
+    recalc_sigpending();
+    SPIN_UNLOCK_IRQRESTORE(current->sighand->siglock, flags);
+#endif
+#endif /*__linux__*/
+
+    while (1) {
+#ifdef __NetBSD__
+        tsleep(&sc->handler_wait, PCATCH, "thread_vmeirq", 0);
+#elif __linux__
+        wait_event(sc->handler_wait, sc->handlercommand.command);
+#endif
+        SPIN_LOCK_IRQSAVE(sc->handlercommand.lock, flags);
+        command=sc->handlercommand.command;
+        sc->handlercommand.command=0;
+        SPIN_UNLOCK_IRQRESTORE(sc->handlercommand.lock, flags);
+
+        /*pINFO(sc, "irq_thread aufgewacht, command=0x%x", command);*/
+
+        sc->new_irqs=0;
+
+        if (command&handlercomm_die) {
+            pINFO(sc, "sis1100_irq_thread terminated");
+#ifdef __NetBSD__
+            SPIN_LOCK_IRQSAVE(sc->handlercommand.lock, flags);
+            sc->handlercommand.command=0;
+            wakeup(sc);
+            SPIN_UNLOCK_IRQRESTORE(sc->handlercommand.lock, flags);
+            kthread_exit(0);
+#elif __linux__
+            complete_and_exit(&sc->handler_completion, 0);
+#endif
+        }
+        _sis1100_irq_thread(sc, command);
+
+#ifdef __linux__
+	if (signal_pending (current)) {
+	    SPIN_LOCK_IRQSAVE(current->SIGMASK_LOCK, flags);
+	    flush_signals(current);
+	    SPIN_UNLOCK_IRQRESTORE(current->SIGMASK_LOCK, flags);
+	}
+#endif /*__linux__*/
+
+    }
+#ifdef __linux__
+    return 0;
+#endif
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_irq_thread.c~	(revision 22)
@@ -0,0 +1,170 @@
+/* $ZEL: sis1100_irq_thread.c,v 1.5 2004/05/27 23:10:24 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2002-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * this is a kernel thread which sleeps on sc->handler_wait;
+ * it is waked up by doorbell irq,  irq_synch_chg, irq_lemo_in_chg
+ * and link_up_timer;
+ * it is responsable to inform the user process about VME interrupts,
+ * CAMAC LAMs, interrupts caused by front panel IO and insertion or removal
+ * of the optical link
+ */
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Wrong Operating System
+#endif
+
+static void
+_sis1100_irq_thread(struct sis1100_softc* sc, enum handlercomm command)
+{
+    struct list_head* curr;
+    if (command&handlercomm_doorbell) {
+        switch (sc->remote_hw) {
+        case sis1100_hw_vme:
+            sis3100rem_irq_handler(sc);
+            break;
+        case sis1100_hw_camac:
+            sis5100rem_irq_handler(sc);
+            break;
+        case sis1100_hw_pci:     break; /* do nothing */
+        case sis1100_hw_f1:      break; /* do nothing */
+        case sis1100_hw_vertex:  break; /* do nothing */
+        case sis1100_hw_invalid: break; /* do nothing */
+        }
+    }
+
+    if (command&handlercomm_lemo) {
+        sis1100_lemo_handler(sc);
+    }
+
+    if (command&handlercomm_mbx0) {
+        sis1100_mbox0_handler(sc);
+    }
+
+    if (command&handlercomm_synch) {
+        sis1100_synch_handler(sc);
+    }
+
+    list_for_each(curr, &sc->fdata_list_head) {
+        struct sis1100_fdata* fd;
+        fd=list_entry(curr, struct sis1100_fdata, list);
+        if (fd->sig && (fd->sig!=-1) &&
+                ((sc->new_irqs & fd->owned_irqs)||
+                        (sc->old_remote_hw!=sc->remote_hw))) {
+#ifdef __linux__
+            int res;
+            res=kill_proc_info(fd->sig, (void*)0, fd->pid);
+            if (res)
+                pINFO(sc, "send sig %d to %d: res=%d", fd->sig, fd->pid, res);
+#elif __NetBSD__
+            psignal(fd->p, fd->sig);
+#endif
+        }
+    }
+#ifdef __NetBSD__
+    wakeup(&sc->remoteirq_wait);
+    selwakeup(&sc->sel);
+#elif __linux__
+    wake_up_interruptible(&sc->remoteirq_wait);
+#endif
+}
+
+#ifdef __linux__
+int
+#else
+void
+#endif
+sis1100_irq_thread(void* data)
+{
+    struct sis1100_softc* sc=(struct sis1100_softc*)data;
+    enum handlercomm command;
+    DECLARE_SPINLOCKFLAGS(flags);
+
+    pINFO(sc, "sis1100_irq_thread started");
+
+#ifdef __linux__
+#if LINUX_VERSION_CODE < 0x20600
+    daemonize();
+    snprintf(current->comm, sizeof(current->comm), "sis1100_%02d", sc->unit);
+    SPIN_LOCK_IRQSAVE(current->sigmask_lock, flags);
+    sigemptyset(&current->blocked);
+    recalc_sigpending(current);
+    SPIN_UNLOCK_IRQRESTORE(current->sigmask_lock, flags);
+#else
+    daemonize("sis1100_%02d", sc->unit);
+    SPIN_LOCK_IRQSAVE(current->sighand->siglock, flags);
+    sigemptyset(&current->blocked);
+    recalc_sigpending();
+    SPIN_UNLOCK_IRQRESTORE(current->sighand->siglock, flags);
+#endif
+#endif /*__linux__*/
+
+    while (1) {
+#ifdef __NetBSD__
+        tsleep(&sc->handler_wait, PCATCH, "thread_vmeirq", 0);
+#elif __linux__
+        wait_event(sc->handler_wait, sc->handlercommand.command);
+#endif
+        SPIN_LOCK_IRQSAVE(sc->handlercommand.lock, flags);
+        command=sc->handlercommand.command;
+        sc->handlercommand.command=0;
+        SPIN_UNLOCK_IRQRESTORE(sc->handlercommand.lock, flags);
+
+        /*pINFO(sc, "irq_thread aufgewacht, command=0x%x", command);*/
+
+        sc->new_irqs=0;
+
+        if (command&handlercomm_die) {
+            pINFO(sc, "sis1100_irq_thread terminated");
+#ifdef __NetBSD__
+            SPIN_LOCK_IRQSAVE(sc->handlercommand.lock, flags);
+            sc->handlercommand.command=0;
+            wakeup(sc);
+            SPIN_UNLOCK_IRQRESTORE(sc->handlercommand.lock, flags);
+            kthread_exit(0);
+#elif __linux__
+            complete_and_exit(&sc->handler_completion, 0);
+#endif
+        }
+        _sis1100_irq_thread(sc, command);
+
+#ifdef __linux__
+	if (signal_pending (current)) {
+	    SPIN_LOCK_IRQSAVE(current->SIGMASK_LOCK, flags);
+	    flush_signals(current);
+	    SPIN_UNLOCK_IRQRESTORE(current->SIGMASK_LOCK, flags);
+	}
+#endif /*__linux__*/
+
+    }
+#ifdef __linux__
+    return 0;
+#endif
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_lemo_handler.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_lemo_handler.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_lemo_handler.c	(revision 22)
@@ -0,0 +1,49 @@
+/* $ZEL: sis1100_lemo_handler.c,v 1.3 2004/05/27 23:10:24 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+void
+sis1100_lemo_handler(struct sis1100_softc* sc)
+{
+    DECLARE_SPINLOCKFLAGS(s)
+
+/*
+ *     pINFO(sc, "LEMO_Handler called");
+ *     pINFO(sc, "lemo_status=0x%08x", sc->lemo_status);
+ */
+    SPIN_LOCK_IRQSAVE(sc->lock_lemo_status, s);
+    sc->new_irqs|=sc->lemo_status;
+    sc->pending_irqs|=sc->lemo_status;
+    sc->lemo_status=0;
+    SPIN_UNLOCK_IRQRESTORE(sc->lock_lemo_status, s);
+/*
+ *     pINFO(sc, "sc->pending_irqs=0x%08x sc->new_irqs=0x%08x",
+ *         sc->pending_irqs, sc->new_irqs);
+ */
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_llseek_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_llseek_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_llseek_linux.c	(revision 22)
@@ -0,0 +1,61 @@
+/* $ZEL: sis1100_llseek_linux.c,v 1.2 2004/05/27 23:10:25 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/* llseek is only needed for LINUX */
+
+/* SEEK_... normally defined in stdio.h, fcntl.h and unistd.h */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+loff_t sis1100_llseek(struct file* file, loff_t offset, int orig)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    loff_t old=file->f_pos;
+
+    switch (orig) {
+        case SEEK_SET: file->f_pos=offset; break;
+        case SEEK_CUR: file->f_pos+=offset; break;
+        case SEEK_END:
+            if (fd->subdev==sis1100_subdev_ram) {
+                file->f_pos=sc->ram_size+offset;
+            } else
+                return -EINVAL;
+            break;
+    }
+    if ((file->f_pos<0) ||
+        (file->f_pos>
+            ((fd->subdev==sis1100_subdev_ram)?sc->ram_size:0xffffffffU))) {
+        file->f_pos=old;
+        return -EINVAL;
+    }
+    return file->f_pos;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_map.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_map.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_map.h	(revision 22)
@@ -0,0 +1,144 @@
+/* $ZEL: sis1100_map.h,v 1.4 2004/05/27 23:10:25 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_map_h_
+#define _sis1100_map_h_
+
+struct sis1100_reg {
+    u_int32_t ident;
+    u_int32_t sr;
+    u_int32_t cr;
+    u_int32_t semaphore;
+    u_int32_t doorbell;
+    u_int32_t res0[3];
+    u_int32_t mailbox[8];
+    u_int32_t res1[16];
+    u_int32_t t_hdr;
+    u_int32_t t_am;
+    u_int32_t t_adl;
+    u_int32_t t_adh;
+    u_int32_t t_dal;
+    u_int32_t t_dah;
+    u_int32_t res2;
+    u_int32_t tc_hdr;  
+    u_int32_t tc_dal; 
+    u_int32_t tc_dah;
+    u_int32_t p_balance;
+    u_int32_t prot_error;
+    u_int32_t d0_bc;
+    u_int32_t d0_bc_buf;
+    u_int32_t d0_bc_blen;
+    u_int32_t d_hdr;
+    u_int32_t d_am;
+    u_int32_t d_adl;
+    u_int32_t d_adh;
+    u_int32_t d_bc;
+    u_int32_t res4[2];
+    u_int32_t rd_pipe_buf;
+    u_int32_t rd_pipe_blen;
+    u_int32_t res5[2];
+    u_int32_t tp_special;
+    u_int32_t tp_data;
+    u_int32_t opt_csr;
+    union jtag_csr {
+        u_int32_t jtag_csrl;
+        u_int8_t jtag_csrb[4];
+    } jtag_csr;
+    u_int32_t jtag_data;
+    u_int32_t res6[1];
+    u_int32_t mailext[192];
+
+    struct {
+        u_int32_t hdr;
+        u_int32_t am;
+        u_int32_t adl;
+        u_int32_t adh;
+    } sp1_descr[64];
+};
+
+/* irq bits in sr and cr */
+#define irq_synch_chg     (1<< 4)
+#define irq_inh_chg       (1<< 5)
+#define irq_sema_chg      (1<< 6)
+#define irq_rec_violation (1<< 7)
+#define irq_reset_req     (1<< 8)
+#define irq_dma_eot       (1<< 9)
+#define irq_mbx0          (1<<10)
+/*#define irq_s_xoff        (1<<11)*/
+#define irq_lemo_in_0_chg (1<<12)
+#define irq_lemo_in_1_chg (1<<13)
+#define irq_lemo_in_chg   (irq_lemo_in_0_chg|irq_lemo_in_1_chg)
+#define irq_prot_end      (1<<14)
+#define irq_prot_l_err    (1<<15)
+
+#define sis1100_all_irq          0xfff0
+
+/* bits in sr (without irqs) */
+#define sr_rx_synch     (1<<0)
+#define sr_tx_synch     (1<<1)
+#define sr_synch        (sr_rx_synch|sr_tx_synch)
+#define sr_inhibit      (1<<2)
+#define sr_configured   (1<<3)
+#define sr_dma0_blocked (1<<16)
+#define sr_no_pread_buf (1<<17)
+#define sr_prot_err     (1<<18)
+#define sr_bus_tout     (1<<19)
+#define sr_tp_special   (1<<20)
+#define sr_tp_data      (1<<21)
+#define sr_abort_dma    (1<<31)
+
+/* bits in cr (without irqs) */
+#define cr_reset        (1<<0)
+#define cr_transparent  (1<<1)
+#define cr_ready        (1<<2)
+#define cr_bigendian    (1<<3)
+#define cr_rem_reset    (1<<16)
+
+/* bits in opt_csr  (without "internals") */
+#define opt_lemo_out_0  (1<<4)
+#define opt_lemo_out_1  (1<<5)
+#define opt_led_0       (1<<6)
+#define opt_led_1       (1<<7)
+#define opt_lemo_in_0   (1<<8)
+#define opt_lemo_in_1   (1<<9)
+
+/* error codes */
+#define sis1100_e_dlock     0x005
+#define sis1100_le_synch    0x101
+#define sis1100_le_nrdy     0x102
+#define sis1100_le_xoff     0x103
+#define sis1100_le_resource 0x104
+#define sis1100_le_dlock    0x105
+#define sis1100_le_to       0x107
+#define sis1100_re_nrdy     0x202
+#define sis1100_re_prot     0x206
+#define sis1100_re_to       0x207
+#define sis1100_re_berr     0x208
+#define sis1100_re_ferr     0x209
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mbx0_handler.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mbx0_handler.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mbx0_handler.c	(revision 22)
@@ -0,0 +1,36 @@
+/* $ZEL: sis1100_mbx0_handler.c,v 1.2 2004/05/27 23:10:26 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+void
+sis1100_mbox0_handler(struct sis1100_softc* sc)
+{
+    sc->new_irqs|=SIS1100_MBX0_IRQ;
+    sc->pending_irqs|=SIS1100_MBX0_IRQ;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mmap.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mmap.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_mmap.c	(revision 22)
@@ -0,0 +1,121 @@
+/* $ZEL: sis1100_mmap.c,v 1.4 2004/05/27 23:10:27 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * this is a macro because of different types used by linux and BSD
+ */
+#define _sis1100_mmap(sc, fd, offset, base, size)          \
+    switch (fd->subdev) {                                  \
+        case sis1100_subdev_remote:                        \
+            if (!sc->rem_size) {                           \
+                pINFO(sc, "mmap: remote space not mapped.");\
+                LINUX_RETURN(ENOTTY);                      \
+            }                                              \
+            base=sc->rem_addr;                             \
+            size=sc->rem_size;                             \
+            break;                                         \
+        case sis1100_subdev_ctrl:                          \
+            base=sc->reg_addr;                             \
+            size=sc->reg_size;                             \
+            break;                                         \
+        case sis1100_subdev_ram: /* nobreak */             \
+        case sis1100_subdev_dsp:                           \
+            size=0;                                        \
+    }
+
+#ifdef __NetBSD__
+
+paddr_t
+sis1100_mmap(dev_t handle, off_t off, int prot)
+{
+    struct sis1100_softc* sc = SIS1100SC(handle);
+    struct sis1100_fdata* fd = SIS1100FD(handle);
+
+    u_int32_t size=0;
+    bus_addr_t base=0;
+    if ((fd->subdev!=sis1100_subdev_ctrl) || (off<sc->reg_size)) {
+        _sis1100_mmap(sc, fd, off, base, size)
+        return i386_btop(base+off);
+    } else { /* dma space for pipeline read */
+        if (fd->mmapdma.valid && (off>=fd->mmapdma.off) &&
+                        (off-fd->mmapdma.off<fd->mmapdma.size)) {
+            paddr_t addr=bus_dmamem_mmap(fd->mmapdma.dmat,
+                    &fd->mmapdma.segs, 1,
+                    off-fd->mmapdma.off,
+                    VM_PROT_READ|VM_PROT_WRITE,
+                    BUS_DMA_WAITOK|BUS_DMA_COHERENT);
+            return addr;
+        } else {
+            return -1;
+        }
+    }
+}
+
+#elif __linux__
+
+#undef USE_PCI_MMAP
+
+int
+sis1100_mmap(struct file * file, struct vm_area_struct * vma)
+{
+    struct sis1100_softc *sc = SIS1100SC(file);
+    struct sis1100_fdata *fd = SIS1100FD(file);
+
+    u_int32_t size=0;
+    int error;
+    u_long base=0;
+
+    _sis1100_mmap(sc, fd, vma->vm_pgoff, base, size)
+
+    /*   offset in bytes           + size of mapping          */
+    if ((vma->vm_pgoff<<PAGE_SHIFT)+(vma->vm_end-vma->vm_start)>
+            PAGE_ALIGN(size))
+    	return -EINVAL;
+#ifdef USE_PCI_MMAP
+    /* this does only work if base is a multiple of PAGE_SIZE */
+    vma->vm_pgoff+=base>>PAGE_SHIFT;
+    if ((error=pci_mmap_page_range(sc->pcidev, vma, pci_mmap_mem, 0))<0)
+        return error;
+#else
+    vma->vm_flags |= VM_RESERVED;
+    vma->vm_flags |= VM_IO;
+
+    if ((error=io_remap_page_range(
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+            vma,
+#endif
+            vma->vm_start, base+(vma->vm_pgoff<<PAGE_SHIFT),
+    	    vma->vm_end-vma->vm_start, vma->vm_page_prot))!=0)
+    	return error;
+#endif
+
+    return 0;
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_open.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_open.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_open.c	(revision 22)
@@ -0,0 +1,194 @@
+/* $ZEL: sis1100_open.c,v 1.5 2004/02/10 16:29:44 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004  Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static void
+_sis1100_open(struct sis1100_softc* sc, struct sis1100_fdata* fd, int idx)
+{
+    SEM_LOCK(sc->sem_fdata_list);
+    list_add(&fd->list, &sc->fdata_list_head);
+    SEM_UNLOCK(sc->sem_fdata_list);
+
+    fd->fifo_mode=0;          /* can't be changed for sdram and sharc */
+    fd->vmespace_am=9;        /* useless for sdram and sharc */
+    fd->vmespace_datasize=4;  /* useless for sdram and sharc */
+    fd->last_prot_err=0;
+    fd->sig=0;
+    fd->owned_irqs=0;         /* useless for sdram and sharc */
+    fd->mindmalen_r=24;
+    fd->mindmalen_w=400;
+    fd->mmapdma.valid=0;
+    sc->fdatalist[idx]=fd;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_open(dev_t dev, int flag, int mode, struct proc *p)
+{
+    struct sis1100_softc* sc;
+    struct sis1100_fdata* fd;
+    unsigned int _minor=minor(dev);
+    unsigned int card=(_minor&sis1100_MINORCARDMASK)>>sis1100_MINORCARDSHIFT;
+    unsigned int subdev=(_minor&sis1100_MINORTYPEMASK)>>sis1100_MINORTYPESHIFT;
+    unsigned int idx=_minor&(sis1100_MINORUTMASK);
+
+    if (card >= sis1100cfdriver.cd_ndevs || !sis1100cfdriver.cd_devs[card]) {
+        pINFOsc("open: _minor=%d card=%d idx=%d, returning ENXIO",
+                _minor, card, idx);
+        return ENXIO;
+    }
+
+    sc=SIS1100SC(dev);
+
+    if (sc->fdatalist[idx])
+        return EBUSY;
+
+    fd=malloc(sizeof(struct sis1100_fdata), M_DEVBUF, M_WAITOK);
+    if (!fd) return ENOMEM;
+    fd->p=p;
+
+    fd->sig=0;
+    fd->subdev=subdev;
+
+    simple_lock(&sc->lock_sc_inuse);
+    sc->sc_inuse++;
+    simple_unlock(&sc->sc_inuse);
+
+    sc->fdatalist[idx]=fd;
+    _sis1100_open(sc, fd, idx);
+
+    return 0;
+}
+
+#elif __linux__
+
+int
+sis1100_open(struct inode *inode, struct file *file)
+{
+    struct sis1100_softc* sc;
+    struct sis1100_fdata* fd;
+    unsigned int _minor=iminor(inode);
+    unsigned int card=(_minor&sis1100_MINORCARDMASK)>>sis1100_MINORCARDSHIFT;
+    unsigned int subdev=(_minor&sis1100_MINORTYPEMASK)>>sis1100_MINORTYPESHIFT;
+    unsigned int idx=_minor&sis1100_MINORUTMASK;
+
+    if (card >= sis1100_MAXCARDS || !sis1100_devdata[card]) {
+        printk(KERN_INFO "sis1100 open: returning ENXIO\n");
+        return -ENXIO; /*ENODEV*/
+    }
+    sc=sis1100_devdata[card];
+
+    if (sc->fdatalist[idx]) {
+        return -EBUSY;
+    }
+
+    fd=kmalloc(sizeof(struct sis1100_fdata), GFP_KERNEL);
+    if (!fd) return -ENOMEM;
+    fd->sc=sc;
+    fd->subdev=subdev;
+    file->private_data = fd;
+
+    _sis1100_open(sc, fd, idx);
+
+    return 0;
+}
+#endif
+
+static void
+_sis1100_close(struct sis1100_softc* sc, struct sis1100_fdata* fd, int idx)
+{
+    u_int32_t mask;
+
+    switch (sc->remote_hw) {
+    case sis1100_hw_vme:
+        if (fd->owned_irqs & SIS3100_IRQS) {
+            sis3100writeremreg(sc, vme_irq_sc,
+                    (fd->owned_irqs & SIS3100_IRQS)<<16, 0);
+        }
+        break;
+    case sis1100_hw_camac:
+        if (fd->owned_irqs & SIS5100_IRQS) {
+            /*sis5100writeremreg(sc, vme_irq_sc,
+                    (fd->owned_irqs & SIS5100_IRQS)<<16, 0);*/
+        }
+        break;
+    case sis1100_hw_pci: break; /* do nothing */
+    case sis1100_hw_f1: break; /* do nothing */
+    case sis1100_hw_vertex: break; /* do nothing */
+    case sis1100_hw_invalid: break; /* do nothing */
+    }
+
+    mask=0;
+    if (fd->owned_irqs & SIS1100_FRONT_IRQS) {
+        mask|=(fd->owned_irqs & SIS1100_FRONT_IRQS)>>4;
+    }
+    if (fd->owned_irqs & SIS1100_MBX0_IRQ) {
+        mask|=irq_mbx0;
+    }
+    if (mask) sis1100_disable_irq(sc, 0, mask);
+
+    /*if (fd->mmapdma.valid) sis1100_dma_free(sc, fd, 0);*/
+    SEM_LOCK(sc->sem_fdata_list);
+    list_del(&fd->list);
+    SEM_UNLOCK(sc->sem_fdata_list);
+    sc->fdatalist[idx]=0;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_close(dev_t dev, int flag, int mode, struct proc *p)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    unsigned int minor=minor(dev);
+    unsigned int idx=minor&(sis1100_MINORUTMASK);
+
+
+    _sis1100_close(sc, fd, idx);
+
+    free(fd, M_DEVBUF);
+    simple_lock(&sc->lock_sc_inuse);
+    sc->sc_inuse--;
+    simple_unlock(&sc->sc_inuse);
+    return 0;
+}
+#elif __linux__
+int
+sis1100_release(struct inode *inode, struct file *file)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    unsigned int _minor=iminor(inode);
+    unsigned int idx=_minor&(sis1100_MINORUTMASK);
+
+    _sis1100_close(sc, fd, idx);
+
+    kfree(fd);
+    return 0;
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_linux.c	(revision 22)
@@ -0,0 +1,125 @@
+/* $ZEL: sis1100_pipe_linux.c,v 1.2 2004/05/27 23:10:27 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100_read_pipe(struct sis1100_softc* sc, struct sis1100_pipe* control)
+{
+    struct sis1100_pipelist* list;
+    struct sis1100_dmabuf dmabuf;
+    int i, error, balance=0, res=0, num;
+
+    list=kmalloc(control->num*sizeof(struct sis1100_pipelist), GFP_USER);
+    if (!list) return ENOMEM;
+
+    if (copy_from_user(list, control->list,
+    	    control->num*sizeof(struct sis1100_pipelist))) {
+    	kfree(list);
+    	return EFAULT;
+    }
+
+    /* how many bytes do we have to read? */
+    dmabuf.size=0;
+    for (i=0; i<control->num; i++) {
+        if (!list[i].head&0x400) dmabuf.size+=sizeof(u_int32_t);
+    }
+
+    if (dmabuf.size) {
+        dmabuf.cpu_addr=pci_alloc_consistent(sc->pcidev,
+    	    dmabuf.size, &dmabuf.dma_handle);
+        if (!dmabuf.cpu_addr) {
+    	    kfree(list);
+    	    return ENOMEM;
+        }
+    } else {
+        dmabuf.size=0;
+        dmabuf.dma_handle=0;
+    }
+
+    down(&sc->sem_hw);
+    sis1100writereg(sc, rd_pipe_buf, dmabuf.dma_handle);
+    sis1100writereg(sc, rd_pipe_blen, dmabuf.size);
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+
+    sis1100writereg(sc, t_hdr, 0); /* avoid premature start */
+    for (i=0; i<control->num; i++) {
+    	u_int32_t head;
+
+    	sis1100writereg(sc, t_am, list[i].am);
+    	sis1100writereg(sc, t_adl, list[i].addr);
+
+    	head=(list[i].head&0x0f3f0400) /* be, remote space and w/r */
+                          |0x00400001; /* local space 1, am, start */
+ 
+    	if (list[i].head&0x400) { /* write request */
+    	    sis1100writereg(sc, t_dal, list[i].data);
+	    head&=~0x00400000; /* no pipeline mode */
+    	}
+    	sis1100writereg(sc, t_hdr, head);
+    }
+
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, 0, irq_prot_end);
+
+    res=wait_event_interruptible(
+            sc->local_wait,
+            ((balance=sis1100readreg(sc, p_balance))==0)
+        );
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+
+    error=sis1100readreg(sc, prot_error);
+    if (!balance) sis1100writereg(sc, p_balance, 0);
+
+    if (error||res) {
+    	/*printk(KERN_INFO
+    	    "sis1100_read_pipe: error=0x%0x, res=%d\n", error, res);
+	dump_glink_status(sc, "after pipe", 1);*/
+    	sis1100_flush_fifo(sc, "pipe", 1);
+    }
+    num=dmabuf.size-sis1100readreg(sc, rd_pipe_blen);
+    up(&sc->sem_hw);
+
+    control->error=error;
+    control->num=num;
+
+    kfree(list);
+    if (copy_to_user(control->data, dmabuf.cpu_addr, dmabuf.size)) {
+    	/*mem_map_unreserve(virt_to_page(dmabuf.cpu_addr));*/
+    	pci_free_consistent(sc->pcidev, dmabuf.size,
+    	    dmabuf.cpu_addr, dmabuf.dma_handle);
+    	res=EFAULT;
+    }
+    if (dmabuf.size)
+        pci_free_consistent(sc->pcidev, dmabuf.size, dmabuf.cpu_addr,
+            dmabuf.dma_handle);
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_pipe_netbsd.c	(revision 22)
@@ -0,0 +1,153 @@
+/* $ZEL: sis1100_pipe_netbsd.c,v 1.2 2004/05/27 23:10:28 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100_read_pipe(struct sis1100_softc* sc, struct sis1100_pipe* control)
+{
+    struct sis1100_pipelist* list;
+    struct mmapdma dmabuf;
+    int rsegs, i, error, balance=0, res=0, num, s;
+
+    list=malloc(control->num*sizeof(struct sis1100_pipelist),
+            M_IOCTLOPS, M_WAITOK);
+    if (!list) return ENOMEM;
+
+    if (copyin(control->list, list,
+            control->num*sizeof(struct sis1100_pipelist))) {
+        free(list, M_IOCTLOPS);
+    	res=EFAULT;
+        goto raus_malloc;
+    }
+
+    /* how many bytes do we have to read? */
+/*
+    dmabuf.size=0;
+    for (i=0; i<control->num; i++) {
+        if (!list[i].head&0x400) dmabuf.size+=sizeof(u_int32_t);
+    }
+*/
+    dmabuf.size=control->num;
+
+    dmabuf.dmat=sc->sc_dmat;
+    res=bus_dmamem_alloc(dmabuf.dmat, dmabuf.size, 0, 0,
+         &dmabuf.segs, 1, &rsegs, BUS_DMA_WAITOK);
+    if (res) {
+        pINFO(sc, "pipe: dmamem_alloc(%ld) failed", dmabuf.size);
+        goto raus_malloc;
+    }
+    res=bus_dmamem_map(dmabuf.dmat, &dmabuf.segs, 1,
+        dmabuf.size, &dmabuf.kva,
+        BUS_DMA_WAITOK|BUS_DMA_COHERENT);
+    if (res) {
+        pINFO(sc, "pipe: bus_dmamem_map(%ld) failed", dmabuf.size);
+        goto raus_bus_dmamem_alloc;
+    }
+    res=bus_dmamap_create(dmabuf.dmat, dmabuf.size, 1,
+             dmabuf.size, 0, BUS_DMA_WAITOK, &dmabuf.dm);
+    if (res) {
+        pINFO(sc, "pipe: bus_dmamap_create(%ld) failed", dmabuf.size);
+        goto raus_bus_dmamem_map;
+    }
+    res=bus_dmamap_load(dmabuf.dmat, dmabuf.dm, dmabuf.kva,
+             dmabuf.size, NULL, BUS_DMA_WAITOK);
+    if (res) {
+        pINFO(sc, "pipe: bus_dmamap_load(%ld) failed", dmabuf.size);
+        goto raus_bus_dmamap_create;
+    }
+
+    bus_dmamap_sync(dmabuf.dmat, dmabuf.dm, 0, dmabuf.size, BUS_DMASYNC_PREREAD);
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, rd_pipe_buf, dmabuf.segs.ds_addr);
+    sis1100writereg(sc, rd_pipe_blen, dmabuf.size);
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+
+    sis1100writereg(sc, t_hdr, 0); /* avoid premature start */
+    for (i=0; i<control->num; i++) {
+    	u_int32_t head;
+
+    	sis1100writereg(sc, t_am, list[i].am);
+    	sis1100writereg(sc, t_adl, list[i].addr);
+
+    	head=(list[i].head&0x0f3f0400) /* be, remote space and w/r */
+                          |0x00400001; /* local space 1, am, start */
+ 
+    	if (list[i].head&0x400) { /* write request */
+    	    sis1100writereg(sc, t_dal, list[i].data);
+	    head&=~0x00400000; /* no pipeline mode */
+    	}
+    	sis1100writereg(sc, t_hdr, head);
+    }
+
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, 0, irq_prot_end);
+
+    s = splbio();
+    while (!(res||((balance=sis1100readreg(sc, p_balance))==0))) {
+            res = tsleep(&sc->local_wait, PCATCH, "pipe", 10*hz);
+    }
+    splx(s);
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+
+    error=sis1100readreg(sc, prot_error);
+    if (!balance) sis1100writereg(sc, p_balance, 0);
+
+    if (error||res) {
+    	/*printk(KERN_INFO
+    	    "sis1100_read_pipe: error=0x%0x, res=%d\n", error, res);
+	dump_glink_status(sc, "after pipe", 1);*/
+    	sis1100_flush_fifo(sc, "pipe", 1);
+    }
+    num=dmabuf.size-sis1100readreg(sc, rd_pipe_blen);
+    SEM_UNLOCK(sc->sem_hw);
+    bus_dmamap_sync(dmabuf.dmat, dmabuf.dm, 0, dmabuf.size, BUS_DMASYNC_POSTREAD);
+
+    control->error=error;
+    control->num=num;
+
+    if (copyout(dmabuf.kva, control->data, num)) {
+    	res=EFAULT;
+        goto raus_bus_dmamap_load;
+    }
+
+raus_bus_dmamap_load:
+    bus_dmamap_unload(dmabuf.dmat, dmabuf.dm);
+raus_bus_dmamap_create:
+    bus_dmamap_destroy(dmabuf.dmat, dmabuf.dm);
+raus_bus_dmamem_map:
+    bus_dmamem_unmap(dmabuf.dmat, dmabuf.kva, dmabuf.size);
+raus_bus_dmamem_alloc:
+    bus_dmamem_free(dmabuf.dmat, &dmabuf.segs, 1);
+raus_malloc:
+    free(list, M_IOCTLOPS);
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_poll.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_poll.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_poll.c	(revision 22)
@@ -0,0 +1,77 @@
+/* $ZEL: sis1100_poll.c,v 1.3 2004/05/27 23:10:29 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#ifdef __NetBSD__
+
+int
+sis1100_poll(dev_t dev, int events, struct proc *p)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    int s;
+/*
+    pINFO(sc, "poll: events=0x%x pending=0x%x owned=0x%x", events,
+        sc->pending_irqs, fd->owned_irqs);
+*/
+    s = splbio();
+
+    if (events & (POLLIN | POLLRDNORM)) {
+        if (irq_pending(sc, fd, fd->owned_irqs)) {
+            /*pINFO(sc, "poll: successfull");*/
+            splx(s);
+            return (events & (POLLIN | POLLRDNORM));
+        }
+        selrecord(p, &sc->sel);
+    }
+    splx(s);
+    return 0;
+}
+
+#elif __linux__
+
+unsigned int
+sis1100_poll(struct file* file, struct poll_table_struct* poll_table)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+
+/*
+ *     pINFO(sc, "poll: pending=0x%x poll_table=%p", sc->pending_irqs, poll_table);
+ */
+
+    poll_wait(file, &sc->remoteirq_wait, poll_table);
+
+    if (irq_pending(sc, fd, fd->owned_irqs))
+        return POLLIN|POLLRDNORM;
+    else
+        return 0;
+}
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read.c	(revision 22)
@@ -0,0 +1,157 @@
+/* $ZEL: sis1100_read.c,v 1.5 2004/05/27 23:10:29 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static int
+sis1100_read_irqdata(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    size_t count, size_t* count_read, void* data, int nonblocking)
+{
+    struct sis1100_irq_ack ack;
+    struct sis1100_irq_get get;
+    int res;
+
+    if (count!=sizeof(struct sis1100_irq_get)) return EINVAL;
+/*
+    if (!nonblocking)
+        pINFO(sc, "read_irqdata: !O_NONBLOCK");
+*/
+    if (nonblocking && !irq_pending(sc, fd, fd->owned_irqs))
+        return EAGAIN;
+
+    get.irq_mask=fd->owned_irqs;
+    res=sis1100_irq_wait(sc, fd, &get);
+    if (res) {
+        pINFO(sc, "read_irqdata: res=%d", res);
+        return res;
+    }
+
+    ack.irq_mask=get.irqs;
+    sis1100_irq_ack(sc, fd, &ack);
+/*
+pINFO(sc, "read_irqdata: irqs=0x%x remote_hw=%d",
+        get.irqs, get.remote_status);
+*/
+    if (
+#ifdef __NetBSD__
+        copyout(&get, data, sizeof(struct sis1100_irq_get))
+#elif __linux__
+        copy_to_user(data, &get, sizeof(struct sis1100_irq_get))
+#endif
+    ) return EFAULT;
+
+    *count_read=sizeof(struct sis1100_irq_get);
+    return 0;
+}
+
+static int
+_sis1100_read(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    size_t count, size_t* count_read, u_int32_t addr, void* data,
+    int nonblocking)
+{
+    int32_t am;
+    int datasize;
+    int space, fifo;
+    int res;
+/*
+ * pINFO(sc, "read: subdev=%d", fd->subdev);
+ */
+    switch (fd->subdev) {
+    case sis1100_subdev_ram:
+        am=-1;
+        datasize=4;
+        space=6;
+        fifo=0;
+        break;
+    case sis1100_subdev_remote:
+        am=fd->vmespace_am;
+        datasize=fd->vmespace_datasize;
+        space=1;
+        fifo=fd->fifo_mode;
+        break;
+    case sis1100_subdev_ctrl:
+        return sis1100_read_irqdata(sc, fd, count, count_read, data,
+                nonblocking);
+    case sis1100_subdev_dsp:
+    default:
+        /* just to avoid warning: ... might be used uninitialized */
+        am=0;
+        datasize=0;
+        space=0; fifo=0;
+        return ENOTTY;
+    }
+
+    if (count%datasize) return EINVAL;
+
+    res=sis1100_read_block(sc, fd,
+        datasize, fifo, count/datasize, count_read, space, am,
+        addr, data, &fd->last_prot_err);
+    *count_read*=datasize;
+    if (!count_read && (count!=0)) res=EIO;
+    return res;
+}
+
+#ifdef __NetBSD__
+
+int
+sis1100_read(dev_t dev, struct uio* uio, int f)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    size_t count, count_read;
+    u_int32_t addr;
+    void* data;
+    int res;
+
+    count=uio->uio_resid;
+    addr=uio->uio_offset;
+    data=uio->uio_iov->iov_base;
+
+    res=_sis1100_read(sc, fd, count, &count_read, addr, data,
+            0 /* XXX O_NONBLOCK !! */);
+    if (!res) uio->uio_resid-=count_read;
+    return res;
+}
+
+#elif __linux__
+
+ssize_t sis1100_read(struct file* file, char* buf, size_t count,
+    loff_t* ppos)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    size_t count_read;
+    int res;
+
+    res=_sis1100_read(sc, fd, count, &count_read, *ppos, buf,
+            file->f_flags&O_NONBLOCK);
+    if (!res) *ppos+=count_read;
+    return res?-res:count_read;
+}
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_block.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_block.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_block.c	(revision 22)
@@ -0,0 +1,80 @@
+/* $ZEL: sis1100_read_block.c,v 1.2 2004/05/27 23:10:30 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+/*
+ * size    : number of bytes per dataword (1, 2 or 4)
+ * num     : number of words to be read
+ * num_read: number of words read
+ */
+
+int
+sis1100_read_block(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        int size, int fifo, size_t num, size_t* num_read, int space,
+        int32_t am, u_int32_t addr, u_int8_t* data, u_int32_t* error)
+{
+    if (!num) {*error=0; *num_read=0; return 0;}
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+
+    if (!ACCESS_OK(data, num*size, 0)) return EFAULT;
+
+    if (num==1) {
+        u_int32_t val;
+        *error=sis1100_tmp_read(sc, addr, am, size, space, &val);
+
+        switch (size) {
+#ifdef __NetBSD__
+	case 4: suword(data, val); break;
+	case 2: susword(data, val); break;
+	case 1: subyte(data, val); break;
+#elif __linux__
+	case 4: __put_user(val, (u_int32_t*)data); break;
+	case 2: __put_user(val, (u_int16_t*)data); break;
+	case 1: __put_user(val, (u_int8_t*)data); break;
+#endif
+        }
+        *num_read=!*error;
+        return 0;
+    } else {
+        int res;
+        /*if ((size==4)&&fd->mindmalen_r&&(num>=fd->mindmalen_r)) {*/
+        if (fd->mindmalen_r && (num>=fd->mindmalen_r)) {
+            res=sis1100_read_dma(sc, fd, addr, am, size,
+                    space, fifo, num, num_read, data, error);
+        } else {
+            res=sis1100_read_loop(sc, fd, addr, am, size,
+                    space, fifo, num, num_read, data, error);
+        }
+        return res;
+    }
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c	(revision 22)
@@ -0,0 +1,74 @@
+/* $ZEL: sis1100_read_dma.c,v 1.3 2004/05/27 23:10:30 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+sis1100_read_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize (1, 2 or 4) */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_err
+    )
+{
+    int res, eot;
+    size_t _count_read, orig_count=count;
+
+    SEM_LOCK(sc->sem_hw);
+    do {
+      /* xxxx mki 6.7.04 */
+        size_t counter;
+
+        printk(KERN_INFO "DMA blocklett count before %8.8x \n", count);
+        
+        res=_sis1100_read_dma(sc, fd, addr, am, size, space, fifo_mode,
+                count, &_count_read, data, prot_err, &eot);
+
+        if (res) break;
+
+        counter=_count_read*size;
+        if (!fifo_mode) addr+=counter;
+        data+=counter;
+        count-=_count_read;
+        printk(KERN_INFO "DMA blocklett count after %8.8x addr: %8.8x eot: %d\n", count,addr,eot);
+	/* } while (count && !eot && !*prot_err); */
+    } while (count && !res && !*prot_err);
+
+    SEM_UNLOCK(sc->sem_hw);
+
+    *count_read=orig_count-count;
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c.~1.3.~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c.~1.3.~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma.c.~1.3.~	(revision 22)
@@ -0,0 +1,69 @@
+/* $ZEL: sis1100_read_dma.c,v 1.3 2004/05/27 23:10:30 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+sis1100_read_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize (1, 2 or 4) */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_err
+    )
+{
+    int res, eot;
+    size_t _count_read, orig_count=count;
+
+    SEM_LOCK(sc->sem_hw);
+    do {
+        size_t counter;
+
+        res=_sis1100_read_dma(sc, fd, addr, am, size, space, fifo_mode,
+                count, &_count_read, data, prot_err, &eot);
+
+        if (res) break;
+
+        counter=_count_read*size;
+        if (!fifo_mode) addr+=counter;
+        data+=counter;
+        count-=_count_read;
+    } while (count && !eot && !*prot_err);
+
+    SEM_UNLOCK(sc->sem_hw);
+
+    *count_read=orig_count-count;
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_linux.c	(revision 22)
@@ -0,0 +1,262 @@
+/* $ZEL: sis1100_read_dma_linux.c,v 1.5 2004/05/27 23:10:31 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+_sis1100_read_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 or 2 */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_error,          /* protocol error (or 0) */
+    int* eot                  /* end of transport indicator */
+    )
+{
+    int res, i, sgcount, aborted=0;
+    u_int32_t head, dmamode;
+    sigset_t oldset;
+#ifdef USE_SGL
+    int nr_pages;
+#else
+    struct kiobuf* iobuf=sc->iobuf;
+    int err, offs;
+#endif
+    /*
+    printk(KERN_ERR "r addr=%d size=%d fifo=%d count=%lld data=%p\n",
+                addr, size, fifo_mode, (unsigned long long)count, data);
+    */
+    count*=size;
+    if (count>DMA_MAX) count=DMA_MAX;
+    /*
+    printk(KERN_ERR "DMA_MAX=%ld count=%lld SGL_SIZE=%d\n",
+            DMA_MAX, (unsigned long long)count, SGL_SIZE);
+    */
+    {
+        u_int32_t val;
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) {
+            printk(KERN_CRIT "sis1100_read_dma: DMACSR0=%04x\n", val);
+            printk(KERN_CRIT "sis1100_read_dma: old DMA still active.\n");
+            return EIO;
+        }
+    }
+
+#ifdef USE_SGL
+    nr_pages=sgl_map_user_pages(sc->sglist, SGL_SIZE, data, count, READ);
+    /*printk(KERN_ERR "R nr_pages=%d\n", nr_pages);*/
+    if (nr_pages<0) {
+        printk(KERN_INFO "sis1100[%d] sgl_map_user_pages failed\n", sc->unit);
+        return -nr_pages;
+    }
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, nr_pages,
+        PCI_DMA_FROMDEVICE/*|0xf000*/);
+    /*printk(KERN_ERR "R sgcount=%d\n", sgcount);*/
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] read_dma: pci_map_sg failed\n", sc->unit);
+        sgl_unmap_user_pages(sc->sglist, nr_pages, 0);
+        return EIO;
+    }
+#else
+    err=map_user_kiobuf(READ, iobuf, (unsigned long)data, count);
+    if (err) {
+        printk(KERN_INFO "sis1100[%d] map_user_kiobuf failed\n", sc->unit);
+        return err;
+    }
+    offs=iobuf->offset;
+    for (i=0; i<iobuf->nr_pages-1; i++) {
+        sc->sglist[i].address=0;
+        sc->sglist[i].page=iobuf->maplist[i];
+        sc->sglist[i].offset=offs;
+        sc->sglist[i].length=PAGE_SIZE-offs;
+        sc->sglist[i].dma_length=0;
+        offs=0;
+    }
+    sc->sglist[i].address=0;
+    sc->sglist[i].page=iobuf->maplist[i];
+    sc->sglist[i].offset=offs;
+    sc->sglist[i].length=iobuf->length-i*PAGE_SIZE+iobuf->offset-offs;
+    sc->sglist[i].dma_length=0;
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, iobuf->nr_pages,
+            PCI_DMA_FROMDEVICE);
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] read_dma: pci_map_sg failed\n",
+            sc->unit);
+        unmap_kiobuf(iobuf);
+        return EIO;
+    }
+#endif
+
+    dmamode=0x43|(1<<7)|(1<<8)|(1<<10)|(1<<11)|(1<<12)|(1<<14)|(1<<17);
+    if (sgcount>1) { /* use scatter/gather mode */
+        struct plx9054_dmadesc* desclist=
+            (struct plx9054_dmadesc*)sc->descbuf.cpu_addr;
+        struct scatterlist* sgl=sc->sglist;
+        dma_addr_t next_handle=sc->descbuf.dma_handle;
+        dmamode|=1<<9;
+        for (i=sgcount; i; i--) {
+            next_handle+=sizeof(struct plx9054_dmadesc);
+            desclist->pcistart=cpu_to_le32(sg_dma_address(sgl));
+            desclist->localstart=cpu_to_le32(0);
+            desclist->size=cpu_to_le32(sg_dma_len(sgl));
+            desclist->next=cpu_to_le32(next_handle|9);
+            desclist++; sgl++;
+        }
+        desclist[-1].next|=2;
+        plxwritereg(sc, DMADPR0, sc->descbuf.dma_handle|1);
+    } else { /* only one page --> use block mode */
+        plxwritereg(sc, DMAPADR0, sg_dma_address(sc->sglist));
+        plxwritereg(sc, DMALADR0, 0);
+        plxwritereg(sc, DMASIZ0, sg_dma_len(sc->sglist));
+        plxwritereg(sc, DMADPR0, 8);
+    }
+
+/* prepare PLX */
+    plxwritereg(sc, DMACSR0_DMACSR1, 1<<3); /* clear irq */
+    plxwritereg(sc, DMAMODE0, dmamode);
+
+/* prepare add on logic */
+    /* 4 Byte, local space 2, BT, EOT, start with t_adl */
+    head=0x0080A002|((0x00f00000<<size)&0x0f000000)|(space&0x3f)<<16;
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    if (fifo_mode) head|=0x4000;
+    sis1100writereg(sc, t_hdr, head);
+    wmb();
+    sis1100writereg(sc, t_dal, count);
+
+    sis1100writereg(sc, d0_bc, 0);
+    sis1100writereg(sc, d0_bc_buf, 0);
+
+    sis1100writereg(sc, p_balance, 0);
+    sis1100writereg(sc, sr, 0x200); /* clear EOT */
+
+/* block signals */
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    oldset = current->blocked;
+    sigfillset(&current->blocked);
+    sigdelset(&current->blocked, SIGKILL);
+    /* dangerous, should be removed later */
+    /*if (!sigismember(&oldset, SIGINT)) sigdelset(&current->blocked, SIGINT);*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+/* enable dma */
+    plxwritereg(sc, DMACSR0_DMACSR1, 3);
+
+/* enable irq */
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, plxirq_dma0, irq_synch_chg|irq_prot_l_err);
+
+/* start transfer */
+    mb();
+    sis1100writereg(sc, t_adl, addr);
+    wmb();
+
+/* wait for dma */
+    res=wait_event_interruptible(
+	sc->local_wait,
+	(sc->got_irqs & (got_dma0|got_sync|got_l_err))
+	);
+    sis1100_disable_irq(sc, plxirq_dma0, irq_prot_l_err);
+/*
+    if (sc->got_irqs&got_dma0) pINFO(sc, "got_dma0");
+    if (sc->got_irqs&got_sync) pINFO(sc, "got_sync");
+    if (sc->got_irqs&got_l_err) pINFO(sc, "got_l_err");
+*/
+    if (sc->got_irqs&(got_dma0|got_l_err)) { /* transfer complete or error */
+        *count_read=sis1100readreg(sc, d0_bc)/size;
+    } else /*(res||(sc->got_irqs&(got_sync)))*/ { /* fatal */
+        aborted=0x300;
+        if (res) {
+            printk(KERN_WARNING "sis1100[%d] read_dma: interrupted\n", sc->unit);
+            aborted|=1;
+        }
+        if (sc->got_irqs&got_sync) {
+            printk(KERN_WARNING "sis1100[%d] read_dma: synchronisation lost\n",
+                    sc->unit);
+            aborted|=2;
+        }
+        if (aborted==0x300) {
+            printk(KERN_CRIT "sis1100[%d] read_dma: got_irqs=0x%x\n",
+                    sc->unit, sc->got_irqs);
+        }
+    }
+    if (!(sc->got_irqs&got_dma0)) {
+        u_int32_t val;
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) { /* DMA not stopped yet; abort it */
+            sis1100writereg(sc, sr, sr_abort_dma);
+            do {
+                val=plxreadreg(sc, DMACSR0_DMACSR1);
+            } while (!(val&0x10));
+        }
+    }
+
+    plxwritereg(sc, DMACSR0_DMACSR1, 0);
+
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    current->blocked = oldset;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+#ifdef USE_SGL
+    pci_unmap_sg(sc->pcidev, sc->sglist, nr_pages, PCI_DMA_FROMDEVICE);
+    sgl_unmap_user_pages(sc->sglist, nr_pages, 1);
+#else
+    pci_unmap_sg(sc->pcidev, sc->sglist, iobuf->nr_pages, PCI_DMA_FROMDEVICE);
+    unmap_kiobuf(iobuf);
+#endif
+
+    *prot_error=sis1100readreg(sc, prot_error);
+    *eot=!!(sis1100readreg(sc, sr)&0x200);
+
+    /*if (aborted) sis1100_dump_glink_status(sc, "after abort", 1);*/
+    if (aborted) sis1100_flush_fifo(sc, "after abort", 0);
+    if (aborted) *prot_error=aborted;
+    if ((*prot_error!=0) && ((*prot_error&0x200)!=0x200)) res=EIO;
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_dma_netbsd.c	(revision 22)
@@ -0,0 +1,193 @@
+/* $ZEL: sis1100_read_dma_netbsd.c,v 1.3 2004/05/27 23:10:31 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+_sis1100_read_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 for DMA but is not checked*/
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_error,          /* protocol error */
+    int* eot                  /* end of transport indicator */
+    )
+{
+    int res, i, aborted=0, s;
+    u_int32_t head;
+    struct plx9054_dmadesc *dd;
+    u_int32_t nextptr;
+
+    count*=size;
+    if (count>MAX_DMA_LEN) count=MAX_DMA_LEN;
+
+    res = uvm_vslock(fd->p, data, count, VM_PROT_READ|VM_PROT_WRITE);
+    if (res) {
+        pINFO(sc, "uvm_vslock failed");
+        return res;
+    }
+
+    res=bus_dmamap_load(sc->sc_dma.dmat, sc->sc_dma.userdma,
+             data, count, fd->p, BUS_DMA_NOWAIT);
+    if (res) {
+        uvm_vsunlock(fd->p, data, count);
+        pINFO(sc, "bus_dmamap_load failed");
+        return res;
+    }
+    dd = sc->sc_dma.descs;
+    nextptr = 0x0000000a;
+    for (i = sc->sc_dma.userdma->dm_nsegs - 1; i >= 0; i--) {
+        dd[i].pcistart = sc->sc_dma.userdma->dm_segs[i].ds_addr;
+        dd[i].size = sc->sc_dma.userdma->dm_segs[i].ds_len;
+        dd[i].localstart = 0;
+        dd[i].next = nextptr;
+        nextptr = (sc->sc_dma.descdma->dm_segs[0].ds_addr +
+                i * sizeof(struct plx9054_dmadesc)) | 9;
+    }
+
+/* prepare PLX */
+    plxwritereg(sc, DMACSR0_DMACSR1, 1<<3); /* clear irq */
+    plxwritereg(sc, DMAMODE0, 0x43|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<11)|
+        (1<<12)|(1<<14)|(1<<17));
+    plxwritereg(sc, DMADPR0, nextptr);
+
+
+/* prepare add on logic */
+    /* 4 Byte, local space 2, BT, EOT, start with t_adl */
+    head=0x0080A002|((0x00f00000<<size)&0x0f000000)|(space&0x3f)<<16;
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    if (fifo_mode) head|=0x4000;
+    sis1100writereg(sc, t_hdr, head);
+    /*wmb();*/
+    sis1100writereg(sc, t_dal, count);
+
+    sis1100writereg(sc, d0_bc, 0);
+    sis1100writereg(sc, d0_bc_buf, 0);
+    sis1100writereg(sc, d0_bc_blen, 0);
+
+    sis1100writereg(sc, p_balance, 0);
+
+/* enable irq */
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, plxirq_dma0, irq_synch_chg|irq_prot_l_err);
+
+/* enable dma */
+    plxwritereg(sc, DMACSR0_DMACSR1, 3);
+
+/* start transfer and wait for dma*/
+    s = splbio();
+    sis1100writereg(sc, t_adl, addr);
+
+    {
+    int nochmal=0;
+    do {
+        res=0;
+        nochmal=0;
+        while (!(res||(sc->got_irqs&(got_dma0|got_sync|got_l_err)))) {
+                res = tsleep(&sc->local_wait, PCATCH, "plxdma_r_1", 10*hz);
+        }
+        if (res==ERESTART) {
+            res=0;
+            nochmal=1;
+            pINFO(sc, "DMA read restart");
+        }
+    } while (nochmal);
+    }
+    sis1100_disable_irq(sc, plxirq_dma0, irq_prot_l_err);
+    splx(s);
+    if (sc->got_irqs&(got_dma0|got_l_err)) { /* transfer complete or error */
+        *count_read=sis1100readreg(sc, d0_bc)/size;
+        if (!(sc->got_irqs&got_dma0)) {
+            u_int32_t val;
+            val=plxreadreg(sc, DMACSR0_DMACSR1);
+            pINFO(sc, "read_dma/abort: DMACSR0=0x%x\n", val);
+            if (!(val&0x10)) { /* DMA not stopped yet; abort it */
+                sis1100writereg(sc, sr, sr_abort_dma);
+                do {
+                    val=plxreadreg(sc, DMACSR0_DMACSR1);
+                } while (!(val&0x10));
+            }
+        }
+    } else /*(res||(sc->got_irqs&(got_sync)))*/ { /* fatal */
+        u_int32_t val;
+        *count_read=sis1100readreg(sc, d0_bc);
+        aborted=0x300;
+        if (res) {
+            if (res==EWOULDBLOCK)
+                pINFO(sc, "read_dma: timed out");
+            else if (res==EINTR)
+                pINFO(sc, "read_dma(1): interrupted; res=%d", res);
+            else if (res==ERESTART)
+                pINFO(sc, "read_dma(1): interrupted; restart");
+            else
+                pINFO(sc, "read_dma(1): res=%d", res);
+            aborted|=1;
+        }
+        if (sc->got_irqs&got_sync) {
+            pINFO(sc, "read_dma: synchronisation lost");
+            aborted|=2;
+        }
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) { /* DMA not stopped yet; abort it */
+            sis1100writereg(sc, sr, sr_abort_dma);
+            do {
+                val=plxreadreg(sc, DMACSR0_DMACSR1);
+            } while (!(val&0x10));
+        }
+    }
+
+    plxwritereg(sc, DMACSR0_DMACSR1, 0);
+
+    uvm_vsunlock(fd->p, data, count);
+
+    *prot_error=sis1100readreg(sc, prot_error);
+    *eot=!!(sis1100readreg(sc, sr)&0x200);
+
+    if (aborted) {
+        /*dump_glink_status(sc, "after abort", 1);*/
+        pINFO(sc, "prot_error=0x%x; aborted=0x%x, count_read=%d\n",
+            *prot_error, aborted, *count_read);
+    }
+    if (aborted) *prot_error=aborted;
+    if ((*prot_error!=0) && ((*prot_error&0x200)!=0x200)) {
+        pINFO(sc, "read_dma: prot_error=0x%x", *prot_error);
+        res=EIO;
+    }
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_loop.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_loop.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_read_loop.c	(revision 22)
@@ -0,0 +1,157 @@
+/* $ZEL: sis1100_read_loop.c,v 1.3 2004/05/27 23:10:32 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * sis1100_read_loop always transports data directly to userspace!
+ * Access permissions have to be checked before.
+ */
+
+ssize_t
+sis1100_read_loop(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize (bytes/word) */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words (of size 'size') to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_read,       /* words transferred */
+    u_int8_t* data,           /* destination (user virtual address) */
+    int* prot_error
+    )
+{
+    u_int32_t head;
+    int idx, res=0;
+
+    *count_read=count;
+    head=0x00000002|(space&0x3f)<<16;
+    SEM_LOCK(sc->sem_hw);
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    switch (size) {
+    case 1:
+        for (idx=0; idx<count; idx++, data++) {
+            u_int32_t val;
+            sis1100writereg(sc, t_hdr, head|(0x01000000<<(addr&3)));
+            sis1100writereg(sc, t_adl, addr);
+            do {
+                *prot_error=sis1100readreg(sc, prot_error);
+            } while (*prot_error==0x005);
+            if (*prot_error) {
+                *count_read=idx;
+                break;
+            }
+            val=sis1100rawreadreg(sc, tc_dal);
+#ifdef __NetBSD__
+#if defined(__LITTLE_ENDIAN)
+            subyte(data, (val>>((addr&3)<<3))&0xff);
+#else
+            subyte(data, (val>>((3-(addr&3))<<3))&0xff);
+#endif
+#elif __linux__
+#if defined(__LITTLE_ENDIAN)
+            __put_user((val>>((addr&3)<<3))&0xff, (u_int8_t*)(data));
+#else
+            __put_user((val>>((3-(addr&3))<<3))&0xff, (u_int8_t*)(data));
+#endif
+#endif
+            if (!fifo_mode) addr++;
+        }
+        break;
+    case 2:
+        for (idx=0; idx<count; idx++, data+=2) {
+            u_int32_t val;
+            sis1100writereg(sc, t_hdr, head|(0x03000000<<(addr&3)));
+            sis1100writereg(sc, t_adl, addr);
+            do {
+                *prot_error=sis1100readreg(sc, prot_error);
+            } while (*prot_error==0x005);
+            if (*prot_error) {
+                /*
+                pINFO(sc, "read_loop(2): addr=%x prot_error=%x idx=%d",
+                    addr, *prot_error, idx);
+                */
+                *count_read=idx;
+                break;
+            }
+            val=sis1100rawreadreg(sc, tc_dal);
+/*
+    pINFO(sc, "read_loop: head=%08x addr=%x idx=%d val=%08x",
+        head|(0x03000000<<(addr&3)), addr, idx, val);
+*/
+#ifdef __NetBSD__
+#if defined(__LITTLE_ENDIAN)
+            susword(data, (val>>((addr&2)<<3))&0xffff);
+#else
+            susword(data, (val>>((2-(addr&2))<<3))&0xffff);
+#endif
+#elif __linux__
+#if defined(__LITTLE_ENDIAN)
+            __put_user((val>>((addr&2)<<3))&0xffff, (u_int16_t*)data);
+#else
+            __put_user((val>>((2-(addr&2))<<3))&0xffff, (u_int16_t*)data);
+#endif
+#endif
+            if (!fifo_mode) addr+=2;
+        }
+        break;
+    case 4:
+        sis1100writereg(sc, t_hdr, head|0x0f000000);
+        for (idx=0; idx<count; idx++, data+=4) {
+            u_int32_t val;
+            sis1100writereg(sc, t_adl, addr);
+            do {
+                *prot_error=sis1100readreg(sc, prot_error);
+            } while (*prot_error==0x005);
+            if (*prot_error) {
+                *count_read=idx;
+                break;
+            }
+            val=sis1100rawreadreg(sc, tc_dal);
+#ifdef __NetBSD__
+            suword(data, val);
+#elif __linux__
+            __put_user(val, (u_int32_t*)data);
+#endif
+            if (!fifo_mode) addr+=4;
+        }
+        break;
+    }
+    SEM_UNLOCK(sc->sem_hw);
+/*
+pINFO(sc, "read_loop(am=%x size=%d count=%d count_read=%d, addr=%x): res=%d",
+    am, size, count, *count_read, addr, res);
+*/
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc.h	(revision 22)
@@ -0,0 +1,258 @@
+/* $ZEL: sis1100_sc.h,v 1.6 2004/05/27 23:10:32 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_sc_h_
+#define _sis1100_sc_h_
+
+#ifdef __NetBSD__
+#   include "dev/pci/compat_netbsd.h"
+#elif __linux__
+#   include "compat_linux.h"
+#else
+#   error INVALID or UNKNOWN SYSTEM
+#endif
+
+
+#include "plx9054reg.h"
+#include "sis1100_map.h"
+#include "sis3100_map.h"
+#include "sis5100_map.h"
+#include "f1_map.h"
+#include "vertex_map.h"
+#include "sis1100_var.h"
+
+#ifndef PCI_VENDOR_FZJZEL
+#   define PCI_VENDOR_FZJZEL 0x1796
+#endif
+#ifndef PCI_PRODUCT_FZJZEL_GIGALINK
+#   define PCI_PRODUCT_FZJZEL_GIGALINK 0x0001
+#endif
+
+struct irq_vects {
+    u_int32_t vector;
+    int valid;
+};
+
+enum irqs_got {got_dma0=1, got_dma1=2, got_end=4, got_eot=8,
+        /*got_xoff=16,*/ got_sync=32, got_l_err=64};
+
+enum handlercomm {
+    handlercomm_doorbell=1,
+    handlercomm_synch=2,
+    handlercomm_lemo=4,
+    handlercomm_mbx0=8,
+    handlercomm_die=128,
+};
+
+#define SIS5100_CAMACaddr(N, A, F) \
+        (((F)&0x1f)<<11 | ((N)&0x1f)<<6 | ((A)&0xf)<<2)
+
+#ifdef __NetBSD__
+#   include "dev/pci/sis1100_sc_netbsd.h"
+#elif __linux__
+#   include "sis1100_sc_linux.h"
+#else
+#   error INVALID or UNKNOWN SYSTEM
+#endif
+
+#define irq_pending(sc, fd, mask) \
+    ((sc->pending_irqs & (fd->owned_irqs & mask)) || \
+        (fd->old_remote_hw!=sc->remote_hw))
+
+#define ofs(what, elem) ((off_t)&(((what *)0)->elem))
+
+#define plxreadreg(sc, reg) \
+ _plxreadreg(sc, ofs(struct plx9045reg, reg))
+#define plxwritereg(sc, reg, val) \
+ _plxwritereg(sc, ofs(struct plx9045reg, reg), val)
+
+#define sis1100readreg(sc, reg) \
+ plxreadlocal0(sc, ofs(struct sis1100_reg, reg))
+#define sis1100readregb(sc, reg) \
+ plxreadlocal0b(sc, ofs(struct sis1100_reg, reg))
+#define sis1100writereg(sc, reg, val) \
+ plxwritelocal0(sc, ofs(struct sis1100_reg, reg), val)
+#define sis1100writeb(sc, reg, val) \
+ plxwritelocal0b(sc, ofs(struct sis1100_reg, reg), val)
+
+#define sis1100rawreadreg(sc, reg) \
+ plxrawreadlocal0(sc, ofs(struct sis1100_reg, reg))
+#define sis1100rawwritereg(sc, reg, val) \
+ plxrawwritelocal0(sc, ofs(struct sis1100_reg, reg), val)
+
+#define sis1100readremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_read(sc, ofs(struct sis1100_reg, reg), val, locked)
+#define sis1100writeremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_write(sc, ofs(struct sis1100_reg, reg), val, locked)
+
+#define sis3100readremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_read(sc, ofs(struct sis3100_reg, reg), val, locked)
+#define sis3100writeremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_write(sc, ofs(struct sis3100_reg, reg), val, locked)
+
+#define sis5100readremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_read(sc, ofs(struct sis5100_reg, reg), val, locked)
+#define sis5100writeremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_write(sc, ofs(struct sis5100_reg, reg), val, locked)
+
+#define f1_readremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_read(sc, ofs(struct f1_reg, reg), val, locked)
+#define f1_writeremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_write(sc, ofs(struct f1_reg, reg), val, locked)
+
+#define vertex_readremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_read(sc, ofs(struct vertex_reg, reg), val, locked)
+#define vertex_writeremreg(sc, reg, val, locked) \
+ sis1100_remote_reg_write(sc, ofs(struct vertex_reg, reg), val, locked)
+
+
+int  sis1100_irq_handler(void* data);
+void sis3100rem_irq_handler(struct sis1100_softc* sc);
+void sis5100rem_irq_handler(struct sis1100_softc* sc);
+void sis3100rem_enable_irqs(struct sis1100_softc*, struct sis1100_fdata*,
+        u_int32_t mask);
+void sis3100rem_disable_irqs(struct sis1100_softc*, struct sis1100_fdata*,
+        u_int32_t mask);
+void sis5100rem_enable_irqs(struct sis1100_softc*, struct sis1100_fdata*,
+        u_int32_t mask);
+void sis5100rem_disable_irqs(struct sis1100_softc*, struct sis1100_fdata*,
+        u_int32_t mask);
+void sis3100rem_irq_ack(struct sis1100_softc* sc, int irqs);
+void sis5100rem_irq_ack(struct sis1100_softc* sc, int irqs);
+void sis3100rem_get_vector(struct sis1100_softc* sc, int irqs,
+        struct sis1100_irq_get* data);
+
+int  sis1100_init(struct sis1100_softc* sc);
+
+void sis1100_init_remote(struct sis1100_softc* sc);
+int  sis1100rem_init(struct sis1100_softc* sc);
+int  sis3100rem_init(struct sis1100_softc* sc);
+int  sis5100rem_init(struct sis1100_softc* sc);
+int  f1_rem_init(struct sis1100_softc* sc);
+int  vertex_rem_init(struct sis1100_softc* sc);
+int  sis1100_init_sdram(struct sis1100_softc* sc);
+
+void sis1100_dump_glink_status(struct sis1100_softc* sc, char* text, int locked);
+int sis1100_flush_fifo(struct sis1100_softc* sc, const char* text, int silent);
+
+int sis1100_disable_irq(struct sis1100_softc* sc,
+        u_int32_t plx_mask, u_int32_t sis_mask);
+int sis1100_enable_irq(struct sis1100_softc* sc,
+        u_int32_t plx_mask, u_int32_t sis_mask);
+int sis1100_tmp_read(struct sis1100_softc *sc,
+        u_int32_t addr, int32_t am, int size, int space, u_int32_t* data);
+int sis1100_tmp_write(struct sis1100_softc *sc,
+        u_int32_t addr, int32_t am, int size, int space, u_int32_t data);
+int sis1100_tmp_camacread(struct sis1100_softc *sc,
+        u_int32_t addr, u_int32_t* data);
+int sis1100_tmp_camacwrite(struct sis1100_softc *sc,
+        u_int32_t addr, u_int32_t data);
+int sis1100_read_dma(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_read, u_int8_t* data, int* prot_err);
+int _sis1100_read_dma(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_read, u_int8_t* data, int* prot_err, int* eot);
+int sis1100_write_dma(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_written, const u_int8_t* data, int* prot_err);
+int _sis1100_write_dma(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_written, const u_int8_t* data, int* prot_err);
+int sis1100_read_loop(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_read, u_int8_t* data, int* prot_err);
+int sis1100_write_loop(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+        u_int32_t addr, int32_t am, int size, int space, int fifo,
+        size_t count, size_t* count_written, const u_int8_t* data, int* prot_err);
+int  sis1100_read_pipe(struct sis1100_softc* sc, struct sis1100_pipe* control);
+int  sis1100_write_pipe(struct sis1100_softc*, int32_t am, int space,
+        int num, u_int32_t* data);
+void sis1100_reset_plx(struct sis1100_softc* sc);
+int  sis1100_reset(struct sis1100_softc* sc);
+
+int  sis1100_read_block(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        int size, int fifo, size_t num, size_t* num_read, int space,
+        int32_t am, u_int32_t addr, u_int8_t* data, u_int32_t* error);
+int  sis1100_write_block(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        int size, int fifo, size_t num, size_t* num_written, int space,
+        int32_t am, u_int32_t addr, const u_int8_t* data, u_int32_t* error);
+
+int  sis1100_irq_ctl(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_ctl* data);
+int  sis1100_irq_get(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_get* data);
+int  sis1100_irq_ack(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_ack* data);
+int  sis1100_irq_wait(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        struct sis1100_irq_get* data);
+int  sis1100_remote_reg_read(struct sis1100_softc* sc, u_int32_t offs,
+        u_int32_t* data, int locked);
+int  sis1100_remote_reg_write(struct sis1100_softc* sc, u_int32_t offs,
+        u_int32_t data, int locked);
+
+int  sis1100_front_io(struct sis1100_softc* sc, u_int32_t* data, int locked);
+int  sis1100_front_pulse(struct sis1100_softc* sc, u_int32_t* data, int locked);
+int  sis1100_front_latch(struct sis1100_softc* sc, u_int32_t* data, int locked);
+int  sis1100rem_front_io(struct sis1100_softc* sc, u_int32_t* data);
+int  sis1100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data);
+int  sis1100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data);
+int  sis3100rem_front_io(struct sis1100_softc* sc, u_int32_t* data);
+int  sis3100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data);
+int  sis3100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data);
+int  sis5100rem_front_io(struct sis1100_softc* sc, u_int32_t* data);
+int  sis5100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data);
+int  sis5100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data);
+
+void sis1100_synch_handler(struct sis1100_softc* sc);
+void sis1100_lemo_handler(struct sis1100_softc* sc);
+void sis1100_mbox0_handler(struct sis1100_softc* sc);
+
+void sis1100_update_swapping(struct sis1100_softc* sc, const char* caller);
+int sis3100_set_timeouts(struct sis1100_softc* sc, int berr, int arb);
+int sis3100_get_timeouts(struct sis1100_softc* sc, int* berr, int* arb);
+
+int sis1100_dma_alloc(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d);
+int sis1100_dma_free(struct sis1100_softc *sc, struct sis1100_fdata* fd,
+    struct sis1100_dma_alloc* d);
+
+int sis1100_check_rw_access(struct sis1100_softc*,
+    off_t, off_t, size_t, int, const char*, int);
+
+int sis1100_dsp_reset(struct sis1100_softc* sc, struct sis1100_fdata* fd);
+int sis1100_dsp_start(struct sis1100_softc* sc, struct sis1100_fdata* fd);
+int sis1100_dsp_load(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    struct sis1100_dsp_code* d);
+
+int sis1100_read_eeprom(struct sis1100_softc* sc,
+         u_int8_t num, u_int8_t addr, u_int16_t* data);
+int sis1100_write_eeprom(struct sis1100_softc* sc,
+         u_int8_t num, u_int8_t addr, u_int16_t* data);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_linux.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_linux.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_linux.h	(revision 22)
@@ -0,0 +1,182 @@
+/* $ZEL: sis1100_sc_linux.h,v 1.5 2004/05/27 23:10:33 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_sc_linux_h_
+#define _sis1100_sc_linux_h_
+
+#define SGL_SIZE 128
+#define DMA_MAX (PAGE_SIZE*(SGL_SIZE-1))
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,14)
+#define USE_SGL
+#else
+#error no USE_SGL
+#endif
+/*#undef USE_SGL*/
+
+struct sis1100_dmabuf {
+    size_t size;
+    void* cpu_addr;
+    dma_addr_t dma_handle;
+};
+
+struct mmapdma {
+        int valid;
+};
+
+struct handlercommand {
+    volatile enum handlercomm command;
+    spinlock_t lock;
+};
+
+struct sis1100_softc;
+
+struct sis1100_fdata {
+    struct list_head list;
+/* OS specific*/
+    struct sis1100_softc* sc;
+/*common*/
+    struct mmapdma mmapdma;
+    size_t mindmalen_r, mindmalen_w;
+    enum sis1100_hw_type old_remote_hw;
+    enum sis1100_subdev subdev;
+    int32_t vmespace_am;
+    u_int32_t vmespace_datasize;
+    int fifo_mode;
+    int last_prot_err;
+    u_int32_t owned_irqs;
+    pid_t pid;
+    int sig;
+};
+
+struct sis1100_softc {
+/* OS specific*/
+    volatile u_int8_t *plxmembase; /* kernel virtual address */
+    u_int32_t plxmemlen;           /* size */
+    u_long plx_addr;               /* physical address */
+
+    volatile u_int8_t*reg_base;    /* kernel virtual address */
+    u_int32_t reg_size;            /* size */
+    u_long reg_addr;               /* physical address */
+
+    volatile u_int8_t*rem_base;    /* kernel virtual address */
+    u_int32_t rem_size;            /* size */
+    u_long rem_addr;               /* physical address */
+
+    struct pci_dev *pcidev;
+    int unit;
+    int handler_pid;
+    struct completion handler_completion;
+#ifndef USE_SGL
+    struct kiobuf* iobuf;
+#endif
+    struct sis1100_dmabuf descbuf;
+    struct scatterlist sglist[SGL_SIZE];
+
+/* OS specific definition but common use */
+    struct semaphore sem_hw;         /* protects hardware */
+    struct semaphore sem_fdata_list; /* protects fdata_list_head */
+    spinlock_t lock_intcsr;          /* protects INTCSR of PLX */
+    spinlock_t lock_doorbell;        /* protects sc.doorbell */
+    spinlock_t lock_lemo_status;     /* protects sc.lemo_status */
+    wait_queue_head_t handler_wait;
+    wait_queue_head_t local_wait;
+    wait_queue_head_t remoteirq_wait;
+    struct timer_list link_up_timer;
+
+/* common */
+    struct sis1100_fdata* fdatalist[sis1100_MINORUTMASK+1];
+    struct list_head fdata_list_head;
+    u_int32_t local_ident, remote_ident;
+    volatile enum sis1100_hw_type remote_hw, old_remote_hw;
+    volatile u_int32_t doorbell;
+    volatile u_int32_t lemo_status;
+    volatile u_int32_t mbx0;
+    volatile int got_irqs;
+    struct irq_vects irq_vects[8];
+    u_int32_t pending_irqs, new_irqs;
+    struct handlercommand handlercommand;
+    loff_t ram_size;
+    int dsp_present;
+    int remote_endian; /* 0: little 1: big*/
+    int user_wants_swap;
+    volatile u_int32_t last_opt_csr; /* used by handlercomm_lemo */
+
+#if 0
+    int dma_dac; /* use 64bit dual address cycle for dma */
+    int no_dma;  /* even 32bit dma not available */
+#endif
+};
+
+extern struct sis1100_softc *sis1100_devdata[sis1100_MAXCARDS];
+
+extern struct file_operations sis1100_fops;
+
+#define SIS1100FD(file) ((struct sis1100_fdata*)(file)->private_data)
+#define SIS1100SC(file) (((struct sis1100_fdata*)(file)->private_data)->sc)
+
+#define _plxreadreg(sc, offset) readl((sc)->plxmembase+(offset))
+#define _plxwritereg(sc, offset, val) writel(val, (sc)->plxmembase+(offset))
+#define _plxreadbreg(sc, offset) readb((sc)->plxmembase+(offset))
+#define _plxwritebreg(sc, offset, val) writeb(val, (sc)->plxmembase+(offset))
+
+#define plxreadlocal0(sc, offset) readl((sc)->reg_base+(offset))
+#define plxreadlocal0b(sc, offset) readb((sc)->reg_base+(offset))
+#define plxwritelocal0(sc, offset, val) writel(val, (sc)->reg_base+(offset))
+#define plxwritelocal0b(sc, offset, val) writeb(val, (sc)->reg_base+(offset))
+#define plxrawreadlocal0(sc, offset) __raw_readl((sc)->reg_base+(offset))
+#define plxrawwritelocal0(sc, offset, val) __raw_writel(val, (sc)->reg_base+(offset))
+
+#define rmb_plx() rmb()
+#define rmb_reg() rmb()
+#define wmb_plx() wmb()
+#define wmb_reg() wmb()
+#define mb_plx() mb()
+#define mb_reg() mb()
+
+int  sis1100_open(struct inode *inode, struct file *file);
+int  sis1100_release(struct inode *inode, struct file *file);
+int  sis1100_ioctl(struct inode *inode, struct file *file,
+    	    	unsigned int cmd, unsigned long arg);
+loff_t sis1100_llseek(struct file* file, loff_t offset, int orig);
+int  sis1100_mmap(struct file * file, struct vm_area_struct * vma);
+ssize_t sis1100_read(struct file* file, char* buf, size_t count,
+    	    	loff_t* ppos);
+ssize_t sis1100_write(struct file* file, const char* buf, size_t count,
+    	    	loff_t* ppos);
+unsigned int sis1100_poll(struct file* file,
+                struct poll_table_struct* poll_table);
+
+int sis1100_irq_thread(void* data);
+void sis1100_link_up_handler(unsigned long data);
+
+irqreturn_t sis1100_intr(int irq, void *vsc, struct pt_regs *regs);
+int  sis1100_init(struct sis1100_softc* sc);
+void sis1100_done(struct sis1100_softc* sc);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_netbsd.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_netbsd.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sc_netbsd.h	(revision 22)
@@ -0,0 +1,193 @@
+/* $ZEL: sis1100_sc_netbsd.h,v 1.4 2004/05/27 23:10:34 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_sc_netbsd_h_
+#define _sis1100_sc_netbsd_h_
+
+#include "dev/pci/plx9054dma_netbsd.h"
+
+#define MAX_DMA_LEN 524288 /* 1/2 MByte */
+
+extern struct cfdriver sis1100cfdriver;
+
+struct sis1100_softc;
+
+struct mmapdma {
+        bus_dma_tag_t dmat;
+        int valid;
+        off_t off;
+        bus_size_t size;
+        bus_dma_segment_t segs;
+        bus_dmamap_t dm;
+        caddr_t kva; /* kva of segs */
+};
+
+struct handlercommand {
+    volatile enum handlercomm command;
+    struct simplelock lock;
+};
+
+struct sis1100_fdata {
+    struct list_head list;
+/* OS specific*/
+    struct proc *p;
+/*common*/
+    struct mmapdma mmapdma;
+    size_t mindmalen_r, mindmalen_w;
+    enum sis1100_hw_type old_remote_hw;
+    enum sis1100_subdev subdev;
+    int32_t vmespace_am;
+    u_int32_t vmespace_datasize;
+    int fifo_mode;
+    int last_prot_err;
+    int owned_irqs;
+    pid_t pid;
+    int sig;
+};
+
+struct sis1100_softc {
+/* OS specific*/
+    struct device sc_dev;
+    pci_chipset_tag_t sc_pc;
+    pcitag_t sc_pcitag;
+    bus_dma_tag_t sc_dmat;
+
+    bus_space_tag_t plx_t;
+    bus_space_handle_t plx_h;
+    bus_size_t plx_size;
+
+    bus_space_tag_t reg_t;
+    bus_space_handle_t reg_h;
+    bus_size_t reg_size;
+    bus_addr_t reg_addr;
+
+    bus_space_tag_t rem_t;
+    bus_space_handle_t rem_h;
+    bus_size_t rem_size;
+    bus_addr_t rem_addr;
+
+    void *sc_ih;
+
+    struct plx9054dma sc_dma;
+
+    struct simplelock lock_sc_inuse;      /* protects sc_inuse */
+    struct proc* vmeirq_pp;
+    int sc_inuse;
+    struct selinfo sel;
+
+/* OS specific definition but common use */
+    struct lock sem_hw;                   /* protects hardware */
+    struct lock sem_fdata_list;           /* protects fdata_list_head */
+    struct simplelock lock_intcsr;        /* protects INTCSR of PLX */
+    void*/*struct simplelock*/ handler_wait;       /* pending_irqs, remote_ok */
+    struct simplelock local_wait;
+    struct simplelock remoteirq_wait;
+    struct callout link_up_timer;
+
+/* common */
+    struct sis1100_fdata* fdatalist[sis1100_MINORUTMASK+1];
+    struct list_head fdata_list_head;
+    u_int32_t local_ident, remote_ident;
+    volatile enum sis1100_hw_type remote_hw, old_remote_hw;
+    volatile u_int32_t doorbell;
+    volatile u_int32_t lemo_status;
+    volatile u_int32_t mbx0;
+    volatile int got_irqs;
+    struct irq_vects irq_vects[8];
+    int pending_irqs, new_irqs;
+    struct handlercommand handlercommand;
+    off_t ram_size;
+    int dsp_present;
+    int remote_endian; /* 0: little 1: big*/
+    int user_wants_swap;
+    u_int32_t last_opt_csr; /* used by handlercomm_lemo */
+
+#if 0
+    int dma_dac; /* use 64bit dual address cycle for dma */
+    int no_dma;  /* even 32bit dma not available */
+#endif
+};
+
+#define SIS1100CARD(dev) \
+ ((minor(dev)&sis1100_MINORCARDMASK)>>sis1100_MINORCARDSHIFT)
+#define SIS1100SC(dev) \
+ ((struct sis1100_softc*)sis1100cfdriver.cd_devs[SIS1100CARD(dev)])
+#define SIS1100FD(dev) \
+ (struct sis1100_fdata*)((SIS1100SC(dev)->fdatalist)[minor(dev)&sis1100_MINORUTMASK])
+
+#define _plxreadreg(sc, offset) \
+    bus_space_read_4(sc->plx_t, sc->plx_h, offset)
+
+#define _plxwritereg(sc, offset, val) \
+    bus_space_write_4(sc->plx_t, sc->plx_h, offset, val)
+
+#define plxreadlocal0(sc, offset) \
+    bus_space_read_4(sc->reg_t, sc->reg_h, offset)
+
+#define plxreadlocal0b(sc, offset) \
+    bus_space_read_1(sc->reg_t, sc->reg_h, offset)
+
+#define plxwritelocal0(sc, offset, val) \
+    bus_space_write_4(sc->reg_t, sc->reg_h, offset, val)
+
+#define plxwritelocal0b(sc, offset, val) \
+    bus_space_write_1(sc->reg_t, sc->reg_h, offset, val)
+
+#define plxrawreadlocal0(sc, offset) \
+    bus_space_read_stream_4(sc->reg_t, sc->reg_h, offset)
+
+#define plxrawwritelocal0(sc, offset, val) \
+    bus_space_write_stream_4(sc->reg_t, sc->reg_h, offset, val)
+
+#define rmb_plx() bus_space_barrier(sc->plx_t, sc->plx_h, 0, sc->plx_size, \
+    BUS_SPACE_BARRIER_READ)
+#define rmb_reg() bus_space_barrier(sc->reg_t, sc->reg_h, 0, sc->reg_size, \
+    BUS_SPACE_BARRIER_READ)
+#define wmb_plx() bus_space_barrier(sc->plx_t, sc->plx_h, 0, sc->plx_size, \
+    BUS_SPACE_BARRIER_WRITE)
+#define wmb_reg() bus_space_barrier(sc->reg_t, sc->reg_h, 0, sc->reg_size, \
+    BUS_SPACE_BARRIER_WRITE)
+#define mb_plx() bus_space_barrier(sc->plx_t, sc->plx_h, 0, sc->plx_size, \
+    BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
+#define mb_reg() bus_space_barrier(sc->reg_t, sc->reg_h, 0, sc->reg_size, \
+    BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
+
+void sis1100_done(struct sis1100_softc*);
+int sis1100_intr(void*);
+
+int sis1100_open(dev_t, int, int, struct proc*);
+int sis1100_close(dev_t, int, int, struct proc*);
+int sis1100_ioctl(dev_t, u_long, caddr_t, int, struct proc*);
+int sis1100_read(dev_t dev, struct uio* uio, int f);
+int sis1100_write(dev_t dev, struct uio* uio, int f);
+paddr_t sis1100_mmap(dev_t dev, off_t off, int prot);
+void sis1100_irq_thread(void* data);
+void sis1100_link_up_handler(void*);
+int sis1100_poll(dev_t dev, int events, struct proc *p);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sgl_map_user_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sgl_map_user_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_sgl_map_user_linux.c	(revision 22)
@@ -0,0 +1,166 @@
+/* $ZEL: sis1100_sgl_map_user_linux.c,v 1.2 2004/05/27 23:10:34 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/pagemap.h>
+
+/* The following functions are stolen from drivers/scsi/st.c. */
+
+int
+sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages, 
+        const char* xuaddr, size_t count, int rw)
+{
+	int res, i, j;
+	unsigned int nr_pages;
+	struct page **pages;
+        unsigned long uaddr=(unsigned long)xuaddr;
+
+	nr_pages = ((uaddr & ~PAGE_MASK) + count + ~PAGE_MASK) >> PAGE_SHIFT;
+
+	/* User attempted Overflow! */
+	if ((uaddr + count) < uaddr)
+		return -EINVAL;
+
+	/* Too big */
+        if (nr_pages > max_pages) {
+                printk(KERN_ERR
+                    "sgl_map_user_pages: nr_pages=%d but max_pages=%d\n",
+                        nr_pages, max_pages);
+		return -ENOMEM;
+        }
+	/* Hmm? */
+	if (count == 0)
+		return 0;
+
+	if ((pages = kmalloc(nr_pages * sizeof(*pages), GFP_KERNEL)) == NULL) {
+                printk(KERN_ERR
+                    "sgl_map_user_pages: kmalloc(%d*sizeof(struct page*)) failed\n",
+                        nr_pages);
+		return -ENOMEM;
+        }
+
+        /* Try to fault in all of the necessary pages */
+	down_read(&current->mm->mmap_sem);
+        /* rw==READ means read from drive, write into memory area */
+	res = get_user_pages(
+		current,
+		current->mm,
+		uaddr,
+		nr_pages,
+		rw == READ,
+		0, /* don't force */
+		pages,
+		NULL);
+	up_read(&current->mm->mmap_sem);
+
+	/* Errors and no page mapped should return here */
+	if (res < nr_pages) {
+                printk(KERN_ERR "sgl_map_user_pages: nr_pages=%d; res=%d\n",
+                    nr_pages, res);
+		goto out_unmap;
+        }
+
+        for (i=0; i < nr_pages; i++) {
+                /* FIXME: flush superflous for rw==READ,
+                 * probably wrong function for rw==WRITE
+                 */
+		flush_dcache_page(pages[i]);
+        }
+
+	/* Populate the scatter/gather list */
+        memset(sgl, 0, sizeof(struct scatterlist)*nr_pages);
+	sgl[0].page = pages[0]; 
+	sgl[0].offset = uaddr & ~PAGE_MASK;
+	if (nr_pages > 1) {
+		sgl[0].length = PAGE_SIZE - sgl[0].offset;
+		count -= sgl[0].length;
+		for (i=1; i < nr_pages ; i++) {
+			sgl[i].page = pages[i]; 
+			sgl[i].length = count < PAGE_SIZE ? count : PAGE_SIZE;
+			count -= PAGE_SIZE;
+		}
+	}
+	else {
+		sgl[0].length = count;
+	}
+for (i=0; i<nr_pages; i++) {
+    if (sgl[i].length<0) {
+        printk(KERN_ERR "sgl[%d].length=%d\n", i, sgl[i].length);
+        res=-EIO;
+        goto out_unmap;
+    }
+}
+	kfree(pages);
+	return nr_pages;
+
+out_unmap:
+	if (res > 0) {
+		for (j=0; j < res; j++)
+			page_cache_release(pages[j]);
+                res=-EIO;
+	}
+	kfree(pages);
+	return res;
+}
+
+
+/* And unmap them... */
+int
+sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_pages,
+        int dirtied)
+{
+	int i;
+
+	for (i=0; i < nr_pages; i++) {
+		if (dirtied && !PageReserved(sgl[i].page))
+			SetPageDirty(sgl[i].page);
+		/* FIXME: cache flush missing for rw==READ
+		 * FIXME: call the correct reference counting function
+		 */
+		page_cache_release(sgl[i].page);
+	}
+
+	return 0;
+}
+
+#ifdef CONFIG_SPARC64
+void
+dump_sgl(struct scatterlist *sgl, int nr_pages)
+{
+	int i;
+
+	for (i=0; i<nr_pages; i++) {
+            printk(KERN_ERR "sgl[%d]: page=%p offs=%d len=%d dma_len=%d\n",
+                i, sgl[i].page, sgl[i].offset, sgl[i].length, sgl[i].dma_length);
+        }
+}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_synch_handler.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_synch_handler.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_synch_handler.c	(revision 22)
@@ -0,0 +1,79 @@
+/* $ZEL: sis1100_synch_handler.c,v 1.4 2004/05/27 23:10:35 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * This function ist started by a timer (sc->link_up_timer) 1 second after
+ * the optical link state has changed.
+ * It is executed in irq context!
+ * The awakened kernel thread (sis1100_irq_thread) calls
+ * sis1100_synch_handler below
+ */
+void
+#ifdef __NetBSD__
+sis1100_link_up_handler(void* data)
+#elif __linux__
+sis1100_link_up_handler(unsigned long data)
+#endif
+{
+    struct sis1100_softc* sc=(struct sis1100_softc*)data;
+    DECLARE_SPINLOCKFLAGS(flags)
+
+    SPIN_LOCK_IRQSAVE(sc->handlercommand.lock, flags);
+    sc->handlercommand.command|=handlercomm_synch;
+    SPIN_UNLOCK_IRQRESTORE(sc->handlercommand.lock, flags);
+#ifdef __NetBSD__
+        wakeup(&sc->handler_wait);
+#elif __linux__
+    wake_up(&sc->handler_wait);
+#endif
+}
+
+/*
+ * this is called from _sis1100_irq_thread
+ */
+void
+sis1100_synch_handler(struct sis1100_softc* sc)
+{
+    u_int32_t status;
+
+    /* pINFO(sc, "synch_handler called"); */
+    sis1100_enable_irq(sc, 0, irq_synch_chg|irq_reset_req|irq_prot_l_err);
+    status=sis1100readreg(sc, sr);
+
+    if ((status&sr_synch)==sr_synch) {
+        if (sc->remote_hw==sis1100_hw_invalid) {
+            sis1100_init_remote(sc);
+        } else {
+            pINFO(sc, "synch_handler: remote_hw=%d (not hw_invalid)",
+                    sc->remote_hw);
+            sis1100_init_remote(sc);
+        }
+    }
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_read.c	(revision 22)
@@ -0,0 +1,113 @@
+/* $ZEL: sis1100_tmp_read.c,v 1.3 2004/05/27 23:23:28 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * sis1100_tmp_read transports data only to kernel space
+ */
+int
+sis1100_tmp_read(struct sis1100_softc* sc,
+    	u_int32_t addr, int32_t am, int size, int space, u_int32_t* data)
+{
+    u_int32_t be, _data;
+    u_int32_t error;
+    u_int32_t head;
+
+    be=((0x00f00000<<size)&0x0f000000)<<(addr&3);
+
+    head=0x00000002|(space&0x3f)<<16|be;
+
+    SEM_LOCK(sc->sem_hw);
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    sis1100writereg(sc, t_hdr, head);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, addr);
+    mb_reg();
+    do {
+	error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    rmb_reg();
+    _data=sis1100rawreadreg(sc, tc_dal);
+    /*_data=sis1100readreg(sc, tc_dal);*/
+    SEM_UNLOCK(sc->sem_hw);
+
+#if defined(__LITTLE_ENDIAN)
+        switch (size) {
+	    case 4: *data=_data; break;
+	    case 2: *data=(_data>>((addr&2)<<3))&0xffff; break;
+	    case 1: *data=(_data>>((addr&3)<<3))&0xff; break;
+        }
+#else
+        switch (size) {
+	    case 4: *data=_data; break;
+	    case 2: *data=(_data>>((2-(addr&2))<<3))&0xffff; break;
+	    case 1: *data=(_data>>((3-(addr&3))<<3))&0xff; break;
+        }
+#endif
+    return error;
+}
+
+int
+sis1100_tmp_camacread(struct sis1100_softc* sc, u_int32_t addr, u_int32_t* data)
+{
+    u_int32_t error;
+    u_int32_t head;
+
+    head=0x0f010002; /* be=0xf space=1 write=0 start_with_addr */
+
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, head);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, addr);
+    mb_reg();
+    do {
+	error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    rmb_reg();
+    *data=sis1100readreg(sc, tc_dal);
+    SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
+
+int
+sis1100_remote_reg_read(struct sis1100_softc* sc, u_int32_t offs,
+    u_int32_t* data, int locked)
+{
+    u_int32_t error;
+
+    if (!locked) SEM_LOCK(sc->sem_hw);
+    *data=plxreadlocal0(sc, offs+0x800);
+    rmb_reg();
+    error=sis1100readreg(sc, prot_error);
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+    return error;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_tmp_write.c	(revision 22)
@@ -0,0 +1,100 @@
+/* $ZEL: sis1100_tmp_write.c,v 1.3 2004/05/27 23:23:28 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100_tmp_write(struct sis1100_softc* sc,
+    	u_int32_t addr, int32_t am, int size, int space, u_int32_t data)
+{
+    u_int32_t be;
+    u_int32_t error;
+    u_int32_t head;
+
+    data=(data&(0xffffffffU>>((4-size)<<3)))<<((addr&3)<<3);
+
+    be=((0x00f00000<<size)&0x0f000000)<<(addr&3);
+
+    head=0x00000402|(space&0x3f)<<16|be;
+
+    SEM_LOCK(sc->sem_hw);
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    sis1100writereg(sc, t_hdr, head);
+    wmb_reg();
+    sis1100writereg(sc, t_dal, data);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, addr);
+    mb_reg();
+    do {
+        error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    SEM_UNLOCK(sc->sem_hw);
+
+    return error;
+}
+
+int
+sis1100_tmp_camacwrite(struct sis1100_softc* sc, u_int32_t addr, u_int32_t data)
+{
+    u_int32_t error;
+    u_int32_t head;
+
+    head=0x0f010402; /* be=0xf space=1 write=1 start_with_addr */
+
+    SEM_LOCK(sc->sem_hw);
+    sis1100writereg(sc, t_hdr, head);
+    wmb_reg();
+    sis1100writereg(sc, t_dal, data);
+    wmb_reg();
+    sis1100writereg(sc, t_adl, addr);
+    mb_reg();
+    do {
+        error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    SEM_UNLOCK(sc->sem_hw);
+
+    return error;
+}
+
+int
+sis1100_remote_reg_write(struct sis1100_softc* sc, u_int32_t offs,
+    u_int32_t data, int locked)
+{
+    u_int32_t error;
+
+    if (!locked) SEM_LOCK(sc->sem_hw);
+    plxwritelocal0(sc, offs+0x800, data);
+    mb_reg();
+    error=sis1100readreg(sc, prot_error);
+    if (!locked) SEM_UNLOCK(sc->sem_hw);
+
+    return error;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_var.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_var.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_var.h	(revision 22)
@@ -0,0 +1,350 @@
+/* $ZEL: sis1100_var.h,v 1.5 2004/05/27 23:10:37 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_var_h_
+#define _sis1100_var_h_
+
+#define SIS1100_MinVersion 0
+#define SIS1100_MajVersion 2
+#define SIS1100_Version (SIS1100_MinVersion|(SIS1100_MajVersion<<16))
+
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+#elif __linux__
+#include "linux/ioctl.h"
+#endif
+
+/*
+ * minorbits:
+ * ccttuuuu
+ */
+
+/* used bits of minor number */
+#define sis1100_MINORBITS 8
+/* bits used for cardnumber, number_of_cards<=(1<<MINORCARDBITS) */
+#define sis1100_MINORCARDBITS 2
+/* type 0: VME; type 1: SDRAM; type 2: sis1100_control; type 3: dsp*/
+#define sis1100_MINORTYPEBITS 2
+
+#define sis1100_MAXCARDS (1<<sis1100_MINORCARDBITS)
+#define sis1100_MINORUSERBITS (sis1100_MINORBITS-sis1100_MINORCARDBITS-sis1100_MINORTYPEBITS)
+
+#define sis1100_MINORCARDSHIFT (sis1100_MINORUSERBITS+sis1100_MINORTYPEBITS)
+#define sis1100_MINORCARDMASK (((1<<sis1100_MINORCARDBITS)-1)<<(sis1100_MINORUSERBITS+sis1100_MINORTYPEBITS))
+#define sis1100_MINORTYPESHIFT sis1100_MINORUSERBITS
+#define sis1100_MINORTYPEMASK (((1<<sis1100_MINORTYPEBITS)-1)<<sis1100_MINORUSERBITS)
+#define sis1100_MINORUSERSHIFT 0
+#define sis1100_MINORUSERMASK ((1<<sis1100_MINORUSERBITS)-1)
+#define sis1100_MINORUTMASK (sis1100_MINORTYPEMASK|sis1100_MINORUSERMASK)
+
+enum sis1100_subdev {sis1100_subdev_remote, sis1100_subdev_ram,
+    sis1100_subdev_ctrl, sis1100_subdev_dsp};
+enum sis1100_hw_type {
+    sis1100_hw_invalid=0,
+    sis1100_hw_pci=1,
+    sis1100_hw_vme=2,
+    sis1100_hw_camac=3,
+    sis1100_hw_f1=4,     /* FZJ only */
+    sis1100_hw_vertex=5, /* FZJ only */
+};
+
+/*
+ * error codes:
+ * sis1100 local:
+ *     0x005: deadlock (only transient)
+ *     0x101: missing synchronisation
+ *     0x102: inhibit
+ *     0x103: output fifo full
+ *     0x104: buffer full
+ *     0x105: deadlock; transfer aborted
+ *     0x107: timeout
+ * sis1100 remote:
+ *     0x202: not ready
+ *     0x206: protocoll error
+ *     0x207: timeout; indication not complete
+ *     0x208: bus error
+ *     0x209: fifo error
+ * sis3100 remote:
+ *     0x211: bus error
+ *     0x212: retry
+ *     0x214: arbitration timeout
+ * sis5100 remote:
+ *     ???
+ * #ifdef FZJ_ZEL
+ * straw and vertex:
+ *     same as sis1100 remote
+ * #endif
+ * synthetic errors:
+ *     0x301: DMA interrupted
+ *     0x302: synchronisation lost during DMA
+ *     0x303 == 0x301|0x302
+ */
+
+struct sis1100_vme_req {
+    int size;
+    int32_t am;
+    u_int32_t addr;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+/*
+ * struct sis1100_vme_req {
+ *     int size;
+ *     int32_t am;
+ *     u_int32_t addr;
+ *     union {
+ *         u_int8_t u8;
+ *         u_int16_t u16;
+ *         u_int32_t u32;
+ *         u_int64_t u64;
+ *     } data;
+ *     u_int32_t error;
+ * };
+ */
+
+struct sis1100_vme_block_req {
+    int size;        /* size of dataword */
+    int fifo;
+    size_t num;      /* number of datawords */
+    int32_t am;
+    u_int32_t addr;  /* remote bus address */
+    u_int8_t* data;  /* local user space address */
+    u_int32_t error;
+};
+
+struct sis1100_vme_super_block_req {
+    int n;
+    int error;
+    struct sis1100_vme_block_req* reqs;
+};
+
+struct sis1100_camac_req {
+    u_int32_t N;
+    u_int32_t A;
+    u_int32_t F;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+struct sis1100_camac_scan_req {
+    u_int32_t N;
+    u_int32_t A;
+    u_int32_t F;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+struct sis1100_pipelist {
+    u_int32_t head; /* masked with 0xff3f0400:                  */
+    	    	    /* only 'be', remote space and w/r are used */
+    int32_t am;
+    u_int32_t addr;
+    u_int32_t data; /* only used for write access */
+};
+
+struct sis1100_pipe {
+    int num;
+    struct sis1100_pipelist* list;
+    u_int32_t* data;
+    u_int32_t error;
+};
+
+struct sis1100_writepipe {
+    int num;
+    int am;
+    u_int32_t* data; /* num*{addr, data} */
+    u_int32_t error;
+};
+
+struct vmespace {
+    int32_t am;
+    u_int32_t datasize;
+    int swap;          /* 1: swap words 0: don't swap -1: not changed */
+    int mapit;         /* not used */
+    ssize_t mindmalen; /* 0: never use DMA; 1: always use DMA; -1: not changed */
+};
+
+struct sis1100_ident_dev {
+    enum sis1100_hw_type hw_type;
+    int hw_version;
+    int fw_type;
+    int fw_version;
+};
+
+struct sis1100_ident {
+    struct sis1100_ident_dev local;
+    struct sis1100_ident_dev remote;
+    int remote_ok;
+    int remote_online;
+};
+
+struct sis1100_ctrl_reg {
+    int offset;
+    u_int32_t val;
+    u_int32_t error;
+};
+
+struct sis1100_irq_ctl {
+    u_int32_t irq_mask;
+    int signal;        /* >0: signal; ==0: disable; <0: no signal but select */
+};
+
+struct sis1100_irq_get {
+    u_int32_t irq_mask;
+    int remote_status; /* -1: down 1: up 0: unchanged */
+    u_int32_t opt_status;
+    u_int32_t mbx0;
+    u_int32_t irqs;
+    int level;
+    int32_t vector;
+};
+
+struct sis1100_irq_ack {
+    u_int32_t irq_mask;
+};
+
+struct sis1100_dma_alloc {
+    size_t size;
+    off_t offset;
+    u_int32_t dma_addr;
+};
+
+struct sis1100_dsp_code {
+    void*     src;  /* pointer to code */
+    u_int32_t dst;  /* load address in SHARC memory*/
+    int       size; /* code size in bytes */
+};
+
+struct sis1100_eeprom_req {
+    u_int8_t num;    /* number of 16-bit-words */
+    u_int8_t addr;   /* eeprom address */
+    u_int16_t* data; /* user space address */
+};
+
+#define SIS3100_VME_IRQS      0xFE
+#define SIS3100_FLAT_IRQS    0xF00
+#define SIS3100_LEMO_IRQS   0x7000
+#define SIS3100_DSP_IRQ     0x8000
+#define SIS3100_FRONT_IRQS (SIS3100_FLAT_IRQS  | SIS3100_LEMO_IRQS)
+#define SIS3100_EXT_IRQS   (SIS3100_FRONT_IRQS | SIS3100_DSP_IRQ  )
+#define SIS3100_IRQS       (SIS3100_VME_IRQS   | SIS3100_EXT_IRQS )
+
+/*
+ * 24*LAM
+ * 3* LEMO IN 3* LEMO OUT
+ * 3* ECL IN 3* ECL OUT
+ */
+#define SIS5100_LAM_IRQS         0
+#define SIS5100_FLAT_IRQS        0
+#define SIS5100_LEMO_IRQS        0
+#define SIS5100_DSP_IRQ          0
+#define SIS5100_FRONT_IRQS (SIS5100_FLAT_IRQS  | SIS5100_LEMO_IRQS)
+#define SIS5100_EXT_IRQS   (SIS5100_FRONT_IRQS | SIS5100_DSP_IRQ  )
+#define SIS5100_IRQS       (SIS5100_LAM_IRQS   | SIS5100_EXT_IRQS )  
+
+#define SIS1100_FRONT_IRQS 0x30000
+#define SIS1100_MBX0_IRQ  0x100000
+#define SIS1100_IRQS (SIS1100_FRONT_IRQS|SIS1100_MBX0_IRQ)
+
+#define GLINK_MAGIC 'g'
+
+#define SIS1100_NEW_CTRL
+
+#define SIS1100_SETVMESPACE     _IOW (GLINK_MAGIC,  1, struct vmespace)
+#define SIS3100_VME_PROBE       _IOW (GLINK_MAGIC,  2, u_int32_t)
+#define SIS3100_VME_READ        _IOWR(GLINK_MAGIC, 3, struct sis1100_vme_req)
+#define SIS3100_VME_WRITE       _IOWR(GLINK_MAGIC, 4, struct sis1100_vme_req)
+#define SIS3100_VME_BLOCK_READ  _IOWR(GLINK_MAGIC, 5, struct sis1100_vme_block_req)
+#define SIS3100_VME_BLOCK_WRITE _IOWR(GLINK_MAGIC, 6, struct sis1100_vme_block_req)
+#ifdef SIS1100_NEW_CTRL
+#define SIS1100_CTRL_READ       _IOWR(GLINK_MAGIC, 7, struct sis1100_ctrl_reg)
+#define SIS1100_CTRL_WRITE      _IOWR(GLINK_MAGIC, 8, struct sis1100_ctrl_reg)
+#else
+#define SIS1100_LOCAL_CTRL_READ _IOWR(GLINK_MAGIC, 7, struct sis1100_ctrl_reg)
+#define SIS1100_LOCAL_CTRL_WRITE _IOWR(GLINK_MAGIC, 8, struct sis1100_ctrl_reg)
+#define SIS1100_REMOTE_CTRL_READ _IOWR(GLINK_MAGIC, 9, struct sis1100_ctrl_reg)
+#define SIS1100_REMOTE_CTRL_WRITE _IOWR(GLINK_MAGIC, 10, struct sis1100_ctrl_reg)
+#endif
+#define SIS1100_PIPE            _IOWR(GLINK_MAGIC, 11, struct sis1100_pipe)
+#define SIS1100_MAPSIZE         _IOR (GLINK_MAGIC,  12, u_int32_t)
+#define SIS1100_LAST_ERROR      _IOR (GLINK_MAGIC,  13, u_int32_t)
+#define SIS1100_IDENT           _IOR (GLINK_MAGIC,  14, struct sis1100_ident)
+#define SIS1100_FIFOMODE        _IOWR(GLINK_MAGIC, 15, int)
+
+#define SIS1100_IRQ_CTL         _IOW (GLINK_MAGIC,  17, struct sis1100_irq_ctl)
+#define SIS1100_IRQ_GET         _IOWR(GLINK_MAGIC, 18, struct sis1100_irq_get)
+#define SIS1100_IRQ_ACK         _IOW (GLINK_MAGIC,  19, struct sis1100_irq_ack)
+#define SIS1100_IRQ_WAIT        _IOWR(GLINK_MAGIC, 20, struct sis1100_irq_get)
+
+#define SIS1100_MINDMALEN       _IOWR(GLINK_MAGIC, 21, int[2])
+
+#define SIS1100_FRONT_IO        _IOWR(GLINK_MAGIC, 22, u_int32_t)
+#define SIS1100_FRONT_PULSE     _IOW (GLINK_MAGIC,  23, u_int32_t)
+#define SIS1100_FRONT_LATCH     _IOWR(GLINK_MAGIC, 24, u_int32_t)
+
+#define SIS3100_VME_SUPER_BLOCK_READ _IOWR(GLINK_MAGIC, 25, struct sis1100_vme_super_block_req)
+#define SIS1100_WRITE_PIPE      _IOWR(GLINK_MAGIC, 26, struct sis1100_writepipe)
+
+#define SIS1100_DMA_ALLOC       _IOWR(GLINK_MAGIC, 27, struct sis1100_dma_alloc)
+#define SIS1100_DMA_FREE        _IOW (GLINK_MAGIC,  28, struct sis1100_dma_alloc)
+
+#define SIS5100_CCCZ            _IO  (GLINK_MAGIC, 29)
+#define SIS5100_CCCC            _IO  (GLINK_MAGIC, 30)
+#define SIS5100_CCCI            _IOW (GLINK_MAGIC, 31, int)
+#define SIS5100_CNAF            _IOWR(GLINK_MAGIC, 32, struct sis1100_camac_req)
+#define SIS1100_SWAP            _IOWR(GLINK_MAGIC, 33, int)
+#define SIS3100_TIMEOUTS        _IOWR(GLINK_MAGIC, 34, int[2])
+
+#define SIS1100_DSP_LOAD        _IOW (GLINK_MAGIC, 35, struct sis1100_dsp_code)
+#define SIS1100_DSP_RESET       _IO  (GLINK_MAGIC, 36)
+#define SIS1100_DSP_START       _IO  (GLINK_MAGIC, 37)
+
+/* the following functions (1xx) are not designed for "daily use",
+   but will be usefull */
+#define SIS1100_RESET           _IO  (GLINK_MAGIC,  102)
+#define SIS1100_REMOTE_RESET    _IO  (GLINK_MAGIC,  103)
+#define SIS1100_DEVTYPE         _IOR (GLINK_MAGIC, 104, enum sis1100_subdev)
+#define SIS1100_DRIVERVERSION   _IOR (GLINK_MAGIC, 105, int)
+#define SIS1100_READ_EEPROM     _IOW (GLINK_MAGIC, 106, struct sis1100_eeprom_req)
+#define SIS1100_WRITE_EEPROM    _IOW (GLINK_MAGIC, 107, struct sis1100_eeprom_req)
+#define SIS1100_JTAG_ENABLE     _IOW (GLINK_MAGIC, 108, u_int32_t)
+#define SIS1100_JTAG_CTRL       _IOWR(GLINK_MAGIC, 109, u_int32_t)
+#define SIS1100_JTAG_DATA       _IOR (GLINK_MAGIC, 110, u_int32_t)
+#define SIS1100_JTAG_PUT        _IOW (GLINK_MAGIC, 111, u_int32_t)
+#define SIS1100_JTAG_GET        _IOR (GLINK_MAGIC, 112, u_int32_t)
+
+#ifndef PURE_SIS1100_NAMESPACE
+#define SETVMESPACE SIS1100_SETVMESPACE
+#define VME_PROBE SIS3100_VME_PROBE
+#endif
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write.c	(revision 22)
@@ -0,0 +1,120 @@
+/* $ZEL: sis1100_write.c,v 1.2 2004/05/27 23:10:38 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+static int
+_sis1100_write(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    size_t count, size_t* count_written, u_int32_t addr, const char* data)
+{
+    int32_t am;
+    int datasize;
+    int space, fifo;
+    int res;
+
+    switch (fd->subdev) {
+    case sis1100_subdev_ram:
+        am=-1;
+        datasize=4;
+        space=6;
+        fifo=0;
+        break;
+    case sis1100_subdev_remote:
+        am=fd->vmespace_am;
+        datasize=fd->vmespace_datasize;
+        space=1;
+        fifo=fd->fifo_mode;
+        break;
+    case sis1100_subdev_dsp:
+        am=-1;
+        datasize=4;
+        space=6;
+        fifo=0;
+        break;
+    case sis1100_subdev_ctrl:
+    default:
+        /* just to avoid warning: ... might be used uninitialized */
+        /*am=0;
+        datasize=0;
+        space=0; fifo=0;*/
+        return ENOTTY;
+    }
+
+    if (count%datasize) return EINVAL;
+
+    res=sis1100_write_block(sc, fd,
+        datasize, fifo, count/datasize, count_written, space, am,
+        addr, data, &fd->last_prot_err);
+    *count_written*=datasize;
+
+    return res;
+}
+
+#ifdef __NetBSD__
+int
+sis1100_write(dev_t dev, struct uio* uio, int f)
+{
+    struct sis1100_softc* sc=SIS1100SC(dev);
+    struct sis1100_fdata* fd=SIS1100FD(dev);
+    size_t count, count_written;
+    u_int32_t addr;
+    char* data;
+    int res;
+
+    count=uio->uio_resid;
+    addr=uio->uio_offset;
+    data=uio->uio_iov->iov_base;
+
+    res=_sis1100_write(sc, fd, count, &count_written, addr, data);
+
+    if (!res) {
+        uio->uio_resid-=count_written;
+    }
+    return res;
+}
+
+#elif __linux__
+ssize_t
+sis1100_write(struct file* file, const char* buf, size_t count,
+    loff_t* ppos)
+{
+    struct sis1100_softc* sc=SIS1100SC(file);
+    struct sis1100_fdata* fd=SIS1100FD(file);
+    size_t count_written;
+    int res;
+
+    res=_sis1100_write(sc, fd, count, &count_written, *ppos, buf);
+    if (!res) *ppos+=count_written;
+    return res?-res:count_written;
+}
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_block.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_block.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_block.c	(revision 22)
@@ -0,0 +1,73 @@
+/* $ZEL: sis1100_write_block.c,v 1.2 2004/05/27 23:10:38 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+int
+sis1100_write_block(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+        int size, int fifo, size_t num, size_t* num_written, int space,
+        int32_t am, u_int32_t addr, const u_int8_t* data, u_int32_t* error)
+{
+    if (!num) {*error=0; *num_written=0; return 0;}
+    if (sc->remote_hw==sis1100_hw_invalid) return ENXIO;
+
+    if (!ACCESS_OK((u_int8_t*)data, num*size, 1)) return EFAULT;
+
+    if (num==1) {
+        u_int32_t val;
+        switch (size) {
+#ifdef __NetBSD__
+            case 1: val=fubyte(data); break;
+            case 2: val=fusword(data); break;
+            case 4: val=fuword(data); break;
+#elif __linux__
+            case 1: __get_user(val, (u_int8_t*)data); break;
+            case 2: __get_user(val, (u_int16_t*)data); break;
+            case 4: __get_user(val, (u_int32_t*)data); break;
+#endif
+            default: val=0;
+        }
+        *error=sis1100_tmp_write(sc, addr, am, size, space, val);
+        *num_written=1;
+        return 0;
+    } else {
+        int res;
+        if ((size==4)&&fd->mindmalen_w&&(num>=fd->mindmalen_w)) {
+            res=sis1100_write_dma(sc, fd, addr, am, size,
+                    space, fifo, num, num_written, data, error);
+        } else {
+            res=sis1100_write_loop(sc, fd, addr, am, size,
+                    space, fifo, num, num_written, data, error);
+        }
+        return res;
+    }
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma.c	(revision 22)
@@ -0,0 +1,68 @@
+/* $ZEL: sis1100_write_dma.c,v 1.2 2004/05/27 23:10:39 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+sis1100_write_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 for DMA but is not checked*/
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_written,    /* words transferred */
+    const u_int8_t* data,     /* source (user virtual address) */
+    int* prot_err
+    )
+{
+    int res;
+    size_t _count_written, orig_count=count;
+
+    SEM_LOCK(sc->sem_hw);
+    do {
+        size_t counter;
+        res=_sis1100_write_dma(sc, fd, addr, am, size, space, fifo_mode,
+                count, &_count_written, data, prot_err);
+
+        if (res) break;
+
+        counter=_count_written*size;
+        if (!fifo_mode) addr+=counter;
+        data+=counter;
+        count-=_count_written;
+    } while (count && !res && !*prot_err);
+
+    SEM_UNLOCK(sc->sem_hw);
+
+    *count_written=orig_count-count;
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_linux.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_linux.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_linux.c	(revision 22)
@@ -0,0 +1,268 @@
+/* $ZEL: sis1100_write_dma_linux.c,v 1.2 2004/02/10 16:33:35 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+ssize_t
+_sis1100_write_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 for DMA but is not checked*/
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_written,    /* words transferred */
+    const u_int8_t* data,     /* source (user virtual address) */
+    int* prot_error
+    )
+{
+    int res, i, sgcount, aborted=0;
+    u_int32_t head, tmp, dmamode;
+    sigset_t oldset;
+#ifdef USE_SGL
+    int nr_pages;
+#else
+    struct kiobuf* iobuf=sc->iobuf;
+    int err, offs;
+#endif
+    /*printk(KERN_ERR "w addr=%d size=%d fifo=%d count=%d data=%p\n",
+                addr, size, fifo_mode, count, data);*/
+    count*=size;
+    if (count>DMA_MAX) count=DMA_MAX;
+
+    if ((addr^(addr+count))&0x80000000U) count=0x80000000U-addr;
+    *count_written=count/size;
+
+    {
+        u_int32_t val;
+        val=plxreadreg(sc, DMACSR0_DMACSR1);
+        if (!(val&0x10)) {
+            printk(KERN_CRIT "sis1100_write_dma: DMACSR0=%04x\n", val);
+            printk(KERN_CRIT "sis1100_write_dma: old DMA still active.\n");
+            return EIO;
+        }
+    }
+
+#ifdef USE_SGL
+    nr_pages=sgl_map_user_pages(sc->sglist, SGL_SIZE, data, count, WRITE);
+    /*printk(KERN_ERR "W nr_pages=%d\n", nr_pages);*/
+    if (nr_pages<0) {
+        printk(KERN_INFO "sis1100[%d] sgl_map_user_pages failed\n", sc->unit);
+        return -nr_pages;
+    }
+/*dump_sgl(sc->sglist, nr_pages);*/
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, nr_pages,
+        PCI_DMA_TODEVICE|0xf000);
+    /*printk(KERN_ERR "W sgcount=%d\n", sgcount);*/
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] write_dma: pci_map_sg failed\n",
+            sc->unit);
+        sgl_unmap_user_pages(sc->sglist, nr_pages, 0);
+        return EIO;
+    }
+#else
+    printk(KERN_ERR "DON'T USE_SGL\n");
+    err=map_user_kiobuf(WRITE, iobuf, (unsigned long)data, count);
+    printk(KERN_ERR "err=%d\n", err);
+    if (err) {
+        printk(KERN_INFO "map_user_kiobuf failed\n");
+        return err;
+    }
+    printk(KERN_ERR "nr_pages=%d\n", iobuf->nr_pages);
+
+    offs=iobuf->offset;
+    for (i=0; i<iobuf->nr_pages-1; i++) {
+        sc->sglist[i].address=0;
+        sc->sglist[i].page=iobuf->maplist[i];
+        sc->sglist[i].offset=offs;
+        sc->sglist[i].length=PAGE_SIZE-offs;
+        sc->sglist[i].dma_length=0;
+        offs=0;
+    }
+    sc->sglist[i].address=0;
+    sc->sglist[i].page=iobuf->maplist[i];
+    sc->sglist[i].offset=offs;
+    sc->sglist[i].length=iobuf->length-i*PAGE_SIZE+iobuf->offset-offs;
+    sc->sglist[i].dma_length=0;
+    sgcount=pci_map_sg(sc->pcidev, sc->sglist, iobuf->nr_pages,
+            PCI_DMA_TODEVICE);
+    printk(KERN_ERR "sgcount=%d\n", sgcount);
+    if (!sgcount) {
+        printk(KERN_ERR "sis1100[%d] read_dma: pci_map_sg failed\n",
+            sc->unit);
+        unmap_kiobuf(iobuf);
+        return EIO;
+    }
+#endif
+    dmamode=0x43|(1<<7)|(1<<8)|(1<<10)|(1<<14)|(1<<17);
+    if (sgcount>1) { /* use scatter/gather mode */
+        struct plx9054_dmadesc* desclist=
+            (struct plx9054_dmadesc*)sc->descbuf.cpu_addr;
+        struct scatterlist* sgl=sc->sglist;
+        u_int32_t local=addr&0x7fffffffU;
+        dma_addr_t next_handle=sc->descbuf.dma_handle;
+        dmamode|=1<<9;
+        for (i=sgcount; i; i--) {
+            /*printk(KERN_ERR "sgl(%d-%d)=%p\n", sgcount, i, sgl);*/
+            next_handle+=sizeof(struct plx9054_dmadesc);
+            desclist->pcistart=cpu_to_le32(sg_dma_address(sgl));
+            desclist->localstart=cpu_to_le32(local);
+            desclist->size=cpu_to_le32(sg_dma_len(sgl));
+            desclist->next=cpu_to_le32(next_handle|1);
+            if (!fifo_mode) local+=sg_dma_len(sgl);
+            desclist++; sgl++;
+        }
+        desclist[-1].next|=2;
+        plxwritereg(sc, DMADPR0, sc->descbuf.dma_handle|1);
+    } else { /* only one page --> use block mode */
+        /*printk(KERN_ERR "dma_address=0x%08x\n", sg_dma_address(sc->sglist));*/
+        plxwritereg(sc, DMAPADR0, sg_dma_address(sc->sglist));
+        plxwritereg(sc, DMALADR0, addr&0x7fffffffU);
+        plxwritereg(sc, DMASIZ0, sg_dma_len(sc->sglist));
+        plxwritereg(sc, DMADPR0, 0);
+    }
+
+/* prepare PLX */
+    plxwritereg(sc, DMACSR0_DMACSR1, 1<<3); /* clear irq */
+    plxwritereg(sc, DMAMODE0, dmamode);
+
+/* prepare add on logic */
+    /* 4 Byte, local space 2, BT, EOT, start with t_adl */
+    head=0x0f80A402|(space&0x3f)<<16;
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, d_am, am);
+    }
+    if (fifo_mode) head|=0x4000;
+    sis1100writereg(sc, d_hdr, head);
+    wmb();
+    sis1100writereg(sc, d_adl, addr); /* only bit 31 is valid */
+
+    sis1100writereg(sc, d_bc, count);
+
+    sis1100writereg(sc, p_balance, 0);
+
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    oldset = current->blocked;
+    sigfillset(&current->blocked);
+    sigdelset(&current->blocked, SIGKILL);
+    /* dangerous, should be removed later */
+    /*if (!sigismember(&oldset, SIGINT)) sigdelset(&current->blocked, SIGINT);*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+/* enable irq */
+    /* irq_synch_chg and irq_prot_l_err should always be enabled */
+    sis1100_enable_irq(sc, 0, irq_prot_l_err|irq_synch_chg|irq_prot_end);
+
+/* start dma */
+    sc->got_irqs=0;
+    mb();
+    plxwritereg(sc, DMACSR0_DMACSR1, 3);
+
+/* wait for confirmation */
+    res=wait_event_interruptible(
+	sc->local_wait,
+	(sc->got_irqs & (got_end|got_sync|got_l_err))
+	);
+
+    if (sc->got_irqs&got_l_err) {
+        printk(KERN_CRIT "sis1100[%d]: irq_prot_l_err in write_dma, irqs=0x%04x\n",
+            sc->unit, sc->got_irqs);
+    }
+    if (res|(sc->got_irqs&(got_sync))) {
+        aborted=0x300;
+        if (res) {
+            printk(KERN_INFO "sis1100[%d] write_dma: interrupted\n", sc->unit);
+            aborted|=1;
+        }
+        if (sc->got_irqs&got_sync) {
+            printk(KERN_WARNING "sis1100[%d] write_dma: synchronisation lost\n",
+                    sc->unit);
+            aborted|=2;
+        }
+    }
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+
+    spin_lock_irq(&current->SIGMASK_LOCK);
+    current->blocked = oldset;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+    recalc_sigpending(current);
+#else
+    recalc_sigpending();
+#endif
+    spin_unlock_irq(&current->SIGMASK_LOCK);
+
+    *prot_error=sis1100readreg(sc, prot_error);
+
+    if (aborted) {
+        *prot_error=aborted;
+        res=EIO;
+    } else if (*prot_error) {
+        if (*prot_error&0x200) {
+            u_int32_t addr;
+            head=0x0f000002;
+            addr = (int)&((struct sis3100_reg*)(0))->dma_write_counter;
+            sis1100writereg(sc, t_hdr, head);
+            sis1100writereg(sc, t_adl, addr);
+            do {
+	        tmp=sis1100readreg(sc, prot_error);
+            } while (tmp==0x005);
+            if (tmp!=0) {
+                 printk(KERN_WARNING "sis1100[%d] write_dma: "
+                    "read count after error: prot_error=0x%03x\n",
+                    sc->unit, tmp);
+                res=EIO;
+            } else {
+                *count_written=sis1100readreg(sc, tc_dal)/size;
+            }
+        } else {
+            res=EIO;
+        }
+    }
+
+    if (aborted) sis1100_dump_glink_status(sc, "after abort", 1);
+
+#ifdef USE_SGL
+    pci_unmap_sg(sc->pcidev, sc->sglist, nr_pages, PCI_DMA_TODEVICE);
+    sgl_unmap_user_pages(sc->sglist, nr_pages, 1);
+#else
+    pci_unmap_sg(sc->pcidev, sc->sglist, iobuf->nr_pages, PCI_DMA_TODEVICE);
+    unmap_kiobuf(iobuf);
+#endif
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_netbsd.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_netbsd.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_dma_netbsd.c	(revision 22)
@@ -0,0 +1,214 @@
+/* $ZEL: sis1100_write_dma_netbsd.c,v 1.3 2004/05/27 23:10:39 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Matthias Drochner, Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <dev/pci/sis1100_sc.h>
+
+ssize_t
+_sis1100_write_dma(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize must be 4 for DMA but is not checked*/
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_written,    /* words transferred */
+    const u_int8_t* data,     /* source (user virtual address) */
+    int* prot_error
+    )
+{
+    int res, i, aborted=0, s;
+    u_int32_t head, tmp;
+    u_int32_t la=addr&0x7fffffffU; /* local address */
+/*
+    sigset_t oldset;
+    int err, offs;
+*/
+    struct plx9054_dmadesc *dd;
+    u_int32_t nextptr;
+
+    count*=size;
+    if (count>MAX_DMA_LEN) count=MAX_DMA_LEN;
+
+    if ((addr^(addr+count))&0x80000000U) count=0x80000000U-addr;
+    *count_written=count/size;
+
+    res = uvm_vslock(fd->p, (u_int8_t*)data, count, VM_PROT_READ|VM_PROT_WRITE);
+    if (res)
+        return res;
+
+    res=bus_dmamap_load(sc->sc_dma.dmat, sc->sc_dma.userdma,
+             (u_int8_t*)data, count, fd->p, BUS_DMA_WAITOK);
+    if (res) {
+        uvm_vsunlock(fd->p, (u_int8_t*)data, count);
+        printf("%s: bus_dmamap_load failed\n", sc->sc_dev.dv_xname);
+        return res;
+    }
+
+    dd = sc->sc_dma.descs;
+    nextptr = 0x00000002;
+    if (!fifo_mode)
+        la += count;
+#ifdef PLXDEBUG
+    printf("dma: %d segs, size %ld\n",
+            sc->sc_dma.userdma->dm_nsegs, sc->sc_dma.userdma->dm_mapsize);
+#endif
+    for (i = sc->sc_dma.userdma->dm_nsegs - 1; i >= 0; i--) {
+        if (!fifo_mode)
+                la -= sc->sc_dma.userdma->dm_segs[i].ds_len;
+
+        dd[i].pcistart = sc->sc_dma.userdma->dm_segs[i].ds_addr;
+        dd[i].size = sc->sc_dma.userdma->dm_segs[i].ds_len;
+        dd[i].localstart = la;
+        dd[i].next = nextptr;
+#ifdef PLXDEBUG
+        printf("desc[%d]: %x/%x/%x/%x\n", i,
+                dd[i].pcistart, dd[i].size, dd[i].localstart, dd[i].next);
+#endif
+        nextptr = (sc->sc_dma.descdma->dm_segs[0].ds_addr +
+                i * sizeof(struct plx9054_dmadesc)) | 1;
+    }
+
+/* prepare PLX */
+    plxwritereg(sc, DMACSR0_DMACSR1, 1<<3); /* clear irq */
+    plxwritereg(sc, DMAMODE0,
+        0x43|(1<<7)|(1<<8)|(1<<9)|(1<<10)|(1<<14)|(1<<17)|
+            (fifo_mode?(1<<11):0));
+    plxwritereg(sc, DMADPR0, nextptr);
+
+/* prepare add on logic */
+    /* 4 Byte, local space 2, BT, EOT, start with t_adl */
+    head=0x0f80A402|(space&0x3f)<<16;
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, d_am, am);
+    }
+    if (fifo_mode) head|=0x4000;
+    sis1100writereg(sc, d_hdr, head);
+    /*wmb();*/
+    sis1100writereg(sc, d_adl, addr); /* only bit 31 is valid */
+
+    sis1100writereg(sc, d_bc, count);
+
+    sis1100writereg(sc, p_balance, 0);
+#if 0
+    spin_lock_irq(&current->sigmask_lock);
+    oldset = current->blocked;
+    sigfillset(&current->blocked);
+    sigdelset(&current->blocked, SIGKILL);
+    /* dangerous, should be removed later */
+    /*if (!sigismember(&oldset, SIGINT)) sigdelset(&current->blocked, SIGINT);*/
+    recalc_sigpending(current);
+    spin_unlock_irq(&current->sigmask_lock);
+#endif
+/* enable irq */
+    /* irq_synch_chg and irq_prot_l_err should always be enabled */
+    sc->got_irqs=0;
+    sis1100_enable_irq(sc, 0,
+        irq_prot_l_err|irq_synch_chg|irq_prot_end);
+
+/* start transfer and wait for confirmation*/
+    res=0;
+    s = splbio();
+    plxwritereg(sc, DMACSR0_DMACSR1, 3);
+    while (!res && !(sc->got_irqs & (got_end|got_sync|got_l_err))) {
+        res = tsleep(&sc->local_wait, PCATCH, "plxdma_w_1", 1*hz);
+    }
+    splx(s);
+
+    if (sc->got_irqs&got_l_err) {
+        printf("sis1100: irq_prot_l_err in write_dma, irqs=0x%04x\n",
+            sc->got_irqs);
+    }
+    if (res|(sc->got_irqs&(got_sync))) {
+        aborted=0x300;
+        if (res) {
+            if (res==EWOULDBLOCK)
+                printf( "%s: write_dma: timed out\n",
+                        sc->sc_dev.dv_xname);
+            else if (res==EINTR)
+                printf( "%s: write_dma(1): interrupted; res=%d\n",
+                        sc->sc_dev.dv_xname, res);
+            else if (res==ERESTART)
+                 printf( "%s: write_dma(1): interrupted; restart\n",
+                        sc->sc_dev.dv_xname);
+            else
+                 printf( "%s: write_dma(1): res=%d\n",
+                        sc->sc_dev.dv_xname, res);
+            aborted|=1;
+        }
+        if (sc->got_irqs&got_sync) {
+            printf("%s: write_dma: synchronisation lost\n",
+                    sc->sc_dev.dv_xname);
+            aborted|=2;
+        }
+    }
+
+    sis1100_disable_irq(sc, 0, irq_prot_end);
+#if 0
+    spin_lock_irq(&current->sigmask_lock);
+    current->blocked = oldset;
+    recalc_sigpending(current);
+    spin_unlock_irq(&current->sigmask_lock);
+#endif
+    *prot_error=sis1100readreg(sc, prot_error);
+
+    if (aborted) {
+        *prot_error=aborted;
+        res=EIO;
+    } else if (*prot_error) {
+        if (*prot_error&0x200) {
+            u_int32_t addr;
+            head=0x0f000002;
+            addr = (int)&((struct sis3100_reg*)(0))->dma_write_counter;
+            sis1100writereg(sc, t_hdr, head);
+            sis1100writereg(sc, t_adl, addr);
+            do {
+	        tmp=sis1100readreg(sc, prot_error);
+            } while (tmp==0x005);
+            if (tmp!=0) {
+                printf("%s: write_dma: "
+                    "read count after error: prot_error=0x%03x\n",
+                    sc->sc_dev.dv_xname, tmp);
+                res=EIO;
+            } else {
+                *count_written=sis1100readreg(sc, tc_dal)/size;
+            }
+        } else {
+            res=EIO;
+        }
+    }
+
+    /*if (aborted) dump_glink_status(sc, "after abort", 1);*/
+
+    uvm_vsunlock(fd->p, (u_int8_t*)data, count);
+
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_loop.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_loop.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_loop.c	(revision 22)
@@ -0,0 +1,164 @@
+/* $ZEL: sis1100_write_loop.c,v 1.2 2004/05/27 23:10:40 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+#if !defined(__NetBSD__) && ! defined(__linux__)
+#error Invalid or Unknown Operating System
+#endif
+
+/*
+ * sis1100_write_loop always transports data directly from userspace!
+ * Access permissions have to be checked before.
+ */
+
+ssize_t
+sis1100_write_loop(
+    struct sis1100_softc* sc,
+    struct sis1100_fdata* fd,
+    u_int32_t addr,           /* VME or SDRAM address */
+    int32_t am,               /* address modifier, not used if <0 */
+    int size,                 /* datasize */
+    int space,                /* remote space (1,2: VME; 6: SDRAM) */
+    int fifo_mode,
+    size_t count,             /* words (of size 'size') to be transferred */
+                              /* count==0 is illegal */
+    size_t* count_written,    /* words transferred */
+    const u_int8_t* data,     /* source (user virtual address) */
+    int* prot_error
+    )
+{
+    u_int32_t head;
+    int idx;
+
+    *count_written=count;
+    head=0x0f000404|(space&0x3f)<<16;
+    SEM_LOCK(sc->sem_hw);
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    switch (size) {
+    case 1:
+        if (fifo_mode) {
+            sis1100writereg(sc, t_adl, addr);
+            sis1100writereg(sc, t_hdr, head|(0x01000000<<(addr&3)));
+            for (idx=0; idx<count; idx++, data++) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fubyte(data);
+#elif __linux__
+                __get_user(val, (u_int8_t*)data);
+#endif
+                val=(val&0xff)<<((addr&3)<<3);
+                sis1100rawwritereg(sc, t_dal, val);
+            }
+        } else {
+            for (idx=0; idx<count; idx++, data++, addr++) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fubyte(data);
+#elif __linux__
+                __get_user(val, (u_int8_t*)data);
+#endif
+                val=(val&0xff)<<((addr&3)<<3);
+                sis1100writereg(sc, t_hdr, head|(0x01000000<<(addr&3)));
+                sis1100writereg(sc, t_adl, addr);
+                sis1100rawwritereg(sc, t_dal, val);
+            }
+        }
+        break;
+    case 2:
+        if (fifo_mode) {
+            sis1100writereg(sc, t_adl, addr);
+            sis1100writereg(sc, t_hdr, head|(0x03000000<<(addr&3)));
+            for (idx=0; idx<count; idx++, data+=2) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fusword(data);
+#elif __linux__
+                __get_user(val, (u_int16_t*)data);
+#endif
+                val=(val&0xffff)<<((addr&3)<<3);
+                sis1100rawwritereg(sc, t_dal, val);
+            }
+        } else {
+            for (idx=0; idx<count; idx++, data+=2, addr+=2) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fusword(data);
+#elif __linux__
+                __get_user(val, (u_int16_t*)data);
+#endif
+                val=(val&0xffff)<<((addr&3)<<3);
+                sis1100writereg(sc, t_hdr, head|(0x03000000<<(addr&3)));
+                sis1100writereg(sc, t_adl, addr);
+                sis1100rawwritereg(sc, t_dal, val);
+            }
+        }
+        break;
+    case 4:
+        sis1100writereg(sc, t_hdr, head|0x0f000000);
+        if (fifo_mode) {
+            sis1100writereg(sc, t_adl, addr);
+            for (idx=0; idx<count; idx++, data+=4) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fuword(data);
+#elif __linux__
+                __get_user(val, (u_int32_t*)data);
+#endif
+                sis1100rawwritereg(sc, t_dal, val);
+            }
+        } else {
+            for (idx=0; idx<count; idx++, data+=4, addr+=4) {
+                u_int32_t val;
+#ifdef __NetBSD__
+                val=fuword(data);
+#elif __linux__
+                __get_user(val, (u_int32_t*)data);
+#endif
+                sis1100writereg(sc, t_adl, addr);
+                sis1100writereg(sc, t_dal, val);
+            }
+        }
+        break;
+    }
+
+    do {
+        *prot_error=sis1100readreg(sc, prot_error);
+    } while (*prot_error==0x005);
+
+    SEM_UNLOCK(sc->sem_hw);
+
+    /*
+    This is not really correct, but we don't know how many data
+    have been successfully written before an error occured.
+    */
+    return *prot_error?EIO:0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_pipe.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_pipe.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100_write_pipe.c	(revision 22)
@@ -0,0 +1,58 @@
+/* $ZEL: sis1100_write_pipe.c,v 1.2 2004/05/27 23:10:40 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100_write_pipe(struct sis1100_softc* sc, int32_t am,
+    int space, int num, u_int32_t* data)
+{
+    u_int32_t error;
+    u_int32_t head;
+    int i;
+
+    head=0x0f000404|(space&0x3f)<<16;
+
+    SEM_LOCK(sc->sem_hw);
+    if (am>=0) {
+        head|=0x800;
+        sis1100writereg(sc, t_am, am);
+    }
+    sis1100writereg(sc, t_hdr, head);
+    for (i=0; i<num; i++) {
+        sis1100writereg(sc, t_adl, *data++);
+        sis1100writereg(sc, t_dal, *data++);
+    }
+
+    do {
+        error=sis1100readreg(sc, prot_error);
+    } while (error==0x005);
+    SEM_UNLOCK(sc->sem_hw);
+
+    return error;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_front_io.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_front_io.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_front_io.c	(revision 22)
@@ -0,0 +1,47 @@
+/* $ZEL: sis1100rem_front_io.c,v 1.2 2004/05/27 23:10:41 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100rem_front_io(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
+
+int
+sis1100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
+
+int
+sis1100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis1100rem_init.c	(revision 22)
@@ -0,0 +1,64 @@
+/* $ZEL: sis1100rem_init.c,v 1.2 2004/05/27 23:10:41 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2003
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis1100rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 4
+#define MAX_FV 7
+    u_int32_t hv, fk, fv;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00010100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "1100: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "1100: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pINFO(sc, "1100: remote hw/fw type not supported");
+        return -1;
+    }
+
+    sc->ram_size=0;
+    sc->dsp_present=0;
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100_map.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100_map.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100_map.h	(revision 22)
@@ -0,0 +1,97 @@
+/* $ZEL: sis3100_map.h,v 1.2 2004/05/27 23:10:42 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis3100_map_h_
+#define _sis3100_map_h_
+
+struct sis3100_reg {
+    u_int32_t ident;              /* 0x000 */
+    u_int32_t optical_sr;         /* 0x004 */
+    u_int32_t optical_cr;         /* 0x008 */
+    u_int32_t res0[29];
+    u_int32_t in_out;             /* 0x080 */
+    u_int32_t in_latch_irq;       /* 0x084 */
+    u_int32_t res1[30];
+    u_int32_t vme_master_sc;      /* 0x100 */
+    u_int32_t vme_irq_sc;         /* 0x104 */
+    u_int32_t res2[62];
+    u_int32_t vme_slave_sc;       /* 0x200 */
+    u_int32_t dma_write_counter;  /* 0x204 */
+    u_int32_t res3[62];
+    u_int32_t dsp_sc;             /* 0x300 */
+    u_int32_t res4[63];
+    u_int32_t vme_addr_map[256];  /* 0x400 */
+};
+
+/* bits in in_out */
+#define sis3100_io_flat_out1 (1<<0)
+#define sis3100_io_flat_out2 (1<<1)
+#define sis3100_io_flat_out3 (1<<2)
+#define sis3100_io_flat_out4 (1<<3)
+#define sis3100_io_lemo_out1 (1<<4)
+#define sis3100_io_lemo_out2 (1<<5)
+#define sis3100_io_lemo_out3 (1<<6)
+/* clear is (io_*_out?)<<16 */
+#define sis3100_io_flat_in1 (1<<16)
+#define sis3100_io_flat_in2 (1<<17)
+#define sis3100_io_flat_in3 (1<<18)
+#define sis3100_io_flat_in4 (1<<19)
+#define sis3100_io_lemo_in1 (1<<20)
+#define sis3100_io_lemo_in2 (1<<21)
+#define sis3100_io_lemo_in3 (1<<22)
+
+/* bits in vme_master_sc */
+#define vme_system_controller_enable (1<<0)
+#define vme_sys_reset         (1<<1)
+#define vme_lemo_out_reset    (1<<2)
+#define vme_power_on_reset    (1<<3)
+#define vme_request_level     (3<<4)
+#define vme_requester_type    (1<<6)
+#define vme_user_led          (1<<7)
+#define vme_enable_retry      (1<<8)
+#define vme_long_timer        (3<<12)
+#define vme_berr_timer        (3<<14)
+#define vme_system_controller (1<<16)
+
+/* bits in dsp_sc */
+#define sis3100_dsp_run        (1<<8)
+#define sis3100_dsp_boot_eprom (1<<9)
+#define sis3100_dsp_boot_ctrl  (1<<11)
+
+#define sis3100_dsp_available  (1<<24)
+#define sis3100_dsp_flag0      (1<<28)
+#define sis3100_dsp_flag1      (1<<29)
+#define sis3100_dsp_flag2      (1<<30)
+#define sis3100_dsp_flag3      (1<<31)
+
+/* error codes */
+#define sis3100_re_berr        0x211 /* Bus Error */
+#define sis3100_re_retr        0x212 /* Retry */
+#define sis3100_re_atimeout    0x214 /* Arbitration timeout */
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_front_io.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_front_io.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_front_io.c	(revision 22)
@@ -0,0 +1,127 @@
+/* $ZEL: sis3100rem_front_io.c,v 1.2 2004/05/27 23:10:43 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+/*
+ * pseudoregister front_io:
+ * bit write function        read function
+ * 31
+ * 30
+ * 29
+ * 28
+ * 27  res pci_led_1         free
+ * 26  res pci_led_0         free
+ * 25  res pci_lemo_out_1    status pci_lemo_in_1
+ * 24  res pci_lemo_out_0    status pci_lemo_in_0
+ * 23  res vme_user_led      free
+ * 22  res vme_lemo_out_3    status vme_lemo_in_3
+ * 21  res vme_lemo_out_2    status vme_lemo_in_2
+ * 20  res vme_lemo_out_1    status vme_lemo_in_1
+ * 19  res vme_flat_out_4    status vme_flat_in_4
+ * 18  res vme_flat_out_3    status vme_flat_in_3
+ * 17  res vme_flat_out_2    status vme_flat_in_2
+ * 16  res vme_flat_out_1    status vme_flat_in_1
+ * 15
+ * 14
+ * 13
+ * 12
+ * 11  set pci_led_1         status pci_led_1
+ * 10  set pci_led_0         status pci_led_0
+ *  9  set pci_lemo_out_1    status pci_lemo_out_1
+ *  8  set pci_lemo_out_0    status pci_lemo_out_0
+ *  7  set vme_user_led      status vme_user_led
+ *  6  set vme_lemo_out_3    status vme_lemo_out_3
+ *  5  set vme_lemo_out_2    status vme_lemo_out_2
+ *  4  set vme_lemo_out_1    status vme_lemo_out_1
+ *  3  set vme_flat_out_4    status vme_flat_out_4
+ *  2  set vme_flat_out_3    status vme_flat_out_3
+ *  1  set vme_flat_out_2    status vme_flat_out_2
+ *  0  set vme_flat_out_1    status vme_flat_out_1
+ */
+/*
+ * set_vme_flat_out_?=0x0000000f
+ * res_vme_flat_out_?=0x000f0000
+ * set_vme_lemo_out_?=0x00000070
+ * res_vme_lemo_out_?=0x00700000
+ * set_vme_user_led  =0x00000080
+ * res_vme_user_led  =0x00800000
+ * set_pci_lemo_out_?=0x00000300
+ * res_pci_lemo_out_?=0x03000000
+ * set_pci_led_?     =0x00000c00
+ * res_pci_led_?     =0x0c000000
+ */
+
+int
+sis3100rem_front_io(struct sis1100_softc* sc, u_int32_t* data)
+{
+    u_int32_t io3100, st3100, _data;
+
+    /* XXX no error handling yet */
+    io3100=plxreadlocal0(sc, ofs(struct sis3100_reg, in_out)+0x800);
+    st3100=plxreadlocal0(sc, ofs(struct sis3100_reg, vme_master_sc)+0x800);
+
+    _data = (io3100&0x7f007f) |    /* 3100 flat/lemo in/out */
+            (st3100&0x80);         /* 3100 user led */
+
+    io3100=*data & 0x007f007f;
+    st3100=*data & 0x00800080;
+
+    if (io3100)
+        plxwritelocal0(sc, ofs(struct sis3100_reg, in_out)+0x800, io3100);
+    if (st3100)
+        plxwritelocal0(sc, ofs(struct sis3100_reg, vme_master_sc)+0x800, st3100);
+
+    *data=_data;
+    return 0;
+}
+
+int
+sis3100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data)
+{
+    u_int32_t io3100;
+
+    io3100=(*data<<24) & 0x7f000000;
+
+    plxwritelocal0(sc, ofs(struct sis3100_reg, in_out)+0x800, io3100);
+
+    return 0;
+}
+
+int
+sis3100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data)
+{
+    u_int32_t latch, _data;
+
+    latch=(*data<<24) & 0xff000000;
+    _data=plxreadlocal0(sc, ofs(struct sis3100_reg, in_latch_irq)+0x800);
+    plxwritelocal0(sc, ofs(struct sis3100_reg, in_latch_irq)+0x800, latch);
+
+    *data=(_data>>24) & 0xff;
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c	(revision 22)
@@ -0,0 +1,166 @@
+/* $ZEL: sis3100rem_init.c,v 1.3 2004/05/27 23:10:44 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static int
+sis3100_dsp_present(struct sis1100_softc* sc)
+{
+    u_int32_t dsp_sc;
+    int res;
+
+    res=sis3100readremreg(sc, dsp_sc, &dsp_sc, 0);
+    if (res) {
+        pINFO(sc, "3100: read dsp_sc: res=%d", res);
+        return 0;
+    }
+    return !!(dsp_sc&sis3100_dsp_available);
+}
+
+int
+sis3100_get_timeouts(struct sis1100_softc* sc, int* berr, int* arb)
+{
+    u_int32_t stat, error;
+    int berr_timer, long_timer, berr_time, long_time;
+
+    error=sis3100readremreg(sc, vme_master_sc, &stat, 0);
+    if (error) return error;
+
+    berr_timer=(stat>>14)&3;
+    long_timer=(stat>>12)&3;
+    berr_time=0;
+    long_time=0;
+    switch (berr_timer) {
+        case 0: berr_time=1250; break;
+        case 1: berr_time=6250; break;
+        case 2: berr_time=12500; break;
+        case 3: berr_time=100000; break;
+    }
+    switch (long_timer) {
+        case 0: long_time=  1; break;
+        case 1: long_time= 10; break;
+        case 2: long_time= 50; break;
+        case 3: long_time=100; break;
+    }
+    *berr=berr_time;
+    *arb=long_time;
+    return 0;
+}
+
+static void
+sis3100_dump_timeouts(struct sis1100_softc* sc)
+{
+    int berr_time, long_time;
+
+    sis3100_get_timeouts(sc, &berr_time, &long_time);
+    pINFO(sc, "3100: berr_time=%d ns", berr_time);
+    pINFO(sc, "3100: long_time=%d ms", long_time);
+}
+
+int
+sis3100_set_timeouts(struct sis1100_softc* sc, int berr, int arb)
+/* berr in terms of 10**-9 s */
+/* arb  in terms of 10**-3 s */
+{
+    int berr_timer, long_timer;
+    u_int32_t bits;
+
+    if (berr>12500)
+        berr_timer=3;
+    else if (berr>6250)
+        berr_timer=2;
+    else if (berr>1250)
+        berr_timer=1;
+    else 
+        berr_timer=0;
+
+    if (arb>50)
+        long_timer=3;
+    else if (arb>10)
+        long_timer=2;
+    else if (arb>1)
+        long_timer=1;
+    else 
+        long_timer=0;
+
+    bits=(long_timer|(berr_timer<<2))<<12;
+    bits|=(~bits<<16)&0xf0000000;
+    return sis3100writeremreg(sc, vme_master_sc, bits, 0);
+}
+
+int
+sis3100rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 3
+#define MAX_FV 6
+    u_int32_t hv, fk, fv, stat;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00010100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "3100: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "3100: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pERROR(sc, "3100: remote hw/fw type not supported");
+        return -1;
+    }
+
+    if (sis1100_init_sdram(sc)<0)
+        return -1;
+    pINFO(sc, "3100: size of SDRAM: 0x%llx (%lld MByte)",
+        sc->ram_size, sc->ram_size>>20);
+
+    sc->dsp_present=sis3100_dsp_present(sc);
+    pINFO(sc, "3100: DSP is %spresent", sc->dsp_present?"":"not ");
+
+    SEM_LOCK(sc->sem_hw);
+    sis3100writeremreg(sc, vme_irq_sc, 0x00fe0001, 1); /* disable VME IRQs */
+    sis3100readremreg(sc, vme_master_sc, &stat, 1);
+    SEM_UNLOCK(sc->sem_hw);
+    pINFO(sc, "3100: remote stat=0x%08x", stat);
+    if (!(stat&vme_system_controller)) {
+        pINFO(sc, "3100: System Controller NOT enabled!");
+    }
+    sis3100_set_timeouts(sc, 5000, 10);
+    sis3100_dump_timeouts(sc);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c.~1.3.~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c.~1.3.~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_init.c.~1.3.~	(revision 22)
@@ -0,0 +1,166 @@
+/* $ZEL: sis3100rem_init.c,v 1.3 2004/05/27 23:10:44 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static int
+sis3100_dsp_present(struct sis1100_softc* sc)
+{
+    u_int32_t dsp_sc;
+    int res;
+
+    res=sis3100readremreg(sc, dsp_sc, &dsp_sc, 0);
+    if (res) {
+        pINFO(sc, "3100: read dsp_sc: res=%d", res);
+        return 0;
+    }
+    return !!(dsp_sc&sis3100_dsp_available);
+}
+
+int
+sis3100_get_timeouts(struct sis1100_softc* sc, int* berr, int* arb)
+{
+    u_int32_t stat, error;
+    int berr_timer, long_timer, berr_time, long_time;
+
+    error=sis3100readremreg(sc, vme_master_sc, &stat, 0);
+    if (error) return error;
+
+    berr_timer=(stat>>14)&3;
+    long_timer=(stat>>12)&3;
+    berr_time=0;
+    long_time=0;
+    switch (berr_timer) {
+        case 0: berr_time=1250; break;
+        case 1: berr_time=6250; break;
+        case 2: berr_time=12500; break;
+        case 3: berr_time=100000; break;
+    }
+    switch (long_timer) {
+        case 0: long_time=  1; break;
+        case 1: long_time= 10; break;
+        case 2: long_time= 50; break;
+        case 3: long_time=100; break;
+    }
+    *berr=berr_time;
+    *arb=long_time;
+    return 0;
+}
+
+static void
+sis3100_dump_timeouts(struct sis1100_softc* sc)
+{
+    int berr_time, long_time;
+
+    sis3100_get_timeouts(sc, &berr_time, &long_time);
+    pINFO(sc, "3100: berr_time=%d ns", berr_time);
+    pINFO(sc, "3100: long_time=%d ms", long_time);
+}
+
+int
+sis3100_set_timeouts(struct sis1100_softc* sc, int berr, int arb)
+/* berr in terms of 10**-9 s */
+/* arb  in terms of 10**-3 s */
+{
+    int berr_timer, long_timer;
+    u_int32_t bits;
+
+    if (berr>12500)
+        berr_timer=3;
+    else if (berr>6250)
+        berr_timer=2;
+    else if (berr>1250)
+        berr_timer=1;
+    else 
+        berr_timer=0;
+
+    if (arb>50)
+        long_timer=3;
+    else if (arb>10)
+        long_timer=2;
+    else if (arb>1)
+        long_timer=1;
+    else 
+        long_timer=0;
+
+    bits=(long_timer|(berr_timer<<2))<<12;
+    bits|=(~bits<<16)&0xf0000000;
+    return sis3100writeremreg(sc, vme_master_sc, bits, 0);
+}
+
+int
+sis3100rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 3
+#define MAX_FV 5
+    u_int32_t hv, fk, fv, stat;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00010100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "3100: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "3100: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pERROR(sc, "3100: remote hw/fw type not supported");
+        return -1;
+    }
+
+    if (sis1100_init_sdram(sc)<0)
+        return -1;
+    pINFO(sc, "3100: size of SDRAM: 0x%llx (%lld MByte)",
+        sc->ram_size, sc->ram_size>>20);
+
+    sc->dsp_present=sis3100_dsp_present(sc);
+    pINFO(sc, "3100: DSP is %spresent", sc->dsp_present?"":"not ");
+
+    SEM_LOCK(sc->sem_hw);
+    sis3100writeremreg(sc, vme_irq_sc, 0x00fe0001, 1); /* disable VME IRQs */
+    sis3100readremreg(sc, vme_master_sc, &stat, 1);
+    SEM_UNLOCK(sc->sem_hw);
+    pINFO(sc, "3100: remote stat=0x%08x", stat);
+    if (!(stat&vme_system_controller)) {
+        pINFO(sc, "3100: System Controller NOT enabled!");
+    }
+    sis3100_set_timeouts(sc, 5000, 10);
+    sis3100_dump_timeouts(sc);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_irq.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_irq.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis3100rem_irq.c	(revision 22)
@@ -0,0 +1,154 @@
+/* $ZEL: sis3100rem_irq.c,v 1.3 2004/05/27 23:10:45 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static int
+sis3100_irq_acknowledge(struct sis1100_softc* sc, int level)
+{
+    int vector;
+    u_int32_t error;
+
+    SEM_LOCK(sc->sem_hw);
+    if (level&1)
+        sis1100writereg(sc, t_hdr, 0x0c010802);
+    else
+        sis1100writereg(sc, t_hdr, 0x03010802);
+    sis1100writereg(sc, t_am, (1<<14)|0x3f);
+    sis1100writereg(sc, t_adl, level<<1);
+    error=sis1100readreg(sc, prot_error);
+
+    if (error) {
+	pERROR(sc, "3100: error in Iack level %d: 0x%x", level, error);
+        vector=-1;
+    } else {
+        vector=sis1100readreg(sc, tc_dal)&0xff;
+    }
+    SEM_UNLOCK(sc->sem_hw);
+    return vector;
+}
+
+void
+sis3100rem_irq_handler(struct sis1100_softc* sc)
+{
+    DECLARE_SPINLOCKFLAGS(s)
+    int i;
+
+    SPIN_LOCK_IRQSAVE(sc->lock_doorbell, s);
+    sc->new_irqs|=sc->doorbell&~sc->pending_irqs;
+    sc->doorbell=0;
+    SPIN_UNLOCK_IRQRESTORE(sc->lock_doorbell, s);
+    sc->pending_irqs|=sc->new_irqs;
+
+    SEM_LOCK(sc->sem_fdata_list);
+    /* block IRQs in VME controller*/
+    if (sc->new_irqs & SIS3100_VME_IRQS) {
+        sis3100writeremreg(sc, vme_irq_sc, (sc->new_irqs&SIS3100_VME_IRQS)<<16, 1);
+    }
+    /* obtain irq vectors from VME */
+    for (i=7; i>0; i--) {
+        if (sc->new_irqs & (1<<i)) {
+            sc->irq_vects[i].vector=sis3100_irq_acknowledge(sc, i);
+            sc->irq_vects[i].valid=1;
+            /*printk(KERN_INFO "vme_irq_handler: level %d vector=0x%08x\n",
+                i, sc->irq_info[i].vector);*/
+        }
+    }
+    /* block and clear FRONT-IRQs in VME controller*/
+    if (sc->new_irqs & SIS3100_EXT_IRQS) {
+        sis3100writeremreg(sc, in_latch_irq, (sc->new_irqs&SIS3100_EXT_IRQS)<<8, 1);
+        sis3100writeremreg(sc, in_latch_irq, (sc->new_irqs&SIS3100_EXT_IRQS)<<16, 1);
+    }
+
+    sis3100writeremreg(sc, vme_irq_sc, 1<<15, 1);
+    /*sis3100writereg(sc, in_latch_irq, 1<<15, 1);*/
+    SEM_UNLOCK(sc->sem_fdata_list);
+}
+
+void
+sis3100rem_enable_irqs(struct sis1100_softc* sc,
+        struct sis1100_fdata* fd, u_int32_t mask)
+{
+    if (mask & SIS3100_VME_IRQS) {
+        mask&=SIS3100_VME_IRQS;
+        sis3100writeremreg(sc, vme_irq_sc, mask, 0);
+    }
+    /* enable VME-FRONT-IRQs and SIS3100_DSP_IRQ */
+    if (mask & SIS3100_EXT_IRQS) {
+        mask&=SIS3100_EXT_IRQS;
+        sis3100writeremreg(sc, in_latch_irq, mask<<16, 0);
+        sis3100writeremreg(sc, in_latch_irq, mask>>8, 0);
+    }
+}
+
+void
+sis3100rem_disable_irqs(struct sis1100_softc* sc,
+        struct sis1100_fdata* fd, u_int32_t mask)
+{
+    if (mask & SIS3100_VME_IRQS) {
+        mask&=SIS3100_VME_IRQS;
+        mask<<=16;
+        sis3100writeremreg(sc, vme_irq_sc, mask, 0);
+    }
+    if (mask & SIS3100_EXT_IRQS) {
+        mask&=SIS3100_EXT_IRQS;
+        mask<<=8;
+        sis3100writeremreg(sc, in_latch_irq, mask, 0);
+    }
+}
+
+void
+sis3100rem_get_vector(struct sis1100_softc* sc, int irqs,
+                        struct sis1100_irq_get* data)
+{
+        if (irqs & SIS3100_VME_IRQS) {
+                int bit;
+                /* find highest bit set */
+                for (bit=7; bit>0; bit--) {
+                        if (((1<<bit) & irqs) && sc->irq_vects[bit].valid) {
+                                data->level=bit;
+                                data->vector=sc->irq_vects[bit].vector;
+                                sc->irq_vects[bit].valid=0;
+                                break;
+                        }
+                }
+        } else {
+                data->vector=-1;
+                data->level=0;
+        }
+}
+
+void
+sis3100rem_irq_ack(struct sis1100_softc* sc, int irqs)
+{
+    if (irqs & SIS3100_VME_IRQS)
+        sis3100writeremreg(sc, vme_irq_sc, irqs & SIS3100_VME_IRQS, 0);
+
+    if (irqs & SIS3100_EXT_IRQS)
+        sis3100writeremreg(sc, in_latch_irq, (irqs&SIS3100_EXT_IRQS)>>8, 0);
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100_map.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100_map.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100_map.h	(revision 22)
@@ -0,0 +1,102 @@
+/* $ZEL: sis5100_map.h,v 1.2 2004/05/27 23:10:46 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis5100_map_h_
+#define _sis5100_map_h_
+
+struct sis5100_reg {
+    u_int32_t ident;              /* 0x000 */
+    u_int32_t optical_sr;         /* 0x004 */
+    u_int32_t optical_cr;         /* 0x008 */
+    u_int32_t res0[29];
+    u_int32_t in_out;             /* 0x080 */
+    u_int32_t in_latch_irq;       /* 0x084 */
+    u_int32_t res1[30];
+    u_int32_t camac_sc;           /* 0x100 */
+    u_int32_t camac_irq_sc;       /* 0x104 */
+    u_int32_t lam_enable;         /* 0x108 */
+    u_int32_t res2[1];
+    u_int32_t multistation;       /* 0x110 */
+    u_int32_t res3[60];
+    u_int32_t dma_write_counter;  /* 0x204 */
+    u_int32_t res4[62];
+    u_int32_t dsp_sc;             /* 0x300 */
+};
+
+/* bits in in_out */
+#define sis5100_io_flat_out1 (1<<0)
+#define sis5100_io_flat_out2 (1<<1)
+#define sis5100_io_flat_out3 (1<<2)
+
+#define sis5100_io_lemo_out1 (1<<4)
+#define sis5100_io_lemo_out2 (1<<5)
+#define sis5100_io_lemo_out3 (1<<6)
+/* clear is (io_*_out?)<<16 */
+
+#define sis5100_io_flat_in1 (1<<16)
+#define sis5100_io_flat_in2 (1<<17)
+#define sis5100_io_flat_in3 (1<<18)
+
+#define sis5100_io_lemo_in1 (1<<20)
+#define sis5100_io_lemo_in2 (1<<21)
+#define sis5100_io_lemo_in3 (1<<22)
+
+#define sis5100_io_flat_pulse1 (1<<24)
+#define sis5100_io_flat_pulse2 (1<<25)
+#define sis5100_io_flat_pulse3 (1<<26)
+
+#define sis5100_io_lemo_pulse1 (1<<28)
+#define sis5100_io_lemo_pulse2 (1<<29)
+#define sis5100_io_lemo_pulse3 (1<<30)
+
+/* bits in in_latch_irq */
+/* XXX fixme */
+
+/* bits in camac_sc */
+/* clear is (camac_*)<<16 */
+#define sis5100_camac_inhibit  (1<<0)
+#define sis5100_camac_user_led (1<<7)
+
+/* bits in dsp_sc */
+#define sis5100_dsp_irq_pulse  (1<<0)
+#define sis5100_dsp_run        (1<<8)
+#define sis5100_dsp_boot_eprom (1<<9)
+#define sis5100_dsp_boot_ctrl  (1<<11)
+
+#define sis5100_dsp_available  (1<<24)
+#define sis5100_dsp_flag0      (1<<28)
+#define sis5100_dsp_flag1      (1<<29)
+#define sis5100_dsp_flag2      (1<<30)
+#define sis5100_dsp_flag3      (1<<31)
+
+/* error codes */
+#define sis5100_sis3100_re_berr        0x211 /* Bus Error */
+#define sis5100_sis3100_re_retr        0x212 /* Retry */
+#define sis5100_sis3100_re_atimeout    0x214 /* Arbitration timeout */
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_front_io.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_front_io.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_front_io.c	(revision 22)
@@ -0,0 +1,47 @@
+/* $ZEL: sis5100rem_front_io.c,v 1.2 2004/05/27 23:10:46 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+sis5100rem_front_io(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
+
+int
+sis5100rem_front_pulse(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
+
+int
+sis5100rem_front_latch(struct sis1100_softc* sc, u_int32_t* data)
+{
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_init.c	(revision 22)
@@ -0,0 +1,125 @@
+/* $ZEL: sis5100rem_init.c,v 1.2 2004/05/27 23:10:47 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+static int
+sis5100_dsp_present(struct sis1100_softc* sc)
+{
+    u_int32_t dsp_sc;
+    int res;
+
+    res=sis5100readremreg(sc, dsp_sc, &dsp_sc, 0);
+    if (res) {
+        pINFO(sc, "5100: read dsp_sc: error=0x%x", res);
+        return 0;
+    }
+    return !!(dsp_sc&sis5100_dsp_available);
+}
+
+int
+sis5100rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 1
+#define MAX_FV 1
+    u_int32_t hv, fk, fv;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00010100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "5100: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "5100: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pERROR(sc, "5100: remote hw/fw type not supported");
+        return -1;
+    }
+
+#if 0
+    if (sis1100_init_sdram(sc)<0)
+        return -1;
+    pINFO(sc, "5100: size of SDRAM: 0x%llx (%lld MByte)",
+        sc->ram_size, sc->ram_size>>20);
+#else
+    sc->ram_size=0;
+#endif
+
+    sc->dsp_present=sis5100_dsp_present(sc);
+    pINFO(sc, "5100: DSP is %spresent", sc->dsp_present?"":"not ");
+
+{
+    u_int32_t error, data;
+
+    error=sis5100readremreg(sc, ident, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "ident", data, error);
+
+    error=sis5100readremreg(sc, optical_sr, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "optical_sr", data, error);
+
+    error=sis5100readremreg(sc, optical_cr, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "optical_cr", data, error);
+
+    error=sis5100readremreg(sc, in_out, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "in_out", data, error);
+
+    error=sis5100readremreg(sc, in_latch_irq, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "in_latch_irq", data, error);
+
+    error=sis5100readremreg(sc, camac_sc, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "camac_sc", data, error);
+
+    error=sis5100readremreg(sc, camac_irq_sc, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "camac_irq_sc", data, error);
+
+    error=sis5100readremreg(sc, lam_enable, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "lam_enable", data, error);
+
+    error=sis5100readremreg(sc, multistation, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "multistation", data, error);
+
+    error=sis5100readremreg(sc, dma_write_counter, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "dma_write_counter", data, error);
+
+    error=sis5100readremreg(sc, dsp_sc, &data, 0);
+    pINFO(sc, "5100: %s: val=0x%08x, error=0x%x", "dsp_sc", data, error);
+}
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_irq.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_irq.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/sis5100rem_irq.c	(revision 22)
@@ -0,0 +1,51 @@
+/* $ZEL: sis5100rem_irq.c,v 1.2 2004/05/27 23:10:48 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+void
+sis5100rem_irq_handler(struct sis1100_softc* sc)
+{
+}
+
+void
+sis5100rem_enable_irqs(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t mask)
+{
+}
+
+void
+sis5100rem_disable_irqs(struct sis1100_softc* sc, struct sis1100_fdata* fd,
+    u_int32_t mask)
+{
+}
+
+void
+sis5100rem_irq_ack(struct sis1100_softc* sc, int irqs)
+{
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_map.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_map.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_map.h	(revision 22)
@@ -0,0 +1,73 @@
+/* $ZEL: vertex_map.h,v 1.2 2004/05/27 23:10:48 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _vertex_map_h_
+#define _vertex_map_h_
+
+struct vertex_reg {
+    u_int32_t ident;              /* 0x000 */
+    u_int32_t sc;         /* 0x004 */
+    u_int32_t optical_cr;         /* 0x008 */
+    u_int32_t dsp_sc;             /* 0x008 */
+    u_int32_t dummy;
+};
+
+/* bits in in_out */
+#define vertex_io_flat_out1 (1<<0)
+#define vertex_io_flat_out2 (1<<1)
+#define vertex_io_flat_out3 (1<<2)
+#define vertex_io_flat_out4 (1<<3)
+#define vertex_io_lemo_out1 (1<<4)
+#define vertex_io_lemo_out2 (1<<5)
+#define vertex_io_lemo_out3 (1<<6)
+/* clear is (io_*_out?)<<16 */
+#define vertex_io_flat_in1 (1<<16)
+#define vertex_io_flat_in2 (1<<17)
+#define vertex_io_flat_in3 (1<<18)
+#define vertex_io_flat_in4 (1<<19)
+#define vertex_io_lemo_in1 (1<<20)
+#define vertex_io_lemo_in2 (1<<21)
+#define vertex_io_lemo_in3 (1<<22)
+
+/* bits in dsp_sc */
+#define vertex_dsp_run        (1<<8)
+#define vertex_dsp_boot_eprom (1<<9)
+#define vertex_dsp_boot_ctrl  (1<<11)
+
+#define vertex_dsp_available  (1<<24)
+#define vertex_dsp_flag0      (1<<28)
+#define vertex_dsp_flag1      (1<<29)
+#define vertex_dsp_flag2      (1<<30)
+#define vertex_dsp_flag3      (1<<31)
+
+/* error codes */
+#define vertex_sis3100_re_berr        0x211 /* Bus Error */
+#define vertex_sis3100_re_retr        0x212 /* Retry */
+#define vertex_sis3100_re_atimeout    0x214 /* Arbitration timeout */
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_rem_init.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_rem_init.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vertex_rem_init.c	(revision 22)
@@ -0,0 +1,71 @@
+/* $ZEL: vertex_rem_init.c,v 1.2 2004/05/27 23:10:49 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2004
+ * 	Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "sis1100_sc.h"
+
+int
+vertex_rem_init(struct sis1100_softc* sc)
+{
+#define MIN_FV 0
+#define MAX_FV 0
+    u_int32_t hv, fk, fv, stat;
+
+    hv=(sc->remote_ident>>8)&0xff;
+    fk=(sc->remote_ident>>16)&0xff;
+    fv=(sc->remote_ident>>24)&0xff;
+
+    switch (sc->remote_ident&0x00ffff00) {
+    case 0x00010100:
+        if (fv<MIN_FV) {
+            pERROR(sc, "vertex: remote firmware version too old;"
+                    " at least version %d is required.",
+                    MIN_FV);
+            return -1;
+        }
+        if (fv>MAX_FV) {
+            pINFO(sc, "vertex: Driver not tested with"
+                    " remote firmware versions greater than %d.",
+                    MAX_FV);
+        }
+        break;
+    default:
+        pERROR(sc, "vertex: remote hw/fw type not supported");
+        return -1;
+    }
+
+    sc->ram_size=0;
+    sc->dsp_present=0;
+
+    SEM_LOCK(sc->sem_hw);
+    /*vertex_writeremreg(sc, vme_irq_sc, 0x00fe0001, 1);*/ /* disable IRQs */
+    vertex_readremreg(sc, sc, &stat, 1);
+    SEM_UNLOCK(sc->sem_hw);
+    pINFO(sc, "vertex: remote stat=0x%08x", stat);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vme_irq.txt
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vme_irq.txt	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/dev/pci/vme_irq.txt	(revision 22)
@@ -0,0 +1,125 @@
+Logic:
+
+kernelthread fuer VME/CAMAC-IRQs und remote-IO und local-IO und sync-chngd 
+
+Doorbell Interrupt (VME/CAMAC-IRQs + remote-IO)
+    setzt sc->doorbell
+    setzt handler_command|=handlercomm_doorbell
+    weckt thread sofort
+
+irq_lemo_in_chg (local-IO)
+    setzt sc->doorbell ???
+    setzt handler_command|=handlercomm_lemo
+    weckt thread sofort
+
+irq_synch_chg DOWN
+    setzt sc->old_remote_hw=sc->remote_hw
+    setzt sc->remote_hw=sis1100_hw_invalid
+    setzt handler_command|=handlercomm_synch
+    weckt thread sofort
+    startet sis1100_synch_s_handler nach 1 s
+        setzt sc->handlercommand.command|=handlercomm_synch
+        weckt thread sofort
+
+irq_synch_chg UP
+    startet sis1100_synch_s_handler nach 1 s
+        setzt sc->handlercommand.command|=handlercomm_synch
+        weckt thread sofort
+
+
+NetBSD
+
+von sis1100_ioctl.c (in sis1100_vme_irq.c):
+    sis1100_irq_ctl(sc, fd, d);
+    sis1100_irq_get(sc, fd, d);
+    sis1100_irq_ack(sc, fd, d);
+    sis1100_irq_wait(sc, fd, d);
+
+
+sis1100_irq_ctl:
+    uses
+        sc->fdatalist[idx]->owned_irqs (==fd->owned_irqs?)
+
+sis1100_irq_ack:
+    uses
+        fd->owned_irqs
+        sc->pending_irqs
+
+sis1100_irq_get
+    uses
+        sc->pending_irqs
+        fd->owned_irqs
+        sc->irq_vects[bit].valid
+        sc->irq_vects[bit].vector
+
+sis1100_irq_wait
+    uses
+        fd->owned_irqs
+        ltsleep(&sc->vmeirq_wait, PCATCH, "vmeirq", 0, &sc->vmeirq_wait);
+        sc->irq_vects
+        sc->pending_irqs
+        simple_lock(&sc->vmeirq_wait);
+        simple_unlock(&sc->vmeirq_wait);
+
+Doorbell Interrupt:
+    sc->doorbell|=plxreadreg(sc, L2PDBELL)
+    wakeup_vmeirq=1;
+    if (wakeup_vmeirq) wakeup(&sc->vmeirq_wait);
+
+irq_synch_chg
+    callout_reset(&sc->link_up_timer, hz, sis1100_synch_handler, sc);
+
+in sis1100_init_remote (sis1100_init_remote.c):
+    simple_lock(&sc->vmeirq_wait);
+    sc->remote_hw=typ;
+    simple_unlock(&sc->vmeirq_wait);
+
+in sis1100_vme_irq_handler (in sis1100_vme_irq.c)
+    simple_lock(&sc->vmeirq_wait);
+    sc->pending_irqs|=new_irqs;
+    simple_unlock(&sc->vmeirq_wait);
+    ...
+    wakeup(&sc->vmeirq_wait);
+
+
+sis1100thread_vmeirq (in sis1100_vme_irq.c)
+    while (1) {
+        tsleep(&sc->vmeirq_pp, PCATCH, "thread_vmeirq", 0);
+        command=sc->vmeirq_command.command;
+        ...
+        sis1100_vme_irq_handler(sc);
+    }
+
+Linux
+
+von sis1100_ioctl.c (in ...):
+    sis1100_irq_ctl(fd, &data);
+    sis1100_irq_get(fd, &data);
+    sis1100_irq_ack(fd, &data);
+    sis1100_irq_wait(fd, &data);
+
+Doorbell Interrupt:
+        sc->doorbell|=help;
+        handler_command|=handlercomm_doorbell;
+        wakeup_remote=1;
+
+irq_synch_chg
+        sc->old_remote_hw=sc->remote_hw;
+        sc->remote_hw=sis1100_hw_invalid;
+        handler_command|=handlercomm_synch;
+        wakeup_remote=1;
+        mod_timer(&sc->link_up_timer, jiffies+HZ);
+
+irq_lemo_in_chg
+        /*sc->doorbell|=(status<<4)&0x30000;*/
+        handler_command|=handlercomm_lemo;
+        wakeup_remote=1;
+
+        if (wakeup_remote) {
+            spin_lock_irqsave(&sc->handlercommand.lock, flags);
+            sc->handlercommand.command=handler_command;
+            spin_unlock_irqrestore(&sc->handlercommand.lock, flags);
+            wake_up(&sc->handler_wait);
+        }
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/doc/driver.txt
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/doc/driver.txt	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/doc/driver.txt	(revision 22)
@@ -0,0 +1,139 @@
+///////////////////////////////////////////////////////////////////////////////
+called from ioctl:
+
+plxreadlocal0
+update_shadow
+sis1100_remote_reg_read
+sis1100_remote_reg_write
+update_remote_shadow
+sis1100readreg
+sis1100_update_swapping
+sis3100_get_timeouts
+sis3100_set_timeouts
+sis1100_front_io
+sis1100_front_pulse
+sis1100_front_latch
+sis1100_read_pipe
+sis1100_write_pipe
+sis1100_tmp_read
+sis1100_tmp_write
+sis1100_read_block
+sis1100_write_block
+sis1100_irq_ctl
+sis1100_irq_ack
+sis1100_irq_wait
+sis1100_dma_alloc
+sis1100_dma_free
+sis1100_reset
+sis5100writeremreg
+ioctl_setvmespace
+ioctl_vme_probe
+ioctl_vme_read
+ioctl_vme_write
+ioctl_vme_block_read
+ioctl_vme_block_write
+ioctl_local_ctrl_read
+ioctl_local_ctrl_write
+ioctl_remote_ctrl_read
+ioctl_remote_ctrl_write
+ioctl_pipe
+ioctl_mapsize
+ioctl_last_error
+ioctl_ident
+ioctl_fifomode
+ioctl_irq_ctl
+ioctl_irq_get
+ioctl_irq_ack
+ioctl_irq_wait
+ioctl_mindmalen
+ioctl_front_io
+ioctl_front_pulse
+ioctl_front_latch
+ioctl_vme_super_block_read
+ioctl_write_pipe
+ioctl_dma_alloc
+ioctl_dma_free
+ioctl_cccz
+ioctl_cccc
+ioctl_ccci
+ioctl_cnaf
+ioctl_swap
+ioctl_3100_timeouts
+ioctl_reset
+ioctl_remote_reset
+ioctl_devtype
+ioctl_driverversion
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+ssize_t
+_sis1100_write_dma() /* netbsd */
+
+called:
+    from 
+returns:
+        uvm_vslock
+        count (bytes)
+
+///////////////////////////////////////////////////////////////////////////////
+
+sis1100_write_block
+
+int
+sis1100_write_block()
+
+called:
+    from _sis1100_write
+returns:
+        ok: 0
+        sis1100_write_dma; sis1100_write_loop
+
+///////////////////////////////////////////////////////////////////////////////
+
+_sis1100_write
+
+static int
+_sis1100_write()
+
+called:
+    from sis1100_write
+returns:
+    ok: 0
+    ENOTTY; sis1100_write_block
+
+///////////////////////////////////////////////////////////////////////////////
+
+sis1100_write
+
+#ifdef __NetBSD__
+int
+sis1100_write()
+#elif __linux__
+ssize_t
+sis1100_write(struct file* file, const char* buf, size_t count, loff_t* ppos)
+#endif
+
+called:
+    from kernel
+returns:
+    NetBSD:
+        _sis1100_write
+    linux:
+        _sis1100_write<0?_sis1100_write:count_written
+
+    NetBSD:
+    linux:
+        ok: count_written (bytes)
+        error: -errno
+
+///////////////////////////////////////////////////////////////////////////////
+
+sis1100_write_dma
+
+///////////////////////////////////////////////////////////////////////////////
+
+sis1100_write_loop
+
+///////////////////////////////////////////////////////////////////////////////
+
Index: /drsdaq/VME/struck/sis1100/V2.02/doc/ioctl.txt
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/doc/ioctl.txt	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/doc/ioctl.txt	(revision 22)
@@ -0,0 +1,47 @@
+SIS3100_SETVMESPACE:
+
+struct vmespace {
+    int32_t am;        /* address modifier */
+    u_int32_t datasize;/* datasize in bytes (?) */
+    int swap;          /* 1: swap words 0: don't swap -1: not changed */
+    int mapit;         /* not used */
+    ssize_t mindmalen; /*
+                            0: never use DMA;
+                            1: always use DMA;
+                           -1: not changed
+                           >0: use DMA if size > mindmalen
+                       */
+};
+
+
+SIS3100_VME_PROBE (u_int32_t addr):
+    performes a VME read with default parameters (set via SETVMESPACE) at
+    address addr.
+  return values:
+    ENXIO: remote device not present/remote device is not VME
+    EIO:   address not accessible (probably bus error)
+
+SIS3100_VME_READ (struct sis1100_vme_req req)
+    performes a VME read with parameters defined by req.
+  return values:
+    ENXIO: remote device not present/remote device is not VME
+  returned structure:
+    error: errorcode from remote (or local) interface
+    data: if (error==0) 
+            value red
+          else
+            undefined
+
+SIS3100_VME_WRITE (struct sis1100_vme_req req)
+    performes a VME write with parameters defined by req.
+  return values:
+    ENXIO: remote device not present/remote device is not VME
+  returned structure:
+    error: errorcode from remote (or local) interface
+
+case SIS3100_WRITE_PIPE (struct sis1100_writepipe)
+     performes several VME writes in a pipeline
+   return values:
+     EINVAL: list too long (96 entries are allowed)
+     ENXIO:  remote device not present/remote device is not VME
+     EFAULT: *data is not accessible
Index: /drsdaq/VME/struck/sis1100/V2.02/doc/user.txt
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/doc/user.txt	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/doc/user.txt	(revision 22)
@@ -0,0 +1,57 @@
+ein major device pro Karte
+
+4 minor devices pro Karte:
+    remote, ram, ctrl, dsp
+
+Hardware-Typen (remote side):
+    pci   (sis1100)
+    vme   (sis3100)
+    camac (sis5100)
+    lvd   (FZJ/ZEL)
+
+IOCTLs:
+
+SIS3100_SETVMESPACE           struct vmespace
+SIS3100_VME_PROBE             u_int32_t
+SIS3100_VME_READ              struct sis1100_vme_req
+SIS3100_VME_WRITE             struct sis1100_vme_req
+SIS3100_VME_BLOCK_READ        struct sis1100_vme_block_req
+SIS3100_VME_BLOCK_WRITE       struct sis1100_vme_block_req
+SIS1100_LOCAL_CTRL_READ       struct sis1100_ctrl_reg
+SIS1100_LOCAL_CTRL_WRITE      struct sis1100_ctrl_reg
+SIS1100_REMOTE_CTRL_READ      struct sis1100_ctrl_reg
+SIS1100_REMOTE_CTRL_WRITE     struct sis1100_ctrl_reg
+SIS1100_PIPE                  struct sis1100_pipe
+SIS1100_MAPSIZE               u_int32_t
+SIS1100_LAST_ERROR            u_int32_t
+SIS1100_IDENT                 struct sis1100_ident
+SIS1100_FIFOMODE              int
+
+SIS1100_IRQ_CTL               struct sis1100_irq_ctl
+SIS1100_IRQ_GET               struct sis1100_irq_get
+SIS1100_IRQ_ACK               struct sis1100_irq_ack
+SIS1100_IRQ_WAIT              struct sis1100_irq_get
+
+SIS1100_MINDMALEN             int[2]
+
+SIS1100_FRONT_IO              u_int32_t
+SIS1100_FRONT_PULSE           u_int32_t
+SIS1100_FRONT_LATCH           u_int32_t
+
+SIS3100_VME_SUPER_BLOCK_READ  struct sis1100_vme_super_block_req
+SIS3100_WRITE_PIPE            struct sis1100_writepipe
+
+SIS1100_DMA_ALLOC             struct sis1100_dma_alloc
+SIS1100_DMA_FREE              struct sis1100_dma_alloc
+
+SIS5100_CCCZ
+SIS5100_CCCC
+SIS5100_CCCI                  int
+SIS5100_CNAF                  struct sis1100_camac_req
+SIS1100_SWAP                  int
+SIS3100_TIMEOUTS              int[2]
+
+SIS1100_RESET
+SIS1100_REMOTE_RESET
+SIS1100_DEVTYPE               enum sis1100_subdev
+SIS1100_DRIVERVERSION         int
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Entries	(revision 22)
@@ -0,0 +1,8 @@
+/eeprom_names.c/1.1/Thu Aug 21 17:30:34 2003//
+/plx_eeprom.h/1.1/Thu Aug 21 17:30:34 2003//
+/read_eeprom.c/1.1/Thu Aug 21 17:30:35 2003//
+/verify_eeprom.c/1.1/Thu Aug 21 17:30:35 2003//
+/write_eeprom.c/1.1/Thu Aug 21 17:30:35 2003//
+/Makefile/1.3/Tue Feb 10 16:37:00 2004//
+/eeprom_tools.c/1.3/Tue Feb 10 16:37:01 2004//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/eeprom_tools
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/Makefile	(revision 22)
@@ -0,0 +1,28 @@
+# $ZEL: Makefile,v 1.3 2003/09/01 11:40:46 wuestner Exp $
+
+DRIVER       := plxraw
+IONAME       := $(shell echo $(DRIVER) | tr '[:lower:]' '[:upper:]')
+
+CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat \
+                -Werror
+#               -Wuninitialized
+
+DRIVERBASE   := ../
+DRIVERINCLUDE:= $(DRIVERBASE)
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I. -I. -DDRIVER=$(DRIVER) -DIONAME=$(IONAME)
+CFLAGS       := -g -ansi $(WFLAGS)
+
+.PHONY: all
+all: read_eeprom verify_eeprom write_eeprom
+
+read_eeprom: read_eeprom.c eeprom_tools.c eeprom_names.c
+
+verify_eeprom: verify_eeprom.c eeprom_tools.c eeprom_names.c
+
+write_eeprom: write_eeprom.c eeprom_tools.c eeprom_names.c
+
+clean:
+	rm -f *.o core $(EXEC)
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_names.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_names.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_names.c	(revision 22)
@@ -0,0 +1,56 @@
+/*
+ * $ZEL: eeprom_names.c,v 1.1 2003/08/21 17:30:34 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <sys/types.h>
+#include "plx_eeprom.h"
+
+char* eeprom_names[0x2c]= {
+    "Device ID",
+    "Vendor ID",
+    "Class Code",
+    "Class Code/Revision",
+    "Maximum Latency/Minimum Grant",
+    "Interrupt Pin/Interrupt Line Routing",
+    "MSW of Mailbox 0",
+    "LSW of Mailbox 0",
+    "MSW of Mailbox 1",
+    "LSW of Mailbox 1",
+    "MSW of Range for PCI-to-Local Address Space 0",
+    "LSW of Range for PCI-to-Local Address Space 0",
+    "MSW of Local Base Address for PCI-to-Local Address Space 0",
+    "LSW of Local Base Address for PCI-to-Local Address Space 0",
+    "MSW of Mode/DMA Arbitration Register",
+    "LSW of Mode/DMA Arbitration Register",
+    "MSW of Serial EEPROM Write-Protected Address",
+    "LSW of Local Misc. Control Register/Local Big/Little Endian",
+    "MSW of Range for PCI-to-Local Expansion ROM",
+    "LSW of Range for PCI-to-Local Expansion ROM",
+    "MSW of Local Base Address for PCI-to-Local Expansion ROM",
+    "LSW of Local Base Address for PCI-to-Local Expansion ROM",
+    "MSW of Bus Region Desciptors for PCI-to-Local Accesses",
+    "LSW of Bus Region Desciptors for PCI-to-Local Accesses",
+    "MSW of Range for PCI Initiator-to-PCI",
+    "LSW of Range for PCI Initiator-to-PCI",
+    "MSW of Local Base Address for PCI Initiator-to-PCI Memory",
+    "LSW of Local Base Address for PCI Initiator-to-PCI Memory",
+    "MSW of Local Bus Address for PCI Initiator-to-PCI I/O Configuation",
+    "LSW of Local Bus Address for PCI Initiator-to-PCI I/O Configuation",
+    "MSW of PCI Base Address for PCI Initiator-to-PCI",
+    "LSW of PCI Base Address for PCI Initiator-to-PCI",
+    "MSW of PCI Config. Addr. Reg. for PCI Initiator-to-PCI I/O Config.",
+    "LSW of PCI Config. Addr. Reg. for PCI Initiator-to-PCI I/O Config.",
+    "Subsystem ID",
+    "Subsystem Vendor ID",
+    "MSW of Range for PCI-to-Local Address Space 1",
+    "LSW of Range for PCI-to-Local Address Space 1",
+    "MSW of Local Base Address for PCI-to-Local Address Space 1",
+    "LSW of Local Base Address for PCI-to-Local Address Space 1",
+    "MSW of Bus Region Desciptors (Space 1) for PCI-to-Local Accesses",
+    "LSW of Bus Region Desciptors (Space 1) for PCI-to-Local Accesses",
+    "MSW of Hot Swap Control/Status",
+    "LSW of Hot Swap Control / Hot Swap Next Capability Pointer",
+};
+
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_tools.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_tools.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/eeprom_tools.c	(revision 22)
@@ -0,0 +1,94 @@
+/*
+ * $ZEL: eeprom_tools.c,v 1.3 2003/09/01 11:40:47 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#define __CONCAT(x,y)	x ## y
+#define __CC(x, y) __CONCAT(x,y)
+#define __CONCAT3(x,y,z) __CC(x, __CC(y,z))
+#define __STRING(x)	#x
+#define __SS(s) __STRING(s)
+
+#include __SS(__CONCAT3(../dev/pci/, DRIVER, _var.h))
+#include "plx_eeprom.h"
+
+void
+eeprom_dump(u_int16_t* data, int start, int len, int v)
+{
+    int i;
+
+    for (i=0; i<len; i++) {
+        printf("0x%02x: 0x%04x", (i+start)*2, data[i]);
+        if (v) printf("  # %s", eeprom_names[start+i]);
+        printf("\n");
+    }
+}
+
+int
+eeprom_read(int p, u_int16_t* data, int start, int len)
+{
+    int res;
+    struct __CC(DRIVER, _eeprom_req) eeprom_req;
+
+    eeprom_req.num=len;
+    eeprom_req.data=data;
+    eeprom_req.addr=start;
+    res=ioctl(p, __CC(IONAME, _READ_EEPROM), &eeprom_req);
+    if (res<0) {
+        fprintf(stderr, "ioctl(READ_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+    return 0;
+}
+
+int
+eeprom_write(int p, u_int16_t* data, int start, int len)
+{
+    int res;
+    struct __CC(DRIVER, _eeprom_req) eeprom_req;
+
+    eeprom_req.num=len;
+    eeprom_req.data=data;
+    eeprom_req.addr=start;
+    res=ioctl(p, __CC(IONAME, _WRITE_EEPROM), &eeprom_req);
+    if (res<0) {
+        fprintf(stderr, "ioctl(WRITE_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+    return 0;
+}
+
+int
+read_eepom_data_from_file(FILE* f, u_int16_t* data, u_int16_t* addr, int* len)
+{
+    char s[1024];
+    int a, val, i=0;
+
+    while (fgets(s, 1024, f)) {
+        if (sscanf(s, "%i:%i", &a, &val)!=2) {
+            fprintf(stderr, "cannot convert \"%s\".\n", s);
+            return -1;
+        }
+        if (i>=*len) {
+            fprintf(stderr, "too many data in file.\n");
+            return -1;
+        }
+        data[i]=val;
+        addr[i]=a;
+        i++;
+    }
+    *len=i;
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/plx_eeprom.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/plx_eeprom.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/plx_eeprom.h	(revision 22)
@@ -0,0 +1,19 @@
+/*
+ * $ZEL: plx_eeprom.h,v 1.1 2003/08/21 17:30:34 wuestner Exp $
+ */
+
+#ifndef _plx_eeprom_h_
+#define _plx_eeprom_h_
+
+#include <stdio.h>
+
+#define EEPROM_LEN 0x2c
+
+extern char* eeprom_names[0x2c];
+
+int eeprom_read(int p, u_int16_t* data, int start, int len);
+void eeprom_dump(u_int16_t* data, int start, int len, int v);
+int read_eepom_data_from_file(FILE* f, u_int16_t* data, u_int16_t* addr, int* len);
+int eeprom_write(int p, u_int16_t* data, int start, int len);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/read_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/read_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/read_eeprom.c	(revision 22)
@@ -0,0 +1,92 @@
+/*
+ * $ZEL: read_eeprom.c,v 1.1 2003/08/21 17:30:35 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "plx_eeprom.h"
+
+int verbose, start, len;
+const char* pathname;
+
+static void
+printhelp(const char* progname)
+{
+    fprintf(stderr, "usage: %s [-h] [-v] [-a start] [-l len] path_to_device\n", progname);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="a:l:hv";
+
+    optarg=0; errflag=0;
+    verbose=0;
+    start=0;
+    len=EEPROM_LEN;
+
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': errflag++; break;
+        case 'v': verbose++; break;
+        case 'a': start=strtol(optarg, 0, 0); break;
+        case 'l': len=strtol(optarg, 0, 0); break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || (argc-optind)!=1) {
+        printhelp(argv[0]);
+        return -1;
+    }
+
+    pathname=argv[optind];
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    u_int16_t data[EEPROM_LEN];
+    int p;
+
+    fprintf(stderr, "\n==== SIS1100 EEPROM Reader; V1.0 ====\n\n");
+
+    if (getoptions(argc, argv)) return 1;
+
+    start>>=1;
+    if (start>=EEPROM_LEN) {
+        fprintf(stderr, "start must be less than %d\n", EEPROM_LEN<<1);
+        return 1;
+    }
+
+    if (start+len>EEPROM_LEN) {
+        len=EEPROM_LEN-start;
+    }
+
+    p=open(pathname, O_RDWR, 0);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", pathname, strerror(errno));
+        return 2;
+    }
+
+    if (eeprom_read(p, data, start, len)<0) return 3;
+    close(p);
+    eeprom_dump(data, start, len, verbose);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/verify_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/verify_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/verify_eeprom.c	(revision 22)
@@ -0,0 +1,97 @@
+/*
+ * $ZEL: verify_eeprom.c,v 1.1 2003/08/21 17:30:35 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "plx_eeprom.h"
+
+int verbose;
+const char* pathname;
+
+static void
+printhelp(const char* progname)
+{
+    fprintf(stderr, "usage: %s [-h] [-v] path_to_device\n", progname);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="hv";
+
+    optarg=0; errflag=0;
+    verbose=0;
+
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': errflag++; break;
+        case 'v': verbose++; break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || (argc-optind)!=1) {
+        printhelp(argv[0]);
+        return -1;
+    }
+
+    pathname=argv[optind];
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    u_int16_t data_prom[EEPROM_LEN];
+    u_int16_t data_file[EEPROM_LEN];
+    u_int16_t addr[EEPROM_LEN];
+    int p, num, i, n;
+
+    fprintf(stderr, "\n==== SIS1100 EEPROM Verifier; V1.0 ====\n\n");
+
+    if (getoptions(argc, argv)) return 1;
+
+    num=EEPROM_LEN;
+    if (read_eepom_data_from_file(stdin, data_file, addr, &num)<0) return 1;
+
+    p=open(pathname, O_RDWR, 0);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", pathname, strerror(errno));
+        return 2;
+    }
+
+    if (eeprom_read(p, data_prom, 0, EEPROM_LEN)<0) return 3;
+    close(p);
+
+    for (i=0, n=0; i<num; i++) {
+        u_int16_t a=addr[i]>>1;
+        if (a>=EEPROM_LEN) {
+            fprintf(stderr, "invalid address 0x%04x.\n", addr[i]);
+            return 1;
+        }
+        if (data_prom[a]!=data_file[i]) {
+            if (!n) printf("addr eprom file\n");
+            printf("0x%02x: %04x %04x", a*2, data_prom[a], data_file[i]);
+            if (verbose) printf("  # %s", eeprom_names[a]);
+            printf("\n");
+            n++;
+        }
+    }
+    if (!n) printf("file and eeprom are identical.\n");
+    return n?10:0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/write_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/write_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/eeprom_tools/write_eeprom.c	(revision 22)
@@ -0,0 +1,110 @@
+/*
+ * $ZEL: write_eeprom.c,v 1.1 2003/08/21 17:30:35 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "plx_eeprom.h"
+
+int verbose;
+const char* pathname;
+
+static void
+printhelp(const char* progname)
+{
+    fprintf(stderr, "usage: %s [-h] [-v] path_to_device\n", progname);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="hv";
+
+    optarg=0; errflag=0;
+    verbose=0;
+
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': errflag++; break;
+        case 'v': verbose++; break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || (argc-optind)!=1) {
+        printhelp(argv[0]);
+        return -1;
+    }
+
+    pathname=argv[optind];
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    u_int16_t data_prom[EEPROM_LEN];
+    u_int16_t data_file[EEPROM_LEN];
+    u_int16_t addr[EEPROM_LEN];
+    int p, num, i, n;
+
+    fprintf(stderr, "\n==== SIS1100 EEPROM Writer; V1.0 ====\n\n");
+
+    if (getoptions(argc, argv)) return 1;
+
+    num=EEPROM_LEN;
+    if (read_eepom_data_from_file(stdin, data_file, addr, &num)<0) return 1;
+
+    p=open(pathname, O_RDWR, 0);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", pathname, strerror(errno));
+        return 2;
+    }
+
+    if (eeprom_read(p, data_prom, 0, EEPROM_LEN)<0) return 3;
+
+    for (i=0; i<num; i++) {
+        u_int16_t a=addr[i]>>1;
+        if (a>=EEPROM_LEN) {
+            fprintf(stderr, "invalid address 0x%04x.\n", addr[i]);
+            return 1;
+        }
+        data_prom[a]=data_file[i];
+    }
+
+    if (eeprom_write(p, data_prom, 0, EEPROM_LEN)<0) return 3;
+
+    if (eeprom_read(p, data_prom, 0, EEPROM_LEN)<0) return 3;
+
+    close(p);
+
+    for (i=0, n=0; i<num; i++) {
+        u_int16_t a=addr[i]>>1;
+        if (data_prom[a]!=data_file[i]) {
+            if (!n) {
+                printf("Differences after write:\n");
+                printf("addr eprom file\n");
+            }
+            printf("0x%02x: %04x %04x", a*2, data_prom[a], data_file[i]);
+            if (verbose) printf("  # %s", eeprom_names[a]);
+            printf("\n");
+            n++;
+        }
+    }
+    printf("eeprom %ssuccessfully written.\n", n?"NOT ":"");
+    return n?10:0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile	(revision 22)
@@ -0,0 +1,364 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis5100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis5100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+camac_naf: camac_naf.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+camac_setinhibit: camac_setinhibit.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+camac_clearinhibit: camac_clearinhibit.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+sis5100_flashuserled: sis5100_flashuserled.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+sis5100_ios: sis5100_ios.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/Makefile~	(revision 22)
@@ -0,0 +1,367 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis5100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis5100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+camac_naf: camac_naf.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+camac_setinhibit: camac_setinhibit.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+camac_clearinhibit: camac_clearinhibit.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+sis5100_flashuserled: sis5100_flashuserled.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+sis5100_ios: sis5100_ios.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+cccz: cccz.c $(DRIVER_PATH)/sis5100_calls/lib_sis5100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis5100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c	(revision 22)
@@ -0,0 +1,82 @@
+/************************************/
+/* Clear CAMAC Inhibit with SIS5100 */
+/****:*******************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+res=s5100_control_write(p,0x100,0x10000);
+if (res!=0) {
+   printf("error: %x\n",res);
+}
+else {
+   printf("CAMAC Inhibit cleared\n");
+} 
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c~	(revision 22)
@@ -0,0 +1,79 @@
+/************************************/
+/* Clear CAMAC Inhibit with SIS5100 */
+/****:*******************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+res=s5100_control_write(p,0x100,0x10000);
+if (res!=0) {
+  printf("error: %x\n",res);
+}
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int16_t A,N,F;
+int Q=0,X=0;
+u_int32_t datum ;
+int res;
+
+if (argc<6) {
+  fprintf(stderr, "usage: %s  path  N A F datum\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+N     = strtoul(argv[2],NULL,0) ;
+A     = strtoul(argv[3],NULL,0) ;
+F     = strtoul(argv[4],NULL,0) ;
+datum     = strtoul(argv[5],NULL,0) ;
+
+printf("Station: %d  Address: %d  Function: %d\n",N,A,F);
+
+
+if (F>15) {
+   res=camac_write(p,N,A,F,datum);
+   Q=(~res&0x80)>>7;
+   X=(~res&0x40)>>6;
+}
+else {
+   res=camac_read(p,N,A,F,&datum);
+   Q=(datum&0x80000000)>31;
+   X=(datum&0x40000000)>30;
+   datum=datum&0xFFFFFF;
+}
+
+if (res&~0x2c0) {
+    printf("camac NAF: error=0x%x\n", res);
+    return -1;
+}
+
+printf("NAF:   datum = 0x%04x\n", (int) datum );
+printf("Q: %d X: %d\n",Q,X);
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_naf.c~	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int16_t A,N,F;
+int Q=0,X=0;
+u_int32_t datum ;
+int res;
+
+if (argc<6) {
+  fprintf(stderr, "usage: %s  path  N A F datum\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+N     = strtoul(argv[2],NULL,0) ;
+A     = strtoul(argv[3],NULL,0) ;
+F     = strtoul(argv[4],NULL,0) ;
+datum     = strtoul(argv[5],NULL,0) ;
+
+printf("Station: %d  Address: %d  Function: %d\n",N,A,F);
+
+
+if (F>15) {
+   res=camac_naf_write(p,N,A,F,datum);
+   Q=(~res&0x80)>>7;
+   X=(~res&0x40)>>6;
+}
+else {
+   res=camac_naf_read(p,N,A,F,&datum);
+   Q=(datum&0x80000000)>31;
+   X=(datum&0x40000000)>30;
+   datum=datum&0xFFFFFF;
+}
+
+if (res&~0x2c0) {
+    printf("camac NAF: error=0x%x\n", res);
+    return -1;
+}
+
+printf("NAF:   datum = 0x%04x\n", (int) datum );
+printf("Q: %d X: %d\n",Q,X);
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c	(revision 22)
@@ -0,0 +1,83 @@
+/**********************************/
+/* Set CAMAC Inhibit with SIS5100 */
+/****:*****************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+res=s5100_control_write(p,0x100,0x1);
+if (res!=0) {
+   printf("error: %x\n",res);
+}
+else {
+   printf("CAMAC Inhibit set\n");
+} 
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_setinhibit.c~	(revision 22)
@@ -0,0 +1,77 @@
+/**********************************/
+/* Set CAMAC Inhibit with SIS5100 */
+/****:*****************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+res=s5100_control_write(p,0x100,0x1);
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c	(revision 22)
@@ -0,0 +1,88 @@
+/**************************/
+/* SIS5100 flash user LED */
+/**************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+while(1){
+  res=s5100_control_write(p,0x100,0x80);
+  if (res!=0) {
+    printf("error: %x\n",res);
+  }
+  sleep(1);
+  res=s5100_control_write(p,0x100,0x800000);
+  if (res!=0) {
+    printf("error: %x\n",res);
+  }
+  sleep(1);
+}
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_flashuserled.c~	(revision 22)
@@ -0,0 +1,83 @@
+/**********************************/
+/* Set CAMAC Inhibit with SIS5100 */
+/****:*****************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+res=s5100_control_write(p,0x100,0x1);
+if (res!=0) {
+   printf("error: %x\n",res);
+}
+else {
+   printf("CAMAC Inhibit set\n");
+} 
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c	(revision 22)
@@ -0,0 +1,110 @@
+/***************/
+/* SIS5100 IOS */
+/***************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+int datum;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+while(1){
+  /* enable LAM station N1-N4 */
+  res=s5100_control_write(p,0x108,0xF);
+  if (res!=0) {
+    printf("error: %x\n",res);
+    return -1;
+  }
+  /* read input status */
+  res=s5100_control_read(p,0x84,&datum);
+  printf("OPT-IN register contents: %8.8x\n",datum); 
+  sleep(1);
+  res=s5100_control_write(p,0x80,0x70);
+  /* read latched inputs */
+  res=s5100_control_read(p,0x84,&datum);
+  printf("OPT-IN IRQ register contents: %8.8x\n",datum);
+  /* clear latched bits */
+  res=s5100_control_write(p,0x84,datum);
+  /* and read again */
+  res=s5100_control_read(p,0x84,&datum);
+  printf("OPT-IN IRQ register contents after clear: %8.8x\n",datum);
+  res=s5100_control_read(p,0x80,&datum);
+  printf("OPT-IN register contents: %8.8x\n",datum);
+  sleep(1); 
+  res=s5100_control_write(p,0x80,0x700000);
+  res=s5100_control_read(p,0x80,&datum);
+  printf("OPT-IN register contents: %8.8x\n",datum);
+  /* one shot IRQ LAM update */
+  res=s5100_control_write(p,0x104,0x8000);
+  /* read LAM status register */
+  res=s5100_control_read(p,0x104,&datum);
+  printf("LAM register contents: %8.8x\n",datum);
+
+}
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/sis5100_ios.c~	(revision 22)
@@ -0,0 +1,88 @@
+/**************************/
+/* SIS5100 flash user LED */
+/**************************/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis5100_camac_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int res;
+
+
+if (argc<2) {
+  fprintf(stderr, "usage: %s  path\n", argv[0]);
+  return 1;
+}
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+while(1){
+  res=s5100_control_write(p,0x100,0x80);
+  if (res!=0) {
+    printf("error: %x\n",res);
+  }
+  sleep(1);
+  res=s5100_control_write(p,0x100,0x800000);
+  if (res!=0) {
+    printf("error: %x\n",res);
+  }
+  sleep(1);
+}
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile	(revision 22)
@@ -0,0 +1,149 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+frontirqtest: frontirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+puls_lemo_out1: puls_lemo_out1.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+send_irq_update: send_irq_update.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+frontirqtest.o: frontirqtest.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+puls_lemo_out1.o: puls_lemo_out1.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+send_irq_update.o: send_irq_update.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile.bak	(revision 22)
@@ -0,0 +1,44 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+frontirqtest: frontirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+puls_lemo_out1: puls_lemo_out1.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+send_irq_update: send_irq_update.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/Makefile~	(revision 22)
@@ -0,0 +1,44 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+frontirqtest: frontirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+puls_lemo_out1: puls_lemo_out1.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+send_irq_update: send_irq_update.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c	(revision 22)
@@ -0,0 +1,107 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+
+
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+
+    irqctl.irq_mask=0xffffffff; /* all IRQs */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;
+    }
+
+reg.offset=0x8;
+ioctl(p, SIS1100_CTRL_READ, &reg);
+printf("0x%08x\n", reg.val);
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0xffffffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        printf("irqget: 0x%08x\n", irqget.irqs);
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/frontirqtest.c~	(revision 22)
@@ -0,0 +1,107 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+
+
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+
+    irqctl.irq_mask=0xffffffff; /* all IRQs */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;
+    }
+
+reg.offset=0x8;
+ioctl(p, SIS1100_CONTROL_READ, &reg);
+printf("0x%08x\n", reg.val);
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0xffffffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        printf("irqget: 0x%08x\n", irqget.irqs);
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/puls_lemo_out1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/puls_lemo_out1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/puls_lemo_out1.c	(revision 22)
@@ -0,0 +1,64 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    out_value = 0x10 ;    
+    if (ioctl(p, SIS1100_FRONT_IO, &out_value)<0) {
+        perror("SIS1100_FRONT_IO");
+        return -1;
+      }
+
+    out_value = 0x100000 ;    
+    if (ioctl(p, SIS1100_FRONT_IO, &out_value)<0) {
+        perror("SIS1100_FRONT_IO");
+        return -1;
+      }
+
+
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/send_irq_update.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/send_irq_update.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/front_irq/send_irq_update.c	(revision 22)
@@ -0,0 +1,61 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+    reg.offset=0x84;
+    reg.val=0x8000;
+    if (ioctl(p, SIS3100_CONTROL_WRITE, &reg)<0) {
+              perror("SIS3100_CONTROL_WRITE");
+              return -1;
+          }
+
+
+
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/Makefile	(revision 22)
@@ -0,0 +1,40 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+linkirqtest: linkirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/linkirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/linkirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/link_irq/linkirqtest.c	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if (ioctl(p, SIS3100_FRONT_IO, 0xef)<0) {
+        perror("SIS3100_FRONT_IO");
+              return -1;
+       }
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigaddset(&mask, SIGUSR2);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+    sigaction(SIGUSR2, &action, 0);
+
+    irqctl.irq_mask=0;
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            default:
+                printf("ERROR: got irqs=%08x, remote_status=%d\n",
+                    irqget.irqs, irqget.remote_status);
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile	(revision 22)
@@ -0,0 +1,46 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+all_irqs: all_irqs.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/Makefile~	(revision 22)
@@ -0,0 +1,46 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+all_irqs: all_irqs.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/all_irqs.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/all_irqs.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/irqs/vme_front_irq/all_irqs.c	(revision 22)
@@ -0,0 +1,119 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+
+}
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+
+    irqctl.irq_mask=0xffffffff; /* all IRQs */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;
+    }
+
+reg.offset=0x8;
+ioctl(p, SIS1100_CONTROL_READ, &reg);
+printf("0x%08x\n", reg.val);
+
+    while (1) {
+        u_int32_t io_bits;
+
+        fprintf(stderr, "before sigsuspend\n");
+        sigsuspend(&old_mask);
+        fprintf(stderr, "after sigsuspend\n");
+
+
+
+        irqget.irq_mask=0xffffffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+
+
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+        }
+
+
+        printf("irqget.irqs (doorbel)          : 0x%08x\n", irqget.irqs);
+        printf("irqget.level (VME IRQ Level)   : 0x%08x\n", irqget.level);
+        printf("irqget.vector (VME IRQ Vector) : 0x%08x\n", irqget.vector);
+
+
+
+
+
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;
+}
+/****************************************************************************/
+/****************************************************************************/
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+maptest: maptest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/maptest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/maptest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/mapping/maptest.c	(revision 22)
@@ -0,0 +1,301 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define MAPBITS 22
+#define MAPSIZE (1UL<<MAPBITS)
+#define MAPMASK (0xffffffffUL<<MAPBITS)
+#define OFFMASK (~MAPMASK)
+
+struct mapinfo {
+        u_int32_t header;
+        u_int32_t bordaddr;
+        int bordsize;
+        int modifier;
+        int mapidx, mapnum;
+        char* mapbase;
+        off_t mapsize;
+        char* bordbase;
+};
+
+/****************************************************************************/
+static void
+clear_maps(int p)
+{
+        int i;
+        struct sis1100_ctrl_reg reg;
+
+        for (i=0; i<64; i++) {
+                /* clear the .adl register; --> mark as unused */
+                reg.offset=0x408+16*i;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+static void
+dump_map(int p, struct mapinfo* map)
+{
+        int i;
+        printf("---------------------------\n");
+        printf("header  =0x%08x\n", map->header);
+        printf("bordaddr=0x%08x\n", map->bordaddr);
+        printf("bordsize=0x%08x\n", map->bordsize);
+        printf("modifier=      0x%02x\n", map->modifier);
+        printf("mapidx  =  %8d\n", map->mapidx);
+        printf("mapnum  =  %8d\n", map->mapnum);
+        printf("mapbase =%p\n", map->mapbase);
+        printf("mapsize =0x%08lx\n", map->mapsize);
+        printf("bordbase=%p\n", map->bordbase);
+        printf("\n");
+
+        for (i=map->mapidx; i<map->mapidx+map->mapnum; i++) {
+                struct sis1100_ctrl_reg reg;
+                u_int32_t offs=0x400+16*i;
+                
+                printf("idx=%d\n", i);
+                reg.offset=offs+0;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".hdr=0x%08x\n", reg.val);
+                reg.offset=offs+4;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".am =0x%08x\n", reg.val);
+                reg.offset=offs+8;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adl=0x%08x\n", reg.val);
+                reg.offset=offs+12;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adh=0x%08x\n", reg.val);
+        }
+
+}
+/****************************************************************************/
+static int
+map_it(int p, struct mapinfo* map)
+{
+        u_int32_t spacebase;
+        u_int32_t bordoffs;
+        struct sis1100_ctrl_reg reg;
+        struct sis1100_mapinfo mapinfo;
+        int i;
+
+        /* get size and start of VME-space */
+        mapinfo.space=2;
+        if (ioctl(p, SIS1100_MAPINFO, &mapinfo)<0) {
+                printf("SIS1100_MAPINFO(2): %s\n", strerror(errno));
+                return -1;
+        }
+
+        /*
+        printf("mapinfo(2): offset=0x%lx size=0x%x\n",
+                mapinfo.offset, mapinfo.size);
+        */
+
+
+        spacebase=map->bordaddr & MAPMASK;
+        bordoffs=map->bordaddr & OFFMASK;
+        map->mapnum=(map->bordsize+bordoffs+MAPSIZE-1)/MAPSIZE;
+        map->mapsize=map->mapnum*MAPSIZE;
+
+        /* this code is only to find an unused map entry */
+        /* not really necessary */
+        for (i=0; i<64; i++) {
+                reg.offset=0x408+16*i;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        printf("SIS1100_CONTROL_READ: %s\n", strerror(errno));
+                        return -1;
+                }
+                if (reg.error) {
+                        printf("SIS1100_CONTROL_READ: error=0x%x\n", reg.error);
+                        return -1;
+                }
+                if (reg.val==0) break;
+        }
+        if (i>=(64-map->mapnum)) {
+                printf("map_it: no maps available\n");
+                return -1;
+        }
+        /*printf("found free entry at %d\n", i);*/
+
+
+
+        map->mapidx=i;
+        for (i=0; i<map->mapnum; i++) {
+                u_int32_t offs=0x400+16*(map->mapidx+i);
+
+                reg.offset=offs+0;
+                reg.val=map->header;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+4;
+                reg.val=map->modifier;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                reg.offset=offs+8;
+
+                /* the '|0xa5a5' is only used to mark the entry as 'in use' */
+                /* the lowest 22 bits are ignored, so we can misuse them */
+                reg.val=spacebase+MAPSIZE*i|0xa5a5;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+12;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+
+        map->mapbase=mmap(0,
+                        map->mapsize,
+                        PROT_READ|PROT_WRITE, MAP_SHARED,
+                        p,
+                        mapinfo.offset+map->mapidx*MAPSIZE);
+        /*                             ^^^^^^^^^^^^^^^^^^^   */
+        /*                      only this term is really missing in your code*/
+
+
+        if (map->mapbase==MAP_FAILED) {
+                printf("mmap: %s\n", strerror(errno));
+                for (i=0; i<map->mapnum; i++) {
+                        reg.offset=0x400+16*(map->mapidx+i)+8;
+                        reg.val=0;
+                        ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                }
+                return -1;
+        }
+        map->bordbase=map->mapbase+bordoffs;
+        return 0;
+}
+/****************************************************************************/
+static void
+unmap_it(int p, struct mapinfo* map)
+{
+        struct sis1100_ctrl_reg reg;
+        int i;
+
+        munmap(map->mapbase, map->mapsize);
+        for (i=0; i<map->mapnum; i++) {
+                reg.offset=0x400+16*(map->mapidx+i)+8;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, i;
+        struct mapinfo map[5];
+        volatile u_int32_t val;
+
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        /* mark all maps as unused */
+        clear_maps(p);
+
+#ifdef old
+        map[0].header=0xff010800;
+        map[0].bordaddr=0x00222200;
+        map[0].bordsize=0x400000;
+        map[0].modifier=0x39;
+
+        map[1].header=0xff010800;
+        map[1].bordaddr=0x00d00000;
+        map[1].bordsize=0x300000;
+        map[1].modifier=0x39;
+
+        map[2].header=0xff010800;
+        map[2].bordaddr=0xee000000;
+        map[2].bordsize=0x400000;
+        map[2].modifier=0x9;
+
+        map[3].header=0xff010800;
+        map[3].bordaddr=0x00f00000;
+        map[3].bordsize=0x100000;
+        map[3].modifier=0x39;
+
+        map[4].header=0xff010800;
+        map[4].bordaddr=0x00380000;
+        map[4].bordsize=0x00200000;
+        map[4].modifier=0x39;
+#endif
+
+
+        map[0].header=0xff010800;
+        map[0].bordaddr=0x00000000; /* ram */
+        map[0].bordsize=0x400000;
+        map[0].modifier=0x9;
+
+        map[1].header=0xff010800;
+        map[1].bordaddr=0x33000000; /* sis3300 ; 0x1000 0000 to 107f ffff*/
+        map[1].bordsize=0x800000;
+        map[1].modifier=0x9;
+
+        map[2].header=0xff010800;
+        map[2].bordaddr=0xee000000;
+        map[2].bordsize=0x400000;
+        map[2].modifier=0x9;
+
+        map[3].header=0xff010800;
+        map[3].bordaddr=0x00f00000;
+        map[3].bordsize=0x100000;
+        map[3].modifier=0x9;
+
+        map[4].header=0xff010800;
+        map[4].bordaddr=0x00380000;
+        map[4].bordsize=0x00200000;
+        map[4].modifier=0x9;
+
+
+
+
+
+        for (i=0; i<5; i++) {
+                if (map_it(p, map+i)<0) return 1;
+                dump_map(p, map+i);
+        }
+
+        /* the real access */
+
+#ifdef old
+        val=*(u_int16_t*)(map[0].bordbase+0xfa);
+        val=*(u_int16_t*)(map[1].bordbase+0xfe02);
+        val=*(u_int16_t*)(map[2].bordbase+0x1000);
+        val=*(u_int16_t*)(map[3].bordbase+0x0);
+        val=*(u_int16_t*)(map[4].bordbase+0x100000);
+#endif
+
+        val=*(u_int32_t*)(map[1].bordbase+0x4);
+        printf("\n" );
+        printf("\n" );
+        printf("sis3300 id = 0x%08x\n", val );
+
+
+
+for (i=0;i<0x80000;i++) {
+        val=*(u_int32_t*)(map[0].bordbase+(4*i));
+        val=*(u_int32_t*)(map[1].bordbase + 0x400000 + (4*i));
+}
+
+
+/* unmap again */
+        for (i=0; i<5; i++) {
+                unmap_it(p, map+i);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/Makefile	(revision 22)
@@ -0,0 +1,42 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+pipeline: pipeline.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/pipeline.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/pipeline.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/pipeline_liste/pipeline.c	(revision 22)
@@ -0,0 +1,218 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int p;
+
+/* das sind die CAEN-Module, die ich zufaellig habe, beliebig durcheinander-
+   gewuerfelt und vervielfacht */
+struct sis1100_pipelist list[]={
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x0c010000, 0x09, 0x500fe, 0}
+};
+
+
+static int pipeline_read(int p, struct sis1100_pipelist* list, int listlen,
+    u_int32_t* data, int seq)
+{
+    struct sis1100_pipe pipe;
+
+    pipe.num=listlen;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) printf("error=0x%x\n", pipe.error);
+    return 0;
+}
+
+volatile int stop=0;
+
+static void hand(int sig)
+{
+printf("signal %d\n", sig);
+stop=1;
+}
+
+int main(int argc, char* argv[])
+{
+    int num, loopcount, reqcount, i, j, *data;
+    int* comp, comp_valid, dot;
+    struct sigaction act;
+
+    if (argc<4)
+      {
+      fprintf(stderr, "usage: %s path reqcount loopcount\n", argv[0]);
+      return 1;
+      }
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    reqcount=atoi(argv[2]);
+    loopcount=atoi(argv[3]);
+
+    act.sa_handler=hand;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags=0;
+    sigaction(SIGINT, &act, 0);
+    sigaction(SIGQUIT, &act, 0);
+
+    num=sizeof(list)/sizeof(struct sis1100_pipelist);
+    if (reqcount<num) num=reqcount;
+    printf("listlen=%d; loopcount=%d\n", num, loopcount);
+
+    data=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp_valid=0;
+
+    if (!data) {
+    	printf("malloc: %s\n", strerror(errno));
+	return 1;
+    }
+    for (i=0; i<num; i++) data[i]=0x12345678; /* just for test */
+    dot=10000/num;
+    for (j=0; j<loopcount; j++) {
+    	if (stop || (pipeline_read(p, list, num, data, j)<0)) goto raus;
+        if (comp_valid) {
+            for (i=0; i<num; i++) {
+                if (comp[i]!=data[i]) printf("[%d] %08x-->%08x\n",
+                    i, comp[i], data[i]);
+            }
+        } else {
+            for (i=0; i<num; i++) comp[i]=data[i];
+            comp_valid=1;
+        }
+        if ((j%dot)==0) {printf("."); fflush(stdout);}
+    }
+raus:
+    printf("tranferred %d words\n", j*num);
+    for (i=0; i<num; i++)
+    	printf("[%2d] %x: %08x\n", i, list[i].addr, data[i]&0xffff);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile	(revision 22)
@@ -0,0 +1,89 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+check_size: check_size.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis3100_sdram_eeprom: sis3100_sdram_eeprom.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+check_size.o: check_size.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sis3100_sdram_eeprom.o: sis3100_sdram_eeprom.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.bak	(revision 22)
@@ -0,0 +1,357 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+check_size: check_size.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+sis3100_sdram_eeprom: sis3100_sdram_eeprom.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.old
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.old	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile.old	(revision 22)
@@ -0,0 +1,83 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I../../sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sis3100_sdram_eeprom: sis3100_sdram_eeprom.c ../../sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+check_size.o: check_size.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sis3100_sdram_eeprom.o: sis3100_sdram_eeprom.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/Makefile~	(revision 22)
@@ -0,0 +1,357 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+vme_read_irqack: vme_read_irqack.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d8: vme_read_d8.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c	(revision 22)
@@ -0,0 +1,356 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../../dev/pci/sis1100_var.h"  
+ 
+#include "../../sis3100_calls/sis3100_vme_calls.h"
+ 
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t no_row_addresses ;
+u_int32_t no_column_addresses ;
+u_int32_t no_module_banks ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis1100_00dsp", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+ no_row_addresses     =   0 ;
+ no_column_addresses  =   0 ;
+ no_module_banks      =   0 ;
+
+ for (i=0;i<6;i++)  {
+     sdram_eeprom_read (p_sharc, &data) ;
+     if (i == 0x3) {
+        no_row_addresses = data ;
+        printf("rows: %d\n",data);
+     }
+     if (i == 0x4) {
+        no_column_addresses = data ;
+        printf("columns: %d\n",data);
+     }
+     if (i == 0x5) {
+        no_module_banks = data ;
+        printf("banks: %d\n",data);
+     }
+ }
+
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+ no_of_Mbyte = 0 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 1))   no_of_Mbyte = 64 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 2))   no_of_Mbyte = 128 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 1))   no_of_Mbyte = 256 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 2))   no_of_Mbyte = 512 ;
+
+ printf("   no_of_Mbyte %d \n", no_of_Mbyte );      
+
+close(p_sharc);
+
+return no_of_Mbyte ;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/check_size.c~	(revision 22)
@@ -0,0 +1,356 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../../dev/pci/sis1100_var.h"  
+ 
+#include "../../sis3100_calls/sis3100_vme_calls.h"
+ 
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0xC0000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t no_row_addresses ;
+u_int32_t no_column_addresses ;
+u_int32_t no_module_banks ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis1100_00dsp", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+ no_row_addresses     =   0 ;
+ no_column_addresses  =   0 ;
+ no_module_banks      =   0 ;
+
+ for (i=0;i<6;i++)  {
+     sdram_eeprom_read (p_sharc, &data) ;
+     if (i == 0x3) {
+        no_row_addresses = data ;
+        printf("rows: %d\n",data);
+     }
+     if (i == 0x4) {
+        no_column_addresses = data ;
+        printf("columns: %d\n",data);
+     }
+     if (i == 0x5) {
+        no_module_banks = data ;
+        printf("banks: %d\n",data);
+     }
+ }
+
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+ no_of_Mbyte = 0 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 1))   no_of_Mbyte = 64 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 2))   no_of_Mbyte = 128 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 1))   no_of_Mbyte = 256 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 2))   no_of_Mbyte = 512 ;
+
+ printf("   no_of_Mbyte %d \n", no_of_Mbyte );      
+
+close(p_sharc);
+
+return no_of_Mbyte ;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c	(revision 22)
@@ -0,0 +1,365 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "../../dev/pci/sis1100_var.h"  
+ 
+#include "../../sis3100_calls/sis3100_vme_calls.h"
+
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis1100_00dsp", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+/* write 0x3100 to address 0x90/0x91  */
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x90) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x31) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x91) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+  for (i=0;i<20;i++)
+   {
+     printf("i = %4d ", i * 8);      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x  ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x \n", data );      
+
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+close(p_sharc);
+
+return 0;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sdram_eeprom/sis3100_sdram_eeprom.c~	(revision 22)
@@ -0,0 +1,365 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "../../dev/pci/sis1100_var.h"  
+ 
+#include "../../sis3100_calls/sis3100_vme_calls.h"
+
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0xC0000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis1100_00dsp", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+/* write 0x3100 to address 0x90/0x91  */
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x90) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x31) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x91) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+  for (i=0;i<20;i++)
+   {
+     printf("i = %4d ", i * 8);      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x  ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x \n", data );      
+
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+close(p_sharc);
+
+return 0;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/C1.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/C1.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/C1.LDR	(revision 22)
@@ -0,0 +1,2916 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0130
+0x0100
+0x0002
+0x0100
+0x2000
+0x0f02
+0x4402
+0x0002
+0x1102
+0x0000
+0x0000
+0x0f02
+0x4401
+0x0002
+0x1102
+0x0000
+0x0000
+0x0f02
+0x4400
+0x0002
+0x1102
+0x4400
+0x0002
+0x1002
+0x00ff
+0x0000
+0x0f04
+0xa024
+0x0000
+0x013e
+0x000e
+0x0000
+0x0724
+0x4402
+0x0002
+0x1002
+0x4400
+0x0002
+0x1004
+0x1824
+0x0000
+0x013e
+0x0000
+0x8a00
+0x708f
+0x4400
+0x0002
+0x1002
+0x4401
+0x0002
+0x1004
+0x1224
+0x0000
+0x013e
+0x0000
+0x8100
+0x597e
+0x4400
+0x0002
+0x1002
+0x9420
+0x0002
+0x013e
+0x0000
+0x8100
+0x704f
+0x4400
+0x0002
+0x1102
+0xfff0
+0x00ff
+0x073e
+0x4401
+0x0002
+0x1002
+0x9420
+0x0002
+0x013e
+0x4401
+0x0002
+0x1104
+0xffea
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0f04
+0x00e4
+0x0000
+0x1844
+0x0000
+0x8100
+0x5ffe
+0x0000
+0xb180
+0x5ffe
+0xffff
+0xffff
+0xac1c
+0x00e0
+0x0400
+0x073e
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x00c9
+0x0000
+0x07be
+0x005c
+0x0000
+0x07be
+0x0002
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0023
+0x0000
+0x07be
+0x001e
+0x0000
+0x07be
+0x002c
+0x0000
+0x07be
+0x0005
+0x0000
+0x07be
+0x000d
+0x0000
+0x07be
+0x0007
+0x0000
+0x07be
+0x00f0
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0400
+0x0a3e
+0x44e8
+0x0002
+0x0f14
+0x0001
+0x0000
+0x9940
+0x0000
+0x0000
+0x0f34
+0x44e9
+0x0002
+0x0f14
+0x0001
+0x2000
+0x0c00
+0x0000
+0x0000
+0x9980
+0x0000
+0x0000
+0x0a3e
+0x0001
+0x0000
+0x0f02
+0x017c
+0x0002
+0x0f01
+0x4404
+0x0002
+0x0f14
+0x0009
+0x2500
+0x0c00
+0x3020
+0x9a04
+0x725f
+0x0122
+0x0001
+0x023e
+0x0003
+0x0000
+0xa900
+0x0000
+0x0000
+0xa900
+0x0002
+0x0000
+0xa901
+0x0001
+0x0000
+0xa901
+0x0004
+0x0000
+0xa901
+0x0005
+0x0000
+0xa901
+0x0006
+0x0000
+0x1604
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0400
+0x0a3e
+0x4403
+0x0002
+0x0f14
+0x0000
+0x0000
+0x9940
+0x1800
+0x0002
+0x12db
+0x0000
+0x8000
+0x7ddf
+0x1801
+0x0002
+0x12db
+0x0000
+0x8100
+0x7ddf
+0x1102
+0xa380
+0x700f
+0xa110
+0x9b82
+0x702f
+0x0000
+0x8b80
+0x701f
+0x0000
+0xa300
+0x747f
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x8b00
+0x717f
+0x0000
+0x9b00
+0x737f
+0x1809
+0x0002
+0x0f1c
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0xb8db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x9a02
+0x725f
+0x0000
+0x0400
+0x0a00
+0x0001
+0x0000
+0xb8db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0000
+0x023e
+0x0004
+0x0000
+0xb8db
+0x1100
+0x8002
+0x7ddf
+0x000f
+0x0400
+0x0724
+0x0003
+0x0000
+0xb8db
+0x0000
+0x8080
+0x7ddf
+0x0000
+0x8a00
+0x701f
+0x0005
+0x0000
+0x1644
+0x0003
+0x0000
+0x0f02
+0x1112
+0x0000
+0x013e
+0x0005
+0x0000
+0x0f02
+0x2002
+0x8100
+0x71cf
+0x0000
+0x0000
+0x9980
+0x0000
+0x8080
+0x59be
+0x0000
+0x8080
+0x59be
+0xffeb
+0x04ff
+0x073e
+0x0000
+0x8000
+0x59be
+0x0000
+0x0000
+0x9940
+0x0005
+0x0000
+0x1644
+0x0000
+0x8100
+0x71cf
+0x0003
+0x0000
+0x0f03
+0x1113
+0x8e00
+0x701f
+0x0005
+0x0000
+0x0f03
+0x2003
+0x0000
+0x013e
+0x0000
+0x0000
+0x99a0
+0x0000
+0x8080
+0x59bf
+0x0000
+0x8080
+0x59bf
+0x0000
+0x8000
+0x59bf
+0xffde
+0x04ff
+0x073e
+0x0000
+0x8000
+0x59bf
+0x0000
+0x0000
+0x9960
+0x0000
+0x0e00
+0x4dfe
+0x0000
+0x3400
+0x083f
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x000b
+0x0000
+0x07be
+0x0035
+0x0000
+0x07be
+0x0038
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x0000
+0x0f79
+0x0000
+0x0000
+0x0000
+0x0010
+0x0000
+0x140a
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0027
+0x0200
+0x0c00
+0xffff
+0xffff
+0x0f2f
+0xffff
+0xffff
+0x0f27
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0000
+0x0000
+0x0f2d
+0x0000
+0x0000
+0x0f25
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0000
+0x0000
+0x0f40
+0x0000
+0x0000
+0x0f41
+0x0000
+0x0000
+0x0f42
+0x0000
+0x0000
+0x0f43
+0x0000
+0x0000
+0x0f44
+0x0000
+0x0000
+0x0f45
+0x0000
+0x0000
+0x0f46
+0x0000
+0x0000
+0x0f47
+0x0000
+0x0000
+0x0f48
+0x0000
+0x0000
+0x0f49
+0x0000
+0x0000
+0x0f4a
+0x0000
+0x0000
+0x0f4b
+0x0000
+0x0000
+0x0f4c
+0x0000
+0x0000
+0x0f4d
+0x0000
+0x0000
+0x0f4e
+0x0000
+0x0000
+0x0f4f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0400
+0x0a3e
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0001
+0x140b
+0x0000
+0x0400
+0x0a3e
+0x1000
+0x0000
+0x140b
+0x0800
+0x0000
+0x140b
+0x1808
+0x0002
+0x12db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x8c02
+0x700f
+0x0000
+0x0400
+0x0a00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0007
+0x0000
+0x0700
+0x0005
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8800
+0x7ddf
+0x0001
+0x0000
+0x0ddc
+0x0000
+0x0000
+0x9180
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0009
+0x0000
+0x0700
+0x0007
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8c80
+0x7ddf
+0x0000
+0x8000
+0x7dcf
+0x0000
+0x0000
+0x0fdb
+0x0001
+0x0000
+0x0d00
+0x0000
+0xed80
+0x53bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0009
+0x0000
+0x0700
+0x0007
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8800
+0x7ddf
+0x0003
+0x0000
+0x0ddc
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0008
+0x0000
+0x0700
+0x0006
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8c80
+0x7ddf
+0x0002
+0x0000
+0x0ddc
+0x0000
+0x6d80
+0x51bf
+0x0000
+0xed80
+0x53bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0a3e
+0xff9b
+0x00ff
+0x07be
+0xff97
+0x00ff
+0x07be
+0x0000
+0x0400
+0x0a3e
+0x0001
+0x0000
+0x0f2e
+0x0000
+0x0000
+0x0f3c
+0x44e8
+0x0002
+0x0f14
+0x000b
+0x0400
+0x073e
+0x0000
+0x0e00
+0x4dfe
+0x0000
+0x8200
+0x597e
+0x44e8
+0x0002
+0x0f14
+0x660d
+0x0019
+0x0f02
+0x0000
+0x0000
+0x597e
+0x0002
+0x0014
+0x013e
+0x7fff
+0x0000
+0x0f02
+0x1002
+0x0e00
+0x4dfe
+0x0000
+0x8000
+0x597e
+0x1f00
+0x0031
+0x023e
+0x0000
+0x3400
+0x083f
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x2555
+0x9a00
+0x72df
+0x44e9
+0x0002
+0x0f14
+0x1240
+0x0002
+0x59be
+0x0005
+0x2000
+0x0c00
+0x1000
+0x0002
+0x59be
+0x020a
+0x0402
+0x0640
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x9550
+0x0002
+0x013e
+0x0001
+0x0000
+0x1604
+0x1550
+0x0002
+0x013e
+0x000f
+0x0400
+0x0700
+0xfffd
+0xffff
+0x1604
+0x0000
+0x0000
+0x59fe
+0x0000
+0x8e00
+0x700f
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x8180
+0x714f
+0x0000
+0x8200
+0x716f
+0x0000
+0x8b00
+0x717f
+0x0000
+0x2c00
+0x083f
+0x0000
+0x8200
+0x5ffe
+0x0000
+0xb180
+0x5ffe
+0xa550
+0x0002
+0x013e
+0xfff6
+0x04ff
+0x0724
+0x0000
+0x0000
+0x0f34
+0x0000
+0x8a00
+0x703f
+0x11ed
+0x0400
+0x073e
+0x1020
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x9fc0
+0x0000
+0x0000
+0x9fc0
+0x0004
+0x0400
+0x07be
+0x0002
+0x0000
+0x0f04
+0x4509
+0x0002
+0x0f08
+0x0000
+0x0000
+0x0a3e
+0x0002
+0x0000
+0x0f00
+0x4509
+0x0002
+0x0f14
+0x0000
+0x0000
+0x0f34
+0x0001
+0x0000
+0x0d00
+0x0000
+0x0000
+0x9980
+0x4509
+0x0002
+0x0f14
+0x450b
+0x0002
+0x9980
+0x450b
+0x0002
+0x0f14
+0x0061
+0x0000
+0x9980
+0x0064
+0x0000
+0x9980
+0x0000
+0x0400
+0x0a3e
+0x0069
+0x0000
+0x9980
+0x0000
+0x0000
+0x9980
+0x000a
+0x0000
+0x0000
+0x0005
+0x1400
+0x0002
+0x000e
+0x0000
+0x0000
+0x0003
+0x1405
+0x0002
+0x0123
+0x0002
+0x06be
+0x0100
+0x0002
+0x063e
+0x1407
+0x0002
+0x063e
+0x000a
+0x0000
+0x0000
+0x0004
+0x1408
+0x0002
+0x000e
+0x0000
+0x0000
+0x0018
+0x140c
+0x0002
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4416
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x441c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4422
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4428
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x442e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4434
+0x0002
+0x0f1f
+0x000a
+0x0000
+0x0000
+0x0004
+0x1424
+0x0002
+0x000e
+0x0000
+0x0000
+0x005d
+0x1428
+0x0002
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4440
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4446
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x444c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4452
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4458
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x445e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4464
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x446a
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4470
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4476
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x447c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4482
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4488
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x448e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4494
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x449a
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44a0
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44a6
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44ac
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44b2
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44b8
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44be
+0x0002
+0x0f1f
+0x0000
+0x8e80
+0x5ffe
+0x0005
+0x0000
+0xbe1d
+0x0000
+0x6c00
+0x083f
+0x0000
+0x0008
+0x140a
+0x0002
+0x0000
+0xbe1d
+0x000e
+0x0000
+0x0000
+0x0012
+0x1800
+0x0002
+0x1702
+0x6000
+0x0002
+0x1702
+0x2000
+0x0000
+0x1702
+0x0000
+0x2000
+0x1702
+0x0000
+0x4000
+0x1702
+0x0000
+0x8000
+0x1702
+0x7bde
+0x000f
+0x1702
+0x0000
+0x0080
+0x1702
+0x03de
+0x0000
+0xc702
+0x180a
+0x0002
+0x1702
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x00e8
+0x4400
+0x0002
+0x0027
+0x44e9
+0x0002
+0x0000
+0x0000
+0x0000
+0x0000
+0x0001
+0x0000
+0x0001
+0x44e8
+0x0002
+0x0000
+0x0001
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_IRQ.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_IRQ.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_IRQ.LDR	(revision 22)
@@ -0,0 +1,1941 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0083
+0x0100
+0x0002
+0x000d
+0x0000
+0x073e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0144
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0148
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x017f
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0001
+0x0000
+0x0f2d
+0x0101
+0x0002
+0x0f1d
+0x0018
+0x0002
+0x0f1e
+0x0002
+0x0c00
+0x0c00
+0x0000
+0x6d80
+0x5b7f
+0x0000
+0xed80
+0x5d7f
+0x0000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f21
+0x0100
+0x2000
+0x0f11
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8080
+0x527e
+0x0100
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x00ff
+0x0000
+0x0f02
+0x0001
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x0002
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0xff00
+0x0000
+0x0f0f
+0x0004
+0x0100
+0x110f
+0x0040
+0x0000
+0x140d
+0x0004
+0x0000
+0x140a
+0x0080
+0x0000
+0x140d
+0x0002
+0x0000
+0x140a
+0x0100
+0x0000
+0x140d
+0x0001
+0x0000
+0x140a
+0x1000
+0x0000
+0x140b
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x1002
+0x0108
+0x2000
+0x1102
+0x0000
+0x8100
+0x77bf
+0x0109
+0x2000
+0x1102
+0x0000
+0x8100
+0x77af
+0x010a
+0x2000
+0x1102
+0x0000
+0x8100
+0x779f
+0x010b
+0x2000
+0x1102
+0x0000
+0x8100
+0x77df
+0x010c
+0x2000
+0x1102
+0x00ff
+0x0000
+0x0f02
+0x0100
+0x2000
+0x1001
+0x0112
+0x0004
+0x013e
+0x0811
+0x0000
+0x023e
+0x0001
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0x0101
+0x2000
+0x1001
+0x0112
+0x0004
+0x013e
+0x0811
+0x0000
+0x023e
+0x0002
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0xffe5
+0x00ff
+0x073e
+0x0102
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0102
+0x2000
+0x110f
+0x0000
+0x0000
+0x0b3e
+0x0103
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0103
+0x2000
+0x110f
+0x0004
+0x0100
+0x100f
+0x0004
+0x0100
+0x110f
+0x080f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0110
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0110
+0x2000
+0x110e
+0x0001
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x090f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0111
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0111
+0x2000
+0x110e
+0x0002
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0a0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0112
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0112
+0x2000
+0x110e
+0x0004
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0b0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0113
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0113
+0x2000
+0x110e
+0x0008
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0c0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0114
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0114
+0x2000
+0x110e
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0d0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0115
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0115
+0x2000
+0x110e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0e0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0116
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0116
+0x2000
+0x110e
+0x0000
+0x0020
+0x142c
+0x0000
+0x0020
+0x140c
+0x0000
+0x0000
+0x0b3e
+0x0104
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0104
+0x2000
+0x110f
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_TEST.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_TEST.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/IO_TEST.LDR	(revision 22)
@@ -0,0 +1,1800 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x001d
+0x0100
+0x0002
+0x0000
+0x0000
+0x0f03
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0000
+0x0020
+0x142c
+0x0000
+0x0020
+0x140c
+0x0001
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0001
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x000a
+0x0000
+0x0000
+0x0004
+0x011d
+0x0002
+0x000e
+0x0000
+0x0000
+0x0008
+0x0121
+0x0002
+0x0001
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x000a
+0x0000
+0x0000
+0x0004
+0x0129
+0x0002
+0x000e
+0x0000
+0x0000
+0x0027
+0x012d
+0x0002
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0000
+0x0008
+0x142c
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0004
+0x0100
+0x1002
+0x0100
+0x2000
+0x1102
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0101
+0x2000
+0x1002
+0x9220
+0x0002
+0x013e
+0x0101
+0x2000
+0x1102
+0x9770
+0x0002
+0x013e
+0x0102
+0x2000
+0x1107
+0x0001
+0x0000
+0x0c02
+0x0000
+0x0000
+0x0000
+0xffc3
+0x00ff
+0x073e
+0x5555
+0x0000
+0x0f02
+0x0001
+0x0400
+0x0c00
+0x0000
+0x0100
+0x1102
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfffc
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0f03
+0x0001
+0x2000
+0x1103
+0x0000
+0x2000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x1248
+0x0000
+0x0f02
+0x0049
+0x400a
+0x1102
+0x9330
+0x0002
+0x013e
+0x0000
+0x2000
+0x1004
+0x1004
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x9330
+0x0002
+0x013e
+0xfffc
+0x04ff
+0x073e
+0x0001
+0x2000
+0x1103
+0x0049
+0x400a
+0x1102
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile	(revision 22)
@@ -0,0 +1,141 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis3100_load_sharc: sis3100_load_sharc.c ../../V2.02/sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sharc_read.o: sharc_read.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sharc_write.o: sharc_write.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sis3100_load_sharc.o: sis3100_load_sharc.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../V2.02/dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h \
+  ../../../V2.02/sis3100_calls/sis3100_vme_calls.h
+sis3100_sdram_eeprom.o: sis3100_sdram_eeprom.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile.bak	(revision 22)
@@ -0,0 +1,141 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis3100_load_sharc: sis3100_load_sharc.c ../../V2.02/sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sharc_read.o: sharc_read.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sharc_write.o: sharc_write.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sis3100_load_sharc.o: sis3100_load_sharc.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../V2.02/dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h \
+  ../../../V2.02/sis3100_calls/sis3100_vme_calls.h
+sis3100_sdram_eeprom.o: sis3100_sdram_eeprom.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/Makefile~	(revision 22)
@@ -0,0 +1,141 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis3100_load_sharc: sis3100_load_sharc.c ../../V2.02sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sharc_read.o: sharc_read.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sharc_write.o: sharc_write.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+sis3100_load_sharc.o: sis3100_load_sharc.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../../V2.02/dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h \
+  ../../../V2.02/sis3100_calls/sis3100_vme_calls.h
+sis3100_sdram_eeprom.o: sis3100_sdram_eeprom.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_rd.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0001
+0x0f00
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x0100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/blk_wr.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x0f00
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/dma_test.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/dma_test.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/dma_test.ldr	(revision 22)
@@ -0,0 +1,1698 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x002e
+0x0100
+0x0002
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0f00
+0x7800
+0x0002
+0x1100
+0x7800
+0x0002
+0x1000
+0x9000
+0x0002
+0x013e
+0x7800
+0x0002
+0x1100
+0x0001
+0x0000
+0x0f20
+0x3000
+0x0002
+0x0f10
+0x0002
+0x0000
+0x0c01
+0x0000
+0x8000
+0x503e
+0x9000
+0x0002
+0x013e
+0x3000
+0x0002
+0x0f00
+0x0048
+0x0000
+0x1100
+0x0000
+0x8000
+0x0f00
+0x004d
+0x0000
+0x1100
+0x0001
+0x0000
+0x0f00
+0x0049
+0x0000
+0x1100
+0x004e
+0x0000
+0x1100
+0x000f
+0x0000
+0x0f00
+0x004a
+0x0000
+0x1100
+0x004f
+0x0000
+0x1100
+0x001d
+0x0000
+0x1070
+0x0001
+0x0000
+0x1400
+0x0004
+0x0000
+0x1400
+0x0020
+0x0000
+0x1420
+0x0040
+0x0000
+0x1420
+0x0080
+0x0000
+0x1420
+0x0200
+0x0000
+0x1400
+0x001d
+0x0000
+0x1170
+0x0000
+0x0000
+0x0000
+0x0037
+0x0000
+0x1004
+0x0704
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0001
+0x0000
+0x1420
+0x001d
+0x0000
+0x1170
+0x0000
+0xc000
+0x1104
+0x0001
+0x9000
+0x0c01
+0x0000
+0x0000
+0x0000
+0xffdd
+0x00ff
+0x073e
+0x3000
+0x0002
+0x0f12
+0x0000
+0x0000
+0x0f01
+0x0000
+0xc000
+0x0f11
+0x0001
+0x0000
+0x0f21
+0x0002
+0x1000
+0x0c00
+0x0000
+0x0080
+0x547e
+0x0000
+0x8080
+0x527e
+0x0002
+0x0000
+0x0000
+0x1000
+0x3000
+0x0002
+0x0002
+0x0000
+0x0000
+0x0801
+0x7000
+0x0002
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/led_test.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/led_test.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/led_test.ldr	(revision 22)
@@ -0,0 +1,1638 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x001e
+0x0100
+0x0002
+0x1000
+0x0000
+0x0f04
+0x0000
+0x0000
+0x0f05
+0x0100
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x011a
+0x0002
+0x06be
+0x1002
+0x0000
+0x0f02
+0x2225
+0x0000
+0x013e
+0x0000
+0x0000
+0x0f03
+0xa220
+0x0002
+0x013e
+0xa023
+0x0000
+0x013e
+0xfffe
+0x00ff
+0x0720
+0x1000
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x011a
+0x0002
+0x06be
+0x1000
+0x0000
+0x0f02
+0x1225
+0x0000
+0x013e
+0x0000
+0x0000
+0x0f03
+0xa220
+0x0002
+0x013e
+0xa023
+0x0000
+0x013e
+0xfffe
+0x00ff
+0x0720
+0x0010
+0x0000
+0x0f06
+0x1556
+0x0000
+0x013e
+0xa054
+0x0000
+0x013e
+0xffeb
+0x00ff
+0x0720
+0x0000
+0x0000
+0x0f05
+0xffe9
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel	(revision 22)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+
+loop_counter=1
+while :
+do
+
+
+    ./sharc_write /tmp/sis3100sharc  0x40000000 0x01 0x1103
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+#  if [ $loop_counter -eq 10 ]
+#    then exit
+#  fi
+done
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/loop_shel~	(revision 22)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+
+loop_counter=1
+while :
+do
+
+
+     then ./sharc_write /tmp/sis3100sharc  0x40000000 0x01 0x1103
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+#  if [ $loop_counter -eq 10 ]
+#    then exit
+#  fi
+done
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801_1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801_1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801_1.ldr	(revision 22)
@@ -0,0 +1,1707 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0035
+0x0100
+0x0002
+0x0060
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0020
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x00c7
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0080
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x00c0
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0028
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0000
+0x2000
+0x0f00
+0x0009
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0a00
+0x0033
+0x023e
+0xfffb
+0x00ff
+0x0710
+0x0000
+0x0008
+0x142c
+0x0020
+0x0000
+0x0f00
+0x0002
+0x2000
+0x1100
+0x0100
+0x2000
+0x0f00
+0x000f
+0x401c
+0x1100
+0x0131
+0x0002
+0x06be
+0x0003
+0x2000
+0x1002
+0x0120
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x0121
+0x2000
+0x1102
+0x0100
+0x2000
+0x0f11
+0x0000
+0x4000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0002
+0x2000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0003
+0x2000
+0x1002
+0x0122
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x0123
+0x2000
+0x1102
+0x0000
+0x0000
+0x0000
+0xffe5
+0x04ff
+0x073e
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x0000
+0x0000
+0x0100
+0x1000
+0x0000
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801irq.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801irq.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/s3801irq.ldr	(revision 22)
@@ -0,0 +1,1923 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x007d
+0x0100
+0x0002
+0x0005
+0x0000
+0x073e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x014d
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0001
+0x0000
+0x0f2d
+0x0101
+0x0002
+0x0f1d
+0x0020
+0x0002
+0x0f1e
+0x0002
+0x0400
+0x0c00
+0x0000
+0x6d80
+0x5b7f
+0x0000
+0xed80
+0x5d7f
+0x0000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f21
+0x0100
+0x2000
+0x0f11
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8080
+0x527e
+0x0100
+0x2000
+0x1001
+0x0002
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x000d
+0x0000
+0x0700
+0x0000
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0002
+0x0000
+0x0700
+0xfff9
+0x00ff
+0x073e
+0x0100
+0x0000
+0x142d
+0x1000
+0x0000
+0x142b
+0x0060
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0001
+0x0000
+0x0f01
+0x0100
+0x2000
+0x1101
+0xfff1
+0x00ff
+0x073e
+0x0003
+0x0000
+0x0f01
+0x0100
+0x2000
+0x1101
+0x0060
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0020
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x01f3
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0080
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0058
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0010
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0101
+0x2000
+0x1000
+0x0f55
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0004
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x00c0
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0179
+0x0002
+0x06be
+0x0028
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x8000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0100
+0x0000
+0x140d
+0x0001
+0x0000
+0x142a
+0x1000
+0x0000
+0x140b
+0xffc4
+0x00ff
+0x073e
+0x0003
+0x0000
+0x0f11
+0x0000
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0009
+0x2000
+0x1000
+0x0112
+0x2000
+0x1100
+0x0004
+0x0000
+0x0f11
+0x0000
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0009
+0x2000
+0x1000
+0x0113
+0x2000
+0x1100
+0x000f
+0x0000
+0x0f00
+0x0280
+0x400a
+0x1100
+0x0179
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0111
+0x2000
+0x1100
+0x0020
+0x0000
+0x0f00
+0x0002
+0x2000
+0x1100
+0x0100
+0x2000
+0x0f00
+0x000f
+0x4014
+0x1100
+0x0179
+0x0002
+0x06be
+0x0003
+0x2000
+0x1002
+0x011e
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x011f
+0x2000
+0x1102
+0x0120
+0x2000
+0x0f11
+0x0000
+0x4000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0002
+0x2000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0110
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0110
+0x2000
+0x110f
+0x0000
+0x1000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0010
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_add.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_add.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_add.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0xc000
+0x0f11
+0x0000
+0xe000
+0x0f12
+0x0100
+0x2000
+0x0f13
+0x0000
+0x0000
+0x0f21
+0x0001
+0x0000
+0x0f02
+0x0001
+0x0400
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_rd.ldr	(revision 22)
@@ -0,0 +1,1590 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000e
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0001
+0x1000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x1000
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.sgl
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.sgl	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sgl_wr.sgl	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x1000
+0x0c00
+0x0000
+0x8100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_read.c	(revision 22)
@@ -0,0 +1,133 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+
+
+/*
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+*/
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+
+int p_sharc;
+int byte_offset;
+int no_of_lwords ;
+
+
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t get_lwords ;
+int return_code ;
+
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path (sis3100sharc)  SHARC_OFFSET    no_of_lwords \n", argv[0]);
+  return 1;
+  }
+
+
+
+if ((p_sharc=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+
+byte_offset  = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+
+if (no_of_lwords > MAX_NUMBER_LWORDS) 
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return 1;
+   }
+
+if ((byte_offset & 3) != 0) 
+  {
+     printf("SHARC_OFFSET has to be lword aligned (0x0, 0x4, 0x8 ...)\n");
+     return 1;
+   }
+
+    return_code = s3100_sharc_read(p_sharc, byte_offset, blt_data, no_of_lwords) ;
+
+   if (return_code < 0 )
+     {
+       printf("s3100_sharc_read:   return_code = 0x%08x\n", return_code );         
+     }
+    else
+     {
+       printf("s3100_sharc_read:   return_code = 0x%08x\n", return_code );         
+       get_lwords = return_code >> 2 ;
+       printf("s3100_sharc_read:   get_lwords  = 0x%08x\n", get_lwords ); 
+       for (i=0;(i)<get_lwords;i++)
+       {
+         printf("i = 0x%08x     Data = 0x%08x\n",i, blt_data[i]);   
+       }
+     }
+
+
+
+
+close(p_sharc);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sharc_write.c	(revision 22)
@@ -0,0 +1,138 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+
+
+
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x1000000  
+
+int p_sharc;
+int byte_offset;
+int no_of_lwords ;
+
+u_int32_t data ;
+
+
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+/* u_int32_t get_lwords ; */
+int return_code ;
+/*int error_cnt ; */
+/* int loop_cnt ; */
+/*int temp ; */
+
+
+
+if (argc<5)
+  {
+  fprintf(stderr, "usage: %s path (sis3100sharc) SHARC_OFFSET   no_of_lwords ( START-)DATA \n", argv[0]);
+  return 1;
+  }
+
+if ((p_sharc=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+byte_offset = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+data = strtoul(argv[4],NULL,0) ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS) 
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return 1;
+   }
+
+
+if ((byte_offset & 3) != 0) 
+  {
+     printf("SHARC_OFFSET has to be lword aligned (0x0, 0x4, 0x8 ...)\n");
+     return 1;
+   }
+
+
+/* fill w_data */
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          blt_data[i] = data + i ; 
+       }
+
+
+
+/* write */
+    return_code = s3100_sdram_write(p_sharc, byte_offset, blt_data, no_of_lwords) ;
+    if (return_code < 0) 
+      {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, byte_offset );         
+        return -1 ;
+      }
+
+
+
+
+ return 1 ;
+
+
+
+
+close(p_sharc);
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c	(revision 22)
@@ -0,0 +1,269 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "../../V2.02/dev/pci/sis1100_var.h"
+#include "../../V2.02/sis3100_calls/sis3100_vme_calls.h"
+
+
+/*
+#define swap_int(x) ((((x)>>24)&0x000000ff) |\
+                     (((x)>> 8)&0x0000ff00) |\
+                     (((x)<< 8)&0x00ff0000) |\
+                     (((x)<<24)&0xff000000))
+
+*/
+
+#define SHARCRAM  0x81200000
+#define D48REG    0x81300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int p_sharc;
+int offset ;
+u_int32_t data ;
+u_int32_t addr ;
+
+int return_code ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/*
+int i;
+char *dummy;
+*/
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path (sis1100)  path2 (sis3100sharc) Sharc.ldr  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+if ((p_sharc=open(argv[2], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+/* open SHARC loader file */
+/* loaderfile=fopen("led_test.ldr","r"); */
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[3],"r");
+
+
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+    
+ }
+ fclose(loaderfile);
+ 
+
+
+
+
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+/* load SHARC */
+
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x00000800)	 ; /* set DSP Control Enable Bit*/
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x01000000)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Offset = 0x%08x  Data = 0x%08x\n", offset, data);  
+
+
+
+
+  printf("loading SHARC DSP\n");
+  currentaddress=SHARCRAM;
+  while (loadcount<count) {  
+      addr = D48REG;
+      data = tempword[loadcount];
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      loadcount++;
+
+      addr = currentaddress;
+      data = ((tempword[loadcount+1] << 16 ) & 0xFFFF0000) + (tempword[loadcount] & 0x0000FFFF);
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      currentaddress+=4;
+      loadcount+=2;
+  }
+
+
+
+
+
+
+
+  printf("SHARC DSP loaded\n");
+ 
+/* 3. Run SHARC */
+
+  printf("starting SHARC DSP\n");
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x0100)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Addr = 0x%08x  Data = 0x%08x\n", addr, data);  
+
+  
+
+/* end load SHARC */
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+close(p);
+close(p_sharc);
+
+
+
+
+/*
+do
+{
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  req.addr=0x00000000;
+
+
+  for (i=0;i<0x8;i++)
+  {
+     if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;} 
+     if (i==2)   printf("\n");
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  printf("\n");
+
+
+
+   req.addr=0x00000040;
+  for (i=0;i<0x11;i++)
+  {
+      if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;}  
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  sleep(1);
+} while (0);
+*/
+
+close(p);
+close(p_sharc);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_load_sharc.c~	(revision 22)
@@ -0,0 +1,269 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "../../V1.0/linux-gnu/dev/pci/sis1100_var.h"
+#include "../../V1.0/linux-gnu/sis3100_calls/sis3100_vme_calls.h"
+
+
+/*
+#define swap_int(x) ((((x)>>24)&0x000000ff) |\
+                     (((x)>> 8)&0x0000ff00) |\
+                     (((x)<< 8)&0x00ff0000) |\
+                     (((x)<<24)&0xff000000))
+
+*/
+
+#define SHARCRAM  0x81200000
+#define D48REG    0x81300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int p_sharc;
+int offset ;
+u_int32_t data ;
+u_int32_t addr ;
+
+int return_code ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/*
+int i;
+char *dummy;
+*/
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path (sis1100)  path2 (sis3100sharc) Sharc.ldr  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+if ((p_sharc=open(argv[2], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+/* open SHARC loader file */
+/* loaderfile=fopen("led_test.ldr","r"); */
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[3],"r");
+
+
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+    
+ }
+ fclose(loaderfile);
+ 
+
+
+
+
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+/* load SHARC */
+
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x00000800)	 ; /* set DSP Control Enable Bit*/
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x01000000)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Offset = 0x%08x  Data = 0x%08x\n", offset, data);  
+
+
+
+
+  printf("loading SHARC DSP\n");
+  currentaddress=SHARCRAM;
+  while (loadcount<count) {  
+      addr = D48REG;
+      data = tempword[loadcount];
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      loadcount++;
+
+      addr = currentaddress;
+      data = ((tempword[loadcount+1] << 16 ) & 0xFFFF0000) + (tempword[loadcount] & 0x0000FFFF);
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      currentaddress+=4;
+      loadcount+=2;
+  }
+
+
+
+
+
+
+
+  printf("SHARC DSP loaded\n");
+ 
+/* 3. Run SHARC */
+
+  printf("starting SHARC DSP\n");
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x0100)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Addr = 0x%08x  Data = 0x%08x\n", addr, data);  
+
+  
+
+/* end load SHARC */
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+close(p);
+close(p_sharc);
+
+
+
+
+/*
+do
+{
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  req.addr=0x00000000;
+
+
+  for (i=0;i<0x8;i++)
+  {
+     if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;} 
+     if (i==2)   printf("\n");
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  printf("\n");
+
+
+
+   req.addr=0x00000040;
+  for (i=0;i<0x11;i++)
+  {
+      if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;}  
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  sleep(1);
+} while (0);
+*/
+
+close(p);
+close(p_sharc);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_sdram_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_sdram_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100_sdram_eeprom.c	(revision 22)
@@ -0,0 +1,437 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/*
+#define swap_int(x) ((((x)>>24)&0x000000ff) |\
+                     (((x)>> 8)&0x0000ff00) |\
+                     (((x)<< 8)&0x00ff0000) |\
+                     (((x)<<24)&0xff000000))
+
+*/
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p;
+int p_sharc;
+int offset ;
+u_int32_t data ;
+u_int32_t addr ;
+
+int return_code ;
+
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/*
+int i;
+char *dummy;
+*/
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s path (sis1100)  path2 (sis3100sharc)   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+if ((p_sharc=open(argv[2], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+
+
+
+
+
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+  addr = 0x40000400;
+
+/* write test */
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x90) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x31) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x91) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+
+
+
+
+/* sdram_eeprom_stop (p_sharc) ; */
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+/* sdram_eeprom_stop (p_sharc) ; */
+
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+  for (i=0;i<20;i++)
+   {
+     printf("i = %4d ", i * 8);      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x  ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x \n", data );      
+
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+
+
+
+
+
+
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+close(p);
+close(p_sharc);
+
+
+return 0;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = 0x40000400;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = 0x40000400;
+
+/* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+/*  printf("return_code = 0x%08x\n", return_code ); */
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100hiscal_load_flash.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100hiscal_load_flash.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100hiscal_load_flash.c	(revision 22)
@@ -0,0 +1,255 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/* #include "flash_prom.h" */
+#include "vme_sub_flashprom.h"
+
+
+
+#define FLASHPROM  0x01000000
+#define SHARCRAM   0x01200000
+#define D48REG     0x01300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int8_t read_data_8 ;
+u_int8_t data_8 ;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t  mod_base ;
+int return_code ;
+int error ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/* int flash_busy ; */
+
+/*
+int i;
+char *dummy;
+*/
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH %s Sharc.ldr   BASE_ADDR   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[3],NULL,0) ;
+
+
+
+
+addr = mod_base + 0x0 ;                    /* Version */
+
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return 1;}
+printf("\n");
+printf("\n");
+printf(" Version register:  0x%08x\n", data );
+printf("\n");
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x03000000) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+
+/*********************************************/
+/*                                           */
+/*   Clear Flashprom                         */
+/*                                           */
+/*                                           */
+/*********************************************/
+
+  printf("\n");
+  printf(" Clear Flashprom in process\n");
+  printf("\n");
+  clear_flashprom (p, mod_base + FLASHPROM) ;  
+  printf(" Clear Flashprom finished \n");
+  printf("\n");
+
+
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[2],"r");
+
+ 
+/* loaderfile=fopen("led_test.ldr","r");*/
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+ }
+ else
+ {
+   printf(" no loaderfile \n");
+   return 1 ;
+ }     
+
+
+ fclose(loaderfile);
+ 
+
+
+
+
+
+
+/* load SHARC */
+
+
+  printf("loading SHARC DSP\n");
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+
+  while (loadcount<count) {  
+/*    printf(" count = 0x%08x  loadcount = 0x%08x     data = 0x%08x \n", count, loadcount,tempword[loadcount]); */
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+  printf("SHARC DSP loaded\n");
+
+
+
+/* Verifier SHARC */
+/*  printf("loading SHARC DSP\n"); */
+  error = 0 ;
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+  while (loadcount<count) {  
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+
+  if (error != 0) {
+   close(p);
+   return -1 ;
+  }
+   else {
+    printf("Verifier OK \n"); 
+  }
+
+
+
+
+ 
+/* 3. Run SHARC */
+  printf("starting SHARC from Flashprom\n");
+
+
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x0300) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+ 
+
+close(p);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100sharc_read_flash.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100sharc_read_flash.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/sis3100sharc_read_flash.c	(revision 22)
@@ -0,0 +1,256 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/* #include "flash_prom.h" */
+#include "vme_sub_flashprom.h"
+
+
+
+#define FLASHPROM  0x01000000
+#define SHARCRAM   0x01200000
+#define D48REG     0x01300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int8_t read_data_8 ;
+u_int8_t data_8 ;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t  mod_base ;
+int return_code ;
+int error ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/* int flash_busy ; */
+
+/*
+int i;
+char *dummy;
+*/
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH %s Sharc.ldr   BASE_ADDR   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[3],NULL,0) ;
+
+
+
+
+addr = mod_base + 0x0 ;                    /* Version */
+
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return 1;}
+printf("\n");
+printf("\n");
+printf(" Version register:  0x%08x\n", data );
+printf("\n");
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x03000000) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+
+/*********************************************/
+/*                                           */
+/*   Clear Flashprom                         */
+/*                                           */
+/*                                           */
+/*********************************************/
+
+  printf("\n");
+  printf(" Clear Flashprom in process\n");
+  printf("\n");
+  clear_flashprom (p, mod_base + FLASHPROM) ;  
+  printf(" Clear Flashprom finished \n");
+  printf("\n");
+
+
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[2],"r");
+
+ 
+/* loaderfile=fopen("led_test.ldr","r");*/
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+ }
+ else
+ {
+   printf(" no loaderfile \n");
+   return 1 ;
+ }     
+
+
+ fclose(loaderfile);
+ 
+
+
+
+
+
+
+/* load SHARC */
+
+
+  printf("loading SHARC DSP\n");
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+
+  while (loadcount<count) {  
+/*    printf(" count = 0x%08x  loadcount = 0x%08x     data = 0x%08x \n", count, loadcount,tempword[loadcount]); */
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+  printf("SHARC DSP loaded\n");
+
+
+
+/* Verifier SHARC */
+/*  printf("loading SHARC DSP\n"); */
+  error = 0 ;
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+  while (loadcount<count) {  
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+
+  if (error != 0) {
+   close(p);
+   return -1 ;
+  }
+   else {
+    printf("Verifier OK \n"); 
+  }
+
+
+
+
+ 
+/* 3. Run SHARC */
+  printf("starting SHARC from Flashprom\n");
+
+
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x0300) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+ 
+
+close(p);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_brd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_brd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_brd.ldr	(revision 22)
@@ -0,0 +1,1716 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0038
+0x0100
+0x0002
+0x0001
+0x4000
+0x0c9c
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x0f03
+0x0000
+0x3140
+0x0f04
+0x1000
+0x0000
+0x0f05
+0x0000
+0x9000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0000
+0x0008
+0x142c
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8000
+0x56fe
+0x0000
+0x0008
+0x140c
+0xfff9
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0003
+0x0000
+0x0730
+0x0000
+0x8000
+0x56fe
+0xfff4
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfff1
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff6
+0x00ff
+0x0710
+0x0000
+0xc000
+0x1000
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffd6
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffd0
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffcd
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_rd.ldr	(revision 22)
@@ -0,0 +1,1602 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0012
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x0000
+0x0f03
+0x0001
+0x2000
+0x1103
+0x0000
+0x2000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0000
+0x2000
+0x0f02
+0x0009
+0x400a
+0x1102
+0x0001
+0x0100
+0x1004
+0x0004
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0009
+0x400a
+0x1102
+0xfffc
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sharc_test/vme_wr.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0x0004
+0x0000
+0x0f01
+0xffff
+0x0000
+0x0f02
+0x1234
+0x0000
+0x0f00
+0x0000
+0x0000
+0x0f04
+0x0000
+0x8280
+0x704f
+0x0001
+0x2000
+0x1100
+0x0049
+0x4002
+0x1105
+0x1551
+0x0000
+0x013e
+0x0552
+0x0004
+0x013e
+0x010b
+0x0002
+0x06be
+0xfffa
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/Makefile	(revision 22)
@@ -0,0 +1,53 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+
+.PHONY: all
+all: $(EXEC)
+
+
+sis3100_control_read: sis3100_control_read.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis3100_control_write: sis3100_control_write.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_sys_reset: vme_sys_reset.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_read.c	(revision 22)
@@ -0,0 +1,77 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int32_t offset ; 
+u_int32_t data ;
+int return_code ;
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s path vme_base_address  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+ 
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c	(revision 22)
@@ -0,0 +1,85 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+u_int32_t offset ; 
+u_int32_t data ;
+
+int return_code ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  addr  data \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+data       = strtoul(argv[3],NULL,0) ;
+
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/sis3100_control_write.c~	(revision 22)
@@ -0,0 +1,84 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+u_int32_t offset ; 
+u_int32_t data ;
+
+int return_code ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  addr  data \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+data       = strtoul(argv[3],NULL,0) ;
+
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/vme_sys_reset.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/vme_sys_reset.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/sis3100_control/vme_sys_reset.c	(revision 22)
@@ -0,0 +1,92 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+int offset ;
+u_int32_t data ;
+int return_code ;
+
+
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s path\n", argv[0]);
+  return 1;
+  }
+
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+
+  printf("set VME_RESET \n");
+  offset = 0x00000100;
+  data   = 0x00000002;
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+
+
+  usleep(500000);
+
+
+  offset = 0x00000100;
+  data   = 0x00020000;
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+  printf("clear VME_RESET \n");
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile	(revision 22)
@@ -0,0 +1,388 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+vme_read_irqack: vme_read_irqack.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d8: vme_read_d8.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d16: vme_read_d16.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+w_read_d16: w_read_d16.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d32: vme_read_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d8: vme_write_d8.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d16: vme_write_d16.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d32: vme_write_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_read_blt32: vme_read_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_write_blt32: vme_write_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+test: test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_fill_d32: vme_fill_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/Makefile~	(revision 22)
@@ -0,0 +1,385 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+vme_read_irqack: vme_read_irqack.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d8: vme_read_d8.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d16: vme_read_d16.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_read_d32: vme_read_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d8: vme_write_d8.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d16: vme_write_d16.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_write_d32: vme_write_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_read_blt32: vme_read_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_write_blt32: vme_write_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+test: test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_fill_d32: vme_fill_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+test.o: test.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_fill_d32.o: vme_fill_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_blt32.o: vme_read_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d16.o: vme_read_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d32.o: vme_read_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_d8.o: vme_read_d8.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_read_irqack.o: vme_read_irqack.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_blt32.o: vme_write_blt32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d16.o: vme_write_d16.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d32.o: vme_write_d32.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
+vme_write_d8.o: vme_write_d8.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../../sis3100_calls/sis3100_vme_calls.h
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/test.c	(revision 22)
@@ -0,0 +1,163 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/* 
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+
+int error_cnt ;
+*/
+
+
+
+
+static int getopts(int iargc, char* iargv[])
+{
+
+   extern char *optarg ;
+   extern int optind ;
+
+   const char* optstring="a:f:p";
+   int c, errflag = 0 ;
+   int  return_code ;
+
+   printf("iargc  = 0x%08x\n", iargc );
+   printf(" \n")  ;
+
+   return_code = -1 ;
+
+while (!errflag && ((c = getopt(iargc, iargv, optstring)) != -1)) {
+       switch (c) {
+         case 'a':
+                     printf("-a iargc = 0x%08x\n", iargc );
+                     printf("-a c     = 0x%08x\n", c );
+                     printf("-a       = 0x%08x\n", (strtoul(optarg,NULL,0)) );
+                     return_code = 0 ;
+   printf(" \n")  ;
+               break ;
+         case 'f':
+                     printf("-f iargc = 0x%08x\n", iargc );
+                     printf("-f c     = 0x%08x\n", c );
+                     printf("-f       = 0x%08x\n", (strtoul(optarg,NULL,0)) );
+                     return_code = 0 ;
+   printf(" \n")  ;
+               break ;
+        }   
+}
+return return_code ;
+
+}
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int i;
+
+int mod_base;
+int no_of_lwords ;
+int p;
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t put_lwords ;
+u_int32_t start_data ;
+
+int return_code ;
+int loop_counter ;
+
+ getopts(argc,argv) ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s  VME_BASE_ADDR  NO_OF_LWORDS  START_DATA [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+start_data   = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+
+/* test pattern (increment ) */
+   for (i=0; i<no_of_lwords; i++)   blt_data[i] = start_data + i ;
+
+   for (i=0; i < loop_counter; i++) {
+      return_code =   vme_A32BLT32_write(p, mod_base, blt_data, no_of_lwords, &put_lwords) ;
+   }
+
+   printf("vme_A32BLT32_write:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_write:   put_lwords  = 0x%08x\n", put_lwords ); 
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_fill_d32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_fill_d32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_fill_d32.c	(revision 22)
@@ -0,0 +1,85 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base, no_of_data, i;
+u_int32_t data ;
+int return_code ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  VME_BASE_ADDR  NO_OF_DATAs  VME_WRITE_DATA  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[2],NULL,0) ;
+no_of_data = strtoul(argv[3],NULL,0) ;
+data       = strtoul(argv[4],NULL,0) ;
+
+
+ for(i=0;i<no_of_data;i++) { ;
+   return_code =  vme_A32D32_write(p, mod_base+(4*i), data ) ;
+ }
+
+   printf("vme_A32D32_write:   return_code = 0x%08x\n", return_code );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_blt32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_blt32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_blt32.c	(revision 22)
@@ -0,0 +1,125 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/*
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+*/
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int p;
+int mod_base;
+int no_of_lwords ;
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t get_lwords ;
+int return_code ;
+int loop_counter ;
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH  VME_BASE_ADDR  NO_OF_LWORDS [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+/* open VME */
+/*
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+*/
+mod_base     = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>4) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+for (i=0; i < loop_counter; i++) {
+   return_code =   vme_A32BLT32_read(p, mod_base, blt_data, no_of_lwords, &get_lwords) ;
+ }
+
+
+
+   printf("vme_A32BLT32_read:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_read:   get_lwords  = 0x%08x\n", get_lwords );
+
+   for (i=0;(i)<get_lwords;i++)
+    {
+      printf("i = 0x%08x     Data = 0x%08x\n",i, blt_data[i]);
+    }
+
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d16.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d16.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d16.c	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int16_t data16 ;
+int return_code ;
+int loop_counter ;
+
+    struct sis1100_ctrl_reg reg;
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+mod_base     = strtoul(argv[2],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+do {
+  return_code =  vme_A32D16_read(p, mod_base, &data16 ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D16_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D16_read:   data = 0x%04x\n", data16 );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d32.c	(revision 22)
@@ -0,0 +1,100 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int32_t data ;
+int return_code ;
+int loop_counter ;
+
+    struct sis1100_ctrl_reg reg;
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+mod_base     = strtoul(argv[2],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+
+do {
+  return_code =  vme_A32D32_read(p, mod_base, &data ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D32_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D32_read:   data = 0x%08x\n", data );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d8.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d8.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_d8.c	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int8_t data8 ;
+int return_code ;
+int loop_counter ;
+
+    struct sis1100_ctrl_reg reg;
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+mod_base     = strtoul(argv[2],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+do {
+  return_code =  vme_A32D8_read(p, mod_base, &data8 ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D8_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D8_read:   data8 = 0x%02x\n", data8 );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_irqack.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_irqack.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_read_irqack.c	(revision 22)
@@ -0,0 +1,100 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int irq_level;
+u_int8_t data_8 ;
+int return_code ;
+int loop_counter ;
+
+    struct sis1100_ctrl_reg reg;
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  IRQ_LEVEL   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+irq_level     = strtoul(argv[2],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+ 
+do {
+  return_code =  vme_IACK_D8_read(p, irq_level, &data_8 ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D32_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D32_read:   irq vector  = 0x%02x\n", data_8 );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_blt32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_blt32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_blt32.c	(revision 22)
@@ -0,0 +1,121 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/* 
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+
+int error_cnt ;
+*/
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int i;
+
+int mod_base;
+int no_of_lwords ;
+int p;
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t put_lwords ;
+u_int32_t start_data ;
+
+int return_code ;
+int loop_counter ;
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s  VME_BASE_ADDR  NO_OF_LWORDS  START_DATA [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+start_data   = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+
+/* test pattern (increment ) */
+   for (i=0; i<no_of_lwords; i++)   blt_data[i] = start_data + i ;
+
+   for (i=0; i < loop_counter; i++) {
+      return_code =   vme_A32BLT32_write(p, mod_base, blt_data, no_of_lwords, &put_lwords) ;
+   }
+
+   printf("vme_A32BLT32_write:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_write:   put_lwords  = 0x%08x\n", put_lwords ); 
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d16.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d16.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d16.c	(revision 22)
@@ -0,0 +1,93 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+
+u_int16_t data16 ;
+
+int return_code ;
+int loop_counter ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  VME_BASE_ADDR  VME_WRITE_DATA  loop_counter \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[2],NULL,0) ;
+data16     = strtoul(argv[3],NULL,0) ;
+printf("vme_A32D16_write:   data16 = 0x%04x\n", data16 );
+
+
+loop_counter  = 1 ;
+
+if (argc>4) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+do {
+   return_code =  vme_A32D16_write(p, mod_base, data16 ) ;
+   loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+   printf("vme_A32D16_write:   return_code = 0x%08x\n", return_code );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d32.c	(revision 22)
@@ -0,0 +1,89 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int32_t data ;
+int return_code ;
+int loop_counter ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  VME_BASE_ADDR  VME_WRITE_DATA  loop_counter \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[2],NULL,0) ;
+data       = strtoul(argv[3],NULL,0) ;
+
+loop_counter  = 1 ;
+
+if (argc>4) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+do {
+   return_code =  vme_A32D32_write(p, mod_base, data ) ;
+   loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+   printf("vme_A32D32_write:   return_code = 0x%08x\n", return_code );         
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d8.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d8.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/vme_write_d8.c	(revision 22)
@@ -0,0 +1,90 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int8_t data8 ;
+int return_code ;
+int loop_counter ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  VME_BASE_ADDR  VME_WRITE_DATA  loop_counter \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[2],NULL,0) ;
+data8      = strtoul(argv[3],NULL,0) ;
+printf("vme_A32D8_write:   data8 = 0x%02x\n", data8 );
+
+loop_counter  = 1 ;
+
+if (argc>4) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+do {
+   return_code =  vme_A32D8_write(p, mod_base, data8 ) ;
+   loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+   printf("vme_A32D8_write:   return_code = 0x%08x\n", return_code );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c	(revision 22)
@@ -0,0 +1,102 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int16_t data16=0 ;
+int return_code ;
+int loop_counter ;
+
+/*    struct sis1100_ctrl_reg reg; */
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	printf("error on opening VME environment: %s\n", argv[1]);
+	perror("open");
+	return 1;
+}
+ printf("VME dp: %d\n", p);
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+mod_base     = strtoul(argv[2],NULL,0) ;
+ printf("argv[2] = %s, mod_base = 0x%08x\n", argv[2], mod_base);
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+do {
+  return_code =  vme_A32D16_read(p, mod_base, &data16 ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+ printf("vme_A32D16_read: addr: 0x%08x  return_code = 0x%08x\n", mod_base, return_code );
+printf("vme_A32D16_read:   data = 0x%04x\n", data16 );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/examples/vme_simple_routines/w_read_d16.c~	(revision 22)
@@ -0,0 +1,101 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int16_t data16 ;
+int return_code ;
+int loop_counter ;
+
+/*    struct sis1100_ctrl_reg reg; */
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s  path  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	printf("error on opening VME environment: %s\n", argv[1]);
+	perror("open");
+	return 1;
+}
+ printf("VME dp: %d\n", p);
+
+
+/* open VME */
+/*   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {     */
+/*     printf("error on opening VME environment (/tmp/sis1100)\n");  */
+/*     return -1;  */
+/*   }           */
+
+mod_base     = strtoul(argv[2],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[3],NULL,0) ;
+
+
+do {
+  return_code =  vme_A32D16_read(p, mod_base, &data16 ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D16_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D16_read:   data = 0x%04x\n", data16 );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Entries	(revision 22)
@@ -0,0 +1,12 @@
+/bin2mcs.c/1.1/Sat Aug 30 21:23:16 2003//
+/jtag_debug.c/1.1/Sat Aug 30 21:23:17 2003//
+/jtag_ids.c/1.1/Sat Aug 30 21:23:17 2003//
+/jtag_read.c/1.1/Sat Aug 30 21:23:18 2003//
+/jtag_tools.c/1.3/Mon Sep  1 10:48:29 2003//
+/jtag_tools.h/1.1/Sat Aug 30 21:23:19 2003//
+/jtag_write.c/1.3/Mon Sep  1 10:48:29 2003//
+/mcs2bin.c/1.1/Sat Aug 30 21:23:21 2003//
+/mcs2bin2.c/1.1/Sat Aug 30 21:23:22 2003//
+/Makefile/1.3/Tue Sep 30 09:03:38 2003//
+D/files////
+D/willi////
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/jtag_tools
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/Makefile	(revision 22)
@@ -0,0 +1,27 @@
+# $ZEL: Makefile,v 1.3 2003/09/30 09:03:38 wuestner Exp $
+
+CC           := gcc
+
+DRIVER       := sis1100
+IONAME       := $(shell echo $(DRIVER) | tr '[:lower:]' '[:upper:]')
+
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat -Werror
+#                -Wuninitialized
+DRIVERBASE   := ../
+DRIVERINCLUDE:= $(DRIVERBASE)
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I. -DDRIVER=$(DRIVER) -DIONAME=$(IONAME)
+CFLAGS       := -g -ansi $(WFLAGS)
+
+.PHONY: all
+all: jtag_ids jtag_read jtag_write bin2mcs mcs2bin
+
+jtag_ids: jtag_ids.c jtag_tools.c jtag_debug.c
+
+jtag_read: jtag_read.c jtag_tools.c jtag_debug.c
+
+jtag_write: jtag_write.c jtag_tools.c jtag_debug.c
+
+clean:
+	rm -f *.o core $(EXEC)
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/bin2mcs.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/bin2mcs.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/bin2mcs.c	(revision 22)
@@ -0,0 +1,89 @@
+/*
+ * $ZEL: bin2mcs.c,v 1.1 2003/08/30 21:23:16 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+static int
+write_line(FILE* out, u_int8_t* b, int l)
+{
+    int8_t ck=0;
+    int i;
+
+    for (i=0; i<l; i++) ck-=b[i];
+    b[l++]=ck;
+    fprintf(out, ":");
+    for (i=0; i<l; i++) fprintf(out, "%02X", b[i]);
+    fprintf(out, "\n");
+    return 0;
+}
+
+static int
+write_addr(FILE* out, u_int32_t addr)
+{
+    u_int8_t b[7];
+    b[0]=2;
+    b[1]=b[2]=0;
+    b[3]=4;
+    b[4]=(addr>>8);
+    b[5]=addr&0xff;
+    write_line(out, b, 6);
+    return 0;
+}
+
+static int
+write_end(FILE* out)
+{
+    u_int8_t b[5];
+    b[0]=b[1]=b[2]=0;
+    b[3]=1;
+    write_line(out, b, 4);
+    return 0;
+}
+
+static int
+write_data(FILE* out, u_int32_t addr, u_int8_t* b, int l)
+{
+    b[0]=l;
+    b[1]=(addr>>8);
+    b[2]=addr&0xff;
+    b[3]=0;
+    write_line(out, b, l+4);
+    return 0;
+}
+
+static int
+bin2mcs(int in, FILE* out)
+{
+    u_int32_t addr=0;
+    u_int8_t buf[21];
+    int res;
+
+    do {
+        if (!(addr&0xffff)) {
+            write_addr(out, addr>>16);
+        }
+        res=read(in, buf+4, 16);
+        if (res>0) write_data(out, addr&0xffff, buf, res);
+        addr+=res;
+    } while (res>0);
+    write_end(out);
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    fprintf(stderr, "\n==== bin to MCS converter; V0.1 ====\n\n");
+
+    bin2mcs(0, stdout);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_debug.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_debug.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_debug.c	(revision 22)
@@ -0,0 +1,79 @@
+/*
+ * $ZEL: jtag_debug.c,v 1.1 2003/08/30 21:23:17 wuestner Exp $
+ */
+
+#include "jtag_tools.h"
+
+enum tap_state {
+    TEST_LOGIC_RESET,
+    RUN_TEST_IDLE,
+    SELECT_DR_SCAN,
+    CAPTURE_DR,
+    SHIFT_DR,
+    EXIT1_DR,
+    PAUSE_DR,
+    EXIT2_DR,
+    UPDATE_DR,
+    SELECT_IR_SCAN,
+    CAPTURE_IR,
+    SHIFT_IR,
+    EXIT1_IR,
+    PAUSE_IR,
+    EXIT2_IR,
+    UPDATE_IR,
+};
+
+static const char* tap_names[16]={
+    "TEST_LOGIC_RESET",
+    "RUN_TEST_IDLE",
+    "SELECT_DR_SCAN",
+    "CAPTURE_DR",
+    "SHIFT_DR",
+    "EXIT1_DR",
+    "PAUSE_DR",
+    "EXIT2_DR",
+    "UPDATE_DR",
+    "SELECT_IR_SCAN",
+    "CAPTURE_IR",
+    "SHIFT_IR",
+    "EXIT1_IR",
+    "PAUSE_IR",
+    "EXIT2_IR",
+    "UPDATE_IR",
+};
+
+static enum tap_state tap_trans[16][2]= {
+    /*TEST_LOGIC_RESET*/ {RUN_TEST_IDLE, TEST_LOGIC_RESET},
+    /*RUN_TEST_IDLE   */ {RUN_TEST_IDLE, SELECT_DR_SCAN},
+    /*SELECT_DR_SCAN  */ {CAPTURE_DR, SELECT_IR_SCAN},
+    /*CAPTURE_DR      */ {SHIFT_DR, EXIT1_DR},
+    /*SHIFT_DR        */ {SHIFT_DR, EXIT1_DR},
+    /*EXIT1_DR        */ {PAUSE_DR, UPDATE_DR},
+    /*PAUSE_DR        */ {PAUSE_DR, EXIT2_DR},
+    /*EXIT2_DR        */ {SHIFT_DR, UPDATE_DR},
+    /*UPDATE_DR       */ {RUN_TEST_IDLE, SELECT_DR_SCAN},
+    /*SELECT_IR_SCAN  */ {CAPTURE_IR, TEST_LOGIC_RESET},
+    /*CAPTURE_IR      */ {SHIFT_IR, EXIT1_IR},
+    /*SHIFT_IR        */ {SHIFT_IR, EXIT1_IR},
+    /*EXIT1_IR        */ {PAUSE_IR, UPDATE_IR},
+    /*PAUSE_IR        */ {PAUSE_IR, EXIT2_IR},
+    /*EXIT2_IR        */ {SHIFT_IR, UPDATE_IR},
+    /*UPDATE_IR       */ {RUN_TEST_IDLE, SELECT_DR_SCAN},
+};
+
+static enum tap_state currentstate=TEST_LOGIC_RESET;
+static int counter=0;
+
+const char*
+newstate(int tms, int* count)
+{
+    enum tap_state new_state;
+    new_state=tap_trans[currentstate][!!tms];
+    if (new_state==currentstate)
+        counter++;
+    else
+        counter=0;
+    currentstate=new_state;
+    *count=counter;
+    return tap_names[new_state];
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_ids.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_ids.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_ids.c	(revision 22)
@@ -0,0 +1,47 @@
+/*
+ * $ZEL: jtag_ids.c,v 1.1 2003/08/30 21:23:17 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include "jtag_tools.h"
+
+int main(int argc, char* argv[])
+{
+    struct jtag_tab jtab={.num_devs=0, .devs=0};
+    int p;
+
+    debug=0;
+
+    fprintf(stderr, "\n==== SIS1100 JTAG Test; V0.1 ====\n\n");
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s pathname\n", argv[0]);
+        return 1;
+    }
+
+    p=open(argv[1], O_RDWR, 0);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+    jtab.p=p;
+
+    if ((jtag_init(&jtab))<=0) {
+        fprintf(stderr, "no JTAG chain found\n");
+        return 2;
+    }
+
+    jtag_print_ids(&jtab);
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_read.c	(revision 22)
@@ -0,0 +1,153 @@
+/*
+ * $ZEL: jtag_read.c,v 1.1 2003/08/30 21:23:18 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#include "jtag_tools.h"
+
+#ifndef MAP_VARIABLE
+#define MAP_VARIABLE 0x0000
+#endif
+
+static const char* device_name;
+static const char* file_name;
+static int chip_index;
+
+static void
+printhelp(const char* progname)
+{
+    fprintf(stderr, "usage: %s [-h] [-d [-d ...]] [-s] [-c chip_idx] [-f filename] "
+            "device\n",
+            progname);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="hdc:f:s";
+
+    optarg=0; errflag=0;
+    debug=0;
+    device_name=0;
+    file_name=0;
+    chip_index=-1;
+    simulate=0;
+
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': errflag++; break;
+        case 'd': debug++; break;
+        case 's': simulate++; break;
+        case 'c': {
+                char* end;
+                chip_index=strtol(optarg, &end, 0);
+                if (*end) {
+                    fprintf(stderr, "cannot convert %s\n", optarg);
+                    errflag++;
+                }
+            }
+            break;
+        case 'f': file_name=optarg; break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || ((argc-optind)!=1) || !file_name || (chip_index<0)) {
+        printhelp(argv[0]);
+        return -1;
+    }
+
+    device_name=argv[optind];
+    if (simulate) debug++;
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    struct jtag_tab jtab={.num_devs=0, .devs=0};
+    void* mp;
+    int p, size;
+    char null=0;
+
+    fprintf(stderr, "\n==== SIS1100 JTAG Read; V0.1 ====\n\n");
+
+    if (getoptions(argc, argv)<0) return 1;
+
+    jtab.p=open(device_name, O_RDWR, 0);
+    if (jtab.p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", device_name, strerror(errno));
+        return 1;
+    }
+
+    if ((jtag_init(&jtab))<=0) {
+        fprintf(stderr, "no JTAG chain found\n");
+        close(jtab.p);
+        return 2;
+    }
+
+    jtag_print_ids(&jtab);
+
+    if (chip_index>=jtab.num_devs) {
+        fprintf(stderr, "illegal device index (%d)\n", chip_index);
+        close(jtab.p);
+        return 1;
+    }
+
+    switch (jtab.devs[chip_index].id&0x0fffffff) {
+        case ID_XC18V01: size=0x20000; break;
+        case ID_XC18V02: size=0x40000; break;
+        case ID_XC18V04: size=0x80000; break;
+        default:
+            fprintf(stderr, "wrong device: %s\n", jtab.devs[chip_index].name);
+            close(jtab.p);
+            return 1;
+    }
+
+    p=open(file_name, O_RDWR|O_CREAT|O_TRUNC/*|O_EXCL*/, 0644);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", file_name, strerror(errno));
+        close(jtab.p);
+        return 1;
+    }
+
+    if (pwrite(p, &null, 1, size-1)!=1) {
+        fprintf(stderr, "cannot write to \"%s\": %s\n",
+                file_name, strerror(errno));
+        close(p);
+        close(jtab.p);
+        return 1;
+    }
+
+    mp=mmap(0, size, PROT_READ|PROT_WRITE,
+            MAP_VARIABLE|MAP_FILE|MAP_SHARED, p, 0);
+    if (mp==MAP_FAILED) {
+        fprintf(stderr, "cannot mmap \"%s\": %s\n",
+                file_name, strerror(errno));
+        close(p);
+        close(jtab.p);
+        return -1;
+    }
+
+    jtag_read_XC18V00(jtab.devs+chip_index, mp, size);
+
+    munmap(mp, size);
+    close(p);
+
+    close(jtab.p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.c	(revision 22)
@@ -0,0 +1,543 @@
+/*
+ * $ZEL: jtag_tools.c,v 1.3 2003/09/01 10:48:29 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#define __CONCAT(x,y)	x ## y
+#define __CC(x, y) __CONCAT(x,y)
+#define __CONCAT3(x,y,z) __CC(x, __CC(y,z))
+#define __STRING(x)	#x
+#define __SS(s) __STRING(s)
+
+#include __SS(__CONCAT3(../dev/pci/, DRIVER, _var.h))
+#include "jtag_tools.h"
+
+int debug;
+int simulate;
+
+#define __CONCAT(x,y)	x ## y
+#define __STRING(x)	#x
+#define __SS(s) __STRING(s)
+#define JTAG_DEV(vendor, name, ir_len) { \
+    __CONCAT(VID_, vendor),              \
+    __CONCAT(DID_, name),                \
+    ir_len,                              \
+    __SS(name)                           \
+}
+#define JTAG_DEV_END(name) {             \
+    0, 0, -1, __SS(name)                 \
+}
+
+static const struct jtag_devdata jtag_devdata[]={
+    JTAG_DEV(XILINX, XC18V01, 8),
+    JTAG_DEV(XILINX, XC18V02, 8),
+    JTAG_DEV(XILINX, XC18V04, 8),
+    JTAG_DEV(XILINX, XCV150 , 5),
+    JTAG_DEV(XILINX, XCV400 , 5),
+    JTAG_DEV_END(unknown device)
+};
+
+/****************************************************************************/
+static int
+find_jtag_devicedata(struct jtag_dev* dev)
+{
+    const struct jtag_devdata* d=jtag_devdata;
+    while (d->vendor_id) {
+        u_int32_t id=(d->part_id<<12)|(d->vendor_id<<1)|0x1;
+        if ((dev->id&0x0fffffff)==id) {
+            dev->name=d->name;
+            dev->ir_len=d->ir_len;
+            dev->version=(dev->id>>28)&0xf;
+            return 0;
+        }
+        d++;
+    }
+    dev->name=d->name;
+    dev->ir_len=d->ir_len;
+    return 1;
+}
+
+void
+clear_jtag_tab(struct jtag_tab* tab)
+{
+    free(tab->devs);
+    tab->num_devs=0;
+}
+
+static int
+add_jtag_device(struct jtag_tab* tab, u_int32_t id)
+{
+    int i;
+    struct jtag_dev* help=malloc((tab->num_devs+1)*sizeof(struct jtag_dev));
+    if (!help) {
+        fprintf(stderr, "alloc %d bytes: %s\n",
+            (tab->num_devs+1)*sizeof(struct jtag_dev),
+            strerror(errno));
+        return -1;
+    }
+    for (i=tab->num_devs; i>0; i--) help[i]=tab->devs[i-1];
+    help[0].id=id;
+    free(tab->devs);
+    tab->devs=help;
+    tab->num_devs++;
+    tab->devs[0].chain=tab;
+    return find_jtag_devicedata(tab->devs);
+}
+/****************************************************************************/
+static int
+jt_putcsr(struct jtag_tab* jdev, u_int32_t v, const char* q, int s)
+{
+    const char* state;
+    int p=jdev->p;
+    int count;
+
+    if (!s) {
+        if (ioctl(p, __CC(IONAME, _JTAG_PUT), &v)<0) {
+            fprintf(stderr, "ioctl(JTAG_PUT, 0x%x): %s\n", v, strerror(errno));
+            return -1;
+        }
+    }
+
+    state=newstate(v&TMS, &count);
+    if (debug)
+        fprintf(stderr, "put %s %s %s: %s %2d\n",
+                v&TMS?"TMS":"   ", v&TDI?"TDI":"   ", q,
+                state, count);
+    return 0;
+}
+
+static u_int32_t
+jt_getcsr(struct jtag_tab* jdev, int s)
+{
+    u_int32_t v;
+    int p=jdev->p;
+
+    if (!s) {
+        if (ioctl(p, __CC(IONAME, _JTAG_GET), &v)<0) {
+            fprintf(stderr, "ioctl(JTAG_GET): %s\n", strerror(errno));
+            return -1;
+        }
+    } else {
+        v=0;
+    }
+    if (debug)
+        fprintf(stderr, "got %s %s\n", v&TDO?"TDO":"   ", v&TDI?"TDI":"   ");
+    return v;
+}
+
+static u_int32_t
+jt_data(struct jtag_tab* jdev, int s)
+{
+    u_int32_t v;
+    int p=jdev->p;
+
+    if (!s) {
+        if (ioctl(p, __CC(IONAME, _JTAG_DATA), &v)<0) {
+            fprintf(stderr, "ioctl(JTAG_DATA): %s\n", strerror(errno));
+            return -1;
+        }
+    }
+    if (debug)
+        fprintf(stderr, "got data: 0x%08x\n", v);
+    return v;
+}
+/****************************************************************************/
+static u_int32_t
+jtag_data(struct jtag_dev* dev, u_int32_t din, int len, int s)
+{
+    struct jtag_tab* jdev=dev->chain;
+    u_int32_t tdo, xtdo, ms, ms1;
+    int i;
+
+    if (debug) fprintf(stderr, "data(0x%x, %d)\n", din, len);
+
+    jt_putcsr(jdev, JT_C|TMS|TDI, "d_", s);
+    jt_putcsr(jdev, JT_C|TDI, "d_", s);
+    jt_putcsr(jdev, JT_C|TDI, "d_", s);			/* SHIFT-DR */
+    
+    for (i=dev->pre_d_bits; i>0; i--) {
+        jt_putcsr(jdev, JT_C|TDI, "d-", s);
+    }
+    ms=0; tdo=0; xtdo=1;
+    ms1=dev->after_d_bits?0:TMS;
+    for (i=len-1; i>=0; i--) {
+        tdo|=(jt_getcsr(jdev, s)&TDO)?xtdo:0; xtdo<<=1;
+        if (!i) ms=ms1;
+        jt_putcsr(jdev, JT_C|ms|(din&TDI), "d+", s);/*does only work if TDI==0x1*/
+        din>>=1;
+    }
+    for (i=dev->after_d_bits-1; i>=0; i--) {
+        if (!i) ms=TMS;
+        jt_putcsr(jdev, JT_C|ms|TDI, "d-", s);
+    }
+
+    jt_putcsr(jdev, JT_C|TMS|TDI, "d_", s);
+    jt_putcsr(jdev, JT_C|TDI, "d_", s);	/* state RTI */
+    return tdo;
+}
+/****************************************************************************/
+static int
+jtag_rd_data(struct jtag_dev* dev, void *buf, int len, int s)
+{
+    struct jtag_tab* jdev=dev->chain;
+    int i, j;
+
+    if (len == 0) {
+        if (jdev->state == 1) {
+            jt_putcsr(jdev, JT_C|TMS|TDI, "r_", s);
+            jt_putcsr(jdev, JT_C|TMS|TDI, "r_", s);
+            jt_putcsr(jdev, JT_C|TDI, "r_", s);
+            jdev->state=0;                          /* state RTI */
+        }
+        return 0;
+    }
+
+    if (jdev->state == 0) {
+        jt_putcsr(jdev, JT_C|TMS|TDI, "r_", s);
+        jt_putcsr(jdev, JT_C|TDI, "r_", s);         /* CAPTURE-DR */
+
+        for (i=dev->pre_d_bits; i>0; i--) {
+            jt_putcsr(jdev, JT_C|TDI, "d-", s);
+        }
+        jdev->state=1;
+    }
+
+    for (i=(len+3)/4; i; i--) {
+        for (j=32; j; j--) jt_putcsr(jdev, JT_C|TDI, "r+", s);
+        *((u_int32_t*)buf)++ =jt_data(jdev, s);
+    }
+    return 0;
+}
+/****************************************************************************/
+static int
+jtag_wr_data(struct jtag_dev* dev, void *buf,
+    u_int len,      /* Anzahl Byte */
+    int	state,	    /* -1: end     */
+    int s)
+{
+    struct jtag_tab* jdev=dev->chain;
+    u_int32_t *bf, din;
+    u_int8_t ms, ms1;
+    int i;
+
+    bf=(u_int32_t*)buf;
+    len >>=2;
+    if (len ==0) return 0;
+
+    jt_putcsr(jdev, JT_C|TMS|TDI, "w_", s);
+    jt_putcsr(jdev, JT_C|TDI, "w_", s);
+    jt_putcsr(jdev, JT_C|TDI, "w_", s);
+
+
+    for (i=dev->pre_d_bits; i>0; i--) {
+        jt_putcsr(jdev, JT_C|TDI, "w-", s);
+    }
+
+    ms=0;
+    ms1=dev->after_d_bits?0:TMS;
+    while (len) {
+        din=*bf++;
+        for (i=31; i>=0; i--) {
+            if ((len==0) && !i) ms=ms1;
+            jt_putcsr(jdev, JT_C|ms|(din&TDI), "w+", s);
+            din>>=1;
+        }
+        len--;
+    }
+
+    for (i=dev->after_d_bits-1; i>=0; i--) {
+        if (!i) ms=TMS;
+        jt_putcsr(jdev, JT_C|TDI|ms, "w-", s);
+    }
+
+    if (state < 0) {
+        jt_putcsr(jdev, JT_C|TMS|TDI, "w.", s);
+        jt_putcsr(jdev, JT_C|TDI, "w.", s);
+        jdev->state=0;
+    }
+
+    return 0;
+}
+/****************************************************************************/
+int
+jtag_init(struct jtag_tab* jdev)
+{
+    int i, bits;
+    u_int32_t id;
+
+    if (debug) fprintf(stderr, "init\n");
+    clear_jtag_tab(jdev);
+    jdev->state=0;              /* RTI state when function returns */
+
+    for (i=0; i<5; i++) {           /* TLR state, ID DR wird selectiert */
+        jt_putcsr(jdev, JT_C|TMS, "ii", 0);
+    }
+    jt_putcsr(jdev, JT_C, "ii", 0);             /* RTI state */
+
+/* RTI (Run-Test/Idle) */
+
+    jt_putcsr(jdev, JT_C|TMS, "ii", 0);             /* Select DR */
+    jt_putcsr(jdev, JT_C, "ii", 0);                 /* Capture DR */
+
+    do {
+        for (i=0; i<32; i++) {  /*  shift DR */
+            jt_putcsr(jdev, JT_C, "i+", 0);
+        }
+        id=jt_data(jdev, 0);
+        if (id) {
+            int res;
+            res=add_jtag_device(jdev, id);
+            if (res<0) break;
+            if (res>0) jdev->state=-1; /* ir_len for device not known */
+        }
+    } while (id);
+
+    jt_putcsr(jdev, JT_C|TMS, "ii", 0);             /* Exit1 DR */
+    jt_putcsr(jdev, JT_C|TMS, "ii", 0);             /* Update DR */
+    jt_putcsr(jdev, JT_C, "ii", 0);                 /* RTI state */
+
+    if (jdev->state) goto raus;
+
+    for (i=0, bits=0; i<jdev->num_devs; i++) {
+        struct jtag_dev* dev=jdev->devs+i;
+        dev->pre_d_bits=jdev->num_devs-i-1;
+        dev->after_d_bits=i;
+        dev->after_c_bits=bits;
+        bits+=dev->ir_len;
+    }
+    for (i=jdev->num_devs-1, bits=0; i>=0; i--) {
+        struct jtag_dev* dev=jdev->devs+i;
+        dev->pre_c_bits=bits;
+        bits+=dev->ir_len;
+    }
+
+raus:
+    return jdev->num_devs;
+}
+/****************************************************************************/
+void
+jtag_print_ids(struct jtag_tab* jtab)
+{
+    int i;
+
+    fprintf(stderr, "JTAG chain\n");
+    fprintf(stderr, "-----------\n"); jtab->state=0;
+    for (i=0; i<jtab->num_devs; i++) {
+        struct jtag_dev* dev=jtab->devs+i;
+        fprintf(stderr, "%2d: 0x%08x %-8s  Version %d\n",
+                i,
+                dev->id, dev->name, dev->version);
+    }
+    fprintf(stderr, "\n");
+}
+/****************************************************************************/
+static int
+jtag_instruction(struct jtag_dev* dev, u_int32_t icode, int s)
+{
+    struct jtag_tab* jdev=dev->chain;
+    u_int32_t tdo, xtdo, ms, ms1;
+    int i;
+
+    if (debug) fprintf(stderr, "instruction(0x%x)\n", icode);
+
+    jt_putcsr(jdev, JT_C|TMS|TDI, "c_", s);
+    jt_putcsr(jdev, JT_C|TMS|TDI, "c_", s);
+    jt_putcsr(jdev, JT_C|TDI, "c_", s);
+    jt_putcsr(jdev, JT_C|TDI, "c_", s);
+
+    for (i=dev->pre_c_bits; i>0; i--) {
+        jt_putcsr(jdev, JT_C|TDI, "c-", s);
+    }
+    ms=0; tdo=0; xtdo=1;
+    ms1=dev->after_c_bits?0:TMS;
+    for (i=dev->ir_len-1; i>=0; i--) {
+        tdo|=(jt_getcsr(jdev, s)&TDO)?xtdo:0; xtdo<<=1;
+        if (!i) ms=ms1;
+        jt_putcsr(jdev, JT_C|ms|(icode&TDI), "c+", s);/*does only work if TDI==0x1*/
+        icode>>=1;
+    }
+    for (i=dev->after_c_bits-1; i>=0; i--) {
+        if (!i) ms=TMS;
+        jt_putcsr(jdev, JT_C|ms|TDI, "c-", s);
+    }
+    if (icode == CONFIG) { sleep(1); printf("2\n"); }
+
+    jt_putcsr(jdev, JT_C|TMS|TDI, "c_", s);
+    if (icode == CONFIG) { sleep(1); printf("1\n"); }
+
+    jt_putcsr(jdev, JT_C|TDI, "c_", s);
+    if (icode == CONFIG) { sleep(1); printf("0\n"); }
+
+    return tdo;
+}
+/****************************************************************************/
+int
+jtag_read_XC18V00(struct jtag_dev* dev, void* data, int size)
+{
+    struct jtag_tab* jdev=dev->chain;
+    u_int32_t dout, size0;
+    int ret, i;
+    int s=0;
+
+    if (jdev->state) {
+        fprintf(stderr, "jtag_tab.state=%d\n", jdev->state);
+        return -1;
+    }
+
+    fprintf(stderr, "reading device %s\n", dev->name);
+    switch (dev->id&0x0fffffff) {
+        case ID_XC18V01: size0=0x20000; break;
+        case ID_XC18V02: size0=0x40000; break;
+        case ID_XC18V04: size0=0x80000; break;
+        default: fprintf(stderr, "wrong device: %s\n", dev->name); return -1;
+    }
+    if ((ret=jtag_instruction(dev, IDCODE, s)) < 0) {
+        fprintf(stderr, "JTAG not initialized\n");
+        return -1;
+    }
+
+    dout=jtag_data(dev, -1, 32, s);
+
+    if (((dout&0x0fffffff)!=dev->id)&&!s) {
+        fprintf(stderr, "wrong IDCODE: %08X\n", dout);
+        return -1;
+    }
+
+    if (size!=size0) {
+        fprintf(stderr, "wrong buffersize\n");
+        return -1;
+    }
+
+    jtag_instruction(dev, ISPEN, s);
+    jtag_data(dev, 0x34, 6, s);
+    ret=jtag_instruction(dev, FADDR, s);
+    if ((ret!=0x11)&&!s) fprintf(stderr, "FADDR.3 %02X\n", ret);
+
+    jtag_data(dev, 0, 16, s);
+    jtag_instruction(dev, FVFY1, s);
+debug=0;
+
+    if (!s) {
+        for (i=0; i<50; i++) {      /* mindestens 20 */
+            dout +=jt_data(jdev, s);
+        }
+    }
+
+    if ((ret=jtag_rd_data(dev, data, size, s)) != 0) {
+        fprintf(stderr, "\n");
+        return ret;
+    }
+    jtag_rd_data(dev, 0, 0, s);
+
+    return 0;
+}
+/****************************************************************************/
+int
+jtag_write_XC18V00(struct jtag_dev* dev, void* data, int size)
+{
+    struct jtag_tab* jdev=dev->chain;
+    u_int32_t dout;
+    int	data0, size0x, ret, i, j;
+    int s=0;
+
+    if (jdev->state) {
+        fprintf(stderr, "jtag_tab.state=%d\n", jdev->state);
+        return -1;
+    }
+
+    fprintf(stderr, "writing device %s\n", dev->name);
+
+    switch (dev->id) {
+        case ID_XC18V01: data0=0x100; size0x=0x20000; break;
+        case ID_XC18V02: data0=0x200; size0x=0x40000; break;
+        case ID_XC18V04: data0=0x200; size0x=0x80000; break;
+        default: fprintf(stderr, "wrong device: %s\n", dev->name); return -1;
+    }
+
+    if (size>size0x) {
+        fprintf(stderr, "%d bytes is too lage for device %s\n",
+                size, dev->name);
+        return -1;
+    }
+    if (size<size0x) {
+        fprintf(stderr, "device %s has %d bytes but file has only %d.\n",
+                dev->name, size0x, size);
+    }
+
+    jtag_instruction(dev, ISPEN, s);
+    jtag_data(dev, 0x04, 6, s);
+
+    ret=jtag_instruction(dev, FADDR, s);
+    if ((ret!=0x11)&&!s) printf("FADDR.0 %02X\n", ret);
+    jtag_data(dev, 1, 16, s);
+    jtag_instruction(dev, FERASE, s);
+
+    if (!s) {
+        for (i=0; i<1000; i++) {   /* mindestens 500 */
+            dout +=jt_data(jdev, s);
+        }
+    }
+
+    jtag_instruction(dev, NORMRST, s);
+
+    ret=jtag_instruction(dev, BYPASS, s);
+    if ((ret!=0x01)&&!s) printf("BYPASS.0 %02X\n", ret);
+
+    jtag_instruction(dev, ISPEN, s);
+    jtag_data(dev, 0x04, 6, s);
+
+
+    for (i=0; i<size/data0; i++, ((u_int8_t*)data)+=data0) {
+        jtag_instruction(dev, FDATA0, s);
+        if ((ret=jtag_wr_data(dev, data, data0, -1, s)) != 0) return ret;
+
+        if (!i) {
+            ret=jtag_instruction(dev, FADDR, s);
+            if (ret != 0x11) printf("FADDR.1 %02X\n", ret);
+            jtag_data(dev, 0, 16, s);
+        }
+
+        jtag_instruction(dev, FPGM, s);
+
+        if (!s) {
+            for (j=0; j<1000; j++) {    /* mindestens 500 */
+                dout +=jt_data(jdev, s);
+            }
+        }
+        fprintf(stderr, ".");
+    }
+    fprintf(stderr, "\n");
+
+    ret=jtag_instruction(dev, FADDR, s);
+    if ((ret!=0x11)&&!s) printf("FADDR.2 %02X\n", ret);
+
+    jtag_data(dev, 1, 16, s);
+    jtag_instruction(dev, SERASE, s);
+
+    if (!s) {
+        for (i=0; i<1000; i++) {        /* mindestens 500 */
+            dout +=jt_data(jdev, s);
+        }
+    }
+
+    jtag_instruction(dev, NORMRST, s);
+
+    ret=jtag_instruction(dev, BYPASS, s);
+    if ((ret!=0x01)&&!s) printf("BYPASS.1 %02X\n", ret);
+
+    printf("%d byte written\n", size);
+
+    return 0;
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_tools.h	(revision 22)
@@ -0,0 +1,91 @@
+/*
+ * $ZEL: jtag_tools.h,v 1.1 2003/08/30 21:23:19 wuestner Exp $
+ */
+
+#ifndef _jtag_tools_h_
+#define _jtag_tools_h_
+
+#include <sys/types.h>
+
+#define TDI     0x01
+#define TMS     0x02
+#define TCK     0x04    /* use only if autoclock disabled */
+#define TDO     0x08
+#define JT_C    0x300   /* autoclock, enable */
+
+#define BYPASS  0xFF
+#define IDCODE  0xFE
+#define ISPEN   0xE8
+#define FPGM    0xEA    /* Programs specific bit values at specified addresses */
+#define FADDR   0xEB    /* Sets the PROM array address register */
+#define FVFY1   0xF8    /* Reads the fuse values at specified addresses */
+#define NORMRST	0xF0    /* Exits ISP Mode ? */
+#define FERASE  0xEC    /* Erases a specified program memory block */
+#define SERASE  0x0A    /* Globally refines the programmed values in the array */
+#define FDATA0  0xED    /* Accesses the array word-line register ? */
+#define FDATA3  0xF3    /* 6 */
+#define CONFIG  0xEE
+
+#define VID_AMD              1
+#define VID_INTEL            9
+#define VID_DEC             53
+#define VID_XILINX          73
+#define VID_COMPAQ          74
+#define VID_ANALOG_DEVICES 101
+#define VID_ALTERA         110
+#define VID_VITESSE        116
+/* AMCC 112 (bank 2) */
+
+#define DID_XC18V01 0x5024 /* 1 Mbit */
+#define DID_XC18V02 0x5025 /* 2 Mbit */
+#define DID_XC18V04 0x5026 /* 4 Mbit */
+#define DID_XCV150  0x0618
+#define DID_XCV400  0x0628
+
+#define ID_XC18V01 ((DID_XC18V01<<12)|(VID_XILINX<<1)|1)
+#define ID_XC18V02 ((DID_XC18V02<<12)|(VID_XILINX<<1)|1)
+#define ID_XC18V04 ((DID_XC18V04<<12)|(VID_XILINX<<1)|1)
+#define ID_XCV150  ((DID_XCV150 <<12)|(VID_XILINX<<1)|1)
+#define ID_XCV400  ((DID_XCV400 <<12)|(VID_XILINX<<1)|1)
+
+struct jtag_devdata {
+    u_int32_t vendor_id;
+    u_int32_t part_id;
+    int ir_len;
+    const char* name;
+};
+
+struct jtag_tab;
+struct jtag_dev {
+    struct jtag_tab* chain;
+    u_int32_t	id;
+    const char* name;
+    int version;
+    int ir_len;	/* instruction register */
+    int pre_c_bits;
+    int after_c_bits;
+    int pre_d_bits;
+    int after_d_bits;
+};
+
+struct jtag_tab {
+    int p;
+    int num_devs;
+    int state;  /* -1: unknown device (corrupted JTAG chain) */
+                /*  0: state is RTI (RUN-TEST/IDLE) */
+                /*  1: state is CAPTURE-DR */
+    struct jtag_dev* devs;
+};
+
+extern int debug;
+extern int simulate;
+
+void clear_jtag_tab(struct jtag_tab* tab);
+int jtag_init(struct jtag_tab* jtag_tab);
+void jtag_print_ids(struct jtag_tab* jtab);
+int jtag_read_XC18V00(struct jtag_dev* dev, void* data, int size);
+int jtag_write_XC18V00(struct jtag_dev* dev, void* data, int size);
+
+const char* newstate(int tms, int* count);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/jtag_write.c	(revision 22)
@@ -0,0 +1,162 @@
+/*
+ * $ZEL: jtag_write.c,v 1.3 2003/09/01 10:48:29 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#include "jtag_tools.h"
+
+#ifndef MAP_VARIABLE
+#define MAP_VARIABLE 0x0000
+#endif
+
+static const char* device_name;
+static const char* file_name;
+static int chip_index;
+
+static void
+printhelp(const char* progname)
+{
+    fprintf(stderr, "usage: %s [-h] [-d [-d ...]] [-s] [-c chip_idx] [-f filename] "
+            "device\n",
+            progname);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="hdc:f:s";
+
+    optarg=0; errflag=0;
+    debug=0;
+    device_name=0;
+    file_name=0;
+    chip_index=-1;
+    simulate=0;
+
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': errflag++; break;
+        case 'd': debug++; break;
+        case 's': simulate++; break;
+        case 'c': {
+                char* end;
+                chip_index=strtol(optarg, &end, 0);
+                if (*end) {
+                    fprintf(stderr, "cannot convert %s\n", optarg);
+                    errflag++;
+                }
+            }
+            break;
+        case 'f': file_name=optarg; break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || ((argc-optind)!=1) || !file_name || (chip_index<0)) {
+        printhelp(argv[0]);
+        return -1;
+    }
+
+    device_name=argv[optind];
+    if (simulate) debug++;
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    struct jtag_tab jtab={.num_devs=0, .devs=0};
+    struct stat stat;
+    void* mp;
+    int p/*, size*/;
+
+    fprintf(stderr, "\n==== SIS1100 JTAG Write; V0.1 ====\n\n");
+
+    if (getoptions(argc, argv)<0) return 1;
+
+    jtab.p=open(device_name, O_RDWR, 0);
+    if (jtab.p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", device_name, strerror(errno));
+        return 1;
+    }
+
+    if ((jtag_init(&jtab))<=0) {
+        fprintf(stderr, "no JTAG chain found\n");
+        close(jtab.p);
+        return 2;
+    }
+
+    jtag_print_ids(&jtab);
+
+    if (chip_index>=jtab.num_devs) {
+        fprintf(stderr, "illegal device index (%d)\n", chip_index);
+        close(jtab.p);
+        return 1;
+    }
+
+/*
+    switch (jtab.devs[chip_index].id&0x0fffffff) {
+        case ID_XC18V01: size=0x20000; break;
+        case ID_XC18V02: size=0x40000; break;
+        case ID_XC18V04: size=0x80000; break;
+        default:
+            fprintf(stderr, "wrong device: %s\n", jtab.devs[chip_index].name);
+            close(jtab.p);
+            return 1;
+    }
+*/
+    p=open(file_name, O_RDONLY, 0);
+    if (p<0) {
+        fprintf(stderr, "open \"%s\": %s\n", file_name, strerror(errno));
+        close(jtab.p);
+        return 1;
+    }
+
+    if (fstat(p, &stat)<0) {
+        fprintf(stderr, "cannot stat \"%s\": %s\n",
+                file_name, strerror(errno));
+        close(jtab.p);
+        close(p);
+        return 1;
+    }
+
+/*
+    if (stat.st_size!=size) {
+        fprintf(stderr, "illegal filesize\n");
+        close(jtab.p);
+        close(p);
+        return 1;
+    }
+*/
+    mp=mmap(0, stat.st_size, PROT_READ,
+            MAP_VARIABLE|MAP_FILE|MAP_SHARED, p, 0);
+    if (mp==MAP_FAILED) {
+        fprintf(stderr, "cannot mmap \"%s\": %s\n",
+                file_name, strerror(errno));
+        close(p);
+        close(jtab.p);
+        return -1;
+    }
+
+    jtag_write_XC18V00(jtab.devs+chip_index, mp, stat.st_size);
+
+    munmap(mp, stat.st_size);
+    close(p);
+
+    close(jtab.p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin.c	(revision 22)
@@ -0,0 +1,185 @@
+/*
+ * $ZEL: mcs2bin.c,v 1.1 2003/08/30 21:23:21 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+struct mcs_record {
+	u_int32_t bc;
+	u_int32_t addr;
+	u_int32_t type;
+	u_int8_t data[0x20];
+        u_int32_t checksum;
+};
+
+static int /* 0: ok; 1: EOF; -1: error */
+read_record(FILE* in, struct mcs_record* record, int line)
+{
+    const char* errortext=0;
+    char s[1024];
+    int res, num, pos=0;
+    int extaddr=0;
+    u_int8_t ck;
+
+    if (!fgets(s, 1024, in)) { /* end of file or error */
+        if (ferror(in)) {
+            fprintf(stderr, "error reading input file\n");
+            return -1;
+        }
+        if (feof(in)) {
+            fprintf(stderr, "end of input file\n");
+            return 1;
+        }
+        fprintf(stderr, "haeh???\n");
+        return -1;
+    } 
+
+    res=sscanf(s, ":%02x%04x%02x%n",
+            &record->bc, &record->addr, &record->type, &num);
+    if (res<3) {
+        errortext="header";
+        goto fehler;
+    }
+    pos+=num;
+    ck=record->bc+record->type+record->addr+(record->addr>>8);
+
+    switch (record->type) {
+    case 0: { /* data */
+        u_int32_t d;
+        int i;
+
+        if (record->bc>16) {
+            errortext="bytecount too large";
+            goto fehler;
+        }
+        for (i=0; i<record->bc; i++) {
+            res=sscanf(s+pos, "%02x%n", &d, &num);
+            if (res<1) {
+                errortext="data";
+                goto fehler;
+            }
+            pos+=num;
+            record->data[i]=d;
+            ck+=d;
+        }
+        res=sscanf(s+pos, "%02x", &record->checksum);
+        if (res!=1) {errortext="checksum"; goto fehler;}
+        }
+        break;
+    case 1: /* end */
+        return 0;
+    case 2: /* extended address */
+        /* nobreak */
+    case 4: /* "      " "     " ??? */
+        extaddr=0;
+        res=sscanf(s+pos, "%04x%n", &record->addr, &num);
+        if (res<1) {
+            errortext="extended address";
+            goto fehler;
+        }
+        pos+=num;
+        ck+=record->addr+(record->addr>>8);
+        res=sscanf(s+pos, "%02x", &record->checksum);
+        if (res!=1) {errortext="checksum"; goto fehler;}
+        break;
+    default:
+        errortext="unknown record type";
+        goto fehler;
+    }
+    ck+=record->checksum;
+    if (ck) {
+        errortext="invalid checksum";
+        goto fehler;
+    }
+    return 0;
+
+fehler:
+    fprintf(stderr, "cannot convert line %d (%s):\n", line, errortext);
+    fprintf(stderr, "%s\n", s);
+    return -1;
+}
+
+static int
+mcs2bin(FILE* in, int op)
+{
+    int size=0, res, line=0;
+    struct mcs_record record;
+    int extaddr=0, nextaddr=0, addr;
+
+    while (1) {
+        res=read_record(in, &record, line);
+        if (res) {
+            return res<0?-1:size;
+        }
+
+        switch (record.type) {
+        case 0: /* data */
+            addr=record.addr+extaddr;
+            if (addr!=nextaddr) {
+                fprintf(stderr, "addess jump 0x%x --> 0x%x\n", nextaddr, addr);
+                return -1;
+            }
+            nextaddr+=record.bc;
+            res=write(op, record.data, record.bc);
+            if (res!=record.bc) {
+                fprintf(stderr, "error writing %d bytes: res=%d errno=%s\n",
+                        record.bc, res, strerror(errno));
+                return -1;
+            }
+            size+=record.bc;
+            break;
+        case 1: /* end */
+            return size;
+            break;
+        case 2: /* extended address */
+            /* nobreak */
+        case 4: /* "      " "     " ??? */
+            extaddr=record.addr<<16;
+            break;
+        }
+        line++;
+    }
+    /* und wie zum Teufel sollen wir hier hinkommen? */
+    return 0;
+}
+
+static int
+pad_file(int op, int size)
+{
+    int n0=0, n1=0;
+    int nsize=size;
+    while (nsize) {
+        n0++;
+        n1+=nsize&1;
+        nsize>>=1;
+    }
+    size=(1<<(n0-(n1==1)))-size;
+    if (size) {
+        u_int8_t* b=malloc(size);
+        memset(b, 0xff, size);
+        write(op, b, size);
+        free(b);
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int size;
+
+    fprintf(stderr, "\n==== MCS to bin converter; V0.1 ====\n\n");
+
+    size=mcs2bin(stdin, 1);
+    fprintf(stderr, "size=%d\n", size);
+    if (size>0) pad_file(1, size);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin2.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin2.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/mcs2bin2.c	(revision 22)
@@ -0,0 +1,213 @@
+/*
+ * $ZEL: mcs2bin2.c,v 1.1 2003/08/30 21:23:22 wuestner Exp $
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+struct mcs_record {
+	u_int32_t bc;
+	u_int32_t addr;
+	u_int32_t type;
+	u_int8_t data[0x21];
+        u_int32_t checksum;
+};
+
+static int /* 0: ok; 1: EOF; -1: error */
+read_line(FILE* in, u_int8_t* b, int* len, int line)
+{
+    char *errorformat;
+    char *s, ss[1024];
+    int i, n, ll, res;
+    u_int8_t cs;
+
+    if (!(s=fgets(ss, 1024, in))) { /* end of file or error */
+        if (ferror(in)) {
+            fprintf(stderr, "error reading input file (line %d): %s\n",
+                line, strerror(errno));
+            return -1;
+        }
+        if (feof(in)) {
+            fprintf(stderr, "end of input file (line %d)\n", line);
+            return 1;
+        }
+        fprintf(stderr, "haeh???\n");
+        return -1;
+    }
+
+    while (isspace(s[0])) s++;
+    ll=strlen(s);
+    while (ll && isspace(s[ll-1])) ll--;
+    s[ll]=0;
+    if (!ll) {
+        fprintf(stderr, "line %d is empty\n", line);
+        return -1;
+    }
+    if (s[0]!=':') {
+        errorformat="invalid format of line %d\n";
+        goto fehler;
+    }
+    s++; ll--; n=0;
+    while (ll) {
+        u_int32_t d;
+        int num;
+        res=sscanf(s, "%02x%n", &d, &num);
+        b[n]=d;
+        if ((res<1)||(num!=2)) {
+            errorformat="error scanning line %d\n";
+            goto fehler;
+        }
+        ll-=num; s+=num; n++;
+    }
+    cs=0;
+    for (i=0; i<n; i++) cs+=b[i];
+    if (cs) {
+        errorformat="line %d has invalid checksum\n";
+        goto fehler;
+    }
+    *len=n-1;
+    return 0;
+
+fehler:
+    fprintf(stderr, errorformat, line);
+    fprintf(stderr, "%s\n", ss);
+    return -1;
+}
+
+static int /* 0: ok; 1: EOF; -1: error */
+read_record(FILE* in, struct mcs_record* record, int line)
+{
+    const char* errorformat=0;
+    int res;
+
+    if ((res=read_line(in, record->data, &record->bc, line))) return res;
+
+    if (record->bc<4) {
+        errorformat="line %d too short\n";
+        goto fehler;
+    }
+    if (record->bc-4!=record->data[0]) {
+        errorformat="wrong bytecount in line %d\n";
+        goto fehler;
+    }
+    record->bc=record->data[0];
+    record->type=record->data[3];
+    switch (record->type) {
+    case 0: { /* data */
+        if (record->bc>16) {
+            errorformat="bytecount too large (line %d)\n";
+            goto fehler;
+        }
+        record->addr=(record->data[1]<<8)|record->data[2];
+        }
+        break;
+    case 1: /* end */
+        if (record->bc) {
+            errorformat="wrong bytecount in line %d (for record type 1)\n";
+            goto fehler;
+        }
+        return 0;
+    case 2: /* extended address */
+        /* nobreak */
+    case 4: /* "      " "     " ??? */
+        if (record->bc!=2) {
+            errorformat="wrong bytecount in line %d (for record type 4)\n";
+            goto fehler;
+        }
+        record->addr=(record->data[4]<<8)|record->data[5];
+        break;
+    default:
+        errorformat="unknown record type in line %d\n";
+        goto fehler;
+    }
+    return 0;
+
+fehler:
+    fprintf(stderr, errorformat, line);
+    return -1;
+}
+
+static int
+mcs2bin(FILE* in, int op)
+{
+    int size=0, res, line=0;
+    struct mcs_record record;
+    int extaddr=0, nextaddr=0, addr;
+
+    while (1) {
+        res=read_record(in, &record, line);
+        if (res) {
+            return res<0?-1:size;
+        }
+
+        switch (record.type) {
+        case 0: /* data */
+            addr=record.addr+extaddr;
+            if (addr!=nextaddr) {
+                fprintf(stderr, "addess jump 0x%x --> 0x%x (line %d)\n",
+                    nextaddr, addr, line);
+                return -1;
+            }
+            nextaddr+=record.bc;
+            res=write(op, record.data+4, record.bc);
+            if (res!=record.bc) {
+                fprintf(stderr, "error writing %d bytes: res=%d errno=%s\n",
+                        record.bc, res, strerror(errno));
+                return -1;
+            }
+            size+=record.bc;
+            break;
+        case 1: /* end */
+            return size;
+            break;
+        case 2: /* extended address */
+            /* nobreak */
+        case 4: /* "      " "     " ??? */
+            extaddr=record.addr<<16;
+            break;
+        }
+        line++;
+    }
+    /* und wie zum Teufel sollen wir hier hinkommen? */
+    return 0;
+}
+
+static int
+pad_file(int op, int size)
+{
+    int n0=0, n1=0;
+    int nsize=size;
+    while (nsize) {
+        n0++;
+        n1+=nsize&1;
+        nsize>>=1;
+    }
+    size=(1<<(n0-(n1==1)))-size;
+    if (size) {
+        u_int8_t* b=malloc(size);
+        memset(b, 0xff, size);
+        write(op, b, size);
+        free(b);
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int size;
+
+    fprintf(stderr, "\n==== MCS to bin converter; V0.1 ====\n\n");
+
+    size=mcs2bin(stdin, 1);
+    fprintf(stderr, "size=%d\n", size);
+    if (size>0) pad_file(1, size);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Entries	(revision 22)
@@ -0,0 +1,3 @@
+/jtag.c/1.1/Sun Aug 24 21:12:17 2003//
+/jtag.h/1.1/Sun Aug 24 21:12:17 2003//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/jtag_tools/willi
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.c	(revision 22)
@@ -0,0 +1,1485 @@
+// Borland C++ - (C) Copyright 1991, 1992 by Borland International
+
+//	jtag.c -- JTAG control
+
+#include <stddef.h>		// offsetof()
+#include <stdio.h>
+#include <conio.h>
+#include <dos.h>
+#include <io.h>
+#include <ctype.h>
+#include <errno.h>
+#include <string.h>
+#include <mem.h>
+#include <windows.h>
+#include <fcntl.h>
+#include "pci.h"
+#include "jtag.h"
+//
+//-------------------------------
+//			JTAG definitions
+//-------------------------------
+//
+// instruction opcodes und register length stehen in
+//		\Xilinx\xc18v00\data\xc18v0?.bsd
+//
+#define C_JTG_DEVS	6
+
+#define TDI	0x01
+#define TMS	0x02
+
+#define BYPASS		0xFF
+#define IDCODE		0xFE
+#define ISPEN		0xE8
+#define FPGM		0xEA	// Programs specific bit values at specified addresses
+#define FADDR		0xEB	// Sets the PROM array address register
+#define FVFY1		0xF8	// Reads the fuse values at specified addresses
+#define NORMRST	0xF0	// Exits ISP Mode ?
+#define FERASE		0xEC	// Erases a specified program memory block
+#define SERASE		0x0A	// Globally refines the programmed values in the array
+#define FDATA0		0xED	// Accesses the array word-line register ?
+#define FDATA3		0xF3	// 6
+#define CONFIG		0xEE
+
+typedef struct {
+	u_int		num_devs;
+	u_int		select;
+	int		state;		// -1: unknown device (corrupted JTAG chain)
+								//  0: state is RTI (RUN-TEST/IDLE)
+								//  1: state is CAPTURE-DR
+	struct {
+		u_long	idcode;
+		u_int		ir_len;	// instruction register
+	} devs[C_JTG_DEVS];
+} JTAG_TAB;
+
+#pragma option -a1
+typedef struct {
+	u_char	bc;
+	u_short	addr;
+	u_char	type;
+	u_char	data[0x20+1];
+} MCS_RECORD;
+#pragma option -a
+
+static u_int	(*jt_getcsr)(void);	// get control/status
+static void		(*jt_putcsr)(u_int);	// put control/status
+#define JT_C	0x300			// autoclock, enable
+
+static u_long	(*jt_data)(void);	// data in
+static JT_CONF	*jt_conf;
+static u_char	jt_mode;
+
+static JTAG_TAB	jtag_tab;
+static int			mcs_hdl=-1;
+static int			mcs_ix;
+static int			mcs_blen;
+static u_char		mcs_buf[0x1000];
+static FILE			*svfdat=0;
+static char			svf_line[300];
+static u_int		svf_ix;
+static u_long		svf_value;
+
+static u_int		sc_line;				// SVF file, line number
+static u_int		sc_command;
+static u_int		sc_length;			// number of bits for svf command
+static u_char		dr_tdi[0x1000];	// DR values
+static u_char		dr_itdo[0x1000];
+static u_char		dr_tdo[0x1000];
+static u_char		dr_mask[0x1000];
+static u_long		lvdr_tdi;			// DR long value
+static u_long		lvdr_tdo;
+static u_long		lvdr_mask;
+static u_int		lvir_tdi;			// IR long value
+static u_int		lvir_tdo;
+static u_int		lvir_mask;
+static u_char		tdo_val;
+#define SC_UNDEF		0
+#define SC_HIR			1
+#define SC_TIR			2
+#define SC_HDR			3
+#define SC_TDR			4
+#define SC_SIR			5
+#define SC_SDR			6
+#define SC_RUNTEST	7
+#define SC_TDI			8
+#define SC_SMASK		9
+#define SC_TDO			10
+#define SC_MASK		11
+#define SC_TCK			12
+#define SC_BRACKET_O	13
+#define SC_BRACKET_C	14
+#define SC_SEMICOLON	15
+#define SC_COMMENT	16
+
+static char *const cmd_txt[] ={
+	"HIR", "TIR", "HDR", "TDR", "SIR", "SDR", "RUNTEST",
+	"TDI", "SMASK", "TDO", "MASK", "TCK", 0
+};
+
+static MCS_RECORD	mcs_record;
+//
+//--------------------------- display_errcode --------------------------------
+//
+#define CEN_PROMPT		-2		// display no command menu, only prompt
+#define CE_PROMPT			2		// display no command menu, only prompt
+#define CE_FORMAT			5
+
+static void display_errcode(int err)
+{
+	if (err == CE_PROMPT) return;
+
+	printf("err# %u, ", err);
+	switch (err) {
+
+case CE_FORMAT:
+		printf("MCS format error\n"); break;
+
+default:
+		printf("\n"); break;
+	}
+}
+//
+//===========================================================================
+//
+//										JTAG Interface
+//
+//===========================================================================
+//
+static int svf_a2bin(	// count of valid characters
+								// value in svf_value
+	char	hex,				// default base
+	char	*str)
+{
+	u_int	t,i;
+	char	base;
+	u_int	dg;
+	u_int	len;
+
+	base=-1; t=0;
+	while ((str[t] == ' ') || (str[t] == TAB)) t++;
+	for (i=t;; i++) {
+		dg=toupper(str[i]);
+		if ((dg >= '0') && (dg <= '9')) continue;
+
+		if (   (dg >= 'A') && (dg <= 'F')
+			 && (hex || (base == 1))) { base=1; continue; }
+
+		if ((i == 1) && (dg == 'X') && (str[0] == '0')) { base=1; continue; }
+
+		if ((dg == '.') && (base < 0)) { base=0; len=i+1; break; }
+
+		len=i; break;
+	}
+
+	if (base < 0) base=hex;
+
+	svf_value=0;
+	if (base) {							// Hexa
+		for (i=t; i < len; i++) {
+			dg=toupper(str[i]);
+			if (dg == 'X') continue;
+
+			if (svf_value >= 0x10000000l) return i;
+			if (dg >= 'A') dg -=7;
+
+			svf_value =(svf_value <<4) +(dg-'0');
+		}
+
+		return len;
+	}
+
+	for (i=t; (i < len) && (str[i] != '.'); i++) {
+		dg=str[i]-'0';
+		if ((svf_value > 429496729l) || ((svf_value == 429496729l) && (dg >= 6)))
+			return i;
+
+		svf_value=10*svf_value +dg;
+	}
+
+	return len;
+}
+
+//--------------------------- svf_readln ------------------------------------
+//
+static int svf_readln(void)
+{
+	u_int	i;
+	int	c;
+
+	sc_line++; svf_ix=0; i=0;
+	while (1) {
+		c=fgetc(svfdat);
+		if (c == EOF) { svf_line[i]=0; return -1; }
+
+		if ((c == '\r') || (c == '\n')) {
+			if (i == 0) continue;
+
+			svf_line[i]=0; return 0;
+		}
+
+		if (i >= sizeof(svf_line)-1) {
+			printf("line too long\n");
+			svf_line[i]=0; return -2;
+		}
+
+		svf_line[i++]=c;
+	}
+}
+//
+//--------------------------- svf_token -------------------------------------
+//
+static int svf_token(void)
+{
+	int	ret;
+	int	i;
+	char	*const *tkx;
+	char	*tk;
+
+	i=0;
+	while (1) {
+		while ((svf_line[svf_ix] == ' ') || (svf_line[svf_ix] == TAB)) svf_ix++;
+
+		if (!svf_line[svf_ix]) {
+			if ((ret=svf_readln()) == 0) continue;
+
+			return ret;
+		}
+
+		switch (svf_line[svf_ix]) {
+	case '/':
+	case '!':
+			svf_ix++; return SC_COMMENT;
+
+	case '(':
+			svf_ix++; return SC_BRACKET_O;
+
+	case ')':
+			svf_ix++; return SC_BRACKET_C;
+
+	case ';':
+			svf_ix++; return SC_SEMICOLON;
+		}
+
+		ret=SC_HIR; tkx=cmd_txt;
+		while ((tk= *tkx++) != 0) {
+			i=0;
+			while (tk[i] && (tk[i] == svf_line[svf_ix+i])) i++;
+
+			if (!tk[i]) { svf_ix +=i; return ret; }
+
+			ret++; tk++;
+		}
+
+		return SC_UNDEF;
+	}
+}
+//
+//--------------------------- svf_byte --------------------------------------
+//
+static int svf_byte(void)
+{
+	int	ret;
+	u_int	i,dg,val;
+
+	val=0;
+	for (i=0; i < 2; i++, svf_ix++) {
+		if (!svf_line[svf_ix])
+			if ((ret=svf_readln()) != 0) return ret;
+
+		dg=toupper(svf_line[svf_ix]);
+		if (((dg < '0') || (dg > '9')) && ((dg < 'A') || (dg > 'F'))) return -3;
+
+		if (dg >= 'A') dg -=7;
+
+		val =(val <<4) +(dg-'0');
+	}
+
+	return val;
+}
+//
+//--------------------------- MCS_byte --------------------------------------
+//
+static int MCS_byte(void)
+{
+
+	if (mcs_ix >= mcs_blen) {
+		if ((mcs_blen == 0) || (mcs_hdl == -1)) return -1;
+
+      mcs_ix=0;
+		if ((mcs_blen=read(mcs_hdl, &mcs_buf, sizeof(mcs_buf))) != sizeof(mcs_buf)) {
+			if (mcs_blen < 0) { perror("error reading config file"); mcs_blen=0; }
+
+			if (mcs_blen == 0) return -1;
+		}
+	}
+
+	return mcs_buf[mcs_ix++];
+}
+//
+//--------------------------- MCS_record ------------------------------------
+//
+// lese naechsten MCS Record nach
+//		mcs_record
+//
+static int MCS_record(void)
+{
+	int		bx,ix,dx;
+	u_char	*bf;
+
+	while ((bx=MCS_byte()) != ':') {
+		if (bx < 0) return -1;
+
+		if ((bx != '\r') && (bx != '\n')) {
+			printf("illegal Format\n"); return -1;
+		}
+	}
+
+	ix=0; bf=(u_char*)&mcs_record;
+	do {
+		bx=MCS_byte();
+		if (bx < ' ') break;
+
+		dx =bx -'0';
+		if (dx >= 10) dx -=('A'-'9'-1);
+
+		bx=MCS_byte() -'0';
+		if (bx >= 10) bx -=('A'-'9'-1);
+
+		bf[ix++]=(dx <<4) |bx;
+	} while (ix < sizeof(mcs_record));
+
+	dx=ix-1; bx=0; ix=0;
+	do bx +=bf[ix++]; while (ix < dx);
+	if (   (mcs_record.bc != (dx-4))
+		 || (bf[dx] != (u_char)(-bx))) {
+		return CE_FORMAT;
+	}
+
+	return 0;
+}
+//
+//--------------------------- jtag_reset ------------------------------------
+//
+static JTAG_TAB *jtag_reset(void)
+{
+	u_int		ux,uy;
+	u_long	tmp;
+
+	ux=0;
+	do {
+		uy=0;
+		do (*jt_putcsr)(JT_C|TMS); while (++uy < 5);	// TLR state, ID DR wird selectiert
+		(*jt_putcsr)(JT_C);									// RTI state
+	} while (++ux < 3);						// einmal sollte auch genuegen
+//
+//--- RTI (Run-Test/Idle)
+//
+	(*jt_putcsr)(JT_C|TMS);	// Select DR
+	(*jt_putcsr)(JT_C);		// Capture DR
+	if (jt_mode) (*jt_putcsr)(JT_C);
+
+	ux=C_JTG_DEVS;								// die letzte device ID wird zuerst gelesen
+	while (1) {
+		uy=0;
+		do (*jt_putcsr)(JT_C); while (++uy < 32);	// shift DR
+		tmp=(*jt_data)();
+		if (   (tmp == 0)						// wurde vorne (TDI) hineingeschoben
+			 || (ux == 0)) break;			// maximale Anzahl erreicht
+
+		jtag_tab.devs[--ux].idcode=tmp;
+	}
+
+	(*jt_putcsr)(JT_C|TMS);		// Exit1 DR
+	(*jt_putcsr)(JT_C|TMS);		// Update DR
+	(*jt_putcsr)(JT_C);			// RTI state
+	jtag_tab.num_devs=0; jtag_tab.select=0; jtag_tab.state=-1;
+	if (   tmp										// Ende nicht erkannt
+		 || (ux == C_JTG_DEVS)) return 0;	// kein device vorhanden
+
+	jtag_tab.num_devs=C_JTG_DEVS-ux;
+	uy=0;
+	do {												// nach vorne schieben
+		jtag_tab.devs[uy].idcode=jtag_tab.devs[ux++].idcode;
+		jtag_tab.devs[uy++].ir_len=0;			// IR length wird spaeter bestimmt
+	} while (ux < C_JTG_DEVS);
+
+	jtag_tab.state=0;
+	return &jtag_tab;
+}
+//
+//--------------------------- jtag_select -----------------------------------
+//
+static int jtag_select(u_int dev)
+{
+	if (dev >= jtag_tab.num_devs) return CE_PROMPT;
+
+	jtag_tab.select=dev;
+	return 0;
+}
+//
+//--------------------------- jtag_runtest ----------------------------------
+//
+static int jtag_runtest(u_long cnt)
+{
+	while (cnt) { (*jt_putcsr)(JT_C); cnt--; }
+	return 0;
+}
+//
+//--------------------------- jtag_instruction ------------------------------
+//
+static int jtag_instruction(u_int icode)
+{
+	u_int		ux,uy;
+	u_int		tdo;
+	u_char	ms;		// TMS (bit 1)
+
+	if (jtag_tab.state < 0) return -1;
+
+	(*jt_putcsr)(JT_C|TMS|TDI); (*jt_putcsr)(JT_C|TMS|TDI);
+	(*jt_putcsr)(JT_C|TDI); (*jt_putcsr)(JT_C|TDI); ux=jtag_tab.num_devs;
+	tdo=0; ms=0;
+	while (ux) {
+		ux--; uy=0;
+		do {
+			if (   (ux == 0)										// last device
+				 && (uy == (jtag_tab.devs[ux].ir_len -1))	// last bit
+				) ms=TMS;
+
+			if (ux != jtag_tab.select) {
+				(*jt_putcsr)(JT_C|ms|TDI);
+//				printf(" %02X", ms|TDI);
+			} else {
+				tdo |=(((*jt_getcsr)() >>3) &1) <<uy;
+//				printf("%02X ", ms|(icode &TDI));
+				(*jt_putcsr)(JT_C|ms|(icode &TDI)); icode >>=1;
+			}
+		} while (++uy < jtag_tab.devs[ux].ir_len);
+//		printf(" => %u\n", ux);
+	}
+
+	if (icode == CONFIG) { sleep(1); printf("2\n"); }
+
+	(*jt_putcsr)(JT_C|TMS|TDI);
+	if (icode == CONFIG) { sleep(1); printf("1\n"); }
+
+	(*jt_putcsr)(JT_C|TDI);
+	if (icode == CONFIG) { sleep(1); printf("0\n"); }
+
+	return tdo;
+}
+//
+//--------------------------- jtag_data -------------------------------------
+//
+static u_long jtag_data(u_long din, u_int len)
+{
+	u_int		dev,uy;
+	u_long	tdo;
+
+	errno=0;
+	if (jtag_tab.state < 0) { errno=1; return 0; }
+
+	(*jt_putcsr)(JT_C|TMS|TDI);
+	(*jt_putcsr)(JT_C|TDI);
+	(*jt_putcsr)(JT_C|TDI);			// SHIFT-DR
+	dev=jtag_tab.num_devs; tdo=0;
+	while (dev) {
+		dev--;
+		if (dev != jtag_tab.select) {	// TDI/TDO header and tail
+			if (dev == 0) {
+				(*jt_putcsr)(JT_C|TMS|TDI);	// letztes device, EXIT1-DR
+				break;
+			}
+
+			(*jt_putcsr)(JT_C|TDI);
+			continue;
+		}
+
+		uy=0;
+		while (len) {
+			len--;
+			tdo |=(u_long)(((*jt_getcsr)() >>3) &1) <<uy; uy++;
+			if (   (dev == 0)							// letztes device
+				 && (len == 0)) {						// letztes bit
+				(*jt_putcsr)(JT_C|TMS |((u_char)din &TDI));	// EXIT1-DR
+				break;
+			}
+
+			(*jt_putcsr)(JT_C|((u_char)din &TDI)); din >>=1;
+		}
+	}
+
+	(*jt_putcsr)(JT_C|TMS|TDI); (*jt_putcsr)(JT_C|TDI);	// state RTI
+	return tdo;
+}
+//
+//--------------------------- jtag_rd_data ----------------------------------
+//
+static int jtag_rd_data(
+	void	*buf,
+	u_int	len)		//  0: end
+{
+	u_long	*bf;
+	u_int		ux;
+
+	if (jtag_tab.state < 0) return CE_PROMPT;
+
+	if (len == 0) {
+		if (jtag_tab.state == 1) {
+			(*jt_putcsr)(JT_C|TMS|TDI);
+			(*jt_putcsr)(JT_C|TMS|TDI);
+			(*jt_putcsr)(JT_C|TDI);
+			jtag_tab.state=0;			// state RTI
+		}
+
+		return 0;
+	}
+
+	if (jtag_tab.state == 0) {
+		(*jt_putcsr)(JT_C|TMS|TDI);
+		(*jt_putcsr)(JT_C|TDI);			// CAPTURE-DR
+		if (jt_mode) (*jt_putcsr)(JT_C|TDI);	// Shift DR
+
+		ux=jtag_tab.num_devs;
+		while (--ux != jtag_tab.select) (*jt_putcsr)(JT_C|TDI);	// header bits
+		jtag_tab.state=1;
+	}
+
+	bf=(u_long*)buf;
+	while (len > 4) {
+		ux=0;
+		do (*jt_putcsr)(JT_C|TDI); while (++ux < 32);		// erste TCK ist noch in CAPTURE-DR
+
+		*bf++ =(*jt_data)(); len -=4;
+	}
+
+	ux=0;
+	do (*jt_putcsr)(JT_C|TDI); while (++ux < 32);
+
+	*bf++ =(*jt_data)();
+	return 0;
+}
+//
+//--------------------------- jtag_wr_data ----------------------------------
+//
+static int jtag_wr_data(
+	void	*buf,
+	u_int	len,		// Anzahl Byte
+	int	state)	// -1: end
+{
+	u_long	*bf;
+	u_long	din;
+	u_int		dev;
+	u_int		ux;
+	u_char	ms;
+
+	if (jtag_tab.state < 0) return CE_PROMPT;
+
+	bf=(u_long*)buf; len >>=2;
+	if (len == 0) return 0;
+
+	(*jt_putcsr)(JT_C|TMS|TDI);
+	(*jt_putcsr)(JT_C|TDI); (*jt_putcsr)(JT_C|TDI); dev=jtag_tab.num_devs; ms=0;
+	while (dev) {
+		dev--;
+		if (dev != jtag_tab.select) {
+			(*jt_putcsr)((dev) ? (JT_C|TDI) : (JT_C|TMS|TDI));
+		} else {
+			while (len) {
+				len--;
+				din=*bf++; ux=32;
+				while (ux) {
+					ux--;
+					if ((dev == 0) && (len == 0) && (ux == 0)) ms=TMS;
+
+					(*jt_putcsr)(JT_C|ms|((u_char)din &TDI)); din >>=1;
+				}
+			}
+		}
+	}
+
+	if (state < 0) {
+		(*jt_putcsr)(JT_C|TMS|TDI); (*jt_putcsr)(JT_C|TDI); jtag_tab.state=0;
+	}
+
+	return 0;
+}
+//
+//--------------------------- jtag_data_exchange ----------------------------
+//
+// TDI buffer: dr_tdi[]
+// TDO buffer: dr_itdo[]
+// # of bits:  sc_length
+//
+static int jtag_data_exchange(void)	// 0: ok
+{
+	u_long	*bfi,*bfo;
+	u_long	din;
+	u_int		dev;
+	u_int		len;
+	u_int		ux;
+
+	if (jtag_tab.state < 0) return CE_PROMPT;
+
+	if (!sc_length) return 0;
+
+	bfi=(u_long*)dr_tdi;
+	bfo=(u_long*)dr_itdo;
+	len =sc_length >>5;
+
+	(*jt_putcsr)(JT_C|TMS|TDI);
+	(*jt_putcsr)(JT_C|TDI);
+	(*jt_putcsr)(JT_C|TDI);		// SHIFT-DR
+	dev=jtag_tab.num_devs;
+	while (dev) {
+		dev--;
+		if (dev != jtag_tab.select) {		// TDI/TDO header and tail
+			if (dev == 0) {
+				(*jt_putcsr)(JT_C|TMS|TDI);		// letztes device, EXIT1-DR
+				break;
+			}
+
+			(*jt_putcsr)(JT_C|TDI);
+			continue;
+		}
+//
+// --- selected device
+//
+		while (len) {
+			len--;
+			din=*bfi++; ux=32;
+			while (ux) {
+				ux--;
+				if (ux == 0) {
+					*bfo++ =(*jt_data)();
+					if (   (len == 0) && (dev == 0)
+						 && !(sc_length &0x1F)) {			// absolut letztes Bit
+						(*jt_putcsr)(JT_C|TMS |((u_char)din &TDI));	// EXIT1-DR
+						break;
+					}
+				}
+
+				(*jt_putcsr)(JT_C|((u_char)din &TDI)); din >>=1;
+			}
+
+		}
+
+		if ((ux=sc_length &0x1F) != 0) {
+			din=*bfi++;
+			while (ux) {
+				ux--;
+				if (ux == 0) {
+					*bfo++ =(*jt_data)() >>(32-(sc_length &0x1F));
+					if (dev == 0) {
+						(*jt_putcsr)(JT_C|TMS|((u_char)din &TDI));	// EXIT1-DR
+						break;
+					}
+				}
+
+				(*jt_putcsr)(JT_C|((u_char)din &TDI)); din >>=1;
+			}
+		}
+	}
+
+	(*jt_putcsr)(JT_C|TMS|TDI); (*jt_putcsr)(JT_C|TDI);	// state RTI
+	return 0;
+}
+//
+//--------------------------- read_idcodes ----------------------------------
+//
+static int read_idcodes(void)
+{
+	JTAG_TAB	*jtab;
+	u_int		ux;
+	u_long	tmp;
+
+	printf("\nread JTAG chain\n\n");
+	if ((jtab=jtag_reset()) == 0) {
+		printf("no JTAG chain found\n");
+		return CE_PROMPT;
+	}
+
+	printf("JTAG chain\n");
+	printf("-----------\n"); ux=0; jtab->state=0;
+	do {
+		printf(" %u: %08lX", ux, tmp=jtab->devs[ux].idcode);
+		if ((tmp &0x0FFFFFFFl) == 0x05024093l) {
+			printf(" XC18V01  Ver: %u", (u_char)(tmp >>28));
+			jtab->devs[ux].ir_len=8;
+		} else {
+			if ((tmp &0x0FFFFFFFl) == 0x05025093l) {
+				printf(" XC18V02  Ver: %u", (u_char)(tmp >>28));
+				jtab->devs[ux].ir_len=8;
+			} else {
+				if ((tmp &0x0FFFFFFFl) == 0x05026093l) {
+					printf(" XC18V04  Ver: %u", (u_char)(tmp >>28));
+					jtab->devs[ux].ir_len=8;
+				} else {
+					if ((tmp &0x0FFFFFFFl) == 0x00618093l) {
+						printf(" XCV150   Ver: %u", (u_char)(tmp >>28));
+						jtab->devs[ux].ir_len=5;
+					} else {
+						if ((tmp &0x0FFFFFFFl) == 0x00628093l) {
+							printf(" XCV400   Ver: %u", (u_char)(tmp >>28));
+							jtab->devs[ux].ir_len=5;
+						} else {
+							jtab->state=-1;
+							printf(" unknown device");
+						}
+					}
+				}
+			}
+		}
+
+		Writeln();
+	} while (++ux < jtab->num_devs);
+
+	Writeln();
+	return CE_PROMPT;
+}
+//
+//--------------------------- jtag_instr ------------------------------------
+//
+static int jtag_instr(
+	int	instr)	// -1: dialog
+{
+	int	ret;
+
+	printf("device      %4u ", jt_conf->jtag_dev);
+	jt_conf->jtag_dev=(u_int)Read_Deci(jt_conf->jtag_dev, -1);
+	if (errno) return 0;
+
+	if (instr >= 0) printf("instruction 0x%02X\n", instr);
+	else {
+		printf("instruction 0x%02X ", jt_conf->jtag_instr);
+		jt_conf->jtag_instr=(u_char)Read_Hexa(jt_conf->jtag_instr, 0xFF);
+		if (errno) return 0;
+
+		instr=jt_conf->jtag_instr;
+	}
+
+	if ((ret=jtag_select(jt_conf->jtag_dev)) != 0) return ret;
+
+	if ((ret=jtag_instruction(instr)) < 0)
+		printf("JTAG not initialized\n");
+	else
+		printf("instructin reg =0x%02X\n", ret);
+
+	return CE_PROMPT;
+}
+//
+//--------------------------- jtag_exchange ---------------------------------
+//
+static int jtag_exchange(void)
+{
+	u_long	dout;
+
+	printf("data length    %8u ", jt_conf->jtag_dlen);
+	jt_conf->jtag_dlen=(u_char)Read_Deci(jt_conf->jtag_dlen, 32);
+	if (errno) return 0;
+
+	printf("JTAG data in 0x%08lX ", jt_conf->jtag_data);
+	jt_conf->jtag_data=Read_Hexa(jt_conf->jtag_data, -1);
+	if (errno) return 0;
+
+	dout=jtag_data(jt_conf->jtag_data, jt_conf->jtag_dlen);
+	if (errno)
+		printf("JTAG not initialized\n");
+	else
+		printf("data reg =0x%08lX\n", dout);
+
+	return CE_PROMPT;
+}
+//
+//--------------------------- jtag_prom -------------------------------------
+//
+static int jtag_prom(
+	int	mode)	// 0: program
+					// 1: verify
+					// 2: read and save
+{
+	int		ret;
+	u_long	dout;
+	u_int		ux,uy,ex;
+	u_long	lx;
+	u_char	pt;
+	u_int		data0;		// beachte Groesse dr_tdi[]
+	u_long	size0;
+	char		*fname;
+	u_int		date, time;
+
+	pt=0;
+	read_idcodes();
+	if (jtag_tab.state) return CE_PROMPT;
+
+	printf("device    %3u ", jt_conf->jtag_dev);
+	jt_conf->jtag_dev=(u_int)Read_Deci(jt_conf->jtag_dev, -1);
+	if (errno) return 0;
+
+	if ((ret=jtag_select(jt_conf->jtag_dev)) != 0) return ret;
+
+	if (mode == 2) {
+		fname =(jt_conf->jtag_dev < C_JT_NM) ? jt_conf->jtag_file[jt_conf->jtag_dev] :
+														jt_conf->jtag_file[C_JT_NM-1];
+		printf("bin file name ");
+		strcpy(fname,
+				 Read_String(fname, sizeof(jt_conf->jtag_file[0])));
+		if (errno) return 0;
+
+		if ((mcs_hdl=_rtl_creat(fname, 0)) == -1) {
+			perror("error creating file");
+			return CEN_PROMPT;
+		}
+	} else {
+		fname =(jt_conf->jtag_dev < C_JT_NM) ? jt_conf->jtag_file[jt_conf->jtag_dev] :
+														jt_conf->jtag_file[C_JT_NM-1];
+		printf("MCS file name ");
+		strcpy(fname,
+				 Read_String(fname, sizeof(jt_conf->jtag_file[0])));
+		if (errno) return 0;
+
+		if ((mcs_hdl=_rtl_open(fname, O_RDONLY)) == -1) {
+			perror("error opening MCS file");
+			return CE_PROMPT;
+		}
+
+		_dos_getftime(mcs_hdl, &date, &time);
+		printf("time stamp: %02u.%02u.%02u  %2u:%02u:%02u\n",
+				 date&0x1F, (date>>5)&0x0F, (date>>9)-20,
+				 (time>>11)&0x1F, (time>>5)&0x3F, (time<<1)&0x3F);
+		mcs_ix  =1;
+		mcs_blen=1;
+		if ((ret=MCS_record()) != 0) return ret;
+		if ((mcs_record.type != 2) && (mcs_record.type != 4)) return CE_FORMAT;
+	}
+
+	if ((ret=jtag_instruction(IDCODE)) < 0) {
+		printf("JTAG not initialized\n");
+		return CE_PROMPT;
+	}
+//
+//--- ueberpruefe ID Code, siehe xc18v0?.bsd File
+//
+	dout=jtag_data(-1, 32);
+	if ((dout &0x0FFFFFFFL) == 0x05024093L) {			// XC18V01 1 Mbit
+		data0=0x100; size0=0x20000L;
+	} else {
+		if ((dout &0x0FFFFFFFL) == 0x05025093L) {		// XC18V02 2 Mbit
+			data0=0x200; size0=0x40000L;
+		} else {
+			if ((dout &0x0FFFFFFFL) == 0x05026093L) {	// XC18V04 4 Mbit
+				data0=0x200;  size0=0x80000L;
+			} else {
+				printf("wrong IDCODE: %08lX\n", dout);
+				return CE_PROMPT;
+			}
+		}
+	}
+
+	if (mode == 2) {
+//
+//--- ISP PROM auslesen und binaer speichern
+//
+		jtag_instruction(ISPEN);
+		jtag_data(0x34, 6);
+		ret=jtag_instruction(FADDR);
+		if (ret != 0x11) printf("FADDR.3 %02X\n", ret);
+
+		jtag_data(0, 16);
+		jtag_instruction(FVFY1);
+
+		ux=0;
+		do dout +=(*jt_data)(); while (++ux < 50);	// mindestens 20
+		ex=0; lx=0;
+		do {
+			printf(".");
+			if ((ret=jtag_rd_data(dr_tdi, sizeof(dr_tdi))) != 0) {
+				Writeln(); return ret;
+			}
+
+			if (write(mcs_hdl, dr_tdi, sizeof(dr_tdi)) != sizeof(dr_tdi)) {
+				Writeln();
+				perror("error writing file");
+				return CEN_PROMPT;
+			}
+
+			lx +=sizeof(dr_tdi);
+		} while (lx < size0);
+
+		Writeln();
+		return CE_PROMPT;
+
+	}
+
+	if (mode == 0) {
+//
+//--- ISP PROM programmieren
+//
+		jtag_instruction(ISPEN);
+		jtag_data(0x04, 6);
+
+		ret=jtag_instruction(FADDR);
+		if (ret != 0x11) printf("FADDR.0 %02X\n", ret);
+		jtag_data(1, 16);
+		jtag_instruction(FERASE);
+
+		ux=0; do dout +=(*jt_data)(); while (++ux < 1000);	// mindestens 500
+//		delay(1);
+		jtag_instruction(NORMRST);
+
+		ret=jtag_instruction(BYPASS);
+		if (ret != 0x01) printf("BYPASS.0 %02X\n", ret);
+
+		jtag_instruction(ISPEN);
+		jtag_data(0x04, 6);
+
+		lx=0;
+		do {
+			if (!(lx &0xFFF)) { printf("."); pt=1; }
+			ux=0;
+			do {
+				do {
+					if ((ret=MCS_record()) != 0) {
+						Writeln();
+						if (ret == -1) ret=CE_FORMAT;
+
+						return ret;
+					}
+
+				} while ((mcs_record.type != 0) && (mcs_record.type != 1));
+
+				if (mcs_record.type == 1) {
+					Writeln();
+					printf("END record\n");
+					break;
+				}
+
+				uy=0;
+				do dr_tdi[ux++] =mcs_record.data[uy++];
+				while (uy < mcs_record.bc);
+
+			} while (ux < data0);
+
+			lx +=ux;
+			while (ux < data0) dr_tdi[ux++] =0xFF;
+
+			jtag_instruction(FDATA0);
+			if ((ret=jtag_wr_data(dr_tdi, data0, -1)) != 0) return ret;
+
+			if (lx <= data0) {
+				ret=jtag_instruction(FADDR);
+				if (ret != 0x11) printf("FADDR.1 %02X\n", ret);
+
+				jtag_data(0, 16);
+			}
+
+			jtag_instruction(FPGM);
+			ux=0; do dout +=(*jt_data)(); while (++ux < 1000);	// mindestens 500
+		} while (mcs_record.type == 0);
+
+		ret=jtag_instruction(FADDR);
+		if (ret != 0x11) printf("FADDR.2 %02X\n", ret);
+
+		jtag_data(1, 16);
+		jtag_instruction(SERASE);
+		ux=0; do dout +=(*jt_data)(); while (++ux < 1000);	// mindestens 500
+
+		jtag_instruction(NORMRST);
+
+		ret=jtag_instruction(BYPASS);
+		if (ret != 0x01) printf("BYPASS.1 %02X\n", ret);
+
+		printf("0x%06lX byte written\n", lx);
+		mcs_ix  =1;
+		mcs_blen=1;
+		lseek(mcs_hdl, 0, SEEK_SET);
+		Writeln(); pt=0;
+		printf("verify\n");
+	}
+//
+//--- ISP PROM ruecklesen und vergleichen
+//
+	jtag_instruction(ISPEN);
+	jtag_data(0x34, 6);
+	ret=jtag_instruction(FADDR);
+	if (ret != 0x11) printf("FADDR.3 %02X\n", ret);
+
+	jtag_data(0, 16);
+	jtag_instruction(FVFY1);
+
+	ux=0;
+	do dout +=(*jt_data)(); while (++ux < 50);	// mindestens 20
+	ex=0; lx=0;
+	while (1) {
+		if ((ret=jtag_rd_data(dr_tdi, sizeof(dr_tdi))) != 0) return ret;
+
+		printf("."); pt=1;
+		ux=0;
+		do {
+			do {
+				if ((ret=MCS_record()) != 0) {
+					Writeln();
+					if (ret == -1) ret=CE_FORMAT;
+
+					return ret;
+				}
+
+				if (mcs_record.type == 1) {
+					Writeln();
+					printf("END record");
+					return CE_PROMPT;
+				}
+
+			} while (mcs_record.type != 0);
+
+			uy=0;
+			do {
+				if (dr_tdi[ux] != mcs_record.data[uy]) {
+					if (pt) { Writeln(); pt=0; }
+					printf("%06lX: error, exp %02X, is %02X\n",
+							 lx, mcs_record.data[uy], dr_tdi[ux]);
+					if (++ex >= 20) {
+						return CE_PROMPT;
+					}
+				}
+
+				ux++; uy++; lx++;
+			} while (uy < mcs_record.bc);
+		} while (ux < sizeof(dr_tdi));
+	}
+
+}
+//
+//--------------------------- jtag_svf --------------------------------------
+//
+static int jtag_svf(void)
+{
+	int		ret;
+	u_long	dx;
+	int		arg;
+	u_int		i;
+	u_int		ix,lx;
+	char		*fname;
+	int		hd;
+	u_int		date, time;
+	u_char	*bf;
+	u_int		pt,ex;
+	u_long	tlen;
+
+	read_idcodes();
+	if (jtag_tab.state) return CE_PROMPT;
+
+	printf("device    %3u ", jt_conf->jtag_dev);
+	jt_conf->jtag_dev=(u_int)Read_Deci(jt_conf->jtag_dev, -1);
+	if (errno) return 0;
+
+	if ((ret=jtag_select(jt_conf->jtag_dev)) != 0) return ret;
+
+	fname =(jt_conf->jtag_dev < C_JT_NM) ? jt_conf->jtag_svf_file[jt_conf->jtag_dev] :
+													jt_conf->jtag_svf_file[C_JT_NM-1];
+	printf("SVF file name ");
+	strcpy(fname,
+			 Read_String(fname, sizeof(jt_conf->jtag_svf_file[0])));
+	if (errno) return 0;
+
+	if ((hd=_rtl_open(fname, O_RDONLY)) == -1) {
+		perror("error opening MCS file");
+		return CE_PROMPT;
+	}
+
+	_dos_getftime(hd, &date, &time);
+	close(hd);
+	printf("time stamp: %02u.%02u.%02u  %2u:%02u:%02u\n",
+			 date&0x1F, (date>>5)&0x0F, (date>>9)-20,
+			 (time>>11)&0x1F, (time>>5)&0x3F, (time<<1)&0x3F);
+	if ((svfdat=fopen(fname, "r")) == 0) {
+		perror("error opening file");
+		return CE_PROMPT;
+	}
+
+	i=0; sc_line=0;
+	pt=0; ex=0;
+	tlen=0;
+	while (1) {
+		svf_line[svf_ix=0]=0;
+		if ((ret=svf_token()) <= SC_UNDEF) {
+			if (ret == SC_UNDEF) { i=0; break; }
+
+			return CEN_PROMPT;
+		}
+
+		if (ret == SC_COMMENT) {
+//			printf("%s\n", svf_line);
+			continue;
+		}
+
+		if (ret > SC_RUNTEST) {
+			if (pt) { Writeln(); pt=0; }
+			printf("illegal SVF command %d in line %u\n", ret, sc_line);
+			svf_line[80]=0;
+			printf("%s\n", svf_line);
+			return CEN_PROMPT;
+		}
+
+		if (ret < SC_SIR) continue;
+
+		sc_command=ret;
+		svf_ix +=svf_a2bin(0, svf_line+svf_ix);
+
+		if ((svf_line[svf_ix] != ' ') && (svf_line[svf_ix] != TAB)) { i=1; break; }
+
+		if (sc_command == SC_RUNTEST) {
+			if (svf_token() != SC_TCK) { i=2; break; }
+
+			if (svf_token() != SC_SEMICOLON) { i=3; break; }
+
+//	printf("runtest %lu\n", svf_value);
+			jtag_runtest(svf_value);
+			continue;
+		}
+
+		if (!(sc_length=(u_int)svf_value)) { i=4; break; }
+
+		lx=(sc_length+7) /8;
+		if (lx > sizeof(dr_tdi)) {
+			if (pt) { Writeln(); pt=0; }
+			printf("date to long %u, in line\n", lx, sc_line);
+			return CEN_PROMPT;
+		}
+
+		tdo_val=0;
+		if (lx <= 4) {
+			while (1) {
+				ret=svf_token();
+				if ((ret < SC_TDI) || (ret > SC_MASK)) break;
+
+				arg=ret;
+				if ((ret=svf_token()) != SC_BRACKET_O) break;
+
+				svf_ix +=svf_a2bin(1, svf_line+svf_ix);
+				if ((ret=svf_token()) != SC_BRACKET_C) break;
+
+				if (sc_command == SC_SIR)
+					switch (arg) {
+			case SC_TDI:
+						lvir_tdi=(u_int)svf_value; break;
+
+			case SC_TDO:
+						tdo_val=1;
+						lvir_tdo=(u_int)svf_value; break;
+
+			case SC_SMASK:
+						break;
+
+			case SC_MASK:
+						lvir_mask=(u_int)svf_value; break;
+					}
+				else
+					switch (arg) {
+			case SC_TDI:
+						lvdr_tdi=svf_value; break;
+
+			case SC_TDO:
+						tdo_val=1;
+						lvdr_tdo=svf_value; break;
+
+			case SC_SMASK:
+						break;
+
+			case SC_MASK:
+						lvdr_mask=svf_value; break;
+					}
+			}
+
+			if (ret != SC_SEMICOLON) { i=5; break; }
+
+			if (sc_command == SC_SIR) {
+				if (lvir_tdi == IDCODE) {
+					if (pt) { Writeln(); pt=0; }
+					printf(" read ID code\n");
+				}
+
+				if (lvir_tdi == ISPEN) {
+					if (pt) { Writeln(); pt=0; }
+					printf(" programming enable\n");
+				}
+
+				if (lvir_tdi == NORMRST) {
+					if (pt) { Writeln(); pt=0; }
+					printf(" programming disable\n");
+				}
+
+				if (lvir_tdi == FADDR) {
+					if (!(pt &0x3)) printf(".");
+					if (++pt >= 4*70) { Writeln(); pt=0; }
+				}
+
+// printf("%d %5u %8lX %8lX %8lX\n",
+// sc_command, sc_length, lvir_tdi, lvir_tdo, lvir_mask);
+				if (jtag_tab.devs[jtag_tab.select].ir_len != sc_length) {
+					if (pt) { Writeln(); pt=0; }
+					printf("illegal length of instruction register\n");
+					return CEN_PROMPT;
+				}
+
+				ret=jtag_instruction(lvir_tdi);
+				if (ret < 0) return CEN_PROMPT;
+
+				if (tdo_val && ((ret ^lvir_tdo) &lvir_mask)) {
+					if (pt) { Writeln(); pt=0; }
+					printf("line %d: IR %02X, exp: %02X/%02X, is: %02X\n",
+							 sc_line, (u_int)lvir_tdi, (u_int)lvir_tdo, (u_int)lvir_mask, (u_int)ret);
+					return CEN_PROMPT;
+				}
+
+				continue;
+			}
+
+// printf("%d %5u %8lX %8lX %8lX\n",
+// sc_command, sc_length, lvdr_tdi, lvdr_tdo, lvdr_mask);
+			dx=jtag_data(lvdr_tdi, sc_length);
+			if (tdo_val && ((dx ^lvdr_tdo) &lvdr_mask)) {
+				if (pt) { Writeln(); pt=0; }
+				printf("illegal content of dr\n");
+				return CEN_PROMPT;
+			}
+
+			continue;
+		}
+//
+//--- DR ist Laenger als 32 Bit ---
+//
+		while (1) {
+			ret=svf_token();
+			if ((ret < SC_TDI) || (ret > SC_MASK)) break;
+
+			switch (arg=ret) {
+	case SC_TDI:
+				bf=dr_tdi; break;
+
+	case SC_TDO:
+				tdo_val=1;
+				bf=dr_tdo; break;
+
+	case SC_SMASK:
+				bf=0; break;
+
+	case SC_MASK:
+				bf=dr_mask; break;
+			}
+
+			if ((ret=svf_token()) != SC_BRACKET_O) break;
+
+			ix=lx;
+			while (ix) {
+				if ((ret=svf_byte()) < 0) break;
+
+				ix--;
+				if (bf) bf[ix] =ret;
+			}
+
+			if (ret < 0) break;
+
+			if ((ret=svf_token()) != SC_BRACKET_C) break;
+		}
+
+		if (ret != SC_SEMICOLON) { i=5; break; }
+
+#if 0
+printf("%d %5u\n",
+sc_command, sc_length);
+for (ix=0; ix < 8; ix++) printf(" %02X/%02X/%02X",
+										  dr_tdi[ix], dr_tdo[ix], dr_mask[ix]);
+Writeln();
+#endif
+		if (jtag_data_exchange()) return CEN_PROMPT;
+
+		if (!tdo_val) continue;
+
+		for (ix=0; ix < lx; ix++) {
+			if ((dr_tdo[ix] ^dr_itdo[ix]) &dr_mask[ix]) {
+				if (pt) { Writeln(); pt=0; }
+				printf("%06lX: error, exp %02X, is %02X\n",
+						 tlen+ix, dr_tdo[ix] &dr_mask[ix], dr_itdo[ix] &dr_mask[ix]);
+				if (++ex >= 20) {
+					return CE_PROMPT;
+				}
+			}
+		}
+
+		tlen +=lx;
+	}
+
+	if (pt) { Writeln(); pt=0; }
+	printf("%u: illegal character in line %u, column %u\n", i, sc_line, svf_ix);
+	svf_line[80]=0;
+	printf("%s\n", svf_line);
+	return CEN_PROMPT;
+}
+//
+//--------------------------- jtag_load -------------------------------------
+//
+static int jtag_load(void)
+{
+	int	ret;
+	int	tdo;
+
+	read_idcodes();
+	if (jtag_tab.state) return CE_PROMPT;
+
+	printf("device    %3u ", jt_conf->jtag_dev);
+	jt_conf->jtag_dev=(u_int)Read_Deci(jt_conf->jtag_dev, -1);
+	if (errno) return 0;
+
+	if ((ret=jtag_select(jt_conf->jtag_dev)) != 0) return ret;
+
+	jtag_instruction(ISPEN);
+	jtag_data(0x34, 6);
+	tdo=jtag_instruction(FADDR);
+	if (tdo != 0x11) printf("FADDR.0 %02X\n", tdo);
+
+	jtag_data(0x4000, 16);
+
+	jtag_runtest(1);
+	jtag_instruction(FDATA3);
+	jtag_data(0x1F, 6);
+
+	jtag_instruction(FPGM);
+	jtag_runtest(14000);
+
+	jtag_instruction(NORMRST);
+	jtag_runtest(110000L);
+
+	jtag_instruction(CONFIG);
+	printf("was jetzt NORMRST?\n");
+	return CEN_PROMPT;
+}
+//
+//--------------------------- JTAG_menu -------------------------------------
+//
+static char *const jtag_txt[] ={
+	"TDI", "TMS",  "TCK", "TDO", "?", "?", "?", "?",
+	"ena", "auto", "?",   "?",   "?", "?", "?", "?"
+};
+
+int JTAG_menu(
+	void		(*jtag_putcsr)(u_int),
+	u_int		(*jtag_getcsr)(void),
+	u_long	(*jtag_getdata)(void),
+	JT_CONF	*jtag_conf,
+	u_char	jtag_mode)
+{
+	u_int		ux;
+	char		hgh;
+	char		key;
+	int		ret;
+	u_long	tmp;
+
+	jt_putcsr=jtag_putcsr;
+	jt_getcsr=jtag_getcsr;
+	jt_data=jtag_getdata;
+	jt_conf=jtag_conf;
+	jt_mode=jtag_mode;
+
+	while (1) {
+		Writeln();
+		printf("JTAG csr              $%04X ..0 ", tmp=(*jtag_getcsr)());
+		ux=16; hgh=0;
+		while (ux--)
+			if (tmp &((u_long)1L <<ux)) {
+				if (hgh) highvideo(); else lowvideo();
+				hgh=!hgh; cprintf("%s", jtag_txt[ux]);
+			}
+		lowvideo(); cprintf("\r\n");
+
+		printf("JTAG data         $%08lX\n", (*jtag_getdata)());
+
+		printf("read IDCODEs (reset)        ..1\n");
+		printf("JTAG instruction            ..2\n");
+		printf("JTAG data exchange          ..3\n");
+		printf("JTAG program XC18V00 PROM   ..4\n");
+		printf("JTAG verify XC18V00 PROM    ..5\n");
+		printf("JTAG read and save binary   ..6\n");
+		printf("JTAG load FPGA              ..7\n");
+		printf("JTAG execute SVF file       ..8\n");
+		printf("                              %c ",
+					 jt_conf->jtag_menu);
+		key=toupper(getch());
+		if ((key == CTL_C) || (key == ESC)) {
+			Writeln();
+			(*jtag_putcsr)(0);
+			return 0;
+		}
+
+		while (1) {
+			use_default=(key == TAB);
+			if (use_default || (key == CR)) key=jt_conf->jtag_menu;
+
+			if (key >= ' ') printf("%c", key);
+			Writeln();
+			errno=0; ret=-2;
+			switch (key) {
+
+		case '0':
+				printf("JTAG ctrl   $%04X ", jt_conf->jtag_ctrl);
+				jt_conf->jtag_ctrl=(u_int)Read_Hexa(jt_conf->jtag_ctrl, -1);
+				if (errno) break;
+
+				(*jtag_putcsr)(jt_conf->jtag_ctrl);
+				ret=0;
+				break;
+
+		case '1':
+				ret=read_idcodes();
+				break;
+
+		case '2':
+				ret=jtag_instr(-1);
+				break;
+
+		case '3':
+				ret=jtag_exchange();
+				break;
+
+		case '4':
+		case '5':
+		case '6':
+				ret=jtag_prom(key-'4');
+				Writeln();
+				if (mcs_hdl != -1) { close(mcs_hdl); mcs_hdl=-1; }
+				if (jtag_tab.state == 1) {
+					jtag_rd_data(0, 0);
+					printf("%02X\n", jtag_instruction(NORMRST));
+					printf("%02X\n", jtag_instruction(BYPASS));
+				}
+				break;
+
+		case '7':
+				ret=jtag_load();
+				break;
+
+		case '8':
+				ret=jtag_svf();
+				if (svfdat) { fclose(svfdat); svfdat=0; }
+
+				break;
+
+			}
+
+			while (kbhit()) getch();
+			if (ret != -2) jt_conf->jtag_menu=key;
+
+			if (ret <= 0) break;
+
+			if (ret > CE_PROMPT) display_errcode(ret);
+
+			printf("select> ");
+			key=toupper(getch());
+			if (key == TAB) continue;
+
+			if (key < ' ') { Writeln(); break; }
+
+			if (key == ' ') key=CR;
+		}
+	}
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/jtag_tools/willi/jtag.h	(revision 22)
@@ -0,0 +1,31 @@
+// Borland C++ - (C) Copyright 1991, 1992 by Borland International
+
+// Header File
+
+//	jtag.h	-- JTAG protocol handler
+
+//
+// -------------------------- Configuration Buffer --------------------------
+//
+typedef struct {
+	char		jtag_menu;
+	char		tmp;
+	u_int		jtag_ctrl;
+	u_int		jtag_dev;
+	u_int		jtag_instr;
+	u_int		jtag_dlen;
+	u_long	jtag_data;
+
+#define C_JT_NM		2
+	char		jtag_file[C_JT_NM][80];
+	char		jtag_svf_file[C_JT_NM][80];
+} JT_CONF;
+//
+//--------------------------- global function -------------------------------
+//
+int JTAG_menu(
+	void		(*jtag_putcsr)(u_int),
+	u_int		(*jtag_getcsr)(void),
+	u_long	(*jtag_getdata)(void),
+	JT_CONF	*jtag_conf,
+	u_char	jtag_mode);
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Entries	(revision 22)
@@ -0,0 +1,3 @@
+D/conftabs////
+D/sis1100////
+D/dev////
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/netbsd
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Entries	(revision 22)
@@ -0,0 +1,3 @@
+/pcilkm_glue.c/1.2/Tue Sep  9 11:09:07 2003//
+/pcisupport.h/1.1/Tue Sep  9 11:09:08 2003//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/netbsd/conftabs
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcilkm_glue.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcilkm_glue.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcilkm_glue.c	(revision 22)
@@ -0,0 +1,89 @@
+/* $ZEL: pcilkm_glue.c,v 1.2 2003/09/09 11:09:07 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001
+ * 	Matthias Drochner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/ioctl.h>
+#include <sys/tty.h>
+#include <sys/file.h>
+#include <sys/proc.h>
+#include <sys/uio.h>
+#include <sys/kernel.h>
+#include <sys/vnode.h>
+#include <sys/malloc.h>
+#include <sys/mount.h>
+#include <sys/exec.h>
+#include <sys/syscallargs.h>
+#include <sys/conf.h>
+
+#include <sys/lkm.h>
+
+#include <sys/device.h>
+#include "pcisupport.h"
+
+extern struct cdevsw CDEVSW;
+
+#define MODNAME(n) __STRING(n)
+MOD_DEV(MODNAME(LKMNAME), LM_DT_CHAR, -1, &CDEVSW);
+
+int pcilkmhdl(struct lkm_table *, int);
+
+#define ENTRYNAME(n) __CONCAT(n, _lkmentry)
+int ENTRYNAME(LKMNAME)(struct lkm_table *, int, int);
+
+extern struct cfdata CFDATA;
+
+int
+pcilkmhdl(lkmtp, cmd)
+	struct lkm_table *lkmtp;	
+	int cmd;
+{
+
+	switch (cmd) {
+	case LKM_E_LOAD:
+		if (lkmexists(lkmtp))
+			return (EEXIST);
+		return (pcidev_load(&CFDATA));
+	case LKM_E_UNLOAD:
+		return (pcidev_unload(&CFDATA));
+	case LKM_E_STAT:
+		return (0);
+	default:
+		return (EINVAL);
+	}
+}
+
+int
+ENTRYNAME(LKMNAME)(lkmtp, cmd, ver)
+	struct lkm_table *lkmtp;	
+	int cmd;
+	int ver;
+{
+
+	DISPATCH(lkmtp, cmd, ver, pcilkmhdl, pcilkmhdl, pcilkmhdl);
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcisupport.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcisupport.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/conftabs/pcisupport.h	(revision 22)
@@ -0,0 +1,29 @@
+/* $Id: pcisupport.h,v 1.1 2003/09/09 11:09:08 wuestner Exp $ */
+/*
+ * Copyright (c) 2001
+ * 	Matthias Drochner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+int pcidev_load(struct cfdata *);
+int pcidev_unload(struct cfdata *);
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Entries	(revision 22)
@@ -0,0 +1,5 @@
+/locators.h/1.1/Mon Feb  3 17:35:25 2003//
+/makedevs/1.4/Mon Feb  3 17:35:25 2003//
+/opt_uvmhist.h/1.1/Mon Feb  3 17:35:25 2003//
+/Makefile/1.8/Tue Feb 10 16:14:28 2004//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/netbsd/sis1100
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/Makefile	(revision 22)
@@ -0,0 +1,67 @@
+#
+
+.PATH:	../conftabs
+.PATH:	../../dev/pci
+
+MKMAN=	no
+
+KMOD=	sis1100
+
+CPPFLAGS+= -DLKMNAME=$(KMOD) -DCDEVSW=$(KMOD)cdevsw -DCFDATA=$(KMOD)cfdata
+CPPFLAGS+= -I../..
+CFLAGS+= -Wall -Wmissing-prototypes -fstrict-prototypes
+
+SRCS= \
+    pcilkm_glue.c \
+    plx9054_reset.c \
+    plx9054dma_netbsd.c \
+    sis1100_autoconf_netbsd.c \
+    sis1100_init.c \
+    sis1100_open.c \
+    sis1100_irq.c \
+    sis1100_irq_thread.c \
+    sis1100_irq_handler.c \
+    sis1100_mbx0_handler.c \
+    sis3100rem_irq.c \
+    sis5100rem_irq.c\
+    sis1100_init_remote.c \
+    sis1100rem_init.c \
+    sis3100rem_init.c \
+    sis5100rem_init.c \
+    f1_rem_init.c \
+    vertex_rem_init.c \
+    sis1100_init_sdram.c \
+    sis1100_ioctl.c \
+    sis1100_mmap.c \
+    sis1100_read.c \
+    sis1100_write.c \
+    sis1100_poll.c \
+    sis1100_read_block.c \
+    sis1100_write_block.c \
+    sis1100_pipe_netbsd.c \
+    sis1100_write_pipe.c \
+    sis1100_tmp_read.c \
+    sis1100_tmp_write.c \
+    sis1100_read_dma.c \
+    sis1100_read_dma_netbsd.c \
+    sis1100_write_dma.c \
+    sis1100_write_dma_netbsd.c \
+    sis1100_read_loop.c \
+    sis1100_write_loop.c \
+    sis1100_front_io.c \
+    sis1100rem_front_io.c \
+    sis3100rem_front_io.c \
+    sis5100rem_front_io.c \
+    sis1100_synch_handler.c \
+    sis1100_lemo_handler.c \
+    sis1100_dsp.c \
+    sis1100_eeprom.c \
+    sis1100_dma_alloc_netbsd.c
+
+load:
+	modload -A /var/run/kernel.syms -p makedevs sis1100.o
+
+unload:
+	modunload -n sis1100
+
+.include <bsd.kmod.mk>
Index: /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/makedevs
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/makedevs	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/netbsd/sis1100/makedevs	(revision 22)
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+echo makedevs: $*
+
+# These definitions must match the definitions in sis1100_var.h
+MINORBITS=8
+MINORCARDBITS=2
+MINORTYPEBITS=2
+MINORUSERBITS=`expr $MINORBITS - $MINORCARDBITS - $MINORTYPEBITS`
+# USERBITS overwrites MINORUSERBITS
+USERBITS=1
+
+# minornumber: ccttuuuu
+
+module=sis1100.o
+basename=sis1100_
+devdir=/tmp
+mode=666
+owner=root
+group=wheel
+
+types0="vme"
+types1="ram"
+types2="ctrl"
+types3="dsp"
+
+mkname () {
+    card=$1
+    type=$2
+    user=$3
+    tname=`eval echo \\\$types$type`
+    name=$devdir/${basename}`printf '%d%d' $card $user`$tname
+    echo $name
+}
+
+shiftv () {
+    val=$1
+    i=$2
+    while [ $i -gt 0 ]; do
+        val=`expr $val \* 2`
+        i=`expr $i - 1`
+    done
+    echo $val
+}
+
+MAXCARDS=`shiftv 1 $MINORCARDBITS`
+#echo MAXCARDS $MAXCARDS
+CARDSHIFT=`expr $MINORUSERBITS + $MINORTYPEBITS`
+TYPESHIFT=$MINORUSERBITS
+MAXTYPES=`shiftv 1 $MINORTYPEBITS`
+#echo MAXTYPES $MAXTYPES
+MAXUSER=`shiftv 1 $USERBITS`
+#echo MAXUSER $MAXUSER
+
+rm -f $devdir/${basename}*
+
+card=`expr $MAXCARDS - 1`
+while [ $card -ge 0 ]; do
+    #echo card $card
+    type=`expr $MAXTYPES - 1`
+        while [ $type -ge 0 ]; do
+            #echo "  " type $type
+            user=`expr $MAXUSER - 1`
+            while [ $user -ge 0 ]; do
+                #echo "    " user $user
+                cardbits=`shiftv $card $CARDSHIFT`
+                typebits=`shiftv $type $TYPESHIFT`
+                minorbits=`expr $cardbits + $typebits + $user`
+                #echo "      " bits `printf '%x' $minorbits`
+                name=`mkname $card $type $user`
+                #echo mknod $name c $3 $minorbits
+                mknod $name c $3 $minorbits
+                user=`expr $user - 1`
+            done
+            type=`expr $type - 1`
+        done
+    card=`expr $card - 1`
+done
+
+chown $owner $devdir/${basename}*
+chgrp $group $devdir/${basename}*
+chmod $mode $devdir/${basename}*
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis3100.a:  sis3100_vme_calls.o sharc_utils.o
+	ar cr $@ $^
+
+sis3100_vme_calls.o: sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/Makefile~	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I../V2.02
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis3100.a:  sis3100_vme_calls.o sharc_utils.o
+	ar cr $@ $^
+
+sis3100_vme_calls.o: sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/header/sis9200.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/header/sis9200.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/header/sis9200.h	(revision 22)
@@ -0,0 +1,58 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis9200.h                                               */
+/*                                                                           */
+/* OS:               general                                                 */
+/*                                                                           */
+/* Description:      includes for SIS9200 SHARC                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        29.12.01                                                */
+/*                                                                           */
+/* Author:           MKI (Dr. Matthias Kirsch)                               */
+/*                                                                           */
+/* Last Change:      xx.xx.02 MKI     Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+#define SHARCRAM  0x81200000
+#define D48REG    0x81300000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.c	(revision 22)
@@ -0,0 +1,250 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sharc_utils.c                                           */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+
+/*===========================================================================*/
+/* Headers								     */
+/*===========================================================================*/
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+/* sis1100/3100 PCI to VME specific */   
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+#include "sis3100_vme_calls.h"
+
+/* SIS9200 DSP */
+#include "header/sis9200.h"
+    
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+#include "sharc_utils.h"
+
+
+/*===========================================================================*/
+/* Load DSP     					  		     */
+/*===========================================================================*/
+
+int load_dsp(int p, int p_sharc, char* dsppath){
+    int retcode=1;
+    int count=0,loadcount=0;
+    int offset;
+    int currentaddress ;
+    char line_in[128];
+    FILE *loaderfile;
+    unsigned int tempword[0x10000];
+    unsigned int read_tempword[0x10000];
+    u_int32_t data ;
+    u_int32_t addr ;
+
+  /* Enable Optical Control of SHARC */
+    offset =  0x00000300 ;
+    if ((retcode = s3100_control_write(p, offset, 0x00000800)) != 0) {  
+	printf("s3100_control_write:   retcode = 0x%08x\n", retcode ); 
+        return -1;
+    } 
+
+  /* set SHARC in Reset state */
+    offset =  0x00000300 ;
+    if ((retcode = s3100_control_write(p, offset, 0x01000000)) != 0) {  
+	printf("s3100_control_write:   retcode = 0x%08x\n", retcode ); 
+        return -1;
+    } 
+
+
+
+
+    loaderfile=fopen(dsppath,"r");
+    retcode = 1 ;
+    if (loaderfile>0) {
+       printf("loader file %s opened\n",dsppath);
+       while (retcode>0) {
+          tempword[count]= strtoul(line_in,NULL,16); 
+	  retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]); 
+          if (count<0x10000) {
+             count++;
+	  }
+          else {
+	     printf("load file size too big\n");
+             return -1;
+	  }
+      }
+      printf("load file length: %d\n",count);
+    
+    }
+    else {
+      printf("loader file %s not found\n",dsppath);
+      return -1;
+    }
+    fclose(loaderfile);
+
+    printf("loading SHARC DSP\n");
+
+    currentaddress=SHARCRAM;
+	   printf("currentaddress = 0x%08x\n", currentaddress ); 
+
+
+
+    loadcount=0 ;
+    while (loadcount<count) {  
+       addr = D48REG;
+       data = tempword[loadcount];
+
+       if ((retcode = s3100_sharc_write(p_sharc, addr, &data, 0x1))!= 4) { 
+	   printf("s3100_sharc_write:   retcode = 0x%08x\n", retcode ); 
+           return -1;
+       }
+       loadcount++;
+
+       addr = currentaddress;
+       data = ((tempword[loadcount+1] << 16 ) & 0xFFFF0000) + (tempword[loadcount] & 0x0000FFFF);
+
+       if ((retcode = s3100_sharc_write(p_sharc, addr, &data, 0x1)) != 4) {
+          printf("s3100_sharc_write:   retcode = 0x%08x\n", retcode );
+          return -1;
+       }         
+       currentaddress+=4;
+       loadcount+=2;
+    }
+
+
+/* read */
+    currentaddress=SHARCRAM;
+    loadcount=0 ;
+    while (loadcount<count) {  
+
+       addr = currentaddress;
+       if ((retcode = s3100_sharc_read(p_sharc, addr, &data, 0x1))!= 4) { 
+	   printf("s3100_sharc_read:   retcode = 0x%08x\n", retcode ); 
+           return -1;
+       }
+
+       read_tempword[loadcount+1] = (data) & 0x0000FFFF ;
+       read_tempword[loadcount+2] = (data >> 16) & 0x0000FFFF ;
+
+       addr = D48REG;
+       if ((retcode = s3100_sharc_read(p_sharc, addr, &data, 0x1))!= 4) { 
+	   printf("s3100_sharc_read:   retcode = 0x%08x\n", retcode ); 
+           return -1;
+       }
+       read_tempword[loadcount] = (data) & 0x0000FFFF ;
+       currentaddress+=4;
+       loadcount+=3;
+    }
+
+/* verifier */
+    loadcount=0 ;
+    while (loadcount<count) {  
+
+     if (read_tempword[loadcount] != tempword[loadcount]) {
+	   printf("Verifier ERROR     i = 0x%08x    written = 0x%08x     read = 0x%08x    \n",
+                                           loadcount, tempword[loadcount], read_tempword[loadcount] ); 
+         return -1;
+       }
+       loadcount++;
+    }
+
+
+
+
+
+
+    /* start SHARC */
+    printf("starting SHARC DSP\n");
+    offset =  0x00000300 ;
+     if ((retcode = s3100_control_write(p, offset, 0x0100)) != 0) {     
+       printf("s3100_control_write:   retcode = 0x%08x\n", retcode );
+       return -1;
+    }         
+ return 0 ;
+}
+
+
+
+
+
+
+/*===========================================================================*/
+/* reset DSP   			     		                             */
+/*===========================================================================*/
+int reset_dsp(int p) {
+    int retcode;
+    int offset;
+    /* Reset SHARC */
+    printf("resetting SHARC DSP\n");
+    offset =  0x00000300 ;
+  /* Enable Optical Control of SHARC */
+    if ((retcode = s3100_control_write(p, offset, 0x00000800)) != 0) {  
+	printf("s3100_control_write:   retcode = 0x%08x\n", retcode ); 
+        return -1;
+    } 
+
+  /* set SHARC in Reset state */
+    if ((retcode = s3100_control_write(p, offset, 0x01000000)) != 0) {
+	printf("s3100_control_write:   retcode = 0x%08x\n", retcode ); 
+        return -1;
+    } 
+   return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sharc_utils.h	(revision 22)
@@ -0,0 +1,44 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sharc_utils.h                                           */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+int reset_dsp(int p);
+int load_dsp(int p, int p_sharc, char* dsp_path);
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c	(revision 22)
@@ -0,0 +1,958 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.c                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.2                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         05.11.03                                                */
+/* Modified:         21.06.04                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis3100_vme_calls.h"
+
+
+
+
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+int vmesysreset(int p)
+{
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x2 /*data*/) != 0x0)   return -1 ;
+  usleep(500000); /* 500ms (min. 200ms) */
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x20000 /*data*/)  != 0x0)   return -1 ;
+  return 0 ;
+}
+
+/********************************/
+/*                              */
+/*    VME Read IRQ Ackn. Cycle  */
+/*                              */
+/********************************/
+
+/* VME Read IRQ Ackn.  Cycles */
+
+int vme_IACK_D8_read(int p, u_int32_t vme_irq_level, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x4000; /*  */
+  req.addr= (vme_irq_level << 1) + 1;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)  return -1 ;
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+
+}
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+/* VME A16  Read Cycles */
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x29; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+
+}
+
+
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+/* VME A16  Write Cycles */
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+/* VME A24  Read Cycles */
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x39; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+/* VME A24  Write Cycles */
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+/* VME A32  Read Cycles */
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x9; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;    /* NEW */
+  return 0 ;
+}
+
+
+
+
+
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+/* VME A32  Write Cycles */
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+
+int s3100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+ 
+/* return_code = length ? */
+/*
+res=write(p_sharc_desc, data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+ 
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+  return return_code ;
+}
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sdram_desc, ptr_data, num_of_lwords*4);
+  
+/* return_code = length ? */
+/*
+res=write(p, &data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sdram_desc, ptr_data, num_of_lwords*4);
+
+
+  return return_code ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.c~	(revision 22)
@@ -0,0 +1,938 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.c                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.2                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         05.11.03                                                */
+/* Modified:         17.06.04                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis3100_vme_calls.h"
+
+
+
+
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+int vmesysreset(int p)
+{
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x2 /*data*/) != 0x0)   return -1 ;
+  usleep(500000); /* 500ms (min. 200ms) */
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x20000 /*data*/)  != 0x0)   return -1 ;
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+/* VME A16  Read Cycles */
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x29; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+
+}
+
+
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+/* VME A16  Write Cycles */
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+/* VME A24  Read Cycles */
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x39; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+/* VME A24  Write Cycles */
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+/* VME A32  Read Cycles */
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x9; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;    /* NEW */
+  return 0 ;
+}
+
+
+
+
+
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+/* VME A32  Write Cycles */
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+
+int s3100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+ 
+/* return_code = length ? */
+/*
+res=write(p_sharc_desc, data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+ 
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+  return return_code ;
+}
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sdram_desc, ptr_data, num_of_lwords*4);
+  
+/* return_code = length ? */
+/*
+res=write(p, &data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sdram_desc, ptr_data, num_of_lwords*4);
+
+
+  return return_code ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h	(revision 22)
@@ -0,0 +1,226 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.h                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         21.06.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+
+int vmesysreset(int p) ;
+
+/********************************/
+/*                              */
+/*    VME Read IRQ Ackn. Cycle  */
+/*                              */
+/********************************/
+
+int vme_IACK_D8_read(int p, u_int32_t vme_irq_level, u_int8_t* vme_data ) ;
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data) ;
+int s3100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords ) ;
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )  ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis3100_calls/sis3100_vme_calls.h~	(revision 22)
@@ -0,0 +1,218 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.h                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         02.06.02                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+
+int vmesysreset(int p) ;
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data) ;
+int s3100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords ) ;
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )  ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis5100.a:  sis5100_camac_calls.o
+	ar cr $@ $^
+
+sis5100_camac_calls.o: sis5100_camac_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/Makefile~	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis5100.a:  sis5100_vme_calls.o sharc_utils.o
+	ar cr $@ $^
+
+sis5100_vme_calls.o: sis5100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c	(revision 22)
@@ -0,0 +1,130 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.c                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          0.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        22.06.04                                                */
+/*                                                                           */
+/* Author:           MKI                                                     */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis5100_camac_calls.h"
+
+
+/*******************/
+/*                 */
+/*    CAMAC_NAF    */
+/*                 */
+/*******************/
+
+
+int camac_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.data=camac_data;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  return req.error;
+}
+}
+
+int camac_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  *camac_data=req.data;
+  /* printf("reqdata: %8.8x\n",req.data); */
+  return req.error;
+}
+}
+
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+
+
+int s5100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+int s5100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.c~	(revision 22)
@@ -0,0 +1,130 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.c                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          0.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        22.06.04                                                */
+/*                                                                           */
+/* Author:           MKI                                                     */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis5100_camac_calls.h"
+
+
+/*******************/
+/*                 */
+/*    CAMAC_NAF    */
+/*                 */
+/*******************/
+
+
+int camac_naf_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.data=camac_data;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  return req.error;
+}
+}
+
+int camac_naf_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  *camac_data=req.data;
+  /* printf("reqdata: %8.8x\n",req.data); */
+  return req.error;
+}
+}
+
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+
+
+int s5100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+int s5100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h	(revision 22)
@@ -0,0 +1,60 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.h                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         09.07.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+/*****************/
+/*               */
+/*    CAMAC      */
+/*               */
+/*****************/
+int camac_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data) ;
+int camac_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+int s5100_control_read(int p, int offset, u_int32_t* data) ;
+int s5100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/sis5100_calls/sis5100_camac_calls.h~	(revision 22)
@@ -0,0 +1,60 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.h                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         21.06.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+/*****************/
+/*               */
+/*    CAMAC      */
+/*               */
+/*****************/
+int camac_naf_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data) ;
+int camac_naf_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+int s5100_control_read(int p, int offset, u_int32_t* data) ;
+int s5100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/Makefile	(revision 22)
@@ -0,0 +1,15 @@
+CPPFRAGS := -I. -I../dev/pci
+CFLAGS := -g
+test_3100: \
+    test_3100.o \
+    check_3100_path.o \
+    check_3100_vme_probe.o \
+    check_3100_reopen.o \
+    check_3100_rw.o \
+    check_3100_mapsize.o \
+    check_3100_mmap.o \
+    check_3100_ident.o \
+    check_3100_rw_single.o \
+    check_3100_r_block.o \
+    check_3100_w_block.o \
+    check_3100_vme_block_read.o 
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_ident.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_ident.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_ident.c	(revision 22)
@@ -0,0 +1,59 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+static void
+print_ident(struct sis1100_ident_dev* ident)
+{
+    printf("  hw_type   =%2d ", ident->hw_type);
+    switch (ident->hw_type) {
+        case 1: printf(" (PCI/PLX)"); break;
+        case 2: printf(" (VME)"); break;
+        case 3: printf(" (CAMAC/FERA)"); break;
+        case 4: printf(" (LVD/SCSI)"); break;
+    }
+    printf("\n");
+    printf("  hw_version=%2d\n", ident->hw_version);
+    printf("  fw_type   =%2d\n", ident->fw_type);
+    printf("  fw_version=%2d\n", ident->fw_version);
+}
+
+int
+check_IDENT(struct path* path)
+{
+    if (ioctl(path->p, SIS1100_IDENT, &path->ident)<0) {
+        printf("ioctl(%s, SIS1100_IDENT): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    switch (path->type) {
+    case sis1100_subdev_remote:
+        printf("Local Interface:\n");
+        print_ident(&path->ident.local);
+        if (path->ident.remote_ok) {
+            printf("Remote Interface:\n");
+            print_ident(&path->ident.remote);
+            printf("  remote interface o%sline\n",
+                    path->ident.remote_online?"n":"ff");
+        } else
+            printf("no remote interface\n");
+        break;
+#if MAJORVERSION >= 2
+    case sis1100_subdev_ctrl: {
+        u_int32_t val;
+        if (path->map) {
+            /* read first word */
+            val=path->map[0];
+            printf("subdev_ctrl: map[0]=0x%08x\n", val);
+            path->map[0]=0x12345678;
+            val=path->map[0];
+            printf("subdev_ctrl: map[0]=0x%08x\n", val);
+        }
+        }
+        break;
+#endif
+    }
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mapsize.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mapsize.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mapsize.c	(revision 22)
@@ -0,0 +1,90 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_MAPSIZE(struct path* path)
+{
+#if SIS1100_Version < 0x20000
+    switch (path->type) {
+    case sis1100_subdev_remote: {
+        struct sis1100_mapinfo info;
+        info.space=2;
+        if (ioctl(path->p, SIS1100_MAPINFO, &info)<0) {
+            printf("ioctl(%s, SIS1100_MAPINFO, space=2): %s\n",
+                    path->name, strerror(errno));
+            printf("sizeof off_t is %d\n", sizeof(off_t));
+            return -1;
+        }
+        path->mapsize=info.size;
+        if (info.offset!=0) {
+            printf("ioctl(%s, SIS1100_MAPINFO, space=2): "
+                    "offset=0x%08llx (should be 0)\n",
+                    path->name, info.offset);
+            return -1;
+        }
+    }
+    break;
+    case sis1100_subdev_ram: {
+        off_t max;
+        max=lseek(path->p, 0, SEEK_END);
+        if (max==(off_t)-1) {
+            printf("lseek(%s, 0, SEEK_END): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+        path->mapsize=max;
+    }
+    break;
+    /* no default */
+    }
+#else
+    if (ioctl(path->p, SIS1100_MAPSIZE, &path->mapsize)<0) {
+        printf("ioctl(%s, SIS1100_MAPSIZE): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#endif
+
+    printf("%s: mapsize=0x%x", path->name, path->mapsize);
+    if (path->mapsize>=(1<<20))
+        printf(" (%d MByte)", path->mapsize>>20);
+    else if (path->mapsize>=(1<<10))
+        printf(" (%d KByte)", path->mapsize>>10);
+    printf("\n");
+    switch (path->type) {
+    case sis1100_subdev_remote:
+        if (!path->mapsize)
+            printf("%s: no map available; but no real error\n", path->name);
+        else if (path->mapsize!=0x10000000) {
+            printf("%s: wrong mapsize 0x%x (should be 0x10000000)\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+    case sis1100_subdev_ram: break;
+#if SIS1100_Version >= 0x20000
+    case sis1100_subdev_ctrl:
+        if (path->mapsize!=0x1000) {
+            printf("%s: unexpected mapsize 0x%x (should be 0x1000)\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        if (path->mapsize) {
+            printf("%s: unexpected mapsize 0x%x (dsp can not be mapped (yet))\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+    default:
+        printf("check_MAPSIZE: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mmap.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mmap.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_mmap.c	(revision 22)
@@ -0,0 +1,64 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_mmap(struct path* path)
+{
+#if SIS1100_Version < 0x20000
+    if (path->type!=sis1100_subdev_remote) return 0;
+#endif
+
+    if (!path->mapsize) return 0;
+    path->map=mmap(0, path->mapsize, PROT_READ|PROT_WRITE,
+            MAP_FILE|MAP_SHARED/*|MAP_VARIABLE*/, path->p, 0);
+
+    if (path->map==MAP_FAILED) {
+        printf("mmap(%s, 0x%x): %s\n", path->name, path->mapsize,
+            strerror(errno));
+        path->map=0;
+    } else
+        printf("%s: 0x%x Bytes mapped at %p\n", path->name, path->mapsize,
+            path->map);
+ 
+    switch (path->type) {
+    case sis1100_subdev_remote:
+        if (!path->map)
+            printf("  Not a real error.\n");
+        else
+            printf("  OK.\n");
+        break;
+    case sis1100_subdev_ram:
+        if (!path->map)
+            printf("  As expected.\n");
+        else {
+            printf("  But that is not possible (yet).\n");
+            return -1;
+        }
+        break;
+#if SIS1100_Version >= 0x20000
+    case sis1100_subdev_ctrl:
+        if (!path->map) {
+            printf("  But it should work.\n");
+            return -1;
+        } else
+            printf("  OK.\n");
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        if (!path->map)
+            printf("  OK.\n");
+        else {
+            printf("  But that is not possible (yet).\n");
+            return -1;
+        }
+        break;
+    default:
+        printf("check_mmap: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_path.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_path.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_path.c	(revision 22)
@@ -0,0 +1,90 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+init_path(struct path* path)
+{
+    path->type=-1;
+    path->p=-1;
+    path->mapsize=0;
+    path->map=0;
+
+    path->p=open(path->name, O_RDWR, 0);
+    if (path->p<0) {
+        printf("open \"%s\": %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    if (ioctl(path->p, SIS1100_DEVTYPE, &path->type)<0) {
+        printf("ioctl(%s, SIS1100_DEVTYPE): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+
+#ifdef SIS1100_DRIVERVERSION
+    {
+    int version;
+    if (ioctl(path->p, SIS1100_DRIVERVERSION, &version)<0) {
+        printf("ioctl(%s, SIS1100_DRIVERVERSION):\n    %s\n",
+                path->name, strerror(errno));
+        if (MAJORVERSION>1) {
+            printf("    Major version does not match; path cannot be used\n");
+            return -1;
+        }
+    } else {
+        path->majorversion=(version>>16)&0xffff;
+        path->minorversion=version&0xffff;
+        printf("%s: driverversion is %d.%d\n",
+            path->name,
+            path->majorversion,
+            path->minorversion);
+        if (path->majorversion!=MAJORVERSION) {
+            printf("Major version does not match; path cannot be used\n");
+            return -1;
+        }
+    }
+    }
+#else
+    if (MAJORVERSION>1) {
+        printf("    Major version does not match; path cannot be used\n");
+        return -1;
+    }
+#endif
+
+    switch (path->type) {
+    case sis1100_subdev_remote:
+        printf("%s is <REMOTE>\n", path->name);
+        break;
+    case sis1100_subdev_ram:
+        printf("%s is RAM\n", path->name);
+        break;
+#if MAJORVERSION >= 2
+    case sis1100_subdev_ctrl:
+        printf("%s is CTRL\n", path->name);
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        printf("%s is DSP\n", path->name);
+        break;
+    default:
+        printf("init_path: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+    return 0;
+}
+
+int
+done_path(struct path* path)
+{
+    if (path->map) {
+        if (munmap((u_int32_t*)path->map, path->mapsize)<0)
+            printf("munmap(%s): %s\n",
+                path->name, strerror(errno));
+    }
+    if (path->p>=0) close(path->p);
+    return 0;
+}
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_r_block.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_r_block.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_r_block.c	(revision 22)
@@ -0,0 +1,77 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_r_block(struct path* path, u_int32_t start, u_int32_t max)
+{
+    int i, res, first, count, size;
+
+    printf("check_r_block: max=0x%08x\n", max);
+
+    for (i=0; i<max; i++) {
+        buf[i]=i;
+    }
+
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+
+    for (i=0; i<max; i++) {
+        res=write(path->p, buf+i, 4);
+        if (res!=4) {
+            printf("\nwrite(%s, start+%d): %s\n", path->name, i, strerror(errno));
+            return -1;
+        }
+    }
+
+    for (size=max; size<=max; size++) {
+        if (lseek(path->p, start, SEEK_SET)!=start) {
+            printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                    path->name, start, strerror(errno));
+            return -1;
+        }
+        for (i=0; i<size; i++) {
+            buf[i]=~i;
+        }
+        res=read(path->p, buf, 4*size);
+        if (res!=4*size) {
+            u_int32_t err;
+            printf("\nread(%s, ..., 4*%d): ", path->name, size);
+            if (res&3) printf("res=%d\n", res);
+            if (res>=0) {
+                printf("res=%d (%4d)\n", res/4, size-res/4);
+            } else {
+                printf("%s\n", strerror(errno));
+            }
+            if (ioctl(path->p, SIS1100_LAST_ERROR, &err)<0) {
+                printf("\nioctl(%s, LAST_ERROR): %s\n",
+                    path->name, strerror(errno));
+            } else {
+                if (err==0x211)
+                    return 0;
+                else
+                    printf("prot_err: 0x%x\n", err);
+            }
+            return -1;
+        }
+        first=1; count=0;
+        for (i=0; i<size; i++) {
+            if (buf[i]!=i) {
+                if (first) {
+                    printf("\n%s: check_r_block (max=%d size=%d):\n",
+                            path->name, max, size);
+                    first=0;
+                }
+                printf("[%3d]: %08x --> %08x\n", i, i, buf[i]);
+                count++;
+            }
+        }
+        if (count) return -1;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reopen.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reopen.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reopen.c	(revision 22)
@@ -0,0 +1,37 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_reopen(struct path* path)
+{
+    int p;
+
+    /* try to open the device a second time */
+    p=open(path->name, O_RDWR, 0);
+#if MAJORVERSION < 2
+    if (p<0) {
+        printf("open \"%s\" a second time: %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+    close(p);
+#else
+    if (p>=0) {
+        printf("open \"%s\" a second time: success (but it should fail)\n",
+                path->name);
+        close(p);
+        return -1;
+    }
+    if (errno!=EBUSY) {
+        printf("open \"%s\" a second time returns \"%s\" "
+                "(but EBUSY is expected)\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#endif
+    return 0;
+}
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reset.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reset.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_reset.c	(revision 22)
@@ -0,0 +1,25 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+static int
+check_RESET(struct path* path)
+{
+    if (path->type!=sis1100_subdev_remote) return 0;
+#ifdef SIS1100_REMOTE_RESET
+    if (ioctl(path->p, SIS1100_REMOTE_RESET, &path->mapsize)<0) {
+        printf("ioctl(%s, SIS3100_RESET): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#else
+    if (ioctl(path->p, SIS3100_RESET, &path->mapsize)<0) {
+        printf("ioctl(%s, SIS3100_RESET): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#endif
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw.c	(revision 22)
@@ -0,0 +1,95 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+/*
+static int
+check_rw_remote(struct path* path)
+{
+    struct vmespace space;
+    int res, size;
+
+    printf("testing sdram over VME\n");
+    if (vme_probe(path, VMESTART)) return 0;
+
+    space.am=0x9;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    if (check_rw_single(path, VMESTART, 10000)<0) return -1;
+
+    space.am=0xb;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    size=1;
+    while (check_rw_block(path, VMESTART, size)>=0) {
+        printf(".");
+        fflush(stdout);
+        size<<=4;
+    }
+    printf("OK.\n");
+    return 0;
+}
+*/
+
+static int
+check_rw_ram(struct path* path)
+{
+    printf("testing sdram\n");
+    if (check_rw_single(path, 0, 1000)<0) return -1;
+    if (check_r_block(path, 0, bufsize)<0) return -1;
+    if (check_w_block(path, 0, bufsize)<0) return -1;
+    printf("OK.\n");
+    return 0;
+}
+
+static int
+check_rw_ctrl(struct path* path)
+{
+    return 0;
+}
+
+static int
+check_rw_dsp(struct path* path)
+{
+    return 0;
+}
+
+int
+check_rw(struct path* path)
+{
+    int res;
+    switch (path->type) {
+    case sis1100_subdev_remote:
+        /*if ((res=check_rw_remote(path))<0) return res;*/
+        break;
+    case sis1100_subdev_ram:
+        if ((res=check_rw_ram(path))<0) return res;
+        break;
+#if MAJORVERSION >= 2
+    case sis1100_subdev_ctrl:
+        if ((res=check_rw_ctrl(path))<0) return res;
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        if ((res=check_rw_dsp(path))<0) return res;
+        break;
+    default:
+        printf("check_rw: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+    return 0;
+}
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw_single.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw_single.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_rw_single.c	(revision 22)
@@ -0,0 +1,62 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_rw_single(struct path* path, u_int32_t start, u_int32_t size)
+{
+    u_int32_t *in, *out;
+    int i, res, first, count;
+
+    in=calloc(size, 4);
+    out=calloc(size, 4);
+    if (!in || !out) {
+        printf("cannot allocate %d words for in- and output\n", size);
+        free(in); free(out);
+        return -1;
+    }
+
+    for (i=0; i<size; i++) {
+        out[i]=random();
+        in[i]=~out[i];
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("check_rw_single: lseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<size; i++) {
+        res=write(path->p, out+i, 4);
+        if (res!=4) {
+            printf("write(%s, ..., 4): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("check_rw_single: lseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<size; i++) {
+        res=read(path->p, in+i, 4);
+        if (res!=4) {
+            printf("read(%s, ..., 4): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+    }
+    first=1; count=0;
+    for (i=0; i<size; i++) {
+        if (in[i]!=out[i]) {
+            if (first) {
+                printf("%s: rw error:", path->name);
+                first=0;
+            }
+            printf("[%3d]: %08x --> %08x\n", i, out[i], in[i]);
+            count++;
+        }
+    }
+    return count?-1:0;
+}
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_block_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_block_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_block_read.c	(revision 22)
@@ -0,0 +1,53 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+
+#define ADDR 0
+#define MAX 100
+#define LOOPS 10000
+
+int
+check_VME_BLOCK_READ(struct path* path, u_int32_t start, u_int32_t size)
+{
+    struct sis1100_vme_block_req req;
+    int res, i;
+
+    if (path->type!=sis1100_subdev_remote) return 0;
+    if (!path->ident.remote_online) {
+        printf("remote Interface is offline.\n");
+        return 0;
+    }
+    if (path->ident.remote.hw_type!=sis1100_hw_vme) {
+        printf("remote Interface is not VME.\n");
+        return 0;
+    }
+
+    req.size=4;
+    req.fifo=1;
+    req.am=0xb;
+    req.addr=ADDR;
+    req.data=(u_int8_t*)buf;
+
+    for (i=0; i<=LOOPS; i++) {
+        req.num=MAX;
+        req.error=0;
+        res=ioctl(path->p, SIS3100_VME_BLOCK_READ, &req);
+        if (res<0) {
+            printf("VME_BLOCK_READ: errno=%s\n", strerror(errno));
+            break;
+        } else {
+            if (req.error!=0x211) {
+                printf("VME_BLOCK_READ: num=%d, error=0x%x\n", req.num, req.error);
+                break;
+            }
+        }
+    }
+    if (i<LOOPS) {
+        printf("VME_BLOCK_READ: aborted after %d loops\n", i);
+    }
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_probe.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_probe.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_vme_probe.c	(revision 22)
@@ -0,0 +1,28 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+vme_probe(struct path* path, u_int32_t addr)
+{
+    struct vmespace space;
+    int res;
+
+    space.am=0x9;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    res=ioctl(path->p, SIS3100_VME_PROBE, &addr);
+    if (res) {
+        printf("VME_PROBE(%s, 0x%08x): %s\n", path->name, addr, strerror(errno));
+    }
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_w_block.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_w_block.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/check_3100_w_block.c	(revision 22)
@@ -0,0 +1,74 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+int
+check_w_block(struct path* path, u_int32_t start, u_int32_t max)
+{
+    int i, res, first, count;
+    u_int32_t x=0xa5a55a5a;
+
+    printf("check_w_block: max=0x%08x buf=%p\n", max, buf);
+    for (i=0; i<max; i++) {
+        buf[i]=i;
+    }
+/*
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+
+    for (i=0; i<max; i++) {
+        res=write(path->p, &x, 4);
+        if (res!=4) {
+            printf("\nwrite(%s, start+%d): %s\n", path->name, i, strerror(errno));
+            return -1;
+        }
+    }
+*/
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+
+    res=write(path->p, buf, 4*max);
+    if (res!=4*max) {
+        printf("\nwrite(%s, ..., 4*%d): %s\n", path->name, max, strerror(errno));
+        return -1;
+    }
+return -1;
+
+    for (i=0; i<max; i++) {
+        buf[i]=~i;
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<max; i++) {
+        res=read(path->p, buf+i, 4);
+        if (res!=4) {
+            printf("\nread(%s, start+%d): %s", path->name, i, strerror(errno));
+            return -1;
+        }
+    }
+    first=1; count=0;
+    for (i=0; i<max; i++) {
+        if (buf[i]!=i) {
+            if (first) {
+                printf("\n%s: check_w_block (max=%d):\n",
+                        path->name, max);
+                first=0;
+            }
+            if (count<10) printf("[%3d/%p]: %08x --> %08x\n", i, buf+i, i, buf[i]);
+            count++;
+        }
+    }
+    if (count) return -1;
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.c	(revision 22)
@@ -0,0 +1,154 @@
+/*
+ * $ZEL$
+ */
+
+#include "test_3100.h"
+
+u_int32_t* buf;
+int bufsize;
+
+struct path* pathes;
+int numpathes;
+
+static void
+printusage(int argc, char* argv[])
+{
+    printf("usage: %s [-h] pathnames...\n",
+        argv[0]);
+}
+
+static void
+printhelp(int argc, char* argv[])
+{
+printf("printhelp not yet implemented\n");
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c, i;
+    const char* args="h";
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': printhelp(argc, argv); break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || optind==argc) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    numpathes=argc-optind;
+    pathes=malloc(numpathes*sizeof(struct path));
+    for (i=0; i<numpathes; i++) {
+        pathes[i].name=argv[optind+i];
+        pathes[i].p=-1;
+    }
+
+    return 0;
+}
+
+typedef int(*testfunc)(struct path*);
+struct testfunc {
+    testfunc func;
+    char* name;
+};
+
+struct testfunc funcs[]={
+    init_path,                          "INIT",
+    check_reopen,                       "REOPEN",
+    /*check_RESET,*/
+    check_MAPSIZE,                      "MAPSIZE",
+    check_mmap,                         "MMAP", /* requires check_MAPSIZE */
+    check_IDENT,                        "IDENT", /* can use check_mmap */
+
+    /*check_rw,*/
+    check_VME_BLOCK_READ,               "VME_BLOCK_READ",
+
+#if 0
+    check_SETVMESPACE,
+    check_VME_PROBE,
+    check_VME_READ,
+    check_VME_WRITE,
+    check_VME_BLOCK_WRITE,
+    check_CONTROL_READ,
+    check_CONTROL_WRITE,
+    check_CONTROL_READ,
+    check_CONTROL_WRITE,
+    check_PIPE,
+    check_LAST_ERROR,
+    check_FIFOMODE,
+
+    check_BIGENDIAN,
+
+    check_IRQ_CTL,
+    check_IRQ_GET,
+    check_IRQ_ACK,
+    check_IRQ_WAIT,
+
+    check_MINDMALEN,
+
+    check_FRONT_IO,
+    check_FRONT_PULSE,
+    check_FRONT_LATCH,
+
+    check_VME_SUPER_BLOCK_READ,
+    check_WRITE_PIPE,
+
+    check_DMA_ALLOC,
+    check_DMA_FREE,
+
+    check_DUMP,
+#endif
+};
+int numfuncs=sizeof(funcs)/sizeof(struct testfunc);
+
+int main(int argc, char* argv[])
+{
+    int res=0, i, j;
+
+    printf("\n==== SIS1100/3100 Test; V2.01 ====\n\n");
+
+#if SIS1100_Version>0
+    printf("%s is compiled for version %d.%d of sis1100 driver\n",
+        argv[0],
+        MAJORVERSION,
+        MINORVERSION);
+#else
+    printf("the version %s is compiled for is not known; we assume %d.%d\n",
+            argv[0],
+        MAJORVERSION,
+        MINORVERSION);
+#endif
+
+    if (getoptions(argc, argv)<0) return 1;
+
+    bufsize=1024000;
+    buf=calloc(bufsize, 4);
+    if (!buf) {
+        printf("\ncannot allocate %d words\n", bufsize);
+        return -1;
+    }
+
+    srandom(17);
+
+    for (i=0; i<numfuncs; i++) {
+        printf("\nTesting %s:\n", funcs[i].name);
+        for (j=0; j<numpathes; j++) {
+            if (funcs[i].func(pathes+j)<0) {res=i+3; goto raus;}
+        }
+    }
+
+raus:
+    for (j=0; j<numpathes; j++) done_path(pathes+j);
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test.orig/test_3100.h	(revision 22)
@@ -0,0 +1,65 @@
+/*
+ * $ZEL$
+ */
+
+#ifndef _test_3100_h_
+#define _test_3100_h_
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#ifndef SIS1100_Version
+#   define MAJORVERSION 1
+#   define MINORVERSION 0
+#else
+#   define MAJORVERSION ((SIS1100_Version>>16)&0xffff)
+#   define MINORVERSION (SIS1100_Version&0xffff)
+#endif
+
+#if MAJORVERSION < 2
+enum sis1100_subdev {sis1100_subdev_remote, sis1100_subdev_ram,
+    sis1100_subdev_dsp};
+#endif
+
+#define VMESTART 0x84000000
+
+struct path {
+    char* name;
+    enum sis1100_subdev type;
+    int p;
+    int majorversion;
+    int minorversion;
+    u_int32_t mapsize;
+    volatile u_int32_t* map;
+    struct sis1100_ident ident;
+};
+
+extern u_int32_t* buf;
+extern int bufsize;
+
+int init_path(struct path* path);
+int done_path(struct path* path);
+int vme_probe(struct path* path, u_int32_t addr);
+int check_reopen(struct path* path);
+int check_rw(struct path* path);
+int check_MAPSIZE(struct path* path);
+int check_mmap(struct path* path);
+int check_IDENT(struct path* path);
+int check_rw_single(struct path* path, u_int32_t start, u_int32_t size);
+int check_r_block(struct path* path, u_int32_t start, u_int32_t max);
+int check_w_block(struct path* path, u_int32_t start, u_int32_t max);
+int check_VME_BLOCK_READ(struct path* path, u_int32_t start, u_int32_t size);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/test/#camac.c#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/#camac.c#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/#camac.c#	(revision 22)
@@ -0,0 +1,602 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include "devopen.h"
+
+#include "dev/pci/sis1100_var.h"
+#include "dev/pci/sis5100_map.h"
+
+typedef int (*camacproc)(struct devinfo* dev, u_int32_t N, u_int32_t A,
+        u_int32_t F, u_int32_t* data);
+
+#define CAMAC(base, N, A, F) \
+    ((base)+(((F)<<9)|((N)<<4)|(A)))
+
+static int
+camac_mapped(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    if ((F&0x18)==0x10) {
+        u_int32_t err;
+        *camaddr=*data;
+        err=*(dev->base_ctrl+0x2B);
+        *data=(~err<<24)&0xc0000000;
+        if (err && !(err&0xc0)) {
+            printf("camac_mapped: err=0x%x\n", err);
+            return -1;
+        }
+    } else { /* read or control */
+        *data=*camaddr^0xc0000000;
+    }
+    return 0;
+}
+
+static int 
+camac_mapped_w(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    u_int32_t err;
+
+    *camaddr=*data;
+    err=*(dev->base_ctrl+0x2B);
+    *data=(~err<<24)&0xc0000000;
+    if (err && !(err&0xc0)) {
+        printf("camac_mapped: err=0x%x\n", err);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+camac_mapped_r(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    *data=(*CAMAC(dev->base_remote, N, A, F))^0xc0000000;
+    return 0;
+}
+
+static int
+camac_driver_vme(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int res;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+    req.data=*data;
+    req.error=0;
+
+    if ((F&0x18)==0x10) {
+        res=ioctl(dev->p_remote, SIS3100_VME_WRITE, &req);
+        *data=(~req.error<<24)&0xc0000000;
+    } else {
+        res=ioctl(dev->p_remote, SIS3100_VME_READ, &req);
+        *data=req.data^0xc0000000;
+    }
+    if (res) {
+        printf("driver_vme: res=%d\n", res);
+        return -1;
+    }
+    if (req.error&~0x2c0) {
+        printf("driver_vme: error=0x%x\n", req.error);
+        return -1;
+    }
+    return 0;
+}
+
+static __inline int
+camac_driver(struct devinfo* dev, u_int32_t N, u_int32_t A, u_int32_t F,
+    u_int32_t* data)
+{
+    struct sis1100_camac_req req;
+    int res;
+
+    req.N=N;
+    req.A=A;
+    req.F=F;
+    req.data=*data;
+    req.error=0;
+
+    res=ioctl(dev->p_remote, SIS5100_CNAF, &req);
+    if (res) {
+        printf("driver_camac: res=%d\n", res);
+        return -1;
+    }
+    if (req.error) {
+        printf("driver_camac: error=0x%x\n", req.error);
+        return -1;
+    }
+    *data=req.data;
+    return 0;
+}
+#if 0
+static void
+test_inhibit(int p)
+{
+    struct sis1100_ctrl_reg reg;
+
+    while (1) {
+        reg.offset=0x100;
+        reg.val=0xffff;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+
+        reg.offset=0x100;
+        reg.val=0xffff0000;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+    }
+}
+#else
+static void
+test_inhibit(int p)
+{
+    int d=1;
+
+    while (1) {
+        if (ioctl(p, SIS5100_CCCI, &d)<0) {
+            fprintf(stderr, "ioctl(SIS5100_CCCI, %d): %s\n",
+                d, strerror(errno));
+            return;
+        }
+        d=1-d;
+        sleep(1);
+    }    
+}
+#endif
+
+static int
+camac_count_driver_vme(struct devinfo* dev, int num)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int N=20;
+    int A=0;
+    int F=16;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+
+    for (; num; num--) {
+        int res;
+
+        req.data=num;
+
+        res=ioctl(p, SIS3100_VME_WRITE, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error&0x3f) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_driver_camac(struct devinfo* dev, int num)
+{
+    struct sis1100_camac_req req;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    req.N=20;
+    req.A=0;
+    req.F=16;
+
+    for (; num; num--) {
+        int res;
+        req.data=num;
+
+        res=ioctl(p, SIS5100_CNAF, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_mapped(struct devinfo* dev, int num)
+{
+    int F=16;
+    int N=20;
+    int A=0;
+    volatile u_int32_t *addr;
+
+    if (!dev->base_remote) return -1;
+    addr=CAMAC(dev->base_remote, N, A, F);
+    
+    for (; num; num--) {
+        *addr=num;
+    }
+    return 0;
+}
+
+typedef int (*countproc)(struct devinfo* dev, int num);
+
+static void
+camac_count(struct devinfo* dev, countproc proc, const char* text, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    int res;
+
+    gettimeofday(&tv0, 0);
+    res=proc(dev, num);
+    gettimeofday(&tv1, 0);
+    if (res) return;
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/num;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302(struct devinfo* dev, camacproc proc, const char* text, int N,
+    int num)
+{
+    u_int32_t d, i, x;
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+
+    d=1;
+    proc(dev, N, 1, 17, &d); /* set MODE to CAMAC */
+    camac_mapped(dev, N, 1, 1, &d); printf("mode: %x\n", d&3);
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        proc(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            d=i;
+            proc(dev, N, 0, 16, &d); /* write data */
+            if (!(d&0xc0000000)) {
+                printf("fill_4302: QX: 0x%08x\n", d);
+                break;
+            }
+        }
+    }
+    gettimeofday(&tv1, 0);
+    camac_mapped(dev, N, 0, 1, &d); printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302_mapped(struct devinfo* dev, const char* text, int N,
+    int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(b) initial err: 0x%x, balance=%d\n", err, d);
+
+    *CAMAC(base, N, 1, 17)=1; /* set MODE to CAMAC */
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(set mode) err: 0x%x, balance=%d\n", err, d);
+
+    /* read mode */
+    d=*CAMAC(base, N, 1, 1); printf("mode: %x\n", d&3);
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(read mode) err: 0x%x, balance=%d\n", err, d);
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        addr=CAMAC(base, N, 0, 17);
+        *addr=0; /* set ADDR */
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 16);
+        for (i=0; i<num; i++) {
+            *addr=i;
+            /*err=*(dev->base_ctrl+0x2B);*/
+/*
+ *             if (err&0xc0) {
+ *                 printf("fill_4302_mapped: QX: 0x%x\n", err);
+ *                 goto raus;
+ *             }
+ */
+        }
+        do {
+            err=*(dev->base_ctrl+0x2B);
+            d=*(dev->base_ctrl+0x2A);
+        } while (err==0x107);
+        if (err) {
+            printf("(after write) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302(struct devinfo* dev, camacproc proc, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        camac_mapped(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            proc(dev, N, 0, 0, &d); /* read data */
+            if (!(d&0xc0000000)) {
+                printf("read_4302: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if ((d&~0xc0000000)!=(i&0xffefff)) {
+                printf("read_4302[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    proc(dev, N, 0, 1, &d); printf("addr after read: 0x%x, i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302_mapped(struct devinfo* dev, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    addr=CAMAC((u_int32_t*)0, N, 0, 17); /* set ADDR */
+    printf("offset=%p\n", addr);
+
+    gettimeofday(&tv0, 0);
+    for (x=1; x; x--) {
+        addr=CAMAC(base, N, 0, 17); /* set ADDR */
+        *addr=0;
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 0); /* read data */
+        for (i=0; i<num; i++) {
+            d=*addr;
+            if (d&0xc0000000) {
+                printf("read_4302_mapped: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if (d!=(i&0xffefff)) {
+                printf("read_4302_mapped[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after read: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+int main(int argc, char* argv[])
+{
+    struct devinfo devinfo;
+    struct sis1100_ident ident;
+
+    if (argc<2)
+        {
+        fprintf(stderr, "usage: %s path_1 path_2 ...\n", argv[0]);
+        return 1;
+        }
+
+    if (open_dev(argv+1, &devinfo)<0) return 2;
+
+    {
+        int p;
+
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p<0) {
+            printf("neither ctrl nor remote device open.\n");
+            return 3;
+        }
+        if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n", strerror(errno));
+            return 4;
+        }
+        printf("local:\n");
+        printf("  hw_type   : %d\n",   ident.local.hw_type);
+        printf("  hw_version: %d\n",   ident.local.hw_version);
+        printf("  fw_type   : %d\n",   ident.local.fw_type);
+        printf("  fw_version: %d\n\n", ident.local.fw_version);
+        printf("remote:\n");
+        printf("  hw_type   : %d\n",   ident.remote.hw_type);
+        printf("  hw_version: %d\n",   ident.remote.hw_version);
+        printf("  fw_type   : %d\n",   ident.remote.fw_type);
+        printf("  fw_version: %d\n\n", ident.remote.fw_version);
+
+        printf("  remote side is %s and %svalid\n",
+            ident.remote_online?"online":"offline",
+            ident.remote_ok?"":"not ");
+
+        if ((ident.local.hw_type!=1)||(ident.local.hw_version!=1)||
+            (ident.local.fw_type!=1)) {
+            fprintf(stderr, "unsupported bord version\n");
+            return 4;
+        }
+    }
+
+    if (devinfo.base_ctrl!=MAP_FAILED) {
+        printf("size of mapped ctrl space  : %d\n", devinfo.size_ctrl);
+    }
+    if (devinfo.base_remote!=MAP_FAILED) {
+        struct sis1100_ctrl_reg reg;
+        const int mapidx=0;
+        u_int32_t offs=0x400+16*mapidx;
+        u_int32_t header=0x0f010000; /* 4 byte; remote space 1; no AM */
+        int res=0;
+        int p=devinfo.p_ctrl;
+
+        printf("size of mapped remote space: %d\n", devinfo.size_remote);
+
+        reg.offset=offs+0;
+        reg.val=header;
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+4;
+        reg.val=0; /* address modifier */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+8;
+        reg.val=0; /* address base */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+12;
+        reg.val=0; /* high part of 64 bit address */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+        if (res) {
+            printf("mapping of CAMAC space failed.\n");
+        }
+    }
+
+#if 0
+    if (devinfo.p_remote>=0) {
+        test_inhibit(devinfo.p_ctrl);
+    } else {
+        printf("remote path not open.\n");
+    }
+#endif
+
+#if 0
+    camac_count(&devinfo, camac_count_driver_vme,   "vme   ", 1000000);
+    camac_count(&devinfo, camac_count_driver_camac, "camac ", 1000000);
+    camac_count(&devinfo, camac_count_mapped,       "mapped", 1000000);
+#endif
+
+#if 0
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_vme(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_camac(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        if (devinfo.base_remote!=MAP_FAILED) {
+            camac_count_mapped(devinfo);
+        } else {
+            printf("CAMAC space not mapped.\n");
+        }
+    }
+#endif
+
+#if 0
+    fill_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    read_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    fill_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    read_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    fill_4302_mapped(&devinfo, "fill_mapped_m", 21, 1000);
+    fill_4302(&devinfo, camac_mapped_w, "fill_mapped_w", 21, 1000);
+    read_4302(&devinfo, camac_mapped_r, "read_mapped_r", 21, 1000);
+    read_4302(&devinfo, camac_mapped, "read_mapped", 21, 1000);
+#endif
+    read_4302_mapped(&devinfo, "read_mapped_m", 21, 1000);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Entries
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Entries	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Entries	(revision 22)
@@ -0,0 +1,57 @@
+/Ioctrl/1.1/Fri Jun 21 20:53:45 2002//
+/Makefile.in/1.2/Mon Aug 19 10:54:35 2002//
+/TestProgramme/1.2/Thu Sep 27 15:45:24 2001//
+/block_rw.c/1.3/Mon Sep  2 14:06:51 2002//
+/commands.h/1.1/Tue Nov 27 09:33:04 2001//
+/config.guess/1.1/Fri Jun 21 20:53:45 2002//
+/config.sub/1.1/Fri Jun 21 20:53:45 2002//
+/configure/1.2/Mon Aug 19 10:54:37 2002//
+/configure.in/1.2/Mon Aug 19 10:54:38 2002//
+/find_caen.c/1.2/Fri Jun 21 20:52:26 2002//
+/find_sis.c/1.1/Fri Jun  7 22:45:16 2002//
+/frontin_1100.c/1.2/Mon Aug 19 10:54:38 2002//
+/frontin_3100.c/1.1/Fri Jun 21 20:53:46 2002//
+/frontirqtest.c/1.1/Fri Jun 21 20:53:46 2002//
+/frontout_1100.c/1.1/Fri Jun 21 20:53:46 2002//
+/frontout_3100.c/1.1/Fri Jun 21 20:53:47 2002//
+/glinktest_local_read.c/1.2/Mon Aug 19 10:54:38 2002//
+/glinktest_local_rw.c/1.2/Mon Aug 19 10:54:39 2002//
+/gnuplot.ini/1.2/Mon Aug 19 10:54:39 2002//
+/ident.c/1.2/Fri Jun 21 20:52:26 2002//
+/install-sh/1.1/Fri Jun 21 20:53:47 2002//
+/iotest.c/1.2/Mon Aug 19 10:54:39 2002//
+/irqtest.c/1.3/Mon Aug 19 10:54:40 2002//
+/irqtest_ngf.c/1.2/Mon Aug 19 10:54:40 2002//
+/linkirqtest.c/1.1/Fri Jun 21 20:53:47 2002//
+/linkirqtest1.c/1.2/Mon Aug 19 10:54:40 2002//
+/maptest.c/1.2/Mon Aug 19 10:54:41 2002//
+/modules.idents/1.1/Fri Jun 21 20:53:48 2002//
+/pipeline.c/1.3/Fri Jun 21 20:52:27 2002//
+/pipeline1.c/1.2/Mon Aug 19 10:54:41 2002//
+/plot_speed.c/1.2/Mon Aug 19 10:54:41 2002//
+/read_write_driver.c/1.3/Mon Aug 19 10:54:42 2002//
+/read_write_driver_1.c/1.2/Mon Aug 19 10:54:42 2002//
+/read_write_driver_a.c/1.3/Mon Aug 19 10:54:42 2002//
+/readout_v550.c/1.1/Fri Jun 21 20:53:48 2002//
+/readout_v729.c/1.1/Fri Jun 21 20:53:48 2002//
+/reset1100.c/1.2/Mon Aug 19 10:54:43 2002//
+/reset3100.c/1.2/Fri Jun 21 20:52:27 2002//
+/sdram_rw.c/1.1/Tue Nov 13 19:05:01 2001//
+/sdram_rw_1.c/1.1/Tue Nov 13 19:05:01 2001//
+/sdram_rw_2.c/1.1/Tue Nov 13 19:05:01 2001//
+/sdram_rw_3.c/1.1/Tue Nov 13 19:05:01 2001//
+/sdram_rw_4.c/1.1/Tue Nov 13 19:05:02 2001//
+/sdram_rw_4_test.c/1.1/Tue Nov 13 19:05:02 2001//
+/sdram_rw_5.c/1.3/Wed Feb 27 09:59:08 2002//
+/sdram_rw_6.c/1.1/Tue Nov 27 09:20:21 2001//
+/sdram_rw_7.c/1.1/Fri Jun 21 20:53:48 2002//
+/sdram_rw_a1.c/1.2/Mon Aug 19 10:54:43 2002//
+/sdram_rw_a2.c/1.2/Mon Aug 19 10:54:43 2002//
+/sdram_rw_a3.c/1.2/Mon Aug 19 10:54:44 2002//
+/sdram_rw_a4.c/1.2/Mon Aug 19 10:54:44 2002//
+/shortblock.c/1.1/Thu Aug 22 14:41:13 2002//
+/synctest.c/1.2/Mon Aug 19 10:54:44 2002//
+/test_3100.c/1.5/Sun Oct 13 23:58:24 2002//
+/test_mapsize.c/1.2/Mon Aug 19 10:54:44 2002//
+/tests.txt/1.1/Tue Nov 27 09:33:04 2001//
+D
Index: /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Repository
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Repository	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Repository	(revision 22)
@@ -0,0 +1,1 @@
+sis1100_cmc/sis1100/test
Index: /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Root
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Root	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/CVS/Root	(revision 22)
@@ -0,0 +1,1 @@
+:pserver:wuestner@zelcvs.zel.kfa-juelich.de:/cvsroot
Index: /drsdaq/VME/struck/sis1100/V2.02/test/Ioctrl
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/Ioctrl	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/Ioctrl	(revision 22)
@@ -0,0 +1,36 @@
+sis1100 init
+sis3100 init
+
+sis1100_open
+sis1100_release
+sis1100_ioctl
+sis1100_llseek
+sis1100_read
+sis1100_write
+sis1100_mmap
+
+SIS1100_CLEAR_USE_COUNT
+SIS1100_CONTROL_READ
+SIS1100_CONTROL_WRITE
+SIS3100_CONTROL_READ
+SIS3100_CONTROL_WRITE
+SIS1100_IDENT
+SIS1100_BIGENDIAN (?)
+SIS1100_KIO_LEN
+SIS1100_FRONT_IO
+SIS1100_LAST_ERROR
+SIS1100_DUMP
+
+SIS1100_MAPINFO
+SIS1100_PIPE
+SIS1100_SETVMESPACE
+SIS3100_VME_PROBE
+SIS3100_VME_READ
+SIS3100_VME_WRITE
+SIS3100_VME_BLOCK_READ
+SIS3100_VME_BLOCK_WRITE
+SIS1100_FIFOMODE
+SIS3100_IRQ_CTL
+SIS3100_IRQ_GET
+SIS3100_IRQ_ACK
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/Makefile	(revision 22)
@@ -0,0 +1,1462 @@
+# $ZEL: Makefile.in,v 1.2 2002/08/19 10:54:35 wuestner Exp $
+
+srcdir = .
+
+
+
+CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat -Wuninitialized
+#                -Werror
+
+DRIVERBASE   := $(srcdir)/..
+DRIVERINCLUDE:= $(DRIVERBASE)/common
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I. -I..
+CFLAGS       := -O3 -ansi $(WFLAGS)
+
+cfiles       := $(notdir $(wildcard $(srcdir)/*.c))
+#cfiles       := linkirqtest.c linkirqtest1.c frontirqtest.c test_mapsize.c \
+                frontin_3100.c frontin_1100.c frontout_3100.c frontout_1100.c \
+                maptest.c find_caen.c
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+clean:
+	rm -f *.o core $(EXEC)
+
+realclean:  clean
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	rm Makefile.bak
+
+distclean:  clean
+	rm -f *.bak *.bck Makefile
+	rm -f config.status configure config.cache config.log
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+block_rw.o: block_rw.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
+  /usr/include/asm/sockios.h /usr/include/netinet/in.h \
+  /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/netdb.h \
+  ../dev/pci/sis1100_var.h /usr/include/linux/ioctl.h
+camac.o: camac.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/sys/time.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/xlocale.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h devopen.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h ../dev/pci/sis5100_map.h
+devopen.o: devopen.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/param.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/linux/param.h /usr/include/asm/param.h devopen.h \
+  ../dev/pci/sis1100_var.h /usr/include/linux/ioctl.h
+eeprom.o: eeprom.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+find_caen.o: find_caen.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+find_sis.o: find_sis.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+frontin_1100.o: frontin_1100.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+frontin_3100.o: frontin_3100.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+frontirqtest.o: frontirqtest.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+frontout_1100.o: frontout_1100.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+frontout_3100.o: frontout_3100.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+glinktest_local_read.o: glinktest_local_read.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/environments.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdlib.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/xlocale.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+glinktest_local_rw.o: glinktest_local_rw.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/environments.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdlib.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/xlocale.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+ident.o: ident.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+iotest.o: iotest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+irqtest.o: irqtest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+irqtest_ngf.o: irqtest_ngf.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+linkirqtest.o: linkirqtest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+linkirqtest1.o: linkirqtest1.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+maptest.o: maptest.c
+pipeline.o: pipeline.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+pipeline1.o: pipeline1.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+plot_speed.o: plot_speed.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
+  /usr/include/asm-generic/errno-base.h /usr/include/string.h \
+  /usr/include/sys/socket.h /usr/include/sys/uio.h \
+  /usr/include/bits/uio.h /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm/sockios.h \
+  /usr/include/netinet/in.h /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
+  /usr/include/sys/stat.h /usr/include/bits/stat.h
+read_write_driver.o: read_write_driver.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+read_write_driver_1.o: read_write_driver_1.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+read_write_driver_a.o: read_write_driver_a.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+readout_v550.o: readout_v550.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+readout_v729.o: readout_v729.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+reset1100.o: reset1100.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+reset3100.o: reset3100.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw.o: sdram_rw.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_1.o: sdram_rw_1.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_2.o: sdram_rw_2.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_3.o: sdram_rw_3.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_4.o: sdram_rw_4.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_4_test.o: sdram_rw_4_test.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_5.o: sdram_rw_5.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_6.o: sdram_rw_6.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_7.o: sdram_rw_7.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_a1.o: sdram_rw_a1.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_a2.o: sdram_rw_a2.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
+  /usr/include/asm/sockios.h /usr/include/netinet/in.h \
+  /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/netdb.h \
+  ../dev/pci/sis1100_var.h /usr/include/linux/ioctl.h
+sdram_rw_a3.o: sdram_rw_a3.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sdram_rw_a4.o: sdram_rw_a4.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
+  /usr/include/asm/sockios.h /usr/include/netinet/in.h \
+  /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/netdb.h \
+  ../dev/pci/sis1100_var.h /usr/include/linux/ioctl.h
+shortblock.o: shortblock.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
+  /usr/include/asm/sockios.h /usr/include/netinet/in.h \
+  /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/netdb.h \
+  ../dev/pci/sis1100_var.h /usr/include/linux/ioctl.h
+synctest.o: synctest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+test_3100.o: test_3100.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+test_mapsize.o: test_mapsize.c /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/environments.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdlib.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/xlocale.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
Index: /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.bak	(revision 22)
@@ -0,0 +1,113 @@
+# $ZEL: Makefile.in,v 1.2 2002/08/19 10:54:35 wuestner Exp $
+
+srcdir = .
+
+
+
+CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat -Wuninitialized
+#                -Werror
+
+DRIVERBASE   := $(srcdir)/..
+DRIVERINCLUDE:= $(DRIVERBASE)/common
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I. -I..
+CFLAGS       := -O3 -ansi $(WFLAGS)
+
+cfiles       := $(notdir $(wildcard $(srcdir)/*.c))
+#cfiles       := linkirqtest.c linkirqtest1.c frontirqtest.c test_mapsize.c \
+                frontin_3100.c frontin_1100.c frontout_3100.c frontout_1100.c \
+                maptest.c find_caen.c
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+clean:
+	rm -f *.o core $(EXEC)
+
+realclean:  clean
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	rm Makefile.bak
+
+distclean:  clean
+	rm -f *.bak *.bck Makefile
+	rm -f config.status configure config.cache config.log
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+eeprom.o: eeprom.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+maptest.o: maptest.c
+plot_speed.o: plot_speed.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
+  /usr/include/asm-generic/errno-base.h /usr/include/string.h \
+  /usr/include/sys/socket.h /usr/include/sys/uio.h \
+  /usr/include/bits/uio.h /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm/sockios.h \
+  /usr/include/netinet/in.h /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
+  /usr/include/sys/stat.h /usr/include/bits/stat.h
Index: /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.in
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.in	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/Makefile.in	(revision 22)
@@ -0,0 +1,51 @@
+# $ZEL: Makefile.in,v 1.2 2002/08/19 10:54:35 wuestner Exp $
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+@SET_MAKE@
+
+CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat -Wuninitialized
+#                -Werror
+
+DRIVERBASE   := @driverbase@
+DRIVERINCLUDE:= $(DRIVERBASE)/common
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I.
+CFLAGS       := -O3 -ansi $(WFLAGS)
+
+cfiles       := $(notdir $(wildcard $(srcdir)/*.c))
+#cfiles       := linkirqtest.c linkirqtest1.c frontirqtest.c test_mapsize.c \
+                frontin_3100.c frontin_1100.c frontout_3100.c frontout_1100.c \
+                maptest.c find_caen.c
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+clean:
+	rm -f *.o core $(EXEC)
+
+realclean:  clean
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	rm Makefile.bak
+
+distclean:  clean
+	rm -f *.bak *.bck Makefile
+	rm -f config.status configure config.cache config.log
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
Index: /drsdaq/VME/struck/sis1100/V2.02/test/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/Makefile~	(revision 22)
@@ -0,0 +1,113 @@
+# $ZEL: Makefile.in,v 1.2 2002/08/19 10:54:35 wuestner Exp $
+
+srcdir = .
+
+
+
+CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat -Wuninitialized
+#                -Werror
+
+DRIVERBASE   := $(srcdir)/..
+DRIVERINCLUDE:= $(DRIVERBASE)/common
+CPPFLAGS     := -I$(DRIVERINCLUDE) -I.
+CFLAGS       := -O3 -ansi $(WFLAGS)
+
+cfiles       := $(notdir $(wildcard $(srcdir)/*.c))
+#cfiles       := linkirqtest.c linkirqtest1.c frontirqtest.c test_mapsize.c \
+                frontin_3100.c frontin_1100.c frontout_3100.c frontout_1100.c \
+                maptest.c find_caen.c
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+clean:
+	rm -f *.o core $(EXEC)
+
+realclean:  clean
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	rm Makefile.bak
+
+distclean:  clean
+	rm -f *.bak *.bck Makefile
+	rm -f config.status configure config.cache config.log
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+eeprom.o: eeprom.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/xlocale.h /usr/include/sys/types.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/alloca.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h ../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+maptest.o: maptest.c
+plot_speed.o: plot_speed.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
+  /usr/include/asm-generic/errno-base.h /usr/include/string.h \
+  /usr/include/sys/socket.h /usr/include/sys/uio.h \
+  /usr/include/bits/uio.h /usr/include/bits/socket.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/limits.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm/sockios.h \
+  /usr/include/netinet/in.h /usr/include/stdint.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \
+  /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
+  /usr/include/sys/stat.h /usr/include/bits/stat.h
Index: /drsdaq/VME/struck/sis1100/V2.02/test/TestProgramme
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/TestProgramme	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/TestProgramme	(revision 22)
@@ -0,0 +1,64 @@
+ident (OK)
+    liest Ident-Register mittels PLXREADLOCAL0 und
+    liest gespeicherte IDs aus dem Treiber mit SIS1100_IDENT
+
+inttest (partiell OK)
+    benutzt einen SIS3600, um VME-IRQ zu erzeugen.
+    	Noch unvollstaendig, Signal wird an User_prozess geliefert;
+	Abholen der Daten (Level, Vector fehlt noch)
+
+pipeline (A32/D16 OK)
+    pipeline-read ohne DMA, Daten werden im Treiber kopiert.
+
+reset1100 (OK)
+reset3100 (OK)
+    Setzt die lokale oder remote Seite zurueck. Danach sollte der Treiber neu
+    	geladen werden, da sein erwarteter setup ja kaputt ist.
+    
+synctest (OK)
+    macht nur sinnvollen Output, wenn der optische Link unzuverlaessig ist.
+
+read_write_driver (OK)
+    VME-Zugriffe als SIS1100_VME_READ, SIS1100_VME_WRITE
+    nur A32/D32 getestet
+
+read_write_driver_a (read OK)
+    VME-Zugriffe als SIS1100_VME_READ, SIS1100_VME_WRITE, CAEN-Variante
+    nur A32/D16 read getestet
+
+read_write_driver_1 (read OK)
+    VME-Zugriffe als PLXREADLOCAL0, PLXWRITELOCAL0; remote space 1
+    nur als Test gedacht, endgueltiger Treiber wird PLXREAD/WRITE nicht erlauben
+    nur A32/D16 read getestet
+
+read_write_driver_4 (fehlt noch)
+    VME-Zugriffe als PLXREADLOCAL0, PLXWRITELOCAL0; remote space 4
+    nur als Test gedacht, endgueltiger Treiber wird PLXREAD/WRITE nicht erlauben
+
+read_write_mapped_1 ()
+    VME-Zugriffe gemapped; remote space 1
+
+read_write_mapped_4 (fehlt noch)
+    VME-Zugriffe gemapped; remote space 4 (doppeltes address-mapping)
+    (nur so zum Spass)
+
+read_write (OK falls man kein DMA will)
+    VME-Zugriffe als seek, read, write
+    (kompatibilitaet zu BIT3-Treiber, seltsam, aber bequem)
+
+read_write1 ()
+    wie read_write, benutzt FIFO_Testmode
+
+read_block (fehlt noch)
+    VME-Blockread; DMA direkt in den User-Space
+    (da wird's doch erst lustig)
+
+...
+read_write_bloed.c (OK)
+    liest Statusregister von SIS3600 10**6 mal
+
+int_dma_test.c (IRQ OK; DMA nicht)
+    erzeugt IRQ mit SIS3600, liest per DMA aus
+
+pipeline.c und pipeline1.c (??)
+    zum Pipeline-Testen
Index: /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/output.0
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/output.0	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/output.0	(revision 22)
@@ -0,0 +1,2292 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59.
+@%:@ 
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="reset1100.c"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SET_MAKE driverbase LIB@&t@OBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-driverbase
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+echo target_os=$target_os
+
+
+
+# Check whether --with-driverbase or --without-driverbase was given.
+if test "${with_driverbase+set}" = set; then
+  withval="$with_driverbase"
+  driverbase=$withval
+else
+  driverbase='$(srcdir)/..'
+fi; 
+
+
+          ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
+t quote
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output.  A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@driverbase@,$driverbase,;t t
+s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/requests
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/requests	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/requests	(revision 22)
@@ -0,0 +1,115 @@
+# This file was generated.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+             bless( [
+                      '0',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'configure.in'
+                      ],
+                      {
+                        'm4_pattern_forbid' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_C_VOLATILE' => 1,
+                        'AC_TYPE_OFF_T' => 1,
+                        'AC_FUNC_CLOSEDIR_VOID' => 1,
+                        'AC_REPLACE_FNMATCH' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_FUNC_STAT' => 1,
+                        'AC_FUNC_WAIT3' => 1,
+                        'AC_HEADER_TIME' => 1,
+                        'AC_FUNC_LSTAT' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AC_FUNC_GETMNTENT' => 1,
+                        'AC_TYPE_MODE_T' => 1,
+                        'AC_FUNC_STRTOD' => 1,
+                        'AC_CHECK_HEADERS' => 1,
+                        'AC_FUNC_STRNLEN' => 1,
+                        'm4_sinclude' => 1,
+                        'AC_PROG_CXX' => 1,
+                        'AC_PATH_X' => 1,
+                        'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+                        'AC_PROG_AWK' => 1,
+                        '_m4_warn' => 1,
+                        'AC_HEADER_STDC' => 1,
+                        'AC_HEADER_MAJOR' => 1,
+                        'AC_FUNC_ERROR_AT_LINE' => 1,
+                        'AC_PROG_GCC_TRADITIONAL' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_FUNC_MBRTOWC' => 1,
+                        'AC_STRUCT_ST_BLOCKS' => 1,
+                        'AC_TYPE_SIGNAL' => 1,
+                        'AC_TYPE_UID_T' => 1,
+                        'AC_PROG_MAKE_SET' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        'm4_pattern_allow' => 1,
+                        'sinclude' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_FUNC_STRERROR_R' => 1,
+                        'AC_PROG_CC' => 1,
+                        'AC_DECL_SYS_SIGLIST' => 1,
+                        'AC_FUNC_FORK' => 1,
+                        'AC_FUNC_STRCOLL' => 1,
+                        'AC_FUNC_VPRINTF' => 1,
+                        'AC_PROG_YACC' => 1,
+                        'AC_INIT' => 1,
+                        'AC_STRUCT_TIMEZONE' => 1,
+                        'AC_FUNC_CHOWN' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_FUNC_ALLOCA' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
+                        'AC_PROG_RANLIB' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_FUNC_SETPGRP' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AC_FUNC_MMAP' => 1,
+                        'AC_FUNC_REALLOC' => 1,
+                        'AC_TYPE_SIZE_T' => 1,
+                        'AC_CONFIG_LINKS' => 1,
+                        'AC_CHECK_TYPES' => 1,
+                        'AC_CHECK_MEMBERS' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AC_FUNC_UTIME_NULL' => 1,
+                        'AC_FUNC_SELECT_ARGTYPES' => 1,
+                        'AC_HEADER_STAT' => 1,
+                        'AC_FUNC_STRFTIME' => 1,
+                        'AC_PROG_CPP' => 1,
+                        'AC_C_INLINE' => 1,
+                        'AC_PROG_LEX' => 1,
+                        'AC_C_CONST' => 1,
+                        'AC_TYPE_PID_T' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'include' => 1,
+                        'AC_FUNC_SETVBUF_REVERSED' => 1,
+                        'AC_PROG_INSTALL' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_CHECK_LIB' => 1,
+                        'AC_FUNC_OBSTACK' => 1,
+                        'AC_FUNC_MALLOC' => 1,
+                        'AC_FUNC_GETGROUPS' => 1,
+                        'AC_FUNC_GETLOADAVG' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_FUNC_FSEEKO' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'AC_FUNC_MKTIME' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AC_HEADER_SYS_WAIT' => 1,
+                        'AC_PROG_LN_S' => 1,
+                        'AC_FUNC_MEMCMP' => 1,
+                        'm4_include' => 1,
+                        'AC_HEADER_DIRENT' => 1,
+                        'AC_CHECK_FUNCS' => 1
+                      }
+                    ], 'Autom4te::Request' )
+           );
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/traces.0
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/traces.0	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/autom4te.cache/traces.0	(revision 22)
@@ -0,0 +1,79 @@
+m4trace:configure.in:4: -1- AC_INIT([reset1100.c])
+m4trace:configure.in:4: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.in:4: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.in:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.in:4: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.in:4: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.in:4: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.in:4: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.in:4: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.in:4: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
+m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
+m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
+m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.in:4: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.in:4: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.in:4: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.in:4: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.in:4: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.in:4: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.in:4: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.in:4: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.in:4: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.in:4: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.in:4: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.in:4: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.in:4: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.in:4: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.in:4: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.in:4: -1- AC_SUBST([build_alias])
+m4trace:configure.in:4: -1- AC_SUBST([host_alias])
+m4trace:configure.in:4: -1- AC_SUBST([target_alias])
+m4trace:configure.in:4: -1- AC_SUBST([DEFS])
+m4trace:configure.in:4: -1- AC_SUBST([ECHO_C])
+m4trace:configure.in:4: -1- AC_SUBST([ECHO_N])
+m4trace:configure.in:4: -1- AC_SUBST([ECHO_T])
+m4trace:configure.in:4: -1- AC_SUBST([LIBS])
+m4trace:configure.in:7: -1- AC_CANONICAL_SYSTEM
+m4trace:configure.in:7: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete.
+You should run autoupdate.], [/usr/src/packages/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:1660: AC_CANONICAL_SYSTEM is expanded from...
+configure.in:7: the top level])
+m4trace:configure.in:7: -1- AC_CANONICAL_HOST
+m4trace:configure.in:7: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.in:7: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:7: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:7: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:7: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.in:7: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:7: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:7: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:7: -1- AC_SUBST([target], [$ac_cv_target])
+m4trace:configure.in:7: -1- AC_SUBST([target_cpu], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:7: -1- AC_SUBST([target_vendor], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:7: -1- AC_SUBST([target_os], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:8: -1- AC_PROG_MAKE_SET
+m4trace:configure.in:8: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.in:11: -1- AC_SUBST([target_os])
+m4trace:configure.in:15: -1- AC_SUBST([driverbase])
+m4trace:configure.in:18: -1- AC_CONFIG_FILES([Makefile])
+m4trace:configure.in:18: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.in:18: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.in:18: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
Index: /drsdaq/VME/struck/sis1100/V2.02/test/block_rw.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/block_rw.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/block_rw.c	(revision 22)
@@ -0,0 +1,275 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define VMESTART 0x84000000
+
+#if SIS3100_Version < 200
+enum sis1100_subdev {sis1100_subdev_vme, sis1100_subdev_ram,
+    sis1100_subdev_dsp};
+#endif
+
+off_t devstart;
+int count;
+int width;
+int loops;
+int addr;
+int am;
+int use_dma;
+int read_type;
+int print;
+char* dev_path;
+int p;
+
+static void
+printusage(int argc, char* argv[])
+{
+    printf("usage: %s\n"
+        " [-c count (number of words with width w); must be>0]\n"
+        " [-w width default: 4]\n"
+        " [-l loops default: 1]\n"
+        " [-a addr default: 0]\n"
+        " [-m addr_modifier default: 0xB]\n"
+        " [-d 1|0 (use dma); default: 0]\n"
+        " [-r 1|2|3 (1=read 2=write 3=both); default: write;read;compare]\n"
+        " [-p (print values)]\n"
+        " sis1100_path\n",
+        argv[0]);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c;
+    const char* args="c:w:l:a:m:d:r:p";
+
+    count=0;
+    width=4;
+    loops=1;
+    addr=0;
+    am=0xb;
+    use_dma=0;
+    read_type=3;
+    print=0;
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'c': count=strtoul(optarg, 0, 0); break;
+        case 'w': width=atoi(optarg); break;
+        case 'l': loops=atoi(optarg); break;
+        case 'a': addr=strtoul(optarg, 0, 0); break;
+        case 'm': am=strtoul(optarg, 0, 0); break;
+        case 'd': use_dma=atoi(optarg); break;
+        case 'r': read_type=atoi(optarg); break;
+        case 'p': print=1; break;
+        default: errflag=1;
+        }
+    }
+
+    if (errflag || optind!=argc-1 || count<=0) {
+        printusage(argc, argv);
+        return -1;
+    }
+    dev_path=argv[optind];
+
+    return 0;
+}
+
+static int
+do_write(int p, char* buf, int count, int width, int addr, int loop)
+{
+    int start=random();
+    int num=count*width;
+    int res, i;
+
+    for (i=0; i<num; i++) {
+        buf[i]=start++;
+    }
+    if (!loop) printf("write %d bytes\n", num);
+    if (lseek(p, devstart+addr, SEEK_SET)==((off_t)-1)) {
+        printf("lseek to %d: %s\n", addr, strerror(errno));
+        return -1;
+    }
+    res=write(p, buf, num);
+    if (res<0) {
+        printf("write %d bytes to 0x%08x: %s\n", num, addr, strerror(errno));
+        return -1;
+    } else if (res!=num) {
+        printf("wrote only %d bytes\n", res);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+do_read(int p, char* buf, int count, int width, int addr, int loop)
+{
+    int num=count*width;
+    int res;
+
+    if (!loop) printf("read %d bytes\n", num);
+    if (lseek(p, devstart+addr, SEEK_SET)==((off_t)-1)) {
+        printf("lseek to 0x%08x: %s\n", addr, strerror(errno));
+        return -1;
+    }
+    res=read(p, buf, num);
+    if (res<0) {
+        printf("read %d bytes from 0x%08x: %s\n", num, addr, strerror(errno));
+        return -1;
+    } else if (res!=num) {
+        printf("read only %d bytes\n", res);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+do_compare(char* ibuf, char* obuf, int count, int width, int loop)
+{
+    int num=count*width;
+    int i;
+    
+    if (bcmp(ibuf, obuf, num)) {
+        for (i=0; i<num; i++) {
+            if (ibuf[i]!=obuf[i]) {
+                printf("[%d] %x->%x\n", i, obuf[i], ibuf[i]);
+            }
+        }
+        return -1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int l;
+    u_int32_t max=0;
+    char *ibuf, *obuf;
+    struct vmespace space;
+    enum sis1100_subdev devtype;
+
+    if (getoptions(argc, argv)) return 1;
+
+    if ((p=open(dev_path, O_RDWR, 0))<0) {
+        printf("open \"%s\": %s\n", dev_path, strerror(errno));
+        return 1;
+    }
+
+    if (ioctl(p, SIS1100_DEVTYPE, &devtype)<0) {
+        printf("ioctl(SIS1100_DEVTYPE): %s\n", strerror(errno));
+        return 1;
+    }
+    switch (devtype) {
+    case sis1100_subdev_vme: printf("using VME Device\n"); break;
+    case sis1100_subdev_ram: printf("using RAM Device\n"); break;
+    case sis1100_subdev_ctrl: printf("cannot use CONTROL Device\n"); return 1;
+    case sis1100_subdev_dsp: printf("cannot use DSP Device\n"); return 1;
+    default:
+        printf("cannot use unknown device %d\n", devtype);
+        return 1;
+    }
+    switch (devtype) {
+    case sis1100_subdev_vme:
+        max=0x04000000;
+        devstart=VMESTART;
+        break;
+    case sis1100_subdev_ram:
+        {
+        if (ioctl(p, SIS1100_MAPSIZE, &max)) {
+            printf("ioctl(MAPSIZE): %s\n", strerror(errno));
+            return 1;
+        }
+        devstart=0;
+        }
+        break;
+    }
+    printf("usable size is 0x%08x (%d MByte)\n", max, max/(1<<20));
+    if (count*width>max) {
+        printf("count is too large.\n");
+        return 1;
+    }
+    ibuf=obuf=0;
+    if (read_type&1) {
+        ibuf=calloc(count, width);
+        if (!ibuf) {
+            printf("cannot allocate memory for read buffer\n");
+            return 1;
+        }
+    }
+
+    if (read_type&2) {
+        obuf=calloc(count, width);
+        if (!obuf) {
+            printf("cannot allocate memory for write buffer\n");
+            return 1;
+        }
+    }
+
+    space.am=am;
+    space.datasize=width;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=!!use_dma;
+    if (ioctl(p, SETVMESPACE, &space)) {
+        printf("ioctl(SETVMESPACE): %s\n", strerror(errno));
+        return 1;
+    }
+
+    for (l=0; l<loops; l++) {
+        /*if (loops>1) printf("loop %d\n", l);*/
+        if (read_type&2) {
+            if (do_write(p, obuf, count, width, addr, l)) return 2;
+        }
+
+        if (read_type&1) {
+            if (do_read(p, ibuf, count, width, addr, l)) return 2;
+        }
+
+        if ((read_type&3)==3) {
+            if (do_compare(ibuf, obuf, count, width, l)) return 2;
+        }
+    }
+
+    if (print) {
+        int i;
+        switch (width) {
+        case 1:
+            for (i=0; i<count; i++) printf("%02x ", ((u_int8_t*)ibuf)[i]);
+            break;
+        case 2:
+            for (i=0; i<count; i++) printf("%04x ", ((u_int16_t*)ibuf)[i]);
+            break;
+        case 4:
+            for (i=0; i<count; i++) printf("%08x ", ((u_int32_t*)ibuf)[i]);
+            break;
+        }
+        printf("\n");
+    }
+
+    if (obuf) free(obuf);
+    if (ibuf) free(ibuf);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/camac.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/camac.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/camac.c	(revision 22)
@@ -0,0 +1,602 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include "devopen.h"
+
+#include "dev/pci/sis1100_var.h"
+#include "dev/pci/sis5100_map.h"
+
+typedef int (*camacproc)(struct devinfo* dev, u_int32_t N, u_int32_t A,
+        u_int32_t F, u_int32_t* data);
+
+#define CAMAC(base, N, A, F) \
+    ((base)+(((F)<<9)|((N)<<4)|(A)))
+
+static int
+camac_mapped(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    if ((F&0x18)==0x10) {
+        u_int32_t err;
+        *camaddr=*data;
+        err=*(dev->base_ctrl+0x2B);
+        *data=(~err<<24)&0xc0000000;
+        if (err && !(err&0xc0)) {
+            printf("camac_mapped: err=0x%x\n", err);
+            return -1;
+        }
+    } else { /* read or control */
+        *data=*camaddr^0xc0000000;
+    }
+    return 0;
+}
+
+static int 
+camac_mapped_w(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    u_int32_t err;
+
+    *camaddr=*data;
+    err=*(dev->base_ctrl+0x2B);
+    *data=(~err<<24)&0xc0000000;
+    if (err && !(err&0xc0)) {
+        printf("camac_mapped: err=0x%x\n", err);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+camac_mapped_r(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    *data=(*CAMAC(dev->base_remote, N, A, F))^0xc0000000;
+    return 0;
+}
+
+static int
+camac_driver_vme(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int res;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+    req.data=*data;
+    req.error=0;
+
+    if ((F&0x18)==0x10) {
+        res=ioctl(dev->p_remote, SIS3100_VME_WRITE, &req);
+        *data=(~req.error<<24)&0xc0000000;
+    } else {
+        res=ioctl(dev->p_remote, SIS3100_VME_READ, &req);
+        *data=req.data^0xc0000000;
+    }
+    if (res) {
+        printf("driver_vme: res=%d\n", res);
+        return -1;
+    }
+    if (req.error&~0x2c0) {
+        printf("driver_vme: error=0x%x\n", req.error);
+        return -1;
+    }
+    return 0;
+}
+
+static __inline int
+camac_driver(struct devinfo* dev, u_int32_t N, u_int32_t A, u_int32_t F,
+    u_int32_t* data)
+{
+    struct sis1100_camac_req req;
+    int res;
+
+    req.N=N;
+    req.A=A;
+    req.F=F;
+    req.data=*data;
+    req.error=0;
+
+    res=ioctl(dev->p_remote, SIS5100_CNAF, &req);
+    if (res) {
+        printf("driver_camac: res=%d\n", res);
+        return -1;
+    }
+    if (req.error) {
+        printf("driver_camac: error=0x%x\n", req.error);
+        return -1;
+    }
+    *data=req.data;
+    return 0;
+}
+#if 0
+static void
+test_inhibit(int p)
+{
+    struct sis1100_ctrl_reg reg;
+
+    while (1) {
+        reg.offset=0x100;
+        reg.val=0xffff;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+
+        reg.offset=0x100;
+        reg.val=0xffff0000;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+    }
+}
+#else
+static void
+test_inhibit(int p)
+{
+    int d=1;
+
+    while (1) {
+        if (ioctl(p, SIS5100_CCCI, &d)<0) {
+            fprintf(stderr, "ioctl(SIS5100_CCCI, %d): %s\n",
+                d, strerror(errno));
+            return;
+        }
+        d=1-d;
+        sleep(1);
+    }    
+}
+#endif
+
+static int
+camac_count_driver_vme(struct devinfo* dev, int num)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int N=20;
+    int A=0;
+    int F=16;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+
+    for (; num; num--) {
+        int res;
+
+        req.data=num;
+
+        res=ioctl(p, SIS3100_VME_WRITE, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error&0x3f) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_driver_camac(struct devinfo* dev, int num)
+{
+    struct sis1100_camac_req req;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    req.N=20;
+    req.A=0;
+    req.F=16;
+
+    for (; num; num--) {
+        int res;
+        req.data=num;
+
+        res=ioctl(p, SIS5100_CNAF, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_mapped(struct devinfo* dev, int num)
+{
+    int F=16;
+    int N=20;
+    int A=0;
+    volatile u_int32_t *addr;
+
+    if (!dev->base_remote) return -1;
+    addr=CAMAC(dev->base_remote, N, A, F);
+    
+    for (; num; num--) {
+        *addr=num;
+    }
+    return 0;
+}
+
+typedef int (*countproc)(struct devinfo* dev, int num);
+
+static void
+camac_count(struct devinfo* dev, countproc proc, const char* text, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    int res;
+
+    gettimeofday(&tv0, 0);
+    res=proc(dev, num);
+    gettimeofday(&tv1, 0);
+    if (res) return;
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/num;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302(struct devinfo* dev, camacproc proc, const char* text, int N,
+    int num)
+{
+    u_int32_t d, i, x;
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+
+    d=1;
+    proc(dev, N, 1, 17, &d); /* set MODE to CAMAC */
+    camac_mapped(dev, N, 1, 1, &d); printf("mode: %x\n", d&3);
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        proc(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            d=i;
+            proc(dev, N, 0, 16, &d); /* write data */
+            if (!(d&0xc0000000)) {
+                printf("fill_4302: QX: 0x%08x\n", d);
+                break;
+            }
+        }
+    }
+    gettimeofday(&tv1, 0);
+    camac_mapped(dev, N, 0, 1, &d); printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302_mapped(struct devinfo* dev, const char* text, int N,
+    int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(b) initial err: 0x%x, balance=%d\n", err, d);
+
+    *CAMAC(base, N, 1, 17)=1; /* set MODE to CAMAC */
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(set mode) err: 0x%x, balance=%d\n", err, d);
+
+    /* read mode */
+    d=*CAMAC(base, N, 1, 1); printf("mode: %x\n", d&3);
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(read mode) err: 0x%x, balance=%d\n", err, d);
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        addr=CAMAC(base, N, 0, 17);
+        *addr=0; /* set ADDR */
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 16);
+        for (i=0; i<num; i++) {
+            *addr=i;
+            /*err=*(dev->base_ctrl+0x2B);*/
+/*
+ *             if (err&0xc0) {
+ *                 printf("fill_4302_mapped: QX: 0x%x\n", err);
+ *                 goto raus;
+ *             }
+ */
+        }
+        do {
+            err=*(dev->base_ctrl+0x2B);
+            d=*(dev->base_ctrl+0x2A);
+        } while (err==0x107);
+        if (err) {
+            printf("(after write) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302(struct devinfo* dev, camacproc proc, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        camac_mapped(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            proc(dev, N, 0, 0, &d); /* read data */
+            if (!(d&0xc0000000)) {
+                printf("read_4302: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if ((d&~0xc0000000)!=(i&0xffefff)) {
+                printf("read_4302[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    proc(dev, N, 0, 1, &d); printf("addr after read: 0x%x, i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302_mapped(struct devinfo* dev, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    addr=CAMAC((u_int32_t*)0, N, 0, 17); /* set ADDR */
+    printf("offset=%p\n", addr);
+
+    gettimeofday(&tv0, 0);
+    for (x=1; x; x--) {
+        addr=CAMAC(base, N, 0, 17); /* set ADDR */
+        *addr=0;
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 0); /* read data */
+        for (i=0; i<num; i++) {
+            d=*addr;
+            if (d&0xc0000000) {
+                printf("read_4302_mapped: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if (d!=(i&0xffefff)) {
+                printf("read_4302_mapped[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after read: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+int main(int argc, char* argv[])
+{
+    struct devinfo devinfo;
+    struct sis1100_ident ident;
+
+    if (argc<2)
+        {
+        fprintf(stderr, "usage: %s path_1 path_2 ...\n", argv[0]);
+        return 1;
+        }
+
+    if (open_dev(argv+1, &devinfo)<0) return 2;
+
+    {
+        int p;
+
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p<0) {
+            printf("neither ctrl nor remote device open.\n");
+            return 3;
+        }
+        if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n", strerror(errno));
+            return 4;
+        }
+        printf("local:\n");
+        printf("  hw_type   : %d\n",   ident.local.hw_type);
+        printf("  hw_version: %d\n",   ident.local.hw_version);
+        printf("  fw_type   : %d\n",   ident.local.fw_type);
+        printf("  fw_version: %d\n\n", ident.local.fw_version);
+        printf("remote:\n");
+        printf("  hw_type   : %d\n",   ident.remote.hw_type);
+        printf("  hw_version: %d\n",   ident.remote.hw_version);
+        printf("  fw_type   : %d\n",   ident.remote.fw_type);
+        printf("  fw_version: %d\n\n", ident.remote.fw_version);
+
+        printf("  remote side is %s and %svalid\n",
+            ident.remote_online?"online":"offline",
+            ident.remote_ok?"":"not ");
+
+        if ((ident.local.hw_type!=1)||(ident.local.hw_version!=1)||
+            (ident.local.fw_type!=1)) {
+            fprintf(stderr, "unsupported bord version\n");
+            return 4;
+        }
+    }
+
+    if (devinfo.base_ctrl!=MAP_FAILED) {
+        printf("size of mapped ctrl space  : %d\n", devinfo.size_ctrl);
+    }
+    if (devinfo.base_remote!=MAP_FAILED) {
+        struct sis1100_ctrl_reg reg;
+        const int mapidx=0;
+        u_int32_t offs=0x400+16*mapidx;
+        u_int32_t header=0x0f010000; /* 4 byte; remote space 1; no AM */
+        int res=0;
+        int p=devinfo.p_ctrl;
+
+        printf("size of mapped remote space: %d\n", devinfo.size_remote);
+
+        reg.offset=offs+0;
+        reg.val=header;
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+4;
+        reg.val=0; /* address modifier */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+8;
+        reg.val=0; /* address base */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+12;
+        reg.val=0; /* high part of 64 bit address */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+        if (res) {
+            printf("mapping of CAMAC space failed.\n");
+        }
+    }
+
+#if 0
+    if (devinfo.p_remote>=0) {
+        test_inhibit(devinfo.p_ctrl);
+    } else {
+        printf("remote path not open.\n");
+    }
+#endif
+
+#if 0
+    camac_count(&devinfo, camac_count_driver_vme,   "vme   ", 1000000);
+    camac_count(&devinfo, camac_count_driver_camac, "camac ", 1000000);
+    camac_count(&devinfo, camac_count_mapped,       "mapped", 1000000);
+#endif
+
+#if 0
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_vme(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_camac(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        if (devinfo.base_remote!=MAP_FAILED) {
+            camac_count_mapped(devinfo);
+        } else {
+            printf("CAMAC space not mapped.\n");
+        }
+    }
+#endif
+
+#if 0
+    fill_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    read_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    fill_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    read_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    fill_4302_mapped(&devinfo, "fill_mapped_m", 21, 1000);
+    fill_4302(&devinfo, camac_mapped_w, "fill_mapped_w", 21, 1000);
+    read_4302(&devinfo, camac_mapped_r, "read_mapped_r", 21, 1000);
+    read_4302(&devinfo, camac_mapped, "read_mapped", 21, 1000);
+#endif
+    read_4302_mapped(&devinfo, "read_mapped_m", 21, 1000);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/camac.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/camac.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/camac.c~	(revision 22)
@@ -0,0 +1,602 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include "devopen.h"
+
+#include "dev/pci/sis1100_var.h"
+#include "dev/pci/sis5100_map.h"
+
+typedef int (*camacproc)(struct devinfo* dev, u_int32_t N, u_int32_t A,
+        u_int32_t F, u_int32_t* data);
+
+#define CAMAC(base, N, A, F) \
+    ((base)+(((F)<<9)|((N)<<4)|(A)))
+
+static int
+camac_mapped(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    if ((F&0x18)==0x10) {
+        u_int32_t err;
+        *camaddr=*data;
+        err=*(dev->base_ctrl+0x2B);
+        *data=(~err<<24)&0xc0000000;
+        if (err && !(err&0xc0)) {
+            printf("camac_mapped: err=0x%x\n", err);
+            return -1;
+        }
+    } else { /* read or control */
+        *data=*camaddr^0xc0000000;
+    }
+    return 0;
+}
+
+static int 
+camac_mapped_w(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    volatile u_int32_t* camaddr=CAMAC(dev->base_remote, N, A, F);
+    u_int32_t err;
+
+    *camaddr=*data;
+    err=*(dev->base_ctrl+0x2B);
+    *data=(~err<<24)&0xc0000000;
+    if (err && !(err&0xc0)) {
+        printf("camac_mapped: err=0x%x\n", err);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+camac_mapped_r(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    *data=(*CAMAC(dev->base_remote, N, A, F))^0xc0000000;
+    return 0;
+}
+
+static int
+camac_driver_vme(struct devinfo* dev, u_int32_t N,
+        u_int32_t A, u_int32_t F, u_int32_t* data)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int res;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+    req.data=*data;
+    req.error=0;
+
+    if ((F&0x18)==0x10) {
+        res=ioctl(dev->p_remote, SIS3100_VME_WRITE, &req);
+        *data=(~req.error<<24)&0xc0000000;
+    } else {
+        res=ioctl(dev->p_remote, SIS3100_VME_READ, &req);
+        *data=req.data^0xc0000000;
+    }
+    if (res) {
+        printf("driver_vme: res=%d\n", res);
+        return -1;
+    }
+    if (req.error&~0x2c0) {
+        printf("driver_vme: error=0x%x\n", req.error);
+        return -1;
+    }
+    return 0;
+}
+
+static __inline int
+camac_driver(struct devinfo* dev, u_int32_t N, u_int32_t A, u_int32_t F,
+    u_int32_t* data)
+{
+    struct sis1100_camac_req req;
+    int res;
+
+    req.N=N;
+    req.A=A;
+    req.F=F;
+    req.data=*data;
+    req.error=0;
+
+    res=ioctl(dev->p_remote, SIS5100_CNAF, &req);
+    if (res) {
+        printf("driver_camac: res=%d\n", res);
+        return -1;
+    }
+    if (req.error) {
+        printf("driver_camac: error=0x%x\n", req.error);
+        return -1;
+    }
+    *data=req.data;
+    return 0;
+}
+#if 0
+static void
+test_inhibit(int p)
+{
+    struct sis1100_ctrl_reg reg;
+
+    while (1) {
+        reg.offset=0x100;
+        reg.val=0xffff;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+
+        reg.offset=0x100;
+        reg.val=0xffff0000;
+        reg.error=0;
+        if (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): %s\n",
+                strerror(errno));
+            return;
+        }
+        if (reg.error!=0) {
+            fprintf(stderr, "ioctl(SIS1100_CTRL_WRITE, 0x100): error=0x%x\n",
+                reg.error);
+            return;
+        }
+        sleep(1);
+    }
+}
+#else
+static void
+test_inhibit(int p)
+{
+    int d=1;
+
+    while (1) {
+        if (ioctl(p, SIS5100_CCCI, &d)<0) {
+            fprintf(stderr, "ioctl(SIS5100_CCCI, %d): %s\n",
+                d, strerror(errno));
+            return;
+        }
+        d=1-d;
+        sleep(1);
+    }    
+}
+#endif
+
+static int
+camac_count_driver_vme(struct devinfo* dev, int num)
+{
+    struct sis1100_vme_req req;
+    unsigned int camac_addr;
+    int N=20;
+    int A=0;
+    int F=16;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    camac_addr=((F&0x1f)<<11)+((N&0x1f)<<6)+((A&0xf)<<2);
+
+    req.size=4;
+    req.am=-1;
+    req.addr=camac_addr;
+
+    for (; num; num--) {
+        int res;
+
+        req.data=num;
+
+        res=ioctl(p, SIS3100_VME_WRITE, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error&0x3f) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_driver_camac(struct devinfo* dev, int num)
+{
+    struct sis1100_camac_req req;
+    int p;
+
+    p=dev->p_ctrl;
+    if (p<0) p=dev->p_remote;
+    if (p<0) return -1;
+
+    req.N=20;
+    req.A=0;
+    req.F=16;
+
+    for (; num; num--) {
+        int res;
+        req.data=num;
+
+        res=ioctl(p, SIS5100_CNAF, &req);
+        if (res) {
+            printf("camac_write: res=%d\n", res);
+            return -1;
+        }
+        if (req.error) {
+            printf("camac_write: error=0x%x\n", req.error);
+            return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+camac_count_mapped(struct devinfo* dev, int num)
+{
+    int F=16;
+    int N=20;
+    int A=0;
+    volatile u_int32_t *addr;
+
+    if (!dev->base_remote) return -1;
+    addr=CAMAC(dev->base_remote, N, A, F);
+    
+    for (; num; num--) {
+        *addr=num;
+    }
+    return 0;
+}
+
+typedef int (*countproc)(struct devinfo* dev, int num);
+
+static void
+camac_count(struct devinfo* dev, countproc proc, const char* text, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    int res;
+
+    gettimeofday(&tv0, 0);
+    res=proc(dev, num);
+    gettimeofday(&tv1, 0);
+    if (res) return;
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/num;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302(struct devinfo* dev, camacproc proc, const char* text, int N,
+    int num)
+{
+    u_int32_t d, i, x;
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+
+    d=1;
+    proc(dev, N, 1, 17, &d); /* set MODE to CAMAC */
+    camac_mapped(dev, N, 1, 1, &d); printf("mode: %x\n", d&3);
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        proc(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            d=i;
+            proc(dev, N, 0, 16, &d); /* write data */
+            if (!(d&0xc0000000)) {
+                printf("fill_4302: QX: 0x%08x\n", d);
+                break;
+            }
+        }
+    }
+    gettimeofday(&tv1, 0);
+    camac_mapped(dev, N, 0, 1, &d); printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+fill_4302_mapped(struct devinfo* dev, const char* text, int N,
+    int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(b) initial err: 0x%x, balance=%d\n", err, d);
+
+    *CAMAC(base, N, 1, 17)=1; /* set MODE to CAMAC */
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(set mode) err: 0x%x, balance=%d\n", err, d);
+
+    /* read mode */
+    d=*CAMAC(base, N, 1, 1); printf("mode: %x\n", d&3);
+    err=*(dev->base_ctrl+0x2B);
+    d=*(dev->base_ctrl+0x2A);
+    printf("(read mode) err: 0x%x, balance=%d\n", err, d);
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        addr=CAMAC(base, N, 0, 17);
+        *addr=0; /* set ADDR */
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 16);
+        for (i=0; i<num; i++) {
+            *addr=i;
+            /*err=*(dev->base_ctrl+0x2B);*/
+/*
+ *             if (err&0xc0) {
+ *                 printf("fill_4302_mapped: QX: 0x%x\n", err);
+ *                 goto raus;
+ *             }
+ */
+        }
+        do {
+            err=*(dev->base_ctrl+0x2B);
+            d=*(dev->base_ctrl+0x2A);
+        } while (err==0x107);
+        if (err) {
+            printf("(after write) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after write: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302(struct devinfo* dev, camacproc proc, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+
+    gettimeofday(&tv0, 0);
+    for (x=100; x; x--) {
+        d=0;
+        camac_mapped(dev, N, 0, 17, &d); /* set ADDR */
+        for (i=0; i<num; i++) {
+            proc(dev, N, 0, 0, &d); /* read data */
+            if (!(d&0xc0000000)) {
+                printf("read_4302: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if ((d&~0xc0000000)!=(i&0xffefff)) {
+                printf("read_4302[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    proc(dev, N, 0, 1, &d); printf("addr after read: 0x%x, i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+static void
+read_4302_mapped(struct devinfo* dev, const char* text, int N, int num)
+{
+    struct timeval tv0, tv1;
+    float tdiff, tcycle;
+    u_int32_t d, i=0, x;
+    volatile u_int32_t err;
+    volatile u_int32_t* addr;
+    volatile u_int32_t* base=dev->base_remote;
+
+    addr=CAMAC((u_int32_t*)0, N, 0, 17); /* set ADDR */
+    printf("offset=%p\n", addr);
+
+    gettimeofday(&tv0, 0);
+    for (x=1; x; x--) {
+        addr=CAMAC(base, N, 0, 17); /* set ADDR */
+        *addr=0;
+        err=*(dev->base_ctrl+0x2B);
+        if (err) {
+            d=*(dev->base_ctrl+0x2A);
+            printf("(set addr) err: 0x%x, balance=%d\n", err, d);
+            goto raus;
+        }
+        addr=CAMAC(base, N, 0, 0); /* read data */
+        for (i=0; i<num; i++) {
+            d=*addr;
+            if (d&0xc0000000) {
+                printf("read_4302_mapped: QX: 0x%08x\n", d);
+                goto raus;
+            }
+            if (d!=(i&0xffefff)) {
+                printf("read_4302_mapped[0x%04x]: 0x%x\n", i, d);
+                goto raus;
+            }
+        }
+    }
+raus:
+    gettimeofday(&tv1, 0);
+    addr=CAMAC(base, N, 0, 1);
+    d=*addr; printf("addr after read: 0x%x; i=%d\n", d, i);
+    tdiff=tv1.tv_sec-tv0.tv_sec;
+    tdiff+=(tv1.tv_usec-tv0.tv_usec)/1000000.;
+    tcycle=(tdiff*1000000.)/i/100.;
+    printf("%s: %f us\n", text, tcycle);
+}
+
+int main(int argc, char* argv[])
+{
+    struct devinfo devinfo;
+    struct sis1100_ident ident;
+
+    if (argc<2)
+        {
+        fprintf(stderr, "usage: %s path_1 path_2 ...\n", argv[0]);
+        return 1;
+        }
+
+    if (open_dev(argv+1, &devinfo)<0) return 2;
+
+    {
+        int p;
+
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p<0) {
+            printf("neither ctrl nor remote device open.\n");
+            return 3;
+        }
+        if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n", strerror(errno));
+            return 4;
+        }
+        printf("local:\n");
+        printf("  hw_type   : %d\n",   ident.local.hw_type);
+        printf("  hw_version: %d\n",   ident.local.hw_version);
+        printf("  fw_type   : %d\n",   ident.local.fw_type);
+        printf("  fw_version: %d\n\n", ident.local.fw_version);
+        printf("remote:\n");
+        printf("  hw_type   : %d\n",   ident.remote.hw_type);
+        printf("  hw_version: %d\n",   ident.remote.hw_version);
+        printf("  fw_type   : %d\n",   ident.remote.fw_type);
+        printf("  fw_version: %d\n\n", ident.remote.fw_version);
+
+        printf("  remote side is %s and %svalid\n",
+            ident.remote_online?"online":"offline",
+            ident.remote_ok?"":"not ");
+
+        if ((ident.local.hw_type!=1)||(ident.local.hw_version!=1)||
+            (ident.local.fw_type!=1)) {
+            fprintf(stderr, "unsupported bord version\n");
+            return 4;
+        }
+    }
+
+    if (devinfo.base_ctrl!=MAP_FAILED) {
+        printf("size of mapped ctrl space  : %d\n", devinfo.size_ctrl);
+    }
+    if (devinfo.base_remote!=MAP_FAILED) {
+        struct sis1100_ctrl_reg reg;
+        const int mapidx=0;
+        u_int32_t offs=0x400+16*mapidx;
+        u_int32_t header=0x0f010000; /* 4 byte; remote space 1; no AM */
+        int res=0;
+        int p=devinfo.p_ctrl;
+
+        printf("size of mapped remote space: %d\n", devinfo.size_remote);
+
+        reg.offset=offs+0;
+        reg.val=header;
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+4;
+        reg.val=0; /* address modifier */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+8;
+        reg.val=0; /* address base */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+
+        reg.offset=offs+12;
+        reg.val=0; /* high part of 64 bit address */
+        res|=ioctl(p, SIS1100_CTRL_WRITE, &reg);
+        if (res) {
+            printf("mapping of CAMAC space failed.\n");
+        }
+    }
+
+#if 0
+    if (devinfo.p_remote>=0) {
+        test_inhibit(devinfo.p_ctrl);
+    } else {
+        printf("remote path not open.\n");
+    }
+#endif
+
+#if 0
+    camac_count(&devinfo, camac_count_driver_vme,   "vme   ", 1000000);
+    camac_count(&devinfo, camac_count_driver_camac, "camac ", 1000000);
+    camac_count(&devinfo, camac_count_mapped,       "mapped", 1000000);
+#endif
+
+#if 0
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_vme(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        int p;
+        p=devinfo.p_ctrl;
+        if (p<0) p=devinfo.p_remote;
+        if (p>=0) {
+            camac_count_driver_camac(p);
+        } else {
+            printf("neither ctrl nor remote device open.\n");
+        }
+    }
+    {
+        if (devinfo.base_remote!=MAP_FAILED) {
+            camac_count_mapped(devinfo);
+        } else {
+            printf("CAMAC space not mapped.\n");
+        }
+    }
+#endif
+
+#if 0
+    fill_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    read_4302(&devinfo, camac_driver_vme, "vme", 21, 16384);
+    fill_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    read_4302(&devinfo, camac_driver, "camac", 21, 16384);
+    fill_4302_mapped(&devinfo, "fill_mapped_m", 21, 1000);
+    fill_4302(&devinfo, camac_mapped_w, "fill_mapped_w", 21, 1000);
+    read_4302(&devinfo, camac_mapped_r, "read_mapped_r", 21, 1000);
+    read_4302(&devinfo, camac_mapped, "read_mapped", 21, 1000);
+#endif
+    read_4302_mapped(&devinfo, "read_mapped_m", 21, 1000);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/commands.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/commands.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/commands.h	(revision 22)
@@ -0,0 +1,6 @@
+#ifndef _commands_h_
+#define _commands_h_
+
+typedef enum {comm_read, comm_write, comm_ack} sis1100_commands;
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/test/config.cache
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/config.cache	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/config.cache	(revision 22)
@@ -0,0 +1,15 @@
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/config.guess
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/config.guess	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/config.guess	(revision 22)
@@ -0,0 +1,565 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    alpha:OSF1:V*:*)
+	# After 1.2, OSF1 uses "V1.3" for uname -r.
+	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	# 1.2 uses "1.2" for uname -r.
+	echo alpha-dec-osf${UNAME_RELEASE}
+        exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    amiga:NetBSD:*:*)
+      echo m68k-cbm-netbsd${UNAME_RELEASE}
+      exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    Pyramid*:OSx*:*:*)
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    sun4*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:NetBSD:*:*)
+	echo m68k-atari-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3*:NetBSD:*:*)
+	echo m68k-sun-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:NetBSD:*:*)
+	echo m68k-apple-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:4*:UMIPS)
+	echo mips-mips-riscos4sysv
+	exit 0 ;;
+    mips:*:5*:RISCos)
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+   ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i[3456]86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		sed 's/^		//' << EOF >dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+		rm -f dummy.c dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:4)
+	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=4.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[3478]??:HP-UX:*:*)
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;;
+	    9000/8?? )            HP_ARCH=hppa1.0 ;;
+	esac
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	sed 's/^	//' << EOF >dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+	rm -f dummy.c dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+	echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE}
+	exit 0 ;;
+    CRAY*C90:*:*:*)
+	echo c90-cray-unicos${UNAME_RELEASE}
+	exit 0 ;;
+    CRAY-2:*:*:*)
+	echo cray2-cray-unicos
+        exit 0 ;;
+    hp3[0-9][05]:NetBSD:*:*)
+	echo m68k-hp-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    i[3456]86:BSD/386:*:* | *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:NetBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    *:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us.
+	ld_help_string=`ld --help 2>&1`
+	if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[3456]86"; then
+	  echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+	elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[3456]86linux"; then
+	  echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+	elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[3456]86coff"; then
+	  echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
+	elif test "${UNAME_MACHINE}" = "alpha" ; then
+	  echo alpha-unknown-linux ; exit 0
+	else
+	  # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
+	  # useful --help.  Gcc wants to distinguish between linuxoldld and linuxaout.
+	  test ! -d /usr/lib/ldscripts/. \
+	    && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
+	  # Determine whether the default compiler is a.out or elf
+	  cat >dummy.c <<EOF
+main(argc, argv)
+int argc;
+char *argv[];
+{
+#ifdef __ELF__
+  printf ("%s-unknown-linux\n", argv[1]);
+#else
+  printf ("%s-unknown-linuxaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+	  rm -f dummy.c dummy
+	fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+    i[3456]86:DYNIX/ptx:4*:*)
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i[3456]86:*:4.*:* | i[3456]86:SYSTEM_V:4.*:*)
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+	else
+		echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit 0 ;;
+    i[3456]86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-unknown-sysv32
+	fi
+	exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-unknown-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M680[234]0:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
+        uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4.3 && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m680[234]0:LynxOS:2.[23]*:*)
+	echo m68k-lynx-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i[3456]86:LynxOS:2.[23]*:*)
+	echo i386-lynx-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.[23]*:*)
+	echo sparc-lynx-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.[23]*:*)
+	echo rs6000-lynx-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  printf ("%s-next-nextstep%s\n", __ARCHITECTURE__,  version==2 ? "2" : "3");
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-unknown-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+  printf ("vax-dec-bsd\n"); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
Index: /drsdaq/VME/struck/sis1100/V2.02/test/config.log
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/config.log	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/config.log	(revision 22)
@@ -0,0 +1,154 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ ./configure 
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = linuxmki
+uname -m = i686
+uname -r = 2.6.4-52-default
+uname -s = Linux
+uname -v = #1 Wed Apr 7 02:08:30 UTC 2004
+
+/usr/bin/uname -p = unknown
+/bin/uname -X     = unknown
+
+/bin/arch              = i686
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo               = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /sbin
+PATH: /usr/sbin
+PATH: /usr/local/sbin
+PATH: /root/bin
+PATH: /usr/local/bin
+PATH: /usr/bin
+PATH: /usr/X11R6/bin
+PATH: /bin
+PATH: /usr/games
+PATH: /opt/gnome/bin
+PATH: /opt/kde3/bin
+PATH: /usr/lib/java/jre/bin
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:1260: checking build system type
+configure:1278: result: i686-unknown-linux-gnu
+configure:1286: checking host system type
+configure:1300: result: i686-unknown-linux-gnu
+configure:1308: checking target system type
+configure:1322: result: i686-unknown-linux-gnu
+configure:1336: checking whether make sets $(MAKE)
+configure:1356: result: yes
+configure:1506: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by config.status, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  $ ./config.status 
+
+on linuxmki
+
+config.status:638: creating Makefile
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=i686-unknown-linux-gnu
+ac_cv_build_alias=i686-unknown-linux
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_host=i686-unknown-linux-gnu
+ac_cv_host_alias=i686-unknown-linux
+ac_cv_prog_make_make_set=yes
+ac_cv_target=i686-unknown-linux-gnu
+ac_cv_target_alias=i686-unknown-linux
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" '
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+LIBOBJS=''
+LIBS=''
+LTLIBOBJS=''
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME=''
+PACKAGE_STRING=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PATH_SEPARATOR=':'
+SET_MAKE=''
+SHELL='/bin/sh'
+bindir='${exec_prefix}/bin'
+build='i686-unknown-linux-gnu'
+build_alias=''
+build_cpu='i686'
+build_os='linux-gnu'
+build_vendor='unknown'
+datadir='${prefix}/share'
+driverbase='$(srcdir)/..'
+exec_prefix='${prefix}'
+host='i686-unknown-linux-gnu'
+host_alias=''
+host_cpu='i686'
+host_os='linux-gnu'
+host_vendor='unknown'
+includedir='${prefix}/include'
+infodir='${prefix}/info'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='${prefix}/var'
+mandir='${prefix}/man'
+oldincludedir='/usr/include'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target='i686-unknown-linux-gnu'
+target_alias=''
+target_cpu='i686'
+target_os='linux-gnu'
+target_vendor='unknown'
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME ""
+#define PACKAGE_STRING ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+
+configure: exit 0
Index: /drsdaq/VME/struck/sis1100/V2.02/test/config.status
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/config.status	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/config.status	(revision 22)
@@ -0,0 +1,711 @@
+#! /bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=${CONFIG_SHELL-/bin/sh}
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+config_files=" Makefile"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+ac_cs_version="\
+config.status
+configured by ./configure, generated by GNU Autoconf 2.59,
+  with options \"\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=.
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+  echo "running /bin/sh ./configure "  $ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec /bin/sh ./configure  $ac_configure_extra_args --no-create --no-recursion
+fi
+
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@SHELL@,/bin/sh,;t t
+s,@PATH_SEPARATOR@,:,;t t
+s,@PACKAGE_NAME@,,;t t
+s,@PACKAGE_TARNAME@,,;t t
+s,@PACKAGE_VERSION@,,;t t
+s,@PACKAGE_STRING@,,;t t
+s,@PACKAGE_BUGREPORT@,,;t t
+s,@exec_prefix@,${prefix},;t t
+s,@prefix@,/usr/local,;t t
+s,@program_transform_name@,s,x,x,,;t t
+s,@bindir@,${exec_prefix}/bin,;t t
+s,@sbindir@,${exec_prefix}/sbin,;t t
+s,@libexecdir@,${exec_prefix}/libexec,;t t
+s,@datadir@,${prefix}/share,;t t
+s,@sysconfdir@,${prefix}/etc,;t t
+s,@sharedstatedir@,${prefix}/com,;t t
+s,@localstatedir@,${prefix}/var,;t t
+s,@libdir@,${exec_prefix}/lib,;t t
+s,@includedir@,${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,${prefix}/info,;t t
+s,@mandir@,${prefix}/man,;t t
+s,@build_alias@,,;t t
+s,@host_alias@,,;t t
+s,@target_alias@,,;t t
+s,@DEFS@,-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" ,;t t
+s,@ECHO_C@,,;t t
+s,@ECHO_N@,-n,;t t
+s,@ECHO_T@,,;t t
+s,@LIBS@,,;t t
+s,@build@,i686-unknown-linux-gnu,;t t
+s,@build_cpu@,i686,;t t
+s,@build_vendor@,unknown,;t t
+s,@build_os@,linux-gnu,;t t
+s,@host@,i686-unknown-linux-gnu,;t t
+s,@host_cpu@,i686,;t t
+s,@host_vendor@,unknown,;t t
+s,@host_os@,linux-gnu,;t t
+s,@target@,i686-unknown-linux-gnu,;t t
+s,@target_cpu@,i686,;t t
+s,@target_vendor@,unknown,;t t
+s,@target_os@,linux-gnu,;t t
+s,@SET_MAKE@,,;t t
+s,@driverbase@,$(srcdir)/..,;t t
+s,@LIBOBJS@,,;t t
+s,@LTLIBOBJS@,,;t t
+CEOF
+
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  sed "/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+
+{ (exit 0); exit 0; }
Index: /drsdaq/VME/struck/sis1100/V2.02/test/config.sub
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/config.sub	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/config.sub	(revision 22)
@@ -0,0 +1,955 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+	echo Configuration name missing. 1>&2
+	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+	echo "or     $0 ALIAS" 1>&2
+	echo where ALIAS is a recognized configuration type. 1>&2
+	exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+	*local*)
+		echo $1
+		exit 0
+		;;
+	*)
+	;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  linux-gnu*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple)
+		os=
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+		| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
+		| alpha | alphaev5 | alphaev56 | alphaev6 | we32k | ns16k | clipper \
+		| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+		| mipstx39 | mipstx39el \
+		| sparc | sparclet | sparclite | sparc64 | v850)
+		basic_machine=$basic_machine-unknown
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i[34567]86)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+	      | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
+	      | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \
+	      | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparc64-* | mips64-* | mipsel-* \
+	      | mips64el-* | mips64orion-* | mips64orionel-*  \
+	      | mipstx39-* | mipstx39el-* \
+	      | f301-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-cbm
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-cbm
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-cbm
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	cray2)
+		basic_machine=cray2-cray
+		os=-unicos
+		;;
+	[ctj]90-cray)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i[34567]86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i[34567]86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i[34567]86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i[34567]86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		os=-linux-gnu
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		os=-linux-gnu
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+        pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | nexen)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | k6 | 6x86)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | nexen-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | k6-* | 6x86-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=rs6000-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+	        ;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+	        ;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	xmp)
+		basic_machine=xmp-cray
+		os=-unicos
+		;;
+        xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	mips)
+		if [ x$os = x-linux-gnu ]; then
+			basic_machine=mips-unknown
+		else
+			basic_machine=mips-mips
+		fi
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sparc)
+		basic_machine=sparc-sun
+		;;
+        cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-ns2 )
+	        os=-nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+        *-gould)
+		os=-sysv
+		;;
+        *-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+        *-sgi)
+		os=-irix
+		;;
+        *-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f301-fujitsu)
+		os=-uxpv
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
Index: /drsdaq/VME/struck/sis1100/V2.02/test/configure
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/configure	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/configure	(revision 22)
@@ -0,0 +1,2292 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="reset1100.c"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SET_MAKE driverbase LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-driverbase
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+echo target_os=$target_os
+
+
+
+# Check whether --with-driverbase or --without-driverbase was given.
+if test "${with_driverbase+set}" = set; then
+  withval="$with_driverbase"
+  driverbase=$withval
+else
+  driverbase='$(srcdir)/..'
+fi;
+
+
+          ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
+t quote
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output.  A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@driverbase@,$driverbase,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test/configure.in
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/configure.in	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/configure.in	(revision 22)
@@ -0,0 +1,18 @@
+dnl $ZEL: configure.in,v 1.2 2002/08/19 10:54:38 wuestner Exp $
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(reset1100.c)
+
+dnl Checks for programs.
+AC_CANONICAL_SYSTEM
+AC_PROG_MAKE_SET
+
+echo target_os=$target_os
+AC_SUBST(target_os)
+
+AC_ARG_WITH(driverbase, [  --with-driverbase],
+	  driverbase=$withval, driverbase=['$(srcdir)/..'])
+AC_SUBST(driverbase)
+
+dnl AC_CONFIG_HEADER(config.h)
+AC_OUTPUT(Makefile)
Index: /drsdaq/VME/struck/sis1100/V2.02/test/devopen.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/devopen.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/devopen.c	(revision 22)
@@ -0,0 +1,108 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/param.h>
+#include "devopen.h"
+#include "dev/pci/sis1100_var.h"
+
+static void
+close_dev(struct devinfo* info)
+{
+    if (info->base_ctrl) {
+        munmap((void*)(info->base_ctrl), info->size_ctrl);
+        info->base_ctrl=MAP_FAILED;
+        info->size_ctrl=0;
+    }
+    if (info->base_remote) {
+        munmap((void*)(info->base_remote), info->size_remote);
+        info->base_remote=MAP_FAILED;
+        info->size_remote=0;
+    }
+    close(info->p_ctrl); info->p_ctrl=-1;
+    close(info->p_remote); info->p_remote=-1;
+    close(info->p_ram); info->p_ram=-1;
+    close(info->p_dsp); info->p_dsp=-1;
+}
+
+static volatile u_int32_t*
+mmap_region(int p, u_int32_t* size)
+{
+    volatile u_int32_t* base;
+
+    if (ioctl(p, SIS1100_MAPSIZE, size)<0) {
+        fprintf(stderr, "ioctl(%d, SIS1100_MAPSIZE): %s\n",
+            p, strerror(errno));
+        return MAP_FAILED;
+    }
+    base=mmap(0, *size, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED,
+        p, 0);
+    if (base==MAP_FAILED) {
+        fprintf(stderr, "mmap(%d, size=%d): %s\n", p, *size, strerror(errno));
+    }
+    return base;
+}
+
+int
+open_dev(char** pathes, struct devinfo* info)
+{
+    const char* path;
+
+    info->p_ctrl=-1;
+    info->p_remote=-1;
+    info->p_ram=-1;
+    info->p_dsp=-1;
+    info->base_ctrl=MAP_FAILED;
+    info->base_remote=MAP_FAILED;
+    info->size_ctrl=0;
+    info->size_remote=0;
+    info->close=0;
+
+    path=*pathes++;
+    while (path) {
+        int p;
+        enum sis1100_subdev subdev;
+
+        p=open(path, O_RDWR, 0);
+        if (p<0) {
+            fprintf(stderr, "open \"%s\": %s\n", path, strerror(errno));
+            goto error;
+        }
+        if (ioctl(p, SIS1100_DEVTYPE, &subdev)<0) {
+            fprintf(stderr, "ioctl(\"%s\", SIS1100_DEVTYPE): %s\n",
+                    path, strerror(errno));
+            goto error;
+        }
+        switch (subdev) {
+        case sis1100_subdev_remote:
+            info->p_remote=p;
+            info->base_remote=mmap_region(p, &info->size_remote);
+            printf("base_remote=%p\n", info->base_remote);
+            break;
+        case sis1100_subdev_ram:
+            info->p_ram=p;
+            break;
+        case sis1100_subdev_ctrl:
+            info->p_ctrl=p;
+            info->base_ctrl=mmap_region(p, &info->size_ctrl);
+            printf("base_ctrl=%p\n", info->base_ctrl);
+            break;
+        case sis1100_subdev_dsp:
+            info->p_dsp=p;
+            break;
+        }
+        path=*pathes++;
+    }
+
+    info->close=close_dev;
+    return 0;
+
+error:
+    close_dev(info);
+    return -1;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/devopen.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/devopen.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/devopen.h	(revision 22)
@@ -0,0 +1,18 @@
+#ifndef _devopen_h_
+#define _devopen_h_
+
+struct devinfo {
+    int p_ctrl;
+    int p_remote;
+    int p_ram;
+    int p_dsp;
+    volatile u_int32_t* base_ctrl;
+    volatile u_int32_t* base_remote;
+    u_int32_t size_ctrl;
+    u_int32_t size_remote;
+    void (*close)(struct devinfo*);
+};
+
+int open_dev(char** pathes, struct devinfo*);
+
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/test/eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/eeprom.c	(revision 22)
@@ -0,0 +1,126 @@
+/*
+ * $ZEL$
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "../dev/pci/sis1100_var.h"
+
+static int
+read_eprom(int p)
+{
+    int res=0, i;
+    u_int16_t data[0x2c];
+    struct sis1100_eeprom_req eeprom_req;
+    u_int32_t val;
+
+    eeprom_req.num=0x2c;
+    eeprom_req.data=data;
+    eeprom_req.addr=0;
+    res=ioctl(p, SIS1100_READ_EEPROM, &eeprom_req);
+    if (res<0) {
+        printf("ioctl(READ_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+    for (i=0; i<0x2c; i+=1) {
+        printf("0x%02x: %04x\n", i*2, data[i]);
+    }
+
+    val=(data[0x24]<<16)|data[0x25];
+    printf("LAS1RR: 0x%08x\n", val);
+    return 0;
+}
+
+static int
+write_eprom(int p)
+{
+    int res=0;
+    u_int16_t data[2];
+    struct sis1100_eeprom_req eeprom_req;
+    u_int32_t val;
+
+    val=0xfff00000;
+    data[0]=(val>>16)&0xffff;
+    data[1]=(val)&0xffff;
+
+    eeprom_req.num=2;
+    eeprom_req.data=data;
+    eeprom_req.addr=0x24;
+    res=ioctl(p, SIS1100_WRITE_EEPROM, &eeprom_req);
+    if (res<0) {
+        printf("ioctl(WRITE_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+    return 0;
+}
+
+static int
+patch_eprom(int p)
+{
+    int res=0;
+    u_int16_t data[0x2c];
+    struct sis1100_eeprom_req eeprom_req;
+    u_int32_t val;
+
+    eeprom_req.num=0x2c;
+    eeprom_req.data=data;
+    eeprom_req.addr=0;
+    res=ioctl(p, SIS1100_READ_EEPROM, &eeprom_req);
+    if (res<0) {
+        printf("ioctl(READ_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+
+    val=0xfff00000;
+    data[24]=(val>>16)&0xffff;
+    data[25]=(val)&0xffff;
+
+    eeprom_req.num=0x2c;
+    eeprom_req.data=data;
+    eeprom_req.addr=0;
+    res=ioctl(p, SIS1100_WRITE_EEPROM, &eeprom_req);
+    if (res<0) {
+        printf("ioctl(WRITE_EEPROM): %s\n", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int p;
+    printf("\n==== SIS1100 EEPROM Test; V0.1 ====\n\n");
+
+    if (argc!=2) {
+        printf("usage: %s pathname\n", argv[0]);
+        return 1;
+    }
+
+    p=open(argv[1], O_RDWR, 0);
+    if (p<0) {
+        printf("open \"%s\": %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    if (read_eprom(p)<0) return 2;
+    if (write_eprom(p)<0) return 3;
+/*
+    if (read_eprom(p)<0) return 4;
+    patch_eprom(p);
+*/
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/find_caen.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/find_caen.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/find_caen.c	(revision 22)
@@ -0,0 +1,210 @@
+#ifdef __linux__
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#define LINUX_LARGEFILE O_LARGEFILE
+#else
+#define LINUX_LARGEFILE 0
+#endif
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+struct caen_type {
+    int typ;
+    char* name;
+    char* descr;
+};
+
+struct caen_type caen_types[]={
+    {0x003, "V259", "multihit pattern/NIM"},
+    {0x004, "V259E", "multihit pattern/ECL"},
+    {0x001, "V262", "IO reg"},
+    {0x01a, "V512", "Logic"},
+    {0x018, "V560", "counter"},
+    {0x034, "V550", "C-RAMS"},            /* 64k */
+    {0x03c, "V551B", "C-RAMS Sequencer"},
+    {0x048, "V729A", "40 MHz ADC"},
+    {0x12e, "V693", "Multihit TDC"},
+    {0x2ff, "V767", "tdc"},
+    {0x307, "V775", "tdc"},
+    {0x311, "V785", "Peak Sensing ADC"},
+    {0x318, "V792", "qdc"},
+    {0, 0, 0} 
+};
+
+/****************************************************************************/
+static int find_caen_name(int typ)
+{
+    int i;
+    for (i=0; caen_types[i].name && caen_types[i].typ!=typ; i++);
+    if (caen_types[i].typ==typ)
+        return i;
+    else
+        return -1;
+}
+/****************************************************************************/
+static int check_caen_new(int p, u_int32_t addr, u_int32_t offs)
+{
+    u_int32_t _addr;
+    u_int16_t oui_msb, oui, oui_lsb;
+    u_int16_t ver;
+    u_int16_t id_msb, id, id_lsb;
+    u_int16_t rev;
+    u_int16_t ser_msb, ser_lsb;
+    u_int32_t manu, board_id, serial;
+    int res, idx;
+    struct vmespace space;
+
+    space.am=0x39;
+    space.datasize=2;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+
+    _addr=addr+offs;
+
+    if (ioctl(p, SIS1100_SETVMESPACE, &space)<0) {
+        perror("SETVMESPACE");
+        return -1;
+    }
+
+    if (ioctl(p, VME_PROBE, &_addr+0x26)<0) return 0;
+
+    res=pread(p, &oui_msb, 2, _addr+0x26);
+    if (res!=2) return 0;
+
+    res=pread(p, &oui, 2, _addr+0x2a);
+    if (res!=2) return 0;
+
+    res=pread(p, &oui_lsb, 2, _addr+0x2e);
+    if (res!=2) return 0;
+
+    manu=((oui_msb&0xff)<<12)|((oui&0xff)<<8)|(oui_lsb&0xff);
+    if (manu!=0x40e6) return 0;
+
+    res=pread(p, &ver, 2, _addr+0x32);
+    if (res!=2) return 0;
+
+    res=pread(p, &id_msb, 2, _addr+0x36);
+    if (res!=2) return 0;
+
+    res=pread(p, &id, 2, _addr+0x3a);
+    if (res!=2) return 0;
+
+    res=pread(p, &id_lsb, 2, _addr+0x3e);
+    if (res!=2) return 0;
+
+    board_id=((id_msb&0xff)<<12)|((id&0xff)<<8)|(id_lsb&0xff);
+    res=pread(p, &rev, 2, _addr+0x4e);
+    if (res!=2) return 0;
+
+    res=pread(p, &ser_msb, 2, _addr+0xf02);
+    if (res!=2) return 0;
+
+    res=pread(p, &ser_lsb, 2, _addr+0xf06);
+    if (res!=2) return 0;
+
+    serial=((ser_msb&0xff)<<8)|(ser_lsb&0xff);
+    idx=find_caen_name(board_id);
+    if (idx>=0)
+        printf("0x%08x: %03x CAEN %-6s; version=%2d; serial=%3d; revision=%d (%s)\n",
+            addr, board_id, caen_types[idx].name, ver, serial, rev, caen_types[idx].descr);
+    else
+        printf("0x%08x: %03x CAEN unknown type 0x%x; version=%2d; serial=%3d; revision=%d\n",
+            addr, board_id, board_id, ver, serial, rev);
+    return 1;
+}
+/****************************************************************************/
+static int check_caen_old(int p, u_int32_t addr)
+{
+    u_int16_t v[3];
+    int res;
+    struct vmespace space;
+
+    space.am=0x39;
+    space.datasize=2;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+
+    if (ioctl(p, SIS1100_SETVMESPACE, &space)<0) {
+        perror("SETVMESPACE");
+        return -1;
+    }
+
+    res=pread(p, v, 6, addr+0xfa);
+    if (res!=6) {
+        /*fprintf(stderr, "read 0x%x+0xfa: %s\n", addr, strerror(errno));*/
+        return 0;
+    }
+
+    if (v[0]==0xfaf5) {
+        int typ, manf, ser, ver, idx;
+
+        typ=v[1]&0x3ff;
+        manf=(v[1]>>10)&0x3f;
+        ser=v[2]&0xfff;
+        ver=(v[2])>12&0xf;
+        idx=find_caen_name(typ);
+        if (idx>=0)
+            printf("0x%08x: %03x CAEN %-6s; version=%2d; serial=%3d (%s)\n",
+                addr, typ, caen_types[idx].name, ver, ser, caen_types[idx].descr);
+        else
+            printf("0x%08x: %03x CAEN; unknown type 0x%x; version=%2d; serial=%3d\n",
+                addr, typ, typ, ver, ser);
+        return 1;
+    }
+    return 0;
+}
+/****************************************************************************/
+static int check_caen(int p, u_int32_t addr)
+{
+    volatile int res;
+    res=check_caen_old(p, addr);
+    /*printf("check_caen_old(0x%08x): %d\n", addr, res);*/
+    if (res) return res;
+    res=check_caen_new(p, addr, 0x1000);
+    /*printf("check_caen_new1(0x%08x): %d\n", addr, res);*/
+    if (res) return res;
+    res=check_caen_new(p, addr, 0x8000);
+    /*printf("check_caen_new2(0x%08x): %d\n", addr, res);*/
+    if (res) return res;
+    return res;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    u_int32_t addr;
+    int p, num, idx, n, res;
+
+    if (argc<2) {
+        fprintf(stderr, "usage: %s path [num]\n", argv[0]);
+        return 1;
+    }
+    num=argc>2?atoi(argv[2]):65536;
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        fprintf(stderr, "open %s: %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    for (addr=0, idx=0, n=0; idx<num; idx++, addr+=0x10000) {
+        res=check_caen(p, addr);
+        if (res<0) return 0;
+        if (res>0) n++;
+    }
+
+    printf("%d module%s found\n", n, n==1?"":"s");
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/find_sis.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/find_sis.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/find_sis.c	(revision 22)
@@ -0,0 +1,119 @@
+#ifdef __linux__
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#define LINUX_LARGEFILE O_LARGEFILE
+#else
+#define LINUX_LARGEFILE 0
+#endif
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+struct caen_type {
+    int typ;
+    char* name;
+    char* descr;
+};
+
+struct caen_type caen_types[]={
+    {0x34, "V550", "C-RAMS"},            /* 64k */
+    {0x3c, "V551B", "C-RAMS Sequencer"},
+    {0x48, "V729A", "40 MHz ADC"},
+    {0x12e, "V693", "Multihit TDC"},
+    {0, 0, 0} 
+};
+
+/****************************************************************************/
+static int find_caen_name(int typ)
+{
+    int i;
+    for (i=0; caen_types[i].name && caen_types[i].typ!=typ; i++);
+    if (caen_types[i].typ==typ)
+        return i;
+    else
+        return -1;
+}
+/****************************************************************************/
+static int check_sis(int p, u_int32_t addr)
+{
+    u_int32_t _addr;
+    u_int32_t v1;
+    int res, version=0;
+    char* name=0;
+    struct vmespace space;
+
+    space.am=9;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+
+    if (ioctl(p, SIS1100_SETVMESPACE, &space)<0) {
+        perror("SETVMESPACE");
+        return -1;
+    }
+    _addr=addr+0x4;
+    if (ioctl(p, VME_PROBE, &_addr)<0) {
+        /*perror("VME_PROBE");*/
+        return 0;
+    }
+
+    if (lseek(p, addr+0x4, SEEK_SET)==(off_t)-1) {
+        perror("lseek");
+        return -1;
+    }
+
+    res=read(p, &v1, 4);
+    if (res!=4) {
+        fprintf(stderr, "read 0x%x+0x4: %s\n", addr, strerror(errno));
+        return -1;
+    }
+    switch ((v1>>16)&0xffff) {
+    case 0x3300: name="3300"; version=v1&0xffff; break;
+    case 0x3600: name="3600"; version=(v1>>12)&0xf; break;
+    case 0x3800: name="3800"; version=(v1>>12)&0xf; break;
+    case 0x3801: name="3801"; version=(v1>>12)&0xf; break;
+    }
+
+    if (name) {
+        printf("0x%08x: SIS%s; version %d\n", addr, name, version);
+    }
+    return name!=0;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    u_int32_t addr;
+    int p, num, idx, n, res;
+
+    if (argc<2) {
+        fprintf(stderr, "usage: %s path [num]\n", argv[0]);
+        return 1;
+    }
+    num=argc>2?atoi(argv[2]):65536;
+
+    if ((p=open(argv[1], O_RDWR|LINUX_LARGEFILE, 0))<0) {
+        fprintf(stderr, "open %s: %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    for (addr=0, idx=0, n=0; idx<num; idx++, addr+=0x10000) {
+        res=check_sis(p, addr);
+        if (res<0) return 0;
+        if (res>0) n++;
+    }
+
+    printf("%d module%s found\n", n, n==1?"":"s");
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/frontin_1100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/frontin_1100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/frontin_1100.c	(revision 22)
@@ -0,0 +1,49 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p;
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) {
+                fprintf(stderr, "open \"%s\"\n", argv[1]);
+                return 1;
+        }
+
+        while (1) {
+                struct sis1100_ctrl_reg reg;
+                int optreg;
+
+                reg.offset=0xF0;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        perror("SIS1100_CONTROL_READ");
+                        return -1;
+                }
+                optreg=reg.val;
+                if (reg.error) printf("optreg.error=%x\n", reg.error);
+                printf("optreg=0x%08x\n", optreg);
+
+                sleep(1);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/frontin_3100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/frontin_3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/frontin_3100.c	(revision 22)
@@ -0,0 +1,47 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p;
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        while (1) {
+                struct sis1100_ctrl_reg reg;
+
+                int ioreg;
+                reg.offset=0x80;
+                if (ioctl(p, SIS3100_CONTROL_READ, &reg)<0) {
+                        perror("SIS3100_CONTROL_READ");
+                        return -1;
+                }
+                ioreg=reg.val;
+                if (reg.error) printf("ioreg.error=%x\n", reg.error);
+
+                printf("ioreg=0x%08x\n", ioreg);
+
+                sleep(1);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/frontirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/frontirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/frontirqtest.c	(revision 22)
@@ -0,0 +1,97 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p, front_io;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    front_io=0x7f;
+    ioctl(p, SIS1100_FRONT_IO, &front_io);
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+
+    irqctl.irq_mask=0xffffffff; /* all IRQs */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+reg.offset=0x8;
+ioctl(p, SIS1100_CONTROL_READ, &reg);
+printf("0x%08x\n", reg.val);
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0xffffffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        printf("irqget: 0x%08x\n", irqget.irqs);
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/frontout_1100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/frontout_1100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/frontout_1100.c	(revision 22)
@@ -0,0 +1,65 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, count=0;
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        while (1) {
+                struct sis1100_ctrl_reg reg;
+                int optreg;
+
+                reg.offset=0xF0;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        perror("SIS1100_CONTROL_READ");
+                        return -1;
+                }
+                if (reg.error) printf("read optreg error=%x\n", reg.error);
+
+                optreg=reg.val;
+                optreg=(optreg&~0xf0) | ((count&0xf)<<4);
+
+                reg.val=optreg;
+                if (ioctl(p, SIS1100_CONTROL_WRITE, &reg)<0) {
+                        perror("SIS1100_CONTROL_WRITE");
+                        return -1;
+                }
+                if (reg.error) printf("write optreg error=%x\n", reg.error);
+
+                reg.offset=0xF0;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        perror("SIS1100_CONTROL_READ");
+                        return -1;
+                }
+                if (reg.error) printf("read optreg error=%x\n", reg.error);
+
+                optreg=reg.val;
+                printf("count=%x optreg=0x%08x\n", count, optreg);
+
+                sleep(1);
+                count++;
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/frontout_3100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/frontout_3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/frontout_3100.c	(revision 22)
@@ -0,0 +1,57 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, count=0;
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        while (1) {
+                struct sis1100_ctrl_reg reg;
+                int ioreg;
+
+                ioreg=(count&0x7f) | ((~count&0x7f)<<16);
+
+                reg.offset=0x80;
+                reg.val=ioreg;
+                if (ioctl(p, SIS3100_CONTROL_WRITE, &reg)<0) {
+                        perror("SIS3100_CONTROL_WRITE");
+                        return -1;
+                }
+                if (reg.error) printf("write ioreg error=%x\n", reg.error);
+
+                if (ioctl(p, SIS3100_CONTROL_READ, &reg)<0) {
+                        perror("SIS3100_CONTROL_READ");
+                        return -1;
+                }
+                if (reg.error) printf("read ioreg error=%x\n", reg.error);
+
+                ioreg=reg.val;
+                printf("count=%x ioreg=0x%08x\n", count, ioreg);
+
+                sleep(1);
+                count++;
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_read.c	(revision 22)
@@ -0,0 +1,118 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sis1100_ident ident;
+    struct sis1100_ctrl_reg reg;
+    volatile u_int32_t* regspace;
+    u_int32_t regsize;
+    u_int32_t data;
+    enum sis1100_subdev devtype;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        fprintf(stderr, "open \"%s\": %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n", strerror(errno));
+        return 2;
+    }
+    printf("local:\n");
+    printf("  hw_type   : %d\n",   ident.local.hw_type);
+    printf("  hw_version: %d\n",   ident.local.hw_version);
+    printf("  fw_type   : %d\n",   ident.local.fw_type);
+    printf("  fw_version: %d\n\n", ident.local.fw_version);
+    printf("remote:\n");
+    printf("  hw_type   : %d\n",   ident.remote.hw_type);
+    printf("  hw_version: %d\n",   ident.remote.hw_version);
+    printf("  fw_type   : %d\n",   ident.remote.fw_type);
+    printf("  fw_version: %d\n\n", ident.remote.fw_version);
+
+    printf("  remote side is %s and %svalid\n",
+        ident.remote_online?"online":"offline",
+        ident.remote_ok?"":"not ");
+
+    if ((ident.local.hw_type!=1)||(ident.local.hw_version!=1)||
+        (ident.local.fw_type!=1)) {
+        fprintf(stderr, "unsupported bord version\n");
+        return 2;
+    }
+
+    reg.offset=0;
+    if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+        fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0): %s\n",
+            strerror(errno));
+        return 2;
+    }
+    if (reg.error!=0) {
+        fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0): error=0x%x\n",
+            reg.error);
+        return 2;
+    }
+    if (reg.val!=(ident.local.hw_type|
+        (ident.local.hw_version<<8)|
+        (ident.local.fw_type<<16)|
+        (ident.local.fw_version<<24))) {
+        fprintf(stderr, "local ident 0x%08x does not match SIS1100_IDENT\n",
+            reg.val);
+        return 2;
+    }
+
+    if (ioctl(p, SIS1100_DEVTYPE, &devtype)<0) {
+        printf("ioctl(SIS1100_DEVTYPE): %s\n", strerror(errno));
+        return 1;
+    }
+    if (devtype!=sis1100_subdev_ctrl) {
+        printf("You have to use the control device (sis1100ctrl_xx).\n");
+        return 1;
+    }
+
+    if (ioctl(p, SIS1100_MAPSIZE, &regsize)<0) {
+        fprintf(stderr, "ioctl(SIS1100_MAPSIZE 1): %s\n", strerror(errno));
+        return 1;
+    }
+    printf("size of regspace=0x%x\n", regsize);
+
+    regspace=mmap(0, regsize, PROT_READ|PROT_WRITE, MAP_SHARED, p, 0);
+    if (regspace==MAP_FAILED) {
+        fprintf(stderr, "mmap register space: %s\n", strerror(errno));
+        return 2;
+    }
+
+    data=regspace[0];
+    if (data!=reg.val) {
+        fprintf(stderr, "local ident 0x%08x (mapped) does not match SIS1100_IDENT\n",
+            data);
+        return 2;
+    }
+
+    if (munmap((void*)regspace, regsize)<0) {
+        fprintf(stderr, "munmap: %s\n", strerror(errno));
+        return 2;
+    }
+
+    if (close(p)<0) {
+        fprintf(stderr, "close: %s\n", strerror(errno));
+        return 2;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_rw.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_rw.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/glinktest_local_rw.c	(revision 22)
@@ -0,0 +1,53 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sis1100_ident ident;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        fprintf(stderr, "open \"%s\": %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n", strerror(errno));
+        return 2;
+    }
+    
+    if ((ident.local.hw_type!=1)||(ident.local.hw_version!=1)||
+        (ident.local.fw_type!=1)) {
+        fprintf(stderr, "unsupported bord version:\n");
+        fprintf(stderr, "  hw_type   : %d\n",   ident.local.hw_type);
+        fprintf(stderr, "  hw_version: %d\n",   ident.local.hw_version);
+        fprintf(stderr, "  fw_type   : %d\n",   ident.local.fw_type);
+        fprintf(stderr, "  fw_version: %d\n\n", ident.local.fw_version);
+        return 2;
+    }
+
+
+
+
+    if (close(p)<0) {
+        fprintf(stderr, "close: %s\n", strerror(errno));
+        return 2;
+    }
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/gnuplot.ini
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/gnuplot.ini	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/gnuplot.ini	(revision 22)
@@ -0,0 +1,10 @@
+#set term post enh color
+#set output 'mist.ps'
+
+set output
+set term X11
+
+set mxtics 10
+set mytics 10
+set logscale x
+set logscale y
Index: /drsdaq/VME/struck/sis1100/V2.02/test/ident.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/ident.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/ident.c	(revision 22)
@@ -0,0 +1,96 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include <dev/pci/sis1100_var.h>
+
+static u_int32_t read_remote_register(int p, u_int32_t offs)
+{
+    struct sis1100_ctrl_reg reg;
+
+    reg.offset=offs;
+    if (ioctl(p, SIS3100_CONTROL_READ, &reg)<0) {
+	fprintf(stderr, "ioctl(SIS3100_CONTROL_READ, offs=0x%x): errno=%s\n",
+    	    offs, strerror(errno));
+	return -1;
+    }
+    if (reg.error) {
+	fprintf(stderr, "ioctl(SIS3100_CONTROL_READ, offs=0x%x): error=%d\n",
+    	    offs, reg.error);
+	return -1;
+    }
+    return reg.val;
+}
+
+static u_int32_t read_local_register(int p, u_int32_t offs)
+{
+    struct sis1100_ctrl_reg reg;
+
+    reg.offset=offs;
+    if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+	fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0x%x): errno=%s\n",
+    	    offs, strerror(errno));
+	return -1;
+    }
+    if (reg.error) {
+	fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0x%x): error=%d\n",
+    	    offs, reg.error);
+	return -1;
+    }
+    return reg.val;
+}
+
+static u_int32_t read_ident(int p, struct sis1100_ident* ident)
+{
+    if (ioctl(p, SIS1100_IDENT, ident)<0) {
+	fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n",strerror(errno));
+	return -1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int p;
+    u_int32_t id;
+    struct sis1100_ident ident;
+
+    if (argc<2)
+      {
+      fprintf(stderr, "usage: %s path\n", argv[0]);
+      return 1;
+      }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0)
+      {
+      fprintf(stderr, "open(\"%s\"): %s\n", argv[1], strerror(errno));
+      return 1;
+      }
+
+    id=read_local_register(p, 0);
+    printf("local id        : 0x%08x\n\n", id);
+
+    read_ident(p, &ident);
+    printf("local hw_type   : %d\n", ident.local.hw_type);
+    printf("local hw_version: %d\n", ident.local.hw_version);
+    printf("local fw_type   : %d\n", ident.local.fw_type);
+    printf("local fw_version: %d\n\n", ident.local.fw_version);
+
+    id=read_remote_register(p, 0);
+    printf("remote id       : 0x%08x\n\n", id);
+
+    if (!ident.remote_ok) {
+    	printf("remote id not available\n");
+    } else {
+	printf("remote hw_type   : %d\n", ident.remote.hw_type);
+	printf("remote hw_version: %d\n", ident.remote.hw_version);
+	printf("remote fw_type   : %d\n", ident.remote.fw_type);
+	printf("remote fw_version: %d\n\n", ident.remote.fw_version);
+    }
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/install-sh
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/install-sh	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/install-sh	(revision 22)
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
Index: /drsdaq/VME/struck/sis1100/V2.02/test/iotest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/iotest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/iotest.c	(revision 22)
@@ -0,0 +1,143 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int ngf_base=0xe00000;
+
+#define SFI_W(info, x, v) (((sfi_w)(info)->base)->x=H2SFI(v))
+#define SEQ_W(info, x, v) SFI_W(info, seq[x], v)
+
+/****************************************************************************/
+static int vme_read(int p, int base, int addr)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    res=ioctl(p, SIS3100_VME_READ, &req);
+    if (res)
+        printf("vme read 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, strerror(errno), req.error);
+    return req.data;
+}
+/****************************************************************************/
+static void vme_write(int p, int base, int addr, int data)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    req.data=data;
+    res=ioctl(p, SIS3100_VME_WRITE, &req);
+    if (res)
+        printf("vme write 0x%08x, 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, req.data, strerror(errno), req.error);
+}
+/****************************************************************************/
+static void ngf_status(int p)
+{
+    printf("===============\n");
+    printf("[2020] = %04X\n", vme_read(p, ngf_base, 0x2020)&0xffff);
+}
+/****************************************************************************/
+volatile int idx, irq, irqcount=0;
+
+static void sighnd(int sig)
+{
+    irq++; irqcount++;
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p, i;
+    struct sigaction action, old_action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, &old_action);
+    
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    irqctl.irq_mask=0xffff; /* ALL IRQs; just for fun */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    for (i=0; i<7; i++) {
+        int v;
+        v=0xff0000;
+        if (ioctl(p, SIS1100_FRONT_IO, &v)) {
+            fprintf(stderr, "ioctl(SIS1100_FRONT_IO): %s\n", strerror(errno));
+            return 1;    
+        }
+        v=1<<i;
+        if (ioctl(p, SIS1100_FRONT_IO, &v)) {
+            fprintf(stderr, "ioctl(SIS1100_FRONT_IO): %s\n", strerror(errno));
+            return 1;    
+        }
+        v=0;
+        if (ioctl(p, SIS1100_FRONT_IO, &v)) {
+            fprintf(stderr, "ioctl(SIS1100_FRONT_IO): %s\n", strerror(errno));
+            return 1;    
+        }
+        printf("%d: 0x%08x\n", i, v);
+    }
+
+
+    sigsuspend(&old_mask);
+    fprintf(stderr, "after suspend\n");
+
+    irqget.irq_mask=0xffff;
+    irqget.immediate_ack=0;
+    if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_GET): %s\n", strerror(errno));
+        return 1;    
+    }
+    printf("got level 0x%x vector 0x%x\n", irqget.irq_mask, irqget.vector);
+
+    vme_write(p, ngf_base, 0x2038, 0); /* clear seq. command flag */
+    ngf_status(p);
+
+    irqack.irq_mask=irqget.irq_mask;
+    if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_ACK): %s\n", strerror(errno));
+        return 1;    
+    }
+    sigaction(SIGUSR1, &old_action, 0);
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/irqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/irqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/irqtest.c	(revision 22)
@@ -0,0 +1,148 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int sis_base[]={0, 0x60000, 0x70000};
+
+/****************************************************************************/
+static int vme_read(int p, int base, int addr)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    res=ioctl(p, SIS3100_VME_READ, &req);
+    if (res)
+        printf("vme read 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, strerror(errno), req.error);
+    return req.data;
+}
+/****************************************************************************/
+static void vme_write(int p, int base, int addr, int data)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    req.data=data;
+    res=ioctl(p, SIS3100_VME_WRITE, &req);
+    if (res)
+        printf("vme write 0x%08x, 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, req.data, strerror(errno), req.error);
+}
+/****************************************************************************/
+volatile int idx, irq, irqcount=0;
+
+static void sighnd(int sig)
+{
+    irq++; irqcount++;
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p, module, idx;
+    struct sigaction action, old_action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, &old_action);
+    
+/*
+ *     sigemptyset(&mask);
+ *     sigaddset(&mask, SIGUSR1);
+ *     sigprocmask(SIG_BLOCK, &mask, &old_mask);
+ */
+
+    for (module=0; module<3; module++) {
+        vme_write(p, sis_base[module], 0x60, 0); /* reset */
+    }
+
+    irqctl.irq_mask=0xffff; /* ALL levels; just for fun */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    idx=0;
+    for (module=0; module<3; module++) {
+        int base, level;
+        base=sis_base[module];
+        level=module+1;
+        vme_write(p, base, 0x20, 0); /* fifo clear */
+        vme_write(p, base, 0x28, 0); /* enable next logic */
+        vme_write(p, base, 0x0, 0x400000); /* enable irq source 2 (half full) */
+        vme_write(p, base, 0x4, 0x800|((level&7)<<9)|level);
+
+        irq=0;
+        while (!irq) {
+            idx++;
+            vme_write(p, base, 0x24, 0); /* clock */
+        }    
+    }
+
+/*
+ *     sigsuspend(&old_mask);
+ *     fprintf(stderr, "after suspend\n");
+ */
+
+    while (1) {
+        int base, count, data;
+        irqget.irq_mask=0xffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;    
+        }
+        printf("got irqs 0x%08x level=%d vector 0x%x\n",
+                irqget.irqs, irqget.level, irqget.vector);
+        if (!irqget.irqs) return 0;
+
+        base=sis_base[irqget.vector-1];
+        count=0;
+        while ((vme_read(p, base, 0x0)&0x100)==0) {
+            data=vme_read(p, base, 0x100);
+            count++;
+        }
+        printf("count=%d\n", count);
+
+        irqack.irq_mask=1<<irqget.level;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;    
+        }
+    }
+    sigaction(SIGUSR1, &old_action, 0);
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/irqtest_ngf.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/irqtest_ngf.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/irqtest_ngf.c	(revision 22)
@@ -0,0 +1,133 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int ngf_base=0xe00000;
+
+#define SFI_W(info, x, v) (((sfi_w)(info)->base)->x=H2SFI(v))
+#define SEQ_W(info, x, v) SFI_W(info, seq[x], v)
+
+/****************************************************************************/
+static int vme_read(int p, int base, int addr)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    res=ioctl(p, SIS3100_VME_READ, &req);
+    if (res)
+        printf("vme read 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, strerror(errno), req.error);
+    return req.data;
+}
+/****************************************************************************/
+static void vme_write(int p, int base, int addr, int data)
+{
+    int res;
+    struct sis1100_vme_req req;
+
+    req.size=4;
+    req.am=0x9;
+    req.addr=base+addr;
+    req.data=data;
+    res=ioctl(p, SIS3100_VME_WRITE, &req);
+    if (res)
+        printf("vme write 0x%08x, 0x%08x: res=%s, error=0x%x\n",
+    	    req.addr, req.data, strerror(errno), req.error);
+}
+/****************************************************************************/
+static void ngf_status(int p)
+{
+    printf("===============\n");
+    printf("[2020] = %04X\n", vme_read(p, ngf_base, 0x2020)&0xffff);
+}
+/****************************************************************************/
+volatile int idx, irq, irqcount=0;
+
+static void sighnd(int sig)
+{
+    irq++; irqcount++;
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sigaction action, old_action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, &old_action);
+    
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    irqctl.irq_mask=0xffff; /* ALL irq_mask; just for fun */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    vme_write(p, ngf_base, 0x201c, 0); /* reset */
+    vme_write(p, ngf_base, 0x2030, 0); /* reset sequencer */
+    vme_write(p, ngf_base, 0x2038, 0); /* clear seq. command flag */
+    ngf_status(p);
+    vme_write(p, ngf_base, 0x2020, 0); /* start sequencer */
+    vme_write(p, ngf_base, 0x2010, 0x977); /* irq level */
+    vme_write(p, ngf_base, 0x2014, 0xff); /* irq mask */
+    ngf_status(p);
+    vme_write(p, ngf_base, 0x10000+0x68, 0); /* set seq. command flag */
+    ngf_status(p);
+
+    sigsuspend(&old_mask);
+    fprintf(stderr, "after suspend\n");
+
+    irqget.irq_mask=0xffff;
+    irqget.immediate_ack=0;
+    if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_GET): %s\n", strerror(errno));
+        return 1;    
+    }
+    printf("got level 0x%x vector 0x%x\n", irqget.irq_mask, irqget.vector);
+
+    vme_write(p, ngf_base, 0x2038, 0); /* clear seq. command flag */
+    ngf_status(p);
+
+    irqack.irq_mask=irqget.irq_mask;
+    if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+        fprintf(stderr, "ioctl(SIS3100_IRQ_ACK): %s\n", strerror(errno));
+        return 1;    
+    }
+    sigaction(SIGUSR1, &old_action, 0);
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest.c	(revision 22)
@@ -0,0 +1,93 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigaddset(&mask, SIGUSR2);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+    sigaction(SIGUSR2, &action, 0);
+
+    irqctl.irq_mask=0;
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            default:
+                printf("ERROR: got irqs=%08x, remote_status=%d\n",
+                    irqget.irqs, irqget.remote_status);
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/linkirqtest1.c	(revision 22)
@@ -0,0 +1,52 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p, count=0;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    irqctl.irq_mask=0;
+    irqctl.signal=-1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    while (count++<10) {
+        irqget.irq_mask=0;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_WAIT, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_WAIT): %s\n", strerror(errno));
+            return 1;
+        }
+        printf("  SIS1100_IRQ_WAIT returned; irqs=%08x, remote_status=%d\n",
+                irqget.irqs, irqget.remote_status);
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/maptest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/maptest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/maptest.c	(revision 22)
@@ -0,0 +1,251 @@
+#if 0
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+struct mapinfo {
+        u_int32_t header;
+        u_int32_t bordaddr;
+        int bordsize;
+        int modifier;
+        int mapidx, mapnum;
+        char* mapbase;
+        off_t mapsize;
+        char* bordbase;
+};
+
+/****************************************************************************/
+static void
+clear_maps(int p)
+{
+        int i;
+        struct sis1100_ctrl_reg reg;
+
+        for (i=0; i<64; i++) {
+                /* clear the .adl register; --> mark as unused */
+                reg.offset=0x408+16*i;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+static void
+dump_map(int p, struct mapinfo* map)
+{
+        int i;
+        printf("---------------------------\n");
+        printf("header  =0x%08x\n", map->header);
+        printf("bordaddr=0x%08x\n", map->bordaddr);
+        printf("bordsize=0x%08x\n", map->bordsize);
+        printf("modifier=      0x%02x\n", map->modifier);
+        printf("mapidx  =  %8d\n", map->mapidx);
+        printf("mapnum  =  %8d\n", map->mapnum);
+        printf("mapbase =%p\n", map->mapbase);
+        printf("mapsize =0x%08lx\n", map->mapsize);
+        printf("bordbase=%p\n", map->bordbase);
+        printf("\n");
+
+        for (i=map->mapidx; i<map->mapidx+map->mapnum; i++) {
+                struct sis1100_ctrl_reg reg;
+                u_int32_t offs=0x400+16*i;
+                
+                printf("idx=%d\n", i);
+                reg.offset=offs+0;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".hdr=0x%08x\n", reg.val);
+                reg.offset=offs+4;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".am =0x%08x\n", reg.val);
+                reg.offset=offs+8;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adl=0x%08x\n", reg.val);
+                reg.offset=offs+12;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adh=0x%08x\n", reg.val);
+        }
+
+}
+/****************************************************************************/
+static int
+map_it(int p, struct mapinfo* map)
+{
+        u_int32_t spacebase;
+        u_int32_t spacesize;
+        u_int32_t bordoffs;
+        struct sis1100_ctrl_reg reg;
+        int i;
+
+        /* get size of VME-space */
+        if (ioctl(p, SIS1100_MAPSIZE, &spacesize)<0) {
+                printf("SIS1100_MAPSIZE: %s\n", strerror(errno));
+                return -1;
+        }
+
+        /*
+        printf("size of VME space=0x%x\n", spacesize);
+        */
+
+        spacebase=map->bordaddr & MAPMASK;
+        bordoffs=map->bordaddr & OFFMASK;
+        map->mapnum=(map->bordsize+bordoffs+MAPSIZE-1)/MAPSIZE;
+        map->mapsize=map->mapnum*MAPSIZE;
+
+        /* this code is only to find an unused map entry */
+        /* not really necessary */
+        for (i=0; i<64; i++) {
+                reg.offset=0x408+16*i;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        printf("SIS1100_CONTROL_READ: %s\n", strerror(errno));
+                        return -1;
+                }
+                if (reg.error) {
+                        printf("SIS1100_CONTROL_READ: error=0x%x\n", reg.error);
+                        return -1;
+                }
+                if (reg.val==0) break;
+        }
+        if (i>=(64-map->mapnum)) {
+                printf("map_it: no maps available\n");
+                return -1;
+        }
+        /*printf("found free entry at %d\n", i);*/
+
+
+
+        map->mapidx=i;
+        for (i=0; i<map->mapnum; i++) {
+                u_int32_t offs=0x400+16*(map->mapidx+i);
+
+                reg.offset=offs+0;
+                reg.val=map->header;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+4;
+                reg.val=map->modifier;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                reg.offset=offs+8;
+
+                /* the '|0xa5a5' is only used to mark the entry as 'in use' */
+                /* the lowest 22 bits are ignored, so we can misuse them */
+                reg.val=spacebase+MAPSIZE*i|0xa5a5;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+12;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+
+        map->mapbase=mmap(0,
+                        map->mapsize,
+                        PROT_READ|PROT_WRITE, MAP_SHARED,
+                        p,
+                        mapinfo.offset+map->mapidx*MAPSIZE);
+        /*                             ^^^^^^^^^^^^^^^^^^^   */
+        /*                      only this term is really missing in your code*/
+
+
+        if (map->mapbase==MAP_FAILED) {
+                printf("mmap: %s\n", strerror(errno));
+                for (i=0; i<map->mapnum; i++) {
+                        reg.offset=0x400+16*(map->mapidx+i)+8;
+                        reg.val=0;
+                        ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                }
+                return -1;
+        }
+        map->bordbase=map->mapbase+bordoffs;
+        return 0;
+}
+/****************************************************************************/
+static void
+unmap_it(int p, struct mapinfo* map)
+{
+        struct sis1100_ctrl_reg reg;
+        int i;
+
+        munmap(map->mapbase, map->mapsize);
+        for (i=0; i<map->mapnum; i++) {
+                reg.offset=0x400+16*(map->mapidx+i)+8;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, p, i;
+        struct mapinfo map[5];
+        volatile u_int32_t val;
+
+        if (argc!=3) {
+                fprintf(stderr, "usage: %s path controlpath\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) {
+            printf("open %s: %s\n", argv[1], strerror(errno));
+            return 1;
+        }
+
+        /* mark all maps as unused */
+        clear_maps(cp);
+
+        map[0].header=0xff010800;
+        map[0].bordaddr=0x00222200;
+        map[0].bordsize=0x400000;
+        map[0].modifier=0x39;
+
+        map[1].header=0xff010800;
+        map[1].bordaddr=0x00d00000;
+        map[1].bordsize=0x300000;
+        map[1].modifier=0x39;
+
+        map[2].header=0xff010800;
+        map[2].bordaddr=0xee000000;
+        map[2].bordsize=0x400000;
+        map[2].modifier=0x9;
+
+        map[3].header=0xff010800;
+        map[3].bordaddr=0x00f00000;
+        map[3].bordsize=0x100000;
+        map[3].modifier=0x39;
+
+        map[4].header=0xff010800;
+        map[4].bordaddr=0x00380000;
+        map[4].bordsize=0x00200000;
+        map[4].modifier=0x39;
+
+        for (i=0; i<5; i++) {
+                if (map_it(p, map+i)<0) return 1;
+                dump_map(p, map+i);
+        }
+
+        /* the real access */
+        val=*(u_int16_t*)(map[0].bordbase+0xfa);
+        val=*(u_int16_t*)(map[1].bordbase+0xfe02);
+        val=*(u_int16_t*)(map[2].bordbase+0x1000);
+        val=*(u_int16_t*)(map[3].bordbase+0x0);
+        val=*(u_int16_t*)(map[4].bordbase+0x100000);
+
+        for (i=0; i<5; i++) {
+                unmap_it(p, map+i);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+#else
+int main(void) {return 0;}
+#endif
Index: /drsdaq/VME/struck/sis1100/V2.02/test/modules.idents
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/modules.idents	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/modules.idents	(revision 22)
@@ -0,0 +1,165 @@
+V259 multihit pattern
+A24D16
+base: <8..23>
+size=265
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10b=2h
+type=100=4h
+
+
+V262 IO reg
+A24D16
+size=265
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10
+type=1
+
+
+V512 Logic
+A32/24/D16
+base: <8..31>
+size=256
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10
+type=11010=1ah=26d
+
+
+V550 C-RAMS
+A32/24/D16
+base: <16..31>
+size=
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10
+type=110100=34h=52d
+
+
+V551 C-RAMS sequencer
+A32/24/D16
+base: <16..31>
+size=
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10
+type=111100=0x3c
+
+
+V560 counter
+A32/24/D16
+base: <8..31>
+size=256
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10=2h
+type=11000=0x18
+
+
+V673 tdc
+base: <16..31>
+size=
+A32/24/D16
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10=2h
+type=100101100=0x12c
+
+
+V729 flash adc
+A32/24/D16
+base: <16..31>
+size=65536
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10=2h
+type=1001000=0x48
+
+
+V767 tdc
+A32/24/D16(?)
+base: <16..31>
+size=8192(?)
+1026..102e manufacturer = 00 40 e6
+1032..103e bord id      = 00 00 02 ff
+104e       revision     = 00
+1f02..1f06 serial       = ...
+
+
+V775 tdc
+A32/24/D16(?)
+base: <16..31>
+size=36864(?)
+8026..802e manufacturer = 00 40 e6
+8032       version      = 11
+8036..803e bord id      = 00 03 07
+804e       revision     = 00
+8f02..8f06 serial       = 00 02
+
+
+V785 peak sensing adc
+A32/24/D16(?)
+base: <16..31>
+size=4352(?)
+8026..802e manufacturer = 00 40 e6
+8032       version      = 11
+8036..803e bord id      = 00 03 11
+804e       revision     = 00
+8f02..8f06 serial       = 00 02
+
+
+V792 qdc
+A32/24/D16(?)
+base: <16..31>
+size=65536
+8026..802e manufacturer = 00 40 e6
+8032       version      = 11
+8036..803e bord id      = 00 03 18
+804e       revision     = 00
+8f02..8f06 serial       = 00 02
+
+
+V820/830 scaler
+A32/24/D16(?)
+base: <16..31>
+size=
+8026..802e manufacturer = 00 40 e6
+8032       version      = 11
+8036..803e bord id      = 00 03 43
+804e       revision     = 00
+8f02..8f06 serial       = 00 02
+
+
+V1488 tdc
+A32/24/D16(?)
+base: <16..31>
+size=
+base+0xfe <15..12> version       <11..0> serial
+base+0xfc <15..10> manufacturer> <9..0> type
+base+0xfa=0xfaf5
+manufacturer=10=2h
+type=110111=0x37
+
+real modules:
+259E  0106 0x00080000
+262   0158 0x00090000
+512   0022 0x000a0000
+560E  0283 0x000b0000
+560E  0285 0x000c0000
+729A  0013 0x000d0000 x
+729A  0016 0x000e0000 x
+767     8  0x000f0000
+775    217 0x00100000
+785AE  212 0x00110000
+792AA  230 0x00120000
+792AA  232 0x00130000
+
Index: /drsdaq/VME/struck/sis1100/V2.02/test/pipeline.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/pipeline.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/pipeline.c	(revision 22)
@@ -0,0 +1,218 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int p;
+
+/* das sind die CAEN-Module, die ich zufaellig habe, beliebig durcheinander-
+   gewuerfelt und vervielfacht */
+struct sis1100_pipelist list[]={
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x0c010000, 0x09, 0x500fe, 0}
+};
+
+
+static int pipeline_read(int p, struct sis1100_pipelist* list, int listlen,
+    u_int32_t* data, int seq)
+{
+    struct sis1100_pipe pipe;
+
+    pipe.num=listlen;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) printf("error=0x%x\n", pipe.error);
+    return 0;
+}
+
+volatile int stop=0;
+
+static void hand(int sig)
+{
+printf("signal %d\n", sig);
+stop=1;
+}
+
+int main(int argc, char* argv[])
+{
+    int num, loopcount, reqcount, i, j, *data;
+    int* comp, comp_valid, dot;
+    struct sigaction act;
+
+    if (argc<4)
+      {
+      fprintf(stderr, "usage: %s path reqcount loopcount\n", argv[0]);
+      return 1;
+      }
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    reqcount=atoi(argv[2]);
+    loopcount=atoi(argv[3]);
+
+    act.sa_handler=hand;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags=0;
+    sigaction(SIGINT, &act, 0);
+    sigaction(SIGQUIT, &act, 0);
+
+    num=sizeof(list)/sizeof(struct sis1100_pipelist);
+    if (reqcount<num) num=reqcount;
+    printf("listlen=%d; loopcount=%d\n", num, loopcount);
+
+    data=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp_valid=0;
+
+    if (!data) {
+    	printf("malloc: %s\n", strerror(errno));
+	return 1;
+    }
+    for (i=0; i<num; i++) data[i]=0x12345678; /* just for test */
+    dot=10000/num;
+    for (j=0; j<loopcount; j++) {
+    	if (stop || (pipeline_read(p, list, num, data, j)<0)) goto raus;
+        if (comp_valid) {
+            for (i=0; i<num; i++) {
+                if (comp[i]!=data[i]) printf("[%d] %08x-->%08x\n",
+                    i, comp[i], data[i]);
+            }
+        } else {
+            for (i=0; i<num; i++) comp[i]=data[i];
+            comp_valid=1;
+        }
+        if ((j%dot)==0) {printf("."); fflush(stdout);}
+    }
+raus:
+    printf("tranferred %d words\n", j*num);
+    for (i=0; i<num; i++)
+    	printf("[%2d] %x: %08x\n", i, list[i].addr, data[i]&0xffff);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/pipeline1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/pipeline1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/pipeline1.c	(revision 22)
@@ -0,0 +1,117 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+#define swap_short(x) ((((x)>>8)&0x000000ff) |\
+                       (((x)<<8)&0x0000ff00))
+
+int p;
+
+struct sis1100_pipelist listent={0x03010000, 0x09, 0x200fc, 0};
+
+struct sis1100_pipelist* list;
+
+static int pipeline_read(int p, struct sis1100_pipelist* list, int listlen,
+    u_int32_t* data)
+{
+    struct sis1100_pipe pipe;
+
+    pipe.num=listlen;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) printf("error=0x%x\n", pipe.error);
+    return 0;
+}
+
+volatile int stop=0;
+
+static void hand(int sig)
+{
+printf("signal %d\n", sig);
+stop=1;
+}
+
+int main(int argc, char* argv[])
+{
+    int num, loopcount, i, j, *data;
+    int *comp, comp_valid, dot, debug;
+    struct sigaction act;
+
+    if (argc<5)
+      {
+      fprintf(stderr, "usage: %s path reqcount loopcount debug\n", argv[0]);
+      return 1;
+      }
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    num=atoi(argv[2]);
+    loopcount=atoi(argv[3]);
+    debug=atoi(argv[4]);
+
+    act.sa_handler=hand;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags=0;
+    sigaction(SIGINT, &act, 0);
+    sigaction(SIGQUIT, &act, 0);
+
+    printf("listlen=%d; loopcount=%d\n", num, loopcount);
+
+    list=(struct sis1100_pipelist*)malloc(num*sizeof(struct sis1100_pipelist));
+    data=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp_valid=0;
+
+    if (!data || !list || !comp) {
+    	printf("malloc: %s\n", strerror(errno));
+	return 1;
+    }
+    for (i=0; i<num; i++) list[i]=listent;
+    if (!debug)
+        for (i=0; i<num; i++) data[i]=0x12345678; /* just for test */
+    dot=10000/num;
+    for (j=0; j<loopcount; j++) {
+    	if (stop || (pipeline_read(p, list, num, data)<0)) goto raus;
+        if (!debug) {
+            if (comp_valid) {
+                for (i=0; i<num; i++) {
+                    if (comp[i]!=data[i]) printf("[%d] %08x-->%08x\n",
+                        i, comp[i], data[i]);
+                }
+            } else {
+                for (i=0; i<num; i++) comp[i]=data[i];
+                comp_valid=1;
+            }
+        }
+        if ((j%dot)==0) {printf("."); fflush(stdout);}
+    }
+raus:
+    printf("tranferred %d words\n", j*num);
+    /*
+    for (i=0; i<num; i++)
+    	printf("[%2d] %x: %08x\n", i, list[i].addr, swap_int(data[i])&0xffff);
+    */
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/plot_speed.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/plot_speed.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/plot_speed.c	(revision 22)
@@ -0,0 +1,327 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#define PORT 8899
+
+int plottype;
+char* setupfile;
+char* format;
+
+char* title[]={"w0", "r0", "w1", "r1"};
+
+struct speed {
+    struct speed *prev, *next;
+    int size, num;
+    float f[1];
+};
+
+struct speed* speed;
+
+static int
+xrecv(int s, int n, int* v)
+{
+    int res, rest=n*4;
+    char* p=(char*)v;
+    while (rest) {
+        res=recv(s, p, rest, 0);
+        if (res<0) {
+            if (errno!=EINTR) {
+                perror("recv");
+                return -1;
+            } else
+                res=0;
+        } else if (res==0) {
+            fprintf(stderr, "no more data\n");
+            return -1;
+        }
+        rest-=res;
+        p+=res;
+    }
+    return 0;
+}
+
+static int
+add_entry(struct speed* e)
+{
+    struct speed *prev, *next;
+/* original e->f[i] is measured in Bytes/s */
+/* size is in terms of Words */
+    switch (plottype) {
+    case 0:
+        break;
+    case 1: {
+            int i;
+            for (i=e->num-1; i>=0; i--) {
+                e->f[i]=4./e->f[i];
+            }
+        }
+        break;
+    case 2: {
+            int i;
+            for (i=e->num-1; i>=0; i--) {
+                e->f[i]=(e->size*4.)/e->f[i];
+            }
+        }
+        break;
+    default:
+        fprintf(stderr, "Program error; plottype %d not implemented\n",
+            plottype);
+    }
+
+    next=speed; prev=0;
+
+    while (next && (next->size<=e->size)) {prev=next; next=next->next;}
+    fprintf(stderr, "size=%d; ", e->size);
+    if (prev)
+        fprintf(stderr, "prev.size=%d; ", prev->size);
+    else
+        fprintf(stderr, "prev=0; ");
+    if (next)
+        fprintf(stderr, "next.size=%d\n", next->size);
+    else
+        fprintf(stderr, "next=0\n");
+
+    if (next) {
+        e->next=next;
+        next->prev=e;
+    } else
+        e->next=0;
+    if (prev) {
+        e->prev=prev;
+        prev->next=e;
+    } else {
+        e->prev=0;
+        speed=e;
+    }
+
+    return 0;
+}
+
+static void
+dump_speed(void)
+{
+    struct speed *e=speed;
+    fprintf(stderr, "---------------\n");
+    while (e) {
+        int i;
+        fprintf(stderr, "%6d", e->size);
+        for (i=0; i<e->num; i++)
+                fprintf(stderr, " %12.2f\n", e->f[i]);
+        fprintf(stderr, "\n");
+        e=e->next;
+    }
+}
+
+static int
+setup_plot(char* name)
+{
+    struct stat buf;
+    static time_t last_mtime=0;
+
+    if (stat(name, &buf)<0) {
+        fprintf(stderr, "cannot stat \"%s\": %s\n", name, strerror(errno));
+        return -1;
+    }
+    
+    if (buf.st_mtime!=last_mtime) {
+        FILE* f;
+        char s[1024];
+
+        f=fopen(name, "r");
+        if (!f) {
+            fprintf(stderr, "cannot open \"%s\": %s\n", name, strerror(errno));
+            return -1;
+        }
+        while (fgets(s, 1024, f)) {
+            printf("%s\n", s);
+        }
+        fclose(f);
+        last_mtime=buf.st_mtime;
+    }
+    return 0;
+}
+
+static void
+plot_it(void)
+{
+    struct speed *e;
+    int i;
+
+    if (!speed) return;
+
+    setup_plot(setupfile);
+
+    printf("plot ");
+    for (i=0; i<speed->num; i++)
+        printf("\"-\" us 1:2 title '%s' w l%s",
+                title[i], (i<speed->num-1)?", ":"\n");
+
+    for (i=0; i<speed->num; i++) {
+        e=speed;
+        while (e) {
+            printf(format, e->size, e->f[i]);
+            e=e->next;
+        }
+        printf("e\n\n");
+    }
+    fflush(stderr);
+}
+
+static void
+init_plot(void)
+{
+    printf("set term x11\n");
+    switch (plottype) {
+    case 0:
+        printf("set title \"Throughput\"\n");
+        printf("set xlabel \"Size/words\"\n");
+        printf("set ylabel \"Byte/s\"\n");
+        printf("plot \"-\" with points\n");
+        printf("0 0\n1 1\ne\n\n");
+        break;
+    case 1:
+        printf("set title \"Seconds/Word\"\n");
+        printf("set xlabel \"Size/words\"\n");
+        printf("set ylabel \"s/word\"\n");
+        printf("plot \"-\" with points\n");
+        printf("0 0\n1 0\ne\n\n");
+        break;
+    case 2:
+        printf("set title \"Duration\"\n");
+        printf("set xlabel \"Size/words\"\n");
+        printf("set ylabel \"s\"\n");
+        printf("plot \"-\" with points\n");
+        printf("0 0\n1 1\ne\n\n");
+        break;
+    default:
+        fprintf(stderr, "Program error; plottype %d not implemented\n",
+            plottype);
+    }
+}
+
+static void
+printusage(int argc, char* argv[])
+{
+    fprintf(stderr, "usage: %s [-s setupfile] [-t type] | gnuplot\n", argv[0]);
+    fprintf(stderr, "       -t: 0: bytes/s (default)\n"
+                    "           1: s/word\n"
+                    "           2: s (absolute)\n");
+    fprintf(stderr, "       -s: setupfile contains arbitrary gnuplot commands\n"
+                    "           it is reread before plotting each ntuple\n"
+                    "           default is 'gnuplot.ini'\n");
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    int errflag, c;
+    const char* args="t:s:";
+
+    setupfile="gnuplot.ini";
+    plottype=0;
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 't': plottype=atoi(optarg); break;
+        case 's': setupfile=optarg; break;
+        default: errflag=1;
+        }
+    }
+
+    if (errflag || optind!=argc) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    if ((plottype<0) || (plottype>2)) {
+        fprintf(stderr, "plottype %d not known\n", plottype);
+        return -1;
+    }
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int s, ns;
+    struct sockaddr_in addr;
+    struct sockaddr caddr;
+    struct in_addr in_addr;
+    int tmp, res;
+
+    if (getoptions(argc, argv)<0) return 1;
+    switch (plottype) {
+    case 0:
+        format="%6d %12.2f\n";
+        break;
+    case 1:
+        format="%6d %g\n";
+        break;
+    case 2:
+        format="%6d %g\n";
+        break;
+    default:
+        fprintf(stderr, "Program error; plottype %d not implemented\n",
+            plottype);
+    }
+
+    res=setvbuf(stdout, 0, _IONBF, 0);
+    if (res<0) {perror("setvbuf"); return 1;}
+
+    speed=0;
+
+    init_plot();
+
+    bzero(&addr, sizeof(struct sockaddr_in));
+    bzero(&caddr, sizeof(struct sockaddr));
+    addr.sin_family=AF_INET;
+    addr.sin_port=htons(PORT);
+    addr.sin_addr.s_addr=INADDR_ANY;
+    s=socket(addr.sin_family, SOCK_STREAM, 0);
+    if (s<0)
+        {perror("socket"); return 1;}
+    if (bind(s, (struct sockaddr*)&addr, sizeof(struct sockaddr_in))<0)
+        {perror("bind"); return 1;}
+    if (listen(s, 1)<0) {perror("listen"); return 1;}
+    tmp=sizeof(struct sockaddr_in);
+    ns=accept(s, (struct sockaddr*)&addr, &tmp);
+    if (ns<0) {perror("accept"); return 1;}
+    in_addr.s_addr=addr.sin_addr.s_addr;
+    fprintf(stderr, "%s accepted\n", inet_ntoa(in_addr));
+
+    do {
+        int n, i;
+        struct speed *e;
+
+        if (xrecv(ns, 1, &n)<0) return 1;
+
+        e=malloc(sizeof(struct speed)+(n-1)*sizeof(float));
+        if (!e) {
+            perror("malloc");
+            return -1;
+        }
+        e->num=n;
+
+        if (xrecv(ns, 1, &e->size)<0) return 1;
+        for (i=0; i<n; i++) {
+            if (xrecv(ns, 1, (int*)(e->f+i))<0) return 1;
+        }
+        add_entry(e);
+        plot_it();
+    } while (1);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver.c	(revision 22)
@@ -0,0 +1,51 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int mod_base=0xe00000;
+int p;
+
+/****************************************************************************/
+static void printerror(struct sis1100_vme_req* req, int _errno, int write)
+{
+if (write)
+    printf("vme write 0x%08x to 0x%08x", req->data, req->addr);
+else
+    printf("vme read 0x%08x", req->addr);
+
+printf(": %s", strerror(_errno));
+if (_errno==EIO) printf("; protocoll error 0x%x", req->error);
+printf("\n");
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+struct sis1100_vme_req req;
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s path\n", argv[0]);
+  return 1;
+  }
+if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+req.size=4;
+req.am=0x39;
+req.addr=mod_base+0x2020;
+if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+    printf("SIS3100_VME_READ(2020): %s\n", strerror(errno));
+    return 1;
+}
+printf("*0x2020=0x%08x; error=0x%x\n", req.data, req.error);
+
+close(p);
+return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_1.c	(revision 22)
@@ -0,0 +1,137 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+#define swap_short(x) ((((x)>>8)&0x000000ff) |\
+                       (((x)<<8)&0x0000ff00))
+
+/****************************************************************************/
+static int read_local(int p, u_int32_t offs, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+
+reg.offset=offs;
+if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0)
+  {
+  fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0x%x): %s\n",
+      offs, strerror(errno));
+  return -1;
+  }
+*data=reg.val;
+return 0;
+}
+/****************************************************************************/
+static int write_local(int p, u_int32_t offs, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+
+reg.offset=offs;
+reg.val=data;
+if (ioctl(p, SIS1100_CONTROL_WRITE, &reg)<0)
+  {
+  fprintf(stderr, "ioctl(SIS1100_CONTROL_WRITE, offs=0x%x): %s\n",
+      offs, strerror(errno));
+  return -1;
+  }
+return 0;
+}
+/****************************************************************************/
+/* !!! hier ist alles D16 */
+static int vme_read(int p, u_int32_t addr, u_int16_t* val)
+{
+u_int32_t head, be, error, _val;
+
+if (addr&2) {
+    be=0xc;
+    addr&=~2;
+} else
+    be=0x3;
+
+
+head=(be<<24)|0x010802; /* remote space 1, am, start with address */
+if (write_local(p, 0x80, head)<0) return -1; /* t_hdr */
+if (write_local(p, 0x84, 9)<0) return -1;    /* t_am  */
+if (write_local(p, 0x88, addr)<0) return -1; /* t_adl */
+
+do {
+  if(read_local(p, 0xac, &error)<0) return -1; /* prot_error */
+} while (error==0x005); /* deadlock */
+
+if (error) {
+    printf("vme_read 0x%08x: err=0x%x\n", addr, error);
+    return -1;
+}
+if (read_local(p, 0xa0, &_val)<0) return -1; /* tc_dal */
+*val=swap_int(_val);
+return 0;
+}
+/****************************************************************************/
+static int vme_write(int p, u_int32_t addr, u_int16_t val)
+{
+u_int32_t head, be, error, _val;
+
+_val=swap_int(val);
+if (addr&2) {
+    be=0xc;
+    addr&=~2;
+} else
+    be=0x3;
+head=(be<<24)|0x010c02; /* remote space 1, am, write, start with address */
+if (write_local(p, 0x80, head)<0) return -1; /* t_hdr */
+if (write_local(p, 0x84, 9)<0) return -1;    /* t_am  */
+if (write_local(p, 0x90, _val)<0) return -1;  /* t_dal */
+if (write_local(p, 0x88, addr)<0) return -1; /* t_adl */
+
+do {
+  error=read_local(p, 0xac, &error); /* prot_error */
+} while (error==0x005); /* deadlock */
+
+if (error) {
+    printf("vme_write 0x%08x: err=0x%x\n", addr, error);
+    return -1;
+}
+return 0;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int p;
+int i;
+u_int32_t base;
+u_int16_t data;
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s path\n", argv[0]);
+  return 1;
+  }
+if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+printf("search for CAEN-Modules:\n");
+for (i=0, base=0; i<10; i++, base+=0x10000) {
+    if (vme_read(p, base+0xfa, &data)==0) { /* kein Fehler */
+    	if (data==0xfaf5) { /* CAEN-Module */
+	    u_int16_t type, serial;
+	    if (vme_read(p, base+0xfc, &type)<0) return -1;
+	    if (vme_read(p, base+0xfe, &serial)<0) return -1;
+	    printf("at 0x%x: type=0x%x; serial=%d\n", base, type, serial&0xfff);
+	}
+    }
+}
+
+
+close(p);
+return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_a.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_a.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/read_write_driver_a.c	(revision 22)
@@ -0,0 +1,70 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int p;
+
+/****************************************************************************/
+static void printerror(struct sis1100_vme_req* req, int _errno, int write)
+{
+if (write)
+    printf("vme write 0x%08x to 0x%08x", req->data, req->addr);
+else
+    printf("vme read 0x%08x", req->addr);
+
+printf(": %s", strerror(_errno));
+if (_errno==EIO) printf("; protocoll error 0x%x", req->error);
+printf("\n");
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+struct sis1100_vme_req req;
+u_int32_t base;
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s path\n", argv[0]);
+  return 1;
+  }
+if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+req.size=2; /* driver does not change any field except data */
+req.am=0x9; /* "" */
+
+printf("search for CAEN-Modules:\n");
+for (i=0, base=0; i<10; i++, base+=0x10000) {
+    req.addr=base+0xfa;
+    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+    	printerror(&req, errno, 0);
+    } else {
+    	printf("data=0x%08x\n", req.data);
+    	if (req.data==0xfaf5) { /* CAEN-Module */
+	    u_int16_t type, serial;
+	    req.addr=base+0xfc;
+	    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+    	    	printerror(&req, errno, 0); return 1;
+	    }
+	    type=req.data;
+	    req.addr=base+0xfe;
+	    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+    	    	printerror(&req, errno, 0); return 1;
+	    }
+	    serial=req.data;
+	    printf("at 0x%x: type=0x%x; serial=%d\n", base, type, serial&0xfff);
+	}
+    }
+}
+
+close(p);
+return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/readout_v550.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/readout_v550.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/readout_v550.c	(revision 22)
@@ -0,0 +1,355 @@
+#ifdef __linux__
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#define LINUX_LARGEFILE O_LARGEFILE
+#else
+#define LINUX_LARGEFILE 0
+#endif
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+struct caen_type {
+    int typ;
+    char* name;
+    char* descr;
+};
+
+struct caen_type caen_types[]={
+    {0x34, "V550", "C-RAMS"},            /* 64k */
+    {0x3c, "V551B", "C-RAMS Sequencer"},
+    {0x48, "V729A", "40 MHz ADC"},
+    {0x12e, "V693", "Multihit TDC"},
+    {0x311, "V785", "Peak Sensing ADC"},
+    {0, 0, 0} 
+};
+
+/****************************************************************************/
+static int find_caen_name(int typ)
+{
+    int i;
+    for (i=0; caen_types[i].name && caen_types[i].typ!=typ; i++);
+    if (caen_types[i].typ==typ)
+        return i;
+    else
+        return -1;
+}
+/****************************************************************************/
+static void
+fill_pipeent(struct sis1100_pipelist* ent, int am, int size, u_int32_t addr)
+{
+    ent->head=((0x00f00000<<size)&0x0f000000)<<(addr&3)|0x00010000;
+    ent->am=am;
+    ent->addr=addr;
+}
+/****************************************************************************/
+static int check_caen_rom(int p, u_int32_t addr)
+{
+    struct sis1100_pipelist list[10];
+    struct sis1100_pipe pipe;
+    u_int16_t ver;
+    u_int16_t rev;
+    u_int32_t manu, board_id, serial;
+    int idx, i;
+    u_int32_t data[10];
+    static const u_int32_t offs[10]={
+        0x8026, /*oui_msb*/
+        0x802a, /*oui*/
+        0x802e, /*oui_lsb*/
+        0x8032, /*ver*/
+        0x8036, /*id_msb*/
+        0x803a, /*id*/
+        0x803e, /*id_lsb*/
+        0x804e, /*rev*/
+        0x8f02, /*ser_msb*/
+        0x8f06  /*ser_lsb*/};
+
+
+    for (i=0; i<10; i++) fill_pipeent(list+i, 9, 2, addr+offs[i]);
+    pipe.num=10;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) return 0;
+
+    manu=((data[0]&0xff)<<12)|((data[1]&0xff)<<8)|(data[2]&0xff);
+    if (manu!=0x40e6) return 0;
+
+    board_id=((data[4]&0xff)<<12)|((data[5]&0xff)<<8)|(data[6]&0xff);
+    serial=((data[8]&0xff)<<8)|(data[9]&0xff);
+    ver=data[3];
+    rev=data[7];
+    idx=find_caen_name(board_id);
+    if (idx>=0)
+        printf("0x%08x: CAEN %-6s; version=%d; serial=%d; revision=%d (%s)\n",
+            addr, caen_types[idx].name, ver, serial, rev, caen_types[idx].descr);
+    else
+        printf("0x%08x: CAEN unknown type 0x%x; version=%d; serial=%d; revision=%d\n",
+            addr, board_id, ver, serial, rev);
+    return board_id;
+}
+/****************************************************************************/
+static int check_caen(int p, u_int32_t addr)
+{
+    u_int16_t v[3];
+    int res;
+    struct vmespace space;
+
+    if ((res=check_caen_rom(p, addr))>0) return res;
+
+    space.am=9;
+    space.datasize=2;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+
+    if (ioctl(p, SIS1100_SETVMESPACE, &space)<0) {
+        perror("SETVMESPACE");
+        return -1;
+    }
+
+    res=pread(p, v, 6, addr+0xfa);
+    if (res!=6) {
+        /*fprintf(stderr, "read 0x%x+0xfa: %s\n", addr, strerror(errno));*/
+        return 0;
+    }
+
+    if (v[0]==0xfaf5) {
+        int typ, manf, ser, ver, idx;
+
+        typ=v[1]&0x3ff;
+        manf=(v[1]>>10)&0x3f;
+        ser=v[2]&0xfff;
+        ver=(v[2])>12&0xf;
+        idx=find_caen_name(typ);
+        if (idx>=0)
+            printf("0x%08x: CAEN %-6s; version=%d; serial=%d (%s)\n",
+                addr, caen_types[idx].name, ver, ser, caen_types[idx].descr);
+        else
+            printf("0x%08x: CAEN; unknown type 0x%x; version=%d; serial=%d\n",
+                addr, typ, ver, ser);
+        return typ;
+    }
+    return 0;
+}
+/****************************************************************************/
+static u_int32_t find_caen(int p, int code)
+{
+    u_int32_t addr;
+    int idx, res;
+
+    for (addr=0, idx=0; idx<65536; idx++, addr+=0x10000) {
+        res=check_caen(p, addr);
+        if (res<0) return 0xffffffffU;
+        if (res==code) return addr;
+    }
+    return 0xffffffffU;
+}
+/****************************************************************************/
+static int
+write_16(int p, u_int32_t addr, u_int16_t val)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr;
+    req.data=val;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_WRITE, &req)<0) {
+        fprintf(stderr, "VME_WRITE(0x%08x, 0x%x)\n", addr, val);
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_WRITE(0x%08x, 0x%x): error=0x%x\n",
+            addr, val, req.error);
+        return -1;
+    }
+    return 0;
+}
+/****************************************************************************/
+static u_int16_t
+read_16(int p, u_int32_t addr)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr;
+    req.data=0;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+        fprintf(stderr, "VME_READ(0x%08x)\n", addr);
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_READ(0x%08x): error=0x%x\n",
+            addr, req.error);
+        return -1;
+    }
+    return req.data&0xffff;
+}
+/****************************************************************************/
+static u_int32_t
+read_32(int p, u_int32_t addr)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr;
+    req.data=0;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+        fprintf(stderr, "VME_READ(0x%08x): %s\n", addr, strerror(errno));
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_READ(0x%08x): error=0x%x\n",
+            addr, req.error);
+        return -1;
+    }
+    return req.data;
+}
+/****************************************************************************/
+static int
+setup_v551(int p, u_int32_t addr)
+{
+    write_16(p, addr+0xc, 2016); /* number of channels */
+    return 0;
+}
+/****************************************************************************/
+static int
+setup_v550(int p, u_int32_t addr)
+{
+    write_16(p, addr+0x4, (0x3f<<6)|(0x3f)); /* number of channels */
+    write_16(p, addr+0x2, 2);
+    return 0;
+}
+/****************************************************************************/
+static int
+trigger_v551(int p, u_int32_t addr)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr+6;
+    req.data=0;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_WRITE, &req)<0) {
+        perror("VME_WRITE(6, 0)");
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_WRITE(6, 0): error=0x%x\n", req.error);
+        return -1;
+    }
+    return 0;
+}
+/****************************************************************************/
+static int
+read_v550(int p, u_int32_t addr)
+{
+    int count0, count1, i, val;
+
+    count0=read_16(p, addr+0x10)+10;
+    count1=read_16(p, addr+0x12);
+    printf("count0=%d; count1=%d\n", count0, count1);
+    for (i=0; i<count0; i++) {
+        val=read_32(p, addr+0x8);
+    }
+    for (i=0; i<count1; i++) {
+        val=read_32(p, addr+0xc);
+    }
+    return 0;
+}
+/****************************************************************************/
+static int
+stat_v550(int p, u_int32_t addr)
+{
+    u_int16_t stat;
+    stat=read_16(p, addr+0x2);
+    printf("status 550=0x%04x\n", stat);
+    return 0;
+}
+/****************************************************************************/
+static int
+clear_v550(int p, u_int32_t addr)
+{
+    write_16(p, addr+0x6, 0);
+    return 0;
+}
+/****************************************************************************/
+static int
+stat_v551(int p, u_int32_t addr)
+{
+    u_int16_t stat;
+    stat=read_16(p, addr+0x8);
+    printf("status 551=0x%04x\n", stat);
+    return 0;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    u_int32_t addr_550, addr_551;
+    int p, num;
+
+    if (argc<2) {
+        fprintf(stderr, "usage: %s path [num]\n", argv[0]);
+        return 1;
+    }
+    num=argc>2?atoi(argv[2]):65536;
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        fprintf(stderr, "open %s: %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    addr_550=find_caen(p, 0x34);
+    if (addr_550==0xffffffff) {
+        printf("no V550 found\n");
+        return 1;
+    } else {
+        printf("fount V550 at 0x%08x\n", addr_550);
+    }
+    addr_551=find_caen(p, 0x3c);
+    if (addr_551==0xffffffffU) {
+        printf("no V551 found\n");
+        return 1;
+    } else {
+        printf("found V551 at 0x%08x\n", addr_551);
+    }
+    if (setup_v550(p, addr_550)<0) return 1;
+    if (setup_v551(p, addr_551)<0) return 1;
+
+    stat_v550(p, addr_550);
+    stat_v551(p, addr_551);
+
+    clear_v550(p, addr_550);
+    stat_v550(p, addr_550);
+    stat_v551(p, addr_551);
+
+    trigger_v551(p, addr_551);
+    stat_v550(p, addr_550);
+    stat_v551(p, addr_551);
+
+    read_v550(p, addr_550);
+    stat_v550(p, addr_550);
+    stat_v551(p, addr_551);
+
+    close(p);
+    return 0;
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/readout_v729.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/readout_v729.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/readout_v729.c	(revision 22)
@@ -0,0 +1,394 @@
+#ifdef __linux__
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#define LINUX_LARGEFILE O_LARGEFILE
+#else
+#define LINUX_LARGEFILE 0
+#endif
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+struct caen_type {
+    int typ;
+    char* name;
+    char* descr;
+};
+
+struct caen_type caen_types[]={
+    {0x34, "V550", "C-RAMS"},            /* 64k */
+    {0x3c, "V551B", "C-RAMS Sequencer"},
+    {0x48, "V729A", "40 MHz ADC"},
+    {0x12e, "V693", "Multihit TDC"},
+    {0x311, "V785", "Peak Sensing ADC"},
+    {0, 0, 0} 
+};
+
+const int M=16, N=32;
+
+/****************************************************************************/
+static int find_caen_name(int typ)
+{
+    int i;
+    for (i=0; caen_types[i].name && caen_types[i].typ!=typ; i++);
+    if (caen_types[i].typ==typ)
+        return i;
+    else
+        return -1;
+}
+/****************************************************************************/
+static void
+fill_pipeent(struct sis1100_pipelist* ent, int am, int size, u_int32_t addr)
+{
+    ent->head=((0x00f00000<<size)&0x0f000000)<<(addr&3)|0x00010000;
+    ent->am=am;
+    ent->addr=addr;
+}
+/****************************************************************************/
+static int check_caen_rom(int p, u_int32_t addr)
+{
+    struct sis1100_pipelist list[10];
+    struct sis1100_pipe pipe;
+    u_int16_t ver;
+    u_int16_t rev;
+    u_int32_t manu, board_id, serial;
+    int idx, i;
+    u_int32_t data[10];
+    static const u_int32_t offs[10]={
+        0x8026, /*oui_msb*/
+        0x802a, /*oui*/
+        0x802e, /*oui_lsb*/
+        0x8032, /*ver*/
+        0x8036, /*id_msb*/
+        0x803a, /*id*/
+        0x803e, /*id_lsb*/
+        0x804e, /*rev*/
+        0x8f02, /*ser_msb*/
+        0x8f06  /*ser_lsb*/};
+
+
+    for (i=0; i<10; i++) fill_pipeent(list+i, 9, 2, addr+offs[i]);
+    pipe.num=10;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) return 0;
+
+    manu=((data[0]&0xff)<<12)|((data[1]&0xff)<<8)|(data[2]&0xff);
+    if (manu!=0x40e6) return 0;
+
+    board_id=((data[4]&0xff)<<12)|((data[5]&0xff)<<8)|(data[6]&0xff);
+    serial=((data[8]&0xff)<<8)|(data[9]&0xff);
+    ver=data[3];
+    rev=data[7];
+    idx=find_caen_name(board_id);
+    if (idx>=0)
+        printf("0x%08x: CAEN %-6s; version=%d; serial=%d; revision=%d (%s)\n",
+            addr, caen_types[idx].name, ver, serial, rev, caen_types[idx].descr);
+    else
+        printf("0x%08x: CAEN unknown type 0x%x; version=%d; serial=%d; revision=%d\n",
+            addr, board_id, ver, serial, rev);
+    return board_id;
+}
+/****************************************************************************/
+static int check_caen(int p, u_int32_t addr)
+{
+    u_int16_t v[3];
+    int res;
+    struct vmespace space;
+
+    if ((res=check_caen_rom(p, addr))>0) return res;
+
+    space.am=9;
+    space.datasize=2;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+
+    if (ioctl(p, SIS1100_SETVMESPACE, &space)<0) {
+        perror("SETVMESPACE");
+        return -1;
+    }
+
+    res=pread(p, v, 6, addr+0xfa);
+    if (res!=6) {
+        /*fprintf(stderr, "read 0x%x+0xfa: %s\n", addr, strerror(errno));*/
+        return 0;
+    }
+
+    if (v[0]==0xfaf5) {
+        int typ, manf, ser, ver, idx;
+
+        typ=v[1]&0x3ff;
+        manf=(v[1]>>10)&0x3f;
+        ser=v[2]&0xfff;
+        ver=(v[2])>12&0xf;
+        idx=find_caen_name(typ);
+        if (idx>=0)
+            printf("0x%08x: CAEN %-6s; version=%d; serial=%d (%s)\n",
+                addr, caen_types[idx].name, ver, ser, caen_types[idx].descr);
+        else
+            printf("0x%08x: CAEN; unknown type 0x%x; version=%d; serial=%d\n",
+                addr, typ, ver, ser);
+        return typ;
+    }
+    return 0;
+}
+/****************************************************************************/
+static u_int32_t find_caen(int p, int code)
+{
+    u_int32_t addr;
+    int idx, res;
+
+    for (addr=0, idx=0; idx<65536; idx++, addr+=0x10000) {
+        res=check_caen(p, addr);
+        if (res<0) return 0xffffffffU;
+        if (res==code) return addr;
+    }
+    return 0xffffffffU;
+}
+/****************************************************************************/
+static int
+write_16(int p, u_int32_t addr, u_int16_t val)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr;
+    req.data=val;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_WRITE, &req)<0) {
+        fprintf(stderr, "VME_WRITE(0x%08x, 0x%x)\n", addr, val);
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_WRITE(0x%08x, 0x%x): error=0x%x\n",
+            addr, val, req.error);
+        return -1;
+    }
+    return 0;
+}
+/****************************************************************************/
+static u_int16_t
+read_16(int p, u_int32_t addr)
+{
+    struct sis1100_vme_req req;
+    req.size=2;
+    req.am=9;
+    req.addr=addr;
+    req.data=0;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+        fprintf(stderr, "VME_READ(0x%08x): %s\n", addr, strerror(errno));
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_READ(0x%08x): error=0x%x\n",
+            addr, req.error);
+        return -1;
+    }
+    return req.data&0xffff;
+}
+/****************************************************************************/
+static u_int32_t
+read_32(int p, u_int32_t addr)
+{
+    struct sis1100_vme_req req;
+    req.size=4;
+    req.am=9;
+    req.addr=addr;
+    req.data=0;
+    req.error=0;
+    if (ioctl(p, SIS3100_VME_READ, &req)<0) {
+        fprintf(stderr, "VME_READ(0x%08x): %s\n", addr, strerror(errno));
+        return -1;
+    }
+    if (req.error){
+        fprintf(stderr, "VME_READ(0x%08x): error=0x%x\n",
+            addr, req.error);
+        return -1;
+    }
+    return req.data;
+}
+/****************************************************************************/
+static int
+reset_v729(int p, u_int32_t addr)
+{
+    write_16(p, addr+0x14, 0);
+    return 0;
+}
+/****************************************************************************/
+static int
+setup_v729(int p, u_int32_t addr)
+{
+    int i;
+    u_int16_t cbl, obae, obaf;
+    u_int16_t w[4];
+
+    reset_v729(p, addr);
+
+    /* fifo settings */
+    cbl=4096+12-M;
+    obae=0;
+    obaf=N;
+    w[0]=(obae<<8)&0xff00;
+    w[1]=obae&0x0f00;
+    w[2]=((obaf<<8)&0xff00)|(cbl&0xff);
+    w[3]=(obae&0x0f00)|((cbl>>8)&0xf);
+    for (i=0; i<4; i++) {
+        write_16(p, addr+0x10, w[i]);
+        write_16(p, addr+0x12, 0);
+    }
+    
+    /* number of samples */
+    write_16(p, addr+0x8, N);
+
+    /* ofsets */
+    for (i=0; i<4; i++) {
+        write_16(p, addr+0x18+4*i, 0x733); /* DAC+ */
+        write_16(p, addr+0x1a+4*i, 0x733); /* DAC- */
+    }
+
+    write_16(p, addr+0xe, 0); /* control */
+    return 0;
+}
+/****************************************************************************/
+static int
+trigger_v729(int p, u_int32_t addr)
+{
+    write_16(p, addr+0x16, 1);
+    write_16(p, addr+0x16, 0);
+    return 0;
+}
+/****************************************************************************/
+static void print_data(u_int32_t v, int fifo)
+{
+    u_int32_t v0, v1, tc;
+    int e0, e1;
+
+    e0=!(v&0x20000000);
+    e1=!(v&0x40000000);
+    if (v&0x80000000) {
+        tc=v&0xffffff;
+        printf("%c%c time=%d", e0?'-':'X', e1?'-':'X', tc);
+    } else {
+        v0=v&0xfff;
+        v1=(v>>12)&0xfff;
+        printf("%c%c %d %d", e0?'-':'X', e1?'-':'X', v1, v0);
+    }
+}
+/****************************************************************************/
+static int
+read_v729(int p, u_int32_t addr)
+{
+    int count, i;
+    u_int32_t d0[N+1];
+    u_int32_t d1[N+1];
+    struct sis1100_vme_block_req req;
+
+    req.size=4;
+    req.fifo=1;
+    req.num=N+1;
+    req.am=0x9;
+    req.error=0;
+
+    count=read_16(p, addr+0x8);
+    printf("count=%d\n", count);
+    req.addr=addr+0x0;
+    req.data=d0;
+    if (ioctl(p, SIS3100_VME_BLOCK_READ, &req)<0) {
+        printf("VME_BLOCK_READ buffer_0: %s\n", strerror(errno));
+    }
+    if (req.error) {
+        printf("VME_BLOCK_READ buffer_0: error=0x%x\n", req.error);
+    }
+    req.addr=addr+0x4;
+    req.data=d1;
+    if (ioctl(p, SIS3100_VME_BLOCK_READ, &req)<0) {
+        printf("VME_BLOCK_READ buffer_1: %s\n", strerror(errno));
+    }
+    if (req.error) {
+        printf("VME_BLOCK_READ buffer_1: error=0x%x\n", req.error);
+    }
+
+    for (i=0; i<N+1; i++) {
+        printf("d0[%2d]: ", i); print_data(d0[i], 0); printf("\n");
+    }
+    for (i=0; i<N+1; i++) {
+        printf("d1[%2d]: ", i); print_data(d1[i], 1); printf("\n");
+    }
+    return 0;
+}
+/****************************************************************************/
+static int
+stat_v729(int p, u_int32_t addr, char* text)
+{
+    u_int16_t stat, a_events, r_events;
+    a_events=read_16(p, addr+0xa);
+    r_events=read_16(p, addr+0xc);
+    stat=read_16(p, addr+0xe);
+     printf("status 729 %s\n", text);
+    printf("  stat=0x%04x, a_events=%d, r_events=%d\n",
+        stat, a_events, r_events);
+    return 0;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    u_int32_t addr_729;
+    int p;
+
+    if (argc<2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        fprintf(stderr, "open %s: %s\n", argv[1], strerror(errno));
+        return 1;
+    }
+
+    if (argc>2) {
+        addr_729=strtoul(argv[2], 0, 0);
+        printf("using addr 0x%08x\n", addr_729);
+    } else {
+        addr_729=find_caen(p, 0x48);
+        if (addr_729==0xffffffff) {
+            printf("no V729 found\n");
+            return 1;
+        } else {
+            printf("found V729 at 0x%08x\n", addr_729);
+        }
+    }
+
+    reset_v729(p, addr_729);
+    stat_v729(p, addr_729, "after reset");
+    setup_v729(p, addr_729);
+    stat_v729(p, addr_729, "after setup");
+
+    trigger_v729(p, addr_729);
+    stat_v729(p, addr_729, "after trigger");
+
+    read_v729(p, addr_729);
+
+    stat_v729(p, addr_729, "after read");
+
+    close(p);
+    return 0;
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/reset1100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/reset1100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/reset1100.c	(revision 22)
@@ -0,0 +1,66 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include <dev/pci/sis1100_var.h>
+
+static u_int32_t write_local_register(int p, u_int32_t offs, u_int32_t val)
+{
+    struct sis1100_ctrl_reg reg;
+
+    reg.offset=offs;
+    reg.val=val;
+    if (ioctl(p, SIS1100_CONTROL_WRITE, &reg)<0) {
+	fprintf(stderr, "ioctl(SIS1100_CONTROL_WRITE, offs=0x%x): %s\n",
+    	    offs, strerror(errno));
+	return -1;
+    }
+    return 0;
+}
+
+static u_int32_t read_local_register(int p, u_int32_t offs)
+{
+    struct sis1100_ctrl_reg reg;
+
+    reg.offset=offs;
+    if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+	fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0x%x): %s\n",
+    	    offs, strerror(errno));
+	return -1;
+    }
+    return reg.val;
+}
+
+int main(int argc, char* argv[])
+{
+    int p;
+    u_int32_t status, control;
+
+    if (argc<2)
+      {
+      fprintf(stderr, "usage: %s path\n", argv[0]);
+      return 1;
+      }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0)
+      {
+      fprintf(stderr, "open(\"%s\"): %s\n", argv[1], strerror(errno));
+      return 1;
+      }
+
+    status=read_local_register(p, 4);
+    control=read_local_register(p, 8);
+    printf("  before reset:\n");
+    printf("status=0x%08x, control=0x%08x\n", status, control);
+    write_local_register(p, 8, 1);
+    status=read_local_register(p, 4);
+    control=read_local_register(p, 8);
+    printf("  after reset:\n");
+    printf("status=0x%08x, control=0x%08x\n", status, control);
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/reset3100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/reset3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/reset3100.c	(revision 22)
@@ -0,0 +1,54 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include <dev/pci/sis1100_var.h>
+
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sis1100_ident ident;
+
+    if (argc<2)
+      {
+      fprintf(stderr, "usage: %s path\n", argv[0]);
+      return 1;
+      }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0)
+      {
+      fprintf(stderr, "open(\"%s\"): %s\n", argv[1], strerror(errno));
+      return 1;
+      }
+
+    if (ioctl(p, SIS3100_RESET)<0) {
+	fprintf(stderr, "ioctl(SIS3100_RESET): %s\n", strerror(errno));
+	return 1;
+    }
+
+    if (ioctl(p, SIS1100_IDENT, &ident)<0) {
+	fprintf(stderr, "ioctl(SIS1100_IDENT): %s\n",strerror(errno));
+	return 1;
+    }
+
+    
+    printf("local  hw_type   : %d\n", ident.local.hw_type);
+    printf("local  hw_version: %d\n", ident.local.hw_version);
+    printf("local  fw_type   : %d\n", ident.local.fw_type);
+    printf("local  fw_version: %d\n\n", ident.local.fw_version);
+    if (ident.remote_ok<0) {
+    	printf("remote id not available\n");
+    } else {
+	printf("remote hw_type   : %d\n", ident.remote.hw_type);
+	printf("remote hw_version: %d\n", ident.remote.hw_version);
+	printf("remote fw_type   : %d\n", ident.remote.fw_type);
+	printf("remote fw_version: %d\n\n", ident.remote.fw_version);
+        printf("remote side is %sonline\n", ident.remote_online?"":"not ");
+    }
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw.c	(revision 22)
@@ -0,0 +1,213 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int generate_size(int max)
+{
+    int maxbits, bits;
+    int mask, size;
+
+    maxbits=0;
+    while (1<<maxbits<max) maxbits++;
+    bits=random()%maxbits+1;
+    mask=0xffffffff>>(32-bits);
+    size=random()%mask+1;
+    if ((size>max) || (size==0)) {
+        printf("invalid size %d\n", size);
+        printf("  max    =0x%08x\n", max);
+        printf("  maxbits=%d\n", maxbits);
+        printf("  bits   =%d\n", bits);
+        printf("  mask   =0x%08x\n", mask);
+        size=1;
+    }
+    return size;
+}
+
+static int generate_start(int max, int size)
+{
+    int space, offs;
+    space=max-size;
+    offs=random()%(space+1);
+    return offs;
+}
+
+/*
+ * static void fill_buf(int size, int* buf)
+ * {
+ *     int i;
+ *     for (i=0; i<size; i++) {
+ *         buf[i]=random();
+ *     }
+ * }
+ */
+
+static void fill_buf(int size, int* buf, int num)
+{
+    int i;
+    for (i=0; i<size; i++) {
+        buf[i]=num<<28|i;
+    }
+}
+
+static int test_buf(int size, int* obuf, int* ibuf)
+{
+    int i, n=0;
+
+    for (i=0; i<size; i++) {
+        if (obuf[i]!=ibuf[i]) {
+            if (n++<20) {
+                printf("\n[%3d] 0x%08X --> 0x%08X", i, obuf[i], ibuf[i]);
+            }
+        }
+    }
+    if (n) {
+        printf("\n      %d errors\n", n);
+    }
+    return n;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, size, offs, num;
+    int fehler=0;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+    srandom(17);
+
+    if (do_write(p, 0, max, obuf)) {
+        printf("initial write failed\n");
+        return 1;
+    }
+
+    num=0;
+    while (++num) {
+        int rw;
+        size=generate_size(max);
+        /*printf("size=%d\n", size);*/
+        offs=generate_start(max, size);
+        if (offs+size>max) {
+            printf("\ninvalid offs: size=%d offs=%d\n", size, offs);
+        }
+        /*printf("  offs=%d\n", offs);*/
+        rw=random()&1;
+        if (rw) {
+            /*printf("write %08X words from %08X; (%d)\n", size, offs, num);*/
+            printf("+"); fflush(stdout);
+            fill_buf(size, obuf+offs, num);
+            if (do_write(p, offs, size, obuf+offs)) {
+                printf("\nwrite failed\n");
+                return 1;
+            }
+        } else {
+            int loop=0, weiter;
+            do {
+                int res;
+                loop++;
+                printf("%d", loop); fflush(stdout);
+                /*printf("read  %08X words from %08X\n", size, offs);*/
+                if (do_read(p, offs, size, ibuf+offs)) {
+                    printf("\nread failed\n");
+                    return 1;
+                }
+                res=test_buf(size, obuf+offs, ibuf+offs);
+                if (res) {
+                    fehler++;
+                    ioctl(p, SIS1100_DUMP);
+                }
+                weiter=res&&(fehler<=10);
+            } while (weiter);
+        }
+    }
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_1.c	(revision 22)
@@ -0,0 +1,134 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static void fill_buf(int size, int* buf, int num)
+{
+    int i;
+    for (i=0; i<size; i++) {
+        buf[i]=num<<20|i;
+    }
+}
+
+static int test_buf(int size, int* obuf, int* ibuf)
+{
+    int i, n=0;
+
+    for (i=0; i<size; i++) {
+        if (obuf[i]!=ibuf[i]) {
+            if (n++<20) {
+                printf("[%3d] 0x%08X --> 0x%08X\n", i, obuf[i], ibuf[i]);
+            }
+        }
+    }
+    if (n) printf("      %d errors\n", n);
+    return n;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, size;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    printf("calloc ok\n");
+
+    for (size=256; size<=16384; size+=256) {
+        printf("size=%d\n", size);
+        fill_buf(size, obuf, size);
+        do_write(p, 0, size, obuf);
+        do_read(p, 0, size, ibuf);
+        test_buf(size, obuf, ibuf);
+    }
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_2.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_2.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_2.c	(revision 22)
@@ -0,0 +1,128 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p;
+    int k;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    if (do_write(p, 0, max, obuf)) {
+        printf("initial write failed\n");
+        return 1;
+    }
+
+    for (k=0; k<8; k++) {
+        unsigned int w;
+        int res;
+
+        w=1<<k;
+        memset(obuf, w, max*sizeof(int));
+        printf("write %2x\n", w);
+        if (do_write(p, 0, max, obuf)) {
+            printf("write failed\n");
+            return 1;
+        }
+        printf("read  %2x\n", w);
+        if (do_read(p, 0, max, ibuf)) {
+            printf("read write failed\n");
+            return 1;
+        }
+        res=bcmp(obuf, ibuf, max*sizeof(int));
+        if (res) {printf("bcmp failed\n");}
+    }
+
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_3.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_3.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_3.c	(revision 22)
@@ -0,0 +1,196 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int generate_size(int max)
+{
+    int maxbits, bits;
+    int mask, size;
+
+    maxbits=0;
+    while (1<<maxbits<max) maxbits++;
+    bits=random()%maxbits+1;
+    mask=0xffffffff>>(32-bits);
+    size=random()%mask+1;
+    if ((size>max) || (size==0)) {
+        printf("invalid size %d\n", size);
+        printf("  max    =0x%08x\n", max);
+        printf("  maxbits=%d\n", maxbits);
+        printf("  bits   =%d\n", bits);
+        printf("  mask   =0x%08x\n", mask);
+        size=1;
+    }
+    return size;
+}
+
+static int generate_start(int max, int size)
+{
+    int space, offs;
+    space=max-size;
+    offs=random()%(space+1);
+    return offs;
+}
+
+/*
+ * static void fill_buf(int size, int* buf)
+ * {
+ *     int i;
+ *     for (i=0; i<size; i++) {
+ *         buf[i]=random();
+ *     }
+ * }
+ */
+
+static void fill_buf(int size, int* buf, int num)
+{
+    int i;
+    for (i=0; i<size; i++) {
+        buf[i]=num<<28|i;
+    }
+}
+
+static int test_buf(int size, int* obuf, int* ibuf)
+{
+    int i, n=0;
+
+    for (i=0; i<size; i++) {
+        if (obuf[i]!=ibuf[i]) {
+            if (n++<20) {
+                printf("[%3d] 0x%08X --> 0x%08X\n", i, obuf[i], ibuf[i]);
+            }
+        }
+    }
+    if (n) printf("      %d errors\n", n);
+    return n;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, size, offs, num;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+    srandom(17);
+
+    if (do_write(p, 0, max, obuf)) {
+        printf("initial write failed\n");
+        return 1;
+    }
+
+    num=0;
+    while (++num) {
+        size=generate_size(16384);
+        /*printf("size=%d\n", size);*/
+        offs=generate_start(max, size);
+        if (offs+size>max) {
+            printf("invalid offs: size=%d offs=%d\n", size, offs);
+        }
+        /*printf("  offs=%d\n", offs);*/
+
+        printf("write %08X words from %08X; (%d)\n", size, offs, num);
+        fill_buf(size, obuf+offs, num);
+        if (do_write(p, offs, size, obuf+offs)) {
+            printf("write failed\n");
+            return 1;
+        }
+
+        printf("read  %08X words from %08X\n", size, offs);
+        if (do_read(p, offs, size, ibuf+offs)) {
+            printf("read failed\n");
+            return 1;
+        }
+        /*if (test_buf(size, obuf+offs, ibuf+offs)) return 1;*/
+        test_buf(size, obuf+offs, ibuf+offs);
+
+    }
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4.c	(revision 22)
@@ -0,0 +1,299 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+#if 0
+static void light_set(int p, int v)
+{
+    u_int32_t reg, set, res;
+
+    set=((v&1)<<7)|((v&6)<<9);
+    res=~(set<<16)&0x0c800000;
+    reg=set|res;
+    ioctl(p, SIS1100_FRONT_IO, &reg);
+}
+#endif
+/****************************************************************************/
+static int* alloc_buf(int num)
+{
+    unsigned long int p;
+    int pagesize, pagemask;
+
+    pagesize=getpagesize();
+    pagemask=pagesize-1;
+    printf("pagesize=%d\n", pagesize);
+    p=(unsigned long int)calloc(num+pagesize, 1);
+    if (!p) return (int*)p;
+    printf("p_0=0x%08lx\n", p);
+    p=(p+pagesize-1)&(~pagemask);
+    printf("p_1=0x%08lx\n", p);
+    return (int*)p;
+}
+#if 0
+static int generate_size(int max)
+{
+    int maxbits, bits;
+    int mask, size;
+
+    maxbits=0;
+    while (1<<maxbits<max) maxbits++;
+    bits=random()%maxbits+1;
+    mask=0xffffffff>>(32-bits);
+    size=random()%mask+1;
+    if ((size>max) || (size==0)) {
+        printf("invalid size %d\n", size);
+        printf("  max    =0x%08x\n", max);
+        printf("  maxbits=%d\n", maxbits);
+        printf("  bits   =%d\n", bits);
+        printf("  mask   =0x%08x\n", mask);
+        size=1;
+    }
+    return size;
+}
+#endif
+
+static int generate_start(int max, int size)
+{
+    int space, offs;
+    space=max-size;
+    offs=random()%(space+1);
+    return offs;
+}
+
+static int test_obuf(int size, int* obuf)
+{
+    int i, n;
+
+    n=0;
+    for (i=0; i<size; i+=4) {
+        if ((obuf[i]!=0x12345678)||(obuf[i+1]!=i)) {
+            if (!n) printf("\nobuf corrupted:\n");
+            if (n<20)
+                printf("[%08X]: %08X %08X %08X %08X\n",
+                    i, obuf[i], obuf[i+1], obuf[i+2], obuf[i+3]);
+            n++;
+        }
+    }
+    return n;
+}
+
+static int test_buf(int size, int* obuf, int* ibuf)
+{
+    int i, n, res, state;
+
+    n=0; state=0;
+    for (i=0; (i<size)&&(n<5); i+=4) {
+        res=(ibuf[i]!=0x12345678)||(ibuf[i+1]!=i);
+        if (res!=state) {
+            int start, j;
+            printf("\n~~~~~~~~~~~~~~~~~~~~~~~%d~~~~~~~~~~~~~~~~~~~~~~~\n", res);
+            start=i-20; if (start<0) start=0;
+            for (j=start; j<start+40; j+=4)
+                printf("[%08X]: %08X %08X %08X %08X\n",
+                    j, ibuf[j], ibuf[j+1], ibuf[j+2], ibuf[j+3]);
+            state=res;
+            n++;
+        }
+    }
+    return n;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int test_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res, word1, word2;
+    
+    pos=lseek(p, sizeof(int)*(start+2), SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("test_write::lseek a");
+        return 1;
+    }
+    res=read(p, &word1, sizeof(int));
+    if (res!=sizeof(int)) {
+        perror("test_write a");
+        return 1;
+    }
+    pos=lseek(p, sizeof(int)*(start+size-2), SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("test_write::lseek b");
+        return 1;
+    }
+    res=read(p, &word2, sizeof(int));
+    if (res!=sizeof(int)) {
+        perror("test_write b");
+        return 1;
+    }
+    if ((word1!=start)||(word2!=start)) {
+        printf("test_write: start=%08X\n", start);
+        printf("test_write: [%08X]: %08X-->%08X\n", start+2, data[2], word1);
+        printf("            [%08X]: %08X-->%08X\n", start+size-2,
+                data[size-2], word2);
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static void prepare_data(int* buf, int offs, int size)
+{
+    int* start=buf+offs;
+    int i;
+
+    for (i=0; i<size; i+=4) {
+        start[i+2]=offs;
+        start[i+3]=size;
+    }
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, size, offs, num, i, j;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=alloc_buf(max*sizeof(int));
+    obuf=alloc_buf(max*sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    for (i=0; i<max; i+=4) {
+        obuf[i]=0x12345678;
+        obuf[i+1]=i;
+    }
+
+    if (do_write(p, 0, max, obuf)) {
+        printf("initial write failed\n");
+        return 1;
+    }
+    if (test_obuf(max, obuf)) {
+        printf("initial obuf test failed\n");
+    }
+    srandom(17);
+    num=0;
+    while (++num) {
+        int res;
+
+        for (j=0; j<1000; j++) {
+            size=/*generate_size(max)*/ 16384;
+            size=(size+3)&~3;
+
+            /*printf("size=%d\n", size);*/
+            offs=generate_start(max, size);
+            offs&=~3;
+            if (offs+size>max) {
+                printf("\ninvalid offs: size=%d offs=%d\n", size, offs);
+            }
+            /*printf("  offs=%d\n", offs);*/
+
+            /*printf("write %08X words from %08X; (%d)\n", size, offs, num);*/
+            /*printf("+"); fflush(stdout);*/
+            prepare_data(obuf, offs, size);
+            if (do_write(p, offs, size, obuf+offs)) {
+                printf("\nwrite failed\n");
+                return 1;
+            }
+            if (test_write(p, offs, size, obuf+offs)) {
+                printf("test_write: Fehler\n");
+                return 1;
+            }
+        }
+
+        if (do_read(p, 0, max, ibuf)) {
+            printf("\nread failed\n");
+            return 1;
+        }
+
+        printf("-"); fflush(stdout);
+        res=test_buf(max, obuf, ibuf);
+        if (res) {
+            ioctl(p, SIS1100_DUMP);
+            return 0;
+        }
+        
+    }
+
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4_test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4_test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_4_test.c	(revision 22)
@@ -0,0 +1,122 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static int* alloc_buf(int num)
+{
+    unsigned long int p;
+    int pagesize, pagemask;
+
+    pagesize=getpagesize();
+    pagemask=pagesize-1;
+    printf("pagesize=%d\n", pagesize);
+    p=(unsigned long int)calloc(num+pagesize, 1);
+    if (!p) return (int*)p;
+    printf("p_0=0x%08lx\n", p);
+    p=(p+pagesize-1)&(~pagemask);
+    printf("p_1=0x%08lx\n", p);
+    return (int*)p;
+}
+/****************************************************************************/
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+/****************************************************************************/
+static int test_buf(int size, int* ibuf)
+{
+    int i, n, res, state;
+
+    n=0; state=0;
+    for (i=0; (i<size)&&(n<5); i+=4) {
+        res=(ibuf[i]!=0x12345678)||(ibuf[i+1]!=i);
+        if (res!=state) {
+            int start, j;
+            printf("\n~~~~~~~~~~~~~~~~~~~~~~~%d~~~~~~~~~~~~~~~~~~~~~~~\n", res);
+            start=i-20; if (start<0) start=0;
+            for (j=start; j<start+40; j+=4)
+                printf("[%08X]: %08X %08X %08X %08X\n",
+                    j, ibuf[j], ibuf[j+1], ibuf[j+2], ibuf[j+3]);
+            state=res;
+            n++;
+        }
+    }
+    return n;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int *ibuf;
+    off_t max;
+    int p;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=alloc_buf(max*sizeof(int));
+    if (!ibuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    if (do_read(p, 0, max, ibuf)) {
+        printf("\nread failed\n");
+        return 1;
+    }
+
+    test_buf(max, ibuf);
+        
+    close(p);
+
+    return 0;
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_5.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_5.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_5.c	(revision 22)
@@ -0,0 +1,196 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static int* alloc_buf(int num)
+{
+    unsigned long int p;
+    int pagesize, pagemask;
+
+    pagesize=getpagesize();
+    pagemask=pagesize-1;
+    p=(unsigned long int)calloc(num+pagesize, 1);
+    if (!p) return (int*)p;
+    p=(p+pagesize-1)&(~pagemask);
+    return (int*)p;
+}
+
+static int generate_size(int max)
+{
+    int maxbits, bits;
+    int mask, size;
+
+    maxbits=0;
+    while (1<<maxbits<max) maxbits++;
+    bits=random()%maxbits+1;
+    mask=0xffffffff>>(32-bits);
+    size=random()%mask+1;
+    return size;
+}
+
+static int generate_start(int max, int size)
+{
+    int space, offs;
+    space=max-size;
+    offs=random()%(space+1);
+    return offs;
+}
+
+static void check_it(int p, int size, int* ob, int* ib, int mem, int err_addr)
+{
+    u_int32_t data;
+    int l;
+
+    lseek(p, sizeof(int)*(mem+err_addr), SEEK_SET);
+    read(p, &data, sizeof(int));
+    printf("/524288=%d %%524288=%d diff to end=%d\n",
+        ((err_addr+1)*4)/524288,
+        ((err_addr+1)*4)%524288,
+        size-err_addr);
+/*
+    printf("** ob: %08X mem: %08X ib: %08X\n", ob[err_addr], data, ib[err_addr]);
+    printf("** ob+offs=%08X ib+offs=%08X\n",
+        (unsigned int)(ob+err_addr), (unsigned int)(ib+err_addr));
+*/
+    for (l=0; l<5; l++) {
+        lseek(p, sizeof(int)*mem, SEEK_SET);
+        write(p, ob, size*sizeof(int));
+        lseek(p, sizeof(int)*mem, SEEK_SET);
+        read(p, ib, size*sizeof(int));
+        if (bcmp(ib, ob, size*sizeof(int))) {
+            int i, n;
+            printf("## size=%08X ob=%08lX ib=%08lX mem=%08lX\n", size,
+                (unsigned long)ob, (unsigned long)ib, (unsigned long)mem);
+            for (i=0, n=0; (i<size) && (n<20); i++) {
+                if (ib[i]!=ob[i]) {
+                    printf("## [%08X] %08X %08X\n", i, ob[i], ib[i]);
+                    n++;
+                }
+            }
+        }
+    }
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, i, n, size;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=alloc_buf(max*sizeof(int));
+    printf("ibuf=%08X\n", (unsigned int)ibuf);
+    obuf=alloc_buf(max*sizeof(int));
+    printf("obuf=%08X\n", (unsigned int)obuf);
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+size=max;
+    while (1) {
+        int res;
+        int ob_start, ib_start, mem_start;
+        int *ib, *ob;
+        off_t pos;
+
+        /*size=generate_size(max);*/
+        ob_start=generate_start(max, size);
+        ib_start=generate_start(max, size);
+        mem_start=generate_start(max, size);
+        /*printf("%8d %8d %8d %8d\n", size, ob_start, ib_start, mem_start);*/
+        /*printf("."); fflush(stdout);*/
+        ob=obuf+ob_start;
+        for (i=0; i<size; i++) *ob++=random();
+
+        pos=lseek(p, sizeof(int)*mem_start, SEEK_SET);
+        if (pos==(off_t)-1) {
+            perror("lseek");
+            return -1;
+        }
+
+        ob=obuf+ob_start;
+        res=write(p, ob, size*sizeof(int));
+        if (res!=size*sizeof(int)) {
+            u_int32_t error;
+            ioctl(p, SIS1100_LAST_ERROR, &error);
+            if (res<0) {
+                fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+            } else {
+                fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+            }
+            return -1;
+        }
+
+        pos=lseek(p, sizeof(int)*mem_start, SEEK_SET);
+        if (pos==(off_t)-1) {
+            perror("lseek");
+            return -1;
+        }
+
+        ib=ibuf+ib_start;
+        res=read(p, ib, size*sizeof(int));
+        if (res!=size*sizeof(int)) {
+            u_int32_t error;
+            ioctl(p, SIS1100_LAST_ERROR, &error);
+            if (res<0) {
+                fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+            } else {
+                fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+            }
+            return -1;
+        }
+
+        if (bcmp(ib, ob, size*sizeof(int))) {
+            int err_addr;
+
+            printf("\nsize=%08X ob=%08lX ib=%08lX mem=%08lX\n", size,
+                (unsigned long)ob, (unsigned long)ib, (unsigned long)mem_start);
+            err_addr=-1;
+            for (i=0, n=0; (i<size) && (n<20); i++) {
+                if (ib[i]!=ob[i]) {
+                    printf("[%08X] %08X %08X\n", i, ob[i], ib[i]);
+                    if (err_addr==-1) err_addr=i;
+                    n++;
+                }
+            }
+            check_it(p, size, ob, ib, mem_start, err_addr);
+            size=size/10;
+            printf("new size=%d\n", size);
+        }
+    }
+
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_6.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_6.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_6.c	(revision 22)
@@ -0,0 +1,183 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static int* alloc_buf(int num)
+{
+    unsigned long int p;
+    int pagesize, pagemask;
+
+    pagesize=getpagesize();
+    pagemask=pagesize-1;
+    p=(unsigned long int)calloc(num+pagesize, 1);
+    if (!p) return (int*)p;
+    p=(p+pagesize-1)&(~pagemask);
+    return (int*)p;
+}
+
+static int generate_start(int max, int size)
+{
+    int space, offs;
+    space=max-size;
+    offs=random()%(space+1);
+    return offs;
+}
+
+static void check_it(int p, int size, int* ob, int* ib, int mem, int err_addr)
+{
+    u_int32_t data;
+    int l;
+
+    lseek(p, sizeof(int)*(mem+err_addr), SEEK_SET);
+    read(p, &data, sizeof(int));
+    printf("/324292=%d %%324292=%d\n",
+        ((err_addr+1)*4)/324292,
+        ((err_addr+1)*4)%324292);
+    printf("** ob: %08X mem: %08X ib: %08X\n", ob[err_addr], data, ib[err_addr]);
+    printf("** ob+offs=%08X ib+offs=%08X\n",
+        (unsigned int)(ob+err_addr), (unsigned int)(ib+err_addr));
+    for (l=0; l<5; l++) {
+        lseek(p, sizeof(int)*mem, SEEK_SET);
+        write(p, ob, size*sizeof(int));
+        lseek(p, sizeof(int)*mem, SEEK_SET);
+        read(p, ib, size*sizeof(int));
+        if (bcmp(ib, ob, size*sizeof(int))) {
+            int i, n;
+            printf("## size=%08X ob=%08lX ib=%08lX mem=%08lX\n", size,
+                (unsigned long)ob, (unsigned long)ib, (unsigned long)mem);
+            for (i=0, n=0; (i<size) && (n<20); i++) {
+                if (ib[i]!=ob[i]) {
+                    printf("## [%08X] %08X %08X\n", i, ob[i], ib[i]);
+                    n++;
+                }
+            }
+        }
+    }
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf, *obuf;
+    off_t max;
+    int p, i, n;
+    int size, decr;
+
+    if (argc!=4) {
+        fprintf(stderr, "usage: %s path startsize decr\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+    size=atoi(argv[2]);
+    decr=atoi(argv[3]);
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=alloc_buf(max*sizeof(int));
+    printf("ibuf=%08X\n", (unsigned int)ibuf);
+    obuf=alloc_buf(max*sizeof(int));
+    printf("obuf=%08X\n", (unsigned int)obuf);
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    printf("SIZE=%d\n", size);
+    while (1) {
+        int res;
+        int ob_start, ib_start, mem_start;
+        int *ib, *ob;
+        off_t pos;
+
+        ob_start=generate_start(max, size);
+        ib_start=generate_start(max, size);
+        mem_start=generate_start(max, size);
+        /*printf("%8d %8d %8d %8d\n", size, ob_start, ib_start, mem_start);*/
+        printf("."); fflush(stdout);
+        ob=obuf+ob_start;
+        for (i=0; i<size; i++) *ob++=random();
+
+        pos=lseek(p, sizeof(int)*mem_start, SEEK_SET);
+        if (pos==(off_t)-1) {
+            perror("lseek");
+            return -1;
+        }
+
+        ob=obuf+ob_start;
+        res=write(p, ob, size*sizeof(int));
+        if (res!=size*sizeof(int)) {
+            u_int32_t error;
+            ioctl(p, SIS1100_LAST_ERROR, &error);
+            if (res<0) {
+                fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+            } else {
+                fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+            }
+            return -1;
+        }
+
+        pos=lseek(p, sizeof(int)*mem_start, SEEK_SET);
+        if (pos==(off_t)-1) {
+            perror("lseek");
+            return -1;
+        }
+
+        ib=ibuf+ib_start;
+        res=read(p, ib, size*sizeof(int));
+        if (res!=size*sizeof(int)) {
+            u_int32_t error;
+            ioctl(p, SIS1100_LAST_ERROR, &error);
+            if (res<0) {
+                fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+            } else {
+                fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+            }
+            return -1;
+        }
+
+        if (bcmp(ib, ob, size*sizeof(int))) {
+            int err_addr;
+
+            printf("\nsize=%08X ob=%08lX ib=%08lX mem=%08lX\n", size,
+                (unsigned long)ob, (unsigned long)ib, (unsigned long)mem_start);
+            err_addr=-1;
+            for (i=0, n=0; (i<size) && (n<20); i++) {
+                if (ib[i]!=ob[i]) {
+                    printf("[%08X] %08X %08X\n", i, ob[i], ib[i]);
+                    if (err_addr==-1) err_addr=i;
+                    n++;
+                }
+            }
+            check_it(p, size, ob, ib, mem_start, err_addr);
+            size-=decr;
+            printf("NEW SIZE=%d\n", size);
+        }
+    }
+
+    close(p);
+
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_7.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_7.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_7.c	(revision 22)
@@ -0,0 +1,154 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+char* pathname;
+
+
+/****************************************************************************/
+static int getopts(int argc, char* argv[])
+{
+        extern char *optarg;
+        extern int optind;
+        extern int opterr;
+        extern int optopt;
+
+        const char* optstring="f:";
+
+        int c, errflag = 0;
+
+        pathname=0;
+        while (!errflag && ((c = getopt(argc, argv, optstring)) != -1)) {
+                switch (c) {
+                case 'f': pathname=optarg;
+                        break;
+                case '?':
+                case 'h':
+                        errflag=1;
+                }
+        }
+        if (errflag || !pathname) {
+                fprintf(stderr, "usage: %s -f pathname\n", argv[0]);
+                return -1;
+        } else {
+                return 0;
+        }
+}
+/****************************************************************************/
+static off_t select_size(off_t max)
+{
+        off_t size;
+        size=random()&0x1fffff;
+        return size;
+}
+/****************************************************************************/
+static off_t select_start(off_t max, off_t size)
+{
+        off_t diff=max-size;
+        off_t mask, start;
+        mask=1;
+        while (mask<diff) {mask<<=1; mask++;}
+        do {
+                start=random()&mask;
+        } while (start>diff);
+        return start;
+}
+/****************************************************************************/
+static void fill_random(u_int32_t* buf, off_t size)
+{
+        /*off_t i;*/
+        for (; size; buf++, size--) *buf=random();
+        /*for (i=0; size; buf++, size--, i++) *buf=i;*/
+}
+/****************************************************************************/
+static int check(u_int32_t* obuf, u_int32_t* ibuf, off_t size)
+{
+        off_t i;
+        int count;
+
+        if (!bcmp(obuf, ibuf, size*sizeof(int))) {
+                return 0;
+        }
+        for (i=0, count=0; (i<size) && (count<10); i++) {
+                if (obuf[i]!=ibuf[i]) {
+                        fprintf(stderr, "check: [0x%08Lx] 0x%08x --> 0x%08x\n",
+                                i, obuf[i], ibuf[i]);
+                        count++;
+                }
+        }
+        return -1;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        u_int32_t *ibuf, *obuf;
+        int p, res;
+        off_t max;
+
+        srandom(17);
+        if (getopts(argc, argv)<0) return 1;
+        if ((p=open(pathname, O_RDWR, 0))<0) {
+                fprintf(stderr, "open %s: %s\n", pathname, strerror(errno));
+                return 1;
+        }
+        max=lseek(p, 0, SEEK_END);
+        if (max==(off_t)-1) {
+                perror("lseek(0, SEEK_END)");
+                return 1;
+        }
+        printf("size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+        max/=sizeof(int);
+        ibuf=malloc(max*sizeof(int));
+        printf("ibuf=0x%08X\n", (unsigned int)ibuf);
+        obuf=malloc(max*sizeof(int));
+        printf("obuf=0x%08X\n", (unsigned int)obuf);
+        if (!ibuf || !obuf) {
+                perror("calloc");
+                return 1;
+        }
+        while (1) {
+                off_t start_w, start_r, start_m, size;
+
+                size=select_size(max);
+                start_w=select_start(max, size);
+                start_r=select_start(max, size);
+                start_m=select_start(max, size);
+                fill_random(obuf+start_w, size);
+                if (lseek(p, sizeof(int)*start_m, SEEK_SET)==(off_t)-1) {
+                        fprintf(stderr, "lseek(0x%08Lx): %s\n",
+                                sizeof(int)*start_m, strerror(errno));
+                        return 1;
+                }
+                res=write(p, obuf+start_w, size*sizeof(int));
+                if (res!=size*sizeof(int)) {
+                        fprintf(stderr, "write: %s\n", strerror(errno));
+                        return 1;
+                }
+                if (lseek(p, -size*sizeof(int), SEEK_CUR)==(off_t)-1) {
+                        fprintf(stderr, "lseek(0x%08Lx (rel)): %s\n",
+                                -size*sizeof(int), strerror(errno));
+                        return 1;
+                }
+                res=read(p, ibuf+start_r, size*sizeof(int));
+                if (res!=size*sizeof(int)) {
+                        fprintf(stderr, "read: %s\n", strerror(errno));
+                        return 1;
+                }
+                if (check(obuf+start_w, ibuf+start_r, size))
+                        return 1;
+                printf("."); fflush(stdout);
+        }
+        return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a1.c	(revision 22)
@@ -0,0 +1,121 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static void
+set_break(int p, int size)
+{
+    struct vmespace space;
+    int res;
+    space.am=0xb;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=size;
+    res=ioctl(p, SETVMESPACE, &space);
+    if (res<0)
+        fprintf(stderr, "ioctl(SETVMESPACE): %s\n", strerror(errno));
+}
+
+int main(int argc, char* argv[])
+{
+    int p, i, *ibuf, *obuf;
+    off_t max;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+    for (i=0; i<1000; i++) obuf[i]=i;
+
+    if (do_write(p, 0, 32, obuf)) {
+        printf("write failed\n");
+        return 1;
+    }
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a2.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a2.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a2.c	(revision 22)
@@ -0,0 +1,469 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define IVAL 1
+#define PORT 8899
+
+#undef USE_VME
+
+#define VMESTART 0x84000000
+
+int sis1100, sock, interval;
+FILE* log;
+off_t devstart;
+size_t maxsize;
+
+static void
+printusage(int argc, char* argv[])
+{
+    fprintf(stderr, "usage: %s [-l logfile] [-h plothost] [-p plotport]"
+        " [-i interval][-s maxsize] sis1100_path\n",
+        argv[0]);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c;
+    char* sis1100_path=0;
+    char* logfilename=0;
+    char* hostname=0;
+    int port=PORT;
+    const char* args="l:h:p:i:s:";
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'l': logfilename=optarg; break;
+        case 'h': hostname=optarg; break;
+        case 'p': port=atoi(optarg); break;
+        case 'i': interval=atoi(optarg); break;
+        case 's': maxsize=atoi(optarg); break;
+        default: errflag=1;
+        }
+    }
+
+    if (errflag || optind!=argc-1) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    sis1100_path=argv[optind];
+    if ((sis1100=open(sis1100_path, O_RDWR, 0))<0) {
+        fprintf(stderr, "open \"%s\": %s\n", sis1100_path, strerror(errno));
+        return -1;
+    }
+
+    if (logfilename) {
+        if (strcmp(logfilename, "-")==0)
+            log=stderr;
+        else {
+            if ((log=fopen(logfilename, "w"))==0) {
+                fprintf(stderr, "fopen \"%s\": %s\n",
+                        logfilename, strerror(errno));
+                return -1;
+            }
+        }
+    }
+
+    if (hostname) {
+        struct sockaddr_in addr;
+	struct hostent *he;
+        in_addr_t iaddr;
+
+        addr.sin_family=AF_INET;
+        addr.sin_port=htons(port);
+        iaddr=inet_addr(hostname);
+        he=0;
+        if (iaddr==(in_addr_t)-1) {
+	    he=gethostbyname(hostname);
+	    if (!he) {
+                herror("gethostbyname");
+                return -1;
+            }
+            /*iaddr=*(he->h_addr_list[0]);*/
+            iaddr=*(in_addr_t*)(he->h_addr_list[0]);
+        }
+        addr.sin_addr.s_addr=iaddr;
+        sock=socket(addr.sin_family, SOCK_STREAM, 0);
+        if (sock<0) {perror("socket"); return -1;}
+        if (connect(sock, (struct sockaddr*)&addr, sizeof(struct sockaddr_in))<0) {
+            perror("connect"); return -1;
+        }
+        fprintf(stderr, "connected\n");
+    }
+
+    return 0;
+}
+
+static int
+xsend(int s, int n, int* v)
+{
+    int res, rest=n*4;
+    char* p=(char*)v;
+    while (rest) {
+        res=send(s, p, rest, 0);
+        if (res<0) {
+            if (errno!=EINTR) {
+                perror("send");
+                return -1;
+            } else
+                res=0;
+        } else if (res==0) {
+            fprintf(stderr, "broken pipe\n");
+            return -1;
+        }
+        rest-=res;
+        p+=res;
+    }
+    return 0;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static void
+set_break(int p, int size)
+{
+    struct vmespace space;
+    int res;
+    space.am=0xb;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=size;
+    res=ioctl(p, SETVMESPACE, &space);
+    if (res<0)
+        fprintf(stderr, "ioctl(SETVMESPACE): %s\n", strerror(errno));
+}
+#if 1
+static float
+calc_speed(struct timeval start, struct timeval stop, int num, int loops,
+        char* text)
+{
+    int ints;
+    float secs, s, speed;
+    char* unit;
+
+    ints=num*loops;
+    secs=(stop.tv_sec-start.tv_sec)+(stop.tv_usec-start.tv_usec)/1000000.;
+    s=ints/secs*4; unit="";
+    speed=s;
+    if (speed>1024.) {speed/=1024.; unit="K";}
+    if (speed>1024.) {speed/=1024.; unit="M";}
+    fprintf(stderr, " %s %.2f %sByte/s", text, speed, unit);
+    return s;
+}
+#else
+static float
+calc_speed(struct timeval start, struct timeval stop, int num, int loops,
+        char* text)
+{
+    float usecs, s;
+
+    usecs=(stop.tv_sec-start.tv_sec)*1000000.+(stop.tv_usec-start.tv_usec);
+    s=usecs/loops;
+    fprintf(stderr, " %s %f s", text, s);
+    return s;
+}
+#endif
+
+static int
+do_check(int p, int num, int* ibuf, int* obuf, int max, int sock)
+{
+    int val0, stopsec, loops, i, n;
+    struct timeval start, stop;
+    const N=8;
+    float v[N];
+
+    n=0;
+    val0=random();
+    for (i=0; i<num; i++) obuf[i]=i+val0;
+#if 0
+    if (do_write(p, 0, num, obuf)) {
+        fprintf(stderr, "\nwrite failed\n");
+        return -1;
+    }
+    if (do_read(p, 0, num, ibuf)) {
+        fprintf(stderr, "\nread failed\n");
+        return -1;
+    }
+#endif
+#if 0
+    if (bcmp(obuf, ibuf, num*sizeof(int)!=0)) {
+        fprintf(stderr, "\nmismatch at num=%d\n", num);
+        return -1;
+    }
+#endif
+
+    set_break(p, 0);
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_write(p, 0, num, obuf)) {
+            fprintf(stderr, "\nwrite failed\n");
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    v[n]=calc_speed(start, stop, num, loops, "w");
+    n++;
+
+    if (n>=N) {
+        fprintf(stderr, "do_check: N too small (n=%d)\n", n);
+        return -1;
+    }
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_read(p, 0, num, ibuf)) {
+            fprintf(stderr, "\nread failed\n");
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    v[n]=calc_speed(start, stop, num, loops, "r");
+    n++;
+
+    if (n>=N) {
+        fprintf(stderr, "do_check: N too small (n=%d)\n", n);
+        return -1;
+    }
+
+    set_break(p, 1);
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_write(p, 0, num, obuf)) {
+            fprintf(stderr, "\nwrite with DMA failed\n");
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    v[n]=calc_speed(start, stop, num, loops, "w");
+    n++;
+
+    if (n>=N) {
+        fprintf(stderr, "do_check: N too small (n=%d)\n", n);
+        return -1;
+    }
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_read(p, 0, num, ibuf)) {
+            fprintf(stderr, "\nread with DMA failed; loop=%d\n", loops);
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    v[n]=calc_speed(start, stop, num, loops, "r");
+    n++;
+
+    if (log) {
+        fprintf(log, "%6d", num);
+        for (i=0; i<n; i++)
+            fprintf(log, " %f\n", v[i]);
+        fprintf(log, "\n");
+        fflush(log);
+    }
+    if (sock>=0) {
+        if (xsend(sock, 1, &n)<0) return -1;
+        if (xsend(sock, 1, &num)<0) return -1;
+        for (i=0; i<n; i++) {
+            if (xsend(sock, 1, (int*)&v[i])<0) return -1;
+        }
+    }
+    return 0;
+}
+
+static int
+wenden(int val, int bits)
+{
+    int _val=0;
+    while (bits) {
+        _val<<=1;
+        if (val&1) _val|=1;
+        val>>=1;
+        bits--;
+    }
+    return _val;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf=0, *obuf=0;
+    u_int32_t max=0, _max;
+    int maxbits, bitwidth, bitshift, cc, ccw, size;
+    int devtype;
+
+    sis1100=-1;
+    sock=-1;
+    interval=IVAL;
+    log=0;
+    maxsize=0;
+
+    if (getoptions(argc, argv)<0) goto fehler;
+
+    if (ioctl(sis1100, SIS1100_DEVTYPE, &devtype)<0) {
+        fprintf(stderr, "ioctl(SIS1100_DEVTYPE): %s\n", strerror(errno));
+        goto fehler;
+    }
+    switch (devtype) {
+    case 0: fprintf(stderr, "using VME Device\n"); break;
+    case 1: fprintf(stderr, "using RAM Device\n"); break;
+    case 2: fprintf(stderr, "cannot use SHARC Device\n"); goto fehler;
+    default:
+        fprintf(stderr, "cannot use unknown device %d\n", devtype);
+        goto fehler;
+    }
+
+    switch (devtype) {
+    case 0:
+        max=0x04000000;
+        devstart=VMESTART;
+        break;
+    case 1:
+/*
+        max=lseek(sis1100, 0, SEEK_END);
+        if (max==(off_t)-1) {
+            perror("lseek(0, SEEK_END)");
+            goto fehler;
+        }
+*/
+        {
+        if (ioctl(sis1100, SIS1100_MAPSIZE, &max)) {
+            perror("ioctl(MAPSIZE)");
+            return 1;
+        }
+        devstart=0;
+        }
+        break;
+    }
+    fprintf(stderr, "usable size is %08x (%d MByte)\n", max, max/(1<<20));
+    if (maxsize) {
+        fprintf(stderr, "used size is %08x (%d MByte)\n", maxsize, maxsize/(1<<20));
+        max=maxsize;
+    }
+
+    max/=sizeof(int);
+    maxbits=-1;
+    for (_max=max; _max; _max>>=1) maxbits++;
+    fprintf(stderr, "max=0x%08x, maxbits=%d\n", max, maxbits);
+
+    ibuf=obuf=0;
+    ibuf=calloc(max, sizeof(int));
+    if (!ibuf) {
+        printf("calloc %d bytes for ibuf: %s\n", max*sizeof(int), strerror(errno));
+        goto fehler;
+    }
+    obuf=calloc(max, sizeof(int));
+    if (!obuf) {
+        printf("calloc %d bytes for obuf: %s\n", max*sizeof(int), strerror(errno));
+        goto fehler;
+    }
+
+    if (do_write(sis1100, 0, max, obuf)) {
+        fprintf(stderr, "initial write failed\n");
+        goto fehler;
+    }
+
+    for (bitwidth=1; bitwidth<=maxbits; bitwidth++) {
+        for (bitshift=0; bitshift<=(maxbits-bitwidth); bitshift++) {
+            for (cc=1; cc<(1<<bitwidth); cc++) {
+                if (!(cc&1) || !(cc&(1<<(bitwidth-1)))) continue;
+                ccw=wenden(cc, bitwidth);
+                size=ccw<<bitshift;
+                /*if (size&1) continue;*/
+                fprintf(stderr, "%6d", size);
+                if (do_check(sis1100, size, ibuf, obuf, max, sock)) {
+                    fprintf(stderr, "\nfailed\n");
+                    goto fehler;
+                }
+                fprintf(stderr, "\n");
+            }
+        }
+    }
+
+fehler:
+    if (obuf) free(obuf);
+    if (ibuf) free(ibuf);
+    if (sis1100) close(sis1100);
+    if (log) fclose(log);
+    if (sock) close(sock);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a3.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a3.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a3.c	(revision 22)
@@ -0,0 +1,115 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            fprintf(stderr, "read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            fprintf(stderr, "read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int p, *ibuf, *obuf;
+    off_t max, num;
+
+    if (argc!=2) {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+    }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    max=lseek(p, 0, SEEK_END);
+    if (max==(off_t)-1) {
+        perror("lseek(0, SEEK_END)");
+        return 1;
+    }
+    fprintf(stderr, "size of sdram is %08Lx (%Ld MByte)\n", max, max/(1<<20));
+
+    max/=sizeof(int);
+
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf) {
+        perror("calloc");
+        return 1;
+    }
+
+    num=524288;
+    while (1) {
+
+        if (do_write(p, 0, num, obuf)) {
+            printf("\nwrite failed\n");
+            break;
+        }
+/*
+ *         if (do_read(p, 0, num, ibuf)) {
+ *         printf("\nread failed\n");
+ *             break;
+ *         }
+ */
+    }
+
+    free(obuf);
+    free(ibuf);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a4.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a4.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/sdram_rw_a4.c	(revision 22)
@@ -0,0 +1,316 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define VMESTART 0x84000000
+
+int sis1100;
+off_t devstart;
+size_t maxsize;
+int* hbuf;
+
+static void
+printusage(int argc, char* argv[])
+{
+    printf("usage: %s"
+        " [-s maxsize] sis1100_path\n",
+        argv[0]);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c;
+    char* sis1100_path=0;
+    const char* args="s:";
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 's': maxsize=atoi(optarg); break;
+        default: errflag=1;
+        }
+    }
+
+    if (errflag || optind!=argc-1) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    sis1100_path=argv[optind];
+    if ((sis1100=open(sis1100_path, O_RDWR, 0))<0) {
+        printf("open \"%s\": %s\n", sis1100_path, strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            printf("write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            printf("write: res=%d; error=0x%x\n", res, error);
+        }
+        return -1;
+    }
+    return 0;
+}
+
+static
+int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            printf("read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            printf("read: res=%d; error=0x%x\n", res, error);
+        }
+        return -1;
+    }
+    return 0;
+}
+
+static
+int read_word(int p, int addr)
+{
+    off_t pos;
+    int res, val;
+
+    pos=lseek(p, sizeof(int)*addr+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("read_word::lseek");
+        return 1;
+    }
+    res=read(p, &val, sizeof(int));
+    if (res!=sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            printf("read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            printf("read: res=%d; error=0x%x\n", res, error);
+        }
+        return -1;
+    }
+    return val;
+}
+
+static void
+set_break(int p, int size)
+{
+    struct vmespace space;
+    int res;
+    space.am=0xb;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=size;
+    res=ioctl(p, SETVMESPACE, &space);
+    if (res<0)
+        printf("ioctl(SETVMESPACE): %s\n", strerror(errno));
+}
+
+static int
+do_check(int p, int num, int mstart, int* obuf, int* ibuf)
+{
+/*
+    printf("%7x %p %7x %p\n", num, obuf, mstart, ibuf);
+*/
+    if (do_write(p, mstart, num, obuf)) {
+        printf("\nwrite failed\n");
+        return -1;
+    }
+    if (do_read(p, mstart, num, ibuf)) {
+        printf("\nread failed\n");
+        return -1;
+    }
+
+    if (bcmp(obuf, ibuf, num*sizeof(int)!=0)) {
+        int i, fehler=0, dstart, dend;
+
+        printf("\nmismatch at num=%d\n", num);
+
+        for (i=0; i<num; i++) {
+            if (obuf[i]!=ibuf[i]) {fehler=i; break;}
+        }
+        dstart=fehler-5; if (dstart<0) dstart=0;
+        dend=fehler+5; if (dend>num) dend=num;
+        for (i=dstart; i<dend; i++)
+            printf("[%d] %08x --> %08x --> %08x\n", i,
+                    obuf[i], read_word(p, mstart+i), ibuf[i]);
+        return -1;
+    }
+    return 0;
+}
+
+static
+int generate_max(int max)
+{
+    int r, bits, _max, mask;
+    int m;
+    
+    m=(random()&7)*3;
+    for (_max=max, bits=0; _max && (bits<m); _max>>=1) bits++;
+    for (mask=0; bits; bits--) {
+        mask<<=1;
+        mask|=1;
+    }
+    do {
+        r=random()&mask;
+    } while (r>max);
+    return r;
+}
+
+static
+int generate_int(int max)
+{
+    int r, bits, _max, mask;
+
+    for (_max=max, bits=0; _max; _max>>=1) bits++;
+    for (mask=0; bits; bits--) {
+        mask<<=1;
+        mask|=1;
+    }
+    do {
+        r=random()&mask;
+    } while (r>max);
+    return r;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf=0, *obuf=0;
+    u_int32_t max=0, _max;
+    int maxbits, size, *istart, *ostart, mstart, rword;
+    int devtype;
+
+    sis1100=-1;
+    maxsize=0;
+
+    if (getoptions(argc, argv)<0) goto fehler;
+
+    if (ioctl(sis1100, SIS1100_DEVTYPE, &devtype)<0) {
+        printf("ioctl(SIS1100_DEVTYPE): %s\n", strerror(errno));
+        goto fehler;
+    }
+    switch (devtype) {
+    case 0: printf("using VME Device\n"); break;
+    case 1: printf("using RAM Device\n"); break;
+    case 2: printf("cannot use SHARC Device\n"); goto fehler;
+    default:
+        printf("cannot use unknown device %d\n", devtype);
+        goto fehler;
+    }
+
+    switch (devtype) {
+    case 0:
+        max=0x04000000;
+        devstart=VMESTART;
+        set_break(sis1100, -1);
+        break;
+    case 1:
+/*
+        max=lseek(sis1100, 0, SEEK_END);
+        if (max==(off_t)-1) {
+            perror("lseek(0, SEEK_END)");
+            goto fehler;
+        }
+*/
+        {
+        if (ioctl(sis1100, SIS1100_MAPSIZE, &max)) {
+            perror("ioctl(MAPSIZE)");
+            return 1;
+        }
+        devstart=0;
+        }
+        break;
+    }
+    printf("usable size is 0x%08x (%d MByte)\n", max, max/(1<<20));
+    if (maxsize) {
+        printf("used size is %08x (%d MByte)\n", maxsize, maxsize/(1<<20));
+        max=maxsize;
+    }
+    max/=sizeof(int);
+    maxbits=-1;
+    for (_max=max; _max; _max>>=1) maxbits++;
+    printf("max=0x%08x, maxbits=%d\n", max, maxbits);
+
+    ibuf=calloc(max, sizeof(int));
+    obuf=calloc(max, sizeof(int));
+    hbuf=calloc(max, sizeof(int));
+    if (!ibuf || !obuf || !hbuf) {
+        perror("calloc");
+        goto fehler;
+    }
+
+    if (do_write(sis1100, 0, max, obuf)) {
+        printf("initial write failed\n");
+        goto fehler;
+    }
+
+    srandom(17);
+
+    while (1) {
+        int i;
+        size=generate_max(max);
+        ostart=obuf+generate_int(max-size);
+        mstart=generate_int(max-size);
+        istart=ibuf+generate_int(max-size);
+        rword=random();
+        for (i=0; i<size; i++) ostart[i]=rword+i;
+        if (do_check(sis1100, size, mstart, ostart, istart)<0) break;
+    }
+
+fehler:
+    if (obuf) free(obuf);
+    if (ibuf) free(ibuf);
+    if (hbuf) free(hbuf);
+    if (sis1100) close(sis1100);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/shortblock.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/shortblock.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/shortblock.c	(revision 22)
@@ -0,0 +1,275 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define IVAL 1
+
+#define VMESTART 0x84000000
+
+int sis1100, interval;
+off_t devstart;
+size_t maxsize;
+
+static void
+printusage(int argc, char* argv[])
+{
+    printf("usage: %s [-i interval][-s maxsize] sis1100_path\n",
+        argv[0]);
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c;
+    char* sis1100_path=0;
+    const char* args="i:s:";
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'i': interval=atoi(optarg); break;
+        case 's': maxsize=atoi(optarg); break;
+        default: errflag=1;
+        }
+    }
+
+    if (errflag || optind!=argc-1) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    sis1100_path=argv[optind];
+    if ((sis1100=open(sis1100_path, O_RDWR, 0))<0) {
+        printf("open \"%s\": %s\n", sis1100_path, strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int do_write(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_write::lseek");
+        return 1;
+    }
+    res=write(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            printf("write: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            printf("write: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static int do_read(int p, int start, int size, int* data)
+{
+    off_t pos;
+    int res;
+
+    pos=lseek(p, sizeof(int)*start+devstart, SEEK_SET);
+    if (pos==(off_t)-1) {
+        perror("do_read::lseek");
+        return 1;
+    }
+    res=read(p, data, size*sizeof(int));
+    if (res!=size*sizeof(int)) {
+        u_int32_t error;
+        ioctl(p, SIS1100_LAST_ERROR, &error);
+        if (res<0) {
+            printf("read: %s; error=0x%x\n", strerror(errno), error);
+        } else {
+            printf("read: res=%d; error=0x%x\n", res, error);
+        }
+        return 1;
+    }
+    return 0;
+}
+
+static void
+set_break(int p, int size)
+{
+    struct vmespace space;
+    int res;
+    space.am=0xb;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=size;
+    res=ioctl(p, SETVMESPACE, &space);
+    if (res<0)
+        printf("ioctl(SETVMESPACE): %s\n", strerror(errno));
+}
+
+static int
+do_check(int p, int num, int* ibuf, int* obuf)
+{
+    int val0, stopsec, i, loops;
+    struct timeval start, stop;
+
+    printf("%d", num); fflush(stdout);
+
+    val0=random();
+    for (i=0; i<num; i++) obuf[i]=i+val0;
+
+    if (do_write(p, 0, num, obuf)) {
+        printf("\ni_write failed\n");
+        return -1;
+    }
+    if (do_read(p, 0, num, ibuf)) {
+        printf("\ni_read failed\n");
+        printf("p=%d, num=%d, ibuf=%p\n", p, num, ibuf);
+        return -1;
+    }
+
+    if (bcmp(obuf, ibuf, num*sizeof(int)!=0)) {
+        printf("\nmismatch at num=%d\n", num);
+        return -1;
+    }
+
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_write(p, 0, num, obuf)) {
+            printf("\nwrite failed\n");
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    printf(" %d", loops); fflush(stdout);
+
+    loops=0;
+    gettimeofday(&start, 0);
+    stopsec=start.tv_sec+interval;
+    do {
+        if (do_read(p, 0, num, ibuf)) {
+            printf("\nread failed\n");
+            return -1;
+        }
+        gettimeofday(&stop, 0);
+        loops++;
+    } while (stop.tv_sec<stopsec);
+    printf(" %d\n", loops); fflush(stdout);
+
+    return 0;
+}
+
+int main(int argc, char* argv[])
+{
+    int *ibuf=0, *obuf=0;
+    u_int32_t max=0;
+    int size;
+    int devtype;
+
+    sis1100=-1;
+    interval=IVAL;
+    maxsize=0;
+
+    if (getoptions(argc, argv)<0) goto fehler;
+
+    if (ioctl(sis1100, SIS1100_DEVTYPE, &devtype)<0) {
+        printf("ioctl(SIS1100_DEVTYPE): %s\n", strerror(errno));
+        goto fehler;
+    }
+    switch (devtype) {
+    case 0: printf("using VME Device\n"); break;
+    case 1: printf("using RAM Device\n"); break;
+    case 2: printf("cannot use SHARC Device\n"); goto fehler;
+    default:
+        printf("cannot use unknown device %d\n", devtype);
+        goto fehler;
+    }
+
+    switch (devtype) {
+    case 0:
+        max=0x04000000;
+        devstart=VMESTART;
+        break;
+    case 1:
+/*
+        max=lseek(sis1100, 0, SEEK_END);
+        if (max==(off_t)-1) {
+            perror("lseek(0, SEEK_END)");
+            goto fehler;
+        }
+*/
+        {
+        if (ioctl(sis1100, SIS1100_MAPSIZE, &max)) {
+            perror("ioctl(MAPSIZE)");
+            return 1;
+        }
+        devstart=0;
+        }
+        break;
+    }
+    max/=sizeof(int);
+    printf("usable size is 0x%08x (%d MWords)\n", max, max/(1<<20));
+    if (maxsize) max=maxsize;
+    printf("using %d Words\n", max);
+
+    ibuf=obuf=0;
+    ibuf=calloc(max, sizeof(int));
+    if (!ibuf) {
+        printf("calloc %d bytes for ibuf: %s\n", max*sizeof(int), strerror(errno));
+        goto fehler;
+    }
+    obuf=calloc(max, sizeof(int));
+    if (!obuf) {
+        printf("calloc %d bytes for obuf: %s\n", max*sizeof(int), strerror(errno));
+        goto fehler;
+    }
+    printf("ibuf=%p, obuf=%p\n", ibuf, obuf);
+
+    if (do_write(sis1100, 0, max, obuf)) {
+        printf("initial write failed\n");
+        goto fehler;
+    }
+
+    set_break(sis1100, 1);
+    for (;;) {
+        for (size=1; size<=max; size++) {
+            if (do_check(sis1100, size, ibuf, obuf)) {
+                printf("\nfailed\n");
+                goto fehler;
+            }
+        }
+    }
+
+fehler:
+    if (obuf) free(obuf);
+    if (ibuf) free(ibuf);
+    if (sis1100) close(sis1100);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/synctest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/synctest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/synctest.c	(revision 22)
@@ -0,0 +1,53 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include <dev/pci/sis1100_var.h>
+
+static u_int32_t read_local_register(int p, u_int32_t offs)
+{
+    struct sis1100_ctrl_reg reg;
+
+    reg.offset=offs;
+    if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+	fprintf(stderr, "ioctl(SIS1100_CONTROL_READ, offs=0x%x): %s\n",
+    	    offs, strerror(errno));
+	return -1;
+    }
+    return reg.val;
+}
+
+int main(int argc, char* argv[])
+{
+    int p, count;
+    u_int32_t status, old_status;
+
+    if (argc<2)
+      {
+      fprintf(stderr, "usage: %s path\n", argv[0]);
+      return 1;
+      }
+
+    if ((p=open(argv[1], O_RDWR, 0))<0)
+      {
+      fprintf(stderr, "open(\"%s\"): %s\n", argv[1], strerror(errno));
+      return 1;
+      }
+
+    old_status=read_local_register(p, 4);
+    printf("status=0x%08x\n", old_status);
+    count=0;
+    while (count++<1000000) {
+    	status=read_local_register(p, 4);
+	if (status!=old_status) {
+	    printf("       0x%08x\n", status);
+	    old_status=status;
+	}
+    }
+
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/test_3100.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/test_3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/test_3100.c	(revision 22)
@@ -0,0 +1,677 @@
+#define _GNU_SOURCE
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#ifndef SIS3100_Version
+#define SIS3100_Version 100
+#endif
+
+
+#define VMESTART 0x84000000
+
+#if SIS3100_Version < 200
+enum sis1100_subdev {sis1100_subdev_vme, sis1100_subdev_ram,
+    sis1100_subdev_dsp};
+#endif
+
+struct path {
+    char* name;
+    enum sis1100_subdev type;
+    int p;
+    u_int32_t mapsize;
+    u_int32_t* map;
+    struct sis1100_ident ident;
+} *pathes;
+int numpathes;
+
+static void
+printusage(int argc, char* argv[])
+{
+    printf("usage: %s [-h] pathnames...\n",
+        argv[0]);
+}
+
+static void
+printhelp(int argc, char* argv[])
+{
+printf("printhelp not yet implemented\n");
+}
+
+static int
+getoptions(int argc, char* argv[])
+{
+    extern char *optarg;
+    extern int optind;
+    extern int opterr;
+    extern int optopt;
+    int errflag, c, i;
+    const char* args="h";
+
+    optarg=0; errflag=0;
+    
+    while (!errflag && ((c=getopt(argc, argv, args))!=-1)) {
+        switch (c) {
+        case 'h': printhelp(argc, argv); break;
+        default: errflag++;
+        }
+    }
+
+    if (errflag || optind==argc) {
+        printusage(argc, argv);
+        return -1;
+    }
+
+    numpathes=argc-optind;
+    pathes=malloc(numpathes*sizeof(struct path));
+    for (i=0; i<numpathes; i++) {
+        pathes[i].name=argv[optind+i];
+    }
+
+    return 0;
+}
+
+static int
+init_path(struct path* path)
+{
+    path->type=-1;
+    path->p=-1;
+    path->mapsize=0;
+    path->map=0;
+
+    path->p=open(path->name, O_RDWR, 0);
+    if (path->p<0) {
+        printf("open \"%s\": %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    if (ioctl(path->p, SIS1100_DEVTYPE, &path->type)<0) {
+        printf("ioctl(%s, SIS1100_DEVTYPE): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+    switch (path->type) {
+    case sis1100_subdev_vme:
+        printf("%s is VME\n", path->name);
+        break;
+    case sis1100_subdev_ram:
+        printf("%s is RAM\n", path->name);
+        break;
+#if SIS3100_Version >= 200
+    case sis1100_subdev_ctrl:
+        printf("%s is CTRL\n", path->name);
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        printf("%s is DSP\n", path->name);
+        break;
+    default:
+        printf("init_path: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+    return 0;
+}
+
+static int
+done_path(struct path* path)
+{
+    if (path->map) {
+        if (munmap(path->map, path->mapsize)<0)
+            printf("munmap(%s): %s\n",
+                path->name, strerror(errno));
+    }
+    if (path->p) close(path->p);
+    return 0;
+}
+
+static int
+check_open(struct path* path)
+{
+    int p;
+
+    /* try to open the device a second time */
+    p=open(path->name, O_RDWR, 0);
+#if SIS3100_Version < 200
+    if (p<0) {
+        printf("open \"%s\" a second time: %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+    close(p);
+#else
+    if (p>=0) {
+        printf("open \"%s\" a second time: success (but it should fail)\n",
+                path->name);
+        close(p);
+        return -1;
+    }
+    if (errno!=EBUSY) {
+        printf("open \"%s\" a second time returns \"%s\" "
+                "(but EBUSY is expected)\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#endif
+    return 0;
+}
+
+static int
+check_RESET(struct path* path)
+{
+    if (path->type!=sis1100_subdev_vme) return 0;
+    if (ioctl(path->p, SIS3100_RESET, &path->mapsize)<0) {
+        printf("ioctl(%s, SIS3100_RESET): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+    return 0;
+}
+
+static int
+check_MAPSIZE(struct path* path)
+{
+#if SIS3100_Version < 200
+    switch (path->type) {
+    case sis1100_subdev_vme: {
+        struct sis1100_mapinfo info;
+        info.space=2;
+        if (ioctl(path->p, SIS1100_MAPINFO, &info)<0) {
+            printf("ioctl(%s, SIS1100_MAPINFO, space=2): %s\n",
+                    path->name, strerror(errno));
+            printf("sizeof off_t is %d\n", sizeof(off_t));
+            return -1;
+        }
+        path->mapsize=info.size;
+        if (info.offset!=0) {
+            printf("ioctl(%s, SIS1100_MAPINFO, space=2): "
+                    "offset=0x%08llx (should be 0)\n",
+                    path->name, info.offset);
+            return -1;
+        }
+    }
+    break;
+    case sis1100_subdev_ram: {
+        off_t max;
+        max=lseek(path->p, 0, SEEK_END);
+        if (max==(off_t)-1) {
+            printf("lseek(%s, 0, SEEK_END): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+        path->mapsize=max;
+    }
+    break;
+    /* no default */
+    }
+#else
+    if (ioctl(path->p, SIS1100_MAPSIZE, &path->mapsize)<0) {
+        printf("ioctl(%s, SIS1100_MAPSIZE): %s\n",
+                path->name, strerror(errno));
+        return -1;
+    }
+#endif
+
+    printf("%s: mapsize=0x%x", path->name, path->mapsize);
+    if (path->mapsize>=(1<<20))
+        printf(" (%d MByte)", path->mapsize>>20);
+    else if (path->mapsize>=(1<<10))
+        printf(" (%d KByte)", path->mapsize>>10);
+    printf("\n");
+    switch (path->type) {
+    case sis1100_subdev_vme:
+        if (!path->mapsize)
+            printf("%s: no map available; but no real error\n", path->name);
+        else if (path->mapsize!=0x10000000) {
+            printf("%s: wrong mapsize 0x%x (should be 0x10000000)\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+    case sis1100_subdev_ram: break;
+#if SIS3100_Version >= 200
+    case sis1100_subdev_ctrl:
+        if (path->mapsize!=0x1000) {
+            printf("%s: unexpected mapsize 0x%x (should be 0x1000)\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        if (path->mapsize) {
+            printf("%s: unexpected mapsize 0x%x (dsp can not be mapped (yet))\n",
+                path->name, path->mapsize);
+            return -1;
+        }
+        break;
+    default:
+        printf("check_MAPSIZE: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+
+    return 0;
+}
+
+static int
+check_mmap(struct path* path)
+{
+#if SIS3100_Version < 200
+    if (path->type!=sis1100_subdev_vme) return 0;
+#endif
+
+    if (!path->mapsize) return 0;
+    path->map=mmap(0, path->mapsize, PROT_READ|PROT_WRITE,
+            MAP_FILE|MAP_SHARED/*|MAP_VARIABLE*/, path->p, 0);
+
+    if (path->map==MAP_FAILED) {
+        printf("mmap(%s, 0x%x): %s\n", path->name, path->mapsize,
+            strerror(errno));
+        path->map=0;
+    } else
+        printf("%s: 0x%x Bytes mapped at %p\n", path->name, path->mapsize,
+            path->map);
+ 
+    switch (path->type) {
+    case sis1100_subdev_vme:
+        if (!path->map)
+            printf("  Not a real error.\n");
+        else
+            printf("  OK.\n");
+        break;
+    case sis1100_subdev_ram:
+        if (!path->map)
+            printf("  As expected.\n");
+        else {
+            printf("  But that is not possible (yet).\n");
+            return -1;
+        }
+        break;
+#if SIS3100_Version >= 200
+    case sis1100_subdev_ctrl:
+        if (!path->map) {
+            printf("  But it should work.\n");
+            return -1;
+        } else
+            printf("  OK.\n");
+        break;
+#endif
+    case sis1100_subdev_dsp:
+        if (!path->map)
+            printf("  OK.\n");
+        else {
+            printf("  But that is not possible (yet).\n");
+            return -1;
+        }
+        break;
+    default:
+        printf("check_mmap: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+    return 0;
+}
+
+static void
+print_ident(struct sis1100_ident_dev* ident)
+{
+    printf("  hw_type   =%2d ", ident->hw_type);
+    switch (ident->hw_type) {
+        case 1: printf(" (PCI/PLX)"); break;
+        case 2: printf(" (VME)"); break;
+        case 3: printf(" (CAMAC/FERA)"); break;
+        case 4: printf(" (LVD/SCSI)"); break;
+    }
+    printf("\n");
+    printf("  hw_version=%2d\n", ident->hw_version);
+    printf("  fw_type   =%2d\n", ident->fw_type);
+    printf("  fw_version=%2d\n", ident->fw_version);
+}
+
+static int
+check_IDENT(struct path* path)
+{
+struct sis1100_ident {
+    struct sis1100_ident_dev local;
+    struct sis1100_ident_dev remote;
+    int remote_ok;
+    int remote_online;
+};
+
+    if (ioctl(path->p, SIS1100_IDENT, &path->ident)<0) {
+        printf("ioctl(%s, SIS1100_IDENT): %s\n", path->name, strerror(errno));
+        return -1;
+    }    
+    if (path->type==sis1100_subdev_vme) {
+        printf("Local Interface:\n");
+        print_ident(&path->ident.local);
+        if (path->ident.remote_ok) {
+            printf("Remote Interface:\n");
+            print_ident(&path->ident.remote);
+            printf("  remote interface o%sline\n",
+                    path->ident.remote_online?"n":"ff");
+        } else
+            printf("no remote interface\n");
+    }
+    return 0;
+}
+
+static int
+check_rw_single(struct path* path, u_int32_t start, u_int32_t size)
+{
+    u_int32_t *in, *out;
+    int i, res, first, count;
+
+    in=calloc(size, 4);
+    out=calloc(size, 4);
+    if (!in || !out) {
+        printf("cannot allocate %d words for in- and output\n", size);
+        free(in); free(out);
+        return -1;
+    }
+    
+    for (i=0; i<size; i++) {
+        out[i]=random();
+        in[i]=~out[i];
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("check_rw_single: lseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<size; i++) {
+        res=write(path->p, out+i, 4);
+        if (res!=4) {
+            printf("write(%s, ..., 4): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("check_rw_single: lseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<size; i++) {
+        res=read(path->p, in+i, 4);
+        if (res!=4) {
+            printf("read(%s, ..., 4): %s\n", path->name, strerror(errno));
+            return -1;
+        }
+    }
+    first=1; count=0;
+    for (i=0; i<size; i++) {
+        if (in[i]!=out[i]) {
+            if (first) {
+                printf("%s: rw error:", path->name);
+                first=0;
+            }
+            printf("[%3d]: %08x --> %08x\n", i, out[i], in[i]);
+            count++;
+        }
+    }
+    return count?-1:0;
+}
+
+static int
+check_rw_block(struct path* path, u_int32_t start, u_int32_t max)
+{
+    static u_int32_t *buf=0;
+    static int bufsize=0;
+
+    u_int32_t size;
+    int i, res, first, count;
+
+    printf("check_rw_block: max=0x%08x\n", max);
+    if (bufsize<max) {
+        free(buf);
+        bufsize=(((max-1)>>20)+1)<<20;
+        printf("\nmax=0x%x bufsize=0x%x\n", max, bufsize);
+        if (bufsize<max) {
+            printf("\nprogrammfehler.\n");
+            return -1;
+        }
+        buf=malloc(bufsize*4);
+        if (!buf) {
+            bufsize=0;
+            printf("\ncannot allocate %d words for in- and output\n", bufsize);
+            return -1;
+        }
+    }
+
+    for (i=0; i<max; i++) {
+        buf[i]=i;
+    }
+    if (lseek(path->p, start, SEEK_SET)!=start) {
+        printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                path->name, start, strerror(errno));
+        return -1;
+    }
+    res=write(path->p, buf, 4*max);
+    if (res!=4*max) {
+        printf("\nwrite(%s, ..., 4*%d): %s\n", path->name, max, strerror(errno));
+        return -1;
+    }
+    for (i=0; i<max; i++) {
+        buf[i]=~i;
+    }
+    for (size=1; size<=max; size++) {
+        if (lseek(path->p, start, SEEK_SET)!=start) {
+            printf("\nlseek(%s, 0x%08x, SEEK_SET): %s\n",
+                    path->name, start, strerror(errno));
+            return -1;
+        }
+        res=read(path->p, buf, 4*size);
+        if (res!=4*size) {
+            u_int32_t err;
+            printf("\nread(%s, ..., 4*%d): ", path->name, size);
+            if (res&3) printf("res=%d\n", res);
+            if (res>=0) {
+                printf("res=%d (%4d)\n", res/4, size-res/4);
+            } else {
+                printf("%s\n", strerror(errno));
+            }
+            if (ioctl(path->p, SIS1100_LAST_ERROR, &err)<0) {
+                printf("\nioctl(%s, LAST_ERROR): %s\n",
+                    path->name, strerror(errno));
+            } else {
+                if (err==0x211)
+                    return 0;
+                else
+                    printf("prot_err: 0x%x\n", err);
+            }
+            return -1;
+        }
+        first=1; count=0;
+        for (i=0; i<size; i++) {
+            if (buf[i]!=i) {
+                if (first) {
+                    printf("\n%s: block rw error:", path->name);
+                    first=0;
+                }
+                printf("[%3d]: %08x --> %08x\n", i, i, buf[i]);
+                count++;
+            }
+        }
+        if (count) return -1;
+    }
+    return 0;
+}
+
+static int
+vme_probe(struct path* path, u_int32_t addr)
+{
+    struct vmespace space;
+    int res;
+
+    space.am=0x9;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    res=ioctl(path->p, SIS3100_VME_PROBE, &addr);
+    if (res) {
+        printf("VME_PROBE(%s, 0x%08x): %s\n", path->name, addr, strerror(errno));
+    }
+    return res;
+}
+
+static int
+check_rw_vme(struct path* path)
+{
+    struct vmespace space;
+    int res, size;
+
+    printf("testing sdram over VME\n");
+    if (vme_probe(path, VMESTART)) return 0;
+
+    space.am=0x9;
+    space.datasize=4;
+    space.swap=1;
+    space.mapit=0;
+    space.mindmalen=-1;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    if (check_rw_single(path, VMESTART, 10000)<0) return -1;
+
+    space.am=0xb;
+    res=ioctl(path->p, SIS1100_SETVMESPACE, &space);
+    if (res) {
+        printf("SETVMESPACE(%s): %s\n", path->name, strerror(errno));
+        return -1;
+    }
+    size=1;
+    while (check_rw_block(path, VMESTART, size)>=0) {
+        printf(".");
+        fflush(stdout);
+        size<<=4;
+    }
+    printf("OK.\n");
+    return 0;
+}
+
+static int
+check_rw_ram(struct path* path)
+{
+    printf("testing sdram\n");
+    if (check_rw_single(path, 0, 1000)<0) return -1;
+    if (check_rw_block(path, 0, 1024)<0) return -1;
+    printf("OK.\n");
+    return 0;
+}
+
+static int
+check_rw_ctrl(struct path* path)
+{
+    return 0;
+}
+
+static int
+check_rw_dsp(struct path* path)
+{
+    return 0;
+}
+
+static int
+check_rw(struct path* path)
+{
+    switch (path->type) {
+    case sis1100_subdev_vme: return check_rw_vme(path); break;
+    case sis1100_subdev_ram: return check_rw_ram(path); break;
+#if SIS3100_Version >= 200
+    case sis1100_subdev_ctrl: return check_rw_ctrl(path); break;
+#endif
+    case sis1100_subdev_dsp: return check_rw_dsp(path); break;
+    default:
+        printf("check_rw: %s has unknown type %d\n",
+                path->name, path->type);
+        return -1;
+    }
+}
+
+typedef int(*testfunc)(struct path*);
+testfunc funcs[]={
+    init_path,
+    check_open,
+    /*check_RESET,*/
+    check_MAPSIZE,
+    check_mmap, /* requires check_MAPSIZE */
+    check_IDENT, /* can use check_mmap */
+    check_rw,
+
+#if 0
+    check_SETVMESPACE,
+    check_VME_PROBE,
+    check_VME_READ,
+    check_VME_WRITE,
+    check_VME_BLOCK_READ,
+    check_VME_BLOCK_WRITE,
+    check_CONTROL_READ,
+    check_CONTROL_WRITE,
+    check_CONTROL_READ,
+    check_CONTROL_WRITE,
+    check_PIPE,
+    check_LAST_ERROR,
+    check_FIFOMODE,
+
+    check_BIGENDIAN,
+
+    check_IRQ_CTL,
+    check_IRQ_GET,
+    check_IRQ_ACK,
+    check_IRQ_WAIT,
+
+    check_MINDMALEN,
+
+    check_FRONT_IO,
+    check_FRONT_PULSE,
+    check_FRONT_LATCH,
+
+    check_VME_SUPER_BLOCK_READ,
+    check_WRITE_PIPE,
+
+    check_DMA_ALLOC,
+    check_DMA_FREE,
+
+    check_DUMP,
+#endif
+};
+int numfuncs=sizeof(funcs)/sizeof(testfunc);
+
+int main(int argc, char* argv[])
+{
+    int res=0, i, j;
+
+    printf("==== SIS1100/3100 Test; V1.0 ====\n\n");
+
+    if (getoptions(argc, argv)<0) return 1;
+
+    srandom(17);
+
+    for (i=0; i<numfuncs; i++) {
+        for (j=0; j<numpathes; j++) {
+            if (funcs[i](pathes+j)<0) {res=i+3; goto raus;}
+        }
+    }
+
+raus:
+    for (j=0; j<numpathes; j++) done_path(pathes+j);
+    return res;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/test_mapsize.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/test_mapsize.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/test_mapsize.c	(revision 22)
@@ -0,0 +1,142 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+
+static int write_reg(int p, int offset, u_int32_t value)
+{
+        struct sis1100_ctrl_reg reg;
+        reg.offset=offset;
+        reg.val=value;
+        if (ioctl(p, SIS1100_CONTROL_WRITE, &reg)<0) {
+                printf("SIS1100_CONTROL_WRITE 0x%08x -> 0x%03x: %s\n",
+                        reg.val, reg.offset, strerror(errno));
+                return -1;
+        }
+        if (reg.error) {
+                printf("SIS1100_CONTROL_WRITE 0x%08x -> 0x%03x: error=%d\n",
+                        reg.val, reg.offset, reg.error);
+                return -1;
+        }
+        return 0;
+}
+
+/****************************************************************************/
+static u_int32_t* mmap_vme_space(int p, size_t* mapped_len)
+{
+    u_int32_t *space, size;
+
+    if (ioctl(p, SIS1100_MAPSIZE, &size)) {
+        printf("ioctl(SIS1100_MAPSIZE): %s\n", strerror(errno));
+        return 0;
+    }
+
+    /* map the vme space */
+    space=mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, p, 0);
+    if (space==MAP_FAILED)
+        {
+        printf("mmap vme space: %s\n", strerror(errno));
+        return 0;
+        }
+    *mapped_len=size;
+    return space;
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p;
+        volatile u_int32_t* vmespace;
+        volatile u_int32_t data;
+        size_t vmespacelen;
+
+        if (argc!=2) {
+                printf("usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) {
+                printf("open \"%s\": %s\n", argv[1], strerror(errno));
+                return 1;
+        }
+
+        vmespace=mmap_vme_space(p, &vmespacelen);
+        if (!vmespace) {
+                printf("map vme failed\n");
+                return 1;
+        }
+        printf("vmespacelen=%d MByte\n", vmespacelen>>20);
+
+        if (write_reg(p, 0x400, 0xff01081c)<0) return 1;
+        if (write_reg(p, 0x404, 0x09)<0) return 1;
+        if (write_reg(p, 0x40c, 0x0)<0) return 1;
+
+        if (write_reg(p, 0x408, 0xffffffff)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xfffffff0)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xffffff00)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xfffff000)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xffff0000)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xfff00000)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xff000000)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0xf0000000)<0) return 1;
+        data=vmespace[0];
+        if (write_reg(p, 0x408, 0x00000000)<0) return 1;
+        data=vmespace[0];
+
+        if (write_reg(p, 0x408, 0x00000000)<0) return 1;
+        data=vmespace[0x1];
+        data=vmespace[0x2];
+        data=vmespace[0x4];
+        data=vmespace[0x8];
+        data=vmespace[0x10];
+        data=vmespace[0x20];
+        data=vmespace[0x40];
+        data=vmespace[0x80];
+        data=vmespace[0x100];
+        data=vmespace[0x200];
+        data=vmespace[0x400];
+        data=vmespace[0x800];
+        data=vmespace[0x1000];
+        data=vmespace[0x2000];
+        data=vmespace[0x4000];
+        data=vmespace[0x8000];
+        data=vmespace[0x10000];
+        data=vmespace[0x20000];
+        data=vmespace[0x40000];
+        data=vmespace[0x80000];
+        data=vmespace[0x100000];
+        data=vmespace[0x200000];
+        data=vmespace[0x400000];
+        data=vmespace[0x800000];
+
+
+/*
+ *         if (write_reg(p, 0x400, 0x0f01101c)<0) return 1;
+ *         if (write_reg(p, 0x404, 0x09)<0) return 1;
+ *         if (write_reg(p, 0x404, 0x0)<0) return 1;
+ *         if (write_reg(p, 0x404, 0x0)<0) return 1;
+ * 
+ *         data=vmespace[0xffffffff];
+ */
+        
+        if (munmap((void*)vmespace, vmespacelen)<0) {
+                fprintf(stderr, "munmap: %s\n", strerror(errno));
+        }
+        close(p);
+
+        return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.02/test/tests.txt
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.02/test/tests.txt	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.02/test/tests.txt	(revision 22)
@@ -0,0 +1,42 @@
+gigalink_pci
+============
+read ident, status
+    SIS1100_IDENT
+    SIS1100_CONTROL_READ
+    mapped (SIS1100_MAPINFO)
+
+controlregister, mailbox, extended mailbox, descriptors
+    SIS1100_CONTROL_READ 
+    SIS1100_CONTROL_WRITE
+    mapped (SIS1100_MAPINFO)
+    SIS1100_BIGENDIAN
+
+
+gigalink_loop
+=============
+?
+
+
+gigalink_vme
+============
+
+SIS1100_SETVMESPACE     
+SIS3100_VME_PROBE       
+SIS3100_VME_READ        
+SIS3100_VME_WRITE       
+SIS3100_VME_BLOCK_READ  
+SIS3100_VME_BLOCK_WRITE 
+SIS1100_CONTROL_READ    glinktest_local_read
+SIS1100_CONTROL_WRITE   
+SIS3100_CONTROL_READ    
+SIS3100_CONTROL_WRITE   
+SIS1100_PIPE            
+SIS1100_MAPINFO         glinktest_local_read
+SIS1100_LAST_ERROR      
+SIS1100_IDENT           glinktest_local_read
+SIS1100_FIFOMODE        
+SIS1100_BIGENDIAN       
+SIS3100_IRQ_CTL         
+SIS3100_IRQ_GET         
+SIS3100_IRQ_ACK         
+SIS1100_KIO_LEN         
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/#Makefile#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/#Makefile#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/#Makefile#	(revision 22)
@@ -0,0 +1,73 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+maptest: maptest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+maptest.o: maptest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sis1100_map_example.o: sis1100_map_example.c ../../dev/pci/sis1100_map.h
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile	(revision 22)
@@ -0,0 +1,73 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+maptest: maptest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+maptest.o: maptest.c /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
+  /usr/include/bits/waitstatus.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+  /usr/include/string.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/sys/mman.h \
+  /usr/include/bits/mman.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/linux/compiler.h \
+  /usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
+  /usr/include/bits/sigthread.h ../../dev/pci/sis1100_var.h \
+  /usr/include/linux/ioctl.h
+sis1100_map_example.o: sis1100_map_example.c ../../dev/pci/sis1100_map.h
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile.bak
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile.bak	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/Makefile.bak	(revision 22)
@@ -0,0 +1,39 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+maptest: maptest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+sis1100_map_example.o: sis1100_map_example.c ../../dev/pci/sis1100_map.h
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/sis1100_map_example.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/sis1100_map_example.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/mapping/sis1100_map_example.c	(revision 22)
@@ -0,0 +1,156 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "../../dev/pci/sis1100_map.h"
+#include "../../dev/pci/sis1100_var.h"
+
+int main(void) {
+
+int pv;              /* path for VME calls */
+int pc;              /* control (errorhandling) */
+int i;
+u_int32_t val, error;
+struct sis1100_ctrl_reg reg;
+char*      vme_base; /* hier landen die VME-Adressen */
+u_int32_t* ctl_base; /* das sind die Register der PCI-Karte */
+
+/* open */
+pv=open("/tmp/sis1100_00remote", O_RDWR, 0);
+pc=open("/tmp/sis1100_00ctrl", O_RDWR, 0);
+if ((pv<0) || (pc<0)) {
+    printf("error on opening\n");
+    return -1;
+}
+
+
+/* mmap ? MByte VME space (koennte auch weniger sein) */
+vme_base=mmap(0, 0x100000, PROT_READ|PROT_WRITE, MAP_SHARED, pv, 0);
+
+/* mmap 4 KByte control space (weniger als eine page geht nicht) */
+ctl_base=mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, pc, 0);
+if (vme_base==MAP_FAILED) {  
+    printf("mapping VME failed\n");
+    return -1;
+}
+
+if (ctl_base==MAP_FAILED) {
+    printf("mapping CTL failed\n");
+    return -1;
+}
+
+
+/* descriptoren fuellen */
+/*
+Beispiel:
+drei VME-Module
+I    Addr  0x38200000 A32
+II   Addr  0x38000000 A32
+III  Addr  0x0        A16
+
+
+(III und IV passen zusammen in einen 4-MByte-Block.)
+(wenn ein Modul mehr als 4 MByte braucht, muss man halt mehrere
+Deskriptoren nehmen)
+*/
+u_int32_t descr[12]={
+    0xff010800, /* header */
+    0x9,        /* A32 */
+    0x38000000,   /*                              */
+    0,
+    0xff010800, /* header */
+    0x9,        /* A32 */
+    0x38200000,   /*                              */
+    0,
+    0xff010800, /* header */
+    0x29,       /* A16 */
+    0x0,       /*                          */
+    0,
+};
+
+
+
+    reg.offset=0x400;
+    for (i=0; i<12; i++) {
+        reg.val=descr[i];
+        ioctl(pc, SIS1100_CTRL_WRITE, &reg);
+        reg.offset+=4;
+    }
+
+
+struct sis1100_reg* regs=(struct sis1100_reg*)ctl_base;
+
+/* ein paar Hilfspointer */
+char* start1=vme_base;
+char* start2=vme_base+2*0x400000;
+char* start3=vme_base+2*0x400000;
+
+u_int32_t* base_I   =start1;
+u_int16_t* base_II  =start2;
+u_int32_t* base_III =start3+0x4000000%0x400000;
+u_int16_t* base_IVa =start3+0x4200000%0x400000;
+u_int32_t* base_IVb =start3+0x4200000%0x400000;
+
+
+#ifdef noerr
+/* und ein paar Zugriffe (billig, ohne Fehlerbehandlung) */
+*base_I=17;        /* A24D16 write auf das erste Register von 'I' */
+val=base_I[7];     /* A24D16 read des 7. Registers von 'I' */
+*(base_II+2)=37;   /* A32D16 write auf das 3. Register von 'II' */
+*(base_III+2)=41;  /* A32D32 write auf das 3. Register von 'III' */
+*(base_IVb+2)=43;  /* A32D32 write auf das 3. Register von 'IV' */
+*(base_IVa+4)=43;  /* A32D16 write auf die untere Haelfte desselben Registers */
+#endif
+
+/* switch on and off SIS3820 user LED */
+
+ for (i=0;i<10;i++) {
+   *base_I=0x1;
+   sleep(1);
+   *base_I=0x10000;
+   sleep(1);
+   printf("Id. reg: %8.8x\n",*(base_I+1));
+   sleep(1);
+ }
+
+/* mapped access in loop */
+ for (i=0;i<0xFFFF;i+=2) {
+     *(base_I+i)=i;
+ }
+
+/* not tested below, mki 14.4.04 */
+
+/* und einer nochmal richtig mit Fehlerbehandlung */
+/* val=base_III[7]; */ 
+ 
+do {
+    error=regs->prot_error;
+} while (error==sis1100_e_dlock);
+
+if (error==sis1100_le_dlock) {
+    error=regs->tc_hdr;
+    if ((error&0x300)==0x300) {
+        error=(error>>24)&0xff;
+        error|=0x200;
+    } else {
+        val=regs->tc_dal;
+        error=0;
+    }
+}
+if (error) {
+    if (error==sis1100_le_to)
+        regs->p_balance=0;
+    printf("game over!");
+
+}
+
+ return 0;
+}
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/#Makefile#
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/#Makefile#	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/#Makefile#	(revision 22)
@@ -0,0 +1,53 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+
+.PHONY: all
+all: $(EXEC)
+
+
+sis3100_control_read: sis3100_control_read.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis3100_control_write: sis3100_control_write.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_sys_reset: vme_sys_reset.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile	(revision 22)
@@ -0,0 +1,53 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+
+.PHONY: all
+all: $(EXEC)
+
+
+sis3100_control_read: sis3100_control_read.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis3100_control_write: sis3100_control_write.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_sys_reset: vme_sys_reset.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/Makefile~	(revision 22)
@@ -0,0 +1,53 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../..
+CPPFLAGS     := -I$(DRIVER_PATH) -I$(DRIVER_PATH)/sis3100_calls
+
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+
+.PHONY: all
+all: $(EXEC)
+
+
+sis3100_control_read: sis3100_control_read.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+sis3100_control_write: sis3100_control_write.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_sys_reset: vme_sys_reset.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_read.c	(revision 22)
@@ -0,0 +1,77 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int32_t offset ; 
+u_int32_t data ;
+int return_code ;
+
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s path vme_base_address  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+ 
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c	(revision 22)
@@ -0,0 +1,85 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+u_int32_t offset ; 
+u_int32_t data ;
+
+int return_code ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  addr  data \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+data       = strtoul(argv[3],NULL,0) ;
+
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/sis3100_control_write.c~	(revision 22)
@@ -0,0 +1,84 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/****************************************************************************/
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+u_int32_t offset ; 
+u_int32_t data ;
+
+int return_code ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path  addr  data \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+offset     = strtoul(argv[2],NULL,0) ;
+data       = strtoul(argv[3],NULL,0) ;
+
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/vme_sys_reset.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/vme_sys_reset.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/examples/sis3100_control/vme_sys_reset.c	(revision 22)
@@ -0,0 +1,92 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+
+int offset ;
+u_int32_t data ;
+int return_code ;
+
+
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s path\n", argv[0]);
+  return 1;
+  }
+
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+
+  printf("set VME_RESET \n");
+  offset = 0x00000100;
+  data   = 0x00000002;
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+
+
+  usleep(500000);
+
+
+  offset = 0x00000100;
+  data   = 0x00020000;
+  return_code =  s3100_control_write(p, offset, data) ; 
+  printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code =  s3100_control_read(p, offset, &data) ; 
+  printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("s3100_control_read:   data        = 0x%08x\n", data );         
+
+  printf("clear VME_RESET \n");
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis5100.a:  sis5100_camac_calls.o
+	ar cr $@ $^
+
+sis5100_camac_calls.o: sis5100_camac_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/Makefile~	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+
+lib_sis5100.a:  sis5100_camac_calls.o
+	ar cr $@ $^
+
+sis5100_camac_calls.o: sis5100_camac_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
+
+
+
+
+sharc_utils.o: sharc_utils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c   $^
+
+clean:
+	rm -f *.o
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c	(revision 22)
@@ -0,0 +1,130 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.c                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          0.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        22.06.04                                                */
+/*                                                                           */
+/* Author:           MKI                                                     */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis5100_camac_calls.h"
+
+
+/*******************/
+/*                 */
+/*    CAMAC_NAF    */
+/*                 */
+/*******************/
+
+
+int camac_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.data=camac_data;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  return req.error;
+}
+}
+
+int camac_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  *camac_data=req.data;
+  /* printf("reqdata: %8.8x\n",req.data); */
+  return req.error;
+}
+}
+
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+
+
+int s5100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+int s5100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.c~	(revision 22)
@@ -0,0 +1,130 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.c                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          0.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        22.06.04                                                */
+/*                                                                           */
+/* Author:           MKI                                                     */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"  /* pfad im Makefile angeben */
+
+
+#include "sis5100_camac_calls.h"
+
+
+/*******************/
+/*                 */
+/*    CAMAC_NAF    */
+/*                 */
+/*******************/
+
+
+int camac_naf_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.data=camac_data;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  return req.error;
+}
+}
+
+int camac_naf_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data)
+{
+struct sis1100_camac_req req;
+int res;
+
+req.N=N;
+req.A=A;
+req.F=F;
+req.error=0;
+
+res=ioctl(p, SIS5100_CNAF, &req);
+
+if (res) {
+  return res;
+} 
+else {
+  *camac_data=req.data;
+  /* printf("reqdata: %8.8x\n",req.data); */
+  return req.error;
+}
+}
+
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+
+
+int s5100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+int s5100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h	(revision 22)
@@ -0,0 +1,60 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.h                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         09.07.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+/*****************/
+/*               */
+/*    CAMAC      */
+/*               */
+/*****************/
+int camac_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data) ;
+int camac_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+int s5100_control_read(int p, int offset, u_int32_t* data) ;
+int s5100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h~
===================================================================
--- /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/V2.04/sis5100_calls/sis5100_camac_calls.h~	(revision 22)
@@ -0,0 +1,60 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis5100_camac_calls.h                                   */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.0                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         21.06.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+/*****************/
+/*               */
+/*    CAMAC      */
+/*               */
+/*****************/
+int camac_naf_write(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t camac_data) ;
+int camac_naf_read(int p, u_int32_t N,u_int32_t A,u_int32_t F, u_int32_t* camac_data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s5100_control    */
+/*                     */
+/***********************/
+int s5100_control_read(int p, int offset, u_int32_t* data) ;
+int s5100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/applications/sis330x_project/sis330x_applications/multievent_wrap/multievent_wrap_internalTriggerStop_switchBank.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/applications/sis330x_project/sis330x_applications/multievent_wrap/multievent_wrap_internalTriggerStop_switchBank.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/applications/sis330x_project/sis330x_applications/multievent_wrap/multievent_wrap_internalTriggerStop_switchBank.c	(revision 22)
@@ -0,0 +1,570 @@
+/***************************************************************************/
+/*                                                                         */
+/*  Filename: multievent_wrap_internalTriggerStop_switchBank.c             */
+/*                                                                         */
+/*  Funktion:  bank1 and bank2 in bank switch mode                         */
+/*                                                                         */
+/* 1. Reset SIS330x                                                        */
+/* 2a. write Configuration register                                        */
+/* 2b. write StopDelay                                                     */
+/* 2c. write Trigger Setup register                                        */
+/* 2d. write Trigger Threshold register                                    */
+/* 2e. write Trigger Falg Clear Counter register                           */
+/* 2f. write Configuration register                                        */
+/* 2g. write Acquisition register                                          */
+/* 3. Start Sampling in AUTO_BANK_SWITCH Mode                              */
+/* 4. Readout Loop                                                         */
+/* 4.1.1  wait for bank1 full                                              */
+/* 4.1.2 Read data (Bank1 event counter,                                   */
+/*                  address counter, event directory, ADC data)            */
+/* 4.1.3 Clear Bank1 Full Flag                                             */
+/* 4.2.1  wait for bank2 full                                              */
+/* 4.2.2 Read data (Bank2 event counter,                                   */
+/*                  address counter, event directory, ADC data)            */
+/* 4.2.3 Clear Bank2 Full Flag                                             */
+/*                                                                         */
+/* ----------------------------------------------------------------------- */
+/*                                                                         */
+/*  Autor:                TH                                               */
+/*  date:                 24.05.2002                                       */
+/*  last modification:    24.05.2002                                       */
+/*                                                                         */
+/* ----------------------------------------------------------------------- */
+/*                                                                         */
+/*  SIS  Struck Innovative Systeme GmbH                                    */
+/*                                                                         */
+/*  Harksheider Str. 102A                                                  */
+/*  22399 Hamburg                                                          */
+/*                                                                         */
+/*  Tel. +49 (0)40 60 87 305 0                                             */
+/*  Fax  +49 (0)40 60 87 305 20                                            */
+/*                                                                         */
+/*  http://www.struck.de                                                   */
+/*                                                                         */
+/*  © 2002                                                                 */
+/*                                                                         */
+/***************************************************************************/
+
+#define gnuplot 
+
+#define printeventDir 
+/* #define write_2_disk */
+
+
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+#include "../../header/sis3300.h"
+
+#define MAX_NUMBER_LWORDS  0x100000
+
+#define MAX_ADC_MEM_SIZE_LWORDS    0x20000
+#define MAX_EVENTDIR_SIZE_LWORDS     0x400
+
+unsigned int gl_blt1_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned int gl_blt2_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned int gl_blt3_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned int gl_blt4_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+
+unsigned short gl_ADC1_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC2_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC3_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC4_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC5_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC6_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC7_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+unsigned short gl_ADC8_data[MAX_ADC_MEM_SIZE_LWORDS] ;
+
+unsigned int gl_eventdir_data[MAX_EVENTDIR_SIZE_LWORDS] ;
+
+
+FILE *used_file ;
+
+int multievent_test1(int p, u_int32_t vme_base_addr ) ;
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+
+int p;
+int mod_base;
+
+u_int32_t addr ;
+u_int32_t data ;
+
+int return_code ;
+
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     fprintf(stderr,"error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<2)  {
+   fprintf(stderr,"usage:  SIS330x_VME_BASE_ADDRESS     \n");
+  return -1;
+  }
+
+  mod_base           = strtoul(argv[1],NULL,0) ;
+
+  addr = mod_base + SIS3300_MODID ;                    /* ID */
+
+  return_code =  vme_A32D32_read(p, addr, &data ) ;
+  if (return_code != 0) { fprintf(stderr,"vme_A32D32_read:return_code = 0x%08x at addr = 0x%08x\n",return_code,addr); return -1 ;}
+
+  fprintf(stderr,"\n");
+  fprintf(stderr," Modul Identification register:  0x%08x\n", data );
+  fprintf(stderr,"\n");
+
+
+  return_code = multievent_test1(p, mod_base) ;
+
+
+close(p);
+return 0;
+}
+
+
+
+
+#define PAGE_LWORDS_4K   0x1000
+
+int multievent_test1(int p, unsigned int vme_base_addr)
+{
+unsigned int mod_base ;
+int no_of_lwords ;
+
+unsigned int addr ;
+unsigned int data ;
+unsigned int get_lwords ;
+unsigned int stop_address_pointer ;
+
+
+int i;
+int i_event_no ;
+
+int return_code ;
+int error_cnt ;
+int loop_cnt ;
+int max_no_events ;
+int page_size     ;
+int stop_delay ;
+int trig_flag_clr_val ;
+
+unsigned int wrap_start_addr ;
+unsigned int page_lwords ;
+unsigned int page_addr_mask ;
+unsigned int  page_offset_addr ;
+mod_base = vme_base_addr ;
+
+/* page variables setup for test */
+page_size          =  CONF_PAGE_SIZE_4K_WRAP  ;
+page_lwords        =  PAGE_LWORDS_4K          ;
+max_no_events      =  MAX_ADC_MEM_SIZE_LWORDS / PAGE_LWORDS_4K          ;
+page_addr_mask     =  page_lwords - 1         ;
+stop_delay         =  page_lwords >> 1        ; /* half size of pages */
+trig_flag_clr_val  =  page_lwords + 0x100     ;
+
+fprintf(stderr,"page_lwords       = 0x%08x \n",page_lwords);
+fprintf(stderr,"max_no_events     = 0x%08x \n",max_no_events);
+fprintf(stderr,"page_addr_mask    = 0x%08x \n",page_addr_mask);
+fprintf(stderr,"stop_delay        = 0x%08x \n",stop_delay);
+fprintf(stderr,"trig_flag_clr_val = 0x%08x \n",trig_flag_clr_val);
+/* fprintf(stderr," = 0x%08x \n",); */
+
+
+
+
+
+/* 1. Reset SIS330x  */
+addr = mod_base + SIS3300_KEY_RESET ;                    /* reset */
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write:return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+/* 2a. write Configuration register */
+/* 2b. write StopDelay */
+/* 2c. write Trigger Setup register */
+/* 2d. write Trigger Threshold register */
+/* 2e. write Trigger Falg Clear Counter register */
+/* 2f. write Configuration register */
+/* 2g. write Acquisition register */
+
+/* 2. Setup SIS330x                                                        */
+
+/* 2a. write Configuration register */
+data =    page_size   ;
+addr = mod_base + SIS3300_EVENT_CONFIG_ALL_ADC ;    /* Event configuration register all ADCs */
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write:return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+/* 2b. write StopDelay */
+data = stop_delay ;
+addr = mod_base + SIS3300_STOP_DELAY ;
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+/* 2c. write Trigger Setup register */
+data =     TRIG_SETUP_ENABLE_PULS
+        +  TRIG_SETUP_PULS_3_CLK
+        +  TRIG_SETUP_ENABLE_NM_MODE
+        +  TRIG_SETUP_N_OVER_3_CLK
+        +  TRIG_SETUP_M_UNDER_3_CLK ;
+
+addr = mod_base + SIS3300_TRIGGER_SETUP_ALL_ADC ;
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+
+
+/* 2d. write Trigger Threshold register */
+data = 0x82008200 ;   /*  Trigger puls if value goes lower than 0x200 */
+addr = mod_base + SIS3300_TRIGGER_THRESHOLD_ALL_ADC ;
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+
+
+/* 2e. write Trigger Falg Clear Counter register */
+data = trig_flag_clr_val ;
+addr = mod_base + SIS3300_TRIGGER_FLAG_CLR_CNT_ALL_ADC ;
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+/* 2f. write Configuration register */
+data =    CTRL_ENABLE_INTERNAL_TRIGGER_STOP
+       +  CTRL_ENABLE_TRIGGER_OUT_UPON_STARTED
+       +  CTRL_USE_TRIGGER_OUTPUT_ON_OUTPUT1 ;
+addr = mod_base + SIS3300_CONTROL_STATUS ;
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+
+/* 2g. write Acquisition register */
+data =    ACQ_SET_CLOCK_TO_100MHZ
+        + ACQ_ENABLE_STOP_DELAY
+        + ACQ_ENABLE_MULTI_EVENT_MODE
+        + ACQ_ENABLE_AUTOSTART
+        + ACQ_ENABLE_BANK_SWITCH_MODE        ;
+addr = mod_base + SIS3300_ACQUISTION_CONTROL ; 	/* Acq. register */
+return_code =  vme_A32D32_write(p, addr, data) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write:return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+
+
+
+
+
+/* 3. Start Sampling in AUTO_BANK_SWITCH Mode                              */
+addr = mod_base + SIS3300_KEY_START_AUTO_BANK_SWITCH ;
+return_code =  vme_A32D32_write(p, addr, 0x0) ;
+if (return_code != 0) {fprintf(stderr,"vme_A32D32_write:return_code = 0x%08x at addr = 0x%08x\n",return_code,addr);return -1;}
+
+
+   fprintf(stderr,"\n");
+   fprintf(stderr,"\n");
+
+   loop_cnt = 0;
+   error_cnt = 0 ;
+   return_code = 0 ;
+
+/* 4. Readout Loop  */
+do {
+   fprintf(stderr,"\n");
+   fprintf(stderr,"\n");
+
+
+
+/* 4.1.1  wait for bank1 full; will happen after max_no_events or if end of memory of Bank1 has been reached */
+   addr = mod_base + SIS3300_ACQUISTION_CONTROL ;
+   do {
+      return_code =  vme_A32D32_read(p, addr, &data) ;
+    } while (((data & ACQ_STATUS_SWITCH_MODE_BANK1_FULL) != ACQ_STATUS_SWITCH_MODE_BANK1_FULL) && (return_code == 0x0)) ;
+   if (return_code != 0) { fprintf(stderr,"vme_A32D32_read:return_code = 0x%08x  at addr = 0x%08x\n",return_code,addr );return -1;}
+
+
+/* 4.1.2 Read data (Bank1 event counter,  address counter, event directory, ADC data)   */
+      return_code =  vme_A32D32_read(p, mod_base + SIS3300_BANK1_EVENT_CNT_ADC12, &data) ;
+      fprintf(stderr," SIS3300_BANK1_EVENT_CNT_ADC12:  0x%08x\n", data );
+      return_code =  vme_A32D32_read(p, mod_base + SIS3300_BANK1_ADDR_CNT_ADC12, &data) ;
+      fprintf(stderr," SIS3300_BANK1_ADDR_CNT_ADC12:   0x%08x\n", data );
+      stop_address_pointer = data ;
+      fprintf(stderr,"\n");
+  /* read Event Directory Bank1 */
+      addr = mod_base + SIS3300_EVENT_DIRECTORY_BANK1_ALL_ADC ;                    /*  Event Directory Bank1 */
+      no_of_lwords = max_no_events ;
+      return_code =   vme_A32BLT32_read(p, addr, gl_eventdir_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords)  {
+          fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+
+#ifdef printeventDir
+
+   for (i=0;i<max_no_events;i++) {
+        fprintf(stderr," SIS3300_EVENT_DIRECTORY_BANK1_ALL_ADC:  i = 0x%08x   blt_data[i] = 0x%08x    End Address = 0x%08x\n", i,
+                                                                  gl_eventdir_data[i], (gl_eventdir_data[i] -1) );
+   }
+   fprintf(stderr,"\n");
+#endif
+
+
+/* this is not an optimized algo. to read and check !   it is only for testing */
+
+/* read all ADC datas */
+  /* read ADC1/ADC2 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK1_ADC12 ;                    /*  Bank1 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt1_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC3/ADC4 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK1_ADC34 ;                    /*  Bank1 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt2_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC5/ADC6 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK1_ADC56 ;                    /*  Bank1 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt3_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC7/ADC8 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK1_ADC78 ;                    /*  Bank1 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt4_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+
+/* copy "only" gl_data to ADC buffer for each event  , here is no check of the Wrap bit and Triggerbit  */
+   page_offset_addr = 0x0 ;
+   for (i_event_no=0; i_event_no < max_no_events; i_event_no++) {
+      wrap_start_addr = (gl_eventdir_data[i_event_no] & 0x1ffff) ;
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC1_data[page_offset_addr+i] = (short)((gl_blt1_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC2_data[page_offset_addr+i] = (short)((gl_blt1_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC3_data[page_offset_addr+i] = (short)((gl_blt2_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC4_data[page_offset_addr+i] = (short)((gl_blt2_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC5_data[page_offset_addr+i] = (short)((gl_blt3_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC6_data[page_offset_addr+i] = (short)((gl_blt3_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC7_data[page_offset_addr+i] = (short)((gl_blt4_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC8_data[page_offset_addr+i] = (short)((gl_blt4_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+
+      page_offset_addr =  page_offset_addr + page_lwords  ;    /* next page_offset_addr */
+    }
+
+
+#ifdef gnuplot
+    printf("set yrange [0:4095]\n");
+
+    printf("plot \"-\"  with line 1 \n");
+    for (i=0;i<no_of_lwords;i++)  printf(" %8d %6d \n",i, gl_ADC1_data[i]) ;
+    printf("e\n\n");
+
+    printf("plot \"-\" with line 2 \n");
+    for (i=0;i<no_of_lwords;i++)  printf(" %8d %6d \n",i, gl_ADC2_data[i]) ;
+    printf("e\n\n");
+
+#endif
+
+
+#ifdef write_2_disk
+/* write to disk */
+    used_file = fopen("adc_bank1.txt","w");
+    for (i=0;i<no_of_lwords;i++) {
+/*    for (i=0;i<0x1000;i++) {   */
+      fprintf(used_file," %8d %6d %6d %6d %6d %6d %6d %6d %6d  \n",i,
+                              gl_ADC1_data[i],gl_ADC2_data[i],gl_ADC3_data[i],gl_ADC4_data[i],
+                              gl_ADC5_data[i],gl_ADC6_data[i],gl_ADC7_data[i],gl_ADC8_data[i] ) ;
+     }
+    fclose(used_file) ;
+#endif
+
+/* check einbauen */
+/* 4.1.3 Clear Bank1 Full Flag --> free for sampling on this bank again   */
+   addr = mod_base + SIS3300_KEY_BANK1_FULL_FLAG ;
+   return_code =  vme_A32D32_write(p, addr, 0x0) ;
+   if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+
+
+     fprintf(stderr," \n");
+     fprintf(stderr," \n");
+
+
+/* 4.2.1  wait for bank2 full; will happen after max_no_events or if end of memory of Bank2 has been reached */
+   addr = mod_base + SIS3300_ACQUISTION_CONTROL ;
+   do {
+      return_code =  vme_A32D32_read(p, addr, &data) ;
+    } while (((data & ACQ_STATUS_SWITCH_MODE_BANK2_FULL) != ACQ_STATUS_SWITCH_MODE_BANK2_FULL) && (return_code == 0x0)) ;
+   if (return_code != 0) { fprintf(stderr,"vme_A32D32_read:return_code = 0x%08x  at addr = 0x%08x\n",return_code,addr );return -1;}
+
+
+/* 4.2.2 Read data (Bank2 event counter,  address counter, event directory, ADC data)   */
+      return_code =  vme_A32D32_read(p, mod_base + SIS3300_BANK2_EVENT_CNT_ADC12, &data) ;
+      fprintf(stderr," SIS3300_BANK2_EVENT_CNT_ADC12:  0x%08x\n", data );
+      return_code =  vme_A32D32_read(p, mod_base + SIS3300_BANK2_ADDR_CNT_ADC12, &data) ;
+      fprintf(stderr," SIS3300_BANK2_ADDR_CNT_ADC12:   0x%08x\n", data );
+      stop_address_pointer = data ;
+      fprintf(stderr,"\n");
+
+  /* read Event Directory Bank2 */
+      addr = mod_base + SIS3300_EVENT_DIRECTORY_BANK2_ALL_ADC ;                    /*  Event Directory Bank2 */
+      no_of_lwords = max_no_events ;
+      return_code =   vme_A32BLT32_read(p, addr, gl_eventdir_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords)  {
+          fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+
+#ifdef printeventDir
+   for (i=0;i<max_no_events;i++) {
+        fprintf(stderr," SIS3300_EVENT_DIRECTORY_BANK2_ALL_ADC:  i = 0x%08x   blt_data[i] = 0x%08x    End Address = 0x%08x\n", i,
+                                                                  gl_eventdir_data[i], (gl_eventdir_data[i] -1) );
+   }
+   fprintf(stderr,"\n");
+#endif
+
+/* this is not an optimized algo. to read and check !   it is only for testing */
+
+/* read all ADC datas */
+  /* read ADC1/ADC2 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK2_ADC12 ;                    /*  Bank2 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt1_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC3/ADC4 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK2_ADC34 ;                    /*  Bank2 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt2_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC5/ADC6 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK2_ADC56 ;                    /*  Bank2 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt3_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+  /* read ADC7/ADC8 datas */
+      addr = mod_base + SIS3300_MEMBASE_BANK2_ADC78 ;                    /*  Bank2 */
+      no_of_lwords = MAX_ADC_MEM_SIZE_LWORDS ;
+      return_code =   vme_A32MBLT64_read(p, addr, gl_blt4_data, no_of_lwords, &get_lwords) ;
+      if (get_lwords != no_of_lwords) { fprintf(stderr,"get_lwords = 0x%08x\n", get_lwords );
+          error_cnt = error_cnt + 1;
+        }
+
+/* copy "only" gl_data to ADC buffer for each event  , here is no check of the Wrap bit and Triggerbit  */
+   page_offset_addr = 0x0 ;
+   for (i_event_no=0; i_event_no < max_no_events; i_event_no++) {
+      wrap_start_addr = (gl_eventdir_data[i_event_no] & 0x1ffff) ;
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC1_data[page_offset_addr+i] = (short)((gl_blt1_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC2_data[page_offset_addr+i] = (short)((gl_blt1_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC3_data[page_offset_addr+i] = (short)((gl_blt2_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC4_data[page_offset_addr+i] = (short)((gl_blt2_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC5_data[page_offset_addr+i] = (short)((gl_blt3_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC6_data[page_offset_addr+i] = (short)((gl_blt3_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+      for (i=0; i < page_lwords; i++) {
+        gl_ADC7_data[page_offset_addr+i] = (short)((gl_blt4_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] >> 16) & 0x3fff);
+        gl_ADC8_data[page_offset_addr+i] = (short)((gl_blt4_data[page_offset_addr + ((i+wrap_start_addr)& page_addr_mask )] ) & 0x3fff);
+      }
+
+      page_offset_addr =  page_offset_addr + page_lwords  ;    /* next page_offset_addr */
+    }
+
+#ifdef gnuplot
+    printf("set yrange [0:4095]\n");
+
+    printf("plot \"-\"  with line 1 \n");
+    for (i=0;i<no_of_lwords;i++)  printf(" %8d %6d \n",i, gl_ADC1_data[i]) ;
+    printf("e\n\n");
+
+    printf("plot \"-\" with line 2 \n");
+    for (i=0;i<no_of_lwords;i++)  printf(" %8d %6d \n",i, gl_ADC2_data[i]) ;
+    printf("e\n\n");
+
+#endif
+
+#ifdef write_2_disk
+/* write to disk */
+    used_file = fopen("adc_bank2.txt","w");
+    for (i=0;i<no_of_lwords;i++) {
+      fprintf(used_file," %8d %6d %6d %6d %6d %6d %6d %6d %6d \n",i,
+                              gl_ADC1_data[i],gl_ADC2_data[i],gl_ADC3_data[i],gl_ADC4_data[i],
+                              gl_ADC5_data[i],gl_ADC6_data[i],gl_ADC7_data[i],gl_ADC8_data[i] ) ;
+     }
+    fclose(used_file) ;
+
+#endif
+/* check einbauen */
+
+
+
+
+/* 4.2.3 Clear Bank2 Full Flag --> free for sampling on this bank again   */
+   addr = mod_base + SIS3300_KEY_BANK2_FULL_FLAG ;
+   return_code =  vme_A32D32_write(p, addr, 0x0) ;
+   if (return_code != 0) {fprintf(stderr,"vme_A32D32_write: return_code = 0x%08x at address = 0x%08x\n",return_code,addr );return -1 ; }
+
+
+   fprintf(stderr,"\n");
+
+   loop_cnt = loop_cnt + 1 ;
+/*   if ((loop_cnt & 0xFF) == 0x0 ) */
+   {
+     fprintf(stderr," \n");
+     fprintf(stderr," loop counter = 0x%08x \n", loop_cnt);
+     fprintf(stderr," \n");
+   }
+
+
+ }while (return_code == 0);
+
+  return -1 ;
+}
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile	(revision 22)
@@ -0,0 +1,48 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+frontirqtest: frontirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+puls_lemo_out1: puls_lemo_out1.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+send_irq_update: send_irq_update.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/Makefile~	(revision 22)
@@ -0,0 +1,45 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+frontirqtest: frontirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+puls_lemo_out1: puls_lemo_out1.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/frontirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/frontirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/frontirqtest.c	(revision 22)
@@ -0,0 +1,101 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+
+    irqctl.irq_mask=0xffffffff; /* all IRQs */
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+reg.offset=0x8;
+ioctl(p, SIS1100_CONTROL_READ, &reg);
+printf("0x%08x\n", reg.val);
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0xffffffff;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        printf("irqget: 0x%08x\n", irqget.irqs);
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/puls_lemo_out1.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/puls_lemo_out1.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/puls_lemo_out1.c	(revision 22)
@@ -0,0 +1,64 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    out_value = 0x10 ;    
+    if (ioctl(p, SIS1100_FRONT_IO, &out_value)<0) {
+        perror("SIS1100_FRONT_IO");
+        return -1;
+      }
+
+    out_value = 0x100000 ;    
+    if (ioctl(p, SIS1100_FRONT_IO, &out_value)<0) {
+        perror("SIS1100_FRONT_IO");
+        return -1;
+      }
+
+
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/send_irq_update.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/send_irq_update.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/front_irq/send_irq_update.c	(revision 22)
@@ -0,0 +1,61 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    unsigned int out_value ;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+    struct sis1100_ctrl_reg reg;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+
+
+
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+
+    reg.offset=0x84;
+    reg.val=0x8000;
+    if (ioctl(p, SIS3100_CONTROL_WRITE, &reg)<0) {
+              perror("SIS3100_CONTROL_WRITE");
+              return -1;
+          }
+
+
+
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/Makefile	(revision 22)
@@ -0,0 +1,40 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+linkirqtest: linkirqtest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/linkirqtest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/linkirqtest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/irqs/link_irq/linkirqtest.c	(revision 22)
@@ -0,0 +1,99 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+/****************************************************************************/
+static void sighnd(int sig)
+{
+    fprintf(stderr, "got sig %d\n", sig);
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+    int p;
+    struct sigaction action;
+    struct sis1100_irq_ctl irqctl;
+    struct sis1100_irq_get irqget;
+    struct sis1100_irq_ack irqack;
+    sigset_t mask, old_mask;
+
+    if (argc!=2)
+        {
+        fprintf(stderr, "usage: %s path\n", argv[0]);
+        return 1;
+        }
+
+    if (ioctl(p, SIS3100_FRONT_IO, 0xef)<0) {
+        perror("SIS3100_FRONT_IO");
+              return -1;
+       }
+
+
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGUSR1);
+    sigaddset(&mask, SIGUSR2);
+    sigprocmask(SIG_BLOCK, &mask, &old_mask);
+
+    if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+    action.sa_handler=sighnd;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags=0;
+    sigaction(SIGUSR1, &action, 0);
+    sigaction(SIGUSR2, &action, 0);
+
+    irqctl.irq_mask=0;
+    irqctl.signal=SIGUSR1;
+    if (ioctl(p, SIS1100_IRQ_CTL, &irqctl)<0) {
+        fprintf(stderr, "ioctl(SIS1100_IRQ_CTL): %s\n", strerror(errno));
+        return 1;    
+    }
+
+    while (1) {
+        u_int32_t io_bits;
+
+        sigsuspend(&old_mask);
+
+        irqget.irq_mask=0;
+        irqget.immediate_ack=0;
+        if (ioctl(p, SIS1100_IRQ_GET, &irqget)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_GET): %s\n", strerror(errno));
+            return 1;
+        }
+        switch (irqget.remote_status) {
+            case -1:
+                printf("Link down\n");
+                io_bits=(3<<26) | (1<<23);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            case 1:
+                printf("Link up\n");
+                io_bits=(3<<10) | (1<<7);
+                ioctl(p, SIS1100_FRONT_IO, &io_bits);
+                break;
+            default:
+                printf("ERROR: got irqs=%08x, remote_status=%d\n",
+                    irqget.irqs, irqget.remote_status);
+        }
+        irqack.irq_mask=irqget.irqs;
+        if (ioctl(p, SIS1100_IRQ_ACK, &irqack)<0) {
+            fprintf(stderr, "ioctl(SIS1100_IRQ_ACK): %s\n", strerror(errno));
+            return 1;
+        }
+    }
+
+    close(p);
+    return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+maptest: maptest.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c	(revision 22)
@@ -0,0 +1,302 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define MAPBITS 22
+#define MAPSIZE (1UL<<MAPBITS)
+#define MAPMASK (0xffffffffUL<<MAPBITS)
+#define OFFMASK (~MAPMASK)
+
+struct mapinfo {
+        u_int32_t header;
+        u_int32_t bordaddr;
+        int bordsize;
+        int modifier;
+        int mapidx, mapnum;
+        char* mapbase;
+        off_t mapsize;
+        char* bordbase;
+};
+
+/****************************************************************************/
+static void
+clear_maps(int p)
+{
+        int i;
+        struct sis1100_ctrl_reg reg;
+
+        for (i=0; i<64; i++) {
+                /* clear the .adl register; --> mark as unused */
+                reg.offset=0x408+16*i;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+static void
+dump_map(int p, struct mapinfo* map)
+{
+        int i;
+        printf("---------------------------\n");
+        printf("header  =0x%08x\n", map->header);
+        printf("bordaddr=0x%08x\n", map->bordaddr);
+        printf("bordsize=0x%08x\n", map->bordsize);
+        printf("modifier=      0x%02x\n", map->modifier);
+        printf("mapidx  =  %8d\n", map->mapidx);
+        printf("mapnum  =  %8d\n", map->mapnum);
+        printf("mapbase =%p\n", map->mapbase);
+        printf("mapsize =0x%08lx\n", map->mapsize);
+        printf("bordbase=%p\n", map->bordbase);
+        printf("\n");
+
+        for (i=map->mapidx; i<map->mapidx+map->mapnum; i++) {
+                struct sis1100_ctrl_reg reg;
+                u_int32_t offs=0x400+16*i;
+                
+                printf("idx=%d\n", i);
+                reg.offset=offs+0;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".hdr=0x%08x\n", reg.val);
+                reg.offset=offs+4;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".am =0x%08x\n", reg.val);
+                reg.offset=offs+8;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adl=0x%08x\n", reg.val);
+                reg.offset=offs+12;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adh=0x%08x\n", reg.val);
+        }
+
+}
+/****************************************************************************/
+static int
+map_it(int p, struct mapinfo* map)
+{
+        u_int32_t spacebase;
+        u_int32_t bordoffs;
+        struct sis1100_ctrl_reg reg;
+        struct sis1100_mapinfo mapinfo;
+        int i;
+
+        /* get size and start of VME-space */
+        mapinfo.space=2;
+        if (ioctl(p, SIS1100_MAPINFO, &mapinfo)<0) {
+                printf("SIS1100_MAPINFO(2): %s\n", strerror(errno));
+                return -1;
+        }
+
+        /*
+        printf("mapinfo(2): offset=0x%lx size=0x%x\n",
+                mapinfo.offset, mapinfo.size);
+        */
+
+
+        spacebase=map->bordaddr & MAPMASK;
+        bordoffs=map->bordaddr & OFFMASK;
+        map->mapnum=(map->bordsize+bordoffs+MAPSIZE-1)/MAPSIZE;
+        map->mapsize=map->mapnum*MAPSIZE;
+
+        /* this code is only to find an unused map entry */
+        /* not really necessary */
+        for (i=0; i<64; i++) {
+                reg.offset=0x408+16*i;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        printf("SIS1100_CONTROL_READ: %s\n", strerror(errno));
+                        return -1;
+                }
+                if (reg.error) {
+                        printf("SIS1100_CONTROL_READ: error=0x%x\n", reg.error);
+                        return -1;
+                }
+                if (reg.val==0) break;
+        }
+        if (i>=(64-map->mapnum)) {
+                printf("map_it: no maps available\n");
+                return -1;
+        }
+        /*printf("found free entry at %d\n", i);*/
+
+
+
+        map->mapidx=i;
+        for (i=0; i<map->mapnum; i++) {
+                u_int32_t offs=0x400+16*(map->mapidx+i);
+
+                reg.offset=offs+0;
+                reg.val=map->header;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+4;
+                reg.val=map->modifier;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                reg.offset=offs+8;
+
+                /* the '|0xa5a5' is only used to mark the entry as 'in use' */
+                /* the lowest 22 bits are ignored, so we can misuse them */
+                reg.val=spacebase+MAPSIZE*i|0xa5a5;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+12;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+
+        map->mapbase=mmap(0,
+                        map->mapsize,
+                        PROT_READ|PROT_WRITE, MAP_SHARED,
+                        p,
+                        mapinfo.offset+map->mapidx*MAPSIZE);
+        /*                             ^^^^^^^^^^^^^^^^^^^   */
+        /*                      only this term is really missing in your code*/
+
+
+        if (map->mapbase==MAP_FAILED) {
+                printf("mmap: %s\n", strerror(errno));
+                for (i=0; i<map->mapnum; i++) {
+                        reg.offset=0x400+16*(map->mapidx+i)+8;
+                        reg.val=0;
+                        ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                }
+                return -1;
+        }
+        map->bordbase=map->mapbase+bordoffs;
+        return 0;
+}
+/****************************************************************************/
+static void
+unmap_it(int p, struct mapinfo* map)
+{
+        struct sis1100_ctrl_reg reg;
+        int i;
+
+        munmap(map->mapbase, map->mapsize);
+        for (i=0; i<map->mapnum; i++) {
+                reg.offset=0x400+16*(map->mapidx+i)+8;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, i;
+        struct mapinfo map[64];
+        volatile u_int32_t val;
+        u_int16_t readval;
+        struct sis1100_ctrl_reg erreg;
+
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        /* mark all maps as unused */
+        clear_maps(p);
+
+        map[0].header=0xff010800;
+        map[0].bordaddr=0x00000000; /* ram */
+        map[0].bordsize=0x400000;
+        map[0].modifier=0x9;
+
+        map[1].header=0xff010800;
+        map[1].bordaddr=0x33000000; /* sis3300 ; 0x1000 0000 to 107f ffff*/
+        map[1].bordsize=0x800000;
+        map[1].modifier=0x9;
+
+        map[2].header=0xff010800;
+        map[2].bordaddr=0xee000000;
+        map[2].bordsize=0x400000;
+        map[2].modifier=0x9;
+
+        map[3].header=0xff010800;
+        map[3].bordaddr=0x00f00000;
+        map[3].bordsize=0x100000;
+        map[3].modifier=0x9;
+
+        map[4].header=0xff010800;
+        map[4].bordaddr=0x00380000;
+        map[4].bordsize=0x00200000;
+        map[4].modifier=0x9;
+
+        /* map full A16 space */
+        map[5].header=0xff010800;
+        map[5].bordaddr=0x0;
+        map[5].bordsize=0xFFFF;
+        map[5].modifier=0x29;  /* A16 non supervisory */
+
+        /* map lower half of A24 space */
+        map[6].header=0xff010800;
+        map[6].bordaddr=0x0;
+        map[6].bordsize=0x3FFFFF;
+        map[6].modifier=0x39;  /*A24 non supervisory */
+
+
+        for (i=0; i<7; i++) {
+                if (map_it(p, map+i)<0) return 1;
+                dump_map(p, map+i);
+        }
+
+        /* the real access */
+
+        /* single A16/D16 write with return code check */
+        printf("single write with check\n") ;
+        *(u_int16_t*)(map[5].bordbase + 0x100)=0xAA55;
+        erreg.offset=0xac;
+        ioctl(p,SIS1100_CONTROL_READ,&erreg);
+        printf("return code: 0x%x\n",erreg.val);
+        if (erreg.val == 0x211) printf ("VME bus error\n\n");
+
+        /* write loop over A16/D16 space */
+        printf("A16/D16 write access loop\n") ;
+        for(i=0;i<0xFFFF;i+=2) {
+            *(u_int16_t*)(map[5].bordbase + i)=i;
+        }
+
+        /* read loop over A16/D16 space */
+        printf("A16/D16 read access loop\n") ;
+        for(i=0;i<0xFFFF;i+=2) {
+            readval=*(u_int16_t*)(map[5].bordbase + i);
+        }
+
+        /* write loop over lower half A24/D32 space */
+        printf("A24/D32 write access loop\n") ;
+        for(i=0;i<0x3FFFFF;i+=4) {
+            *(u_int32_t*)(map[6].bordbase + i)=i;
+        }
+
+        /* read access to/from SIS3300 ADC */
+        val=*(u_int32_t*)(map[1].bordbase+0x4);
+        printf("\n" );
+        printf("\n" );
+        printf("sis3300 id = 0x%08x\n", val );
+
+        printf("A32/32 read  access loop\n") ;
+        for (i=0;i<0x80000;i+=4) {
+           val=*(u_int32_t*)(map[0].bordbase + i);
+           val=*(u_int32_t*)(map[1].bordbase + 0x400000 + i);
+        }
+
+
+/* unmap again */
+        for (i=0; i<7; i++) {
+                unmap_it(p, map+i);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c~
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/mapping/maptest.c~	(revision 22)
@@ -0,0 +1,293 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+#define MAPBITS 22
+#define MAPSIZE (1UL<<MAPBITS)
+#define MAPMASK (0xffffffffUL<<MAPBITS)
+#define OFFMASK (~MAPMASK)
+
+struct mapinfo {
+        u_int32_t header;
+        u_int32_t bordaddr;
+        int bordsize;
+        int modifier;
+        int mapidx, mapnum;
+        char* mapbase;
+        off_t mapsize;
+        char* bordbase;
+};
+
+/****************************************************************************/
+static void
+clear_maps(int p)
+{
+        int i;
+        struct sis1100_ctrl_reg reg;
+
+        for (i=0; i<64; i++) {
+                /* clear the .adl register; --> mark as unused */
+                reg.offset=0x408+16*i;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+static void
+dump_map(int p, struct mapinfo* map)
+{
+        int i;
+        printf("---------------------------\n");
+        printf("header  =0x%08x\n", map->header);
+        printf("bordaddr=0x%08x\n", map->bordaddr);
+        printf("bordsize=0x%08x\n", map->bordsize);
+        printf("modifier=      0x%02x\n", map->modifier);
+        printf("mapidx  =  %8d\n", map->mapidx);
+        printf("mapnum  =  %8d\n", map->mapnum);
+        printf("mapbase =%p\n", map->mapbase);
+        printf("mapsize =0x%08lx\n", map->mapsize);
+        printf("bordbase=%p\n", map->bordbase);
+        printf("\n");
+
+        for (i=map->mapidx; i<map->mapidx+map->mapnum; i++) {
+                struct sis1100_ctrl_reg reg;
+                u_int32_t offs=0x400+16*i;
+                
+                printf("idx=%d\n", i);
+                reg.offset=offs+0;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".hdr=0x%08x\n", reg.val);
+                reg.offset=offs+4;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".am =0x%08x\n", reg.val);
+                reg.offset=offs+8;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adl=0x%08x\n", reg.val);
+                reg.offset=offs+12;
+                ioctl(p, SIS1100_CONTROL_READ, &reg);
+                printf(".adh=0x%08x\n", reg.val);
+        }
+
+}
+/****************************************************************************/
+static int
+map_it(int p, struct mapinfo* map)
+{
+        u_int32_t spacebase;
+        u_int32_t bordoffs;
+        struct sis1100_ctrl_reg reg;
+        struct sis1100_mapinfo mapinfo;
+        int i;
+
+        /* get size and start of VME-space */
+        mapinfo.space=2;
+        if (ioctl(p, SIS1100_MAPINFO, &mapinfo)<0) {
+                printf("SIS1100_MAPINFO(2): %s\n", strerror(errno));
+                return -1;
+        }
+
+        /*
+        printf("mapinfo(2): offset=0x%lx size=0x%x\n",
+                mapinfo.offset, mapinfo.size);
+        */
+
+
+        spacebase=map->bordaddr & MAPMASK;
+        bordoffs=map->bordaddr & OFFMASK;
+        map->mapnum=(map->bordsize+bordoffs+MAPSIZE-1)/MAPSIZE;
+        map->mapsize=map->mapnum*MAPSIZE;
+
+        /* this code is only to find an unused map entry */
+        /* not really necessary */
+        for (i=0; i<64; i++) {
+                reg.offset=0x408+16*i;
+                if (ioctl(p, SIS1100_CONTROL_READ, &reg)<0) {
+                        printf("SIS1100_CONTROL_READ: %s\n", strerror(errno));
+                        return -1;
+                }
+                if (reg.error) {
+                        printf("SIS1100_CONTROL_READ: error=0x%x\n", reg.error);
+                        return -1;
+                }
+                if (reg.val==0) break;
+        }
+        if (i>=(64-map->mapnum)) {
+                printf("map_it: no maps available\n");
+                return -1;
+        }
+        /*printf("found free entry at %d\n", i);*/
+
+
+
+        map->mapidx=i;
+        for (i=0; i<map->mapnum; i++) {
+                u_int32_t offs=0x400+16*(map->mapidx+i);
+
+                reg.offset=offs+0;
+                reg.val=map->header;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+4;
+                reg.val=map->modifier;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                reg.offset=offs+8;
+
+                /* the '|0xa5a5' is only used to mark the entry as 'in use' */
+                /* the lowest 22 bits are ignored, so we can misuse them */
+                reg.val=spacebase+MAPSIZE*i|0xa5a5;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+
+                reg.offset=offs+12;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+
+        map->mapbase=mmap(0,
+                        map->mapsize,
+                        PROT_READ|PROT_WRITE, MAP_SHARED,
+                        p,
+                        mapinfo.offset+map->mapidx*MAPSIZE);
+        /*                             ^^^^^^^^^^^^^^^^^^^   */
+        /*                      only this term is really missing in your code*/
+
+
+        if (map->mapbase==MAP_FAILED) {
+                printf("mmap: %s\n", strerror(errno));
+                for (i=0; i<map->mapnum; i++) {
+                        reg.offset=0x400+16*(map->mapidx+i)+8;
+                        reg.val=0;
+                        ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+                }
+                return -1;
+        }
+        map->bordbase=map->mapbase+bordoffs;
+        return 0;
+}
+/****************************************************************************/
+static void
+unmap_it(int p, struct mapinfo* map)
+{
+        struct sis1100_ctrl_reg reg;
+        int i;
+
+        munmap(map->mapbase, map->mapsize);
+        for (i=0; i<map->mapnum; i++) {
+                reg.offset=0x400+16*(map->mapidx+i)+8;
+                reg.val=0;
+                ioctl(p, SIS1100_CONTROL_WRITE, &reg);
+        }
+}
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+        int p, i;
+        struct mapinfo map[64];
+        volatile u_int32_t val;
+        u_int16_t readval;
+
+        if (argc!=2) {
+                fprintf(stderr, "usage: %s path\n", argv[0]);
+                return 1;
+        }
+
+        if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+        /* mark all maps as unused */
+        clear_maps(p);
+
+        map[0].header=0xff010800;
+        map[0].bordaddr=0x00000000; /* ram */
+        map[0].bordsize=0x400000;
+        map[0].modifier=0x9;
+
+        map[1].header=0xff010800;
+        map[1].bordaddr=0x33000000; /* sis3300 ; 0x1000 0000 to 107f ffff*/
+        map[1].bordsize=0x800000;
+        map[1].modifier=0x9;
+
+        map[2].header=0xff010800;
+        map[2].bordaddr=0xee000000;
+        map[2].bordsize=0x400000;
+        map[2].modifier=0x9;
+
+        map[3].header=0xff010800;
+        map[3].bordaddr=0x00f00000;
+        map[3].bordsize=0x100000;
+        map[3].modifier=0x9;
+
+        map[4].header=0xff010800;
+        map[4].bordaddr=0x00380000;
+        map[4].bordsize=0x00200000;
+        map[4].modifier=0x9;
+
+        /* map full A16 space */
+        map[5].header=0xff010800;
+        map[5].bordaddr=0x0;
+        map[5].bordsize=0xFFFF;
+        map[5].modifier=0x29;  /* A16 non supervisory */
+
+        /* map lower half of A24 space */
+        map[6].header=0xff010800;
+        map[6].bordaddr=0x0;
+        map[6].bordsize=0x3FFFFF;
+        map[6].modifier=0x39;  /*A24 non supervisory */
+
+
+        for (i=0; i<7; i++) {
+                if (map_it(p, map+i)<0) return 1;
+                dump_map(p, map+i);
+        }
+
+        /* the real access */
+
+        /* write loop over A16/D16 space */
+        printf("A16/D16 write access loop\n") ;
+        for(i=0;i<0xFFFF;i+=2) {
+            *(u_int16_t*)(map[5].bordbase + i)=i;
+        }
+
+        /* read loop over A16/D16 space */
+        printf("A16/D16 read access loop\n") ;
+        for(i=0;i<0xFFFF;i+=2) {
+            readval=*(u_int16_t*)(map[5].bordbase + i);
+        }
+
+        /* write loop over lower half A24/D32 space */
+        printf("A24/D32 write access loop\n") ;
+        for(i=0;i<0x3FFFFF;i+=4) {
+            *(u_int32_t*)(map[6].bordbase + i)=i;
+        }
+
+        /* read access to/from SIS3300 ADC */
+        val=*(u_int32_t*)(map[1].bordbase+0x4);
+        printf("\n" );
+        printf("\n" );
+        printf("sis3300 id = 0x%08x\n", val );
+
+        printf("A32/32 read  access loop\n") ;
+        for (i=0;i<0x80000;i+=4) {
+           val=*(u_int32_t*)(map[0].bordbase + i);
+           val=*(u_int32_t*)(map[1].bordbase + 0x400000 + i);
+        }
+
+
+/* unmap again */
+        for (i=0; i<7; i++) {
+                unmap_it(p, map+i);
+        }
+
+        close(p);
+        return 0;    
+}
+/****************************************************************************/
+/****************************************************************************/
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/Makefile	(revision 22)
@@ -0,0 +1,42 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+pipeline: pipeline.c 
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/pipeline.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/pipeline.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/pipeline_liste/pipeline.c	(revision 22)
@@ -0,0 +1,218 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "dev/pci/sis1100_var.h"
+
+int p;
+
+/* das sind die CAEN-Module, die ich zufaellig habe, beliebig durcheinander-
+   gewuerfelt und vervielfacht */
+struct sis1100_pipelist list[]={
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x03010000, 0x09, 0x100fc, 0},
+    {0x0c010000, 0x09, 0x200fa, 0},
+    {0x03010000, 0x09, 0x200fc, 0},
+    {0x0c010000, 0x09, 0x200fe, 0},
+    {0x0c010000, 0x09, 0x300fa, 0},
+    {0x0c010000, 0x09, 0x100fa, 0},
+    {0x03010000, 0x09, 0x300fc, 0},
+    {0x0c010000, 0x09, 0x100fe, 0},
+    {0x0c010000, 0x09, 0x300fe, 0},
+    {0x0c010000, 0x09, 0x400fa, 0},
+    {0x03010000, 0x09, 0x400fc, 0},
+    {0x0c010000, 0x09, 0x400fe, 0},
+    {0x0c010000, 0x09, 0x500fa, 0},
+    {0x03010000, 0x09, 0x500fc, 0},
+    {0x0c010000, 0x09, 0x500fe, 0}
+};
+
+
+static int pipeline_read(int p, struct sis1100_pipelist* list, int listlen,
+    u_int32_t* data, int seq)
+{
+    struct sis1100_pipe pipe;
+
+    pipe.num=listlen;
+    pipe.list=list;
+    pipe.data=data;
+
+    if (ioctl(p, SIS1100_PIPE, &pipe)<0) {
+	printf("ioctl(SIS1100_PIPE): %s\n", strerror(errno));
+        return -1;
+    }
+    if (pipe.error) printf("error=0x%x\n", pipe.error);
+    return 0;
+}
+
+volatile int stop=0;
+
+static void hand(int sig)
+{
+printf("signal %d\n", sig);
+stop=1;
+}
+
+int main(int argc, char* argv[])
+{
+    int num, loopcount, reqcount, i, j, *data;
+    int* comp, comp_valid, dot;
+    struct sigaction act;
+
+    if (argc<4)
+      {
+      fprintf(stderr, "usage: %s path reqcount loopcount\n", argv[0]);
+      return 1;
+      }
+    if ((p=open(argv[1], O_RDWR, 0))<0) {
+        perror("open");
+        return 1;
+    }
+
+    reqcount=atoi(argv[2]);
+    loopcount=atoi(argv[3]);
+
+    act.sa_handler=hand;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags=0;
+    sigaction(SIGINT, &act, 0);
+    sigaction(SIGQUIT, &act, 0);
+
+    num=sizeof(list)/sizeof(struct sis1100_pipelist);
+    if (reqcount<num) num=reqcount;
+    printf("listlen=%d; loopcount=%d\n", num, loopcount);
+
+    data=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp=(u_int32_t*)malloc(num*sizeof(u_int32_t));
+    comp_valid=0;
+
+    if (!data) {
+    	printf("malloc: %s\n", strerror(errno));
+	return 1;
+    }
+    for (i=0; i<num; i++) data[i]=0x12345678; /* just for test */
+    dot=10000/num;
+    for (j=0; j<loopcount; j++) {
+    	if (stop || (pipeline_read(p, list, num, data, j)<0)) goto raus;
+        if (comp_valid) {
+            for (i=0; i<num; i++) {
+                if (comp[i]!=data[i]) printf("[%d] %08x-->%08x\n",
+                    i, comp[i], data[i]);
+            }
+        } else {
+            for (i=0; i<num; i++) comp[i]=data[i];
+            comp_valid=1;
+        }
+        if ((j%dot)==0) {printf("."); fflush(stdout);}
+    }
+raus:
+    printf("tranferred %d words\n", j*num);
+    for (i=0; i<num; i++)
+    	printf("[%2d] %x: %08x\n", i, list[i].addr, data[i]&0xffff);
+    close(p);
+    return 0;
+}
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/Makefile	(revision 22)
@@ -0,0 +1,41 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sis3100_sdram_eeprom: sis3100_sdram_eeprom.c ../../V1.0/linux-gnu/sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/check_size.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/check_size.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/check_size.c	(revision 22)
@@ -0,0 +1,346 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+ 
+#include "../sis3100_calls/sis3100_vme_calls.h"
+ 
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t no_row_addresses ;
+u_int32_t no_column_addresses ;
+u_int32_t no_module_banks ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+ no_row_addresses     =   0 ;
+ no_column_addresses  =   0 ;
+ no_module_banks      =   0 ;
+
+ for (i=0;i<6;i++)  {
+     sdram_eeprom_read (p_sharc, &data) ;
+     if (i == 0x3) no_row_addresses = data ;
+     if (i == 0x4) no_column_addresses = data ;
+     if (i == 0x5) no_module_banks = data ;
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+ no_of_Mbyte = 0 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 1))   no_of_Mbyte = 64 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 2))   no_of_Mbyte = 128 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 1))   no_of_Mbyte = 256 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 2))   no_of_Mbyte = 512 ;
+
+ printf("   no_of_Mbyte %d \n", no_of_Mbyte );      
+
+close(p_sharc);
+
+return no_of_Mbyte ;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/sis3100_sdram_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/sis3100_sdram_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sdram_eeprom/sis3100_sdram_eeprom.c	(revision 22)
@@ -0,0 +1,365 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "../../V1.0/linux-gnu/dev/pci/sis1100_var.h"  
+ 
+#include "../../V1.0/linux-gnu/sis3100_calls/sis3100_vme_calls.h"
+
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+/* write 0x3100 to address 0x90/0x91  */
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x90) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x31) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x91) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+  for (i=0;i<20;i++)
+   {
+     printf("i = %4d ", i * 8);      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x  ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x \n", data );      
+
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+close(p_sharc);
+
+return 0;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/C1.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/C1.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/C1.LDR	(revision 22)
@@ -0,0 +1,2916 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0130
+0x0100
+0x0002
+0x0100
+0x2000
+0x0f02
+0x4402
+0x0002
+0x1102
+0x0000
+0x0000
+0x0f02
+0x4401
+0x0002
+0x1102
+0x0000
+0x0000
+0x0f02
+0x4400
+0x0002
+0x1102
+0x4400
+0x0002
+0x1002
+0x00ff
+0x0000
+0x0f04
+0xa024
+0x0000
+0x013e
+0x000e
+0x0000
+0x0724
+0x4402
+0x0002
+0x1002
+0x4400
+0x0002
+0x1004
+0x1824
+0x0000
+0x013e
+0x0000
+0x8a00
+0x708f
+0x4400
+0x0002
+0x1002
+0x4401
+0x0002
+0x1004
+0x1224
+0x0000
+0x013e
+0x0000
+0x8100
+0x597e
+0x4400
+0x0002
+0x1002
+0x9420
+0x0002
+0x013e
+0x0000
+0x8100
+0x704f
+0x4400
+0x0002
+0x1102
+0xfff0
+0x00ff
+0x073e
+0x4401
+0x0002
+0x1002
+0x9420
+0x0002
+0x013e
+0x4401
+0x0002
+0x1104
+0xffea
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0f04
+0x00e4
+0x0000
+0x1844
+0x0000
+0x8100
+0x5ffe
+0x0000
+0xb180
+0x5ffe
+0xffff
+0xffff
+0xac1c
+0x00e0
+0x0400
+0x073e
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x00c9
+0x0000
+0x07be
+0x005c
+0x0000
+0x07be
+0x0002
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0023
+0x0000
+0x07be
+0x001e
+0x0000
+0x07be
+0x002c
+0x0000
+0x07be
+0x0005
+0x0000
+0x07be
+0x000d
+0x0000
+0x07be
+0x0007
+0x0000
+0x07be
+0x00f0
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0400
+0x0a3e
+0x44e8
+0x0002
+0x0f14
+0x0001
+0x0000
+0x9940
+0x0000
+0x0000
+0x0f34
+0x44e9
+0x0002
+0x0f14
+0x0001
+0x2000
+0x0c00
+0x0000
+0x0000
+0x9980
+0x0000
+0x0000
+0x0a3e
+0x0001
+0x0000
+0x0f02
+0x017c
+0x0002
+0x0f01
+0x4404
+0x0002
+0x0f14
+0x0009
+0x2500
+0x0c00
+0x3020
+0x9a04
+0x725f
+0x0122
+0x0001
+0x023e
+0x0003
+0x0000
+0xa900
+0x0000
+0x0000
+0xa900
+0x0002
+0x0000
+0xa901
+0x0001
+0x0000
+0xa901
+0x0004
+0x0000
+0xa901
+0x0005
+0x0000
+0xa901
+0x0006
+0x0000
+0x1604
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0400
+0x0a3e
+0x4403
+0x0002
+0x0f14
+0x0000
+0x0000
+0x9940
+0x1800
+0x0002
+0x12db
+0x0000
+0x8000
+0x7ddf
+0x1801
+0x0002
+0x12db
+0x0000
+0x8100
+0x7ddf
+0x1102
+0xa380
+0x700f
+0xa110
+0x9b82
+0x702f
+0x0000
+0x8b80
+0x701f
+0x0000
+0xa300
+0x747f
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x8b00
+0x717f
+0x0000
+0x9b00
+0x737f
+0x1809
+0x0002
+0x0f1c
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0xb8db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x9a02
+0x725f
+0x0000
+0x0400
+0x0a00
+0x0001
+0x0000
+0xb8db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0000
+0x023e
+0x0004
+0x0000
+0xb8db
+0x1100
+0x8002
+0x7ddf
+0x000f
+0x0400
+0x0724
+0x0003
+0x0000
+0xb8db
+0x0000
+0x8080
+0x7ddf
+0x0000
+0x8a00
+0x701f
+0x0005
+0x0000
+0x1644
+0x0003
+0x0000
+0x0f02
+0x1112
+0x0000
+0x013e
+0x0005
+0x0000
+0x0f02
+0x2002
+0x8100
+0x71cf
+0x0000
+0x0000
+0x9980
+0x0000
+0x8080
+0x59be
+0x0000
+0x8080
+0x59be
+0xffeb
+0x04ff
+0x073e
+0x0000
+0x8000
+0x59be
+0x0000
+0x0000
+0x9940
+0x0005
+0x0000
+0x1644
+0x0000
+0x8100
+0x71cf
+0x0003
+0x0000
+0x0f03
+0x1113
+0x8e00
+0x701f
+0x0005
+0x0000
+0x0f03
+0x2003
+0x0000
+0x013e
+0x0000
+0x0000
+0x99a0
+0x0000
+0x8080
+0x59bf
+0x0000
+0x8080
+0x59bf
+0x0000
+0x8000
+0x59bf
+0xffde
+0x04ff
+0x073e
+0x0000
+0x8000
+0x59bf
+0x0000
+0x0000
+0x9960
+0x0000
+0x0e00
+0x4dfe
+0x0000
+0x3400
+0x083f
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x000b
+0x0000
+0x07be
+0x0035
+0x0000
+0x07be
+0x0038
+0x0000
+0x07be
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x0000
+0x0f79
+0x0000
+0x0000
+0x0000
+0x0010
+0x0000
+0x140a
+0x0000
+0x0400
+0x0a3e
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0027
+0x0200
+0x0c00
+0xffff
+0xffff
+0x0f2f
+0xffff
+0xffff
+0x0f27
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0000
+0x0000
+0x0f2d
+0x0000
+0x0000
+0x0f25
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0000
+0x0000
+0x0f40
+0x0000
+0x0000
+0x0f41
+0x0000
+0x0000
+0x0f42
+0x0000
+0x0000
+0x0f43
+0x0000
+0x0000
+0x0f44
+0x0000
+0x0000
+0x0f45
+0x0000
+0x0000
+0x0f46
+0x0000
+0x0000
+0x0f47
+0x0000
+0x0000
+0x0f48
+0x0000
+0x0000
+0x0f49
+0x0000
+0x0000
+0x0f4a
+0x0000
+0x0000
+0x0f4b
+0x0000
+0x0000
+0x0f4c
+0x0000
+0x0000
+0x0f4d
+0x0000
+0x0000
+0x0f4e
+0x0000
+0x0000
+0x0f4f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0400
+0x0a3e
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0001
+0x140b
+0x0000
+0x0400
+0x0a3e
+0x1000
+0x0000
+0x140b
+0x0800
+0x0000
+0x140b
+0x1808
+0x0002
+0x12db
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x8c02
+0x700f
+0x0000
+0x0400
+0x0a00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0007
+0x0000
+0x0700
+0x0005
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8800
+0x7ddf
+0x0001
+0x0000
+0x0ddc
+0x0000
+0x0000
+0x9180
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0009
+0x0000
+0x0700
+0x0007
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8c80
+0x7ddf
+0x0000
+0x8000
+0x7dcf
+0x0000
+0x0000
+0x0fdb
+0x0001
+0x0000
+0x0d00
+0x0000
+0xed80
+0x53bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0009
+0x0000
+0x0700
+0x0007
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8800
+0x7ddf
+0x0003
+0x0000
+0x0ddc
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8000
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0008
+0x0000
+0x0700
+0x0006
+0x0000
+0x0d00
+0x0000
+0x6d80
+0x51bf
+0x0000
+0x8c80
+0x7ddf
+0x0002
+0x0000
+0x0ddc
+0x0000
+0x6d80
+0x51bf
+0x0000
+0xed80
+0x53bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0a3e
+0xff9b
+0x00ff
+0x07be
+0xff97
+0x00ff
+0x07be
+0x0000
+0x0400
+0x0a3e
+0x0001
+0x0000
+0x0f2e
+0x0000
+0x0000
+0x0f3c
+0x44e8
+0x0002
+0x0f14
+0x000b
+0x0400
+0x073e
+0x0000
+0x0e00
+0x4dfe
+0x0000
+0x8200
+0x597e
+0x44e8
+0x0002
+0x0f14
+0x660d
+0x0019
+0x0f02
+0x0000
+0x0000
+0x597e
+0x0002
+0x0014
+0x013e
+0x7fff
+0x0000
+0x0f02
+0x1002
+0x0e00
+0x4dfe
+0x0000
+0x8000
+0x597e
+0x1f00
+0x0031
+0x023e
+0x0000
+0x3400
+0x083f
+0x0000
+0x8b80
+0x716f
+0x0000
+0x0000
+0xac16
+0x2555
+0x9a00
+0x72df
+0x44e9
+0x0002
+0x0f14
+0x1240
+0x0002
+0x59be
+0x0005
+0x2000
+0x0c00
+0x1000
+0x0002
+0x59be
+0x020a
+0x0402
+0x0640
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x9550
+0x0002
+0x013e
+0x0001
+0x0000
+0x1604
+0x1550
+0x0002
+0x013e
+0x000f
+0x0400
+0x0700
+0xfffd
+0xffff
+0x1604
+0x0000
+0x0000
+0x59fe
+0x0000
+0x8e00
+0x700f
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x8180
+0x714f
+0x0000
+0x8200
+0x716f
+0x0000
+0x8b00
+0x717f
+0x0000
+0x2c00
+0x083f
+0x0000
+0x8200
+0x5ffe
+0x0000
+0xb180
+0x5ffe
+0xa550
+0x0002
+0x013e
+0xfff6
+0x04ff
+0x0724
+0x0000
+0x0000
+0x0f34
+0x0000
+0x8a00
+0x703f
+0x11ed
+0x0400
+0x073e
+0x1020
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x9fc0
+0x0000
+0x0000
+0x9fc0
+0x0004
+0x0400
+0x07be
+0x0002
+0x0000
+0x0f04
+0x4509
+0x0002
+0x0f08
+0x0000
+0x0000
+0x0a3e
+0x0002
+0x0000
+0x0f00
+0x4509
+0x0002
+0x0f14
+0x0000
+0x0000
+0x0f34
+0x0001
+0x0000
+0x0d00
+0x0000
+0x0000
+0x9980
+0x4509
+0x0002
+0x0f14
+0x450b
+0x0002
+0x9980
+0x450b
+0x0002
+0x0f14
+0x0061
+0x0000
+0x9980
+0x0064
+0x0000
+0x9980
+0x0000
+0x0400
+0x0a3e
+0x0069
+0x0000
+0x9980
+0x0000
+0x0000
+0x9980
+0x000a
+0x0000
+0x0000
+0x0005
+0x1400
+0x0002
+0x000e
+0x0000
+0x0000
+0x0003
+0x1405
+0x0002
+0x0123
+0x0002
+0x06be
+0x0100
+0x0002
+0x063e
+0x1407
+0x0002
+0x063e
+0x000a
+0x0000
+0x0000
+0x0004
+0x1408
+0x0002
+0x000e
+0x0000
+0x0000
+0x0018
+0x140c
+0x0002
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4416
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x441c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4422
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4428
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x442e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4434
+0x0002
+0x0f1f
+0x000a
+0x0000
+0x0000
+0x0004
+0x1424
+0x0002
+0x000e
+0x0000
+0x0000
+0x005d
+0x1428
+0x0002
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4440
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4446
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x444c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4452
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4458
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x445e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4464
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x446a
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4470
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4476
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x447c
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4482
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4488
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x448e
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x4494
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x449a
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44a0
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44a6
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44ac
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44b2
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44b8
+0x0002
+0x0f1f
+0x1000
+0x0000
+0x142b
+0x1480
+0x0402
+0x063e
+0x0000
+0x8f80
+0x5ffe
+0x44be
+0x0002
+0x0f1f
+0x0000
+0x8e80
+0x5ffe
+0x0005
+0x0000
+0xbe1d
+0x0000
+0x6c00
+0x083f
+0x0000
+0x0008
+0x140a
+0x0002
+0x0000
+0xbe1d
+0x000e
+0x0000
+0x0000
+0x0012
+0x1800
+0x0002
+0x1702
+0x6000
+0x0002
+0x1702
+0x2000
+0x0000
+0x1702
+0x0000
+0x2000
+0x1702
+0x0000
+0x4000
+0x1702
+0x0000
+0x8000
+0x1702
+0x7bde
+0x000f
+0x1702
+0x0000
+0x0080
+0x1702
+0x03de
+0x0000
+0xc702
+0x180a
+0x0002
+0x1702
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x00e8
+0x4400
+0x0002
+0x0027
+0x44e9
+0x0002
+0x0000
+0x0000
+0x0000
+0x0000
+0x0001
+0x0000
+0x0001
+0x44e8
+0x0002
+0x0000
+0x0001
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_IRQ.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_IRQ.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_IRQ.LDR	(revision 22)
@@ -0,0 +1,1941 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0083
+0x0100
+0x0002
+0x000d
+0x0000
+0x073e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0144
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0148
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x017f
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0001
+0x0000
+0x0f2d
+0x0101
+0x0002
+0x0f1d
+0x0018
+0x0002
+0x0f1e
+0x0002
+0x0c00
+0x0c00
+0x0000
+0x6d80
+0x5b7f
+0x0000
+0xed80
+0x5d7f
+0x0000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f21
+0x0100
+0x2000
+0x0f11
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8080
+0x527e
+0x0100
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x00ff
+0x0000
+0x0f02
+0x0001
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x0002
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0xff00
+0x0000
+0x0f0f
+0x0004
+0x0100
+0x110f
+0x0040
+0x0000
+0x140d
+0x0004
+0x0000
+0x140a
+0x0080
+0x0000
+0x140d
+0x0002
+0x0000
+0x140a
+0x0100
+0x0000
+0x140d
+0x0001
+0x0000
+0x140a
+0x1000
+0x0000
+0x140b
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x1002
+0x0108
+0x2000
+0x1102
+0x0000
+0x8100
+0x77bf
+0x0109
+0x2000
+0x1102
+0x0000
+0x8100
+0x77af
+0x010a
+0x2000
+0x1102
+0x0000
+0x8100
+0x779f
+0x010b
+0x2000
+0x1102
+0x0000
+0x8100
+0x77df
+0x010c
+0x2000
+0x1102
+0x00ff
+0x0000
+0x0f02
+0x0100
+0x2000
+0x1001
+0x0112
+0x0004
+0x013e
+0x0811
+0x0000
+0x023e
+0x0001
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0x0101
+0x2000
+0x1001
+0x0112
+0x0004
+0x013e
+0x0811
+0x0000
+0x023e
+0x0002
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0xffe5
+0x00ff
+0x073e
+0x0102
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0102
+0x2000
+0x110f
+0x0000
+0x0000
+0x0b3e
+0x0103
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0103
+0x2000
+0x110f
+0x0004
+0x0100
+0x100f
+0x0004
+0x0100
+0x110f
+0x080f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0110
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0110
+0x2000
+0x110e
+0x0001
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x090f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0111
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0111
+0x2000
+0x110e
+0x0002
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0a0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0112
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0112
+0x2000
+0x110e
+0x0004
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0b0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0113
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0113
+0x2000
+0x110e
+0x0008
+0x0000
+0x0f0e
+0x0006
+0x0100
+0x110e
+0x0c0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0114
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0114
+0x2000
+0x110e
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0d0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0115
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0115
+0x2000
+0x110e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0e0f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0116
+0x2000
+0x100e
+0x9ee0
+0x0002
+0x013e
+0x0116
+0x2000
+0x110e
+0x0000
+0x0020
+0x142c
+0x0000
+0x0020
+0x140c
+0x0000
+0x0000
+0x0b3e
+0x0104
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0104
+0x2000
+0x110f
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_TEST.LDR
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_TEST.LDR	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/IO_TEST.LDR	(revision 22)
@@ -0,0 +1,1800 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x001d
+0x0100
+0x0002
+0x0000
+0x0000
+0x0f03
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0000
+0x0020
+0x142c
+0x0000
+0x0020
+0x140c
+0x0001
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0001
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x000a
+0x0000
+0x0000
+0x0004
+0x011d
+0x0002
+0x000e
+0x0000
+0x0000
+0x0008
+0x0121
+0x0002
+0x0001
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0002
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0004
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x0008
+0x0000
+0x0f03
+0x0006
+0x0100
+0x1103
+0x000a
+0x0000
+0x0000
+0x0004
+0x0129
+0x0002
+0x000e
+0x0000
+0x0000
+0x0027
+0x012d
+0x0002
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0000
+0x0008
+0x142c
+0x000f
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0004
+0x0100
+0x1002
+0x0100
+0x2000
+0x1102
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x0f03
+0x0005
+0x0100
+0x1103
+0x0101
+0x2000
+0x1002
+0x9220
+0x0002
+0x013e
+0x0101
+0x2000
+0x1102
+0x9770
+0x0002
+0x013e
+0x0102
+0x2000
+0x1107
+0x0001
+0x0000
+0x0c02
+0x0000
+0x0000
+0x0000
+0xffc3
+0x00ff
+0x073e
+0x5555
+0x0000
+0x0f02
+0x0001
+0x0400
+0x0c00
+0x0000
+0x0100
+0x1102
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfffc
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0f03
+0x0001
+0x2000
+0x1103
+0x0000
+0x2000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x1248
+0x0000
+0x0f02
+0x0049
+0x400a
+0x1102
+0x9330
+0x0002
+0x013e
+0x0000
+0x2000
+0x1004
+0x1004
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x9330
+0x0002
+0x013e
+0xfffc
+0x04ff
+0x073e
+0x0001
+0x2000
+0x1103
+0x0049
+0x400a
+0x1102
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile	(revision 22)
@@ -0,0 +1,40 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+sis3100_load_sharc: sis3100_load_sharc.c ../../V1.0/linux-gnu/sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile~
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/Makefile~	(revision 22)
@@ -0,0 +1,47 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+#CPPFLAGS     := -I/usr/local/lkmx/sys
+CPPFLAGS     := -I..
+CFLAGS       := -g -ansi $(WFLAGS)
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+sharc_read: sharc_read.c ../sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+sharc_write: sharc_write.c ../sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+
+sis3100_load_sharc: sis3100_load_sharc.c ../sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+sis3100_sdram_eeprom: sis3100_sdram_eeprom.c ../sis3100_calls/sis3100_vme_calls.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_rd.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0001
+0x0f00
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x0100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/blk_wr.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x0f00
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/led_test.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/led_test.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/led_test.ldr	(revision 22)
@@ -0,0 +1,1638 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x001e
+0x0100
+0x0002
+0x1000
+0x0000
+0x0f04
+0x0000
+0x0000
+0x0f05
+0x0100
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x011a
+0x0002
+0x06be
+0x1002
+0x0000
+0x0f02
+0x2225
+0x0000
+0x013e
+0x0000
+0x0000
+0x0f03
+0xa220
+0x0002
+0x013e
+0xa023
+0x0000
+0x013e
+0xfffe
+0x00ff
+0x0720
+0x1000
+0x0000
+0x0f11
+0x0040
+0x4001
+0xa300
+0x011a
+0x0002
+0x06be
+0x1000
+0x0000
+0x0f02
+0x1225
+0x0000
+0x013e
+0x0000
+0x0000
+0x0f03
+0xa220
+0x0002
+0x013e
+0xa023
+0x0000
+0x013e
+0xfffe
+0x00ff
+0x0720
+0x0010
+0x0000
+0x0f06
+0x1556
+0x0000
+0x013e
+0xa054
+0x0000
+0x013e
+0xffeb
+0x00ff
+0x0720
+0x0000
+0x0000
+0x0f05
+0xffe9
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel	(revision 22)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+
+loop_counter=1
+while :
+do
+
+
+    ./sharc_write /tmp/sis3100sharc  0x40000000 0x01 0x1103
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+#  if [ $loop_counter -eq 10 ]
+#    then exit
+#  fi
+done
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel~
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel~	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/loop_shel~	(revision 22)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+
+loop_counter=1
+while :
+do
+
+
+     then ./sharc_write /tmp/sis3100sharc  0x40000000 0x01 0x1103
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+#  if [ $loop_counter -eq 10 ]
+#    then exit
+#  fi
+done
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801_1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801_1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801_1.ldr	(revision 22)
@@ -0,0 +1,1707 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0035
+0x0100
+0x0002
+0x0060
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0020
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x00c7
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0080
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x00c0
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0028
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0000
+0x2000
+0x0f00
+0x0009
+0x400a
+0x1100
+0x0131
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0a00
+0x0033
+0x023e
+0xfffb
+0x00ff
+0x0710
+0x0000
+0x0008
+0x142c
+0x0020
+0x0000
+0x0f00
+0x0002
+0x2000
+0x1100
+0x0100
+0x2000
+0x0f00
+0x000f
+0x401c
+0x1100
+0x0131
+0x0002
+0x06be
+0x0003
+0x2000
+0x1002
+0x0120
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x0121
+0x2000
+0x1102
+0x0100
+0x2000
+0x0f11
+0x0000
+0x4000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0002
+0x2000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0003
+0x2000
+0x1002
+0x0122
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x0123
+0x2000
+0x1102
+0x0000
+0x0000
+0x0000
+0xffe5
+0x04ff
+0x073e
+0x0000
+0x0008
+0x140c
+0x0000
+0x0000
+0x0000
+0x0000
+0x0100
+0x1000
+0x0000
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801irq.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801irq.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/s3801irq.ldr	(revision 22)
@@ -0,0 +1,1923 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x007d
+0x0100
+0x0002
+0x0005
+0x0000
+0x073e
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x014d
+0x0002
+0x063e
+0x0000
+0x0000
+0x0b3e
+0x0001
+0x0000
+0x0f2d
+0x0101
+0x0002
+0x0f1d
+0x0020
+0x0002
+0x0f1e
+0x0002
+0x0400
+0x0c00
+0x0000
+0x6d80
+0x5b7f
+0x0000
+0xed80
+0x5d7f
+0x0000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f21
+0x0100
+0x2000
+0x0f11
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8080
+0x527e
+0x0100
+0x2000
+0x1001
+0x0002
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x000d
+0x0000
+0x0700
+0x0000
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0002
+0x0000
+0x0700
+0xfff9
+0x00ff
+0x073e
+0x0100
+0x0000
+0x142d
+0x1000
+0x0000
+0x142b
+0x0060
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0001
+0x0000
+0x0f01
+0x0100
+0x2000
+0x1101
+0xfff1
+0x00ff
+0x073e
+0x0003
+0x0000
+0x0f01
+0x0100
+0x2000
+0x1101
+0x0060
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0020
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x01f3
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0080
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0058
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0010
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0101
+0x2000
+0x1000
+0x0f55
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0004
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x00c0
+0x0000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x400a
+0x1100
+0x0179
+0x0002
+0x06be
+0x0028
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x8000
+0x0000
+0x0f01
+0x0001
+0x0000
+0x0f00
+0x1110
+0x0000
+0x013e
+0x0000
+0x8880
+0x701f
+0x0040
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0100
+0x0000
+0x140d
+0x0001
+0x0000
+0x142a
+0x1000
+0x0000
+0x140b
+0xffc4
+0x00ff
+0x073e
+0x0003
+0x0000
+0x0f11
+0x0000
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0009
+0x2000
+0x1000
+0x0112
+0x2000
+0x1100
+0x0004
+0x0000
+0x0f11
+0x0000
+0x4001
+0xa300
+0x0179
+0x0002
+0x06be
+0x0009
+0x2000
+0x1000
+0x0113
+0x2000
+0x1100
+0x000f
+0x0000
+0x0f00
+0x0280
+0x400a
+0x1100
+0x0179
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0111
+0x2000
+0x1100
+0x0020
+0x0000
+0x0f00
+0x0002
+0x2000
+0x1100
+0x0100
+0x2000
+0x0f00
+0x000f
+0x4014
+0x1100
+0x0179
+0x0002
+0x06be
+0x0003
+0x2000
+0x1002
+0x011e
+0x2000
+0x1102
+0x0004
+0x2000
+0x1002
+0x011f
+0x2000
+0x1102
+0x0120
+0x2000
+0x0f11
+0x0000
+0x4000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0002
+0x2000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0000
+0x8100
+0x527e
+0x0110
+0x2000
+0x100f
+0x9ff0
+0x0002
+0x013e
+0x0110
+0x2000
+0x110f
+0x0000
+0x1000
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0010
+0x0f00
+0x0001
+0x2000
+0x1100
+0x0000
+0x2000
+0x0f00
+0x0049
+0x4002
+0x1100
+0x0179
+0x0002
+0x06be
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_add.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_add.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_add.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0xc000
+0x0f11
+0x0000
+0xe000
+0x0f12
+0x0100
+0x2000
+0x0f13
+0x0000
+0x0000
+0x0f21
+0x0001
+0x0000
+0x0f02
+0x0001
+0x0400
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_rd.ldr	(revision 22)
@@ -0,0 +1,1590 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000e
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0001
+0x1000
+0x0c00
+0x0000
+0x0100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.ldr	(revision 22)
@@ -0,0 +1,1596 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0010
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x1000
+0x0c00
+0x0000
+0x8100
+0x547e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff7
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.sgl
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.sgl	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sgl_wr.sgl	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x3000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x5555
+0x5555
+0x0f02
+0x0001
+0x1000
+0x0c00
+0x0000
+0x8100
+0x527e
+0x0001
+0x0000
+0x0c10
+0x0000
+0x0000
+0x0000
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_read.c	(revision 22)
@@ -0,0 +1,133 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+
+
+/*
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+*/
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+
+int p_sharc;
+int byte_offset;
+int no_of_lwords ;
+
+
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t get_lwords ;
+int return_code ;
+
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path (sis3100sharc)  SHARC_OFFSET    no_of_lwords \n", argv[0]);
+  return 1;
+  }
+
+
+
+if ((p_sharc=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+
+byte_offset  = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+
+if (no_of_lwords > MAX_NUMBER_LWORDS) 
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return 1;
+   }
+
+if ((byte_offset & 3) != 0) 
+  {
+     printf("SHARC_OFFSET has to be lword aligned (0x0, 0x4, 0x8 ...)\n");
+     return 1;
+   }
+
+    return_code = s3100_sharc_read(p_sharc, byte_offset, blt_data, no_of_lwords) ;
+
+   if (return_code < 0 )
+     {
+       printf("s3100_sharc_read:   return_code = 0x%08x\n", return_code );         
+     }
+    else
+     {
+       printf("s3100_sharc_read:   return_code = 0x%08x\n", return_code );         
+       get_lwords = return_code >> 2 ;
+       printf("s3100_sharc_read:   get_lwords  = 0x%08x\n", get_lwords ); 
+       for (i=0;(i)<get_lwords;i++)
+       {
+         printf("i = 0x%08x     Data = 0x%08x\n",i, blt_data[i]);   
+       }
+     }
+
+
+
+
+close(p_sharc);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_write.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_write.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sharc_write.c	(revision 22)
@@ -0,0 +1,138 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+
+
+
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x1000000  
+
+int p_sharc;
+int byte_offset;
+int no_of_lwords ;
+
+u_int32_t data ;
+
+
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+/* u_int32_t get_lwords ; */
+int return_code ;
+/*int error_cnt ; */
+/* int loop_cnt ; */
+/*int temp ; */
+
+
+
+if (argc<5)
+  {
+  fprintf(stderr, "usage: %s path (sis3100sharc) SHARC_OFFSET   no_of_lwords ( START-)DATA \n", argv[0]);
+  return 1;
+  }
+
+if ((p_sharc=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+byte_offset = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+data = strtoul(argv[4],NULL,0) ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS) 
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return 1;
+   }
+
+
+if ((byte_offset & 3) != 0) 
+  {
+     printf("SHARC_OFFSET has to be lword aligned (0x0, 0x4, 0x8 ...)\n");
+     return 1;
+   }
+
+
+/* fill w_data */
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          blt_data[i] = data + i ; 
+       }
+
+
+
+/* write */
+    return_code = s3100_sdram_write(p_sharc, byte_offset, blt_data, no_of_lwords) ;
+    if (return_code < 0) 
+      {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, byte_offset );         
+        return -1 ;
+      }
+
+
+
+
+ return 1 ;
+
+
+
+
+close(p_sharc);
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_load_sharc.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_load_sharc.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_load_sharc.c	(revision 22)
@@ -0,0 +1,269 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "../../V1.0/linux-gnu/dev/pci/sis1100_var.h"
+#include "../../V1.0/linux-gnu/sis3100_calls/sis3100_vme_calls.h"
+
+
+/*
+#define swap_int(x) ((((x)>>24)&0x000000ff) |\
+                     (((x)>> 8)&0x0000ff00) |\
+                     (((x)<< 8)&0x00ff0000) |\
+                     (((x)<<24)&0xff000000))
+
+*/
+
+#define SHARCRAM  0x81200000
+#define D48REG    0x81300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int p_sharc;
+int offset ;
+u_int32_t data ;
+u_int32_t addr ;
+
+int return_code ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/*
+int i;
+char *dummy;
+*/
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s path (sis1100)  path2 (sis3100sharc) Sharc.ldr  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+if ((p_sharc=open(argv[2], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+/* open SHARC loader file */
+/* loaderfile=fopen("led_test.ldr","r"); */
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[3],"r");
+
+
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+    
+ }
+ fclose(loaderfile);
+ 
+
+
+
+
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+/* load SHARC */
+
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x00000800)	 ; /* set DSP Control Enable Bit*/
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x01000000)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Offset = 0x%08x  Data = 0x%08x\n", offset, data);  
+
+
+
+
+  printf("loading SHARC DSP\n");
+  currentaddress=SHARCRAM;
+  while (loadcount<count) {  
+      addr = D48REG;
+      data = tempword[loadcount];
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      loadcount++;
+
+      addr = currentaddress;
+      data = ((tempword[loadcount+1] << 16 ) & 0xFFFF0000) + (tempword[loadcount] & 0x0000FFFF);
+
+      return_code = s3100_sharc_write(p_sharc, addr, &data, 0x1) ;
+      if (return_code != 4) printf("s3100_sharc_write:   return_code = 0x%08x\n", return_code );         
+      currentaddress+=4;
+      loadcount+=2;
+  }
+
+
+
+
+
+
+
+  printf("SHARC DSP loaded\n");
+ 
+/* 3. Run SHARC */
+
+  printf("starting SHARC DSP\n");
+
+  offset =  0x00000300 ;
+  return_code = s3100_control_write(p, offset, 0x0100)	 ;
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+  return_code = s3100_control_read(p, offset, &data)			 ;
+  if (return_code != 0) printf("s3100_control_read:   return_code = 0x%08x\n", return_code );         
+  printf("Read at Addr = 0x%08x  Data = 0x%08x\n", addr, data);  
+
+  
+
+/* end load SHARC */
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+close(p);
+close(p_sharc);
+
+
+
+
+/*
+do
+{
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  printf("\n");
+  req.addr=0x00000000;
+
+
+  for (i=0;i<0x8;i++)
+  {
+     if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;} 
+     if (i==2)   printf("\n");
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  printf("\n");
+
+
+
+   req.addr=0x00000040;
+  for (i=0;i<0x11;i++)
+  {
+      if (ioctl(p, SIS1100_3100_6_READ, &req)<0) {printerror(&req, errno, 1); return 1;}  
+     printf("Read at Addr = 0x%08x  Data = 0x%08x\n", req.addr, req.data);
+     req.addr= req.addr + 0x4 ;
+   }
+
+  sleep(1);
+} while (0);
+*/
+
+close(p);
+close(p_sharc);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_sdram_eeprom.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_sdram_eeprom.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100_sdram_eeprom.c	(revision 22)
@@ -0,0 +1,437 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/*
+#define swap_int(x) ((((x)>>24)&0x000000ff) |\
+                     (((x)>> 8)&0x0000ff00) |\
+                     (((x)<< 8)&0x00ff0000) |\
+                     (((x)<<24)&0xff000000))
+
+*/
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p;
+int p_sharc;
+int offset ;
+u_int32_t data ;
+u_int32_t addr ;
+
+int return_code ;
+
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/*
+int i;
+char *dummy;
+*/
+
+if (argc<3)
+  {
+  fprintf(stderr, "usage: %s path (sis1100)  path2 (sis3100sharc)   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+if ((p_sharc=open(argv[2], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+
+
+
+
+
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+  addr = 0x40000400;
+
+/* write test */
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x90) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x31) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x91) ; /* write address */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write data */
+ sdram_eeprom_stop (p_sharc) ; 
+ usleep(100000) ;
+
+
+
+
+
+/* sdram_eeprom_stop (p_sharc) ; */
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+/* sdram_eeprom_stop (p_sharc) ; */
+
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+  for (i=0;i<20;i++)
+   {
+     printf("i = %4d ", i * 8);      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x  ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x ", data );      
+     sdram_eeprom_read (p_sharc, &data) ;
+     printf("    0x%02x \n", data );      
+
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+
+
+
+
+
+
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+close(p);
+close(p_sharc);
+
+
+return 0;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = 0x40000400;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = 0x40000400;
+
+/* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+/*  printf("return_code = 0x%08x\n", return_code ); */
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = 0x40000400;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100hiscal_load_flash.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100hiscal_load_flash.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100hiscal_load_flash.c	(revision 22)
@@ -0,0 +1,255 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/* #include "flash_prom.h" */
+#include "vme_sub_flashprom.h"
+
+
+
+#define FLASHPROM  0x01000000
+#define SHARCRAM   0x01200000
+#define D48REG     0x01300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int8_t read_data_8 ;
+u_int8_t data_8 ;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t  mod_base ;
+int return_code ;
+int error ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/* int flash_busy ; */
+
+/*
+int i;
+char *dummy;
+*/
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH %s Sharc.ldr   BASE_ADDR   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[3],NULL,0) ;
+
+
+
+
+addr = mod_base + 0x0 ;                    /* Version */
+
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return 1;}
+printf("\n");
+printf("\n");
+printf(" Version register:  0x%08x\n", data );
+printf("\n");
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x03000000) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+
+/*********************************************/
+/*                                           */
+/*   Clear Flashprom                         */
+/*                                           */
+/*                                           */
+/*********************************************/
+
+  printf("\n");
+  printf(" Clear Flashprom in process\n");
+  printf("\n");
+  clear_flashprom (p, mod_base + FLASHPROM) ;  
+  printf(" Clear Flashprom finished \n");
+  printf("\n");
+
+
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[2],"r");
+
+ 
+/* loaderfile=fopen("led_test.ldr","r");*/
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+ }
+ else
+ {
+   printf(" no loaderfile \n");
+   return 1 ;
+ }     
+
+
+ fclose(loaderfile);
+ 
+
+
+
+
+
+
+/* load SHARC */
+
+
+  printf("loading SHARC DSP\n");
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+
+  while (loadcount<count) {  
+/*    printf(" count = 0x%08x  loadcount = 0x%08x     data = 0x%08x \n", count, loadcount,tempword[loadcount]); */
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+  printf("SHARC DSP loaded\n");
+
+
+
+/* Verifier SHARC */
+/*  printf("loading SHARC DSP\n"); */
+  error = 0 ;
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+  while (loadcount<count) {  
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+
+  if (error != 0) {
+   close(p);
+   return -1 ;
+  }
+   else {
+    printf("Verifier OK \n"); 
+  }
+
+
+
+
+ 
+/* 3. Run SHARC */
+  printf("starting SHARC from Flashprom\n");
+
+
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x0300) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+ 
+
+close(p);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100sharc_read_flash.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100sharc_read_flash.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/sis3100sharc_read_flash.c	(revision 22)
@@ -0,0 +1,256 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "../dev/pci/sis1100_var.h"  
+#include "../sis3100_calls/sis3100_vme_calls.h"
+
+/* #include "flash_prom.h" */
+#include "vme_sub_flashprom.h"
+
+
+
+#define FLASHPROM  0x01000000
+#define SHARCRAM   0x01200000
+#define D48REG     0x01300000
+
+
+
+
+
+#define swap_int(x)  ((((x)>>24)&0x000000ff) |\
+                      (((x)>> 8)&0x0000ff00) |\
+                      (((x)<< 8)&0x00ff0000) |\
+                      (((x)<<24)&0xff000000))
+
+
+
+
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+u_int8_t read_data_8 ;
+u_int8_t data_8 ;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t  mod_base ;
+int return_code ;
+int error ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+
+/* int flash_busy ; */
+
+/*
+int i;
+char *dummy;
+*/
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH %s Sharc.ldr   BASE_ADDR   \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) {
+	perror("open");
+	return 1;
+}
+
+mod_base   = strtoul(argv[3],NULL,0) ;
+
+
+
+
+addr = mod_base + 0x0 ;                    /* Version */
+
+return_code =  vme_A32D32_read(p, addr, &data ) ;
+if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return 1;}
+printf("\n");
+printf("\n");
+printf(" Version register:  0x%08x\n", data );
+printf("\n");
+
+/* 1. Reset SHARC */
+  printf("resetting SHARC DSP\n");
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x03000000) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+
+/*********************************************/
+/*                                           */
+/*   Clear Flashprom                         */
+/*                                           */
+/*                                           */
+/*********************************************/
+
+  printf("\n");
+  printf(" Clear Flashprom in process\n");
+  printf("\n");
+  clear_flashprom (p, mod_base + FLASHPROM) ;  
+  printf(" Clear Flashprom finished \n");
+  printf("\n");
+
+
+
+/* open SHARC loader file */
+  loaderfile=fopen(argv[2],"r");
+
+ 
+/* loaderfile=fopen("led_test.ldr","r");*/
+ if (loaderfile>0) {
+     printf("loader file opened\n");
+
+     while (retcode>0) {
+	 retcode=fscanf(loaderfile,"0x%4x\n",&tempword[count]);
+         if (count<0x10000) {
+            count++;
+	 }
+         else {
+	     printf("load file size too big\n");
+             return -1;
+	 }
+     }
+     printf("load file length: %d\n",count);
+ }
+ else
+ {
+   printf(" no loaderfile \n");
+   return 1 ;
+ }     
+
+
+ fclose(loaderfile);
+ 
+
+
+
+
+
+
+/* load SHARC */
+
+
+  printf("loading SHARC DSP\n");
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+
+  while (loadcount<count) {  
+/*    printf(" count = 0x%08x  loadcount = 0x%08x     data = 0x%08x \n", count, loadcount,tempword[loadcount]); */
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      write_flashprom (p, mod_base + FLASHPROM, currentaddress, data_8  ) ;
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+  printf("SHARC DSP loaded\n");
+
+
+
+/* Verifier SHARC */
+/*  printf("loading SHARC DSP\n"); */
+  error = 0 ;
+  loadcount = 0 ;
+  currentaddress = mod_base + FLASHPROM ;
+  while (loadcount<count) {  
+      data_8 =  (u_int8_t)tempword[loadcount]  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      currentaddress+=4;
+      data_8 = (u_int8_t)(tempword[loadcount] >> 8)  ;
+      read_flashprom (p, currentaddress, &read_data_8  ) ;
+      if (data_8 != read_data_8) {
+         printf(" Verifier Error: loadcount = 0x%08x  wdata = 0x%02x     rdata = 0x%02x \n", loadcount, data_8, read_data_8);
+         error = error + 1 ;
+         }
+      loadcount = loadcount + 1 ;
+      currentaddress+=4;
+  }
+
+  if (error != 0) {
+   close(p);
+   return -1 ;
+  }
+   else {
+    printf("Verifier OK \n"); 
+  }
+
+
+
+
+ 
+/* 3. Run SHARC */
+  printf("starting SHARC from Flashprom\n");
+
+
+  addr = mod_base + 0x10 ;                    
+  return_code =  vme_A32D32_write(p, addr, 0x0300) ;
+  if (return_code != 0) {printf("vme_A32D32_write: return_code = 0x%08x at addr.= 0x%08x\n",return_code,addr);return -1;}
+
+ 
+
+close(p);
+
+
+return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_brd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_brd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_brd.ldr	(revision 22)
@@ -0,0 +1,1605 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0013
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0004
+0x0000
+0x0f03
+0x0002
+0x2000
+0x1103
+0x00f8
+0x0000
+0x0f02
+0x000f
+0x4004
+0x1102
+0x0001
+0x0100
+0x1004
+0x0004
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0003
+0x2000
+0x1003
+0x0100
+0x2000
+0x1103
+0x0001
+0x0000
+0x0c01
+0x0000
+0x0000
+0x0000
+0x0409
+0x4004
+0x1102
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_rd.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_rd.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_rd.ldr	(revision 22)
@@ -0,0 +1,1602 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0012
+0x0100
+0x0002
+0xeaa5
+0x2004
+0x0f06
+0x0000
+0x0000
+0x0000
+0x0002
+0x0000
+0x1106
+0x0000
+0x0000
+0x0000
+0x8000
+0x0007
+0x140a
+0x0000
+0x0008
+0x142c
+0x0000
+0x0000
+0x0f03
+0x0001
+0x2000
+0x1103
+0x0000
+0x2000
+0x0f11
+0x0000
+0x3800
+0x0f12
+0x0001
+0x0000
+0x0f21
+0x0000
+0x2000
+0x0f02
+0x0009
+0x400a
+0x1102
+0x0001
+0x0100
+0x1004
+0x0004
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0009
+0x400a
+0x1102
+0xfffc
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_wr.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_wr.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/sharc_test/vme_wr.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0x0004
+0x0000
+0x0f01
+0xffff
+0x0000
+0x0f02
+0x1234
+0x0000
+0x0f00
+0x0000
+0x0000
+0x0f04
+0x0000
+0x8280
+0x704f
+0x0001
+0x2000
+0x1100
+0x0049
+0x4002
+0x1105
+0x1551
+0x0000
+0x013e
+0x0552
+0x0004
+0x013e
+0x010b
+0x0002
+0x06be
+0xfffa
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/Makefile	(revision 22)
@@ -0,0 +1,49 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+ 
+
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+vme_read_d32: vme_read_d32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_read_blt32: vme_read_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_write_blt32: vme_write_blt32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+test: test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+ 
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/test.c	(revision 22)
@@ -0,0 +1,163 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/* 
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+
+int error_cnt ;
+*/
+
+
+
+
+static int getopts(int iargc, char* iargv[])
+{
+
+   extern char *optarg ;
+   extern int optind ;
+
+   const char* optstring="a:f:p";
+   int c, errflag = 0 ;
+   int  return_code ;
+
+   printf("iargc  = 0x%08x\n", iargc );
+   printf(" \n")  ;
+
+   return_code = -1 ;
+
+while (!errflag && ((c = getopt(iargc, iargv, optstring)) != -1)) {
+       switch (c) {
+         case 'a':
+                     printf("-a iargc = 0x%08x\n", iargc );
+                     printf("-a c     = 0x%08x\n", c );
+                     printf("-a       = 0x%08x\n", (strtoul(optarg,NULL,0)) );
+                     return_code = 0 ;
+   printf(" \n")  ;
+               break ;
+         case 'f':
+                     printf("-f iargc = 0x%08x\n", iargc );
+                     printf("-f c     = 0x%08x\n", c );
+                     printf("-f       = 0x%08x\n", (strtoul(optarg,NULL,0)) );
+                     return_code = 0 ;
+   printf(" \n")  ;
+               break ;
+        }   
+}
+return return_code ;
+
+}
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int i;
+
+int mod_base;
+int no_of_lwords ;
+int p;
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t put_lwords ;
+u_int32_t start_data ;
+
+int return_code ;
+int loop_counter ;
+
+ getopts(argc,argv) ;
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s  VME_BASE_ADDR  NO_OF_LWORDS  START_DATA [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+start_data   = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+
+/* test pattern (increment ) */
+   for (i=0; i<no_of_lwords; i++)   blt_data[i] = start_data + i ;
+
+   for (i=0; i < loop_counter; i++) {
+      return_code =   vme_A32BLT32_write(p, mod_base, blt_data, no_of_lwords, &put_lwords) ;
+   }
+
+   printf("vme_A32BLT32_write:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_write:   put_lwords  = 0x%08x\n", put_lwords ); 
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_blt32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_blt32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_blt32.c	(revision 22)
@@ -0,0 +1,125 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/*
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+*/
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int p;
+int mod_base;
+int no_of_lwords ;
+int i;
+
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t get_lwords ;
+int return_code ;
+int loop_counter ;
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s PATH  VME_BASE_ADDR  NO_OF_LWORDS [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+if ((p=open(argv[1], O_RDWR, 0))<0) return 1;
+
+/* open VME */
+/*
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+*/
+mod_base     = strtoul(argv[2],NULL,0) ;
+no_of_lwords = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>4) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+for (i=0; i < loop_counter; i++) {
+   return_code =   vme_A32BLT32_read(p, mod_base, blt_data, no_of_lwords, &get_lwords) ;
+ }
+
+
+
+   printf("vme_A32BLT32_read:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_read:   get_lwords  = 0x%08x\n", get_lwords );
+
+   for (i=0;(i)<get_lwords;i++)
+    {
+      printf("i = 0x%08x     Data = 0x%08x\n",i, blt_data[i]);
+    }
+
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_d32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_d32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_read_d32.c	(revision 22)
@@ -0,0 +1,103 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+int p;
+int mod_base;
+u_int32_t data ;
+int return_code ;
+int loop_counter ;
+
+    struct sis1100_ctrl_reg reg;
+
+
+
+if (argc<2)
+  {
+  fprintf(stderr, "usage: %s  VME_BASE_ADDR   LOOP_COUNTER \n", argv[0]);
+  return 1;
+  }
+
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment (/tmp/sis1100)\n");
+     return -1;
+   }
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+
+loop_counter  = 1 ;
+if (argc>2) loop_counter  = strtoul(argv[2],NULL,0) ;
+
+#ifdef raus
+    reg.offset=0x100;
+    reg.val=0x1000000;
+    if (ioctl(p, SIS3100_CONTROL_WRITE, &reg)<0) {
+              perror("SIS3100_CONTROL_WRITE");
+              return -1;
+          }
+#endif
+
+do {
+  return_code =  vme_A32D32_read(p, mod_base, &data ) ;
+  loop_counter = loop_counter - 1 ;
+ } while (loop_counter != 0 ) ;
+
+printf("vme_A32D32_read:   return_code = 0x%08x\n", return_code );
+printf("vme_A32D32_read:   data = 0x%08x\n", data );
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_write_blt32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_write_blt32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/examples/vme_simple_routines/vme_write_blt32.c	(revision 22)
@@ -0,0 +1,121 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/* 
+int soll_data ;
+int max_lword_cnt ;
+int loop_cnt ;
+
+int error_cnt ;
+*/
+
+
+/****************************************************************************/
+
+int main(int argc, char* argv[])
+{
+
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int i;
+
+int mod_base;
+int no_of_lwords ;
+int p;
+u_int32_t blt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t put_lwords ;
+u_int32_t start_data ;
+
+int return_code ;
+int loop_counter ;
+
+
+if (argc<4)
+  {
+  fprintf(stderr, "usage: %s  VME_BASE_ADDR  NO_OF_LWORDS  START_DATA [LOOP_COUNTER]  \n", argv[0]);
+  return 1;
+  }
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+start_data   = strtoul(argv[3],NULL,0) ;
+
+
+loop_counter  = 1 ;
+if (argc>3) loop_counter  = strtoul(argv[4],NULL,0) ;
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+
+
+/* test pattern (increment ) */
+   for (i=0; i<no_of_lwords; i++)   blt_data[i] = start_data + i ;
+
+   for (i=0; i < loop_counter; i++) {
+      return_code =   vme_A32BLT32_write(p, mod_base, blt_data, no_of_lwords, &put_lwords) ;
+   }
+
+   printf("vme_A32BLT32_write:   return_code = 0x%08x\n", return_code );
+   printf("vme_A32BLT32_write:   put_lwords  = 0x%08x\n", put_lwords ); 
+
+
+
+close(p);
+return 0;
+}
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t1.ldr	(revision 22)
@@ -0,0 +1,1590 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000e
+0x0100
+0x0002
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x0000
+0x0c01
+0x0000
+0x8100
+0x54be
+0x9220
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t2.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t2.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/fram_t2.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0008
+0x0000
+0x0f07
+0x0000
+0x0000
+0x0f06
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x2000
+0x0c00
+0x0000
+0x8100
+0x54be
+0x0122
+0x0000
+0x023e
+0x9660
+0x0002
+0x013e
+0xa067
+0x0000
+0x013e
+0xfffa
+0x00ff
+0x0720
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/mvram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/mvram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/mvram_t1.ldr	(revision 22)
@@ -0,0 +1,1578 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000a
+0x0100
+0x0002
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x0000
+0x0c01
+0x0000
+0x8100
+0x54be
+0x9220
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/vmram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/vmram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/LoaderFiles/vmram_t1.ldr	(revision 22)
@@ -0,0 +1,2583 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0159
+0x0100
+0x0002
+0x0000
+0x0000
+0x0f01
+0x0100
+0x2000
+0x0f11
+0x0001
+0x0000
+0x0f21
+0x0001
+0x0000
+0x0c01
+0x0000
+0x8080
+0x527e
+0x0000
+0x2000
+0x0f01
+0x0100
+0x2000
+0x1101
+0x0100
+0x2000
+0x1001
+0x1001
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0017
+0x0000
+0x0700
+0x1002
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0035
+0x0000
+0x0700
+0x1101
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0057
+0x0000
+0x0700
+0x1102
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0075
+0x0000
+0x0700
+0x1103
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x009c
+0x0000
+0x0700
+0x1104
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x00d0
+0x0000
+0x0700
+0x1105
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0104
+0x0000
+0x0700
+0xffea
+0x00ff
+0x073e
+0x0001
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffe7
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0000
+0x0000
+0x56fe
+0x0001
+0x2000
+0x1100
+0x0049
+0x4002
+0x1104
+0x0255
+0x0002
+0x06be
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffc6
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0000
+0x0000
+0x56fe
+0x0001
+0x2000
+0x1100
+0x0049
+0x400a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0000
+0x0000
+0x56fe
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0xfffa
+0x04ff
+0x0720
+0x0001
+0x2000
+0x1100
+0x0000
+0x0000
+0x0000
+0x0000
+0x4000
+0x1104
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffa4
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffa1
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0009
+0x4082
+0x1104
+0x0255
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff83
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff80
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0009
+0x400a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0x0009
+0x0000
+0x0700
+0x0009
+0x404a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0000
+0x4000
+0x1104
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff59
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff56
+0x00ff
+0x073e
+0x0000
+0x0008
+0x142c
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0008
+0x142c
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0005
+0x0000
+0x0710
+0x0002
+0x2000
+0x0c00
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfffa
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0004
+0x0000
+0x0730
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfff4
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfff1
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff5
+0x00ff
+0x0710
+0x0000
+0x0008
+0x140c
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff28
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff22
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff1f
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0x8000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0007
+0x0000
+0x0710
+0x0000
+0x0008
+0x142c
+0x0002
+0x2000
+0x0c00
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0000
+0x0008
+0x140c
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0004
+0x0000
+0x0730
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfff2
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xffef
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff5
+0x00ff
+0x0710
+0xffff
+0x3fff
+0xa700
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfef1
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeeb
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfee8
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0x9000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0000
+0x0008
+0x142c
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8000
+0x56fe
+0x0000
+0x0008
+0x140c
+0xfff9
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0003
+0x0000
+0x0730
+0x0000
+0x8000
+0x56fe
+0xfff4
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfff1
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff6
+0x00ff
+0x0710
+0x0000
+0xc000
+0x1000
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfebc
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeb6
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeb3
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/Makefile	(revision 22)
@@ -0,0 +1,65 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+pci_sdram_read_16mb: pci_sdram_read_16mb.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+pci_sdram_read: pci_sdram_read.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+pci_sdram_read2: pci_sdram_read2.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+pci_sdram_test_all: pci_sdram_test_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+pci_sdram_test_inc: pci_sdram_test_inc.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+check_size: check_size.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/check_size.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/check_size.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/check_size.c	(revision 22)
@@ -0,0 +1,346 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+ 
+
+#define SHARCRAM  0x01200000
+#define D48REG    0x01300000
+
+#define SDRAM_EEPROM_CTRL_STAT  0x40000400
+
+
+#define SDRAM_SCL    0x1
+#define SDRAM_SDA    0x2
+#define SDRAM_SDA_OE 0x4
+
+
+/****************************************************************************/
+
+int sdram_eeprom_stop (int p) ;
+int sdram_eeprom_start (int p) ;
+int sdram_eeprom_write (int p,  u_int32_t write_data) ;
+int sdram_eeprom_read (int p,  u_int32_t* read_data) ;
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+int i;
+int p_sharc;
+u_int32_t data ;
+u_int32_t addr ;
+
+u_int32_t no_row_addresses ;
+u_int32_t no_column_addresses ;
+u_int32_t no_module_banks ;
+
+int  no_of_Mbyte ;
+
+/* open SDRAM */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+
+
+ sdram_eeprom_start (p_sharc) ;
+ sdram_eeprom_write (p_sharc, 0xA0) ; /* device Write cmd  */
+ sdram_eeprom_write (p_sharc, 0x00) ; /* write address */
+
+ sdram_eeprom_start (p_sharc) ;
+
+ sdram_eeprom_write (p_sharc, 0xA1) ; /* device Read cmd  */
+
+ no_row_addresses     =   0 ;
+ no_column_addresses  =   0 ;
+ no_module_banks      =   0 ;
+
+ for (i=0;i<6;i++)  {
+     sdram_eeprom_read (p_sharc, &data) ;
+     if (i == 0x3) no_row_addresses = data ;
+     if (i == 0x4) no_column_addresses = data ;
+     if (i == 0x5) no_module_banks = data ;
+   }
+
+ sdram_eeprom_read_noack (p_sharc, &data) ;
+ sdram_eeprom_stop (p_sharc) ;
+
+ no_of_Mbyte = 0 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 1))   no_of_Mbyte = 64 ;
+ if ((no_row_addresses == 12) && (no_column_addresses == 9)  && (no_module_banks == 2))   no_of_Mbyte = 128 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 1))   no_of_Mbyte = 256 ;
+ if ((no_row_addresses == 13) && (no_column_addresses == 10) && (no_module_banks == 2))   no_of_Mbyte = 512 ;
+
+ printf("   no_of_Mbyte %d \n", no_of_Mbyte );      
+
+close(p_sharc);
+
+return no_of_Mbyte ;
+}
+
+
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_stop (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+/* STOP:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_start (int p)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t addr ;
+
+  addr = SDRAM_EEPROM_CTRL_STAT ;
+ /* START:     */
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE + SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SDA_OE ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_write (int p,  u_int32_t write_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = write_data ;
+
+  for (i=0;i<8;i++)
+   {
+     if ((write_data & 0x80) == 0x80) {
+          data = SDRAM_SDA_OE + SDRAM_SDA  ; 
+         }
+         else {
+          data = SDRAM_SDA_OE   ; 
+         }  
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data + SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      data = data - SDRAM_SCL ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      write_data = write_data << 1 ;
+   }
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = SDRAM_SCL ; 
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  data = 0x0 ;
+  return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+ 
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+/***************************************************************************************************************/
+/***************************************************************************************************************/
+
+int sdram_eeprom_read_noack (int p,  u_int32_t* read_data)
+{
+  int return_code ;
+  u_int32_t data ;
+  u_int32_t help_data ;
+  u_int32_t addr ;
+  int i ;
+
+  for (i=0;i<0x2000;i++)
+   {
+    addr = addr + i ;
+   }
+
+  addr = SDRAM_EEPROM_CTRL_STAT;
+
+  help_data = 0 ;
+
+  for (i=0;i<8;i++)
+   {
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+      return_code = s3100_sharc_read(p, addr, &data, 0x1) ;
+      help_data = help_data << 1 ;
+      help_data = help_data + ((data & 0x100) >> 8) ;  
+   }
+
+  *read_data =  help_data  ;
+
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA + SDRAM_SCL ; 
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = SDRAM_SDA_OE + SDRAM_SDA ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+      data = 0x0 ;
+      return_code = s3100_sharc_write(p, addr, &data, 0x1) ;
+
+  return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read.c	(revision 22)
@@ -0,0 +1,195 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000       /* 16MByte */
+
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p_sdram;
+u_int32_t no_of_mbytes ;
+u_int32_t no_of_lwords ;
+u_int32_t sdram_start_addr, addr ;
+
+int return_code ;
+int i, i_no_of_mbyte;
+
+/*
+int i;
+*/
+int loop_cnt ;
+int no_loops ;
+
+
+/* open SDRAM */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  NO_OF_MBYTES  [NO_OF_LOOPS]\n");
+  return -1;
+  }
+
+no_of_mbytes = strtoul(argv[1],NULL,0) ;
+
+no_loops = 0x1 ;
+if (argc>2)
+  {
+    no_loops = strtoul(argv[2],NULL,0) ;
+  }
+
+ 
+loop_cnt = 0x0 ;
+do
+ {
+
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_mbytes; i_no_of_mbyte++)  {
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(p_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+
+    loop_cnt = loop_cnt + 1 ;
+
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+  printf(" loop counter = 0x%08x \n ", loop_cnt);
+
+
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+#ifdef tino
+
+
+/***************************************************/
+      
+int sdram_test_inc_mbytes(int ip_sdram, u_int32_t start_value, int no_of_MBytes) 
+
+{
+
+u_int32_t sdram_start_addr, addr ;
+u_int32_t no_of_lwords ;
+
+int i, i_no_of_mbyte;
+int error_cnt ;
+int return_code ;
+
+
+    /* SDRAM write data */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (i_no_of_mbyte * 0x40000) + i + start_value; }
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_write(ip_sdram, sdram_start_addr, wblt_data, no_of_lwords) ;  /* 1 MBYTE */
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+    /* read and check */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(ip_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+       for (i=0;i<no_of_lwords;i++)  {
+         if (((i_no_of_mbyte * 0x40000) + i + start_value) != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, 
+             ((i_no_of_mbyte * 0x40000) + i + start_value), rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+         }
+     }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read2.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read2.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read2.c	(revision 22)
@@ -0,0 +1,206 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x800000       /* 32MByte */
+
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p_sdram;
+u_int32_t no_of_mbytes ;
+u_int32_t no_of_lwords ;
+u_int32_t sdram_start_addr, addr ;
+
+int return_code ;
+int i, i_no_of_mbyte;
+
+/*
+int i;
+*/
+int loop_cnt ;
+int no_loops ;
+
+
+/* open SDRAM */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  NO_OF_MBYTES  [NO_OF_LOOPS]\n");
+  return -1;
+  }
+
+no_of_mbytes = strtoul(argv[1],NULL,0) ;
+
+no_loops = 0x1 ;
+if (argc>2)
+  {
+    no_loops = strtoul(argv[2],NULL,0) ;
+  }
+
+ 
+loop_cnt = 0x0 ;
+do
+ {
+
+    no_of_lwords =  0x20000  ;  /* 0.5 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_mbytes; i_no_of_mbyte++)  {
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(p_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+       sdram_start_addr = (i_no_of_mbyte * 0x100000 + 0x80000 );                     
+       return_code = s3100_sdram_read(p_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+
+
+     }
+
+
+
+
+    loop_cnt = loop_cnt + 1 ;
+
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+  printf(" loop counter = 0x%08x \n ", loop_cnt);
+
+
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+#ifdef tino
+
+
+/***************************************************/
+      
+int sdram_test_inc_mbytes(int ip_sdram, u_int32_t start_value, int no_of_MBytes) 
+
+{
+
+u_int32_t sdram_start_addr, addr ;
+u_int32_t no_of_lwords ;
+
+int i, i_no_of_mbyte;
+int error_cnt ;
+int return_code ;
+
+
+    /* SDRAM write data */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (i_no_of_mbyte * 0x40000) + i + start_value; }
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_write(ip_sdram, sdram_start_addr, wblt_data, no_of_lwords) ;  /* 1 MBYTE */
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+    /* read and check */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(ip_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+       for (i=0;i<no_of_lwords;i++)  {
+         if (((i_no_of_mbyte * 0x40000) + i + start_value) != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, 
+             ((i_no_of_mbyte * 0x40000) + i + start_value), rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+         }
+     }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read_16mb.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read_16mb.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_read_16mb.c	(revision 22)
@@ -0,0 +1,197 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x800000       /* 32MByte */
+
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p_sdram;
+u_int32_t no_of_mbytes ;
+u_int32_t no_of_lwords ;
+u_int32_t sdram_start_addr, addr ;
+
+int return_code ;
+int i, i_no_of_mbyte;
+
+/*
+int i;
+*/
+int loop_cnt ;
+int no_loops ;
+
+
+/* open SDRAM */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  NO_OF_16MBYTES  [NO_OF_LOOPS]\n");
+  return -1;
+  }
+
+no_of_mbytes = strtoul(argv[1],NULL,0) ;
+
+no_loops = 0x1 ;
+if (argc>2)
+  {
+    no_loops = strtoul(argv[2],NULL,0) ;
+  }
+
+ 
+loop_cnt = 0x0 ;
+do
+ {
+
+    no_of_lwords =  0x400000  ;  /* 16 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_mbytes; i_no_of_mbyte++)  {
+       sdram_start_addr = (i_no_of_mbyte * 0x1000000);                     
+       return_code = s3100_sdram_read(p_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+
+    loop_cnt = loop_cnt + 1 ;
+
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+  printf(" loop counter = 0x%08x \n ", loop_cnt);
+
+
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+#ifdef tino
+
+
+/***************************************************/
+      
+int sdram_test_inc_mbytes(int ip_sdram, u_int32_t start_value, int no_of_MBytes) 
+
+{
+
+u_int32_t sdram_start_addr, addr ;
+u_int32_t no_of_lwords ;
+
+int i, i_no_of_mbyte;
+int error_cnt ;
+int return_code ;
+
+
+    /* SDRAM write data */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (i_no_of_mbyte * 0x40000) + i + start_value; }
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_write(ip_sdram, sdram_start_addr, wblt_data, no_of_lwords) ;  /* 1 MBYTE */
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+    /* read and check */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(ip_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+       for (i=0;i<no_of_lwords;i++)  {
+         if (((i_no_of_mbyte * 0x40000) + i + start_value) != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, 
+             ((i_no_of_mbyte * 0x40000) + i + start_value), rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+         }
+     }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_all.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_all.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_all.c	(revision 22)
@@ -0,0 +1,546 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+
+#define SDRAM_WRITE_MODE_SGL	 0x0      
+#define SDRAM_WRITE_MODE_BLT	 0x1      
+#define SDRAM_READ_MODE_SGL	 0x0      
+#define SDRAM_READ_MODE_BLT	 0x1      
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        /* 4MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int sdram_tests(int ip_sdram, u_int32_t sdram_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p_sdram;
+
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int sdram_wr_mode, sdram_rd_mode ;
+int loop_cnt ;
+int no_loops ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open SDRAM */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+if (argc<5)
+  {
+   printf("usage:  SDRAM_START_ADDRESS  NO_OF_LWORDS  SDRAM_WRITE_MODE  SDRAM_READ_MODE  [NO_OF_LOOPS]\n");
+   printf("usage:  SDRAM_WRITE_SGL = 0   \n");
+   printf("usage:  SDRAM_WRITE_BLT = 1   \n");
+   printf("usage:  SDRAM_READ_SGL  = 0   \n");
+   printf("usage:  SDRAM_READ_BLT  = 1   \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+sdram_wr_mode  = strtoul(argv[3],NULL,0) ;
+sdram_rd_mode  = strtoul(argv[4],NULL,0);
+
+no_loops = 0x1 ;
+if (argc>5)
+  {
+    no_loops = strtoul(argv[5],NULL,0) ;
+  }
+
+
+/******************************************************************/
+/*                                                                */
+/* Test SDRAM RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+
+loop_cnt = 0x0 ;
+do
+ {
+    return_code = sdram_tests(p_sdram, addr, no_of_lwords, sdram_wr_mode, sdram_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in sdram_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    loop_cnt = loop_cnt + 1 ;
+
+    if ((loop_cnt & 0xFF) == 0x0 )
+     {
+       printf(" loop counter = 0x%08x \n ", loop_cnt);
+     }
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+    printf("Test SDRAM_TEST from PCI    OK\n");         
+
+
+
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+int sdram_tests(int ip_sdram, u_int32_t sdram_start_addr, u_int32_t no_of_lwords, int sdram_write_mode, int sdram_read_mode ) 
+
+{
+
+u_int32_t addr, data ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define SDRAM_WRITE_MODE_SGL	 0x0      
+#define SDRAM_WRITE_MODE_BLT	 0x1      
+#define SDRAM_READ_MODE_SGL	 0x0      
+#define SDRAM_READ_MODE_BLT	 0x1      
+*/
+
+    /* SDRAM write data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_write_mode) {
+     case SDRAM_WRITE_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_write(ip_sdram, addr, &wblt_data[i], 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_WRITE_MODE_BLT: 
+		  return_code = s3100_sdram_write(ip_sdram, addr, wblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+        printf("Error in sdram_memory_test:  not defined SDRAM_WRITE_MODE \n");         
+        return -1;
+    } /* end switch */
+
+
+
+
+  /* read data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_read_mode) {
+     case SDRAM_READ_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_read(ip_sdram, addr, &data, 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          rblt_data[i] = data  ;
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_READ_MODE_BLT: 
+          return_code = s3100_sdram_read(ip_sdram, addr, rblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+           printf("Error in sdram_memory_test:  not defined SDRAM_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+
+
+    /* SDRAM write data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_write_mode) {
+     case SDRAM_WRITE_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_write(ip_sdram, addr, &wblt_data[i], 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_WRITE_MODE_BLT: 
+		  return_code = s3100_sdram_write(ip_sdram, addr, wblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+        printf("Error in sdram_memory_test:  not defined SDRAM_WRITE_MODE \n");         
+        return -1;
+    } /* end switch */
+
+
+
+
+  /* read data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_read_mode) {
+     case SDRAM_READ_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_read(ip_sdram, addr, &data, 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          rblt_data[i] = data  ;
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_READ_MODE_BLT: 
+          return_code = s3100_sdram_read(ip_sdram, addr, rblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+           printf("Error in sdram_memory_test:  not defined SDRAM_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+
+    /* SDRAM write data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_write_mode) {
+     case SDRAM_WRITE_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_write(ip_sdram, addr, &wblt_data[i], 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_WRITE_MODE_BLT: 
+		  return_code = s3100_sdram_write(ip_sdram, addr, wblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+        printf("Error in sdram_memory_test:  not defined SDRAM_WRITE_MODE \n");         
+        return -1;
+    } /* end switch */
+
+
+
+
+  /* read data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_read_mode) {
+     case SDRAM_READ_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_read(ip_sdram, addr, &data, 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          rblt_data[i] = data  ;
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_READ_MODE_BLT: 
+          return_code = s3100_sdram_read(ip_sdram, addr, rblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+           printf("Error in sdram_memory_test:  not defined SDRAM_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+
+
+
+    /* SDRAM write data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_write_mode) {
+     case SDRAM_WRITE_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_write(ip_sdram, addr, &wblt_data[i], 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_WRITE_MODE_BLT: 
+		  return_code = s3100_sdram_write(ip_sdram, addr, wblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+        printf("Error in sdram_memory_test:  not defined SDRAM_WRITE_MODE \n");         
+        return -1;
+    } /* end switch */
+
+
+
+
+  /* read data */
+    addr =  sdram_start_addr ;                     
+    switch (sdram_read_mode) {
+     case SDRAM_READ_MODE_SGL: 
+       for (i=0; i<no_of_lwords; i++)  {
+          return_code = s3100_sdram_read(ip_sdram, addr, &data, 0x1) ;
+          if (return_code != 4) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+          rblt_data[i] = data  ;
+          addr = addr + 4;
+       } /* for */
+      break;
+     case SDRAM_READ_MODE_BLT: 
+          return_code = s3100_sdram_read(ip_sdram, addr, rblt_data, no_of_lwords) ;
+          if (return_code != (no_of_lwords*4)) {
+             printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+             return -1 ;
+           }
+      break;
+     default:
+           printf("Error in sdram_memory_test:  not defined SDRAM_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_inc.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_inc.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/pci_sdram_test_inc.c	(revision 22)
@@ -0,0 +1,199 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000       /* 16MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int sdram_test_inc_mbytes(int ip_sdram, u_int32_t start_value, int no_of_MBytes) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p_sdram;
+/*
+u_int32_t addr ;
+*/
+u_int32_t no_of_mbytes ;
+
+int return_code ;
+
+/*
+int i;
+*/
+int loop_cnt ;
+int no_loops ;
+
+
+/* open SDRAM */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+if (argc<2)
+  {
+   printf("usage:  NO_OF_MBYTES  [NO_OF_LOOPS]\n");
+  return -1;
+  }
+
+no_of_mbytes = strtoul(argv[1],NULL,0) ;
+
+no_loops = 0x1 ;
+if (argc>2)
+  {
+    no_loops = strtoul(argv[2],NULL,0) ;
+  }
+
+       printf(" no_loops  = 0x%08x \n ", no_loops );
+
+
+
+
+
+loop_cnt = 0x0 ;
+do
+ {
+    return_code = sdram_test_inc_mbytes(p_sdram, loop_cnt/* start_value*/, no_of_mbytes /*no_of_MBytes*/) ;
+    if (return_code != 0)  {
+        printf("Error in sdram_test:  \n");         
+        return -1 ;
+       }
+    loop_cnt = loop_cnt + 1 ;
+
+    if ((loop_cnt & 0xFF) == 0x0 )
+     {
+       printf(" loop counter = 0x%08x \n ", loop_cnt);
+     }
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+    printf("Test SDRAM_TEST (%d MByte) from PCI     OK\n",no_of_mbytes);         
+
+
+
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+int sdram_test_inc_mbytes(int ip_sdram, u_int32_t start_value, int no_of_MBytes) 
+
+{
+
+u_int32_t sdram_start_addr, addr ;
+u_int32_t no_of_lwords ;
+
+int i, i_no_of_mbyte;
+int error_cnt ;
+int return_code ;
+
+
+    /* SDRAM write data */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (i_no_of_mbyte * 0x40000) + i + start_value; }
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_write(ip_sdram, sdram_start_addr, wblt_data, no_of_lwords) ;  /* 1 MBYTE */
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+     }
+
+    /* read and check */
+    no_of_lwords =  0x40000  ;  /* 1 MBYTE */  
+    for (i_no_of_mbyte=0; i_no_of_mbyte<no_of_MBytes; i_no_of_mbyte++)  {
+
+       sdram_start_addr = (i_no_of_mbyte * 0x100000);                     
+       return_code = s3100_sdram_read(ip_sdram, sdram_start_addr, rblt_data, no_of_lwords) ;
+       if (return_code != (no_of_lwords*4)) {
+          printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_addr );         
+          return -1 ;
+        }
+       for (i=0;i<no_of_lwords;i++)  {
+         if (((i_no_of_mbyte * 0x40000) + i + start_value) != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, 
+             ((i_no_of_mbyte * 0x40000) + i + start_value), rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+         }
+     }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_64MB
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_64MB	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_64MB	(revision 22)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+time ./pci_sdram_test_inc 64 10
+
+done
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_read_64MB
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_read_64MB	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_sdram/time_read_64MB	(revision 22)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+time ./pci_sdram_read2 64 10
+time ./pci_sdram_read 64 10
+
+done
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/Makefile	(revision 22)
@@ -0,0 +1,50 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+pci_vme_ram_test_all: pci_vme_ram_test_all.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+pci_vme_ram_test: pci_vme_ram_test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+pci_vme_ram_test_sgl_8_16_32: pci_vme_ram_test_sgl_8_16_32.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test.c	(revision 22)
@@ -0,0 +1,781 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+
+#define VME_READ_MODE_D32	 0x0      
+#define VME_READ_MODE_DMA_D32	 0x1      
+#define VME_READ_MODE_BLT32	 0x2      
+#define VME_READ_MODE_MBLT64	 0x3
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+int offset ;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int i;
+int vme_wr_mode, vme_rd_mode ;
+int loop_cnt ;
+int no_loops ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<5)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  VME_WRITE_MODE  VME_READ_MODE  [NO_OF_LOOPS]\n");
+   printf("usage:  VME_WRITE/READ_MODE = 0  D32 \n");
+   printf("usage:  VME_WRITE/READ_MODE = 1  DMA D32 \n");
+   printf("usage:  VME_WRITE/READ_MODE = 2  BLT32  \n");
+   printf("usage:  VME_WRITE/READ_MODE = 3  MBLT64 \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+vme_wr_mode  = strtoul(argv[3],NULL,0) ;
+vme_rd_mode  = strtoul(argv[4],NULL,0);
+
+no_loops = 0x1 ;
+if (argc>5)
+  {
+    no_loops = strtoul(argv[5],NULL,0) ;
+  }
+
+      printf(" no_loops  = 0x%08x \n ", no_loops );
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+
+
+
+
+loop_cnt = 0x0 ;
+do
+ {
+    return_code = vme_memory_test(p, addr, no_of_lwords, vme_wr_mode, vme_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    loop_cnt = loop_cnt + 1 ;
+
+    if ((loop_cnt & 0xFF) == 0x0 )
+     {
+       printf(" loop counter = 0x%08x \n ", loop_cnt);
+     }
+} while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+    printf("Test VME_MEMORY_TEST from PCI    OK\n");         
+
+
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+close(p);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode )
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr, data ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+*/
+
+    /* VME write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+  /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_all.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_all.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_all.c	(revision 22)
@@ -0,0 +1,751 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+
+#define VME_READ_MODE_D32	 0x0      
+#define VME_READ_MODE_DMA_D32	 0x1      
+#define VME_READ_MODE_BLT32	 0x2      
+#define VME_READ_MODE_MBLT64	 0x3
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x1000000       /* 64MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode ) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+
+int p;
+int offset ;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int i;
+int vme_wr_mode, vme_rd_mode ;
+int loop_cnt ;
+int no_loops ;
+
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  \n");
+  return -1;
+  }
+
+addr         = strtoul(argv[1],NULL,0);
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test VME RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+
+/*   printf("usage:  VME_WRITE/READ_MODE = 0  D32 \n");     */
+/*   printf("usage:  VME_WRITE/READ_MODE = 1  DMA D32 \n"); */
+/*   printf("usage:  VME_WRITE/READ_MODE = 2  BLT32  \n");  */
+/*   printf("usage:  VME_WRITE/READ_MODE = 3  MBLT64 \n");  */
+
+
+
+
+
+for (vme_rd_mode=0;vme_rd_mode<4;vme_rd_mode++)    { 
+   for (vme_wr_mode=0;vme_wr_mode<4;vme_wr_mode++)    { 
+    return_code = vme_memory_test(p, addr, no_of_lwords, vme_wr_mode, vme_rd_mode) ;
+    if (return_code != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    printf("Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = %1d  and  VME_READ_MODE = %1d OK\n",vme_wr_mode, vme_rd_mode);         
+    } /* for vme_wr_mode */
+ } /* for vme_rd_mode */
+
+
+
+close(p);
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+      
+
+
+int vme_memory_test(int ip, u_int32_t vme_start_addr, u_int32_t no_of_lwords, int vme_write_mode, int vme_read_mode )
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr, data ;
+u_int32_t get_lwords ;
+u_int32_t put_lwords ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+/* check address if 4,8, bzw 8,10 */
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+/*
+#define VME_WRITE_MODE_D32	 0x0      
+#define VME_WRITE_MODE_DMA_D32	 0x1      
+#define VME_WRITE_MODE_BLT32	 0x2      
+#define VME_WRITE_MODE_MBLT64	 0x3
+*/
+
+    /* VME write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+  /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  vme_start_addr ;                     
+    switch (vme_write_mode) {
+	case VME_WRITE_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code = vme_A32D32_write(ip, addr, wblt_data[i]) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+           addr = addr + 4;
+           } /* for */
+         break;
+	case VME_WRITE_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_BLT32: 
+           return_code =   vme_A32BLT32_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_WRITE_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_write(ip, addr, wblt_data, no_of_lwords, &put_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_write:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != put_lwords) {
+              printf("length Error vme_A32BLT32_write:   must length = 0x%08x  written length = 0x%08x\n", no_of_lwords, put_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_WRITE_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+    /* read data */
+    addr =  vme_start_addr ;                     
+    switch (vme_read_mode) {
+	case VME_READ_MODE_D32: 
+	   for (i=0; i<no_of_lwords; i++)  {
+             return_code =  vme_A32D32_read(ip, addr, &data) ;
+             if(return_code != 0) {
+                printf("return Error vme_A32D32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+                return -1 ; 
+             }
+             rblt_data[i] = data  ;
+             addr = addr + 4;
+           } /* for */
+         break;
+	case VME_READ_MODE_DMA_D32: 
+           return_code =   vme_A32DMA_D32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_BLT32: 
+           return_code =   vme_A32BLT32_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+	case VME_READ_MODE_MBLT64: 
+           return_code =   vme_A32MBLT64_read(ip, addr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+         break;
+ 	default:
+           printf("Error in vme_memory_test:  not defined VME_READ_MODE \n");         
+           return -1;
+    } /* end switch */
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+error_cnt = 0 ;
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_sgl_8_16_32.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_sgl_8_16_32.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/pci_vme/pci_vme_ram_test_sgl_8_16_32.c	(revision 22)
@@ -0,0 +1,322 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+
+
+/****************************************************************************/
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+#define MAX_NUMBER_LWORDS 0x100000  
+
+int p;
+int mod_base ;
+int no_of_lwords ;
+int return_code ;
+int error_cnt ;
+
+
+
+int i;
+u_int32_t addr, data ;
+
+u_int32_t test1_data[16] ;
+u_int32_t test2_data[16] ;
+
+u_int16_t temp_16 ;
+u_int8_t  temp_8 ;
+
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+test2_data[0]   =   0xffffffff ;
+test2_data[1]   =   0x00000000 ;
+test2_data[2]   =   0xFF00FF00 ;
+test2_data[3]   =   0x00FF00FF ;
+test2_data[4]   =   0xFFFF0000 ;
+test2_data[5]   =   0x0000FFFF ;
+test2_data[6]   =   0xF0F0F0F0 ;
+test2_data[7]   =   0x0F0F0F0F ;
+test2_data[8]   =   0x12345678 ;
+test2_data[9]   =   0x87654321 ;
+test2_data[10]  =   0x11224488 ;
+test2_data[11]  =   0x88442211 ;
+test2_data[12]  =   0xAA559966 ;
+test2_data[13]  =   0x66AA5599 ;
+test2_data[14]  =   0x9966AA55 ;
+test2_data[15]  =   0x559966AA ;
+
+
+
+if (argc<3)
+  {
+  fprintf(stderr, " \n");
+  fprintf(stderr, "usage: %s     VME_BASE_ADDR   NO_OF_LWORDS  ! \n", argv[0]);
+  fprintf(stderr, " \n");
+  return 1;
+  }
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+
+
+mod_base     = strtoul(argv[1],NULL,0) ;
+no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+if (no_of_lwords > MAX_NUMBER_LWORDS) 
+  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return 1;
+   }
+
+
+error_cnt = 0 ;
+
+
+
+/* 1. Test:   Write D32 - Read D32 Test */
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_write(p, addr, test1_data[i&0xf] ) ;
+      if(return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      addr = addr + 4;
+    }
+
+
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_read(p, addr, &data ) ;
+      if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      if (data != test1_data[i&0xf]) {
+          printf("Test1: i = 0x%08x  written = 0x%08x   read = 0x%08x\n",i,test1_data[i&0xf],data);   
+	  error_cnt = error_cnt + 1;
+        }
+      addr = addr + 4;
+    }
+
+
+
+
+/* 2. Test:   Write D32 - Read D16 Test */
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_write(p, addr, test2_data[i&0xf] ) ;
+      if(return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      addr = addr + 4;
+    }
+
+
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D16_read(p, addr, &temp_16 ) ;
+      if (return_code != 0) { printf("vme_A32D16_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (u_int32_t)temp_16 ; 
+ 
+      addr = addr + 2;
+      return_code = vme_A32D16_read(p, addr, &temp_16 ) ;
+      if (return_code != 0) { printf("vme_A32D16_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (data<<0x10)  ; 
+      data = data + (((u_int32_t)temp_16) & 0xffff) ; 
+      if (data != test2_data[i&0xf]) {
+          printf("Test2: i = 0x%08x  written = 0x%08x   read = 0x%08x\n",i,test2_data[i&0xf],data);   
+	  error_cnt = error_cnt + 1;
+        }
+      addr = addr + 2;
+    }
+
+
+
+
+
+
+/* 3. Test:   Write D32 - Read D8 Test */
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_write(p, addr, test1_data[i&0xf] ) ;
+      if(return_code != 0) { printf("vme_A32D32_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      addr = addr + 4;
+    }
+
+
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D8_read(p, addr, &temp_8 ) ;
+      if (return_code != 0) { printf("vme_A32D8_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (u_int32_t)temp_8 ; 
+ 
+      addr = addr + 1;
+      return_code = vme_A32D8_read(p, addr, &temp_8 ) ;
+      if (return_code != 0) { printf("vme_A32D8_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (data<<0x8)  ; 
+      data = data + (((u_int32_t)temp_8) & 0xff) ; 
+
+      addr = addr + 1;
+      return_code = vme_A32D8_read(p, addr, &temp_8 ) ;
+      if (return_code != 0) { printf("vme_A32D8_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (data<<0x8)  ; 
+      data = data + (((u_int32_t)temp_8) & 0xff) ; 
+
+      addr = addr + 1;
+      return_code = vme_A32D8_read(p, addr, &temp_8 ) ;
+      if (return_code != 0) { printf("vme_A32D8_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      data = (data<<0x8)  ; 
+      data = data + (((u_int32_t)temp_8) & 0xff) ; 
+ 
+
+      if (data != test1_data[i&0xf]) {
+          printf("Test3: i = 0x%08x  written = 0x%08x   read = 0x%08x\n",i,test1_data[i&0xf],data);   
+	  error_cnt = error_cnt + 1;
+        }
+      addr = addr + 1;
+    }
+
+
+
+
+
+
+/* 4. Test:   Write D16 - Read D32 Test */
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      temp_16 = (u_int16_t)(test2_data[i&0xf] >> 0x10 );
+      /*  printf("test_data = 0x%08x   temp_16_1 = 0x%04x\n",test2_data[i&0xf], temp_16); */  
+      return_code = vme_A32D16_write(p, addr, temp_16 ) ;
+      if(return_code != 0) { printf("vme_A32D16_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+
+      addr = addr + 2;
+      temp_16 = (u_int16_t)test2_data[i&0xf] ;
+      /*  printf("test_data = 0x%08x   temp_16_2 = 0x%04x\n",test2_data[i&0xf], temp_16);   */
+      return_code = vme_A32D16_write(p, addr, temp_16 ) ;
+      if(return_code != 0) { printf("vme_A32D16_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      addr = addr + 2;
+    }
+
+
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_read(p, addr, &data ) ;
+      if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      if (data != test2_data[i&0xf]) {
+          printf("Test4: i = 0x%08x  written = 0x%08x   read = 0x%08x\n",i,test2_data[i&0xf],data);   
+	  error_cnt = error_cnt + 1;
+        }
+      addr = addr + 4;
+    }
+
+
+
+
+
+/* 5. Test:   Write D8 - Read D32 Test */
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      temp_8 = (u_int8_t)(test1_data[i&0xf] >> 0x18 );
+     /*   printf("test_data = 0x%08x   temp_8_1 = 0x%02x\n",test1_data[i&0xf], temp_8);  */ 
+      return_code = vme_A32D8_write(p, addr, temp_8 ) ;
+      if(return_code != 0) { printf("vme_A32D8_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+
+      addr = addr + 1;
+      temp_8 = (u_int8_t)(test1_data[i&0xf] >> 0x10 );
+     /*   printf("test_data = 0x%08x   temp_8_2 = 0x%02x\n",test1_data[i&0xf], temp_8); */   
+      return_code = vme_A32D8_write(p, addr, temp_8) ;
+      if(return_code != 0) { printf("vme_A32D8_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+
+      addr = addr + 1;
+      temp_8 = (u_int8_t)(test1_data[i&0xf] >> 0x8 );
+    /*    printf("test_data = 0x%08x   temp_8_3 = 0x%02x\n",test1_data[i&0xf], temp_8);   */
+      return_code = vme_A32D8_write(p, addr, temp_8) ;
+      if(return_code != 0) { printf("vme_A32D8_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+
+      addr = addr + 1;
+      temp_8 = (u_int8_t) test1_data[i&0xf] ;
+   /*     printf("test_data = 0x%08x   temp_8_4 = 0x%02x\n",test1_data[i&0xf], temp_8);   */
+      return_code = vme_A32D8_write(p, addr, temp_8) ;
+      if(return_code != 0) { printf("vme_A32D8_write: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      addr = addr + 1;
+
+    }
+
+
+   addr=mod_base ;
+   for (i=0; i<no_of_lwords; i++)  {
+      return_code = vme_A32D32_read(p, addr, &data ) ;
+      if (return_code != 0) { printf("vme_A32D32_read: return_code = 0x%08x  at addr.= 0x%08x\n",return_code,addr); return 1;}
+      if (data != test1_data[i&0xf]) {
+          printf("Test5: i = 0x%08x  written = 0x%08x   read = 0x%08x\n",i,test1_data[i&0xf],data);   
+	  error_cnt = error_cnt + 1;
+        }
+      addr = addr + 4;
+    }
+
+
+close(p);
+
+    if (error_cnt != 0)  {
+        printf("Error in vme_memory_test:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+
+return 0;
+}
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t1.ldr	(revision 22)
@@ -0,0 +1,1590 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000e
+0x0100
+0x0002
+0x0000
+0x0010
+0x142c
+0x0000
+0x0010
+0x140c
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0000
+0x0008
+0x142c
+0x0000
+0x0008
+0x140c
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x0000
+0x0c01
+0x0000
+0x8100
+0x54be
+0x9220
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t2.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t2.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/fram_t2.ldr	(revision 22)
@@ -0,0 +1,1593 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000f
+0x0100
+0x0002
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0008
+0x0000
+0x0f07
+0x0000
+0x0000
+0x0f06
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x2000
+0x0c00
+0x0000
+0x8100
+0x54be
+0x0122
+0x0000
+0x023e
+0x9660
+0x0002
+0x013e
+0xa067
+0x0000
+0x013e
+0xfffa
+0x00ff
+0x0720
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/mvram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/mvram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/mvram_t1.ldr	(revision 22)
@@ -0,0 +1,1578 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x003f
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x9000
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x000a
+0x0100
+0x0002
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0001
+0x0000
+0x0f22
+0x0100
+0x2000
+0x0f12
+0x0001
+0x0000
+0x0f02
+0x0002
+0x0000
+0x0c01
+0x0000
+0x8100
+0x54be
+0x9220
+0x0002
+0x013e
+0x0000
+0x0000
+0x0000
+0xffff
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/vmram_t1.ldr
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/vmram_t1.ldr	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/LoaderFiles/vmram_t1.ldr	(revision 22)
@@ -0,0 +1,2583 @@
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x005c
+0x0000
+0x073e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x001c
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001c
+0x0000
+0x1106
+0x001d
+0x0000
+0x1002
+0x2666
+0x0400
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x001d
+0x0000
+0x1106
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0b3e
+0x9004
+0x0000
+0x0f06
+0x0000
+0x0000
+0x1106
+0xeaa5
+0x2004
+0x0f06
+0x0002
+0x0000
+0x1106
+0x0000
+0x0078
+0x140c
+0x8000
+0x0007
+0x140a
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f3d
+0x0001
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0x0001
+0x0000
+0x0f26
+0x0001
+0x0000
+0x0f06
+0x0100
+0x0040
+0x0f1d
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1020
+0x0002
+0x013e
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x1000
+0x0002
+0x013e
+0x0060
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001c
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002f
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0038
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0041
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0010
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x000e
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0013
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x001a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0021
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x002a
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x0033
+0x0000
+0x0700
+0xa000
+0x0002
+0x013e
+0x003c
+0x0000
+0x0700
+0x0043
+0x0000
+0x073e
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0x8000
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffd2
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8800
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x0000
+0x0fdc
+0x0000
+0x0000
+0x0fdd
+0x2000
+0x8c00
+0x703f
+0x0003
+0x0000
+0x0d02
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffc0
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffb5
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0x8180
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xffaa
+0x00ff
+0x073e
+0x0000
+0x8800
+0x703f
+0x0007
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x8100
+0x7dcf
+0x1220
+0x0002
+0x013e
+0x0000
+0x8180
+0x7ddf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51be
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff9f
+0x00ff
+0x073e
+0x0000
+0x8c00
+0x703f
+0x0004
+0x0000
+0x0d02
+0x0000
+0x6d80
+0x5bbf
+0x0000
+0x0000
+0x0000
+0x0000
+0xed80
+0x51bf
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0xff97
+0x00ff
+0x073e
+0x0010
+0x0000
+0x140a
+0x0000
+0x0000
+0x0500
+0x0010
+0x0000
+0x142a
+0x0018
+0x0200
+0x0c00
+0x0000
+0x0000
+0x0f25
+0x0001
+0x0000
+0x0f26
+0xffff
+0xffff
+0x0f27
+0x0000
+0x0000
+0x0f2d
+0x0001
+0x0000
+0x0f2e
+0xffff
+0xffff
+0x0f2f
+0x0000
+0x0000
+0x0f30
+0x0000
+0x0000
+0x0f31
+0x0000
+0x0000
+0x0f32
+0x0000
+0x0000
+0x0f33
+0x0000
+0x0000
+0x0f34
+0x0000
+0x0000
+0x0f35
+0x0000
+0x0000
+0x0f36
+0x0000
+0x0000
+0x0f37
+0x0000
+0x0000
+0x0f38
+0x0000
+0x0000
+0x0f39
+0x0000
+0x0000
+0x0f3a
+0x0000
+0x0000
+0x0f3b
+0x0000
+0x0000
+0x0f3c
+0x0000
+0x0000
+0x0f3d
+0x0000
+0x0000
+0x0f3e
+0x0000
+0x0000
+0x0f3f
+0x0078
+0x0000
+0x140b
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0078
+0x0000
+0x142b
+0x0000
+0x0000
+0x0000
+0x7fff
+0x0002
+0x0f17
+0x7fff
+0x0002
+0x0f16
+0x2000
+0x0000
+0x0f37
+0x2000
+0x0000
+0x0f36
+0x6000
+0x0002
+0x0f47
+0x6000
+0x0002
+0x0f46
+0x0100
+0x0002
+0x063e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x000e
+0x0000
+0x0000
+0x0159
+0x0100
+0x0002
+0x0000
+0x0000
+0x0f01
+0x0100
+0x2000
+0x0f11
+0x0001
+0x0000
+0x0f21
+0x0001
+0x0000
+0x0c01
+0x0000
+0x8080
+0x527e
+0x0000
+0x2000
+0x0f01
+0x0100
+0x2000
+0x1101
+0x0100
+0x2000
+0x1001
+0x1001
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0017
+0x0000
+0x0700
+0x1002
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0035
+0x0000
+0x0700
+0x1101
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0057
+0x0000
+0x0700
+0x1102
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0075
+0x0000
+0x0700
+0x1103
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x009c
+0x0000
+0x0700
+0x1104
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x00d0
+0x0000
+0x0700
+0x1105
+0x0000
+0x0f02
+0xa012
+0x0000
+0x013e
+0x0104
+0x0000
+0x0700
+0xffea
+0x00ff
+0x073e
+0x0001
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffe7
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0000
+0x0000
+0x56fe
+0x0001
+0x2000
+0x1100
+0x0049
+0x4002
+0x1104
+0x0255
+0x0002
+0x06be
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffc9
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffc6
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0000
+0x0000
+0x56fe
+0x0001
+0x2000
+0x1100
+0x0049
+0x400a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0000
+0x0000
+0x56fe
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0xfffa
+0x04ff
+0x0720
+0x0001
+0x2000
+0x1100
+0x0000
+0x0000
+0x0000
+0x0000
+0x4000
+0x1104
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffa4
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xffa1
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0009
+0x4082
+0x1104
+0x0255
+0x0002
+0x06be
+0x0008
+0x2000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff83
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff80
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0009
+0x400a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0x0009
+0x0000
+0x0700
+0x0009
+0x404a
+0x1104
+0x1446
+0x0000
+0x013e
+0x9880
+0x0002
+0x013e
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0255
+0x0002
+0x06be
+0xa085
+0x0000
+0x013e
+0xfff9
+0x00ff
+0x0720
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0000
+0x4000
+0x1104
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff59
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff56
+0x00ff
+0x073e
+0x0000
+0x0008
+0x142c
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0xc000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0008
+0x142c
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0005
+0x0000
+0x0710
+0x0002
+0x2000
+0x0c00
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfffa
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0004
+0x0000
+0x0730
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfff4
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfff1
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff5
+0x00ff
+0x0710
+0x0000
+0x0008
+0x140c
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff28
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff22
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xff1f
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0x8000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0007
+0x0000
+0x0710
+0x0000
+0x0008
+0x142c
+0x0002
+0x2000
+0x0c00
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0x0000
+0x0008
+0x140c
+0xfff8
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0004
+0x0000
+0x0730
+0x0000
+0x4000
+0x1000
+0x0000
+0x8000
+0x56fe
+0xfff2
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xffef
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff5
+0x00ff
+0x0710
+0xffff
+0x3fff
+0xa700
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfef1
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeeb
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfee8
+0x00ff
+0x073e
+0x0000
+0x4000
+0x0f01
+0x1221
+0x0004
+0x013e
+0x0100
+0x2000
+0x1102
+0x0002
+0x0000
+0x0f01
+0x0000
+0x2000
+0x1101
+0x0004
+0x0000
+0x0f06
+0x0101
+0x2000
+0x1003
+0x0102
+0x2000
+0x1004
+0x0103
+0x2000
+0x1005
+0x0000
+0x9000
+0x0f07
+0x1337
+0x0000
+0x013e
+0x0000
+0x8980
+0x703f
+0x0001
+0x0000
+0x0f23
+0x0000
+0x0000
+0x0f08
+0x0002
+0x2000
+0x1105
+0x000f
+0x4004
+0x1104
+0x0000
+0x0100
+0x100f
+0x060f
+0x0033
+0x023e
+0x0006
+0x0000
+0x0710
+0x0000
+0x0008
+0x142c
+0x0001
+0x2000
+0x0c00
+0x0000
+0x8000
+0x56fe
+0x0000
+0x0008
+0x140c
+0xfff9
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0x0003
+0x0000
+0x0730
+0x0000
+0x8000
+0x56fe
+0xfff4
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfff1
+0x00ff
+0x0730
+0x0000
+0x0100
+0x100f
+0x040f
+0x0033
+0x023e
+0xfff6
+0x00ff
+0x0710
+0x0000
+0xc000
+0x1000
+0x0000
+0x0100
+0x1001
+0x0101
+0x0033
+0x023e
+0x0006
+0x0400
+0x0710
+0x0106
+0x2000
+0x1101
+0x0000
+0x0000
+0x0000
+0x0012
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfebc
+0x00ff
+0x073e
+0x0003
+0x2000
+0x1001
+0xa051
+0x0000
+0x013e
+0x0004
+0x0000
+0x0700
+0x0013
+0x8eee
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeb6
+0x00ff
+0x073e
+0x0000
+0x8000
+0x0f02
+0x0100
+0x2000
+0x1102
+0xfeb3
+0x00ff
+0x073e
+0x0000
+0x0100
+0x100f
+0x000f
+0x0033
+0x023e
+0xfffe
+0x00ff
+0x0730
+0x0000
+0x0000
+0x0a3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x2000
+0x2d80
+0x3973
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0b3e
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
+0x0000
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/Makefile
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/Makefile	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/Makefile	(revision 22)
@@ -0,0 +1,55 @@
+ CC           := gcc
+WFLAGS       := -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations-Wimplicit -Wreturn-type -Wunused \
+                -Wcomment -Wformat
+#                -Wuninitialized -Werror
+
+DRIVER_PATH  := ../../V1.0
+CPPFLAGS     := -I$(DRIVER_PATH)/linux-gnu -I$(DRIVER_PATH)/sis3100_calls
+CFLAGS       := -g -ansi $(WFLAGS) -L$(DRIVER_PATH)/sis3100_calls
+
+
+
+srcdir       := .
+cfiles       := $(wildcard $(srcdir)/*.c)
+EXEC         := $(cfiles:.c=)
+
+.PHONY: all
+all: $(EXEC)
+
+
+
+fpga_ram_test: fpga_ram_test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+vme_ram_test: vme_ram_test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+vme_ram_copy_mode_test: vme_ram_copy_mode_test.c $(DRIVER_PATH)/sis3100_calls/lib_sis3100.a
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -l_sis3100
+
+
+clean:
+	rm -f *.o core $(EXEC)
+
+depend:
+	cp Makefile Makefile.bak
+	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
+	echo '# DO NOT DELETE THIS LINE' >> Makefile
+	echo ' ' >> Makefile
+	for i in $(cfiles) ; do \
+	  echo checking $$i ; \
+	  $(CC) -M $(CPPFLAGS) $(srcdir)/$$i >> Makefile ; \
+	done
+# DO NOT DELETE THIS LINE
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/fpga_ram_test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/fpga_ram_test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/fpga_ram_test.c	(revision 22)
@@ -0,0 +1,477 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+#include "sharc_utils.h"
+
+
+#define FPGA_DUALPORT_RAM_ADDR      0x40000000          /* size = 256 Lwords */ 
+#define FPGA_DUALPORT_RAM_LWSIZE    0x100               /* size = 256 Lwords */ 
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000       /* 16MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+int memory_test_sharc(int ip_sharc, u_int32_t start_addr, u_int32_t no_of_lwords) ;
+
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+char* dsploader_path[60];
+
+
+int p;
+int p_sharc;
+int offset ;
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int return_code ;
+
+int i;
+int error_cnt ;
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+/* open SHARC */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sharc open");
+     return -1;
+   }
+
+
+
+  printf("LED an \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00000080) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* Test FPGA internal Dual Ported RAM from PCI                    */
+/*                                                                */
+/******************************************************************/
+#ifdef xxx
+    addr          = FPGA_DUALPORT_RAM_ADDR ;
+    no_of_lwords  = FPGA_DUALPORT_RAM_LWSIZE  ;   
+    return_code = memory_test_sharc(p_sharc, addr, no_of_lwords) ;
+    if (return_code != 0)  {
+        printf("Error in memory_test_sharc:  start_addr = 0x%08x   no_of_lwords = 0x%08x\n", addr, no_of_lwords );         
+        return -1 ;
+       }
+    printf("Test FPGA_DUALPORT_RAM from PCI    OK\n");         
+
+
+#endif
+
+
+/**************************************************************************/
+/*                                                                        */
+/* Test FPGA internal Dual Ported RAM                                     */
+/*  - write from SHARC an increment pattern                               */
+/*  - read from PCI and check increment pattern                           */
+/*                                                                        */
+/**************************************************************************/
+
+
+/* load and start SHARC */
+  /* open SHARC loader file */
+  /*   *dsploader_path =  argv[3] */ ; 
+   *dsploader_path = "LoaderFiles/fram_t1.ldr" ;  
+
+   if ((load_dsp(p,p_sharc, *dsploader_path)) != 0) {
+     printf("error on loading DSP code\n");
+     return -1;
+   }
+   usleep (1000) ; /* wait for SHARC booting */
+   usleep (1000) ; /* wait for SHARC booting */
+
+    /* read data */
+    addr          = FPGA_DUALPORT_RAM_ADDR ;
+    no_of_lwords  = FPGA_DUALPORT_RAM_LWSIZE  ;   
+    return_code = s3100_sharc_read(p_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     /* prepare data */
+     for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i + 1 ;  } /* this data will be written from SHARC */
+
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+    if (error_cnt != 0)  {
+        printf("Error Test FPGA_DUALPORT_RAM write increment from SHARC and read from PCI \n");         
+        return -1 ;
+       }
+     else  {
+        printf("Test FPGA_DUALPORT_RAM write increment from SHARC and read from PCI    OK\n");         
+       } 
+
+
+
+
+/**************************************************************************/
+/*                                                                        */
+/* Test FPGA internal Dual Ported RAM                                     */
+/*  - write from SHARC a bit-shift pattern                                */
+/*  - read from PCI and check bit-shift pattern                           */
+/*                                                                        */
+/**************************************************************************/
+
+#ifdef xxx
+/* load and start SHARC */
+  /* open SHARC loader file */
+  /*   *dsploader_path =  argv[3] */ ; 
+   *dsploader_path = "LoaderFiles/fram_t2.ldr" ;  
+
+   if ((load_dsp(p,p_sharc, *dsploader_path)) != 0) {
+     printf("error on loading DSP code\n");
+     return -1;
+   }
+   usleep (1000) ; /* wait for SHARC booting */
+
+    /* read data */
+    addr          = FPGA_DUALPORT_RAM_ADDR ;
+    no_of_lwords  = FPGA_DUALPORT_RAM_LWSIZE  ;   
+    return_code = s3100_sharc_read(p_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     /* prepare data */
+     for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }/* this data will be written from SHARC */
+
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+    if (error_cnt != 0)  {
+        printf("Error Test FPGA_DUALPORT_RAM write shift from SHARC and read from PCI \n");         
+        return -1 ;
+       }
+     else  {
+        printf("Test FPGA_DUALPORT_RAM write shift from SHARC and read from PCI    OK\n");         
+       } 
+
+
+
+
+
+#endif
+
+
+
+  printf("LED aus \n");
+  offset = 0x00000100;
+  return_code = s3100_control_write(p, offset, 0x00800000) ; 
+  if (return_code != 0) printf("s3100_control_write:   return_code = 0x%08x\n", return_code );         
+
+close(p);
+close(p_sharc);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+/***************************************************/
+
+
+int memory_test_sharc(int ip_sharc, u_int32_t start_addr, u_int32_t no_of_lwords)
+{
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+*/
+u_int32_t addr ;
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+    /* write data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    /* read data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+    /* write data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    /* read data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+    /* write data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    /* read data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+    /* write data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    /* read data */
+    addr =  start_addr ;                     
+    return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_copy_mode_test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_copy_mode_test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_copy_mode_test.c	(revision 22)
@@ -0,0 +1,1001 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+#include "sharc_utils.h"
+
+
+#define FPGA_DUALPORT_RAM_ADDR      0x40000000          /* size = 256 Lwords */ 
+#define FPGA_DUALPORT_RAM_LWSIZE    0x100               /* size = 256 Lwords */ 
+
+
+#define DPM_PARAMETER_CMD		FPGA_DUALPORT_RAM_ADDR		 /* use for ACK ; 0x40000000 for BUSY; 0x8eee eeee for Error */
+#define DPM_PARAMETER1			FPGA_DUALPORT_RAM_ADDR + 0x4 	 /* use as SDRAM address pointer                             */
+#define DPM_PARAMETER2			FPGA_DUALPORT_RAM_ADDR + 0x8 	 /* use as VME address pointer                               */
+#define DPM_PARAMETER3			FPGA_DUALPORT_RAM_ADDR + 0xC 	 /* use as length (number of lwords)                         */
+#define DPM_PARAMETER4			FPGA_DUALPORT_RAM_ADDR + 0x10 	 /* use as max. number of loops                              */
+#define DPM_PARAMETER5			FPGA_DUALPORT_RAM_ADDR + 0x14 	 /* use as loop_counter                                      */
+
+#define DPM_PARAMETER6			FPGA_DUALPORT_RAM_ADDR + 0x18 	 /* use in case of error for VME Status                      */
+#define DPM_PARAMETER7			FPGA_DUALPORT_RAM_ADDR + 0x1C 	 /* use in case of error for written word information        */
+#define DPM_PARAMETER8			FPGA_DUALPORT_RAM_ADDR + 0x20	 /* use in case of error for read word information           */
+#define DPM_PARAMETER9			FPGA_DUALPORT_RAM_ADDR + 0x24	 /* use in case of error for address information             */
+
+
+
+#define VME_CMD_WRITE1 			0x1001 		   /* read from SDRAM and write it to VME */
+#define VME_CMD_WRITE2			0x1002 		   /* read from SDRAM and write it to VME */
+#define VME_CMD_READ1_D32		0x1101 		   /* read (D32) from VME and write it to SDRAM */
+#define VME_CMD_READ2_D32		0x1102 		   /* read (D32) from VME and write it to SDRAM */
+#define VME_CMD_READ1_BLT32		0x1103 		   /* read (BLT32) from VME and write it to SDRAM */
+#define VME_CMD_READ2_BLT32		0x1104		   /* read (BLT32) from VME and write it to SDRAM */
+#define VME_CMD_READ2_BLT32_F2S		0x1105		   /* read (BLT32) from VME and copy it to SDRAM */
+#define VME_CMD_WR_RD_TEST		0x1200
+
+
+#define VME_CMD_READY			0x20000000
+#define VME_CMD_BUSY			0x40000000
+#define VME_CMD_FINISHED		0x80000000
+#define VME_CMD_WRONG_PARAMETER		0x8eee0001
+#define VME_CMD_VME_STAT_ERROR		0x8eee0012
+#define VME_CMD_VME_WORDCOUNT_ERROR	0x8eee0013
+#define VME_CMD_ERROR			0x8eeeeeee
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x01      
+#define MAX_NUMBER_LWORDS 0x400000       /* 16MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+int vme_ram_test_with_sharc(int ip, int ip_sharc,int ip_sdram, u_int32_t vme_start_addr, u_int32_t no_of_lwords,
+                            int sharc_wr_cmd, int sharc_rd_cmd) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+char* dsploader_path[60];
+
+
+int p;
+int p_sharc;
+int p_sdram;
+
+u_int32_t vme_addr ;
+u_int32_t vme_no_of_lwords ;
+
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int loop_cnt ;
+int no_loops ;
+int return_code ;
+
+/*
+int offset ;
+u_int32_t data ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int error_cnt ;
+
+
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+*/
+int i;
+
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  [NO_OF_LOOPS] \n");
+  return -1;
+  }
+
+vme_addr         = strtoul(argv[1],NULL,0);
+vme_no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+no_loops = 0x1 ;
+if (argc>3)
+  {
+    no_loops = strtoul(argv[3],NULL,0) ;
+  }
+      printf(" no_loops  = 0x%08x \n ", no_loops );
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+/* open SHARC */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sharc open");
+     return -1;
+   }
+
+/* open SHARC */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+
+
+
+
+/**************************************************************************/
+/*                                                                        */
+/* Test FPGA internal Dual Ported RAM                                     */
+/*  - write from SHARC an increment pattern                               */
+/*  - read from PCI and check increment pattern                           */
+/*                                                                        */
+/**************************************************************************/
+
+/* initialize internal FPGA Dual Ported Ram */
+    for (i=0;i<FPGA_DUALPORT_RAM_LWSIZE;i++)    { wblt_data[i] = 0 ;  }
+
+    /* write data */
+    no_of_lwords = FPGA_DUALPORT_RAM_LWSIZE ;
+    addr =  FPGA_DUALPORT_RAM_ADDR ;                     
+    return_code = s3100_sharc_write(p_sharc, addr, wblt_data, no_of_lwords) ;
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+
+/* load and start SHARC */
+  /* open SHARC loader file */
+  /*   *dsploader_path =  argv[3] */ ; 
+   *dsploader_path = "LoaderFiles/vmram_t1.ldr" ;  
+
+   if ((load_dsp(p,p_sharc, *dsploader_path)) != 0) {
+     printf("error on loading DSP code\n");
+     return -1;
+   }
+
+
+/* wait for ready in DPM_PARAMETER_CMD */
+
+
+    /* read data */
+    addr =  DPM_PARAMETER_CMD ;                     
+    no_of_lwords = 0x1 ;
+    do {
+        return_code = s3100_sharc_read(p_sharc, addr, rblt_data, no_of_lwords) ;
+        if (return_code != (no_of_lwords*4)) {
+           printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+           return -1 ;
+        }
+     } while ( rblt_data[0] != VME_CMD_READY ) ;
+
+      printf("s3100_sharc_read after loading:  SHARC Reply = 0x%08x \n",rblt_data[0]  );         
+
+   loop_cnt = 0x0 ;
+    do {
+
+#ifdef all
+
+
+     /* Test   VME_CMD_WRITE2, VME_CMD_READ2_BLT32  */
+        return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ2_BLT32) ;
+        if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ2_BLT32   \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ2_BLT32) from PCI    OK\n");         
+
+#endif
+
+    /* Test   VME_CMD_WRITE2, VME_CMD_READ2_BLT32_F2S  */
+        return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ2_BLT32_F2S) ;
+        if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ2_BLT32_F2S   \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ2_BLT32_F2S) from PCI    OK\n");         
+
+      loop_cnt = loop_cnt + 1 ;
+
+      if ((loop_cnt & 0xFF) == 0x0 )
+      {
+        printf(" loop counter = 0x%08x \n ", loop_cnt);
+       }
+    } while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+    printf("Test VME_MEMORY_TEST from SHARC    OK\n");         
+
+ 
+
+
+
+
+
+close(p);
+close(p_sharc);
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*********************************************************/
+
+/* the sharc program vmram_t1.ldr has to be loaded !!!!  */
+
+int vme_ram_test_with_sharc(int ip, int ip_sharc,int ip_sdram, u_int32_t vme_start_addr, u_int32_t no_of_lwords,
+                            int sharc_wr_cmd, int sharc_rd_cmd)
+{
+
+
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+int get_lwords ;
+u_int32_t iaddr ;
+
+*/
+
+u_int32_t wblt_cmd_data[0x10] ;
+
+
+#define PCI_SDRAM_WR_ADDR 0x0000000  /* first 16MByte */      
+#define PCI_SDRAM_RD_ADDR 0x1000000  /* second 16MByte */      
+
+#define SHARC_SDRAM_WR_ADDR 0x0000000  /* first 16MByte */      
+#define SHARC_SDRAM_RD_ADDR 0x400000   /* second 16MByte */      
+
+
+u_int32_t sdram_start_rd_addr ;
+u_int32_t sdram_start_wr_addr ;
+
+
+u_int32_t addr ;
+
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+
+
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read1:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+/*    if ((rblt_data[0] & 0x80000000) != 0x80000000) { */
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+#ifdef vme_check
+
+    iaddr =  vme_start_addr ;                     
+           return_code =   vme_A32BLT32_read(ip, iaddr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, iaddr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+
+ 
+	   for (i=0x50; i<0x55; i++)  {
+                 printf("VME values before SHARC Read     i = %d  data = 0x%08x\n", i, rblt_data[i] );         
+
+           } /* for */
+
+#endif
+    
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+       /*         printf("SHARC Command Reply = 0x%08x \n",rblt_data[0] );  */       
+
+    } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read2:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+ 
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+#ifdef vme_check
+    iaddr =  vme_start_addr ;                     
+           return_code =   vme_A32BLT32_read(ip, iaddr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, iaddr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+
+ 
+	   for (i=0x50; i<0x55; i++)  {
+                 printf("VME values after SHARC Read     i = %d  data = 0x%08x\n", i, rblt_data[i] );         
+
+           } /* for */
+
+#endif
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read3:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+ 
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_test.c
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_test.c	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vme_ram_test.c	(revision 22)
@@ -0,0 +1,1023 @@
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include "dev/pci/sis1100_var.h"
+#include "sis3100_vme_calls.h"
+#include "sharc_utils.h"
+
+
+#define FPGA_DUALPORT_RAM_ADDR      0x40000000          /* size = 256 Lwords */ 
+#define FPGA_DUALPORT_RAM_LWSIZE    0x100               /* size = 256 Lwords */ 
+
+
+#define DPM_PARAMETER_CMD		FPGA_DUALPORT_RAM_ADDR		 /* use for ACK ; 0x40000000 for BUSY; 0x8eee eeee for Error */
+#define DPM_PARAMETER1			FPGA_DUALPORT_RAM_ADDR + 0x4 	 /* use as SDRAM address pointer                             */
+#define DPM_PARAMETER2			FPGA_DUALPORT_RAM_ADDR + 0x8 	 /* use as VME address pointer                               */
+#define DPM_PARAMETER3			FPGA_DUALPORT_RAM_ADDR + 0xC 	 /* use as length (number of lwords)                         */
+#define DPM_PARAMETER4			FPGA_DUALPORT_RAM_ADDR + 0x10 	 /* use as max. number of loops                              */
+#define DPM_PARAMETER5			FPGA_DUALPORT_RAM_ADDR + 0x14 	 /* use as loop_counter                                      */
+
+#define DPM_PARAMETER6			FPGA_DUALPORT_RAM_ADDR + 0x18 	 /* use in case of error for VME Status                      */
+#define DPM_PARAMETER7			FPGA_DUALPORT_RAM_ADDR + 0x1C 	 /* use in case of error for written word information        */
+#define DPM_PARAMETER8			FPGA_DUALPORT_RAM_ADDR + 0x20	 /* use in case of error for read word information           */
+#define DPM_PARAMETER9			FPGA_DUALPORT_RAM_ADDR + 0x24	 /* use in case of error for address information             */
+
+
+
+#define VME_CMD_WRITE1 			0x1001 		   /* read from SDRAM and write it to VME */
+#define VME_CMD_WRITE2			0x1002 		   /* read from SDRAM and write it to VME */
+#define VME_CMD_READ1_D32		0x1101 		   /* read (D32) from VME and write it to SDRAM */
+#define VME_CMD_READ2_D32		0x1102 		   /* read (D32) from VME and write it to SDRAM */
+#define VME_CMD_READ1_BLT32		0x1103 		   /* read (BLT32) from VME and write it to SDRAM */
+#define VME_CMD_READ2_BLT32		0x1104		   /* read (BLT32) from VME and write it to SDRAM */
+#define VME_CMD_WR_RD_TEST		0x1200
+
+
+#define VME_CMD_READY			0x20000000
+#define VME_CMD_BUSY			0x40000000
+#define VME_CMD_FINISHED		0x80000000
+#define VME_CMD_WRONG_PARAMETER		0x8eee0001
+#define VME_CMD_VME_STAT_ERROR		0x8eee0012
+#define VME_CMD_VME_WORDCOUNT_ERROR	0x8eee0013
+#define VME_CMD_ERROR			0x8eeeeeee
+
+
+
+/*===========================================================================*/
+/* Globals					  			     */
+/*===========================================================================*/
+
+#define MAX_NUMBER_OF_PRINTS 0x01      
+#define MAX_NUMBER_LWORDS 0x400000       /* 16MByte */
+
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+
+u_int32_t test1_data[16] ;
+
+
+
+
+/*===========================================================================*/
+/* Prototypes					  			     */
+/*===========================================================================*/
+
+
+int vme_ram_test_with_sharc(int ip, int ip_sharc,int ip_sdram, u_int32_t vme_start_addr, u_int32_t no_of_lwords,
+                            int sharc_wr_cmd, int sharc_rd_cmd) ;
+
+/****************************************************************************/
+int main(int argc, char* argv[])
+{
+
+char* dsploader_path[60];
+
+
+int p;
+int p_sharc;
+int p_sdram;
+
+u_int32_t vme_addr ;
+u_int32_t vme_no_of_lwords ;
+
+u_int32_t addr ;
+u_int32_t no_of_lwords ;
+
+int loop_cnt ;
+int no_loops ;
+int return_code ;
+
+/*
+int offset ;
+u_int32_t data ;
+
+FILE *loaderfile;
+
+unsigned int tempword[0x10000];
+int retcode=1;
+
+int error_cnt ;
+
+
+
+int count=0 ;
+int loadcount=0; 
+int currentaddress ;
+*/
+int i;
+
+
+if (argc<3)
+  {
+   printf("usage:  VME_START_ADDRESS  NO_OF_LWORDS  [NO_OF_LOOPS] \n");
+  return -1;
+  }
+
+vme_addr         = strtoul(argv[1],NULL,0);
+vme_no_of_lwords = strtoul(argv[2],NULL,0) ;
+
+
+no_loops = 0x1 ;
+if (argc>3)
+  {
+    no_loops = strtoul(argv[3],NULL,0) ;
+  }
+      printf(" no_loops  = 0x%08x \n ", no_loops );
+
+
+test1_data[0]   =   0x12345678 ;
+test1_data[1]   =   0x87654321 ;
+test1_data[2]   =   0x11224488 ;
+test1_data[3]   =   0x88442211 ;
+test1_data[4]   =   0xAA559966 ;
+test1_data[5]   =   0x66AA5599 ;
+test1_data[6]   =   0x9966AA55 ;
+test1_data[7]   =   0x559966AA ;
+test1_data[8]   =   0xffffffff ;
+test1_data[9]   =   0x00000000 ;
+test1_data[10]  =   0xFF00FF00 ;
+test1_data[11]  =   0x00FF00FF ;
+test1_data[12]  =   0xFFFF0000 ;
+test1_data[13]  =   0x0000FFFF ;
+test1_data[14]  =   0xF0F0F0F0 ;
+test1_data[15]  =   0x0F0F0F0F ;
+
+
+/* open VME */
+   if ((p=open("/tmp/sis1100", O_RDWR, 0))<0) {
+     printf("error on opening VME environment\n");
+     return -1;
+   }
+/* open SHARC */
+   if ((p_sharc=open("/tmp/sis3100sharc", O_RDWR, 0))<0) {
+     printf("error on sharc open");
+     return -1;
+   }
+
+/* open SHARC */
+   if ((p_sdram=open("/tmp/sis3100sdram", O_RDWR, 0))<0) {
+     printf("error on sdram open");
+     return -1;
+   }
+
+
+
+
+
+/**************************************************************************/
+/*                                                                        */
+/* Test FPGA internal Dual Ported RAM                                     */
+/*  - write from SHARC an increment pattern                               */
+/*  - read from PCI and check increment pattern                           */
+/*                                                                        */
+/**************************************************************************/
+
+/* initialize internal FPGA Dual Ported Ram */
+    for (i=0;i<FPGA_DUALPORT_RAM_LWSIZE;i++)    { wblt_data[i] = 0 ;  }
+
+    /* write data */
+    no_of_lwords = FPGA_DUALPORT_RAM_LWSIZE ;
+    addr =  FPGA_DUALPORT_RAM_ADDR ;                     
+    return_code = s3100_sharc_write(p_sharc, addr, wblt_data, no_of_lwords) ;
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+
+/* load and start SHARC */
+  /* open SHARC loader file */
+  /*   *dsploader_path =  argv[3] */ ; 
+   *dsploader_path = "LoaderFiles/vmram_t1.ldr" ;  
+
+   if ((load_dsp(p,p_sharc, *dsploader_path)) != 0) {
+     printf("error on loading DSP code\n");
+     return -1;
+   }
+
+
+/* wait for ready in DPM_PARAMETER_CMD */
+
+
+    /* read data */
+    addr =  DPM_PARAMETER_CMD ;                     
+    no_of_lwords = 0x1 ;
+    do {
+        return_code = s3100_sharc_read(p_sharc, addr, rblt_data, no_of_lwords) ;
+        if (return_code != (no_of_lwords*4)) {
+           printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+           return -1 ;
+        }
+     } while ( rblt_data[0] != VME_CMD_READY ) ;
+
+      printf("s3100_sharc_read after loading:  SHARC Reply = 0x%08x \n",rblt_data[0]  );         
+
+   loop_cnt = 0x0 ;
+    do {
+
+     /* Test   VME_CMD_WRITE1, VME_CMD_READ1_D32 */
+       return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE1, VME_CMD_READ1_D32) ;
+       if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE1, VME_CMD_READ1_D32 \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE1, VME_CMD_READ1_D32) from PCI    OK\n");         
+
+     /* Test   VME_CMD_WRITE2, VME_CMD_READ1_D32 */
+       return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ1_D32) ;
+       if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ1_D32 \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ1_D32) from PCI    OK\n");         
+
+
+     /* Test   VME_CMD_WRITE2, VME_CMD_READ2_D32 */
+       return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ2_D32) ;
+       if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ2_D32 \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ2_D32) from PCI    OK\n");         
+
+
+    /* Test   VME_CMD_WRITE2, VME_CMD_READ1_BLT32  */
+       return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ1_BLT32) ;
+       if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ1_BLT32   \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ1_BLT32) from PCI    OK\n");         
+
+
+
+     /* Test   VME_CMD_WRITE2, VME_CMD_READ2_BLT32  */
+        return_code = vme_ram_test_with_sharc(p, p_sharc, p_sdram, vme_addr, vme_no_of_lwords, VME_CMD_WRITE2, VME_CMD_READ2_BLT32) ;
+        if (return_code != 0)  {
+          printf("Error in vme_ram_test_with_sharc:  vme_addr = 0x%08x   vme_no_of_lwords = 0x%08x  VME_CMD_WRITE2, VME_CMD_READ2_BLT32   \n", vme_addr, vme_no_of_lwords );         
+          return -1 ;
+         }
+       printf("Test SHARC_VME_RAM_TEST (VME_CMD_WRITE2, VME_CMD_READ2_BLT32) from PCI    OK\n");         
+
+
+      loop_cnt = loop_cnt + 1 ;
+
+      if ((loop_cnt & 0xFF) == 0x0 )
+      {
+        printf(" loop counter = 0x%08x \n ", loop_cnt);
+       }
+    } while ((return_code >= 0) && (loop_cnt != no_loops)) ;
+
+    printf("Test VME_MEMORY_TEST from SHARC    OK\n");         
+
+ 
+
+
+
+
+
+close(p);
+close(p_sharc);
+close(p_sdram);
+
+return 0 ;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*********************************************************/
+
+/* the sharc program vmram_t1.ldr has to be loaded !!!!  */
+
+int vme_ram_test_with_sharc(int ip, int ip_sharc,int ip_sdram, u_int32_t vme_start_addr, u_int32_t no_of_lwords,
+                            int sharc_wr_cmd, int sharc_rd_cmd)
+{
+
+
+/*
+#define MAX_NUMBER_OF_PRINTS 0x10      
+#define MAX_NUMBER_LWORDS 0x400000        
+u_int32_t wblt_data[MAX_NUMBER_LWORDS] ;
+u_int32_t rblt_data[MAX_NUMBER_LWORDS] ;
+int get_lwords ;
+u_int32_t iaddr ;
+
+*/
+
+u_int32_t wblt_cmd_data[0x10] ;
+
+
+#define PCI_SDRAM_WR_ADDR 0x0000000  /* first 16MByte */      
+#define PCI_SDRAM_RD_ADDR 0x1000000  /* second 16MByte */      
+
+#define SHARC_SDRAM_WR_ADDR 0x0000000  /* first 16MByte */      
+#define SHARC_SDRAM_RD_ADDR 0x400000   /* second 16MByte */      
+
+
+u_int32_t sdram_start_rd_addr ;
+u_int32_t sdram_start_wr_addr ;
+
+
+u_int32_t addr ;
+
+
+int i;
+int error_cnt ;
+int return_code ;
+
+
+
+if (no_of_lwords > MAX_NUMBER_LWORDS)  {
+     printf("no_of_lwords (0x%08x) must be lower then MAX_NUMBER_LWORDS (0x%08x)\n",no_of_lwords, MAX_NUMBER_LWORDS);
+     return -1;
+   }
+
+if (no_of_lwords == 0)  {
+     printf("no_of_lwords (0x%08x) must be higher then 1 \n",no_of_lwords);
+     return -1;
+   }
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 1:   write increment pattern                              */
+/*                                                                */
+/******************************************************************/
+
+
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = i ;  }
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read1:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+/*    if ((rblt_data[0] & 0x80000000) != 0x80000000) { */
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+#ifdef vme_check
+
+    iaddr =  vme_start_addr ;                     
+           return_code =   vme_A32BLT32_read(ip, iaddr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, iaddr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+
+ 
+	   for (i=0x50; i<0x55; i++)  {
+                 printf("VME values before SHARC Read     i = %d  data = 0x%08x\n", i, rblt_data[i] );         
+
+           } /* for */
+
+#endif
+    
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+       /*         printf("SHARC Command Reply = 0x%08x \n",rblt_data[0] );  */       
+
+    } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read2:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+ 
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+#ifdef vme_check
+    iaddr =  vme_start_addr ;                     
+           return_code =   vme_A32BLT32_read(ip, iaddr, rblt_data, no_of_lwords, &get_lwords) ;
+           if(return_code != 0) {
+              printf("return Error vme_A32BLT32_read:   return_code = 0x%08x  at address = 0x%08x\n", return_code, iaddr );         
+              return -1 ; 
+             }
+           if(no_of_lwords != get_lwords) {
+              printf("length Error vme_A32BLT32_read:   must length = 0x%08x  read length = 0x%08x\n", no_of_lwords, get_lwords );         
+              return -1 ; 
+             }
+
+ 
+	   for (i=0x50; i<0x55; i++)  {
+                 printf("VME values after SHARC Read     i = %d  data = 0x%08x\n", i, rblt_data[i] );         
+
+           } /* for */
+
+#endif
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read3:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 2:   bit shift pattern                                    */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] = (0x1 << (i&0x1f)) ;  }
+/*   for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  } */
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+/******************************************************************/
+/*                                                                */
+/* step 3:    pattern                                             */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  test1_data[i&0xf] ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }  */
+
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+ 
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+/******************************************************************/
+/*                                                                */
+/* step 4:    random                                              */
+/*                                                                */
+/******************************************************************/
+    /* prepare data */
+    for (i=0;i<no_of_lwords;i++)    { wblt_data[i] =  random() ;  }
+/*    for (i=0;i<no_of_lwords;i++)    { printf("w = 0x%08x \n", wblt_data[i]);  }   */
+
+
+
+    /* write data to SDRAM  */
+    sdram_start_wr_addr =  PCI_SDRAM_WR_ADDR ;
+    return_code = s3100_sdram_write(ip_sdram, sdram_start_wr_addr, wblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4)) {
+        printf("s3100_sdram_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_wr_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP write command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_WR_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP write command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_wr_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+/* prepare parameter for DSP read command */
+    addr = DPM_PARAMETER_CMD ;                /*                            */                 
+    wblt_cmd_data[0] =   0x0                    ; /* clear command              */ 
+    wblt_cmd_data[1] =   SHARC_SDRAM_RD_ADDR    ; /* use as SDRAM address       */ 
+    wblt_cmd_data[2] =   vme_start_addr         ; /* use as VME address         */
+    wblt_cmd_data[3] =   no_of_lwords           ; /* use as length (number of lwords)  */
+
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x4) ; /* write 4 Lwords */
+    if (return_code != (0x4*4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* DSP read command */
+    addr = DPM_PARAMETER_CMD ;                   
+    wblt_cmd_data[0] =   sharc_rd_cmd   ; /*       */ 
+    return_code = s3100_sharc_write(ip_sharc, addr, wblt_cmd_data, 0x1) ; /* write 1 Lwords */
+    if (return_code != (4)) {
+        printf("s3100_sharc_write:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+/* wait for CMD Ready */
+  do {
+      addr = DPM_PARAMETER_CMD ;                   
+      return_code = s3100_sharc_read(ip_sharc, addr, rblt_data, 0x1 /*no_of_lwords*/) ;
+     } while (((rblt_data[0] & 0x40000000) == 0x40000000) && (return_code == 0x4)); /* while BUSY and Return OK */
+   
+    if (return_code != (4)) {
+        printf("s3100_sharc_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, addr );         
+        return -1 ;
+      }
+
+    if ((rblt_data[0] ) != 0x80000000) {
+        printf("  \n");         
+        printf("Error Sharc CMD Reply:  SHARC Command Reply = 0x%08x \n",rblt_data[0] );         
+        if (rblt_data[0] == VME_CMD_VME_STAT_ERROR)      printf("VME STATUS ERROR  (Arbitration Timeout or Buserror) \n");   
+        if (rblt_data[0] == VME_CMD_VME_WORDCOUNT_ERROR) printf("VME DMA WORDCOUNT ERROR \n");   
+        printf("  \n");         
+        return -1 ;
+      }
+
+
+
+
+
+    /* read data from SDRAM */
+    sdram_start_rd_addr =  PCI_SDRAM_RD_ADDR ;
+    return_code = s3100_sdram_read(ip_sdram, sdram_start_rd_addr, rblt_data, no_of_lwords) ;
+    if (return_code != (no_of_lwords*4))   {
+        printf("s3100_sdram_read:  return_code = 0x%08x  at address = 0x%08x\n", return_code, sdram_start_rd_addr );         
+        return -1 ;
+      }
+
+
+
+
+
+
+
+     /* check data */
+     error_cnt =  0 ;
+     for (i=0;(i)<no_of_lwords;i++)
+       {
+          if (wblt_data[i] != rblt_data[i])  
+           {
+             printf(" Error at i = : 0x%08x    written = : 0x%08x   read = : 0x%08x\n", i, wblt_data[i], rblt_data[i]);
+             error_cnt = error_cnt + 1;
+             if (error_cnt > MAX_NUMBER_OF_PRINTS) return -1 ;
+           }
+       }
+
+
+
+
+  if (error_cnt == 0) {
+     return 0 ; }
+    else {
+     return -1 ;}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vmram_t1.asm
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vmram_t1.asm	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sharc/vmram_t1.asm	(revision 22)
@@ -0,0 +1,150 @@
+/***************************************************************************/
+/*                                                                         */
+/*   Name:  vmram_t1.asm                                                   */
+/*                                                                         */
+/*   Zweck: VME Ram test 1                                                 */
+/*          - write increment pattern to FPGA internal RAM (256 LWords)    */
+/*                                                                         */
+/*   Autor: TH                                                             */
+/*   Datum: 12.01.2002                                                     */
+/*                                                                         */
+/*                                                                         */
+/* ----------------------------------------------------------------------- */
+/*                                                                         */
+/*                                                                         */
+/*  Copyright (c) 2002 SIS GmbH 22399 Hamburg.  All rights reserved.       */
+/*                                                                         */
+/*                                                                         */
+/***************************************************************************/
+
+
+
+#include "..\header\s3100def.h"
+
+
+#define DPM_PARAMETER_CMD		FPGA_DUALPORT_RAM  			 /* use for ACK ; 0x40000000 for BUSY; 0x8eee eeee for Error */
+#define DPM_PARAMETER1			FPGA_DUALPORT_RAM + 0x1 	 /* use as SDRAM address pointer                             */
+#define DPM_PARAMETER2			FPGA_DUALPORT_RAM + 0x2 	 /* use as VME address pointer                               */
+#define DPM_PARAMETER3			FPGA_DUALPORT_RAM + 0x3 	 /* use as length (number of lwords)                         */
+#define DPM_PARAMETER4			FPGA_DUALPORT_RAM + 0x4 	 /* use as max. number of loops                              */
+#define DPM_PARAMETER5			FPGA_DUALPORT_RAM + 0x5 	 /* use as loop_counter                                      */
+
+#define DPM_PARAMETER6			FPGA_DUALPORT_RAM + 0x6 	 /* use in case of error for VME Status                      */
+#define DPM_PARAMETER7			FPGA_DUALPORT_RAM + 0x7 	 /* use in case of error for written word information        */
+#define DPM_PARAMETER8			FPGA_DUALPORT_RAM + 0x8 	 /* use in case of error for read word information           */
+#define DPM_PARAMETER9			FPGA_DUALPORT_RAM + 0x9 	 /* use in case of error for address information             */
+
+
+
+#define VME_CMD_WRITE 			0x1000 		   /* read from SDRAM and write it to VME */
+#define VME_CMD_READ_D32		0x1100 		   /* read (D32) from VME and write it to SDRAM */
+#define VME_CMD_READ_BLT32		0x1101 		   /* read (BLT32) from VME and write it to SDRAM */
+#define VME_CMD_WR_RD_TEST		0x1200 
+
+								
+#define VME_CMD_READY			0x20000000
+#define VME_CMD_BUSY			0x40000000
+#define VME_CMD_FINISHED		0x80000000 
+#define VME_CMD_WRONG_PARAMETER	0x8eee0001
+#define VME_CMD_ERROR			0x8eeeeeee
+
+
+
+.SEGMENT/PM     seg_prog;
+				
+Start:
+		BIT SET ASTAT 0x780000 ; /* set  Flag 3 .. FLAG 0           */
+		BIT SET MODE2 0x78000;   /* Flag 3 .. Flag 0 sind outputs   */ 
+
+
+// clear internal FPGA Dual Ported Ram
+		R1 = 0x0 ;
+		I1 = FPGA_DUALPORT_RAM ;
+		M1 = 0x1 ;
+        LCNTR=0x100, DO(PC,1) UNTIL LCE ;
+		DM(I1,M1) = R1 ;
+
+
+		R1 = VME_CMD_READY ;
+		DM(DPM_PARAMETER_CMD) = R1 ;
+
+
+
+	    
+	    
+	    
+// Main Command Loop 
+
+Command_Loop:
+		R1 =  DM (DPM_PARAMETER_CMD) ;    /* read Command */
+
+		R2 =  VME_CMD_WRITE ;
+		COMP (R1,R2) ;
+		IF EQ JUMP (PC,Vme_Cmd_Write_Start) ;
+
+
+
+	    JUMP (PC,Command_Loop)       ;
+				
+
+
+				
+
+
+Wrong_Paramter_End:
+		R2 = VME_CMD_WRONG_PARAMETER ;
+		DM (DPM_PARAMETER_CMD) = R2  ;
+	    JUMP (PC,Command_Loop)       ;
+	    
+	    
+	    
+
+Vme_Cmd_Write_Start:	    
+		R1 = VME_CMD_BUSY  ;
+		R2 = R2 or R1 ;
+		DM (DPM_PARAMETER_CMD) = R2  ;
+
+	// check Parameter1: 1 <= Loop counter if <1 or > 0x1000 */ 
+		R6 = 0x4 ;
+		M3 = 1 ;
+		R3 = DM(DPM_PARAMETER1) ;  /* SDRAM offset Address */
+		R4 = DM(DPM_PARAMETER2) ;  /* VME Address */
+		R5 = DM(DPM_PARAMETER3) ;  /* Length; number of LWORDS  */
+
+	    R7 = SDRAM_SGL_BASE ;    /* SDRAM Address Base Address */
+	    R3 = R3 + R7 ;           /* SDRAM Address */
+
+        LCNTR=R5, DO(PC,5) UNTIL LCE ;
+        R0 = DM(I3,M1) ;	         	/* read SDRAM */
+		DM(VME_WRITE_DATA_REG) = R0 ;
+ 	   	DM (VME_SINGLE_CYCLE  + VME_WRITE + VME_AM_9) = R4 ;
+        CALL Wait_On_VME_Busy ;   /* R15 will be used */
+ 	   	R4 = R4 + R6 ;
+
+
+
+		R2 = VME_CMD_FINISHED ;
+		DM (DPM_PARAMETER_CMD) = R2  ;
+
+	    JUMP (PC,Command_Loop)       ;
+
+
+
+
+
+
+/* subroutine */
+
+Wait_On_VME_Busy:
+ 	   	R15 = DM (LOC_SEQ_STATUS)  ;     	 
+		BTST R15 by 0	;	
+ 		IF NOT SZ JUMP (PC,Wait_On_VME_Busy) ;  
+		RTS ;
+
+
+
+
+		
+.ENDSEG;
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest	(revision 22)
@@ -0,0 +1,355 @@
+#!/bin/sh
+
+#chrislin on VME address 0x0 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_chrislin=1
+
+#SIS3100 Slave on VME address 0x84000000 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_sis3100=0
+
+
+test_sdram=0
+must_no_of_mbyte=64         # valid values are :  0, 64, 128, 256, 512
+
+test_sharc_intern=0
+test_sharc_vme_chrislin=0
+test_sharc_vme_sis3100=0
+
+
+echo 
+echo 
+
+rm temp.lst
+
+loop_counter=0
+while :
+do
+# VME test with chrislin
+   if [ $test_vme_ram_chrislin -eq 1 ] 
+      then  
+         echo Test VME Chrislin Slave Byte/Word/Longword   runs   ......
+         #test on chrislin Memory 256KByte with SGL (Byte/Word/Longword)   
+         ./pci_vme/pci_vme_ram_test_sgl_8_16_32 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         echo Test VME Chrislin Slave runs   .........................
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x4ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on chrislin Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x0 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+# VME test with other sis3100 slave 
+   if [ $test_vme_ram_sis3100 -eq 1 ] 
+      then 
+   echo Test VME SIS3100 Slave runs   ..........................
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x84000000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x844ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on SIS3100 Slave  Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x84100000 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+   fi 
+
+
+
+#SDRAM Test
+#check first the size and compare it with "MUST value" must_no_of_mbyte
+   if [ $test_sdram -eq 1 ] 
+      then ./pci_sdram/check_size  >> temp.lst
+       NO_OF_MBYTE=$?
+       if [ $must_no_of_mbyte -ne $NO_OF_MBYTE ]
+       then 
+           echo  
+           echo wrong size of SDRAM or wrong "MUST value"  ,  size of SDRAM = $NO_OF_MBYTE
+           echo
+       exit
+     fi
+#NO_OF_MBYTE=512
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 64 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 64 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 512 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 512 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   fi 
+
+
+
+
+
+
+   if [ $test_sharc_intern -eq 1 ] 
+   then echo Test SHARC runs   ......................................
+     ./sharc/fpga_ram_test  >> temp.lst
+     RETVAL=$?
+     if [ $RETVAL -ne 0 ]
+       then echo SHARC Tests Not OK  RETVAL= $RETVAL
+       exit
+     fi
+   fi 
+
+
+
+# SHARC VME test with chrislin
+   if [ $test_sharc_vme_chrislin -eq 1 ] 
+      then 
+   echo Test SHARC VME Chrislin Slave runs   ...................
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x0 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x14670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+# SHARC VME test with other SIS3100 Slave
+   if [ $test_sharc_vme_sis3100 -eq 1 ] 
+      then 
+   echo Test SHARC VME other SIS3100 Slave runs   ..............
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84000000 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84014670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+  if [ $loop_counter -eq 10 ]
+    then rm temp.lst
+  fi
+
+
+  if [ $loop_counter -eq 20 ]
+     then exit
+   fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_512MB
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_512MB	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_512MB	(revision 22)
@@ -0,0 +1,347 @@
+#!/bin/sh
+
+#chrislin on VME address 0x0 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_chrislin=1 
+
+#SIS3100 Slave on VME address 0x84000000 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_sis3100=0 
+
+
+test_sdram=1
+must_no_of_mbyte=512         # valid values are :  0, 64, 128, 256, 512
+
+test_sharc_intern=1
+test_sharc_vme_chrislin=1
+test_sharc_vme_sis3100=0
+
+
+echo 
+echo 
+
+rm temp.lst
+
+loop_counter=0
+while :
+do
+
+# VME test with chrislin
+   if [ $test_vme_ram_chrislin -eq 1 ] 
+      then 
+   echo Test VME Chrislin Slave  Byte/Word/Longword    runs   ......
+         #test on chrislin Memory 256KByte with SGL (Byte/Word/Longword)   
+         ./pci_vme/pci_vme_ram_test_sgl_8_16_32 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+# VME test with chrislin
+   if [ $test_vme_ram_chrislin -eq 1 ] 
+      then 
+   echo Test VME Chrislin Slave runs   .........................
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x4ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on chrislin Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x0 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+# VME test with other sis3100 slave 
+   if [ $test_vme_ram_sis3100 -eq 1 ] 
+      then 
+   echo Test VME SIS3100 Slave runs   ..........................
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x84000000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x844ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on SIS3100 Slave  Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x84100000 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+   fi 
+
+
+
+#SDRAM Test
+#check first the size and compare it with "MUST value" must_no_of_mbyte
+ ./pci_sdram/check_size  >> temp.lst
+
+NO_OF_MBYTE=512
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 64 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 64 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 512 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 512 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   fi 
+
+
+
+
+
+
+   if [ $test_sharc_intern -eq 1 ] 
+   then echo Test SHARC runs   ......................................
+     ./sharc/fpga_ram_test  >> temp.lst
+     RETVAL=$?
+     if [ $RETVAL -ne 0 ]
+       then echo SHARC Tests Not OK  RETVAL= $RETVAL
+       exit
+     fi
+   fi 
+
+
+
+# SHARC VME test with chrislin
+   if [ $test_sharc_vme_chrislin -eq 1 ] 
+      then 
+   echo Test SHARC VME Chrislin Slave runs   ...................
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x0 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x14670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+# SHARC VME test with other SIS3100 Slave
+   if [ $test_sharc_vme_sis3100 -eq 1 ] 
+      then 
+   echo Test SHARC VME other SIS3100 Slave runs   ..............
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84000000 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84014670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+  if [ $loop_counter -eq 10 ]
+    then rm temp.lst
+  fi
+
+
+  if [ $loop_counter -eq 20 ]
+     then exit
+   fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_64MB
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_64MB	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/sis3100_selftest_64MB	(revision 22)
@@ -0,0 +1,355 @@
+#!/bin/sh
+
+#chrislin on VME address 0x0 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_chrislin=1
+
+#SIS3100 Slave on VME address 0x84000000 ; space min. 16MByte; D32/BLT32/MBLT32
+test_vme_ram_sis3100=0
+
+
+test_sdram=1
+must_no_of_mbyte=64         # valid values are :  0, 64, 128, 256, 512
+
+test_sharc_intern=1
+test_sharc_vme_chrislin=1
+test_sharc_vme_sis3100=0
+
+
+echo 
+echo 
+
+rm temp.lst
+
+loop_counter=0
+while :
+do
+# VME test with chrislin
+   if [ $test_vme_ram_chrislin -eq 1 ] 
+      then  
+         echo Test VME Chrislin Slave Byte/Word/Longword   runs   ......
+         #test on chrislin Memory 256KByte with SGL (Byte/Word/Longword)   
+         ./pci_vme/pci_vme_ram_test_sgl_8_16_32 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         echo Test VME Chrislin Slave runs   .........................
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x0 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x4ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on chrislin Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x0 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on chrislin Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+# VME test with other sis3100 slave 
+   if [ $test_vme_ram_sis3100 -eq 1 ] 
+      then 
+   echo Test VME SIS3100 Slave runs   ..........................
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x84000000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave Memory 256KByte with SGL, BLT and MBLT   
+         ./pci_vme/pci_vme_ram_test_all 0x844ff000 0x10000  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+
+         #test on SIS3100 Slave  Memory 4MByte with write BLT32 and read BLT32   
+         ./pci_vme/pci_vme_ram_test 0x84100000 0x100000 2 2 >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory second 8MByte with write BLT32 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84800000 0x200000 2 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+         #test on SIS3100 Slave  Memory  8MByte with write MBLT64 and read MBLT64   
+         ./pci_vme/pci_vme_ram_test 0x84400000 0x200000 3 3  >> temp.lst
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+   fi 
+
+
+
+#SDRAM Test
+#check first the size and compare it with "MUST value" must_no_of_mbyte
+   if [ $test_sdram -eq 1 ] 
+      then ./pci_sdram/check_size  >> temp.lst
+       NO_OF_MBYTE=$?
+       if [ $must_no_of_mbyte -ne $NO_OF_MBYTE ]
+       then 
+           echo  
+           echo wrong size of SDRAM or wrong "MUST value"  ,  size of SDRAM = $NO_OF_MBYTE
+           echo
+       exit
+     fi
+#NO_OF_MBYTE=512
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 64 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 64 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   echo Test SDRAM runs   ......................................
+     if [ $NO_OF_MBYTE -eq 512 ]
+       then 
+        ./pci_sdram/pci_sdram_test_inc 512 3 >> temp.lst    # check full SDRAM with increment pattern (3 time)
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x20000 0 0  >> temp.lst   # test with 4 different pattern ,512 KByte SGL write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x7ff00 0x40000 1 0  >> temp.lst   # test with 4 different pattern ,1MByte KByte BLT write , SGL read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x489f0 0x40000 0 1  >> temp.lst   # test with 4 different pattern ,1MByte KByte SGL write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x0 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x1000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x2000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+        ./pci_sdram/pci_sdram_test_all 0x3000000 0x400000 1 1  >> temp.lst   # test with 4 different pattern ,16MByte KByte DMA write , DMA read
+         RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+     fi
+
+
+
+   fi 
+
+
+
+
+
+
+   if [ $test_sharc_intern -eq 1 ] 
+   then echo Test SHARC runs   ......................................
+     ./sharc/fpga_ram_test  >> temp.lst
+     RETVAL=$?
+     if [ $RETVAL -ne 0 ]
+       then echo SHARC Tests Not OK  RETVAL= $RETVAL
+       exit
+     fi
+   fi 
+
+
+
+# SHARC VME test with chrislin
+   if [ $test_sharc_vme_chrislin -eq 1 ] 
+      then 
+   echo Test SHARC VME Chrislin Slave runs   ...................
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x0 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x14670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+# SHARC VME test with other SIS3100 Slave
+   if [ $test_sharc_vme_sis3100 -eq 1 ] 
+      then 
+   echo Test SHARC VME other SIS3100 Slave runs   ..............
+         #test on chrislin Memory 256KByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84000000 0x10000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+         #test on chrislin Memory 1MByte with SGL, BLT    
+         ./sharc/vme_ram_test 0x84014670 0x40000 0x4 >> temp.lst
+          RETVAL=$?
+         if [ $RETVAL -ne 0 ]
+           then echo NOT OK RETVAL= $RETVAL
+           exit
+         fi
+
+   fi 
+
+
+
+  loop_counter=`expr $loop_counter + 1`
+  echo test_loop  $loop_counter
+
+  if [ $loop_counter -eq 10 ]
+    then rm temp.lst
+  fi
+
+
+  if [ $loop_counter -eq 20 ]
+     then exit
+   fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /drsdaq/VME/struck/sis1100/sis1100/selftests/temp.lst
===================================================================
--- /drsdaq/VME/struck/sis1100/sis1100/selftests/temp.lst	(revision 22)
+++ /drsdaq/VME/struck/sis1100/sis1100/selftests/temp.lst	(revision 22)
@@ -0,0 +1,440 @@
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 0 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 1 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 2 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 0  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 1  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 2  and  VME_READ_MODE = 3 OK
+Test VME_MEMORY_TEST from PCI with VME_WRITE_MODE = 3  and  VME_READ_MODE = 3 OK
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
+ no_loops  = 0x00000001 
+ LED an 
+Test VME_MEMORY_TEST from PCI    OK
+LED aus 
Index: /drsdaq/VME/struck/sis1100_var.h
===================================================================
--- /drsdaq/VME/struck/sis1100_var.h	(revision 22)
+++ /drsdaq/VME/struck/sis1100_var.h	(revision 22)
@@ -0,0 +1,350 @@
+/* $ZEL: sis1100_var.h,v 1.5 2004/05/27 23:10:37 wuestner Exp $ */
+
+/*
+ * Copyright (c) 2001-2004
+ *      Peter Wuestner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _sis1100_var_h_
+#define _sis1100_var_h_
+
+#define SIS1100_MinVersion 0
+#define SIS1100_MajVersion 2
+#define SIS1100_Version (SIS1100_MinVersion|(SIS1100_MajVersion<<16))
+
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+#elif __linux__
+#include "linux/ioctl.h"
+#endif
+
+/*
+ * minorbits:
+ * ccttuuuu
+ */
+
+/* used bits of minor number */
+#define sis1100_MINORBITS 8
+/* bits used for cardnumber, number_of_cards<=(1<<MINORCARDBITS) */
+#define sis1100_MINORCARDBITS 2
+/* type 0: VME; type 1: SDRAM; type 2: sis1100_control; type 3: dsp*/
+#define sis1100_MINORTYPEBITS 2
+
+#define sis1100_MAXCARDS (1<<sis1100_MINORCARDBITS)
+#define sis1100_MINORUSERBITS (sis1100_MINORBITS-sis1100_MINORCARDBITS-sis1100_MINORTYPEBITS)
+
+#define sis1100_MINORCARDSHIFT (sis1100_MINORUSERBITS+sis1100_MINORTYPEBITS)
+#define sis1100_MINORCARDMASK (((1<<sis1100_MINORCARDBITS)-1)<<(sis1100_MINORUSERBITS+sis1100_MINORTYPEBITS))
+#define sis1100_MINORTYPESHIFT sis1100_MINORUSERBITS
+#define sis1100_MINORTYPEMASK (((1<<sis1100_MINORTYPEBITS)-1)<<sis1100_MINORUSERBITS)
+#define sis1100_MINORUSERSHIFT 0
+#define sis1100_MINORUSERMASK ((1<<sis1100_MINORUSERBITS)-1)
+#define sis1100_MINORUTMASK (sis1100_MINORTYPEMASK|sis1100_MINORUSERMASK)
+
+enum sis1100_subdev {sis1100_subdev_remote, sis1100_subdev_ram,
+    sis1100_subdev_ctrl, sis1100_subdev_dsp};
+enum sis1100_hw_type {
+    sis1100_hw_invalid=0,
+    sis1100_hw_pci=1,
+    sis1100_hw_vme=2,
+    sis1100_hw_camac=3,
+    sis1100_hw_f1=4,     /* FZJ only */
+    sis1100_hw_vertex=5, /* FZJ only */
+};
+
+/*
+ * error codes:
+ * sis1100 local:
+ *     0x005: deadlock (only transient)
+ *     0x101: missing synchronisation
+ *     0x102: inhibit
+ *     0x103: output fifo full
+ *     0x104: buffer full
+ *     0x105: deadlock; transfer aborted
+ *     0x107: timeout
+ * sis1100 remote:
+ *     0x202: not ready
+ *     0x206: protocoll error
+ *     0x207: timeout; indication not complete
+ *     0x208: bus error
+ *     0x209: fifo error
+ * sis3100 remote:
+ *     0x211: bus error
+ *     0x212: retry
+ *     0x214: arbitration timeout
+ * sis5100 remote:
+ *     ???
+ * #ifdef FZJ_ZEL
+ * straw and vertex:
+ *     same as sis1100 remote
+ * #endif
+ * synthetic errors:
+ *     0x301: DMA interrupted
+ *     0x302: synchronisation lost during DMA
+ *     0x303 == 0x301|0x302
+ */
+
+struct sis1100_vme_req {
+    int size;
+    int32_t am;
+    u_int32_t addr;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+/*
+ * struct sis1100_vme_req {
+ *     int size;
+ *     int32_t am;
+ *     u_int32_t addr;
+ *     union {
+ *         u_int8_t u8;
+ *         u_int16_t u16;
+ *         u_int32_t u32;
+ *         u_int64_t u64;
+ *     } data;
+ *     u_int32_t error;
+ * };
+ */
+
+struct sis1100_vme_block_req {
+    int size;        /* size of dataword */
+    int fifo;
+    size_t num;      /* number of datawords */
+    int32_t am;
+    u_int32_t addr;  /* remote bus address */
+    u_int8_t* data;  /* local user space address */
+    u_int32_t error;
+};
+
+struct sis1100_vme_super_block_req {
+    int n;
+    int error;
+    struct sis1100_vme_block_req* reqs;
+};
+
+struct sis1100_camac_req {
+    u_int32_t N;
+    u_int32_t A;
+    u_int32_t F;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+struct sis1100_camac_scan_req {
+    u_int32_t N;
+    u_int32_t A;
+    u_int32_t F;
+    u_int32_t data;
+    u_int32_t error;
+};
+
+struct sis1100_pipelist {
+    u_int32_t head; /* masked with 0xff3f0400:                  */
+                            /* only 'be', remote space and w/r are used */
+    int32_t am;
+    u_int32_t addr;
+    u_int32_t data; /* only used for write access */
+};
+
+struct sis1100_pipe {
+    int num;
+    struct sis1100_pipelist* list;
+    u_int32_t* data;
+    u_int32_t error;
+};
+
+struct sis1100_writepipe {
+    int num;
+    int am;
+    u_int32_t* data; /* num*{addr, data} */
+    u_int32_t error;
+};
+
+struct vmespace {
+    int32_t am;
+    u_int32_t datasize;
+    int swap;          /* 1: swap words 0: don't swap -1: not changed */
+    int mapit;         /* not used */
+    ssize_t mindmalen; /* 0: never use DMA; 1: always use DMA; -1: not changed */
+};
+
+struct sis1100_ident_dev {
+    enum sis1100_hw_type hw_type;
+    int hw_version;
+    int fw_type;
+    int fw_version;
+};
+
+struct sis1100_ident {
+    struct sis1100_ident_dev local;
+    struct sis1100_ident_dev remote;
+    int remote_ok;
+    int remote_online;
+};
+
+struct sis1100_ctrl_reg {
+    int offset;
+    u_int32_t val;
+    u_int32_t error;
+};
+
+struct sis1100_irq_ctl {
+    u_int32_t irq_mask;
+    int signal;        /* >0: signal; ==0: disable; <0: no signal but select */
+};
+
+struct sis1100_irq_get {
+    u_int32_t irq_mask;
+    int remote_status; /* -1: down 1: up 0: unchanged */
+    u_int32_t opt_status;
+    u_int32_t mbx0;
+    u_int32_t irqs;
+    int level;
+    int32_t vector;
+};
+
+struct sis1100_irq_ack {
+    u_int32_t irq_mask;
+};
+
+struct sis1100_dma_alloc {
+    size_t size;
+    off_t offset;
+    u_int32_t dma_addr;
+};
+
+struct sis1100_dsp_code {
+    void*     src;  /* pointer to code */
+    u_int32_t dst;  /* load address in SHARC memory*/
+    int       size; /* code size in bytes */
+};
+
+struct sis1100_eeprom_req {
+    u_int8_t num;    /* number of 16-bit-words */
+    u_int8_t addr;   /* eeprom address */
+    u_int16_t* data; /* user space address */
+};
+
+#define SIS3100_VME_IRQS      0xFE
+#define SIS3100_FLAT_IRQS    0xF00
+#define SIS3100_LEMO_IRQS   0x7000
+#define SIS3100_DSP_IRQ     0x8000
+#define SIS3100_FRONT_IRQS (SIS3100_FLAT_IRQS  | SIS3100_LEMO_IRQS)
+#define SIS3100_EXT_IRQS   (SIS3100_FRONT_IRQS | SIS3100_DSP_IRQ  )
+#define SIS3100_IRQS       (SIS3100_VME_IRQS   | SIS3100_EXT_IRQS )
+
+/*
+ * 24*LAM
+ * 3* LEMO IN 3* LEMO OUT
+ * 3* ECL IN 3* ECL OUT
+ */
+#define SIS5100_LAM_IRQS         0
+#define SIS5100_FLAT_IRQS        0
+#define SIS5100_LEMO_IRQS        0
+#define SIS5100_DSP_IRQ          0
+#define SIS5100_FRONT_IRQS (SIS5100_FLAT_IRQS  | SIS5100_LEMO_IRQS)
+#define SIS5100_EXT_IRQS   (SIS5100_FRONT_IRQS | SIS5100_DSP_IRQ  )
+#define SIS5100_IRQS       (SIS5100_LAM_IRQS   | SIS5100_EXT_IRQS )  
+
+#define SIS1100_FRONT_IRQS 0x30000
+#define SIS1100_MBX0_IRQ  0x100000
+#define SIS1100_IRQS (SIS1100_FRONT_IRQS|SIS1100_MBX0_IRQ)
+
+#define GLINK_MAGIC 'g'
+
+#define SIS1100_NEW_CTRL
+
+#define SIS1100_SETVMESPACE     _IOW (GLINK_MAGIC,  1, struct vmespace)
+#define SIS3100_VME_PROBE       _IOW (GLINK_MAGIC,  2, u_int32_t)
+#define SIS3100_VME_READ        _IOWR(GLINK_MAGIC, 3, struct sis1100_vme_req)
+#define SIS3100_VME_WRITE       _IOWR(GLINK_MAGIC, 4, struct sis1100_vme_req)
+#define SIS3100_VME_BLOCK_READ  _IOWR(GLINK_MAGIC, 5, struct sis1100_vme_block_req)
+#define SIS3100_VME_BLOCK_WRITE _IOWR(GLINK_MAGIC, 6, struct sis1100_vme_block_req)
+#ifdef SIS1100_NEW_CTRL
+#define SIS1100_CTRL_READ       _IOWR(GLINK_MAGIC, 7, struct sis1100_ctrl_reg)
+#define SIS1100_CTRL_WRITE      _IOWR(GLINK_MAGIC, 8, struct sis1100_ctrl_reg)
+#else
+#define SIS1100_LOCAL_CTRL_READ _IOWR(GLINK_MAGIC, 7, struct sis1100_ctrl_reg)
+#define SIS1100_LOCAL_CTRL_WRITE _IOWR(GLINK_MAGIC, 8, struct sis1100_ctrl_reg)
+#define SIS1100_REMOTE_CTRL_READ _IOWR(GLINK_MAGIC, 9, struct sis1100_ctrl_reg)
+#define SIS1100_REMOTE_CTRL_WRITE _IOWR(GLINK_MAGIC, 10, struct sis1100_ctrl_reg)
+#endif
+#define SIS1100_PIPE            _IOWR(GLINK_MAGIC, 11, struct sis1100_pipe)
+#define SIS1100_MAPSIZE         _IOR (GLINK_MAGIC,  12, u_int32_t)
+#define SIS1100_LAST_ERROR      _IOR (GLINK_MAGIC,  13, u_int32_t)
+#define SIS1100_IDENT           _IOR (GLINK_MAGIC,  14, struct sis1100_ident)
+#define SIS1100_FIFOMODE        _IOWR(GLINK_MAGIC, 15, int)
+
+#define SIS1100_IRQ_CTL         _IOW (GLINK_MAGIC,  17, struct sis1100_irq_ctl)
+#define SIS1100_IRQ_GET         _IOWR(GLINK_MAGIC, 18, struct sis1100_irq_get)
+#define SIS1100_IRQ_ACK         _IOW (GLINK_MAGIC,  19, struct sis1100_irq_ack)
+#define SIS1100_IRQ_WAIT        _IOWR(GLINK_MAGIC, 20, struct sis1100_irq_get)
+
+#define SIS1100_MINDMALEN       _IOWR(GLINK_MAGIC, 21, int[2])
+
+#define SIS1100_FRONT_IO        _IOWR(GLINK_MAGIC, 22, u_int32_t)
+#define SIS1100_FRONT_PULSE     _IOW (GLINK_MAGIC,  23, u_int32_t)
+#define SIS1100_FRONT_LATCH     _IOWR(GLINK_MAGIC, 24, u_int32_t)
+
+#define SIS3100_VME_SUPER_BLOCK_READ _IOWR(GLINK_MAGIC, 25, struct sis1100_vme_super_block_req)
+#define SIS1100_WRITE_PIPE      _IOWR(GLINK_MAGIC, 26, struct sis1100_writepipe)
+
+#define SIS1100_DMA_ALLOC       _IOWR(GLINK_MAGIC, 27, struct sis1100_dma_alloc)
+#define SIS1100_DMA_FREE        _IOW (GLINK_MAGIC,  28, struct sis1100_dma_alloc)
+
+#define SIS5100_CCCZ            _IO  (GLINK_MAGIC, 29)
+#define SIS5100_CCCC            _IO  (GLINK_MAGIC, 30)
+#define SIS5100_CCCI            _IOW (GLINK_MAGIC, 31, int)
+#define SIS5100_CNAF            _IOWR(GLINK_MAGIC, 32, struct sis1100_camac_req)
+#define SIS1100_SWAP            _IOWR(GLINK_MAGIC, 33, int)
+#define SIS3100_TIMEOUTS        _IOWR(GLINK_MAGIC, 34, int[2])
+
+#define SIS1100_DSP_LOAD        _IOW (GLINK_MAGIC, 35, struct sis1100_dsp_code)
+#define SIS1100_DSP_RESET       _IO  (GLINK_MAGIC, 36)
+#define SIS1100_DSP_START       _IO  (GLINK_MAGIC, 37)
+
+/* the following functions (1xx) are not designed for "daily use",
+   but will be usefull */
+#define SIS1100_RESET           _IO  (GLINK_MAGIC,  102)
+#define SIS1100_REMOTE_RESET    _IO  (GLINK_MAGIC,  103)
+#define SIS1100_DEVTYPE         _IOR (GLINK_MAGIC, 104, enum sis1100_subdev)
+#define SIS1100_DRIVERVERSION   _IOR (GLINK_MAGIC, 105, int)
+#define SIS1100_READ_EEPROM     _IOW (GLINK_MAGIC, 106, struct sis1100_eeprom_req)
+#define SIS1100_WRITE_EEPROM    _IOW (GLINK_MAGIC, 107, struct sis1100_eeprom_req)
+#define SIS1100_JTAG_ENABLE     _IOW (GLINK_MAGIC, 108, u_int32_t)
+#define SIS1100_JTAG_CTRL       _IOWR(GLINK_MAGIC, 109, u_int32_t)
+#define SIS1100_JTAG_DATA       _IOR (GLINK_MAGIC, 110, u_int32_t)
+#define SIS1100_JTAG_PUT        _IOW (GLINK_MAGIC, 111, u_int32_t)
+#define SIS1100_JTAG_GET        _IOR (GLINK_MAGIC, 112, u_int32_t)
+
+#ifndef PURE_SIS1100_NAMESPACE
+#define SETVMESPACE SIS1100_SETVMESPACE
+#define VME_PROBE SIS3100_VME_PROBE
+#endif
+
+#endif
Index: /drsdaq/VME/struck/sis3100.c
===================================================================
--- /drsdaq/VME/struck/sis3100.c	(revision 22)
+++ /drsdaq/VME/struck/sis3100.c	(revision 22)
@@ -0,0 +1,492 @@
+/********************************************************************
+
+  Name:         sis3100.c
+  Created by:   Stefan Ritt
+
+  Contents:     Midas VME standard (MVMESTD) layer for SIS 3100/1100
+                VME controller using sis1100w.lib
+
+  $Id: sis3100.c 3783 2007-07-30 16:03:49Z ritt@PSI.CH $
+
+\********************************************************************/
+
+#ifdef __linux__
+#ifndef OS_LINUX
+#define OS_LINUX
+#endif
+#endif
+#ifdef _MSC_VER
+#define OS_WINNT
+#endif
+
+#ifdef OS_WINNT
+
+#define PLX_9054
+#define PCI_CODE
+#define LITTLE_ENDIAN
+
+#include <stdio.h>
+#include <string.h>
+#include "PlxApi.h"
+#include "sis1100w.h" // Header file for sis1100w.dll
+#include "sis3100_vme_calls.h"
+
+#endif // OS_WINNT
+
+#ifdef OS_LINUX
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#include "sis3100_vme_calls.h"
+
+#endif // OS_LINUX
+
+#include "mvmestd.h"
+
+/*------------------------------------------------------------------*/
+
+int mvme_open(MVME_INTERFACE **vme, int idx)
+{
+   *vme = (MVME_INTERFACE *) malloc(sizeof(MVME_INTERFACE));
+   if (*vme == NULL)
+      return MVME_NO_MEM;
+
+   memset(*vme, 0, sizeof(MVME_INTERFACE));
+
+#ifdef OS_WINNT
+   {
+   int n_sis3100;
+
+   sis1100w_Find_No_Of_sis1100(&n_sis3100);
+   if (idx >= n_sis3100)
+      return MVME_NO_INTERFACE;
+
+   (*vme)->info = malloc(sizeof(struct SIS1100_Device_Struct));
+   if ((*vme)->info == NULL)
+      return MVME_NO_MEM;
+
+   if (sis1100w_Get_Handle_And_Open(idx+1, (struct SIS1100_Device_Struct *) (*vme)->info) != 0) 
+      return MVME_NO_INTERFACE;
+
+   if (sis1100w_Init((struct SIS1100_Device_Struct *) (*vme)->info, 0) != 0)
+      return MVME_NO_INTERFACE;
+
+   if (sis1100w_Init_sis3100((struct SIS1100_Device_Struct *) (*vme)->info, 0) != 0)
+      return MVME_NO_CRATE; 
+   }
+#endif // OS_WINNT
+
+#ifdef OS_LINUX
+   {
+   char str[256];
+
+   /* open VME */
+   if (idx == 0)
+      strcpy(str, "/tmp/sis1100");
+   else
+      sprintf(str, "/tmp/sis1100_%d", idx+1);
+
+   (*vme)->handle = open(str, O_RDWR, 0);
+   if ((*vme)->handle < 0)
+      return MVME_NO_INTERFACE;
+   }
+#endif
+
+   /* default values */
+   (*vme)->am        = MVME_AM_DEFAULT;
+   (*vme)->dmode     = MVME_DMODE_D32;
+   (*vme)->blt_mode  = MVME_BLT_NONE;
+   (*vme)->table     = NULL; // not used
+
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_close(MVME_INTERFACE *vme)
+{
+#ifdef OS_WINNT
+   sis1100w_Close((struct SIS1100_Device_Struct *) vme->info);
+   free(vme->info);
+#endif
+
+#ifdef OS_LINUX
+   close(vme->handle);
+#endif
+
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_sysreset(MVME_INTERFACE *vme)
+{
+#ifdef OS_WINNT
+   sis1100w_VmeSysreset((struct SIS1100_Device_Struct *) vme->info);
+#endif
+#ifdef OS_LINUX
+   vmesysreset(vme->handle);
+#endif
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_write(MVME_INTERFACE *vme, mvme_addr_t vme_addr, void *src, mvme_size_t n_bytes)
+{
+   mvme_size_t n;
+   DWORD status=0, data;
+#ifdef OS_WINNT
+   struct SIS1100_Device_Struct *hvme;
+   hvme = (struct SIS1100_Device_Struct *) vme->info;
+#else
+   int hvme;
+   hvme = vme->handle;
+#endif
+
+   if (n_bytes <= 4) {
+      data = n = 0;
+      memcpy(&data, src, n_bytes);
+
+      /* A32 */
+      if (vme->am >= 0x08 && vme->am <= 0x0F) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A32D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) data);
+         else if (vme->dmode == MVME_DMODE_D16)
+            status = vme_A32D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) data);
+         else if (vme->dmode == MVME_DMODE_D32)
+            status = vme_A32D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) data);
+      }
+
+      /* A16 */
+      else if (vme->am >= 0x29 && vme->am <= 0x2D) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A16D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) data);
+         else if (vme->dmode == MVME_DMODE_D16)
+            status = vme_A16D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) data);
+         else if (vme->dmode == MVME_DMODE_D32)
+            status = vme_A16D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) data);
+      }
+      
+      /* A24 */
+      else if (vme->am >= 0x38 && vme->am <= 0x3F) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A24D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) data);
+         else if (vme->am >= 0x38 && vme->am <= 0x3F && vme->dmode == MVME_DMODE_D16)
+            status = vme_A24D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) data);
+         else if (vme->am >= 0x38 && vme->am <= 0x3F && vme->dmode == MVME_DMODE_D32)
+            status = vme_A24D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) data);
+      } 
+      
+      if (status == 0)
+         n = n_bytes;
+      else
+         n = 0;
+   } else {
+
+      /* A32 */
+      if (vme->am >= 0x08 && vme->am <= 0x0f) {
+         if (vme->blt_mode == MVME_BLT_NONE)
+            status = vme_A32DMA_D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t*) src, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_BLT32)
+            status = vme_A32BLT32_write(hvme, (u_int32_t) vme_addr, (u_int32_t*) src, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64)
+            status = vme_A32MBLT64_write(hvme, (u_int32_t) vme_addr, (u_int32_t*) src, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+      }
+
+      /* A24 */
+      else if (vme->am >= 0x38 && vme->am <= 0x3f) {
+         if (vme->blt_mode == MVME_BLT_BLT32)
+            status = vme_A24BLT32_write(hvme, (u_int32_t) vme_addr, (u_int32_t*) src, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64)
+            status = vme_A24MBLT64_write(hvme, (u_int32_t) vme_addr, (u_int32_t*) src, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+      }
+
+      else 
+         n = 0;
+
+      n = n*4;
+   }
+
+   return n;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_write_value(MVME_INTERFACE *vme, mvme_addr_t vme_addr, unsigned int value)
+{
+   mvme_size_t n;
+   DWORD status=0;
+#ifdef OS_WINNT
+   struct SIS1100_Device_Struct *hvme;
+   hvme = (struct SIS1100_Device_Struct *) vme->info;
+#else
+   int hvme;
+   hvme = vme->handle;
+#endif
+
+   if (vme->dmode == MVME_DMODE_D8)
+      n = 1;
+   else if (vme->dmode == MVME_DMODE_D16)
+      n = 2;
+   else
+      n = 4;
+
+   /* A16 */
+   if (vme->am >= 0x29 && vme->am <= 0x2D) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A16D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) value);
+      else if (vme->dmode == MVME_DMODE_D16)
+         status = vme_A16D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) value);
+      else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A16D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) value);
+   }
+   
+   /* A24 */
+   else if (vme->am >= 0x38 && vme->am <= 0x3F) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A24D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) value);
+      else if (vme->dmode == MVME_DMODE_D16)
+         status = vme_A24D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) value);
+      else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A24D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) value);
+   }
+   
+   /* A32 */
+   else if (vme->am >= 0x08 && vme->am <= 0x0F) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A32D8_write(hvme, (u_int32_t) vme_addr, (u_int8_t) value);
+      else if (vme->dmode == MVME_DMODE_D16)
+         status = vme_A32D16_write(hvme, (u_int32_t) vme_addr, (u_int16_t) value);
+      else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A32D32_write(hvme, (u_int32_t) vme_addr, (u_int32_t) value);
+   }
+
+   if (status != 0)
+      n = 0;
+
+   return n;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_read(MVME_INTERFACE *vme, void *dst, mvme_addr_t vme_addr, mvme_size_t n_bytes)
+{
+   mvme_size_t i, n;
+   DWORD data;
+   WORD data16;
+   int status=0;
+#ifdef OS_WINNT
+   struct SIS1100_Device_Struct *hvme;
+   hvme = (struct SIS1100_Device_Struct *) vme->info;
+#else
+   int hvme;
+   hvme = vme->handle;
+#endif
+
+   if (n_bytes <= 4) {
+      data = 0;
+
+      /* A32 */
+      if (vme->am >= 0x08 && vme->am <= 0x0F) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A32D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+         else if (vme->dmode == MVME_DMODE_D16) {
+            status = vme_A32D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+            data = (DWORD)data16;
+         } else if (vme->dmode == MVME_DMODE_D32)
+            status = vme_A32D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+      }
+
+      /* A16 */
+      else if (vme->am >= 0x29 && vme->am <= 0x2D) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A16D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+         else if (vme->dmode == MVME_DMODE_D16) {
+            status = vme_A16D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+            data = (DWORD)data16;
+         } else if (vme->dmode == MVME_DMODE_D32)
+            status = vme_A16D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+      }
+      
+      /* A24 */
+      else if (vme->am >= 0x38 && vme->am <= 0x3F) {
+         if (vme->dmode == MVME_DMODE_D8)
+            status = vme_A24D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+         else if (vme->dmode == MVME_DMODE_D16) {
+            status = vme_A24D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+            data = (DWORD)data16;
+         } else if (vme->dmode == MVME_DMODE_D32)
+            status = vme_A24D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+      }
+      
+      memcpy(dst, &data, n_bytes);
+      if (status == 0)
+         n = n_bytes;
+      else
+         n = 0;
+
+   } else {
+
+      n = 0;
+
+      /* A32 */
+      if (vme->am >= 0x08 && vme->am <= 0x0F) {
+         if (vme->blt_mode == MVME_BLT_NONE)
+            status = vme_A32DMA_D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_BLT32)
+            status = vme_A32BLT32_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_BLT32FIFO)
+            status = vme_A32BLT32FIFO_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64)
+            status = vme_A32MBLT64_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64FIFO)
+            status = vme_A32MBLT64FIFO_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_2EVME)
+            status = vme_A32_2EVME_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_2EVMEFIFO)
+            status = vme_A32_2EVMEFIFO_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+      }
+
+      /* A24 */
+      else if (vme->am >= 0x38 && vme->am <= 0x3F) {
+         if (vme->blt_mode == MVME_BLT_BLT32)
+            status = vme_A24BLT32_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_BLT32FIFO)
+            status = vme_A24BLT32FIFO_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64)
+            status = vme_A24MBLT64_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+         else if (vme->blt_mode == MVME_BLT_MBLT64FIFO)
+            status = vme_A24MBLT64FIFO_read(hvme, (u_int32_t) vme_addr, (u_int32_t*) dst, (u_int32_t) n_bytes/4, (u_int32_t*)&n);
+      }
+
+      /* A16 */
+      else if (vme->am >= 0x29 && vme->am <= 0x2D) {
+         if (vme->dmode == MVME_DMODE_D8)
+            for (i=0 ; i<n_bytes ; i++)
+               status = vme_A16D8_read(hvme, (u_int32_t) vme_addr, ((u_int8_t *) dst)+i);
+         else if (vme->dmode == MVME_DMODE_D16)
+            for (i=0 ; i<n_bytes/2 ; i++)
+               status = vme_A16D16_read(hvme, (u_int32_t) vme_addr, ((u_int16_t *) dst)+i);
+         else if (vme->dmode == MVME_DMODE_D32)
+            for (i=0 ; i<n_bytes/4 ; i++)
+               status = vme_A16D32_read(hvme, (u_int32_t) vme_addr, ((u_int32_t *) dst)+i);
+      }
+
+      else
+         status = 1;
+
+      n = n*4;
+   }
+
+   return n;
+}
+
+/*------------------------------------------------------------------*/
+
+unsigned int mvme_read_value(MVME_INTERFACE *vme, mvme_addr_t vme_addr)
+{
+   unsigned int data;
+   WORD data16;
+   int status;
+#ifdef OS_WINNT
+   struct SIS1100_Device_Struct *hvme;
+   hvme = (struct SIS1100_Device_Struct *) vme->info;
+#else
+   int hvme;
+   hvme = vme->handle;
+#endif
+
+   data = 0;
+
+   /* A16 */
+   if (vme->am >= 0x29 && vme->am <= 0x2D) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A16D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+      else if (vme->dmode == MVME_DMODE_D16) {
+         status = vme_A16D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+         data = (DWORD)data16;
+      } else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A16D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+   }
+
+   /* A24 */
+   else if (vme->am >= 0x38 && vme->am <= 0x3F) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A24D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+      else if (vme->dmode == MVME_DMODE_D16) {
+         status = vme_A24D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+         data = (DWORD)data16;
+      } else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A24D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+   }
+
+   /* A32 */
+   else if (vme->am >= 0x08 && vme->am <= 0x0F) {
+      if (vme->dmode == MVME_DMODE_D8)
+         status = vme_A32D8_read(hvme, (u_int32_t) vme_addr, (u_int8_t *) &data);
+      else if (vme->dmode == MVME_DMODE_D16) {
+         status = vme_A32D16_read(hvme, (u_int32_t) vme_addr, (u_int16_t *) &data16);
+         data = (DWORD)data16;
+      } else if (vme->dmode == MVME_DMODE_D32)
+         status = vme_A32D32_read(hvme, (u_int32_t) vme_addr, (u_int32_t *) &data);
+   }
+
+   return data;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_set_am(MVME_INTERFACE *vme, int am)
+{
+   vme->am = am;
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_get_am(MVME_INTERFACE *vme, int *am)
+{
+   *am = vme->am;
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_set_dmode(MVME_INTERFACE *vme, int dmode)
+{
+   vme->dmode = dmode;
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_get_dmode(MVME_INTERFACE *vme, int *dmode)
+{
+   *dmode = vme->dmode;
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_set_blt(MVME_INTERFACE *vme, int mode)
+{
+   vme->blt_mode = mode;
+   return MVME_SUCCESS;
+}
+
+/*------------------------------------------------------------------*/
+
+int mvme_get_blt(MVME_INTERFACE *vme, int *mode)
+{
+   *mode = vme->blt_mode;
+   return MVME_SUCCESS;
+}
Index: /drsdaq/VME/struck/sis3100_vme_calls.c
===================================================================
--- /drsdaq/VME/struck/sis3100_vme_calls.c	(revision 22)
+++ /drsdaq/VME/struck/sis3100_vme_calls.c	(revision 22)
@@ -0,0 +1,919 @@
+ 
+
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.c                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.18                                 */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.2                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         05.11.03                                                */
+/* Modified:         21.06.04                                                */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#include "sis1100_var.h"
+
+
+#include "sis3100_vme_calls.h"
+
+
+
+
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+int vmesysreset(int p)
+{
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x2 /*data*/) != 0x0)   return -1 ;
+  usleep(500000); /* 500ms (min. 200ms) */
+  if (s3100_control_write(p, 0x100 /*offset*/, 0x20000 /*data*/)  != 0x0)   return -1 ;
+  return 0 ;
+}
+
+/********************************/
+/*                              */
+/*    VME Read IRQ Ackn. Cycle  */
+/*                              */
+/********************************/
+
+/* VME Read IRQ Ackn.  Cycles */
+
+int vme_IACK_D8_read(int p, u_int32_t vme_irq_level, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x4000; /*  */
+  req.addr= (vme_irq_level << 1) + 1;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)  return -1 ;
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+
+}
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+/* VME A16  Read Cycles */
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x29; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+
+}
+
+
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x29; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+/* VME A16  Write Cycles */
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x29;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+/* VME A24  Read Cycles */
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x39; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x39; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+/* VME A24  Write Cycles */
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x39;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x39;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x3b;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x38;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+/* VME A32  Read Cycles */
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=1; /* driver does not change any field except data */
+  req.am=0x9; /*  */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=2; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data )
+{
+struct sis1100_vme_req req;
+
+  req.size=4; /* driver does not change any field except data */
+  req.am=0x9; /* "" */
+  req.addr= vme_adr;
+  if (ioctl(p, SIS3100_VME_READ, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  *vme_data = req.data;    /* NEW */
+  return 0 ;
+}
+
+
+
+
+
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=1;
+   block_req.size=4;
+   block_req.am=0x20;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_READ, &block_req)<0)  return -1 ;   /* NEW */
+   *got_num_of_lwords = block_req.num;
+   return block_req.error ;            /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+/* VME A32  Write Cycles */
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=1;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=2;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= (u_int32_t)vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data )
+{
+struct sis1100_vme_req req;
+  req.size=4;
+  req.am=0x9;
+  req.addr= vme_adr;
+  req.data= vme_data;
+  if (ioctl(p, SIS3100_VME_WRITE, &req)<0)   return -1;        /* NEW */
+  if (req.error) return req.error ;
+  return 0 ;
+}
+
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x9;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0xb;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data,
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords)
+{
+struct sis1100_vme_block_req block_req;
+
+   block_req.num=req_num_of_lwords   ; /*  */
+   block_req.fifo=0;
+   block_req.size=4;
+   block_req.am=0x8;
+   block_req.addr=vme_adr ;
+   block_req.data = (u_int8_t*)vme_data ;
+   if (ioctl(p, SIS3100_VME_BLOCK_WRITE, &block_req)<0)  return -1 ;  /* NEW */
+   *put_num_of_lwords = block_req.num;
+   return block_req.error ;        /* NEW */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset;
+  error = (ioctl(p, SIS1100_CTRL_READ, &reg)<0)  ;
+  *data = reg.val;
+  return error ;
+}
+
+
+
+int s3100_control_write(int p, int offset, u_int32_t data)
+{
+struct sis1100_ctrl_reg reg;
+int error ;
+  reg.offset = offset; 
+  reg.val  = data; 
+  error = (ioctl(p, SIS1100_CTRL_WRITE, &reg)<0)  ;
+  return error ;
+}
+
+
+
+
+
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+ 
+/* return_code = length ? */
+/*
+res=write(p_sharc_desc, data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+ 
+  lseek(p_sharc_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sharc_desc, ptr_data, num_of_lwords*4);
+
+  return return_code ;
+}
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=write(p_sdram_desc, ptr_data, num_of_lwords*4);
+  
+/* return_code = length ? */
+/*
+res=write(p, &data, 4);
+    if (res<0) {
+        printf("write(0x%08lx, 0x%x): %s\n", offset, data, strerror(errno));
+        exit(1);
+    }
+    if (res!=4) {
+        printf("write(0x%08lx, 0x%x): res=%d\n", offset, data, res);
+        exit(1);
+    }
+*/    
+
+  return return_code ;
+}
+
+
+
+
+
+
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )
+{
+int return_code ;
+
+  
+  lseek(p_sdram_desc, byte_adr, SEEK_SET);   /* must be longword aligned */
+  return_code=read(p_sdram_desc, ptr_data, num_of_lwords*4);
+
+
+  return return_code ;
+}
Index: /drsdaq/VME/struck/sis3100_vme_calls.h
===================================================================
--- /drsdaq/VME/struck/sis3100_vme_calls.h	(revision 22)
+++ /drsdaq/VME/struck/sis3100_vme_calls.h	(revision 22)
@@ -0,0 +1,212 @@
+/*===========================================================================*/
+/*                                                                           */
+/* File:             sis3100_vme_calls.h                                     */
+/*                                                                           */
+/* OS:               LINUX (Kernel >= 2.4.4                                  */
+/*                                                                           */
+/* Description:                                                              */
+/*                                                                           */
+/* Version:          1.1                                                     */
+/*                                                                           */
+/*                                                                           */
+/* Generated:        18.12.01                                                */
+/* Modified:         21.06.04   MKI                                          */
+/*                                                                           */
+/* Author:           TH                                                      */
+/*                                                                           */
+/* Last Change:                       Installation                           */
+/*---------------------------------------------------------------------------*/
+/* SIS GmbH                                                                  */
+/* Harksheider Str. 102A                                                     */
+/* 22399 Hamburg                                                             */
+/*                                                                           */
+/* http://www.struck.de                                                      */
+/*                                                                           */
+/*===========================================================================*/
+
+
+
+
+
+/**********************/
+/*                    */
+/*    VME SYSReset    */
+/*                    */
+/**********************/
+
+
+int vmesysreset(int p) ;
+
+/********************************/
+/*                              */
+/*    VME Read IRQ Ackn. Cycle  */
+/*                              */
+/********************************/
+
+int vme_IACK_D8_read(int p, u_int32_t vme_irq_level, u_int8_t* vme_data ) ;
+
+
+
+
+/*****************/
+/*               */
+/*    VME A16    */
+/*               */
+/*****************/
+
+int vme_A16D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A16D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A16D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A16D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A16D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A16D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A24    */
+/*               */
+/*****************/
+
+
+int vme_A24D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A24D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A24D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+int vme_A24DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A24MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A24BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A24MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+
+int vme_A24D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A24D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A24D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A24DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A24MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+
+
+/*****************/
+/*               */
+/*    VME A32    */
+/*               */
+/*****************/
+
+
+int vme_A32D8_read(int p, u_int32_t vme_adr, u_int8_t* vme_data ) ;
+int vme_A32D16_read(int p, u_int32_t vme_adr, u_int16_t* vme_data ) ;
+int vme_A32D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data ) ;
+
+
+int vme_A32DMA_D32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32MBLT64_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+
+int vme_A32_2EVME_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32DMA_D32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_no_of_lwords) ;
+
+int vme_A32BLT32FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+int vme_A32MBLT64FIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                          u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+int vme_A32_2EVMEFIFO_read(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* got_num_of_lwords) ;
+
+
+
+int vme_A32D8_write(int p, u_int32_t vme_adr, u_int8_t vme_data ) ;
+int vme_A32D16_write(int p, u_int32_t vme_adr, u_int16_t vme_data ) ;
+int vme_A32D32_write(int p, u_int32_t vme_adr, u_int32_t vme_data ) ;
+
+
+int vme_A32DMA_D32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+int vme_A32BLT32_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+int vme_A32MBLT64_write(int p, u_int32_t vme_adr, u_int32_t* vme_data, 
+                      u_int32_t req_num_of_lwords, u_int32_t* put_num_of_lwords) ;
+
+
+
+
+
+/***********************/
+/*                     */
+/*    s3100_control    */
+/*                     */
+/***********************/
+
+
+int s3100_control_read(int p, int offset, u_int32_t* data) ;
+int s3100_control_write(int p, int offset, u_int32_t data) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sharc      */
+/*                     */
+/***********************/
+
+int s3100_sharc_write(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+int s3100_sharc_read(int p_sharc_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords) ;
+
+
+
+/***********************/
+/*                     */
+/*    s3100_sdram      */
+/*                     */
+/***********************/
+
+int s3100_sdram_write(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords ) ;
+int s3100_sdram_read(int p_sdram_desc, u_int32_t byte_adr, u_int32_t* ptr_data,  u_int32_t num_of_lwords )  ;
Index: /drsdaq/drsdaq.cpp
===================================================================
--- /drsdaq/drsdaq.cpp	(revision 22)
+++ /drsdaq/drsdaq.cpp	(revision 22)
@@ -0,0 +1,243 @@
+/**************************************************************\
+
+  drsdaq.cpp
+
+  Main program for DRS CTX DAQ system. Global initialization, 
+  starts threads for console input and socket interface.
+  
+  Sebastian Commichau, Oliver Grimm
+ 
+\**************************************************************/
+
+#define DEFAULT_CONFIG "../config/DRSDAQ.conf"  // Default configuration file
+#define LOCKFILE "/tmp/CT3_DAQ_LOCK"
+
+#include <stdio.h>
+#include <signal.h>
+#include <pthread.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+
+#include "DAQReadout.h"
+#include "HVFeedback.h"
+
+// Function prototypes
+void ConsoleCommand(DAQReadout *);
+void CCCommand(DAQReadout *);
+void SignalHandler(int);
+void CrashHandler(int);
+
+// ================
+//   Main program
+// ================
+//
+// Several unlikely system call failures are handled via throwing an exception.
+
+int main(int argc, char *argv[]) {
+
+  char str[MAX_COM_SIZE];
+  pthread_t thread_ConsoleCommand, thread_CCCommand;
+  int LockDescriptor;
+ 
+  // Interpret command line (do before lockfile creation in case of exit())
+  if((argc==3 && strcmp(argv[1],"-c")!=0) || argc==2) {
+    printf("Usage: %s [-c <ConfigFile>]    Default file is \"%s\"\n", argv[0], DEFAULT_CONFIG);
+    exit(EXIT_SUCCESS);
+  }
+
+  // Assure only one instance of program runs (lock creator written to log file)
+  if((LockDescriptor = open(LOCKFILE,O_WRONLY|O_CREAT|O_EXCL, S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH)) == -1) {
+    if(errno==EEXIST) {
+      printf("Error: Lock file already existing\n");
+      sprintf(str,"paste %s -s -d ' '",LOCKFILE);
+      system(str);
+    }
+    else printf("Could not create lock file %s (%s)\n", LOCKFILE, strerror(errno));
+    exit(EXIT_FAILURE);
+  }
+  close(LockDescriptor);
+  sprintf(str,"echo Created >%s; date >>%s; echo by $USER@$HOSTNAME >>%s",LOCKFILE,LOCKFILE,LOCKFILE);
+  system(str);
+  
+  system("clear");
+  printf("\n************* DRS readout built %s, %s\n\n",__DATE__,__TIME__);
+
+  // Set signal handlers
+  signal(SIGUSR1, &SignalHandler);
+  siginterrupt (SIGUSR1, true);   // Set SIGUSR1 to interrupt (and not restart) blocking system calls  
+  signal(SIGQUIT, &CrashHandler);
+  signal(SIGILL, &CrashHandler);
+  signal(SIGABRT, &CrashHandler);
+  signal(SIGFPE, &CrashHandler);
+  signal(SIGSEGV, &CrashHandler);
+  signal(SIGBUS, &CrashHandler);
+  signal(SIGTERM, &CrashHandler);
+  signal(SIGINT, &CrashHandler);
+    
+  // Construct main instance
+  DAQReadout dreadout(argc==3 ? argv[2] : DEFAULT_CONFIG);
+
+  // Create threads and mutex for thread synchronization
+  if (pthread_mutex_init(&dreadout.control_mutex, NULL) != 0) {
+    perror("pthread_mutex_init failed");
+    throw;
+  }
+  if ((pthread_create(&thread_ConsoleCommand, NULL, (void * (*)(void *)) ConsoleCommand,(void *) &dreadout)) != 0) {
+    perror("pthread_create failed with console thread");
+    throw;
+  }
+  if ((pthread_create(&thread_CCCommand, NULL, (void * (*)(void *)) CCCommand,(void *) &dreadout)) != 0) {
+    perror("pthread_create failed with socket thread");
+    dreadout.SocketThread = NULL;
+  }
+  else dreadout.SocketThread = &thread_CCCommand;  // Thread should be accessible for sending signals  
+ 
+  // Wait for threads to quit
+  pthread_join(thread_ConsoleCommand, NULL);
+  if(dreadout.SocketThread != NULL) pthread_join(thread_CCCommand, NULL);
+
+  // Destruct mutex and main instance
+  pthread_mutex_destroy (&dreadout.control_mutex);
+  dreadout.~DAQReadout();
+  
+  // Remove lockfile
+  if (remove(LOCKFILE)==-1) {
+    printf("Could not remove lock file %s (%s)\n", LOCKFILE, strerror(errno));
+    exit(EXIT_FAILURE);
+  }
+  exit(EXIT_SUCCESS);
+}
+
+ 
+/********************************************************************\
+
+  ConsoleCommand thread
+
+  Handle console input
+
+\********************************************************************/
+ 
+void ConsoleCommand(DAQReadout *m) {
+
+  char Command[MAX_COM_SIZE], Buf[MAX_COM_SIZE];
+  time_t Time;
+
+  while (!m->Exit) {
+    m->PrintMessage("");	// New prompt
+    if (fgets(Command, MAX_COM_SIZE, stdin)==NULL)
+      m->PrintMessage("Error reading command line input\n");
+
+    strftime(Buf,MAX_COM_SIZE,"%d/%m/%y %X", localtime(&(Time=time(NULL))));
+    m->PrintMessage(MsgToLog, "CONSOLE(%s)> %s",Buf, Command);
+
+    pthread_mutex_lock(&m->control_mutex);
+    m->CommandControl(Command, false);
+    pthread_mutex_unlock(&m->control_mutex);
+  }
+}
+
+
+
+/********************************************************************\
+
+  CCCommand thread
+
+  Listen to commands from socket (Central Control)
+  
+  This thread will block execution in the accept() and read() socket function
+  while waiting for a connection or data. If the exit function is invoked through
+  keyboard command, these blocking functions are interrupted by raising the signal
+  SIGUSR1. Testing on errno=EINTR indicates this termination. The dummy signal
+  handler below is needed to prevent the standard thread termination occurring
+  when this signal is received.
+  
+\********************************************************************/
+
+void CCCommand(DAQReadout *m) {
+
+  int ServerSocket,ConnectionSocket,ReadResult;
+  struct sockaddr_in SocketAddress, ClientAddress;
+  struct hostent *ClientName;
+  socklen_t SizeClientAddress=sizeof(ClientAddress);
+  char Command[MAX_COM_SIZE], Buf[MAX_COM_SIZE];
+  time_t Time;
+
+  // Set up server socket
+  if ((ServerSocket = socket(PF_INET, SOCK_STREAM, 0)) == -1) {
+    m->PrintMessage("Could not open server socket, no remote connection possible (%s).\n", strerror(errno));
+    return;
+  }
+ 
+  SocketAddress.sin_family = PF_INET;
+  SocketAddress.sin_port = htons((unsigned short) m->fCCPort);
+  SocketAddress.sin_addr.s_addr = INADDR_ANY;
+  if (bind(ServerSocket, (struct sockaddr *) &SocketAddress, sizeof(SocketAddress)) == -1)
+  {
+    m->PrintMessage("Could not bind port to socket (%s)\n", strerror(errno));
+    close(ServerSocket);
+    return;
+  }
+  if (listen(ServerSocket, 0) == -1) {
+    m->PrintMessage("Could not set socket to listening (%s)\n", strerror(errno));
+    close(ServerSocket);
+    return;
+  }
+  
+  // Looping to wait for incoming connection  
+  while (!m->Exit) {  
+    if ((ConnectionSocket = accept(ServerSocket, (struct sockaddr *) &ClientAddress, &SizeClientAddress)) == -1) {
+      if (errno!=EINTR) m->PrintMessage("Failed to accept incoming connection (%s)\n", strerror(errno));
+      close(ServerSocket);
+      return;
+    }
+
+    ClientName = gethostbyaddr((char *) &ClientAddress.sin_addr ,sizeof(struct sockaddr_in),AF_INET);
+    m->PrintMessage("Connected to client at %s (%s).\n", inet_ntoa(ClientAddress.sin_addr), ClientName!=NULL ? ClientName->h_name:"name unknown");
+    m->Socket = ConnectionSocket;
+
+    while (!m->Exit) { // Looping as long as client exists
+      memset(Command,0,sizeof(Command));
+      ReadResult = read(ConnectionSocket, Command, MAX_COM_SIZE);
+      if (ReadResult==0) break;  // Client no exisiting anymore
+      if (ReadResult==-1) {
+	if (errno!=EINTR) m->PrintMessage("Error read from socket (%s)\n", strerror(errno));
+	break;
+      }
+      
+      strftime(Buf,MAX_COM_SIZE,"%d/%m/%y %X", localtime(&(Time=time(NULL))));
+      m->PrintMessage(MsgToLog,"SOCKET(%s)> %s%s",Buf, Command, Command[strlen(Command)-1]=='\n' ? "":"\n");
+      m->PrintMessage(MsgToConsole,"SOCKET> %s%s",Command, Command[strlen(Command)-1]=='\n' ? "":"\n");
+     
+      pthread_mutex_lock(&m->control_mutex);       
+      m->CommandControl(Command, true);	// Process CC command
+      pthread_mutex_unlock(&m->control_mutex);
+      m->PrintMessage("");	// New prompt
+    }
+    m->Socket = -1;
+    m->PrintMessage("Disconnected from client.\n");
+    close(ConnectionSocket);
+  } 
+  close(ServerSocket);
+  m->PrintMessage("Server socket closed.\n");
+}
+
+
+/********************************************************************\
+
+  Signal handlers
+
+\********************************************************************/
+
+// Remove lock file before running default signal code
+void CrashHandler(int Signal) {
+  remove(LOCKFILE);
+  printf("Caught signal number %d. Removing lockfile and performing standard signal action. Good luck.\n",Signal);
+  signal(Signal, SIG_DFL);
+  raise(Signal);
+}
+
+// Dummy signal handler to return from blocking syscalls
+void SignalHandler(int Signal) {
+  return;
+}
