Notes and Questions

February 10, 1996

Goals for revision:

Brad: daq.c -- Supervisor, removed #ifndef IBM
Brad: record.c -- Supervisor, removed #ifdef IBM 

Who calls the vicvac procedures?

Got rid of vc40.h, it simply included vc40map.c

To Do:
* Get rid of global vars for shared mem and port in dllEntry.c
* Revise the downlink to use the shared mem directly, pass vmeShare
  as a parameter when it is created.
* The setSize message is used in mtType of Uplink.
  This is incorrect because there is no implementation in UpPCPC.
  The mtType mechanism must be revised.
* Get rid of stack.h stuff from downlink.c if possible
* Can messagePush & messagePop be removed from the uplinks the same way?
* Get rid of Downlink: toStandard, fromStandard, toStdArray, fromStdArray
* Get rid of UpTIPC: toStandard, fromStandard, toStdArray, fromStdArray
* Get rid of modules associated with these absurdities.
* Get the VME A24 mask-whatever setup code to be part of the DLL startup.
* Get rid of the HYDRAVAR batch file stuff if possible
* Get the inappropriate stuff out of the link.cmd and mizar.cmd files.
* Get rid of Gres & dMiop from DSP makefile
* Deal with VME access modes in a procedure module that can be portable.
* I suspect that copyto and copyfrom don't need to be in the Downlink.
* Does the last param for copyto and copyfrom need to be a double indirect?
* Fix unsigned long to unsigned short warning in DownPCTI.

Feb. 16

* Remove the "WrBlkShort" etc. from Downlink.
* Make "remote" and "local" local procedures in DownTIPC
* Use the pile index for parameter values of arrays on the pile.
* The DSP will convert these to local addresses in UpTIPC

Feb. 20

Done:
* Reformat and annotate the Kevin link classes.
* Remove atstack
* Make msStack a procedure library
* Remove StdStk stuff from UpLink on both sides
* Get rid of StdStk stuff on dsp side!
* Make tiStack a procedure library
* The two standard stack modules are eliminated!
* Remove messagePush & messagePop from downpcti by unprocing.

Wed 2/27
* Most of the glark is removed on the supervisor side.
* DownTIPC has no stack and no message procedures.
* DownLink has been removed because nothing was being abstracted.

Mon March 4
* Start on DSP side, remove & combine UpLink & UpTIPC
* Try to eliminate mtBuffer... Failed

Tue March 5
* Remove mtBuffer & mtType from UpPCPC
* Remove Port from UpPCPC
* Remove linkInit from cnfigsup, move it to UpPCPC
* Remove weird constant from cnfigsup.
* Add port allocation to DownPCTI

Wed March 6 - Mon March 11
* Completed & tested all revisions to Uplinks and Downlinks.

Thurs. March 14
* Removed Action, ActionSequence & Closure
* Revised DSP build procedures
* Use implicit short for "I" array values. This is temporary.
* Start conversion to MAST
* Update to Tom for Adda testing.

Monday March 18

Adda delayed. Do more link-compatibility stuff.
Add Dean's refinements...

How to do Mac-style strings. There are two cases, value 
parameters

"S" value parameters:

S parameters are assumed be "to" parameters unless they
are the returned value.

UpPCPC requires already supports both kinds of string.

DownPCTI:
	"S" parameters are simply copied to the shared memory
	area. The index is placed in the message frame like any
	other array. We can pass the exact length instead of
	a fixed allocation.

UpTIPC:
	"S" parameters are converted to addresses like any
	other array. No length is specified because it is
	implicit.

Returned "S" values. This is more complicated because space
for the result string must be allocated in the message frame.

DownPCTI:
	The return value must be in the message frame in an
	area reserved for "S" return values.  We have to allocate
	the space in the frame of maxString size and put the index
	somewhere. The easiest way is to always put the string first,
	so the pile index is zero. This is how error messages are
	sent back and they are already strings, so this is probably
	best.

	The parameter scanner looks at the return character and
	discards it unless it is a string. In this case, a
	maxString space is allocated and the index is implicitly
	zero. We advance the message pile pointer by maxString.

	After the message is completed, we have to use a local
	static string for the return value. This string is
	reused for each message, so the callers of the DLL must
	be serialized!

UpTIPC:
	After sending the message with an "S" return value, we
	copy the characters to the zero pile index. (Space has
	already been reserved by the Downlink.)

Tuesday, March 19
	Returned strings work.
	Begin revision for cache processing.
	Tried in UpPCPC only: 1800 m/s.
	Tried in DownPCTI only: 1750 m/s. Worse!
	Do we need the special mtType???
	This avoids the maximum number of messages...
	When the downlink sends a message to the dsp, it
	will first need the type string for this message.
	The downlink will try the cache first, so why 
	would the uplink cache-only case be faster???

Wednesday, March 20
	Add cache to link.c, used in all link modules. Result:
	1950 messages/sec.
	Next, use returned string for type instead of array
	notation. Should increase speed still further...

Thursday, March 21
	Release this version to Bettis & Kyoto.

