The present invention relates to the communication between a companion chip and a microcontroller. The companion chip is referred to below as the companion chip.
In engine management systems for motor vehicles, in order to realize, e.g. an injection function, only the information regarding the start of injection and the angle, i.e. when injection should take place, is exchanged between a processor kernel PCP (Peripheral Control Processor) and peripheral components. The rest of the information is handled separately in a closed loop, independently of the PCP. The duration and quantity of the injection are calculated from the rotational speed and position of the engine.
The bandwidth of the SPI interface between the TriCore™ controller and CY37x proves to be a growing problem, however. At the moment, 2 MBaud of data are transmitted in the burst mode. Capacitive effects may play a role in the reason why the throughput for the SPI interface is limited to 2 MBaud. Since the controller must serve up to seven slaves, the time for the edge ramp-up in the line is very long. This may also be due to the drivers in the controller being too slow. The bandwidth limitation may have to do with the software, however.
These problems also exist in the communication between a companion processor and a microcontroller, the rapid coupling of which is particularly important.
The object of the present invention is to provide a simple and cost-effective interface between a companion chip and a microcontroller that simultaneously permits a higher data transmission rate.
This object is attained via a communication method between a companion chip and a microcontroller, in the case of which a communication protocol is transmitted including a first group of data which is used for direct, non-real-time-critical access to the chip, and including a second group of data, based on which real-time-critical access to the chip takes place, the data groups each comprising an operation code, the length of which is shorter in the second data group than in the first data group, and each data group being identifiable via the bit pattern of the operation code.
An essential point of the method according to the present invention is that the communication protocol makes it possible to access the companion chip in a manner that has been optimized in terms of speed, in addition to enabling a direct single access and burst access to the companion chip. This method makes it possible to use a synchronous—or, as an alternative, an asynchronous—serial interface to transmit the data. Compared to a faster parallel interface, much fewer PINs are required, thereby saving space, i.e. it is simpler to realize and is therefore more cost-effective. Depending on further speed requirements, the method may be implemented in hardware and in software.
Preferred developments of the method according to the present invention are mentioned in dependent claims 2 through 4.
According thereto, it is provided in an advantageous embodiment that the bit pattern of the operation code contains information on whether the first group of data is used for a single access or burst access to the companion chip. Via the additional burst mode, accelerated direct access to the data is therefore also made possible.
In a preferred manner, the bit pattern of the operation code contains information on whether a direct access to the modules or FIFOs of the chip is carried out. Certain modules of a companion chip may therefore be addressed explicitly.
It is also preferable for the bit pattern of the operation code to contain information that characterizes the results of an asynchronous read access, and via which the access may be identified. As a result, e.g. responses of the companion chip to concurrent read requests from a microcontroller may be allocated and managed.
The present method may be embedded in a computer program that may be loaded in the internal memory of a digital computer system. The program includes software code parts for carrying out the method when the computer program runs on the computer system. This software-based realization of the method makes it possible, in particular, to utilize standardized microcontrollers in order to implement the method.
The method may also be designed as a computer program product that includes a computer-readable medium that contains program instructions that may be implemented by a computer, and in the case of which the program instructions contain the computer program described above. The method may therefore be transferred particularly easily to other computer systems.
The object described above is also attained via a communication interface between a companion chip and a microcontroller, and which is designed to carry out the communication method.
Due to the rapid access method, an essential point of the communication interface according to the present invention is its openness as compared to broad standards. A large number of possible microcontrollers may therefore be considered for use in control devices. There are two basic possibilities for selecting the interface.
The first possibility is to implement a parallel interface with data, address, and control signals. An interface of this type has the advantage that high data transmission rates between the microcontroller and the companion chip may be attained. It has the disadvantage, however, that a parallel interface requires a very large number of pins. For example, the EBU (External Broadcasting Unit) of the TriCore™ controller includes forty pins for connecting external peripheral components. Moreover, only microcontrollers that include an external parallel interface may then be considered. Future microprocessors will only have a point-to-point connection to the flash, however, and they will not support any further participants on this bus.
According to a second possibility, a serial interface is used to connect the companion chip. This interface has the advantage that it is very widespread, and virtually every microprocessor includes one or more synchronous and asynchronous serial interfaces. The disadvantage of this interface is that its bandwidth is limited, requests are not prioritized, and problems related to EMC (electromagnetic compatibility) may occur.
Preferred developments of the communication interface according to the present invention are mentioned in dependent claims 8 through 11.
In an advantageous embodiment it is provided that the communication interface is designed for the synchronous serial transmission of data. The selection of the microcontroller is therefore not limited by the interface of the companion chip, and the costs for the entire system are kept low. The above-mentioned disadvantages of serial interfaces are eliminated via the implementation of the method according to the present invention. A suitable software protocol is therefore loaded on the serial interface, and a related hardware support of the protocol is realized in the companion chip. Basically, however, the protocol may also be realized as software in the companion chip. To support optimized access, it is advantageous in both cases for the interface to be designed to prevent an access from taking place in addition to a real-time-critical access.
The interface is preferably designed for direct access by the microcontroller to a memory of the companion chip. This prevents, e.g. data mirroring between the microprocessor and the companion chip, which would require a greater bandwidth for the connection.
It is also preferable for the interface to be designed to transfer data in a time frame of up to 5 μs to 10 μs. This time frame defines the period of time in which the data are transmitted; the transmission rate is approximately 20 MHz, for a period lasting 5 ns. As mentioned above, a serial interface should be used for the communication between the microcontroller and the companion chip, since this increases the amount of freedom allowed in selecting the controller. Using the bandwidth mentioned above, an interface of this type is capable of fulfilling a latency for transmitting the data to measure and control a rail pressure.
The object described above is also attained via a companion chip, in the case of which a hardware interpreter module is provided to process the communication protocol according to the present invention.
An essential point of the companion chip according to the present invention is that a protocol may be implemented rapidly without this type of implementation limiting the types of microprocessors that may be used.
Advantageous developments of the companion chip according to the present invention are mentioned in dependent claims 13 and 14.
According thereto, it is provided in an advantageous embodiment that the hardware interpreter module is designed to modify the operation code of the second group of data. As a result, real-time-critical communication may be implemented between the microcontroller and the companion chip using a shorter operation code which is implemented once more in the companion chip.
It is preferable for the companion chip to include a functionality for processing speed data, injection data, and/or ignition data in order to effectively support the control tasks of the microcontroller.
The microcontroller is preferably equipped with a software interpreter module for carrying out the method according to the present invention, and which enables it to be adapted to the companion chip according to the present invention.
The communication method according to the present invention, and the companion chip are described in greater detail below with reference to an embodiment. Identical or identically-acting parts are labelled using the same reference numerals.
For this reason, the requirements on the communication interface between a microcontroller and a companion chip in terms of the speed and injection functionalities will be described in greater detail below before discussing the implementation at the interface according to the present invention.
To measure rotational speed, given 60 teeth and 10,000 rpms per tooth, there are 100 μs available to reset the time base of a timer. In worst-case scenarios, this time is shortened to 25 μs. This is the case in areas having special requirements that use gears that include up to 147 teeth. The tooth counter data must be transmitted using 16 bits, the index data using 16 bits, the time stamp data using 24 bits, and the angle stamp data using 24 bits. Today, the data are transmitted to the companion chip using 3 times 32 bits. If optimized, the transmission could be carried out using 80 bits. The transmission is necessary since the rotational speed software requires a very large quantity of application data. The communication for the rotational speed function takes place mainly from the companion chip to the microcontroller. By moving the rotational speed function to the companion chip, the computing power at the highest rotational speed may be reduced by 5-6%.
For injection control, communication must take place in both directions. The reason for this is application data that are located in the (flash) memory of the microcontroller. Today, parts of these data are already located in the vicinity of the PCP, which causes problems. To increase security, checking mechanisms are advantageously included in the communication protocol between the microcontroller and the companion chip. A parity check would be sufficient since it is possible for an injection to become lost. For the injection function, the following requirements are placed on the communication interface between the microcontroller and the companion chip.
A total of 2.5 KB of RAM data must be mirrored, or it must be possible to access the memory of the companion chip via the communication interface. Due to the limited bandwidth, it should be possible to access the microcontroller in the memory region of the companion chip.
The activation duration depends on the measurement of the rail pressure, which requires that stringent real-time requirements be met. The time available for data transmission is between 5 μs and 10 μs. The remaining time is required to calculate the control algorithm.
Given 5000 revolutions, four cylinders, and three injections, a BIP (Begin of Injection Point) data rate of 0.8 MbH/s occurs. The transit time for the BIP detection is 30-60 μs.
In the future, an EIP (End of Injection Point) should also be found, which would result in twice as many values.
In first group 11, the non-real-time-critical communication with companion chip CC is realized using single accesses and burst accesses. In addition, an optimized protocol 12 is introduced for burst accesses. The two variants are shown in
In all, a protocol of this type results in the bandwidth required at a serial connection. The protocol is implemented in companion chip CC via a module in the hardware, thereby relieving a microprocessor in companion chip CC of this task, and since the communication protocol for connecting the microcontroller is fixedly specified. With regard for microcontroller MC, the protocol must be implemented in the software, so that it may be applied there at a standardized interface.
The coding of the two direct accesses therefore takes place via operation code bits 31 and 30. Bit 28 identified a read access (0) or a write access (1) to companion chip CC. Via the format, it is specified whether the access has a width of one byte, one half-word, or one word. The ID is used to identify responses from companion chip CC to concurrent read requests from microcontroller MC. A 20-bit address space is available for addressing the modules and memory components of companion chip CC. For burst accesses, operation code OC is followed by a field that defines the number of data words that follow a communication between microcontroller MC and companion chip CC in the transmission frame. An exact specification of the width of the fields may be defined based on the specific application.
As a result, direct and optimized accesses to modules of companion chip CC are made possible. In addition, certain modules of chip CC may also be addressed.
All common microcontrollers today have a synchronous serial interface SPI which could be operated using a higher clock frequency.
As mentioned above, communication via a synchronous interface does not offer support for parity bits on the hardware side. This has the advantage that a higher useful data rate may be attained, but security is reduced as a result. A parity mechanism may also be implemented via SPI in the software, however. In addition to parity bits, for the SPI interface, it is also possible to read back sent data from a master, or to package a CRC (Cyclic Redundancy Check) in a message.
Microcontroller MC (not depicted) is connected via an SPI slave interface SPI-S (SPI-Slave). The control of external injection ICs then differs in the diesel segment and the gasoline segment. CYx components are used in diesel engines. They are usually equipped with more intelligence and are therefore more expensive. They are connected via a SPI master interface SPI-M (SPI-Master). CJx components are used in gasoline engines. These are simple ICs (Integrated Circuits) that require more control from the outside. Power end stages (H bridges) may be connected via SPI or MSC (Micro Second Channel).
Behind the SPI-S interface an interpreter module I is implemented that implements the protocol for the communication between microcontroller MC and companion chip CC. Interpreter I unpacks data packets arriving from the microcontroller and writes them in First-In-First-Out modules FIFOx which are capable of implementing different request priorities, or it sends direct requests via the AE bus to the modules of companion chip CC. For asynchronous read accesses, i.e. for read accesses that microcontroller MC transmits but for which it does not actively wait, interpreter I must provide the result of the request with an ID, based on which microcontroller MC may identify the response. In addition, interpreter I is responsible for generating the interrupt to microcontroller MC and for transmitting time-critical data on time.
Number | Date | Country | Kind |
---|---|---|---|
102007038544.9 | Aug 2007 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP08/59637 | 7/23/2008 | WO | 00 | 8/13/2009 |