Abstract:
The invention relates to a circuit arrangement for forming a digital interface comprising a digital data bus, which exchanges data when microprocessor systems are connected. The data exchange can be effected bidirectionally. On transmission of data the circuit arrangement generates as bus master a bus clock speed and operates on receipt of data as a bus slave in accordance with the received clock signal. The circuit arrangement comprises at least one FIFO memory for receiving data.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority to German Patent Application Nos. 10 2010 043 929.0, filed Nov. 15, 2010; 10 2011 007 437.6, filed Apr. 14, 2011; and PCT/EP2011/063574, filed Aug. 5, 2011. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to a method and a circuit arrangement for data transmission between processor chips. 
       BACKGROUND OF THE INVENTION 
       [0003]    Motor vehicles make widespread use of electronic control units (ECUs) for a wide variety of vehicle functions. In this context, there are control units (ECUs) for safety-critical applications, e.g. for the brakes, and for nonsafety critical applications, e.g. comfort functions such as air conditioning, seat heating, etc. For safety reasons, control units having differently classified safety requirements (ASIL levels) are usually implemented by separate, standalone electronic control units which are able to communicate with one another via digital vehicle data bus connections which are known per se. Examples of known vehicle data bus systems for ECU communication are CAN and FlexRay®. 
         [0004]    The aim of the invention, inter alia, is to reduce the hardware involvement in motor vehicles by virtue of fewer control units needing to be installed in the vehicle. 
         [0005]    The invention achieves this object by means of the control unit defined in the independent motor vehicle control unit claim. 
         [0006]    The documents U.S. Pat. No. 5,251,304 and U.S. Pat. No. 5,812,881 disclose the practice of using a plurality of parallel complex bus interfaces which are known per se for the data transmission between integrated microelectronic chips (e.g. processor chips). These bus interfaces are typically provided for the transmission of addresses, control signals and data. This results in these inherently known complex bus systems (complete parallel bus interfaces) being a comparatively expensive solution for the data interchange between integrated electronic chips. 
         [0007]    The present invention is concerned with the idea of providing an interface for electronic chips which is less expensive than interfaces in accordance with the prior art and can also be used more flexibly, and, in particular, is even extended and improved. 
       INTRODUCTORY DESCRIPTION OF THE INVENTION 
       [0008]    According to one embodiment, a circuit arrangement is provided which comprises a flexible, reconfigurable and comparatively simply designed and reliable parallel bidirectional digital interface. This interface allows communication between microcontrollers independently of bus systems for the connection to peripheral units. 
         [0009]    According to one embodiment, the interface according to the invention extends the concept of an EDP interface as described in WO 2004/049159. A special feature of this interface is that the buffer used for holding data which are transmitted via the bus is an FIFO (First In-First Out) memory. The effect achieved by this, inter alia, is that communication is possible between dual-core, in particular multicore, microprocessor systems. 
         [0010]    The advantage achieved by this, inter alia, is that it is possible to incorporate external controller functions into an electronic control unit more easily and less expensively. By way of example, two microcontrollers for control software having different safety levels can be incorporated into a control unit, the two microcontrollers each having a circuit arrangement for forming the digital parallel interface described here via which the two microcontrollers are directly connected to one another. This architecture allows the incorporation of applications having different safety levels without the application that has the low safety level influencing the application that has the high safety level, for example. In particular, the microcontroller having the lower safety level does not directly access the bus system of the microcontroller having the high safety level. 
         [0011]    It is also now possible to use this to implement complex OEM software, which was not implementable in conventional multicore microprocessors for safety-critical applications on account of memory limitation (and other limitations), in a control unit together with the software functions for the safety-critical applications. There is still a separation for the software having a different safety level at microcontroller level in this case, however, so that the OEM software that is not checked with the high safety standard, such as a piece of software for brakes, does not disturb the software for the brakes in the case of error. 
         [0012]    According to one embodiment, the present invention relates to a circuit arrangement for forming a digital interface. The interface according to the invention is subsequently also called an IPL (“Inter Processor Link”) interface. This comprises a digital data bus which interchanges data when microprocessor systems are connected, wherein this data interchange can take place bidirectionally (sending and receiving or reading and writing) and the circuit arrangement produces a bus clock when sending data as a bus master and operates on the basis of a received clock signal when receiving data as a bus slave, said circuit arrangement comprising at least one FIFO memory for sending data and/or at least one FIFO memory for receiving data. 
         [0013]    According to one embodiment, the interface is reconfigurable between a sending mode and a receiving mode, wherein the reconfiguration takes place automatically on the basis of control signals which are interchanged between IPL interfaces that communicate with one another. Thus, each IPL interface may have at least one two-pole control signal port, with one pole serving as an input and the other pole serving as an output which are connected to the opposite interface in a crosswise manner. 
         [0014]    The circuit arrangement preferably contains transmission parameters which are configurable for a parallel bus interface. 
         [0015]    According to the invention, these parallel complete bus interfaces are also meant to be simplified such that a high data throughput and also more flexibility in the configuration are assured. 
         [0016]    Depending on the availability of pins on the chips, the usable width of the bus can preferably be customized. Examples are a data length of 4, 8 or 16 bits. 
         [0017]    The transmission speed can preferably be matched to the internal clock frequencies of the communicating chips. 
         [0018]    The polarity of the clock signal for shift operations is preferably freely selectable. 
         [0019]    In addition, this clock signal can preferably be masked out as required when the receiver is able to emulate the clocking, for example. 
         [0020]    Configuration preferably allows the transmitted data to be protected using a CRC (Cyclic Redundancy Check) checksum. 
         [0021]    A DMA module is understood to mean a controller for “Direct Memory Access”, that is to say a circuit module which allows direct memory access without the assistance of the microprocessor. In one prescribed configuration, a chip can preferably initiate a DMA request for a chip by means of a control signal so that the other chip provides data and allows data to be read from the first chip. 
         [0022]    The microprocessor system(s) according to the invention is/are preferably (a) microcontroller(s). 
         [0023]    According to one embodiment, a circuit arrangement for bidirectional data interchange between microprocessor systems or microcontrollers is provided. The circuit arrangement comprises a parallel bidirectional digital interface having a parallel bidirectional data port, an at least 2-pole control signal port for data flow control and at least one bidirectional clock signal port. The circuit arrangement is set up to take a signal applied to the control signal port as a basis for changing over between a sending mode and a receiving mode, wherein the circuit arrangement produces a bus clock and outputs it on the clock signal port in a sending mode as a bus master and operates on the basis of a clock signal received from a clock signal port when receiving data as a bus slave. 
         [0024]    According to one embodiment, the parallel bidirectional digital interface has no address line ports. 
         [0025]    According to one embodiment, the circuit arrangement also has a bus interface which may comprise data ports and address ports, for example. The bus interface can be used to connect the circuit arrangement to the microprocessor. The circuit arrangement therefore provides a connection to the bus system of the microprocessor. 
         [0026]    According to one embodiment, the circuit arrangement comprises an FIFO memory for sending data and an FIFO memory for receiving data. The FIFO memories are used for buffer-storing the data. 
         [0027]    According to one embodiment, the circuit arrangement comprises a conflict avoidance mechanism which is set up to enable data transmission only after a check on the control signal port for a control signal from the opposite side. The conflict avoidance mechanism is used for avoiding conflicts which can arise when the two interfaces communicating with one another are simultaneously ready to send. In particular, according to one embodiment, this can be accomplished by providing for each interface, upon identification of a conflict, to wait for a waiting time stipulated for this interface beforehand before a fresh sending attempt is made. This makes it possible to ensure that the fresh sending attempts are repeated at different times and therefore only one of the two interfaces is active as a bus master. 
         [0028]    According to one embodiment, the circuit arrangement can be changed over to at least one slave sending mode in which the circuit arrangement operates as a bus slave on the basis of a clock signal received from the clock signal port and sends data upon a request from the opposite interface. The slave sending mode is a compatibility mode for interfaces which have no dedicated slave mode. 
         [0029]    According to one embodiment, a microprocessor system (microcontroller) is provided. The microprocessor system comprises at least one microprocessor having a bus system, a circuit arrangement having an IPL interface and a bus interface which is connected to the bus system of the microprocessor, a memory and a DMA module for accessing the memory, wherein the DMA module can be actuated by the circuit arrangement independently of the microprocessor. The memory and also the DMA module may be connected to the bus system of the microprocessor. 
         [0030]    The circuit arrangement therefore provides a parallel bidirectional interface for the connection of a further microprocessor independently of the bus system of the microprocessor. The microprocessors can be connected to one another via the parallel bidirectional interface without directly accessing the respective bus system of the other processor in each case. This is particularly favorable when coupling microprocessors having different safety levels. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWING FIGURES 
         [0031]    Further preferred embodiments emerge from the subclaims and the description below of an exemplary embodiment with reference to figures, in which: 
           [0032]      FIG. 1A  shows a schematic depiction of a parallel bus interface based on the prior art, 
           [0033]      FIG. 1B  shows a schematic depiction of an example of a bus interface that has been simplified according to the invention, 
           [0034]      FIG. 2  shows a highly schematic depiction of the functions of a microcontroller having an IPL interface according to the invention, 
           [0035]      FIG. 3  shows the exemplary design of an IPL circuit arrangement for handling the data transfer, 
           [0036]      FIG. 4  shows a depiction of timing diagrams for the data transmission between two IPL data transmission chips according to the invention, 
           [0037]      FIG. 5  shows a further depiction of timing diagrams for the data transmission between two data transmission chips according to the invention in order to illustrate a bus conflict during sending, 
           [0038]      FIG. 6  shows a further depiction of timing diagrams for the data transmission between two data transmission chips according to the invention in order to illustrate the handling of a bus conflict during sending, and 
           [0039]      FIG. 7  shows a further depiction of timing diagrams for the data transmission between two data transmission chips according to the invention in order to illustrate the initiation of a DMA (Direct Memory Access). 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0040]    In  FIG. 1A  (prior art), microcontroller (μC)  1  is always operated in master mode and therefore determines the addresses for read and write access operations in the microcontroller  2 . The microcontroller  2  is always operated in slave mode. Address lines  30  are laid unidirectionally from the master to the slave. Data lines  20  are bidirectional. The master microcontroller  1  sends control signals  10  to the slave microcontroller  2  in order to stipulate the meaning of the data signals. The slave microcontroller  2  sends response signals  11  to the microcontroller  1 . For synchronized data transmission, synchronization signals  12  are also required. 
         [0041]      FIG. 1B  shows an example of a design—simplified according to the invention—for a parallel bus interface, which is also called a digital bidirectional parallel interface or an IPL interface. Address lines  30  ( FIG. 1A ) are not present. Each microcontroller (μC)  1  or  2  has the four pins  120  to  123 , which are also shown in  FIG. 3 . Pin  121  of μC  1  is connected to pin  120  of the μC  2  by means of output line  50 . Pin  120  of μC  1  is connected to pin  121  of the μC  2  by means of input line  51 . The control lines are therefore connected to the other μC in each case crosswise. Just three control signals are required: a control signal  50 ,  51 , one for each direction, and a synchronization signal  52  which transmits the bus clock. 
         [0042]    The transfer between the microcontrollers via the respective IPL interface is limited to the data transmitted via data lines  20 , in addition to the signals on the control lines described above and the bus clock. There are thus no address lines present. The data lines  20  are parallel data lines, for example 4, 8 or 16 data lines. A corresponding number of pins  123  are present in each case. 
         [0043]    Each microcontroller  1  or  2  can be configured as a master or a slave for a data transmission (bidirectional data interchange). A microcontroller is changed over to master or slave mode for the most part automatically. When microcontroller  1  starts sending data, this forces the other microcontroller  2  to be automatically transferred to the slave mode, and vice versa. 
         [0044]    The changeover can take place as follows, for example: initially, both interfaces are in a quiescent state (idle), since no data need to be transmitted. If the microcontroller  1  now provides data for transmission, the IPL interface associated with said microcontroller signals that it is ready to send by outputting a control signal  50  on pin (port)  121 , which is connected to pin (port)  120  of the IPL interface of microcontroller  2 . The IPL interface of microcontroller  2  accordingly changes to a slave mode and awaits the bus clock (synchronization signal  52 ) which is output by the sending interface on pin  122 . The IPL interface of the microcontroller  2  thus changes to the slave receiving mode and operates on the basis of the received bus clock. Following transmission of the data, both IPL interfaces change to a quiescent state again. 
         [0045]    Furthermore,  FIG. 1B  shows a diagnosis module  60  which can be connected to microprocessor module  1  or  2  via the lines described above for debugging operations ( FIG. 1B  indicates only the connection to the IPL interface of microprocessor system  2  by dashed lines). 
         [0046]      FIG. 2  schematically shows the design of a microcontroller  1  according to the invention with an IPL interface  5 . The IPL interface is connected by means of the usual bus systems to the microprocessor unit  3 , which, in the example shown, contains two processor cores  3 A,  3 B protected on the basis of the principle of core redundancy. In particular, the bus system has data lines D and address lines A. In addition to a memory area  6 , for example a ROM or RAM, the microcontroller furthermore comprises a DMA module  4  which can independently perform data interchange operations between the memories of the memory area  6  and the memories of the IPL module  5 , for example. 
         [0047]    The circuit arrangement shown in  FIG. 3  is the actual IPL interface  5  and handles the data transfer. The IPL interface  5  is arranged in a microcontroller  1  or  2 . For the sending path and for the receiving path, FIFO memories (one register set in each case)  101  and  104  are used in order to allow continuous datastreams. 
         [0048]    The IPL interface has the four electrical ports  120  to  123  for connection to another μC or to a diagnosis device for debugging, the electrical port  123  being a parallel data port having 4, 8, 16 or 32 lines, for example. 
         [0049]    The ports are assigned as follows:
         120 : “Lists”—control input (control signal input)     121 : “Ready”—control output (control signal output)     122 : “Clock”—output for bus clock in both directions     123 : “Data”—parallel data bus       
 
         [0054]    The ports described above, particularly port  123 , may comprise a plurality of pins which are routed to the outside on the chip. 
         [0055]    The FIFO controller  103  arranged between the FIFO memories  101  and  104  is used for ascertaining and checking the status of the two FIFO memories. It is thus possible to establish whether the FIFO memories are full or empty and whether they are above or below specific fill thresholds (“watermarks”, “overrun states”). The FIFO controller  103  retrieves suitable actions according to the state of the memories, such as “transmit data” or “abort”. If the send FIFO  101  (TX FIFO) is being filled with data, for example, the master sending mode is initiated provided that the IPL interface is in the quiescent state, i.e. no data are being sent or received. 
         [0056]    FSMs shift controller  105  is a state machine which takes the state lines shown by means of the dashed lines as a basis for bringing about actions such as interrupts via the IRQ lines. 
         [0057]      100  denotes a peripheral bus interface having IPL registers which is connected to the peripheral bus (address bus and data bus in  FIG. 2 ) of the microcontroller  1 . 
         [0058]      102  denotes a 32-bit IPL shift register for outputting the data on the parallel data port  123 . 
         [0059]    Multiplexer  106  mixes the data that are to be output with the checksum information (CRC check bits). Demultiplexer  107  removes the useful data from the check data upon reception. The check data are processed in CRC logic  108 , where an error check is also performed. 
         [0060]    Furthermore, the interface comprises a configuration register which can be used to configure properties of the interface in a suitable manner (e.g. the width of the data port  123 ). 
         [0061]    The timing diagrams in  FIG. 4  show the data transmission between the IPL (inter processor link) circuit arrangement in master output mode and a further IPL circuit arrangement in slave mode (reception of data). The master output mode is initiated when the send FIFO  101  is filled with new data. In  FIG. 4 , it is also assumed that both IPL interfaces are in a quiescent state, i.e. neither of the two interfaces is outputting a signal (High) on its control output IPLRDY_ 1 , IPLRDY_ 2 . Correspondingly, the control inputs IPLLST_ 1  and IPLLST_ 2  are at Low. It should be noted that IPLRDY_ 1  is connected to IPLLST_ 2  and that IPLRDY_ 2  is connected to IPLLST_ 1 . 
         [0062]    If the send FIFO  101  of one IPL interface is now filled with data, said IPL interface uses IPLRDY_ 1  to output a signal (High) which is received by IPLLST_ 2 . As a result, the second IPL interface (IPL in that slave input mode) changes to slave receiving mode and synchronizes itself to the synchronization signal that is output by the first IPL interface (IPL in the master output mode). When data transmission has taken place, both IPL interfaces change to the quiescent state again, i.e. both control outputs IPLRDY_ 1 , IPLRDY_ 2  have Low applied to them. 
         [0063]      FIGS. 5 and 6  show the conflict avoidance mechanism based on one embodiment. A conflict can occur when both IPL interfaces indicate that they are ready to send by outputting a control signal (High) on their control outputs IPLRDY_ 1  and IPLRDY_ 2  at the same time or in brief succession. The critical time window for this is indicated in  FIG. 5 . When this time window has elapsed, the other IPL interface in each case has safely changed to slave mode. There is thus a conflict-free time window available so long as one IPL interface remains in master mode. Conflicts which arise in this “conflict-free” time window can only stem from hardware errors. 
         [0064]      FIG. 6  shows that the IPL interface of microcontroller  2  has indicated that it is ready to send shortly after the IPL interface of microcontroller  1  without the IPL interface of microcontroller  2  having already reacted to the ready-to-send state of the IPL interface of microcontroller  1 . Since both control inputs IPLLST_ 1  and IPLLST_ 2  now each have a control signal, both IPL interfaces identify the conflict and stop further initiation of the data sending. Both IPL interfaces change to the quiescent state for a given time (waiting time_ 1 , waiting time_ 2 ). The respective waiting times are different for each IPL interface and can be stipulated in a suitable manner beforehand, for example. In the present example, it is assumed that waiting time_ 1  is shorter than waiting time_ 2 , which means that the IPL interface of microcontroller  1  leaves the quiescent state and indicates that it is ready to send again by outputting a control signal on control output IPLRDY_ 1  earlier than the IPL interface of microcontroller  2 . Since the IPL interface of microcontroller  2  is still in quiescent state, no control signal is output on IPLRDY_ 2 . A fresh conflict is avoided as a result. 
         [0065]    The timing diagram in  FIG. 7  shows the signal profile for an arrangement in which an EDP diagnosis module  60  (debugging by means of an enhanced data port), shown in  FIG. 1 , is connected to a microprocessor system  2  which has an IPL interface. The IPL interface is used for connection to the EDP diagnosis module  60 . 
         [0066]    In this case, the EDP diagnosis module  60  is in a master input mode. The microprocessor system  2  according to the invention which is connected thereto and has an IPL interface is in a slave output mode (slave sending mode). The slave sending mode is a compatibility mode for interfaces which can be operated only in master mode. Such interfaces always prescribe the bus clock irrespective of whether they are sending or receiving. To this end, the IPL interface is put into slave sending mode by means of software. 
         [0067]    The timing diagram shows how the EDP diagnosis module  60  produces a request which initiates a DMA. Following this request, a DMA transfer is started in the microcontroller  2  according to the invention in order to supply the EDP diagnosis module  60  with the requested data. 
         [0068]    It should be noted that the EDP interface sets EDPRDY (control output) to Low in order to indicate that it is requesting new data. Accordingly, IPLLST of the IPL interface likewise changes from High to Low, which results in the DMA transfer or interrupt being initiated as described above. The send FIFO  101  of the IPL interface is accordingly filled with data. Which data are loaded into the send FIFO  101  is prescribed by the software. When all the data has been loaded, the IPL interface indicates that it is ready to send by setting IPLRDY to High. 
         [0069]    Accordingly, the IPL interface can also be changed over to a slave receiving mode in order to receive data from an EDP interface. 
         [0070]    Furthermore, a μC which has the IPL interface described above may naturally also have one or more further interfaces, such as CAN. 
         [0071]    While the above description constitutes the preferred embodiment of the present invention, it will be appreciated that the invention is susceptible to modification, variation and change without departing from the proper scope and fair meaning of the accompanying claims.