LIB R.AR.Y OF THE U N IVER.SITY Of 1LLI NOIS *\o. 2A5- 2.A9 ceo. 2* The person charging this material is re- sponsible for its return on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN iW U 1^2 B 16 Rail L161— O-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/analoginputoutpu246otis If* yruLtx Report No. 2^6 COO-1U69-0069 AN ANALOG INPUT/OUTPUT SYSTEM FOR THE ILLIAC II by Alton Benjamin Otis, Jr. September 22, 1967 Report No. 2h6 AN ANALOG INPUT/OUTPUT SYSTEM FOR THE ILLIAC II* by Alton Benjamin Otis, Jr. September 22, 196? Department of Computer Science University of Illinois Urbana, Illinois 6l801 * This work was supported in part by Contract No. US AEC AT ( 11-1 ) 1U69 and was submitted in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering, August, 1967 Ill TA3LE OF CONTENTS Page Z . INTRODUCTION 1 II. A DESCRIPTION OF THE ILLIAG II ANALOG I/O SYSTEM 12 III. TWO EXAMPLES OF USAGE OF THE ILLIAC II ANALOG I/O FACILITY 26 APPENDIX A. THE ANALOG I/O INTERFACE: EQUIPMENT, SIGNAL, AND LOGIC DESCRIPTIONS 38 APPENDIX 3. THE ANALOG I/O INTERFACE: MACHINE LANGUAGE PROGRAM CONTROL. 4 7 APPENDIX C. ADSYS2 TAPE FORMAT AND COMMAND LANGUAGE DESCRIPTIONS 5 3 APPENDIX D. ADPAK2 SUBROUTINE CALLING SEQUENCES 64 BLIOGRAPHY 72 IV LIST OF FIGURES Figure Page 1. The Analog I/O Interface • 13 2. Time-Rate Changing Scheme 32 3. The Simple Reverberator 34 4. The All-Pass Reverberator 35 5. Logic Symbol Definitions 40 6. Clock and Filter Circuits 42 7. Control Circuits 44 I. INTRODUCTION The analog input/output (I/O) facility of the University of Illinois Illiac II digital computer was designed primarily for the processing of audio or other analog signals lying in the frequency band to 20,000 Hz. The facility consists of an audio tape recorder/reproducer, which is the source or receiver of analog signals, and an analog I/O interface that accomplishes both analog-to-digital (A/D) and digital-to- analog (D/A) signal transformation. Control of the audio tape machine and transfer of digitized analog signal infor- mation to or from the Illiac II are two additional functions of the analog interface, and the latter operation may be activated only by command from a program in the Illiac II. By using the Illiac II in conjunction with the analog I/O facility it is possible to perform detailed Fourier analysis of complex audio wave forms, such as those pro- duced in speech or music, and to re-synthesize these wave forms. Simpler processes such as time and amplitude trans- formations of existing audio signal information or genera- tion of artificial signals are also possible. Systems similar to the Illiac II facility are in use at several locations, notably Stanford University and Bell Telephone Laboratories. The fields of research being in- vestigated at the University of Illinois and these locations generally fall into two categories: Namely, 1) Analysis and synthesis of speech and musical instrument tones and 2) gen- eration of electronic music. 1.1. The Analog I/O Interface The primary purpose of the analog I/O interface is to perform transformations between analog and digital signals. During the input operation, the interface produces digital values (called samples) within uniformly spaced time inter- vals (called sample periods). Each digital value represents the amplitude of the incoming audio signal at the beginning of the corresponding time interval. The Illiac II simultane- ously reads eac:. sample into its memory and thereby obtains a stair-step digital approximation in time of the actual analog signal. Analog output is performed by an inverse process in which the Illiac II periodically supplies the in- terface w: '. digital samples (representing a stair-step approximation to the actual signal) , whicn the interface converts to analog voltage levels. The resulting stair-step output vc-tages are filtered to produce the desired smooth wave for:.. . The transformations performed by the interface are exe- cuted bv A/D and D/A converters. The D/A converter consists of a flip-flop register with the output of each flip-flop connected to a Kirchoff voltage adder. When a binary number is stor-d into the register by the Illiac II, the voltage at the out /at of the voltage adder becomes numerically propor- tional _o the value of the binary number. T,.w A/D converter is more complex since it uses a pro- cess of successive approximations to obtain the result. While there are many different A/D conversion techniques^- the most common method is to systematically alter the input to an internal D/A converter until the output of the D/A converter equals the value of the input voltage. The binary number that produces this result is the required digital value. I. 1.1. Precision of Representation The precision to which the stair-step digital approxi- mation represents the actual analog signal is determined by the resolution of the interface in both amplitude and time. I. 1.1.1. Amplitude Resolution Amplitude resolution is a function of the number of binary digits (bits) used to represent the analog signal amplitude at each sampling period. As the number of bits used to represent a number increases, the fractional error in its value caused by an uncertainty of +1/2 in the least significant bit (lsb) decreases. Since a similar uncer- tainty also exists in the analog signal amplitude due to additive noise, in practice it is only necessary to use enough bits in the digital representation so that the uncer- tainty in the lsb is below the noise level of the analog signal. To compute the "signal-to-noise (S/N) ratio" for a -•■Stephenson, B.W., Analog-Digital Conversion Handbook , Digital Equipment Corp., Maynard, Mass. digital sample value, consider a sample represented by n bits plus sign. The maximum value is ±2 n -l and the "noise" value is ±1/2. The S/N ratio for the sample is thus S/N = 20 -log 2n " 1 y 10 ^72 « 20 -log 2 n+1 10 - 6«(n+l) decibels (1-1) In the Illiac II system 12 bits (13 bits including the sign) are used for conversion. This is equivalent to a S/N ratio of 78Gb, which far exceeds the present 65db S/N ratio of the tape recorder/reproducer and allows excellent amplitude representation. In addition , the 13 bit samples are optimally packed 4 per word inside the Illiac II memory since the word length for this computer is 52 bits. 1.1.1.2. Time Resolution Time resolution is a function of the length of the sam- pling period or the sampling rate (sampling rate = 1/sampl- ing period) of the conversion system used. If an analog signal is presumed to consist of frequencies in the band of to f Hz then the sampling theorem 2 requires that a sampling rate of at least 2f be used in order to resolve all frequen- cies within the band. When the sampling rate is 2f, fre- quencies greater than f are also mapped into the range to f by the sampling process and thus cause a distortion in the 2 Susskind, A.K. , Notes on Analog-Digital Conversion Tech- niques , MIT Press, Cambridge, Mass. digital representation. In this mapping process, called "frequency foldover" , the frequencies in the ranges nf to (n+l)f (n=l,2...) are linearly mapped onto the range to f if n is even and onto the range f to if n is odd. The Illiac II system is capable of operating at a sampling rate of 40,000 Hz which permits accurate repre- sentations of audio signals in the range of to 20,000 Hz. Sampling frequencies of 10,000 Hz, 20,000 Hz, and 30,000 Hz are also available for lower bandwidth signal processing. 1.1.1.3. Over-ranging With a system which uses digital representations for analog signal sample values it is necessary that the ampli- tude and spectral frequencies of the signals to be processed lie within certain specified limits. When these limits are exceeded, over-ranging in both frequency and amplitude may distort the signal. The results of such actions are 1) fre- quency foldover when the bandwidth of the signal exceeds 1/2 the sampling frequency and 2) amplitude clipping of wave- forms when the maximum amplitude limits are exceeded. In the case of analog input, the first type of over-ranging can be corrected by applying low pass filtration and the second type by amplitude attenuation of the analog signal. These operations restrict the signal so that it conforms to the limits imposed by the finite sampling rate and the fi- nite digital word length of the I/O interface system. In the case of analog output it is up to the programmer to in- sure that the signal does not exceed the over-ranging limits in either frequency or amplitude. 1.2. Digital Data Storage Digital samples are transferred to or from the Illiac II one at a time and at a rate determined by the sampling frequency of the analog I/O interface. While the samples could be actively stored and 'processed in core memory, this is not usually feasible because of the limited capacity of the Illiac II memory (8192 words or 32,768 samples) for any of the sampling frequencies used. As an alternative, the samples may be stored on one of the three available secondary storage devices (namely, mag- netic drum, disk, or tape) in "records" of about 1000 to 4000 samples. With such a scheme, overall signal process- ing is accomplished in three steps: Namely, 1) analog input onto the secondary storage device, 2) processing of the data or creation of artificial data, and 3) analog output from the secondary storage device. While the use of secondary storage is more time consuming than a direct "in core" pro- cessing approach, it provides for a much more flexible system. 1.2.1 Selecting the Storage Device The selection of a secondary storage device depends on the type of processing to be done and is determined by 1) the maximum sampling rate to be used and 2) the maximum number of samples to be transferred. We will assume that the maximum time required for the storage device to "get to" a record of samples (the access time) is t seconds and that the time to transfer the record into core memory is t, seconds. If b the sampling rate is f samples/second and the record size is n samples then the inequality t + t. .< n/f (1-2) a b must be satisfied for the storage device to be usable. Also, assuming that equation 1-2 is satisfied, the maximum storage capacity of the device must be at least as great as that re- quired by the processing application. For the magnetic drum t = 16.7 ms (the time for one a revolution), tr= 2.08 ms , and n is fixed at 1024. It follows that the maximum usable value of f is greater than 40,000 so that the drum can be used at any of the available sampling rates. On the other hand, the drum is limited by its stor- age capacity of approximately 260,000 samples, which allows only 6.5 seconds of audio signal storage at the 40,000 Hz sampling rate. The magnetic disk 4 , an IBM 1302 disk file, has a total capacity of over 20 million samples, which would allow more than 8.5 minutes of continuous audio signal storage at the 40,000 Kz sampling rate if this rate could be maintained. 3 Gillies, D.B. , Special Registers and Interrupts for the Illiac II , University of Illinois, DCS, Urbana, Illinois. 4 Willard, il.E. , Programming Aspects ^f the Disk File Channel University of Illinois, DCS, Ur:oana, Illinois. 8 The access time, however, may range from 33.3 ms to 0.18 sec with this device, depending on the location of the record, while the record transfer time is approximately 25.6 ms. Since n = 1024, the maximum value of f is less than 20,000 making the disk unusable at the higher data rates where its total capacity is required. Therefore, for very large stor- age requirements, magnetic tape must be used. The Illiac II has available two magnetic tape channels-* and has the capability for transferring records with lengths equal to some multiple of 1024 samples. As is explained below, both tape channels can be used instead of one in order to reduce the effect of the record access time for one unit. Each tape drive (IBM 729 model VI) has a maximum ac- cess time of t = 10 iris (the inter-record gap time) and a re- a cord transmission time of t,= n/40,000 seconds assuming use of the 800 bits/inch Illiac II binary format. The inequality stated by 1-2 thus reduces to: f < 40,000 n n+400 (1-3) indicating that for n > 1200, a sample rate of 30,000 samples/ second can be used, but that for f = 40,000, n must be infin- ite. Both tape channels can be used to achieve the 40,000 5 Pis-cerz^, M.J. , Programming Aspects of the Magnetic Tape Interplay Channels , University of Illinois, DCS, Urbana, Illinois. samples/second rate by overlapping the time for data trans- mission on one channel with the record access time on the other channel. With such a system, sample records which are adjacent in time are recorded alternately on two differ- ent tapes in such a way that if the records were numbered 1, 2, 3 ... in time, then all odd-numbered records would be on one tape and all even-numbered records on the other. The storage capacity of a single 2400 foot reel of magnetic tape is approximately 8 million samples which allows more than 4.5 minutes of continuous audio signal storage at 30,000 samples/second with a single tape system or over 6.7 minutes at 40,000 samples/second with a two tape system. 1.2.2. Data Transfer Errors Errors occurring in the transfer of information between drum or tape and core memory fall into two categories: Namely 1) parity errors and 2) wrong-length-record errors (tape only) . Parity errors generally indicate an error in one or more bits of information and can be ignored as "noise" for most applications. Wrong-length-record errors, however, indicate a loss of one or more words (4 samples) of information during reading. This kind of error is gener- ally due to an initial mispositioning of the tape and can be corrected by subsequent backspacing and re-reading. During analog I/O such operations cannot be performed in real time. Therefore, the error (which often produces an audible "click") 10 might not be ignorable, depending on the application. For the two tape system, a wrong length record intro- duces a far worse secondary effect. If the error was caused by a digital tape dropout (loss of information) instead of mispositioning, the tape channel may consider the dropout to be the end of the record. In this case the remainder of the record may be interpreted (by the tape channel) to be another record, thereby destroying the sequencing between the two tapes. Unless further information is provided in each record, such as a sequence number, this error is suf- ficient cause for termination of the analog output opera- tion since the remainder of the analog signal would be hope- lessly distorted. 1.2.3. 1? roc-ramming Analog I/O Programs to perform continuous analog I/O with magnetic drum or tape require the use of a multiple buffering scheme so as to provide a continuous flow of samples between the Illiac II and the analog interface while discrete records are being transferred to or from the secondary storage device. To indicate the. general procedure, consider a program using a single tape as its secondary storage device with records of 512 words (or 2048 samples). Two buffers, each 512 words lone, ^re set aside in core memory. During an analog input operation the program reads incoming samples from the analog interface, packs them 4 per word, and stores each filled word in buffer 1. When buffer 1 is full the program sends 11 I/O commands to the tape channel (a direct-memory access device) to cause the contents of buffer 1 to be written onto tape. Once the commands are given, the program then proceeds to fill buffer 2 (as it did buffer 1) while the tape I/O channel independently writes buffer 1 onto tape. After buffer 2 is filled, the program checks the I/O chan- nel to make sure the previous transfer is complete and then commands the channel to write buffer 2 onto tape. The pro- gram repeats the process by filling buffer 1 again and so forth, allowing the continuous stream of input samples to be separated into discrete records. Analog output is per- formed by the inverse process. A two tape system uses a scheme similar to that for a single tape with the exception that four buffers are re- quired to maintain the desired data flow instead of two. Therefore, core storage equivalent to four times a single record length must be reserved for the analog I/O operations It should be mentioned that the key to implementation of a program for analog I/O to or from digital tape, is the direct-memory-access capability of the tape channels. With- out this capability the tape drives and the computer's cen- tral processor could not work independently in order to maintain a continuous flow of data. The same type of chan- nels are also provided for the magnetic drum and disk units allowing either to be used, if required, in place of a single tape in the procedure described above. . 12 II. A DESCRIPTION OF THE ILLIAC II ANALOG I/O SYSTEM II. 1. Operation of the Analog I/O Interface The basic structure of the analog I/O interface and its interconnection with the Illiac II is shown in Figure 1. All I/O operations performed by the interface are con- trolled with a program in the Illiac by means of a double flip-flop register known as "special register 58" or SR58. A second identical register ("special register 54" or SR54) is used to transfer the digital sample data to and from the interface. Each double register is 13 bits in length and actually consists of a 13 bit output "side", into which the pro- gram can set or store information from memory, and a 13 bit input "side", that the program can read into memory. The interface, however, can store information into the input side, and read information from the output side of each of the two registers, allowing samples to be transferred through SR54 and control information to be transferred through SR5 8. Proper sequencing of information transfers is provided by four control signals that are associated with each of the special registers. Two of these (called ASN and FULL) are generated in the special register control section of Illiac II and are sent to the interface. The other two (called EMI and RFULL) are generated by the interface and sent to thus special register control.- 13 J i ►3 < rn H J2 « 05 U g W fcJ u E-t 8 S EH < 2 2 O u H O U H ! k 4 k A W Eh CO m in CO ■sa- in *3* in in in M M 05 w SR54 INPUT 05 CO 05 CO cog 05 CO o5 CO Eh 00 D in Oi 05 co 05 CO E-i in a. U 9h < co M 2: CO H 2 2 CO 05 E-t CO D ^ J « Eh CO D O M H W < W < O D 9 tJ O h fa t-3 U H 05 <*> !l k ■P •P 4-> 14 4J 53 s 3 O 5-1 53 4-> a •P Cb O c Jh C S3 V. S3 M W M O M O 0) ■P 4-) a Q) H •H t-i a, CO -p a e u rH •H CO s O CO CO CO e c 1 » ■< r * ! j ' s 1 V \y E-i U Q ^ ^ U H 05 ■ *■ \> En O \> < 2 2 O Q 2 w O u O O J O U u < ♦J c « ( 1 A CD " — Y ■P c fa J * WO I k INTEI naloq ■p ■<-> to CO 4-> 4-) CO 3 co n .* O td CO 5h Q4 Q) u CO (X CU c > rH > »-» c H 3 ■p C o « u u a. H f 1 . ? f v. « 05 H Eh W fa o n) .Q > a* *0 CJ « a ■p u U CO o < 2 *4 < CO D> ^J D «H a T ~ 1 N-2n S. T ~ , , to S X1 N-2n+l N-n S XT .. to S x7 N-n+1 N - A - S' to S' ^ 1 N-2n = B = S* ~ .. to S' N-2n+l N-n - C " S m t0 S N+n = P-B + (l-P)-C = S'. 2n+1 to S". n = P-C + (l-P)-B = S-. n+1 to S^ Figure 2. Time-Rate Changing Scheme 33 echoes which are added to an audio signal by sound re- flections in an acoustical environment. By artificial means it is possible to simulate or supplement the rever- beration produced by a concert hall. Several means of producing synthetic reverberation by electro-mechanical analog systems are currently available, but these are generally deficient in one or more aspects. In an attempt to circumvent these deficiencies, a detailed study of re- verberation was carried out by M. R. Schroeder at Bell Telephone Laboratories. Schroeder' s analysis determined that the two main problems which characterize existing reverberation equip- ment are 1) non-uniform frequency response, and 2) in- sufficiently large random echo density. One cause of non- uniform frequency response in reverberators results from the use of the simple ideal reverberator circuit shown in Figure 3a. The response of this configuration is given in Figure 3b. While an increase in pseudo-random echo density is achieved by a series connection of such reverberators (set for different values of gain, g, and delay, t) , the frequency response of the final output signal is still seriously distorted. As a result Schroeder developed an all-pass rever- berator (Figure 4a) . This unit has a uniform gain of 1 for all frequencies and allows one to cascade as many units as necessary to provide the required echo density 34 (a) Basic Circuit 1/U-g) ResDonse i/U+g) (b) Frequency Response Figure 3. The Simple Reverberator 35 (a) Basic Circuit - S. l TIMES -g -g •S. l .. . ^ T. lj-n T. l > STORE n SAMPLES TIMES 1-g Y fl O ( \ Ik ADD t-. ADD •s r« 1 i ■+: * f p *~i A 5. TIMES g d-g" ■ l-r I g- T. 1 -n T. 1 -n (b) Digital Simulation Figure 4. The All-Pass Reverberator 36 without altering the frequency response. Extensive ex- perimentation by Schroeder indicated that the series connection of five all-pass reverberators with feedback gains of +.7 and selected delays between 5 and 100 msec will produce a reverberation effect that is comparable with' that of a conventional concert hall. III. 3.1. Computer Simulation of Reverberation Using the Illiac II analog-digital system, it was possible to artificially reverberate .musical passages by simulation of Schroeder 1 s all-pass reverberator. The overall logical scheme was similar to that used for the time-rate change experiment. Only the actual computa- tional process was different. Simulation of the all-pass reverberator is performed by use of a table, treated circularly, which represents the delay element t. If the maximum delay is to be m samples then the delay table must be m locations long. As each sample S. is input to the reverberator, the corresponding output sample S! is produced by the following operation: S. = (l-g 2 )-T. - g-S. (III-5) i 3 l-n 3 l where T. is an entry in the delay table corresponding to the signal input -co the delay element (see Figure 4b) at time t seconds, or n samples, ago (n < m) . For each new input sample, the corresponding entry in the delay table T. is reset by the operation: 37 T. = g.T. + S . 1 x - n x (III-6) This provides the feedback around the delay element x, as indicated in the figure. Note that the index for T is interpreted modulo m, the table length, to be compatible with the circular table interpretation. The simulation of a cascaded series of such reverberators is achieved by using the output of one pass of the simulator as input to the next sequential pass and so forth. 38 APPENDIX A. THE ANALOG I/O INTERFACE: EQUIPMENT, SIGNAL, AND LOGIC DESCRIPTIONS The reader should be familiar with Section II. 1 of this thesis before attempting to read the following infor- mation. The A/D converter is an 8 bit bipolar unit manufac- tured by ADCGM (Model 2 8C) . The input range maxima are + 2.5 volts corresponding to sample values of +4064 and -4095 read through SR54. A change in the least signifi- cant bit is equivalent to a voltage change of + .01954 o ^volts corresponding to a digital value change of + 32. The maximum conversion rate is 100,000 samples per second. The D/A converter is a 13 bit bipolar unit manufac- tured by Texas Instruments (Model 854) . The output range maxima are + 10 volts corresponding to sample values of +4095 and -4095 stored in SR54. Changing the least signifi- cant bit produces a voltage change of + .00244 volts. The maximum conversion rate is 250,000 samples per second. The -cape recorder/reproducer is manufactured by Scully (Model 2 30). This is a half track, two channel unit that accepts 1/4" audio tape at speeds of 7-1/2 and 15 inches per second. ^he signal to noise ratio using Scotch 201 magnetic tape is better than 60 db. The frequency response is flat o "This devi^fi is to be replaced by a 13 bit A/D. converter in the near future. 39 within + 2db from 35Hz to I8KH2 at 15 inches per second. Only the left tape channel (closest to the deck surface) is presently used for analog I/O. A. 2. Audio Signal Conventions The tape recorder/reproducer has been calibrated for Scotch 201 recording tape. The record and playback level controls are correspondingly marked so that when set appro- priately the following conventions apply: 1) A maximum amplitude lKHz sine tone output from the Illiac II (+ 4095) will produce a db record level on the tape. 2) A lKHz sine tone recorded at db on the tape will be input to the Illiac as a 50% maximum value sine tone. A. 3. Digital Signal Conventions The digital signals within the analog I/O interface and those sent to and from the. Illiac are equal to one of two voltage levels at any particular time: volts stands for logical 1 and -5 volts for logical 0. In certain por- tions of the circuitry the level signals are converted into short duration pulses for triggering and gating purposes. A. 4. The Analog I/O Interface Circuitry The complete logical diagrams of the clock, filter, and control sections of the analog I/O interface are shown in Figures 6 and 7. Definitions of the logic symbols 40 Pulse Signal (logical 1 for 500 nsec after being logical for > 700 nsec) ^ Level Signal (remains logical 1 or for > 700 nsec) A 3 AND Gate (C = 1 when A and B both = 1) B > C OR Gate (C = 1 when either A or B or both = 1) ^S 1 c D B C Set/Reset Flip-Flop (C = 1, D = after A ■ 1} C ■ 0, D ■ 1 after B = 1; output changes are delayed by 700 nsec) Complementing Flip-Flop (B and C exchange values 700 nsec after A changes from to 1) RD NO NC oB Relay Driver and Relay (C and D are connected when A = 0; C and B are connected when A = 1) A H ?G -> B Pulse Generator (B occurs when A changes from to 1) I C Crystal Clock (A is a square wave at the clock rate) Figure 5. Logic Symbol Definitions 41 used are given in Figure 5. The reader should be familiar with the logic conventions before reading further. A. 4.1. The Clock and Filter Circuits The clock consists of a 30KH'z and a 40KHz crystal os- cillator providing a square wave output. The signal from the 40KKz oscillator is fed to a two stage counter which produces outputs of 20KHz and lOKHz. The four signals are then sent to a two stage relay tree that selects one of the four as the desired clock frequency. Selection is determined by the state of bits 2 and 3 (weight 1024 and 512) in the output side of SR58. A one stored in either bit will cause the associated relay driver to turn on. The square wave output of the relay tree is then sent through a pulse generator which produces 50 nanosecond pulses for use by the interface. The filter "circuit consists of two low pass R-C net- works used with the 40KHz and 30KHz clock frequencies and two low pass L-C filters used with the 20KHz and lOKHz clock frequencies (manufactured by TT Electronics, Inc.). The frequency response characteristics of the R-C networks roll off with a -6 db/octave slope above 20KHz and 15KHz respectively. The L-C filters are characterized by -3 db cutoff frequencies of 8.5 KHz and 4KHz with 60 db attenu- ation frequencies of 17KHz and 9KHz, respectively. The output of the D/A converter is fed simultaneously through 10 KHz 42 ■0\ RD NO NC 2 KHz 30 KHz C 40 KHz D/A Converter Output AV — •4 KHz FILTER Bit 2 ~ £.5 KHz FILTER SR58 Output Bit 3 15 KHz FILTER RD NO NC RD NO NC RD NO PG SR5 8 Output Pulses NC NO Tape if Recorder -y^fi— — o Input NC Figure 6. Clock and Filter Circuits 43 individual coupling resistors to the inputs of all four filters. The filter outputs enter a relay tree, identical to that used to select the clock frequency, and are ter- minated by an attenuater which supplies the signal to the tape recorder. Since the output impedance of the D/A converter is very low (=^0.1 ohms) the series resistors at the inputs to the filters provide both the proper source resistances for the filters and a decoupling amongst the four of them. The clock and filter circuits are connected and oper- ating at all times independent of what analog I/O is being performed. The actual connections within the circuits, corresponding to one of the four clock frequencies, are dependent solely on the setting of bits 2 and 3 of SR58. A. 4. 2. The Control Circuits The action performed by the control circuitry is deter- mined completely by bits 4, 5 and 7 (weights 256, 128 and 32) of the output side of SR58. In the quiescent state (all bits in SR58 equal to zero) no action is performed by the control circuits and the tape recorder is under complete manual control. For analog input bit 5 of SR58 is set to a one. This gates the clock pulses into the A/D section of the circuitry and closes the START relay so as to hold the tape recorder in the playback mode. At the beginning of each sample cycle the A/D clock pulse clears the "End o r Conversion" (CNDN) 44 A/D Conversion Done ASN PG EMI SR54 ASN 6 6 PG k S 1 R . N A n SR54 Bit 5 ^4> O w EMI < SR58 V SR53 C- output A A/D Start i ... y. Conversion Clock < :ndn Pulses -* S 1 R K A RFULL v. • SR54 Clock Pulses r> A • Bit 4 D/A Start SSR6 6 Conversion SR58 Output , PG . Si R ^L SR54 * — o A : ERR -- S 1 R Bit 12 ASN ^ SR58 w SR5 8 PG Pb .. Input ' START Bit 5 SR58 RD Output ■o NO Bit 4 SR53 ' Tape Recorder Output RECORD Control Input RD o NO Taoe Recorder STOP Control Input Bit 7 SR53 o RD Output NC Figure 7. Control Circuits 45 flip-flop and signals the A/D converter to begin conver- sion. If (CNDN) was not set to 1 during the previous sample cycle the "Error" (ERR) flip-flop will be set to 1 at this time. When "Conversion Done" occurs, CNDN is set to 1, and a pulse is sent to the EMI inputs of SR54 and SR5 8. This causes the outputs of the A/D converter and the flip-flop ERR to be gated into the input registers. After the contents of SR54 are read by a program in the Illiac II, the ASN signal for SR54 is sent to the inter- face which, in turn, sets to 1 the "ASN Done" (ASN6 6) flip-flop. If this flip-flop is not set by the time the next "Conversion Done" pulse occurs ERR will be set to 1. The ASN6 6 flip-flop is reset by the "Conversion Done" pulse, while ERR is reset by the ASN signal from SR58. For analog output bit 4 of SR58 is set to 1. This gates the clock pulses into the D/A section of the control circuitry and closes the START and RECORD relays so as to hold the tape recorder in the record mode. At the beginning of each sample cycle the D/A clock pulse is sent to the D/A converter causing it to gate the contents of the output side of SR54 into its own internal register thus producing a new analog value. The D/A clock pulse is also sent to the RFULL input of SR54 and to the EMI input of SR58, en- abling the program in the Illiac II to store a new sample in SR54, and causing the flip-flop ERR to be gated into the input ^ j de of SR58, respectively. When the output 46 side of SR54 has been reset by the program, the signal FULL is sent to the interface which in turn sets to 1 the "SSR Done" (SSR66) flip-flop. If SSR66 is not set to 1 at the beginning of each D/A sample cycle, ERR is set to 1. SSR56 is reset by the D/A clock pulse and ERR is re- 9 set by the ASN signal from SR58. Analog input or output is terminated by resetting bits 4 and 5 of SR58 to zero. When this is done, the tape recorder is returned to manual control but is left running in the state previously selected (playback or record) . To stop the recorder, bit 7 of SR58 is set to 1 for about C.2 seconds, and then reset to thereby momentarily activating the STOP relay. If bit 7 remains set to 1, the recorder is held in the stop position by the STOP relay and cannot be manually controlled. ^Note that while ERR is reset when SR58 is read, the in- put side of SR58 is reset only when ERR is gated into it (i.e., at the next occurrence of "Conversion Done" during input or r.he D/A clock pulse during output) . 47 APPENDIX B. THE ANALOG I/O INTERFACE: MACHINE LANGUAGE PROGRAM CONTROL The reader should be familiar with Section II. 2 of this thesis and the Illiac II symbolic machine language, NICAP-*- , before attempting to read the following informa- tion. B.l. Analog Input Input conversion of an analog signal recorded on audio tape is initiated by the following sequence of instructions: (1) ATN 128+F (2) SSR 58 (3) (Delay loop of 1 second) (1) and (2) set the output side of SR58 to the value 128+F where F is a previously defined constant. The 128 (bit 5) selects analog input and starts the tape recorder in the playback mode. The bits defined by F select one of the four sampling rates. The delay loop (3) allows the tape recorder to stabilize but is not absolutely required. The allowed values for F are: for 40,000 samples per second 1024 " 30,000 512 " 20,000 1536 " 10,000 At the end of each sample conversion, bit 2 (weight 1024) 10 Gear, C.W. , Illiac II Manual , University of Illinois, DCS, Urbana, Illinois. 48 of SR14 is set to 1. This indicates that the sample is ready to be read. If the corresponding mask bit in SR22 is set and "interrupts are enabled", the program will be interrupted at this point. H Otherwise, this bit must be tested by a program loop. Experimentation has shown the shortest test-and-read loop to be the following: FLD (1) ASN 14 (2) CAM N / -1025 (3) CJF N (4) ASN 54 ( 5 ) CAM M (6) CNN (7) SSR 14 (i) and (2) s'core in modifier N the contents of SR14 minus 1025. If bit 2 is not on, modifier N will contain -1025 and (3) will transfer control back to (1). However, when bit 2 is set, modifier N will contain -1 allowing control to pass onto (4) . (4) and (5) store into modifier M the sample value while (6) and (7) reset SR14 to zero. Analog input is terminated by the sequence (1) ATN 32 (2) SSR 58 (3) (Delay loop = . 2 sec) 11 Gillies, D.3. , Special Registers and Interrupts for the Illiac 17 , University of Illinois, DCS, Urbana, Illinois 49 (4) SSR 58 (1) and (2) reset the output side of SR58 to 32 (bit 7=1) which terminates analog I/O and stops the tape recorder. (3) is required to allow time for the relays in the tape recorder to function while (4) resets the output side of SR5 8 to zero allowing manual control of the recorder. B.2. Analog Output Analog output to the audio tape recorder is initiated by the sequence of instructions (1) ATN 256+F (2) SSR 58 (3) (Delay loop of 1 second) (1) and (2) set the output side of SR58 to the bit configuration 256+F. The 256 (bit 4) selects analog output and starts the tape recorder in the record mode. The bits defined by F select one of the four sampling rates and its associated filter. The delay loop (3) is provided to allow stabilization of the recorder but, again, it is not required. The. allowed values for F are: for 40,000 samples per second with a 20 KHz low pass filter 1024 for 30,000 samples per second with a 15 KHz low pass filter 512 for 20,000 samples per second with a 8.5 KHz low pass filter 1536 for 10,000 samples per second with a 4 KHz low pass filter 50 Each output sample is transmitted by the sequence (1) ATN M (2) SSR 54 (1) and (2) store the number M or the contents of modi- fier M into SR54. Since the program is prevented from executing the SSR 54 instruction until a new sample is requested by the interface, no other signal need be tested. It is only necessary that the program be capa- ble of executing this sequence at a rate exceeding the sample conversion rate. The Illiac II will then stop the program before each execution until the interface is ready to receive a new value. Analog output is terminated by the same sequence re- quired by analog input. It should be noted that when either bit 4, 5, or 7 (weights 256, 128, and 32 respect- ively) is set to 1 in the output side of SR58, the re- corder cannot be operated manually. Therefore, it is nec- essary to make sure SR58 is set to after analog I/O is terminated. 3.3. Error Checking The error flag, set as described in Section II. 1, is read by the sequence: (1) ASN 58 (2) CAM M (1) and (2) store in modifier M the input side of SR58 which has the value 0, if no errors have been detected, or 51 1, if one or more errors have been detected. Execution of (1) also causes the error flag to be reset to immedi- ately and the input side of SR58 to be reset at the be- ginning of the next sample period. Note that if (2) is replaced by the instruction ADM M, modifier M becomes an error counter. B.4. Floating Point Conversion The digitized samples may be easily converted to or from normalized floating point by the following sequences: (1) ATN Mx (2) CAD 10,3,0 (3) STF FY Sequence (1) , (2) stores the sample in modifier Mx into the accumulator as a signed floating point number with 12 a magnitude <_ 0.9997558 (the value of £ 2" 1 ). The in- i=l struction (3) shifts the accumulator and stores it in fast register FY so that the first modifier of FY (MO, M4 , M8 , or M12) contains those bits of the original number with weights 2 , 2" , . . . , 2~ . If the accumulator had a magni- tude of < 0.999.7558 (as produced by the sequence (1), (2)) the result in the first modifier would be the equivalent sample value. Accumulator values with magnitudes >_ 1.0 will cause overflow to be set when (3) is executed. Thus sample values in the range -4095 to +4095 may be mapped directly into the normalized floating point indicated above 52 and conversely. Information regarding the programming to tape, disk and drum I/O is given in bibliography references 2, 4, and 8. 53 APPENDIX C. ADSYS2 TAPE FORMAT AND COMMAND LANGUAGE DESCRIPTIONS The reader should be familiar with Section II. 3 of this thesis before attempting to read the following in- formation. C.l. File Tape Format All records written on the user's file tape must be 256 Illiac II words in length. The first record on the tape is the tape label record, and the first word of the tape label record contains the 6 character BCD name "ANALOG" in quarter words 0, 1, and 2 as a means of iden- tifying the tape as a proper file tape. Quarter word 3 contains a binary "tape number" that may be used to uniquely identify the tape. The only restriction on the tape number is that it should lie in the range to 4095. (Note that the tape number in no way refers to the logical number of the tape unit on which it is mounted for process- ing.) The remaining 255 words of the tape label record, as well as the entire contents of any record following up to the first tape mark (end-of-file) , may be specified by the user and used for further labeling information if de- sired. Following the tape label record (and any additional records), are an unspecified number of data files. At the beginning of each data file there is a tape mark followed by a file label record or another tape mark. The first 54 tape mark serves to separate the data files while the second tape mark, in place of a file label record, in- dicates that there are no more data files beyond this point. The first word of each file label record serves to uniquely identify the file. Quarter word contains a binary number while quarter words 1, 2 and 3 are required to be zero. The binary number is used to define the file and may have any value from to 4095. The files need not be numbered in increasing numeric order; however, no two files on the same tape should have the same file number. Following the file label record are an unspecified number of data records which constitute the file. A file is terminated by the tape mark at the beginning of the next sequential file. Samples in the data records are stored one per quarter word, 102 4 per record. Sequencing of the samples in time is from quarter word to 3 , word to 255 with the records sequenced in the order that they are read or written. C.2. Conversion Tape Format The conversion tape is copied from or onto the file tape using multiple block records and is used for the actual analog I/O. All records on the conversion tape are 1024 Illiac II words long. The first record is pre- ceded by a tape mark (written at the beginning of the tape) 55 and the last record is followed by two tape marks. There are no labels to be checked, and thus all the records are data records. Sequencing of the samples in time is from quarter word to 3, word to 1023 with the records sequenced in the order they are read or written. (Note: The conversion tape is to be considered a scratch tape and should not be used to save data between runs. Further- more, processing of the multiple block records may not be performed during normal batch processing.) C.3. The ADSYS2 Command Language ADSYS2 begins execution by printing on the console teletype ADSYS2 LOADED and then proceeds to rewind and initialize the conversion tape on channel 5, unit 0. When this has been accomplished, ADSYS2 begins job processing until a request is made by the operator to terminate execution. Each job is initiated by ADSYS2 printing the message SELECT JOB followed by -cwc bell rings indicating the operator is to type in a command. Information typed in at any other time is ignored. In describing the commands symbolic parameters will be used to represent the actual numeric values that are inpuz. In certain cases these parameters may be elimi- nated by deleting them from the end of the list causing ADSYS2 to use a default value instead. The parameters and 56 their default values are as follows: In This is the logical number of the tape unit containing the user's file tape. This unit may not be connected to channel 5 , and is therefore limited to the values 6, 7, 8, or 11. This parameter may not be deleted if used by a command. tn This is the tape number of a specified file tape. (0999, YYY will equal 9 99) and ZZZ is the number of records written in which one or more conversion errors occurred. ZZZ is not printed if it is zero. D/A r t Rewind and skip the tape mark at the be- ginning of the conversion tape. Then reply with the message "READY". When the operator turns bit of SR2 8 from OFF to ON, begin analog output at the sampling rate r for the time t. After 61 (6) COMMAND: ACTION : each record is read from the conver- sion tape, check for a possible termina- tion condition. If one is found, .„s.top analog output, rewind the conversion tape, and then reply with the message "XXX END YYY ZZZ". This code is identi- cal to that which occurs for A/D except that EOT is replaced by EOF if a tape mark indicating the end of the input file is sensed. SINE f t Prepare to generate a sinusoidal full- scale analog output of frequency f at a sample rate 40,000 Hz; then reply with the message "READY". When the operator turns bit of SR2 8 from OFF to ON, begin analog output of the re- quired tone. At the end of each cycle, check for a possible termination con- dition. If one is found, stop analog output and then reply with the message "XXX END YYY". This code is identical to that which occurs for A/D except that XXX is restricted to either OPR or TIME, and no checking is done for conversion errors. 62 (7) COMMAND. ACTION: (8) COMMAND ACTION : RAMP f t Identical to SINE except a sawtooth tone is produced. END Output the message "BATCH REENTRY" and then terminate ADSYS2 by return- ing to the batch processing stream. C.4. Error Massages The following error messages may be output by ADSYS2 in response to a job request. In all cases the job will not be run. (1) MESSAGE: INVALID PARAMETERS MEANING: The job name or one of the input parameters is illegal. (2) MESSAGE: TAPE ERRORS MEANING: Repeated tape errors were detected during tape or file label processing. (This could indicate an improper file tape) . (3) MESSAGE: BAD TAPE LABEL MEANING: The tape label record did not contain the BCD name "ANALOG" in the first word or the label record was not there (i.e., a tape mark was written instead) . (4) MESSAGE: WRONG TAPE NUMBER MEANING: Tape label number checking was requested and the indicated tape 'Hid not contain the given 63 tape number. (5) MESSAGE: BAD FILE LABEL MEANING: The last three quarter words of the first word of a file label were not all zero. (6) MESSAGE: FILE NOT FOUND MEANING: The file requested to be loaded onto the conversion tape was not found on the file tape. C.5. Other Operating Information During analog input the first 1 second of analog tape is bypassed without being input to allow for speed stabili- zation. When input is terminated another 1 second is by- passed before the recorder is stopped. The same procedure is followed during analog output except that the bypassed tape is erased. For the commands which wait until the operator sets bit of SR2 8 to begin, the operator may instead turn on bit 1 causing the job to be deleted and the message "JOB NOT RUN" to be printed. If an error is made in typing a command, typing the character % will delete the line and send out two bell rings indicating a new command is requested. The total time charged is the sum of the times given by the messages "XXX END YYY ZZZ" plus 3 minutes for over- head. 64 APPENDIX D. ADPAK2 SUBROUTINE CALLING SEQUENCES The reader should be familiar with section II. 3 of this thesis and with the use of FORTRAN and/or NICAP in the Illiac II batch processing system before attempting to read the following information. D.l. Program Requirements ADPAK2 is 4 72 locations long and uses the first 256 words of common storage as a tape I/O buffer. ^he common locations may be used by the program between calls to ADPAK2 subroutines. Any call to an ADPAX2 subroutine destroys the contents of the accumulator and fast registers and 1. East registers 2 through 7 are left unchanged. The logical tape units used may be on either channel 4 or 5 but must be units that are normally allowed to the user. Uncorrectable tape errors occurring during reading or writing of data records will not cause program termina- tion . D.2. FORTRAN Calling Sequences (I) STATEMENT: CALL ADLBL (I, J) ARGUMENTS: Input - I, J; output - none ACTION: Rewind logical tape I and write a tape label record with the tape number J followed by two tape marks. All pre- vious data files on tape I are effec- tively destroyed. 65 ( 2 ) STATEMENT ARGUMENTS ACTION : (3) STATEMENT ARGUMENTS ACTION: CALL ADBGI (1,11, J) Input - I,J,N; output - none Rewind logical tape I and check the tape label record for validity. If J ^ 0, check to see that the tape number is the same as J; otherwise, do not check the tape number. After the tape label is checked, search the tape for a file numbered N and position the tape to read the first data record from the file (the input file is now active;) then, return to the calling program. CALL ADBLI (A,K) Input - none; Output - A(1024),K If the input file is not active, set K = and return immediately to the call- ing program. Otherwise, read the next data record from the input file. If this is not a tape mark, convert the 10 24 samples to floating point and store them in the array A from A(l) to A(1024). Set K = -1 or 1 if uncorrectable tape errors were or were not encountered, respectively; then, return to the calling program. If the data record is a tape mark rewind the input file tape, (the input file is now 66 ( 4 ) STATEMENT ARGUMENTS ACTION : (5) STATEMENT ARGUMENTS ACTION: (6) STATEMENT ARGUMENTS ACTION - inactive) set K = 0, and then return to the calling program. CALL ADSKI (M,K) Input - M; Output - K If the input file is not active set K = Z and return immediately to the calling program. Otherwise, skip over the next M records in the input file. If no ■cape mark is detected, set K = -1 or 1 .. f uncorrectable tape errors were or were not encountered, respectively; then, return to the calling program. If a -cape mark is read, rewind the input file cape, (the input file is now inactive) set K = 0, and then return to the calling program. CALL ADEDI None If the input file is not active, return immediately to the calling program. Other- wise, rewind the input file tape, (the in- put file is now inactive) then return to the calling program. CALL ADBGO (I,N,J) Input - I,J,N; Output - None Rewind logical tape I and check the tape 67 ( 7 ) STATEMENT : ARGUMENTS : ACTION: label record as for ADBGI, then search the tape for a file numbered N. If the file is found, position the tape to write the first data record of the file. Otherwise, write a new file label record after the last file on the tape; (in either case the output file is now active) then, return to the calling program. CALL ADBLO (A,K) Input - A(1024); Output - K If the output file is not active, set K = and return immediately to the calling program. Otherwise, convert the 1024 floating point samples in the array A from A(l) to A(1024) into a data record and write this onto the output file as the next sequential data record. If the end-of-tape indicator is not sensed, set K = -1 or 1 if uncorrectable tape errors were or were not encountered, respectively; then, return to the calling program. If the end-of-tape indicator is sensed, write two tape marks and rewind the output file tape. (The output file is now inactive.) Set K = 0, and then return to the calling program. 68 (8) STATEMENT: CALL ADSKO (M,K) ARGUMENTS: Input - M; Output - K ACTION: If the output file is not active, set K = and return immediately to the call- ing program. Otherwise, write M records of all zeros onto the output file. If the end-of-tape mark is not detected set K = -1 or 1 if uncorrectable tape errors were or were not encountered, respect- ively; then, return to the calling pro- cram. If the end-of-tape indicator is sensed, write two tape marks and rewind ■ the output file tape. (The output file is now inactive.) Set K = 0, and then return to the calling program. CALL ADEDO None If the output file is not active, return immediately to the calling program. Other- wise, write two tape marks and rewind the output file tape; (the output file is now inactive) then, return to the calling pro- gram. P. 3. KICAP Calling Sequences NICA? programs may call any of the FORTRAN callable sub- (9) STATEMENT ARGUMENTS ACTION: 69 routines as follows: CALL NAME DECQ W,X,Y,Z where name is the subroutine name, and W,X,Y, and Z are the addresses of the input parameters required. For ex- ample, to call AD3GI in NICAP, the sequence CALL ADBGI DECQ I,N,J,0 is used where I,N, and J are the addresses of the logical tape number, file number, and tape number, respectively. In addition, there are four other subroutines avail- able only to NICAP programs, The calling sequences for these are: CAM 0,A CALL ADBI1 (or AD301) CAM 0,M CALL ADSI1 (or ADS01) ADBI1, ADBC1, ADSI1 and ADS01 are the same as ADBLI , ADBLO, ADSKI, and ADSKO, respectively, where A is the address of the first location of the array and M is the number of records to skip. On return modifier zero equals the value (not the address) of K. D.4. Error Exits If an error is detected by an ADPAK2 subroutine, a message wil.1 be printed on the user 1 ? output, and SYSERR 70 will be called. The form of the message is: *** ADPAX2 ERROR - XXX *** where XXX is one of the following: (1) MESSAGE: ABLBL or ADBGO ATTEMPTED ACCESS OF INPUT TAPE MEANING: A call to ADL3L or ADBGO specified a logical tape unit which contains a currently active input file tape. (2) MESSAGE: ABLBL or AB3GI ATTEMPTED ACCESS 0? OUTPUT CAPE MEANING: A call uo ADL3L or AD3GI specified a logical tape unit which contains a currently active output file tape. (3) MESSAGE: TAPE ERRORS OR END-OF-TAPE DETECTED DURING LABEL WRITING or TAPE ERRORS DETECTED DURING LABEL READING Uncorrectable tape errors or an end-of-tape indication occurred during tape or file label record processing. INCORRECT TAPE LABEL The tape label record of a file tape did not nave the 3CD name "ANALOG" in the first three quarter words of the first word. INCORRECT TAPE NUMBER The tape number in the tape label record did MEANING (4) MESSAGE MEANING (5) MESSAGE MEANING 71 (6) MESSAGE: MEANING: not agree with that specified in a call to ADBGI or ADBGO. INCORRECT FILE LABEL The last three quarter words of the first word of a file label record were not all zero. (7) MESSAGE: REQUESTED FILE NOT FOUND MEANING: The file number given in a call to ADBGI was not found on the specified input file tape. In addition to the above, accumulator overflow or specification of an illegal logical tape unit number may cause the system to terminate the job. Accumulator over- flow will occur if any of the parameters I,N,J, or M (specified in D.2 and D.3) exceeds 4095, or if any sample in the array A has an absolute value that is equal to or greater than 1.0. 72 BIBLIOGRAPHY 1. Gear, C.W. , Illiac II Manual; Use of the New Illinois C ompute r Installation , University of Illinois, Department of Computer Science, Urbana, Illinois, March 19 63. 2. Gillies, D.B., Levin, M.S., Special Registers and In- terrupts for the Illiac II , File No. 517, University of Illinois, Department of Computer Science, Urbana, Illinois, Decem- ber 15, 1954. 3. Otis, A. 3., Jr., The Analog-Digital Programming System , File No. 726, University of Illinois, De- partment of Computer Science, Urbana, Illinois, February 23, 1967. 4. Pisterzi, M.J. , Programming Aspects of the Magnetic Tat>e Interplay Channels , File No. 5 88, University of Illinois, Department of Compu- ter Science, Urbana, Illinois, March 16, 1964. 5. Schroeder, M.R., Natural Sounding Artificial Reverber- tion , Monograph 4309, Bell Telephone Labora- tories, Inc., New York, N.Y., November 19 62. 6. Stephenson, B'.W., Analog-Digital Conversion Handbook , Digital Equipment Corp., Maynard, Mass., 1964. 7. Susskind, A.K. , Notes on Analog-Digital Conversion Tech- niques , The MIT Press, Cambridge, Mass., 1957. 8. Willard, R.E., Nuspl, S.J., Programming Aspects of the Disk File Channel , File No. 620, University of Illinois, Department of Computer Science, Urbana, Illinois, August 2, 1965. ■z. o