Field of the Invention
The invention relates to a memory device which, for the purpose of serial data transfer of binary data, is connected between two or more subscribers of a data transmission system. The memory device has a multiplicity of memory objects, preferably of equal size, that are identifiable by their address. The data width in each memory object corresponds at least to a predetermined data width of a data object intended for data transfer. A plurality of memory objects form a FIFO (first-in, first-out) structure. The invention also relates to a method for operating the memory device.
Bus systems are being used increasingly frequently for networking of distributed communications systems, for the purpose of data communication between different communications stations. In such bus systems, which are used particularly advantageously in motor vehicle electronics, a communications station communicates via a data bus with at least one other communications station which is connected to the same data bus. The bus system, in which various communications stations communicate with one another via a data bus as the communications medium, can be implemented, for example, in a known manner as a Controller Area network (CAN bus system) which is described in detail, for example, in “CAN-Controller Area Network: Grundlagen und Praxis [Principles and Practice]”, Wolfhard Lawrenz (publisher), 2d ed., Hüthig-Verlag, 1997.
Various processors are used in a CAN bus system owing to the multiplicity of communications stations, which are called network nodes here. In each of the network nodes, the central processor unit (CPU) of the corresponding processor then communicates with the respective CAN controller which, for its part, is coupled to the data bus. Owing to the different computation load on the various network nodes, resulting from the different computation performances of the corresponding central processor units in the corresponding processors at these network nodes, and owing to the normally defined transmission rate of the data bus which is connected to the CAN controller, a situation often arises in which it is not possible for the respective network nodes to process in real time all the data to be transmitted via the data bus.
However, at present, the access events between the central processor unit and the CAN controller to data records can be decoupled only by joint software protocolling. However, this process is extremely complex and also requires the processors to have greater computation performance.
It is accordingly an object of the invention to provide a memory and a method of operating the memory, which overcomes the above-mentioned disadvantages of the prior art devices and methods of this general type and which allow a data transfer between a data transmitter and a data receiver that may be operated at different data transmission rates, in a simple manner and with as little hardware computation complexity as possible.
With the foregoing and other objects in view there is provided, in accordance with the invention, a memory device to be used in a data transmission system with at least two subscribers. The memory device is to be connected, for serial data transfer of binary data objects of a predetermined data width, between the at least two subscribers. The memory device comprises:
The memory device according to the invention and the method according to the invention for operating this memory device allow hardware decoupling of the data transfer between different subscribers to be undertaken in a simple manner and very flexibly. The data transfer takes place largely under data control and thus requires minimal computation complexity in a central processing unit.
The particular advantage of the present invention is thus that a programmable number of otherwise independent memory objects of a memory are organized to form FIFO structures. These FIFO structures allow successive data objects, which are intended to be transmitted by a data transmitter via the memory device to a data receiver, to be processed under data control with minimal software complexity and essentially under data control. The fundamental method for operating the memory device is referred to, in the following text, as the FIFO operating mode.
A further advantage of the FIFO structures results from the interaction with the respective other memory objects in the memory. In this case, for example, one subscriber can create data blocks in a FIFO structure and provide them for data transfer. The respective other subscriber can then access the messages stored in the FIFO structure and sequentially process the individual messages. This capability relieves the load on the internal program timing, since the first subscriber does not need to be synchronized to the second subscriber for each access.
Seen globally, these FIFO structures are used in particular to buffer the typically asynchronous accesses between the subscribers at a different data transmission rate and with a certain data depth, and in this way to decouple them from one another. Loss of data can thus be safely avoided.
In a further method for operating the memory device, the memory objects which are organized to form a FIFO can also advantageously be used independently of one another, in a known manner, as normal memory objects. This operating mode is referred to as the gateway operation.
In a particularly advantageous further development, the architecture of such a memory device arranged between two subscribers allows the two operating modes described above to be combined: on the one hand the conventional method of operating individual memory objects using the so-called gateway operating mode and, on the other hand, memory objects which can be configured by a program and which are operated in the FIFO mode. The particular advantage of this so-called FIFO gateway operating mode is the high level of flexibility and the low additional level of hardware and software complexity in complex data transfer systems.
The invention is particularly advantageous in a bus system that is designed, for example, as a so-called CAN bus system that is suitable for use in a motor vehicle power supply system. In a CAN bus system, the memory device can be used to buffer the data transfer between the central processing unit and the CAN controller of a network node.
Furthermore, networked systems having a plurality of bus systems are now being used increasingly. In the process, there is, of course, also an increase in the need for communications subscribers to different bus systems to be able to communicate with one another. A memory device which is integrated in a bridge module can advantageously be used for buffering the data transfer between the various bus systems, which are operated, for example, at different data transmission rates.
Other features which are considered as characteristic for the invention are set forth in the appended claims.
Although the invention is illustrated and described herein as embodied in a memory device and method for operating the memory device, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims.
The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings.
a is schematic illustrating a FIFO operating mode.
b is a schematic illustrating a gateway operating mode.
c is a schematic illustrating a shared gateway operating mode.
d is a schematic illustrating a FIFO gateway operating mode.
Referring now to the figures of the drawing in detail, wherein, unless otherwise stated, identical or functionally equivalent elements are identified with the same reference symbols in all the figures, and first, particularly, to
Typically, but not necessarily, the two subscribers 3, 4 use a different data transmission rate. Any data transfer direction may be used, that is to say unidirectionally from one of the subscribers 3, 4 to another subscriber 3, 4 or bidirectionally in both directions. In this case, each of the subscribers 3, 4 may operate either as the subscriber 3, 4 transmitting the data and as the subscriber 3, 4 receiving the data. In the following text, the subscriber 3, 4 transmitting the data is referred to as the data transmitter, and the subscriber 3, 4 receiving the data as the data receiver.
Furthermore, the number of subscribers 3, 4 connected to the memory device 1 is not limited to a specific number, and any desired number of subscribers 3, 4 may be connected to the memory device 1. In addition, the specific configuration and/or the function of the subscribers 3, 4 which are connected to the memory device 1 is of no further interest for the purposes of the present invention. Preferred refinements of the these subscribers 3, 4 are described in two exemplary embodiments with reference to
In a known configuration, the memory device 1 has a physical memory 1a as well as a memory control device 1b. The memory control device 1b is connected to the memory 1a via a bus 1c which typically has an address bus, a data bus and a control bus. The memory 1a is organized on an object basis, that is to say the memory 1a contains a multiplicity of memory objects 1d. Typically, but not necessarily, the individual memory objects 1d in the memory 1a are of the same size. According to the invention, each of the memory objects 1d in the memory 1a can be assigned flexibly and individually to each of the (two) connected subscribers 3, 4. These operating modes of the memory objects 1d are described in detail in the following text, with reference to
In the present exemplary embodiment, the individual memory objects 1d in the memory 1a are divided into three regions A to C. The data contents and the function of these regions A to C are described briefly below:
The various memory objects 1d can, according to the invention, be operated in various operating modes. Four particularly advantageous operating modes are explained in more detail in the following text, with reference to
First Operating Mode:
In the first operating mode according to
For the situation in which fewer data objects D1 . . . D3 are transmitted by the data transmitter than the corresponding FIFO can accommodate, that is to say for the situation in which one or more data regions B have still not been written to, a so-called fill-level indication can be provided in one of the memory objects S1 . . . . S4 of the FIFO, to indicate which of the memory objects S1 . . . S4 in the FIFO are empty. Conversely, it would also be conceivable for the data transmitter to transmit more data objects than the corresponding FIFO can accommodate. A device can be provided for this situation which sets a flag, for example once the last or penultimate memory object S3, S4 in the FIFO has been written to, and this flag produces an interrupt signal. The interrupt signal can then be used, for example by the central processor unit, to suppress further data transfer.
Once the data transmitter, via the write pointer WP, has stored a data packet comprising the data objects D1 . . . D3 in the corresponding memory objects S1 . . . S3, the FIFO is released to transmit data. The data transmitter can then read these memory objects S1 . . . S3 via a read pointer RP.
Second Operating Mode:
In the second operating mode, which is also called the “gateway operating mode” in the following text, only two memory objects S5, S6 are provided for the data transfer. The first of these memory objects S5 is assigned to the data transmitter as receiver, and the second memory object S6 is assigned to the data receiver as transmitter. A data object D5 intended for a data transfer is written via a write pointer WP and by the data transmitter to the corresponding data region B in the first memory object S5. This data object D5 is then copied to the corresponding data region B in the second memory object S6. From there, the data object D5 can be read out via the read pointer RP of the data receiver.
Third Operating Mode:
In the third operating mode, which is also called the “shared gateway operating mode” in the following text, only a single memory object S7 is provided for the data transfer. This memory object S7 is in this case assigned both to the data transmitter as receiver and to the data receiver as transmitter. A data object D7 intended for a data transfer is written to the corresponding data region B in the memory object S7. Once it has been written to the memory object S7, this data object D7 can be read out again by the data receiver, via a read pointer RP.
Fourth Operating Mode:
The fourth operating mode, which is also called the “FIFO gateway operating mode” in the following text, represents a mixture of the FIFO operating mode and the gateway operating mode. This operating mode provides for a FIFO having a number of FIFO memory objects S9 to S12 as well as a memory object S8 which is arranged upstream thereof and is operated in the gateway mode. The data objects D9 . . . D11 intended for a data transfer are written via the write pointer WP to the corresponding data region B in the memory object S8, which is operated in the gateway operating mode. The data objects D9 . . . D11 which have just been written to the memory object S8 are then automatically copied to the corresponding data region B in the next free FIFO memory object S9, that is to say the first data object D8 is written to the data region B in the first FIFO memory object S9, and the subsequent data objects D10, D11 are written to the corresponding subsequent memory objects S10, S11. In the present exemplary embodiment, the last memory object S12 in the FIFO is once again empty, that is to say it does not contain any data objects. The data receiver can then once again read out the data objects D9 . . . D11 via the read pointer RP, in the sequence in which they were written to the corresponding memory objects S9 . . . S11.
In the exemplary embodiment according to
The reading-out process in the operating mode described above can be carried out either immediately after the corresponding memory objects have been written to, or not until after a request signal from the data receiver. Furthermore, as for example in the case of a FIFO, the provision of the data objects may itself be used as a request for a data transfer.
In the gateway operating mode and in the FIFO gateway operating mode, it is frequently also advantageous not only for the data objects intended for a data transfer to be copied from one memory object to another memory object, but also for the information contained in the identification region A to be copied, in addition, to the corresponding data objects. Furthermore, it is also possible for a situation to arise in which the entire data region of a memory object has not been written to. In this case, it is than advantageously possible to provide for only those data objects which have been written to the corresponding data region to be copied.
In
As already mentioned,
The memory 1a, only parts of which are illustrated here, contains a multiplicity of memory objects 1d which are divided into the regions A . . . C. Each memory object 1d can in this case be identified by its binary address, which is contained in the identification region A. The memory objects 1d are arranged in rising address sequence.
The control region C of each memory object 1d contains a so-called gateway control register GCR, which defines the operating mode of the various memory objects 1d. For the situation in which the four different operating modes mentioned above are intended to be used for operating the memory 1a, the gateway control register GCR has a width of two bits and can be designed as follows:
Furthermore, the control region C of each memory object 1d contains a node selection register NSR, which defines the assignment of the respective memory objects 1d to the connected subscribers 3, 4. In the present example, T3 and T4 mean that the corresponding memory objects 1d are assigned, respectively, to the first subscriber 3 and to the second subscriber 4. As is indicated in
The last-mentioned registers GCR, NSR can optionally be initialized by one of the subscribers 3, 4, typically the central processor unit. However, once they have been initialized and for the situation in which no renewed initialization takes place, they are then permanently specified throughout the entire data transfer.
The memory segment of
Thus, only the start address of the FIFO and the FIFO width are required in order to define a FIFO. The width of the FIFO, which may be set variably depending on the application, is stored in a specific FIFO width register FLR in the first memory object 1d in the FIFO. In the example corresponding to
Typically, one of the memory objects 1d in the FIFO, for example the respective first memory object 1d in a FIFO, contains a FIFO fill-level register FFR which indicates how many of the FIFO memory objects 1d are still empty. The contents of the FIFO fill-level register in the present implementation point to the first free memory object 1d in the FIFO.
The memory object which follows the quadruple FIFO, that is to say the memory object 1d having the address 01100, is operated in the present exemplary embodiment in the shared gateway operating mode (see above). The memory object 1d is intended for receiving data from subscriber 4. The data just received are then read out automatically by the subscriber 3.
The four memory objects (addresses 01101 . . . 10000) following this memory object are all operated in the gateway operating mode. In this case, the first memory object pair (address 01101, 01110) is intended for a data transfer of memory objects from subscriber 3 to subscriber 4. The second memory object pair (address 01111, 10000) is, in contrast, intended for a data transfer from subscriber 4 to subscriber 3.
In addition, as indicated in
In a particularly advantageous refinement, it is possible to provide in the gateway mode for the addresses of the first memory objects 1d of memory object pairs operated in the gateway mode to have odd numbers.
In this way, it is possible to determine in a very simple manner, by means of the implementation and controlled by the addresses and via the control information in the control regions C, which of the memory objects 1d is being operated in the FIFO mode and which in the gateway mode. The functionality of the memory 1a according to the invention is thus under data control and is determined by the specific memory division. The data are in this case not copied randomly backward and forward via the memory 1a, but the data objects of predetermined data regions B are transferred instead of this.
Such a data-controlled data transfer is thus highly flexible, since no additional hardware or software programming is required. In this way, the computation performance of a central processor unit that is connected is not adversely affected, thus avoiding any impairment in the performance capability of the overall communications systems.
The control region C may also optionally contain a so-called transfer status register TSR which defines which of the memory objects 1d are intended for transmitting data (TO) and which are intended for receiving data (RO). However, it is advantageously possible to dispense with such a transfer status register TSR if the assignment is controlled by the data items to be transmitted themselves. For example, it is possible to define in the control region:
The invention is particularly advantageous if one of the subscribers 3, 4 has a very much higher data transmission rate than the other subscriber 3, 4. In this situation, the FIFOs can be used for data buffering between the “fast” and the “slow” subscriber 3, 4. Typically, but not necessarily, the FIFO width depends in particular on the ratio of these data transmission rates.
Furthermore, the configuration of at least some of the memory objects 1d as FIFOs is not exclusively limited to data buffering during a data transfer between a “fast” and a “slow” subscriber 3, 4, but can also advantageously be used, within the context of the invention, for any data transfer where the subscribers 3, 4 are using the same or different data transmission rates.
In particular, memory objects 1d being operated in the FIFO mode can also advantageously be used when, for example, the data transmitter is transmitting data continuously. These data can then be read out of the FIFO, and can be further processed, in collated form, by the data receiver. In this way, owing to shorter access times, the data receiver requires less computation power for the collated read-out process.
Alternatively, it would, of course, also be conceivable for the reading out and further processing of the data to be carried out at the same speed, but with intervals of different length between the write and read cycles. A FIFO allows account to be taken of this situation by matching to the respective application, and to the system design.
In
A bridge module 5, which contains the memory device 1 according to the invention, is provided for the purpose of data transfer between the two bus systems 3, 4. The memory device 1 is in this case connected via a respective interface circuit 6a, 6b and via connecting lines 2a, 2b in a known manner to each of the data buses 3a, 4a of the bus systems 3, 4. Typically, the data buses 3a, 4a of the two bus systems use different data transmission rates. The memory device 1 in the bridge module 5 thereby be used for decoupling the data transfer between the bus systems whose speeds differ.
A bus system 10 is designed, for example, to correspond to one of the bus systems 3, 4 shown in FIG. 4. The bus system 10, which in this case is a CAN network, has a multiplicity of network nodes 12, 12′ connected to a data bus 11. The memory device 1, which is integrated in
The CAN module 3 is furthermore connected via an interface circuit 13 to the data bus 11 of the bus system 10. The CPU module 4 is connected via an internal bus 14 to further modules 15 in the network node 12′. These further modules 15 may include, for example, a timer module, an interrupt module, an internal memory, the voltage supply for the network node 12′, A/D converter modules etc. The memory device 1 is provided only in one of the network nodes 12′ in
The exemplary embodiments according to
The exemplary embodiments described above indicate preferred and advantageous implementations of the memory device 1 which is operated using the method according to the invention and which is suitable for decoupling the data transfer between at least two connected subscribers 3, 4. The exemplary embodiments and variations are but examples of various advantageous alternatives in which the invention may be implemented. Particularly, various alternatives and combinations of the described examples are within the inventive concept as defined in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
4158235 | Call et al. | Jun 1979 | A |
4965794 | Smith | Oct 1990 | A |
5619653 | Kawauchi | Apr 1997 | A |
5623700 | Parks et al. | Apr 1997 | A |
5732286 | Leger | Mar 1998 | A |
5748923 | Eitrich | May 1998 | A |
5859980 | Kalkunte | Jan 1999 | A |
5884099 | Klingelhofer | Mar 1999 | A |
5931926 | Yueng et al. | Aug 1999 | A |
5941966 | Gotze et al. | Aug 1999 | A |
5987554 | Liu et al. | Nov 1999 | A |
Number | Date | Country |
---|---|---|
0419067 | Mar 1991 | EP |
9733230 | Sep 1997 | WO |