NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Software > PlanOfRecordC52007 > ModificationRequest12C507
   Changes | Index | Contents | Search | Statistics | Go

Add DIO interface to Linux Holography Backend Software

Modification Request #12 (C5, 2007)



1. Introduction

The holography backend was originally deployed years ago on a VxWorks system with an MCB interface. The system was limited to 200 ms dumps due to the combination of the VxWorks OS and the MCB interface. We need the backend to dump much faster in order to properly map the GBT's panels.

2. Background

Back in the day, the Holography backend was connected to gbtaio1, a 68040 VxWorks single-board. This worked fairly well for slow dumps, but was the limiting factor in trying to do holography on the telescope panels. We are in the process of replacing this MCB interface with a parallel interface based on an off-the-shelf parallel interface card. The card will allow the backend to dump in less than 20 milliseconds, providing the order of magnitude increase in speed needed. The parallel card will be plugged into a Linux box co-located in the receiver room shielded rack with the backend.

This MR depends on the successful completion of ModificationRequest1C307.

3. Requirements

Requirements for this MR are fairly straightforward. A new host platform and operating system is required, and a new interface to the data stream and the command stream will be created. No new manager parameters or sampler values will be needed, that is, the external interface to the M&C system will remain unchanged, except for the volume of data recorded, and the legal command values for integration time. It is not a requirement to maintain compatability with the vxWorks platform.

Initial time-line requirement for completion of this MR is 01 August 2007.

4. Design

In ModificationRequest1C307, the manager was ported to Linux and the MCB interface retained. The final configuration, as delivered by this MR, shall use a digital I/O card. A hardware abstraction layer/class will define logical/functional methods for the manager to interact with, independent from the actual hardware interface. For example, setAttenuatorLevel(x) will be implemented by the hardware abstraction as a MCB write call or a write to the digital I/O card. The MCB interface uses a busy-wait poll while waiting for data, in contrast the parallel digital I/O setup will allow an interrupt driven approach. The hardware abstraction will appear as being event-driven, that is it will appear to be interrupt driven in all cases.

The data flow out of the backend will be managed by the hardware abstraction. When new data is available, the software will read the data through the MCB or PIO port and timestamp the data. A callback will be made to the manager, to indicate new data is available. The manager will then determine if the data is to be written, and if so the data will be sent to the FITS writer class for writing into a FITS file.

4.1 Hardware Architecture

The existing MCB interface will be replaced by a design which uses 32 bits of a 48-bit digital I/O card. 16 bits will be used for data, and 8 bits for address. The remaining bits will be used for device control. Interrupts will be generated by the digital I/O card indicating when either data is available or an urgent condition exists. An unofficial block diagram is shown below.

Hardware Architecture
holohwarch.png
Figure 1

4.2 Software Architecture

The software architecture will be similar in nature to other M&C managers. Device functionality is encapsulated by the HolographyDevice class, which employs a "has-a" relationship with a device interface class such as the SIB or DIO driver (Modelled after the adapter/bridge patterns). The encapsulation should include a mechanism for simulation. Backend data is recorded by the HolographyFits writer class. At the core is the Holography manager, which ties everything together and provides an implementation of the device's parameter set.

Software Architecture
Holography_Diagrams_PortedDesign_TopLevel_r2.jpg
Figure 2

I've noted a number of items which exist in the current code, and should be addressed. The items include:

4.3 Software Code Modules

4.3.1 Hardware Abstraction Class

The hardware interface class (HolographyDevice) defines the following logical methods for interacting with the hardware. The implementation of the hardware interface will be controlled by values in a configuration file.

Each of these methods is described below:

set_starttime(TimeStamp&)
This method informs the hardware interface that data acquisition should begin at the time specified. If the specified time is zero, then the data acquisition should begin as soon as practicable.
reset()
This method will end data acquisition, and reset the hardware to a known quiescent state.
init_data_callback()
This method is used to setup the callback to a manager method, which will handle the incoming data. The manager method callback should take a single HolographyData parameter. Note that this method once registered will be called even after the scan stop-time is reached, until a reset() is called.
init_error_callback()
This method is used to setup the callback to a manager method, which will handle the errors from the Holography backend. The manager method callback should take a single HolographyError parameter.
set_integration_time(float)
This method sets the hardware integration time in seconds. The value must be in multiples of TBD. If a value cannot be exactly set, the value will be rounded to the nearest possible value.
set_cycles_per_integration(int)
This method set the number of integrations to be accumulated in the hardware before being read.
set_attenuator_level(float)
This method sets the attenuator level for the main signal (also designated as the 'test' signal). Possible values are: TBD If an intermediate value is given, the value will be rounded to the nearest legal value.
set_reference_attenuator_level(float)
This method sets the attenuator level for the reference signal. Possible values are TBD. If an intermediate value is given, the value will be rounded to the nearest legal value.

These methods will be tailored specifically for the parallel DIO card. Specific information about the required calls to make within the PDIO instance of the HolographyDevice, to interface with the parallel DIO card will be determined in consultation with TimWeadon.

Typical manager-hardware interface class will be as follows:

  1. Construct the HolographyDevice
  2. Setup data and error callbacks by calling init_data_callback() and init_error_callback()
  3. From the manager parameter activate methods, set the corresponding values. (e.g. set_cycles_per_integration() .)
  4. From the manager's doActivate() method, call set_starttime() with the activated starttime.
  5. Handle data callbacks as data arrives.
  6. Handle error conditions when the error callback occurs.
  7. Call reset() to end data acquisition.
  8. Repeat 3-7 as necessary.
  9. Destruct HolographyDevice Object. (This will call reset() prior to deletion.)

5. Documents and Specifications

The documents required for this modification are found in the drawing archive in the directory /home/doc/drawings/archive/gbtelec/35205. Project 35205 is the Holography project. The schematic for the interface is 35205S008. Documentation on the Holography backend can be found in the document http://www.gb.nrao.edu/GBT/memos/memo101.html. A simple writeup in MS-Word format can be found in d006.doc in the 35205 directory. The author of this document is not declared, it was written in 1997 at the time of the new interface card implementation. A more detailed document, in MS-Excel format, can be found in the 35205 directory named CorrelatorREVA?.xls. This document was originally written by Steve White then later updated by Tim Weadon in May 2007. This document provides layout of the command registers and data registers. The memo gives you detailed information about each register.

Within the SDD documentation set, GBT Software Project Note GBT/SPN/009 descrbing the Holography FITS data file format and content will be restored or created, and updated to reflect data pedigree.

6. Deployment Checklist

What has to get done to integrate this completely into the system. This checklist must be completed before Cycle Integration Testing begins.

7. Test Plan

We will set up the system in the lab for testing. A simulator for the parallel interface should be developed to allow testing apart from the backend hardware to avoid linking the hardware and software modifications more than necessary. A full system test will include dumping simulated data through the simulated parallel port, and writing it to disk.

7.1 Internal Testing

The modified system should be throughly tested both using a simulated data stream, and the actual backend. The following tests should be completed at a minimum:

An RTAI-linux based machine is identified for use in testing, hostname cetus.

7.2 Sponsor Testing

7.3 Integration/Regression Tests

Confirm that the Astrid/Cleo/FITS writers are all cooperating


SPECIAL: Design Review Links

These links are to documents requested for Design Review meeting to be help 24 March 2008.


Signatures

APPROVED: I acknowledge that my request is mostly contained in this MR, and if the SDD delivers exactly what I specified, I might be happy.

ACCEPTED: I acknowledge that I have validated the completed code according to the acceptance tests, and I am happy with the results.

Written DONE - RonGrider - 24 July 2007
Checked DONE - TimWeadon - date
Approved by Sponsor DONE - JohnFord - 10 Aug 2007
Approved by CCC DONE - RonMaddalena - 31 Oct 2007
Accepted/Delivered by Sponsor symbol - name - date

Symbols:


CCC Discussion Area

-- RonGrider - 19 Jul 2007

Attachment: sort Action: Size: Date: Who: Comment:
holohwarch.png action 5372 23 Jul 2007 - 19:52 RonGrider  
Holography_Diagrams_PortedDesign_TopLevel_r2.jpg action 165674 23 Jul 2007 - 20:01 RonGrider  
HolographyMR12C507_UML_DesignDiagrams.vsd action 363008 21 Mar 2008 - 00:45 RonGrider  
HolographyMR12C507_UML_ClassDiagram.jpg action 51089 21 Mar 2008 - 00:45 RonGrider  
HolographyMR12C507_UML_SequenceDiagram.jpg action 147198 21 Mar 2008 - 00:46 RonGrider  
Component_Diagram_for_RT_in_Holography_Manager.ppt action 62464 21 Mar 2008 - 00:49 RonGrider  
Component_Diagram_for_RT_in_Holography_Manager.pdf action 90505 21 Mar 2008 - 00:49 RonGrider  

Topic ModificationRequest12C507 . { Edit | Attach | Ref-By | Printable | Diffs | r1.7 | > | r1.6 | > | r1.5 | More }
Revision r1.7 - 21 Mar 2008 - 00:57 GMT - RonGrider
Parents: PlanOfRecordC52007
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.