UCD Manual

Charlie Briegel

Accelerator Controls Group

X4510

May 21, 1993

The UCD (Universal Clock Decoder) broadcasts the Tevatron clock events at 15Hz on Ethernet and optionally on token ring. The facility is provided primarily to supply these events for consoles which have no UCD hardware, but require this information for data acquisition and various displays.

Implementation

The UCD is a VME crate using a Force CPU40 with a Eagle-01C daughter board for Ethernet connectivity. The remaining set of VME boards are the SSM, UCD, and token ring. The SSM (System Services Module) provides bus arbitration, the token ring address, conditions the UCD functionality via the software readable switches on the front panel and the up/down counter, and provides various diagnostics. Diagnostics are displayed through the video port controllable with the A/B switch , the front panel leds, and the 4 banks of 16 character messages on the front panel. While the SSM is not absolutely required, the added diagnostics and functionality justify its existence in any case. The token ring card is added as a redundant path for ACNET communications and an optional group functional multicast of the same set of events provided on Ethernet. The UCD board acquires the Tevatron clock events via a FIFO of selectable events or a bitmap of the events. The board can also receive Beam Synch and MDAT information. The retrieval of this information is not implemented penfing a request for such data.

Functionality

The task of the UCD is to put a formatted multicast Ethernet frame of Tevatron events on the network. The structured of the frame is as described in the following "C" structure:

typedef struct {

unsigned char event;

unsigned short int tstamp;

} EVNT;

struct mc_mess {

unsigned short int length;

unsigned short int format;

unsigned long int vms_time[2];

unsigned long int ticks;

unsigned short int ev0fts;

unsigned char nevents;

unsigned char event[MAX_EVNT*3];

};

The structure was defined by the UNIBUS UCD implementation which only had a 16-bit time stamp. The EVNT structure was not word aligned and the same structure was maintained for Ethernet. Since the GNU C compiler forces word alignment in the structure, the event structure must be viewed as 3 chars. The vms_time is specified as in the tod structure below (year,month,day,hours,mins,secs,tick,rate) derived from the SSM time-of-day clock which is set to the NBS time every 10 minutes. The following structure defines the token ring frame which does not conform to the historical structure:

typedef struct {

unsigned char event;

unsigned char l_tstamp;

unsigned short int h_tstamp;

} TR_EVNT;

struct tr_mess {

unsigned short int format;

struct tod dt;

unsigned long int ticks;

unsigned short int ev0fts;

unsigned short int nevents;

union {

TR_EVNT e_s[MAX_EVNT];

long int event_stamp[MAX_EVNT];

} event;

};

This structure provides the full precision (24 bits) of the VME UCD implementation and an aligned data structure. Generally, the Ethernet frame is padded to conform to the 60 bytes minimum frame size. Hopefully, the Ethernet structure will be enhanced to the token ring specification.

The frame is delivered at 15 Hz to the Ethernet multicast address "AB00 0400 42A6" (the test multicast adds one to this address). The token ring group functional address is "C000 01000 0000" and the packet is sent via an ACNET USM(unsolicited message) to the task "UCD ."

The event data is gathered from the FIFO of events in the UCD except for 720 Hz events. This event is sent if the event has occurred at least once in the last 15 Hz. The 720 Hz event is derived from the bitmap of events and the time stamp is the last 720 Hz bitmap event with only 16 bits of precision.

If the Tevatron clock goes away, the UCD will automatically generate an internal 15 Hz event. Thus, the events will still come out at 15 Hz, but the only event collected will be the artificial 15 Hz event.

Also, the 02 event will not be available, but the time stamp will be reset via a software timer every 5 seconds to mimic the normal activity for fast time plot.

Multicast of the token ring frame is controlled by the specified (SSM_Help) SSM front panel dip switch. The specified led bank (SSM_Help) is used to indicate the time and duration to process the Ethernet and token ring multicast. Also, the led bank is used to indicate the time to process the the 15 Hz task

The remaining task is to provide diagnostics and make the system highly available. The event capture is the primary diagnostic. The user specified set of captured events are circularly captured to provide a reasonable time frame to diagnose problems. Ethernet diagnostics were included because the CPU40 could not keep up with promiscuous receive mode. This problem was solved by setting a filter of received multicast addresses.

Redundancy

The UCD provides high availability to the user by implementing a redundant on-line UCD in several possible configurations. The two UCDs have IP names "UCDA" and "UCDB" and run the same identical code. Three redundant configurations are provided to the user. The configurations are configured by the SSM front panel dip switch and optionally an extra SSM card. The current processor mode can be determined by the status bar on the video output, the UCD_Diagnostics, or the SSM rotating bank display.

Primary/Bkup

The UCD can be configured so one crate is the primary while the other crate is the backup. Thus, if the primary is up, it always executes the required job. It is up to the backup to determine if the primary is up by listening for its output as if it was a user. If the backup no longer receives the multicast frame, it switches into primary mode until the primary comes on-line again. The primary never listens for multicast frames. Currently, 2 seconds is the default time for the backup to wait before switching to the primary. While the SSM up/down counter can override this number, if a bus reset occurs, the up/down counter will reset to zero and the default value is used.

Bkup/Bkup

The UCD can be configured so both crates are in backup mode. This implies each crate equally competes to become primary . Both crates listen for the UCD multicast address. To prevent a war, the time out must be different between the two crates. The low bit of the token ring address is used to distinguish the two default time-outs or the up/down counter in the two SSMs must be different numbers. Even with this precaution, the UCD could war, but only for a short time until they become synchronous with respect to the time-out period and then one of the two processors will predictably become the winner. The real distinction from the Primary/Bkup method is the backup which became primary will remain primary until it goes down.

PKTR & UCD Combination Software

The PKTR, is a similar implementation with redundant requirements. Since the PKTR had similar software and hardware requirements and neither the UCD or PKTR are CPU bound, the ability to use an on-line PKTR as a backup to the UCD and vice-versa became a relatively simple variation of the software. The problems are in sharing what was once thought to be a resource, the SSM. The addition of an extra SSM solves the problem, but the software was further refined so the PKTR and UCD could function with only one SSM. This configuration is more cost effective and provides a reasonable level of protection. Since equipment exists for one of the previous configurations, this mode remains an experiment until resources become tight.

Modules

C Source Entries Functions

initsk_ucd.c

initsk_ucd initialization of SSM, ACNET, & rotating display of SSM

ucdini.c

ucd initialization of UCD (ACNET task "UCD "), interrupt reception, and clears time stamp if TCLOCK is absent

init02evt interrupt routine to trigger ucd02evt task

init15hz interrupt routine to trigger ucd15hz task

initfifo interrupt routine to trigger ucdfifo task

ucd_rq receiver of token ring group functional multicast

ucd15hz.c

ucd15hz initializes modes, Ethernet hook, then processes 15 Hz work:

1. Tests for mode changes and acts appropriately

2. Collects Bitmap & FIFO events for Ethernet and token ring

3. Processes events for diagnostics and video output

ether_rcv_UCD reinitializes the UCD_Bkup_Cnt if received UCD multicast

UCD_VID_Reset internally used reset of Bitmap and Fifo video displays

UCD_VID_Reset_Ether internally used reset of Ethernet video displays

UCD_VID_Reset_TL internally used reset of Timeline video displays

UCD_VID_Fifo user callable Fifo video display

UCD_VID_Bitmap user callable Bitmap video display

UCD_VID_Ether user callable Ethernet video display

UCD_VID_Timeline user callable Timeline video display

UCD_VID_Line user callable to use lines in Ethernet video display

UCD_VID_Bar user callable to use bars in Ethernet video display

UCD_VID_Graph user callable to use graph in Ethernet video display

UCD_VID_Stop user callable to stop video display

UCD_VID_Carousel user callable to start video display carousel

UCD_VID_Carousel_Timer internally used to time carousel

A_HASC_int interrupt routine to trigger A_VID_Switch

A_VID_Switch switch video display in forward direction

B_HASC_int interrupt routine to trigger B_VID_Switch

B_VID_Switch switch video display in backward direction

ucdfifo.c

ucdfifo prints message fifo is half full, no other action taken

ucd02evt.c

ucd02evt checks if timer has been reset

ucdfnc.c

UCD_Status print UCD Status of set bits

UCD_Status_All print UCD Status of all bits

Turn_On_02 diagnostic use to turn on 02 fifo capture

Turn_Off_02 diagnostic use to turn off 02 fifo capture

Turn_On_0F diagnostic use to turn on 0F fifo capture

Turn_Off_0F diagnostic use to turn off 0F fifo capture

Clear_Time_Stamp diagnostic use to clear time stamp via command

UCD_Command diagnostic use to send any UCD command

UCD_Dump dump UCD memory (base offset is implied and long word access only )

UCD_Modify modify UCD memory

UCD_Help Help of UCD specific commands

UCD_SSM_Help Help of SSM utilization

UCD_VID_Help Help of video display commands

UCD_Diagnostics user command for general diagnostics

UCD_Summary user command for summary of super cycle events

UCD_All user command for all capture of super cycle events

UCD_Last user command for last capture of super cycle events

UCD_Current user command for current capture of super cycle events

UCD_SC user command for specified capture of super cycle events

UCD_Capture_Add user command for adding an event to capture

UCD_Capture_Del user command for deleting an event to capture

UCD_Capture_Events user command for printing the captured set of events

set_led internally used routine to set a led

reset_led internally used routine to reset a led

ssm_dip_on internally used routine to test SSM front panel dip switch

set_promiscus_rcv internally used routine to set Ethernet in promiscuous mode

set_multicast_rcv internally used routine to specify filter hash code for Ethernet

set_all_multicast internally used routine to set Ethernet in all multicast mode

set_UCD_multicast_rcv internally used routine to set Ethernet to receive UCD multicasts

multicast_filter_hash internally used routine to retrieve filter hash from Ethernet adr

UCD User Commands

UCD user commands can be entered through the local console or a remote-login. The help commands are provided as a quick reference to user commands. Also, this reference will always be more up-to-date than the document you are currently reading. This document is only a reference and does not replace the on-line information.

Remember , in vxWorks, all commands are case sensitive. The following bolded commands are typed after the vxWorks prompt "xxxx->" with a subsequent implied <CR>.

UCD_Help

Print help for UCD user commands.

UCDB_NEW->UCD_Help

UCD_Help

UCD_SSM_Help

UCD_VID_Help

UCD_Status(status_mask) /*0 implies 0xFFFF*/

UCD_Status_All(status_mask) /*0 implies 0xFFFF*/

UCD_Diagnostics

UCD_SC(SC_begin_index,number,event_mask)

UCD_Summary

UCD_Last(event_mask)

UCD_Current(event_mask)

UCD_All(event_mask)

UCD_Capture_Add(event)

UCD_Capture_Del(event)

UCD_Capture_Events

UCD_Dump(address,len)

UCD_Modify(address)

UCD_Command(cmd)

UCD_SSM_Help

Print help for utilization of the SSM for diagnostics and configuration.

UCDB->UCD_SSM_Help

UCD_SSM_Help

SSM Displays UCD Mode

SSM Front Panel Led #3

7 UCD 15 Hz interrupt execution

1 UCD Token Ring transmission

0 UCD Ethernet transmission

SSM Front Panel Switches

7 (left) - UCD is the Backup, otherwise Primary

Note: arbitration is two UCDs in Backup

SSM counters should be NE and LT 0xF

6 (left) - UCD Group Functional on Token Ring

5 - Unused

4 (left) - General Diagnostic Output

3 - Unused

2 - Unused

1 (left) - if Test Mode, listen for multicasts

0 (left) - Test Mode, multicast to 0xA7

UCD_VID_Help

Print help for video displays. The A and B push buttons on the SSM can be used to manually scroll the video displays in a forward or backward sequence. The sequence is similar to the carousel. The HASC (human and software settable control) switches are pushed twice for each interrupt to the processor.

UCDB->UCD_VID_Help

UCD_VID_Help

A HASC scroll forward, B HASC scroll backward

UCD_VID_Stop

UCD_VID_Reset(reset) - 1=clear Fifo or Bitmap events

UCD_VID_Bitmap

UCD_VID_Fifo

UCD_VID_Ether(interval) - interval in 15Hz

UCD_VID_Carousel(interval) - interval in Secs

UCD_VID_Timeline(beg,end) - SC time in Secs

UCD_VID_Stop

Stops the UCD video display. This will freeze a display or terminate the carousel of displays.

UCD_VID_Reset(reset)

If the reset argument is TRUE and either the Bitmap or Fifo is actively being displayed, then all events for this super cycle are cleared. If the Bitmap or Fifo is the active display, the display is regenerated.

UCD_VID_Bitmap

Selects as the current video display the current set of captured events from the UCD bitmap. Super cycle reset automatically clears the events displayed. The current super cycle number and the super cycle time is displayed in the header. The super cycle number is useful for diagnostic commands of saved events (i.e. UCD_SC).

UCD_VID_Fifo

Selects as the current video display the current set of captured events from the UCD fifo. Super cycle reset automatically clears the events displayed. The current super cycle number and the super cycle time is displayed in the header. The super cycle number is useful for diagnostic commands of saved events (i.e. UCD_SC).

The fifo does not normally collect the 720 Hz event which is monitored at 15 Hz by looking at the UCD bitmap.

UCD_VID_Ether(interval)

Selects the Ethernet frames be plotted at the frequency specified (1 = 15Hz, 15=1Sec, 900=1Min. are typical frequencies). The queue of frames is 120 deep and the display is automatically sized depending on the largest received frame count. Executing the command with a different frequency clears the queue and the maximum is zeroed. If the frequency is the same, then the maximum received frame count in the current saved queue is used to determin the graph size.

The display can be modified to plot lines, bars, or graph by executing these corresponding commands; UCD_VID_Line, UCD_VID_Bar, or UCD_VID_Graph. Further, the collected set of Ethernet frames is dependent on the mode of the processor and the configuration of the Ethernet controller. If the processor is selected as Primary, there is no reason to monitor the Ethernet so no packets will be displayed. If the processor is selected as BKUP or TEST with monitoring on, then the Ethernet received packets is dependent on the configuration of the Ethernet controller. Normally, the controller is only enabled for broadcasts, the UCD multicast and UCD test multicast addresses. While these conditions can be modified, this is not recommended, since it can affect the performance of the UCD. Originally, the UCD was forced to promiscuously receive all traffic to detect the presence of a UCD multicast. If the Ethernet was busy, the UCD as implemented could not keep up with traffic and several multicasts would be lost. The solution was to limit the set of messages into the controller by modifying the initialization parameters of the Ethernet chip. vxWorks does not provide a direct calling sequence to minimize the incoming traffic.

UCD_VID_Carousel(interval)

This command spawns a task which acts as a timer to switch between the set of video displays. The current set of displays are switched in the following sequence: UCD_VID_Fifo, UCD_VID_Bitmap, UCD_Ether(last frequency specified or 15Hz), UCD_VID_Timeline(last timlin_beg or 0, last timlin_end or 160), then back to the beginning of the sequence. The default interval is 10 Secs.

The carousel can only be terminated by UCD_VID_Stop

UCD_VID_Timeline(beg,end)

Selects a graphical video display of the first 16 events in the set of captured events. All other events which are captured are placed on the row of XX events. The beg and end arguments are an integer number of seconds.

UCD_Status(status_mask)

Print the UCD status of set bits ored with the argument status_mask. If status_mask is not specified or zero, the all bits are monitored.

UCDB->UCD_Status

TClock Enable

BSync NOT Present

MDat NOT Present

Output Mode Select 2

Time Stamp Clock Select 1

TClock Bit Map Clear on Read

Int Vector FIFO Empty

BSync Event FIFO Empty

UCDB->UCD_Status(0x40)

BSync NOT Present

UCD_Status_All(status_mask)

Print the UCD status of all bits ored with the argument status_mask. If status_mask is not specified or zero, the all bits are monitored.

UCDB->UCD_Status_All

TClock Enable

**NOT** BSync Enable

**NOT** MDat Enable

**NOT** Transmission Error

**NOT** Spare BD04

**NOT** TClock NOT Present

BSync NOT Present

MDat NOT Present

**NOT** Output Mode Select 0

**NOT** Output Mode Select 1

Output Mode Select 2

**NOT** Spare BD11

**NOT** Time Stamp Clock Select 0

Time Stamp Clock Select 1

TClock Bit Map Clear on Read

**NOT** BSync Bit Map Clear on Read

Int Vector FIFO Empty

**NOT** Int Vector FIFO Full

**NOT** TClock Event FIFO Empty

**NOT** TClock Event FIFO Half Full

**NOT** TClock Event FIFO Full

BSync Event FIFO Empty

**NOT** BSync Event FIFO Half Full

**NOT** BSync Event FIFO Full

UCDB_NEW->UCD_Status_All(0x3)

TClock Enable

**NOT** BSync Enable

UCD_Diagnostics

Print a generally useful set of internal diagnostics primarily intended for the programmer to monitor the system.

UCDB->UCD_Diagnostics

UCD is Backup for providing Console Clock Events

Total UCD 15 Hz = 74274; Total Ethernet multicast =0

min_UCD_Bkup_Cnt = 29; UCD_Bkup_Cnt = 30

max_promisc_rcv = 12; promisc_rcv = 2

EVT_TOP=0, EVT_END=2940, EVT_TOT=2940 (2.24304%)

SC_TOP=0, SC_END=30, SC_TOT=30 (2.08333%)

0: SC Event Index 92 - 13:13:13:61/100 MAY 20 1993

UCD 15 Hz = 2370; Ethernet multicast = 0, difference = 2370

29: SC Event Index 2847 - 14:30:33:41/100 MAY 20 1993

UCD 15 Hz = 71970; Ethernet multicast = 0, difference = 71970

Delta UCD 15 Hz = 69600; Delta Ethernet multicast =0

**********SC TOD**********

29: SC Event Index 2847 - 14:30:33:41/100 MAY 20 1993

15Hz event count = 2304 (153.599999 Secs)

Running Super Cycle = 153.44

UCD_SC(SC_begin_index,number,event_mask)

Events are saved in ram to be listed with this command. UCD_Summary, UCD_Last, UCD_Current, and UCD_All simply make a call to this routine with the appropriate arguments.

The super cycle is a number used to index an circular array of structures which point to a circular array of events. Depending on either the frequency of super cycles or the number of events, one of the structures will wrap before the other. The normal time to wrap for the default set of events and the current cycle time of approximately 160 Secs. is 4 days. The mask is anded with all events. This implies a mask of 0x20 will return all 0x2X events. Currently, this appears to be the required feature. The time return is a floating point value to the accuracy of the UCD clock which is set at 10 KHz. The clock is reset at each 02 event, but times are accumulated so the time is relative to the super cycle.

UCDB->UCD_SC(28,1,0x40)

**********SC TOD**********

28: SC Event Index 2752 - 14:27:53:42/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = 0

End of Super Cycle = 160.041

UCDB->UCD_SC(28,1,0xFF)

**********SC TOD**********

28: SC Event Index 2752 - 14:27:53:42/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 29, SC time = 0

Event 41, SC time = 0

Event 29, SC time = 2.6007

Event 02, SC time = 2.8674

Event 29, SC time = 5.2013

Event 29, SC time = 7.802

Event 02, SC time = 7.8687

Event 29, SC time = 10.4027

Event 02, SC time = 12.87

Event 29, SC time = 13.0033

Event 29, SC time = 15.604

Event 02, SC time = 17.8713

Event 29, SC time = 18.2047

Event 29, SC time = 20.8054

Event 02, SC time = 22.8726

Event 29, SC time = 23.406

Event 29, SC time = 26.0067

Event 02, SC time = 27.8738

Event 29, SC time = 28.6073

Event 29, SC time = 31.208

Event 02, SC time = 32.8751

Event 29, SC time = 33.8086

Event 29, SC time = 36.4093

Event 02, SC time = 37.8763

Event 29, SC time = 39.0099

Event 29, SC time = 41.6106

Event 02, SC time = 42.8776

Event 29, SC time = 44.2113

Event 29, SC time = 46.8119

Event 02, SC time = 47.8788

Event 29, SC time = 49.4125

Event 29, SC time = 52.0132

Event 02, SC time = 52.8801

Event 29, SC time = 54.6139

Event 29, SC time = 57.2146

Event 02, SC time = 57.8814

Event 29, SC time = 59.8152

Event 29, SC time = 62.416

Event 02, SC time = 62.8827

Event 29, SC time = 65.0166

Event 29, SC time = 67.6173

Event 02, SC time = 67.884

Event 29, SC time = 70.2179

Event 29, SC time = 72.8186

Event 02, SC time = 72.8853

Event 29, SC time = 75.4193

Event 02, SC time = 77.8866

Event 29, SC time = 78.0199

Event 29, SC time = 80.6206

Event 02, SC time = 82.8879

Event 29, SC time = 83.2213

Event 29, SC time = 85.822

Event 02, SC time = 87.8892

Event 29, SC time = 88.4226

Event 29, SC time = 91.0233

Event 02, SC time = 92.8905

Event 29, SC time = 93.624

Event 29, SC time = 96.2247

Event 02, SC time = 97.8917

Event 29, SC time = 98.8252

Event 29, SC time = 101.426

Event 02, SC time = 102.893

Event 29, SC time = 104.027

Event 29, SC time = 106.627

Event 02, SC time = 107.894

Event 29, SC time = 109.228

Event 29, SC time = 111.829

Event 02, SC time = 112.895

Event 29, SC time = 114.429

Event 29, SC time = 117.03

Event 02, SC time = 117.897

Event 29, SC time = 119.63

Event 29, SC time = 122.231

Event 02, SC time = 122.898

Event 29, SC time = 124.832

Event 29, SC time = 127.433

Event 02, SC time = 127.899

Event 29, SC time = 130.033

Event 29, SC time = 132.634

Event 02, SC time = 132.901

Event 29, SC time = 135.235

Event 29, SC time = 137.835

Event 02, SC time = 137.902

Event 29, SC time = 140.436

Event 02, SC time = 142.903

Event 29, SC time = 143.037

Event 29, SC time = 145.637

Event 02, SC time = 147.905

Event 29, SC time = 148.238

Event 29, SC time = 150.839

Event 02, SC time = 152.906

Event 29, SC time = 153.44

Event 29, SC time = 156.04

Event 02, SC time = 157.907

End of Super Cycle = 160.041

UCD_Summary

Provides a quick but sometimes long summary of each super cycle. A control-C aborts the shell to return to the prompt.

UCDB->UCD_Summary

**********SC TOD**********

0: SC Event Index 92 - 13:13:13:61/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

End of Super Cycle = 160.04

**********SC TOD**********

1: SC Event Index 187 - 13:15:53:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

End of Super Cycle = 160.041

**********SC TOD**********

2: SC Event Index 282 - 13:18:33:61/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

End of Super Cycle = 160.041

**********SC TOD**********

3: SC Event Index 377 - 13:21:13:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

End of Super Cycle = 160.041

**********SC TOD**********

4: SC Event Index 472 - 13:23:53:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

End of Super Cycle = 160.041

etc. too long to print...

UCD_Last(event_mask)

The last full super cycle's events are printed by UCD_SC.

UCDB->UCD_Last(0x20)

**********SC TOD**********

31: SC Event Index 3037 - 14:35:53:35/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 29, SC time = 0

Event 29, SC time = 2.6007

Event 29, SC time = 5.2013

Event 29, SC time = 7.802

Event 29, SC time = 10.4027

Event 29, SC time = 13.0033

Event 29, SC time = 15.604

Event 29, SC time = 18.2047

Event 29, SC time = 20.8054

Event 29, SC time = 23.406

Event 29, SC time = 26.0066

Event 29, SC time = 28.6073

Event 29, SC time = 31.208

Event 29, SC time = 33.8086

Event 29, SC time = 36.4093

Event 29, SC time = 39.0099

Event 29, SC time = 41.6107

Event 29, SC time = 44.2114

Event 29, SC time = 46.8121

Event 29, SC time = 49.4127

Event 29, SC time = 52.0134

Event 29, SC time = 54.6141

Event 29, SC time = 57.2147

Event 29, SC time = 59.8154

Event 29, SC time = 62.4162

Event 29, SC time = 65.0169

Event 29, SC time = 67.6176

Event 29, SC time = 70.2184

Event 29, SC time = 72.8191

Event 29, SC time = 75.4198

Event 29, SC time = 78.0204

Event 29, SC time = 80.6212

Event 29, SC time = 83.2219

Event 29, SC time = 85.8226

Event 29, SC time = 88.4233

Event 29, SC time = 91.024

Event 29, SC time = 93.6246

Event 29, SC time = 96.2253

Event 29, SC time = 98.8259

Event 29, SC time = 101.427

Event 29, SC time = 104.027

Event 29, SC time = 106.628

Event 29, SC time = 109.229

Event 29, SC time = 111.829

Event 29, SC time = 114.43

Event 29, SC time = 117.031

Event 29, SC time = 119.632

Event 29, SC time = 122.232

Event 29, SC time = 124.833

Event 29, SC time = 127.434

Event 29, SC time = 130.035

Event 29, SC time = 132.635

Event 29, SC time = 135.236

Event 29, SC time = 137.836

Event 29, SC time = 140.437

Event 29, SC time = 143.038

Event 29, SC time = 145.638

Event 29, SC time = 148.239

Event 29, SC time = 150.84

Event 29, SC time = 153.44

Event 29, SC time = 156.041

End of Super Cycle = 160.042

UCD_Current(event_mask)

The current super cycle's events are printed by UCD_SC.

UCDB->UCD_Current(0x02)

**********SC TOD**********

32: SC Event Index 3132 - 14:38:33:29/100 MAY 20 1993

15Hz event count = 1128 (75.200000 Secs)

Event 02, SC time = 2.8674

Event 02, SC time = 7.8687

Event 02, SC time = 12.87

Event 02, SC time = 17.8713

Event 02, SC time = 22.8726

Event 02, SC time = 27.8739

Event 02, SC time = 32.8753

Event 02, SC time = 37.8767

Event 02, SC time = 42.8781

Event 02, SC time = 47.8794

Event 02, SC time = 52.8807

Event 02, SC time = 57.882

Event 02, SC time = 62.8833

Event 02, SC time = 67.8846

Event 02, SC time = 72.8859

Running Super Cycle = 77.8872

UCD_All(event_mask)

All the super cycles in ram storage are printed by UCD_SC.

UCDB->UCD_All(0x40)

**********SC TOD**********

0: SC Event Index 92 - 13:13:13:61/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = 0

End of Super Cycle = 160.04

**********SC TOD**********

1: SC Event Index 187 - 13:15:53:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = 0

End of Super Cycle = 160.041

**********SC TOD**********

2: SC Event Index 282 - 13:18:33:61/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = 0

End of Super Cycle = 160.041

**********SC TOD**********

3: SC Event Index 377 - 13:21:13:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = 0

End of Super Cycle = 160.041

**********SC TOD**********

4: SC Event Index 472 - 13:23:53:56/100 MAY 20 1993

15Hz event count = 2400 (160.000000 Secs)

Event 41, SC time = .0001

End of Super Cycle = 160.041

etc. too long to print...

UCD_Capture_Add(event)

Add an event to the set of captured events

UCDB->UCD_Capture_Add(0xCF)

UCDB->UCD_Capture_Events

Capture Events

0

2

20

21

29

2a

2b

2d

2e

40

41

46

49

4d

cf

UCD_Capture_Del(event)

Delete an event in the set of captured events

UCDB->UCD_Capture_Del(0xCF)

UCDB->UCD_Capture_Events

Capture Events

0

2

20

21

29

2a

2b

2d

2e

40

41

46

49

4d

UCD_Capture_Events

Print the set of captured events

UCDB->UCD_Capture_Events

Capture Events

0

2

20

21

29

2a

2b

2d

2e

40

41

46

49

4d

UCD_Dump(address,len)

Dump UCD memory for the specified number of long words. The UCD memory is only accessible by long words. The address is the offset from the base address which is defined by the implementation.

UCDB->UCD_Dump(0,20)

10000000: 00000020 00000020 00010030 00000020

10000010: 00000020 00000020 00000020 00000000

10000020: 00000020 00000020 00000020 00000020

10000030: 00000020 00000020 00000020 00000020

10000040: 00000020 00000020 00000020 00000020

UCD_Modify(address)

Modify the UCD memory starting at the specified offset. The modify goes into a standard prompting for imput and the "h" or "H" returns help for the various commands.

UCDB_NEW->UCD_Modify(0)

10000000 00000020 = h

UCD_Modify (address offset)

Commands:

h - help

. - terminate

, - skip

^ - reverse addressing

0xn - replacement value

0xn * i - i replacement values in successive addresses

10000000 00000020 = ,

10000004 00000020 = ^

10000004 00000020 = ,

10000000 00000020 = ^ , ,

10000000 00000020 = 10000004 00000020 = 10000008 00010030 = 0x10030

1000000c 00000020 = 0x20 * 4

1000000c 00000020 = 00000020

10000010 00000020 = 00000020

10000014 00000020 = 00000020

10000018 00000020 = 00000020

1000001c 00000000 = .

UCD_Command(cmd)

Send a command to the UCD module. The following are the current set of commands:

command command function

0x00 NOP

0x01 Beam Sync Clock Enable

0x02 Beam Sync Clock Disable

0x03 TClock Enable

0x04 TClock Disable

0x05 MDAT Enable

0x06 MDAT Disable

0x07 Beam Sync Bit Map Clear on Read

0x08 Beam Sync Bit Map Normal Read

0x09 TClock Bit Map Clear on Read

0x0A TClock Bit Map Normal Read

0x0B Clear Time Stamp

0x0C Time Stamp Clock Source = 1 Mhz

0x0D Time Stamp Clock Source = 100 Khz

0x0E Time Stamp Clock Source = 10Khz

0x0F Time Stamp Clock Source = 1 Khz

0x10 Event Counters Group Enable

0x11 Event Counters Group Disable

0x12 Output Mode 000

0x13 Output Mode 001

0x14 Output Mode 010

0x15 Output Mode 011

0x16 Output Mode 1XX

0x17 Trigger Clear

0x18 Connector P2 Outputs Enable

0x19 Connector P2 Outputs Disable

0x1A Module Reset

0x1B Clear Interrupt Latches

0x1C TClock Event FIFO Reset

0x1D Beam Sync Event FIFO Reset

ox1E MX68C153 Reset

0x1F Interrupt Vecgtor FIFO Reset

UCDB_NEW->UCD_Command(0x1)

UCDB_NEW->UCD_Status(0x2)

BSync Enable

UCDB_NEW->UCD_Command(0x2)

UCDB_NEW->UCD_Status_All(0x2)

**NOT** BSync Enable

Error Conditions

If the UCD provides a bus error on reboot, the following message will appear at the console:

"UCD_BASE address 10000000 not responding, module may be missing or broke". Also, the SSM status will specify the UCD is broke, the video status bar will specify the UCD is broke, and UCD_Diagnostics will specify the bad status.

The status bar on the video is used to describe the state of the machine. The UCD uses the status bar to indicate the current mode of operation of the UCD with the following set of messages:

Video Message Meaning

UCDA or UCDB Normal, this machine is backup for the active machine

!On!

Back

Up

UCDA or UCDB Normal, this machine is the primary

Prim

ary

UCDA or UCDB Normal, this machine is backup, but is multicasting events on the

Test UCD test address for testing

Back

Up

UCDA or UCDB Unusual, this machine is primary, but is not being used as primary

Test This should force the backup to switch to primary

Prim

ary

UCDA or UCDB Bad, the UCD card is not working

!Off

UCD

Brok

Appendix

Reboot

The processor is rebooted from oper::op$usr1: [ucd...] directory which requires OPER to be up at the time of booting. The processor can be rebooted by the following methods in preferred order:

1. Toggling the Abort button on the Force CPU40 processor front panel

2. Toggling the Reset button on the Force CPU40 processor front panel

3. Pressing the reset button on the SSM - resets the VME bus.

4. If the terminal is connected to the appropriate machine, ^X.

5. Power off, then power on, the appropriate VME crate.

Login

user_name = ucd password = thucdclock

user_name = briegel password = (private)

user_name = woodbury password = (private)

user_name = mcclure password = (private)

Either UCDA or UCDB can be accessed via telnet or rlogin with the above user names and corresponding passwords. Only one login at a time is allowed and during such time the local keyboard is not available. The published password may or may not be available according to user abuse and/or AD policy. The command "logout" will log you out if remote-login is via telnet or use "~." if remote-login is via rlogin. If you are using the local terminal and want to prevent remote logins during your session, type "shellLock 1." To enable future remote-logins type "shellLock 0."

vxWorks List of Frequently Used Commands

Command Function

help print a synopsis of selected routines

netHelp print a synopsis of network routines

bootChange change the boot line - enables remote modification of boot parameters

i State of current running tasks

ts suspend a task - task name or task id is specified

tr resume a task - task name or task id is specified

td delete a task - task name or task id is specified

ti print complete information of task - task name or task id is specified

version print vxWorks version information

m modify memory - 16 bit word access only (. terminates)

d display memory - 16 bit word access only (optional second arg is number of words

lkup list global symbols - finds all symbols matching quoted string

logout log out of the vxWorks system

spyHerlp print synopsis of spy routines

spy start spy - default is 5 secs.

spyStop stop the spy data collection and task

vxMemProbe probe an address for bus error - args are (char *adrs, 0=READ, int length, 0)

shellLock 1 locks shell for local access preventing outside entry

shellLock 0 unlocks shell

References

VMEbus Universal Clock Decorder Module, McClure, 5-4-92 Draft.

PKTR Manual, C. Briegel

Systems Services Module Users' Manual Rev.A.1, D. Beechy, June3, 1991.

vxWorks Programmer Manual

vxWorks Reference Manual

Security, Privacy, Legal