Interface circuit for data transmission between a microprocessor system and a time-division-multiplexed system
FIELD OF THE INVENTION 
     The present invention relates in general to digital logic circuits, and more particularly to a circuit that allows a first synchronous system to interface to a second synchronous system. 
     BACKGROUND OF THE INVENTION 
     Synchronous systems require that data be stable at specific, predefined time periods. Should the data change during these time periods, it may be improperly interpreted. More specifically, when a microprocessor accesses data, the data must not change during critical portions of the access cycle. 
     Modern digital Telecommunication systems use multiple microprocessors to execute the complex software which controls the Telecommunication systems. These microprocessors are considered synchronous systems, but quite often are not synchronized to each other. In addition, the microprocessors are not synchronized to the Time-Division-Multiplexed (TDM) data. 
     TDM data is a synchronous serial data stream divided into several time slots. Where each time slot carries Pulse Coded modulation (PCM) voice samples. Should the microprocessor need to access the TDM data, some form of translation between the microprocessor synchronous system and the TDM synchronous system must be performed. 
     Microprocessors generally access data in a parallel format while, TDM data is generally in a serial format. Therefore, a serial-to-parallel converter is used to transfer the data from the TDM data stream to the microprocessor, and a parallel-to-serial converter is used to transfer the data from the microprocessor to the TDM data stream. 
     In prior art implementations, the microprocessor accesses the converters directly. Should the microprocessor try to access a converter while the data is being serially shifted, the microprocessor is placed in a HOLD condition. Once the data is shifted in, the microprocessor is released from the HOLD condition and normal processing can resume. 
     The present invention precludes placing the microprocessor in a HOLD condition and therefore consumes less processing time. The present invention adds a latch between the microprocessor and the serial-to-parallel converter. But, the data must still be transferred between the latches and the converters at an appropriate time. The present invention determines when this transfer is to occur. 
     Accordingly, it is the objective of the present invention to provide a synchronous interface circuit which allows a synchronous microprocessor to access a synchronous Time-Division-Multiplexed (TDM) data stream. 
     SUMMARY OF THE INVENTION 
     In accomplishing the objective of the present invention there is provided a synchronizing circuit for generating a transfer signal that indicates when data is to be transferred through an interface circuit. The interface circuit is connected between a microprocessor system and a time-division-multiplexed system. 
     The synchronizing circuit includes a collision detector that is connected between the time-division-multiplexed system and the microprocessor system. The collision detector generates a collision signal when the time-division-multiplexed system and the microprocessor system request use of the interface circuit simultaneously. Alternatively, the collision detector generates the transfer signal when a request for use of the interface circuit is received from either the time-division-multiplexed system or the microprocessor system. 
     The synchronizing circuit further includes a delay circuit that delays the collision signal from the collision detector. The delayed collision signal is sent back to the collision detector. Responsive to the collision detector receiving the delayed collision signal the collision detector continues to generate the collision signal until the microprocessor system retracts the request for use of the interface circuit. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     A better understanding of the invention may be had from the consideration of the following detailed description taken in conjunction with the accompanying drawings in which: 
     FIG. 1 is a block diagram of the interface circuit. 
     FIG. 2 is a timing diagram for the block diagram of FIG. 1, showing the structure of the serial data stream and selected control signals. 
     FIG. 3 is a timing diagram for the circuit of FIG. 4, showing selected signals over time. 
     FIG. 4 is a schematic diagram of the synchronizer circuit, in accordance with the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Turning to FIGS. 1 and 2, a general description of the present invention will be given. 
     FIG. 2 shows the structure of a TDM data link. The TDM data link is divided into N time slots, where each time slot carries PCM voice data. A SERIAL CLOCK signal is used to define the individual bits within each time slot. And a TIME-SLOT signal defines a given time slot of the serial data. 
     Before the data can be accessed by microprocessor 106, a translation must be performed. Because both the TDM and the microprocessor are synchronous systems, yet asynchronous to each other, the data must be converted from one system time period to the other. 
     For TDM data to be read by microprocessor 106, it must first be converted from serial to parallel by serial-to-parallel converter 100. Latch 102, at the appropriate time latches the data from serial-to-parallel converter 100. The latched data can then be read by microprocessor 106. 
     For microprocessor 106 to write data to the TDM data stream, it writes the data to latch 103. The data is then transferred, at the appropriate time, from latch 103 to parallel-to-serial converter 101. During the assigned time slot, the data is shifted out of parallel-to-serial converter 101 onto the TDM serial data stream. 
     A problem exists as to when to transfer the data between the latches and the converters. Latch 102 cannot be updated while the data is being shifted into serial-to-parallel converter 100 or while microprocessor 106 is reading from latch 102. Parallel-to-serial converter 101 cannot be updated while the data is being shifted out of parallel-to-serial converter 101 or while microprocessor 106 is writing to latch 103. 
     The present invention provides a SYNC CIRCUIT 104 that arbitrates and determines when to update latch 102 and parallel-to-serial converter 101. 
     SYNC CIRCUIT 104 generates the transfer signal upon receiving the end of time slot signal provided that microprocessor 106 is not accessing the latches. If microprocessor 106 is accessing the data, then the transfer is delayed for three clock cycles of the serial clock (SER em-CLK ). After the delay, if microprocessor 106 is still accessing the latches, the transfer is delayed again. This continues until microprocessor 106 is no longer accessing the data, at which time the transfer is allowed. 
     Referring to FIGS. 3 and 4, a detailed description of the operation of the circuit of the present invention will be given. 
     The synchronous interface circuit of the present invention accepts various input signals and generates a single output signal (-TRANS) which initiates the transfer process. Input signals include; -SEL which indicates that microprocessor 106 is accessing the interface circuit, -END which signals the end of the assigned time slot, SER --  CLK is the TDM serial clock, and -RESET forces the circuit to a known state. 
     The synchronous circuit has three separate states for the input signals: (1) no select activity, (2) normal select activity, and (3) select and end of time slot overlap. 
     In the first state, -SEL is not asserted by microprocessor 106 therefore, a logic HIGH is present at the D input of D-FF 300. This forces Q1 to remain at a logic HIGH also. Gate 303 inverts -END to produce END which is fed to D-FFs 301 and 305. The rising edge of END clocks Q1 through D-FF 301. Now that both inputs to NAND gate 302 are a logic HIGH, -TRANS is forced to a logic LOW. In addition the output of AND gate 304 is also a logic LOW signalling no collision. 
     The logic HIGH from END is clocked into D-FF 305 by the next rising edge of SER 13  CLK which forces the -Q output of D-FF 305 to a logic LOW. The logic LOW from D-FF 305 causes -TRANS, and the output of gate 304, to return to a logic HIGH. Before the next rising edge of SER 13  CLK, -END will change to a logic HIGH causing gate 304 to output a logic LOW. From here it can be seen that serial-to-parallel converter 306 does not clock in a logic HIGH and thus -ENDD (-END --  Delayed) will always a logic HIGH. 
     The second state of normal select activity is analogous to the first state since Q1 will return to a logic HIGH before the falling edge of -END. 
     The third state occurs when -SEL and -END overlap. If -END is active before -SEL or they occur simultaneously then normal state one events occur. If -SEL becomes active before -END, then Q1 will change to a logic LOW. When -END does become active, the logic LOW from Q1 will be clocked into D-FF 301. Now that D-FF 301 is generating a logic LOW, gate 302 generates a logic HIGH blocking the transfer and 304 generates a logic HIGH signalling a collision. The next rising edge of SER --  CLK will clock the logic HIGH from gate 304 into serial-to-parallel converter 306 and also clear D-FF 301 through D-FF 305. Before the next rising edge of SER --  CLK, -END will change to a logic HIGH causing gate 304 to output a logic LOW. After three rising edges of SER --  CLK, -ENDD will change to a logic LOW changing END to a logic HIGH. The process is repeated until -SEL is no longer active. Once -ENDD becomes a logic LOW and -SEL is no longer active, normal state one events occur. 
     It is apparent to those skilled in the art that a few restrictions are placed on the relationship of the input signals. Signal -END must change states on the falling edge of SER --  CLK and must have a duration of between one clock cycle and one and one-half clock cycle of SER --  CLK. Signal --SEL must have a duration greater than --END. Also, the number of clock cycles that --ENDD is delayed can be adjusted by selecting the appropriate output of serial-to-parallel converter 306. 
     In summary, the circuit of the present invention provides a signal (--TRANS) which allows data to be transferred from serial-to-parallel converter 100 to latch 102 and from latch 103 to parallel-to-serial converter 101. The transfer is allowed at the end of the assigned time slot provided that microprocessor 106 is not accessing the data. If microprocessor 106 is accessing the data, then the transfer is delayed for three clock cycles of the serial clock (SER --  CLK). After the delay, if microprocessor 106 is still accessing the data, the transfer is delayed again. The delaying continues until microprocessor 106 is no longer accessing which time transfer is allowed. 
     Although the preferred embodiment of the invention has been illustrated, and that form described, it will be readily apparent to those skilled in the art that various modifications may be made therein without departing from the spirit of the invention or from the scope of the appended claims.