WO2010025786A1 - Logic circuit for calculating crc test values - Google Patents

Logic circuit for calculating crc test values Download PDF

Info

Publication number
WO2010025786A1
WO2010025786A1 PCT/EP2009/004427 EP2009004427W WO2010025786A1 WO 2010025786 A1 WO2010025786 A1 WO 2010025786A1 EP 2009004427 W EP2009004427 W EP 2009004427W WO 2010025786 A1 WO2010025786 A1 WO 2010025786A1
Authority
WO
WIPO (PCT)
Prior art keywords
logic circuit
crc
data
input
polynomial
Prior art date
Application number
PCT/EP2009/004427
Other languages
German (de)
French (fr)
Inventor
Stephan Schultze
Original Assignee
Robert Bosch Gmbh
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Robert Bosch Gmbh filed Critical Robert Bosch Gmbh
Publication of WO2010025786A1 publication Critical patent/WO2010025786A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/003Modifications for increasing the reliability for protection
    • H03K19/00315Modifications for increasing the reliability for protection in field-effect transistor circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/09Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/65Purpose and implementation aspects
    • H03M13/6508Flexibility, adaptability, parametrability and configurability of the implementation
    • H03M13/6516Support of multiple code parameters, e.g. generalized Reed-Solomon decoder for a variety of generator polynomials or Galois fields

Definitions

  • the present invention relates to a logic circuit for calculating CRC check values and to a use of such a circuit in a data transmission.
  • the Cyclic Redundancy Check is an information technology method for determining a check value for data (e.g., network traffic or a file) to detect errors in the transmission or duplication of data.
  • CRC check values are also commonly referred to as CRC checksums, although they are actually test division residuals rather than sums.
  • CRC CRC checksums
  • a data block is modulo divided by a CRC polynomial. The remainder of the division represents the CRC check value.
  • CRC types are distinguished by the CRC polynomial used (generator polynomial). After the bit length of Polynomial is the length of the testable data block. There are known standard polynomials, such as:
  • CRC-CCITT (CRC-16): 0x11021 IBM-CRC-16: 0x18005
  • the logic circuit is capable of using arbitrary CRC polynomials, the maximum bit number of the polynomial being limited only by the design of the circuit. In practice, however, it will be useful to set a maximum bit number of 32 or 64.
  • logic circuit provides an interface functionality, such as an API. This procedure allows for fast
  • the logic circuit may be formed as an integrated circuit or part of an integrated circuit. You may • also designed as an ASIC or FPGA etc.
  • logic circuits in most cases no longer consist of hard-wired logic, as in the past, but of flexibly programmable devices (FPGAs, EPLDs, ASICs, gate arrays, etc.).
  • FPGAs, EPLDs, ASICs, gate arrays, etc. Depending on the type, these blocks do not contain any predetermined logic functionalities, but instead provide a kind of "logic building block 11. By programming these blocks, a desired functionality can be specified.
  • Conventional logic devices have a predetermined, manufacturing or type-related capacity.
  • logic modules are already present in existing circuits whose capacity is not yet fully occupied.
  • the logic circuit according to the invention can be implemented particularly advantageously, since only small or no circuit-related changes are necessary. Thus, a cost saving can be achieved.
  • the data blocks are transferred to the logic circuit, which then independently calculates the corresponding CRC test values.
  • the transfer can for example be serial or parallel, via registers, etc.
  • the checksum of a data stream can be calculated in bits or bytes, etc., and attached to the data by the sender.
  • the calculation of the checksum per se is preferably carried out by known methods, in particular
  • the switching means for this purpose at least one multiplexer, are passed to the at least two bits of the shift register.
  • the calculating means expediently comprise at least one XOR gate.
  • XOR gates By means of XOR gates, a polynomial division can be implemented particularly easily in hardware. The length dependence can then be achieved, for example, by selecting one of the bits of the shift register via the multiplexer and writing it as Feedback is performed in the XOR block.
  • a chain of 31 AND gates could be used, with each AND gate having two inputs, each with a CRC register bit and a configurable bit. In this case one needs, for example, 31 control bits (instead of 5 control bits in comparison with a MUX), of which only exactly one AND gate is provided with a "1", all others have the value "0".
  • the logic circuit has an input for receiving an initial value for the shift register.
  • initialization values have proved to be advantageous, which advantageously can also be fed to the logic circuit from the outside.
  • the polynomial x A 16 + x A 12 + x A 5 + 1 is used as the seed "1" in each register bit.
  • the starting value can also assume any value, in particular also "0".
  • At least one predetermined CRC polynomial is integrated. It is advisable to already firmly integrate the polynomials required for the intended purpose and / or the known polynomials mentioned in the description of the prior art into the circuit, whereby in particular the external circuit complexity can be reduced. In particular, a choice may be made to select one of the predetermined CRC polynomials for use. It is also possible to use only one predetermined CRC polynomial integrate, which, for example, is then used automatically when no freely definable CRC polynomial is applied to the input. It is advisable to also predetermine an initialization value for each predetermined CRC polynomial.
  • a length of the CRC polynomial can be specified externally. It is also possible to determine the length of the externally specified CRC polynomial within the circuit, but the external specification of the length can reduce the complexity of the circuit. By determining the length within the circuit, it is possible to reduce the external circuitry overhead.
  • the logic circuit according to the invention is integrated in a communication controller.
  • Communication controllers are used for data transmission and provide various functionality for data transmission.
  • the additional integration of the logic circuit an advantageous space savings can be achieved.
  • the logic circuit according to the invention can also be integrated into other logic modules.
  • the logic circuit according to the invention is designed as an integrated circuit module. As a result, it can be used in addition to existing components or controllers and used in existing systems.
  • Ethernet-based data transmission is now widespread and forms a standard embodiment of the Data transfer.
  • the logic circuit according to the invention can advantageously be integrated into existing systems.
  • the logic circuit according to the invention is used in a fieldbus network, in particular in a network according to a SERCOS standard.
  • a SERCOS III standard network may be used that allows the use of Ethernet components in a SERCOS connection.
  • the logic circuit according to the invention is expediently used for real-time data transmission or real-time communication. Particularly in the case of real-time communication, the accelerated CRC test value calculation has an advantageous effect.
  • FIG. 1 a shows a flowchart of a data transmission in which
  • FIG. 1 b shows a flowchart corresponding to FIG. 1 a, wherein an embodiment of a logic circuit according to the invention is used;
  • Figure 2 is a schematic representation of a
  • Figure 3 shows the structure of a master data telegram according to the SERCOS III standard, which is generated using an embodiment of the logic circuit according to the invention.
  • Figure 4 is a schematic representation of the switching elements of an embodiment of a logic circuit according to the invention.
  • FIG. 1 a a flow diagram of a data transmission in the prior art is shown, wherein selected data fields are provided with CRC check values.
  • the data to be transmitted is prepared.
  • this includes the division of the data into data blocks, whereby individual data blocks are transmitted in data telegrams.
  • step 101 the associated CRC check value is calculated for each data block. This is done in the prior art by software routines that take a relatively long period of time due to the described requirements.
  • method step 102 the data blocks are then combined with the calculated CRC test values.
  • the summarized data are finally transferred in method step 103 to the communication controller.
  • the communication controller performs the subsequent data transfer largely independently.
  • FIG. 1 b shows a flow chart corresponding to the flowchart shown in FIG. 1 a, wherein a preferred embodiment of a logic circuit according to the invention is used.
  • step 110 the data to be transmitted is divided into individual data blocks.
  • step 111 the logic circuit dedicated for calculating CRC test values is initialized and configured.
  • the logic circuit u.a. the CRC polynomial to be used, the length of the CRC polynomial to be used, and the position of the data blocks for which CRC check values are to be calculated.
  • method step 112 only the data blocks of the logic circuit or of a communication controller having an integrated logic circuit are to be transferred. Before the subsequent data transfer leads the logic circuit or in the communication controller integrated logic circuit independently performs the CRC test value calculation. In this way, the process can be accelerated.
  • a logic circuit By using a logic circuit according to the invention, in particular communication controllers can be provided which are suitable for different transmission protocols, in particular different fieldbus systems. For example, a 16-bit checksum is used on a SERCOS I / II or CAN bus, whereas a SERCOS III, safety SERCOS or EtherCAT bus uses a 32-bit checksum.
  • FIG. 2 an embodiment of a logic circuit according to the invention is shown roughly schematically and designated overall by 200.
  • the logic circuit 200 has an input 201 and an output 202.
  • the input 201 and the output 202 may be configured for serial or parallel data transmission, as is well known in the art. It is understood that the input 201 and the output 202 are not components physically formed in this form, such as e.g. Plug, etc., but that also inputs and outputs of a logical interface description are included in this description.
  • Input data 203 is provided to the input 201.
  • the input data 203 includes various data areas or data blocks 203a to 203e.
  • the subdivision of the input data 203 into individual blocks does not necessarily correspond to a temporal, spatial or other subdivisions, but above all represents a schematic subdivision.
  • the input data blocks 203a to 203e contain, on the one hand, the configuration data necessary for initialization and configuration of the logic circuit 200 and, on the other hand, the data for which a CRC test value calculation is to take place.
  • the input data block 203a includes the CRC polynomial to be used, the input data block 203b the length of the CRC polynomial to be used, the input data block 203c the amount or number of data for which the CRC check value calculation is to be made, and the input data blocks 203d and 203e the Data for which the CRC test value calculation is to take place.
  • a starting value for a shift register within the logic circuit 200 can also be predeterminable via the input 201.
  • different start values for example, "111111 .... 1" ("1" in each register bit) or "0" ("0" in each register bit) depending on the selected CRC polynomial have proven to be advantageous.
  • the starting value can be specified within the input data 203 as a further data area or data block (not shown).
  • the input data blocks 203a to 203e are transferred as input data 203 to the input 201.
  • Logic circuit 200 then calculates the associated CRC check values according to its configuration for the data transferred.
  • the logic circuit 200 finally provides the output data 204 at its output 202.
  • the output data 204 includes output data blocks 204a to 204d.
  • the number of Output data blocks are preferably determined by the number of input data blocks.
  • a CRC check value is calculated for each of the two input data blocks 203d and 203e. • the input data blocks 203d and 203e are outputted as output data blocks 204a and 204c, with the associated CRC check values are inserted in each case as more output data blocks 204b and 204d.
  • FIG. 3 schematically shows the structure of an exemplary master data telegram (MDT) according to the SERCOS III standard.
  • SERCOS is a standardized servo drive interface with fieldbus couplers.
  • the range of applications includes not only machining technologies, but also other automation solutions, e.g. in the field of assembly robots, as well as of printing and packaging machines.
  • the access to the transmission medium is realized by a time slot method. Each participant is assigned a time at which he exclusively has access to the transmission medium.
  • the communication cycle is determined by the
  • Master synchronization telegram (MST) of the master eg a control system
  • the slaves eg Drive systems or I / O stations send successively one ' drive telegram (AT) with their current actual values.
  • the master sends the master data telegram (MDT) with the setpoints. This process is repeated every communication cycle. All data telegrams are received by all slaves.
  • An MDT therefore contains data for all the slaves to be controlled.
  • An MDT field (MDT field) 300 has three areas 301, 302, 303, the area 301 being called “MDT hotplug field", the area 302 being "MDT Service Channel field” and the area 303 being "MDT realtime data field " referred to as.
  • Area 303 (MDT realtime data field) contains the real-time data, which is transmitted to all the slaves to be controlled.
  • the area 303 has three inner areas 304, 305, and 306, each containing real-time data for different connected slaves.
  • data is included for three connected slaves, so areas 304, 305 and 306 are referred to as "realtime data 1", "realtime data 2" and "realtime data 3".
  • the number of slaves for which data is transferred may change each transmission cycle.
  • the regions 304, 305, 306 again have a different internal structure.
  • area 304 (realtime data 1) has two areas 304a and 304b, which are called "Default real-time data 1 "(SRD 1) and” safe data container 1 "(SDC 1).
  • Area 305 (realtime data 1) has area 305a (SRD 1)
  • area 306 (realtime data 3) has area 306a (SRD 3) and area 306b (SDC 3).
  • SRD 3 contain the data for the respective slaves, which do not have to have increased error safety. In the areas 304b (SDC 1) and 306b (SDC 3), however, the data are included, which have an increased error safety. CRC check values are added to provide increased error safety.
  • the CRC check values for areas 304b and 306b are calculated via software routines.
  • the contents of regions 304a, 305a, 306a and regions 304b and 306b will normally vary at each transmission cycle.
  • the subdivisions of area 303 (MDT realtime data field) into areas 304 (realtime data 1), 305 (realtime data 2), and 306 (realtime data 3) are exemplary only and also vary from application to application. Also, the number of subdivisions mentioned is not constant.
  • the CRC check values must be recalculated every transmission cycle. This takes a long time in each transmission cycle.
  • a preferred embodiment of a logic circuit according to the invention is shown schematically in FIG. 4 and indicated as a whole by 400.
  • the logic circuit 400 has a first input 401 for receiving a generator polynomial. Furthermore, the logic circuit 400 has a second input 402 for receiving a message. Furthermore, the logic circuit 400 has a third one
  • Input 403 for receiving the length of the CRC polynomial to be used.
  • the logic circuit 400 has an output 404 for outputting the calculated CRC check value.
  • the message is supplied to a shift register within the logic circuit 400, which has a number of bits freely selectable in the design of the logic circuit.
  • the shift register has six bits 421 to 426. The arbitrary number of bits of the shift register determines the maximum size of the CRC polynomial usable with the logic circuit.
  • the logic circuit 400 further has
  • Storage means for receiving the CRC polynomial The storage means store the individual bits 411 to 416 of the generator polynomial and can be designed, for example, as flip-flops.
  • the number of storage means preferably corresponds to the number of shift register locations.
  • the logic circuit also has an input (not shown) for receiving a preset or initialization value for the shift register.
  • various initialization values have proved to be advantageous, which advantageously can also be fed to the logic circuit from the outside.
  • the basic mode of operation of such a circuit is known to the person skilled in the art and will therefore not be explained further here. For example, an inversion may occur, etc.
  • variable-length CRC polynomials may be used in the logic circuit 400.
  • an input of the AND gates "&" is in each case connected to a multiplexer circuit 430, which selects a bit of the shift register by means of the length of the CRC polynomial supplied via the input 403 and defines it as the most significant bit.
  • the test value can be taken there, for example, also via the multiplexer circuit 430 or in another way (for example, in parallel), for which purpose the output 404 is provided.
  • the length of the CRC polynomial is supplied via input 403, this input may also be internally connected to a computing circuit which determines the length of the polynomial from bits 411 through 416.

Abstract

The invention relates to a logic circuit for calculating a CRC test value of a message, wherein the CRC test value has a specifiable length. The logic circuit comprises an input (402) for receiving the message, an input (401) for receiving a freely specifiable CRC polynomial, calculation means (421-426, "&", "=1") for calculating a CRC test value of the message using the CRC polynomial and switching means (430), which connect the calculation means (421-426, "&", "=1") according to a length of the CRC polynomial in such a way that the length of the CRC test value corresponds to the length of the CRC polynomial. Therefore, a hardware circuit can be provided which permits the calculation of test values of different lengths while using any generator polynomials.

Description

324753324753
04.09.2008 - Kauth04.09.2008 - Kauth
Robert Bosch GmbH, StuttgartRobert Bosch GmbH, Stuttgart
Logikschaltung zur Berechnung von CRC-PrüfwertenLogic circuit for calculating CRC test values
Beschreibungdescription
Die vorliegende Erfindung betrifft eine Logikschaltung zur Berechnung von CRC-Prüfwerten sowie eine Verwendung einer derartigen Schaltung bei einer Datenübertragung.The present invention relates to a logic circuit for calculating CRC check values and to a use of such a circuit in a data transmission.
Stand der TechnikState of the art
Bei der zyklischen Redundanzprüfung (cyclic redundancy check, CRC) handelt es sich um ein Verfahren aus der Informationstechnologie zur Bestimmung eines Prüfwerts für Daten (z.B. Netzwerkverkehr oder eine Datei), um Fehler bei der Übertragung oder Duplizierung von Daten erkennen zu können .The Cyclic Redundancy Check (CRC) is an information technology method for determining a check value for data (e.g., network traffic or a file) to detect errors in the transmission or duplication of data.
CRC-Prüfwerte werden häufig auch als CRC-Prüfsummen bezeichnet, obwohl es sich im eigentlichen Sinne um Prüfdivisionsreste und nicht um Summen handelt. Bei der CRC wird ein Datenblock durch ein CRC-Polynom modulo dividiert. Der Divisionsrest stellt den CRC- Prüfwert dar.CRC check values are also commonly referred to as CRC checksums, although they are actually test division residuals rather than sums. In the CRC, a data block is modulo divided by a CRC polynomial. The remainder of the division represents the CRC check value.
CRC-Typen werden anhand des verwendeten CRC- Polynoms (Generatorpolynom) unterschieden. Nach der Bitlänge der Polynome richtet sich die Länge des prüfbaren Datenblocks. Es existieren bekannte Standard- Polynome, wie z.B. :CRC types are distinguished by the CRC polynomial used (generator polynomial). After the bit length of Polynomial is the length of the testable data block. There are known standard polynomials, such as:
CRC-CCITT (CRC-16) : 0x11021 IBM-CRC-16: 0x18005CRC-CCITT (CRC-16): 0x11021 IBM-CRC-16: 0x18005
IEEE-802 CRC (CRC-32) : 0xl04CllDB7 CRC32/4 : 11EDC6F41 CAN-CRC: 0xC599 Bluetooth: 0x35IEEE-802 CRC (CRC-32): 0xl04CllDB7 CRC32 / 4: 11EDC6F41 CAN-CRC: 0xC599 Bluetooth: 0x35
Es ist bekannt, CRC-Logikschaltungen unter Verwendung eines Schieberegisters - üblicherweise, ein Schieberegister mit linearer Rückkopplung LFSR (linear feedback'shift register) - zu realisieren, wobei XOR-Gatter zwischen den einzelnen Bits des Registers vorgesehen sind. Dabei hängt die Plazierung der XOR-Gatter von den Koeffizienten der entsprechenden Tenne im Polynom ab, die 1 betragen. In der US 4,723,243 sowie der US 6,253,346 Bl werden dedizierte Schaltungen zum Berechnen einer CRC-32 Prüfsumme offenbart. Diese Schaltungen sind jedoch unflexibel, da sie nur eine vorgegebenes Generatorpolynom verwenden können, im genannten Beispiel CRC-32.It is known CRC logic circuits using a shift register - typically a shift register with linear feedback LFSR (linear feedback 'shift register) - realizing said XOR gate are provided between the individual bits of the register. The placement of the XOR gates depends on the coefficients of the corresponding antenna in the polynomial, which are 1. US 4,723,243 and US 6,253,346 Bl disclose dedicated circuits for calculating a CRC-32 checksum. However, these circuits are inflexible because they can only use a given generator polynomial, CRC-32 in the example given.
Insbesondere in bestimmten Bereichen der Datenübertragung ist es notwendig, unterschiedliche Generatorpolynome verwenden zu können. Diese müssen entweder durch Implementierung mehrerer Hardwareschaltungen oder softwareseitig berechnet werden. Beide Möglichkeiten sind aufwändig. Weiterhin können in Situationen, in denen die notwendigen CRC-Polynome noch nicht bekannt sind, keine (schnellen) Hardwareschaltungen verwendet werden. Statt dessen müssen langsame Softwarelösungen zum Einsatz kommen. Ausgehend von diesem Stand der. Technik wird eine Logikschaltung zur Berechnung eines CRC- Prüfwerts einer Nachricht mit den Merkmalen des Patentanspruchs 1 vorgeschlagen. Vorteilhafte Ausgestaltungen sind Gegenstand der Unteransprüche und der nachfolgenden Beschreibung.In particular, in certain areas of data transmission, it is necessary to be able to use different generator polynomials. These must be calculated either by implementing several hardware circuits or by software. Both options are complex. Furthermore, in situations where the necessary CRC polynomials are not yet known, no (fast) hardware circuits can be used. Instead, slow software solutions must be used. Starting from this state of the . Technique a logic circuit for calculating a CRC check value of a message with the features of claim 1 is proposed. Advantageous embodiments are the subject of the dependent claims and the following description.
Vorteile der ErfindungAdvantages of the invention
Durch die erfindungsgemäße Logikschaltung kann eine wesentliche Beschleunigung des Berechnungsverfahrens bei großer Flexibilität erreicht werden. Die Logikschaltung ist in der Lage, beliebige CRC-Polynome zu verwenden, wobei die maximale Bitzahl des Polynoms nur durch die Ausgestaltung der Schaltung begrenzt wird. In der Praxis wird es sich jedoch anbieten, eine maximale Bitzahl von 32 oder 64 anzusetzen.By means of the logic circuit according to the invention, a substantial acceleration of the calculation method can be achieved with great flexibility. The logic circuit is capable of using arbitrary CRC polynomials, the maximum bit number of the polynomial being limited only by the design of the circuit. In practice, however, it will be useful to set a maximum bit number of 32 or 64.
Es ist vorteilhaft, wenn die Logikschaltung eine Schnittstellenfunktionalität, beispielsweise eine API, bereitstellt. Dieses Verfahren ermöglicht die schnelleIt is advantageous if the logic circuit provides an interface functionality, such as an API. This procedure allows for fast
Berechnung von CRC-Prüfwerten insbesondere von Datenblöcken in einem Datentelegramm an variablen Positionen. Die Logikschaltung kann als integrierte Schaltung oder Teil einer integrierten Schaltung ausgebildet sein. Sie kann ebenso als ASIC oder FPGA usw. ausgebildet sein. Im Stand der Technik bestehen Logikschaltungen in den meisten Fällen nicht mehr wie früher aus festverdrahteter Logik, sondern aus flexibel programmierbaren Bausteinen (FPGAs, EPLDs, ÄSICs, Gate Arrays usw.) . Diese Bausteine beinhalten typenabhängig keine vorbestimmten Logikfunktionalitäten, sondern stellen eine Art "Logikbaukasten11 bereit. Durch Programmierung dieser Bausteine kann eine erwünschte Funktionalität vorgegeben werden. Herkömmliche Logikbausteine weisen eine vorbestimmte, herstellungs- oder typenbedingte Kapazität auf. In vielen Fällen sind bei bestehenden Schaltungen bereits Logikbausteine vorhanden, deren Kapazität noch nicht vollständig belegt ist. In diesem Fall kann die erfindungsgemäße Logikschaltung besonders vorteilhaft implementiert werden, da nur geringe oder keine schaltungstechnischen Veränderungen notwendig sind. Damit kann eine Kosteneinsparung erreicht werden. Bei der Datenübertragung werden die Datenblöcke an die Logikschaltung übergeben, die dann selbständig die entsprechenden CRC- Prüfwerte berechnet. Die Übergabe kann beispielsweise seriell oder parallel, über Register usw. erfolgen.Calculation of CRC test values, in particular of data blocks in a data telegram at variable positions. The logic circuit may be formed as an integrated circuit or part of an integrated circuit. You may also designed as an ASIC or FPGA etc. In the prior art, logic circuits in most cases no longer consist of hard-wired logic, as in the past, but of flexibly programmable devices (FPGAs, EPLDs, ASICs, gate arrays, etc.). Depending on the type, these blocks do not contain any predetermined logic functionalities, but instead provide a kind of "logic building block 11. By programming these blocks, a desired functionality can be specified. Conventional logic devices have a predetermined, manufacturing or type-related capacity. In many cases, logic modules are already present in existing circuits whose capacity is not yet fully occupied. In this case, the logic circuit according to the invention can be implemented particularly advantageously, since only small or no circuit-related changes are necessary. Thus, a cost saving can be achieved. During data transmission, the data blocks are transferred to the logic circuit, which then independently calculates the corresponding CRC test values. The transfer can for example be serial or parallel, via registers, etc.
Die Prüfsumme eines Datenstroms kann bit- oder byteweise usw. berechnet und vom Sender an die Daten angehängt werden. Die Berechung der Prüfsumme an sich erfolgt vorzugsweise über bekannte Methoden, insbesondereThe checksum of a data stream can be calculated in bits or bytes, etc., and attached to the data by the sender. The calculation of the checksum per se is preferably carried out by known methods, in particular
Verwendung von Schieberegistern zur Verarbeitung eines Bit- Datenstroms, wie es bspw. im zitierten Stand der Technik beschrieben ist. Zweckmäßigerweise wird das höchstwertiges Bit des Schieberegisters durch die Schaltmittel definiert. Vorteilhafterweise weisen die Schaltmittel dazu wenigstens einen Multiplexer auf, an den wenigstens zwei Bits des Schieberegisters geführt werden. Weiterhin umfassen die Berechnungsmittel zweckmäßigerweise wenigstes wenigstens ein XOR-Gatter. Mittels XOR-Gattern kann eine Polynomdivision besonders leicht in Hardware implementiert werden. Die Längenabhängigkeit kann dann beispielsweise dadurch erreicht werden, dass eines der Bits des Schieberegisters über den Multiplexer ausgewählt und als Rückkopplung in den XOR-Block geführt wird. Bei einer 32bit- Prüfsumme benötigt der Multiplexer dann bspw. fünf Steuereingänge, die einen von 2A5 (=32) Eingängen als rückzukoppelndes CRC-Registerbit auswählen. Alternativ könnte auch eine Kette von 31 AND-Gattern verwendet werden, wobei jedes AND-Gatter zwei Eingänge aufweist, an denen jeweils ein CRC-Registerbit und ein konfigurierbares Bit anliegt. In diesem Fall benötigt man bspw. 31 Steuerbits (anstatt 5 Steuerbits im Vergleich bei einem MUX) , von denen nur genau ein einziges UND-Glied mit einer "1" versehen wird, alle anderen haben den Wert "0".Use of shift registers for processing a bit stream, as described, for example, in the cited prior art. Conveniently, the most significant bit of the shift register is defined by the switching means. Advantageously, the switching means for this purpose at least one multiplexer, are passed to the at least two bits of the shift register. Furthermore, the calculating means expediently comprise at least one XOR gate. By means of XOR gates, a polynomial division can be implemented particularly easily in hardware. The length dependence can then be achieved, for example, by selecting one of the bits of the shift register via the multiplexer and writing it as Feedback is performed in the XOR block. For example, for a 32-bit checksum, the multiplexer requires five control inputs that select one of 2 A 5 (= 32) inputs as the CRC register bit to feed back. Alternatively, a chain of 31 AND gates could be used, with each AND gate having two inputs, each with a CRC register bit and a configurable bit. In this case one needs, for example, 31 control bits (instead of 5 control bits in comparison with a MUX), of which only exactly one AND gate is provided with a "1", all others have the value "0".
Vorzugsweise weist die Logikschaltung einen Eingang zur Aufnahme eines Initialisierungswerts bzw. Startwerts für das Schieberegister auf . In Abhängigkeit vom verwendeten CRC-Polynom haben sich haben sich verschiedene Initialisierungswerte als vorteilhaft erwiesen, die vorteilhaft der Logikschaltung ebenfalls von außen zuführbar sind. Beispielsweise wird bei CRC- 16 nach CCITT mit dem Polynom xA16 + xA12 + xA5 + 1 als Startwert "1" in jedem Registerbit verwendet. Der Startwert kann aber auch jeden beliebigen Wert , insbesondere auch "0" annehmen.Preferably, the logic circuit has an input for receiving an initial value for the shift register. Depending on the CRC polynomial used, various initialization values have proved to be advantageous, which advantageously can also be fed to the logic circuit from the outside. For example, in CRC-16, after CCITT, the polynomial x A 16 + x A 12 + x A 5 + 1 is used as the seed "1" in each register bit. The starting value can also assume any value, in particular also "0".
Vorteilhafterweise ist wenigstens ein vorbestimmtes CRC- Polynom integriert ist. Es bietet sich an, die für den geplanten Verwendungszweck benötigten und/oder die bekannten, bei der Beschreibung des Stands der Technik genannten Polynome bereits fest in die Schaltung zu integrieren, wodurch insbesondere der externe Schaltungsaufwand reduziert werden kann. Insbesondere kann eine Auswahlmöglichkeit vorgesehen sein, um eines der vorbestimmten CRC- Polynome zur Verwendung auszuwählen. Ebenso ist möglich, nur ein vorbestimmtes CRC-Polynom zu integrieren, das bspw. dann automatisch verwendet wird, wenn kein frei vorgebbares CRC-Polynom am Eingang anliegt. Es bietet sich an, zu jedem vorbestimmten CRC-Polynom auch einen initialisierungswert vorzubestimmen.Advantageously, at least one predetermined CRC polynomial is integrated. It is advisable to already firmly integrate the polynomials required for the intended purpose and / or the known polynomials mentioned in the description of the prior art into the circuit, whereby in particular the external circuit complexity can be reduced. In particular, a choice may be made to select one of the predetermined CRC polynomials for use. It is also possible to use only one predetermined CRC polynomial integrate, which, for example, is then used automatically when no freely definable CRC polynomial is applied to the input. It is advisable to also predetermine an initialization value for each predetermined CRC polynomial.
Es ist zweckmäßig, wenn eine Länge des CRC-Polynoms extern vorgebbar ist. Ebenso ist es möglich, die Länge des extern vorgegebenen CRC- Polynoms innerhalb der Schaltung zu bestimmen, wobei jedoch durch die externe Vorgabe der Länge die Komplexität der Schaltung vermindert werden kann. Durch die Bestimmung der Länge innerhalb der Schaltung ist es möglich, den externen Schaltungsaufwand zu vermindern.It is expedient if a length of the CRC polynomial can be specified externally. It is also possible to determine the length of the externally specified CRC polynomial within the circuit, but the external specification of the length can reduce the complexity of the circuit. By determining the length within the circuit, it is possible to reduce the external circuitry overhead.
Es ist besonders zweckmäßig, wenn die erfindungsgemäße Logikschaltung in einen Kommunikationscontroller integriert ist. Kommunikationscontroller werden für die Datenübertragung verwendet und stellen verschiedene Funktionalitäten für die Datenübertragung bereit. Durch die zusätzliche Integration der Logikschaltung kann eine vorteilhafte Platzersparnis erzielt werden. Es versteht sich, dass die erfindungsgemäße Logikschaltung ebenso in andere Logikbausteine integrierbar ist.It is particularly expedient if the logic circuit according to the invention is integrated in a communication controller. Communication controllers are used for data transmission and provide various functionality for data transmission. The additional integration of the logic circuit, an advantageous space savings can be achieved. It is understood that the logic circuit according to the invention can also be integrated into other logic modules.
Ebenso vorteilhaft ist es, wenn die erfindungsgemäße Logikschaltung als integrierter Schaltungsbaustein ausgebildet ist. Dadurch kann sie zusätzlich zu vorhandenen Bausteinen oder Controllern verwendet werden und in bestehende Systeme eingesetzt werden.It is equally advantageous if the logic circuit according to the invention is designed as an integrated circuit module. As a result, it can be used in addition to existing components or controllers and used in existing systems.
Es ist zweckmäßig, wenn die erfindungsgemäße Logikschaltung für ethernetbasierte Datenübertragung verwendet wird. Ethernetbasierte Datenübertragung ist mittlerweile weit verbreitet und bildet eine Standardausführungsform der Datenübertragung. Die erfindungsgemäße Logikschaltung kann vorteilhaft in bestehende Systeme integriert werden.It is expedient if the logic circuit according to the invention is used for Ethernet-based data transmission. Ethernet-based data transmission is now widespread and forms a standard embodiment of the Data transfer. The logic circuit according to the invention can advantageously be integrated into existing systems.
In einer besonders bevorzugten Ausführungsform wird die erfindungsgemäße Logikschaltung in einem Feldbus -Netzwerk, insbesondere in einem Netzwerk nach einem SERCOS-Standard verwendet. Beispielsweise kann ein Netzwerk nach dem SERCOS III-Standard verwendet werden, der die Verwendung von Ethernet -Komponenten bei einer SERCOS-Verbindung erlaubt.In a particularly preferred embodiment, the logic circuit according to the invention is used in a fieldbus network, in particular in a network according to a SERCOS standard. For example, a SERCOS III standard network may be used that allows the use of Ethernet components in a SERCOS connection.
Zweckmäßigerweise wird die erfindungsgemäße Logikschaltung für EchtZeitdatenübertragung bzw. Echtzeitkommunikation verwendet. Besonders bei der Echtzeitkommunikation wirkt sich die beschleunigte CRC- PrüfWertberechnung vorteilhaft aus.The logic circuit according to the invention is expediently used for real-time data transmission or real-time communication. Particularly in the case of real-time communication, the accelerated CRC test value calculation has an advantageous effect.
Weitere Vorteile und Ausgestaltungen der Erfindung ergeben sich aus der Beschreibung und der beiliegenden Zeichnung..Further advantages and embodiments of the invention will become apparent from the description and the accompanying drawings . ,
Es versteht sich, daß die vorstehend genannten und die nachstehend noch zu erläuternden Merkmale nicht nur in der jeweils angegebenen Kombination, sondern auch in anderen Kombinationen oder in Alleinstellung verwendbar sind, ohne den Rahmen der vorliegenden Erfindung zu verlassen.It is understood that the features mentioned above and those yet to be explained not only in the particular combination given, but also in other combinations or alone, without departing from the scope of the present invention.
Figurenbeschreibungfigure description
Im Folgenden sollen die Erfindung und insbesondere deren Vorteile anhand eines in den Figuren dargestellten Ausführungsbeispiels näher erläutert werden. Es zeigtIn the following, the invention and in particular its advantages with reference to an embodiment shown in the figures will be explained in more detail. It shows
Figur Ia ein Flussdiagramm einer Datenübertragung, bei derFIG. 1 a shows a flowchart of a data transmission in which
Datenfelder mit CRC- Prüfwerten versehen werden, im Stand der Technik;Data fields are provided with CRC test values, in the prior art;
Figur Ib ein Flussdiagramm entsprechend Figur Ia, wobei eine Ausgestaltung einer erfindungsgemäßen Logikschaltung verwendet wird;FIG. 1 b shows a flowchart corresponding to FIG. 1 a, wherein an embodiment of a logic circuit according to the invention is used;
Figur 2 eine schematische Darstellung einerFigure 2 is a schematic representation of a
Ausführungsform einer erfindungsgemäßen Logikschaltung ;Embodiment of a logic circuit according to the invention;
Figur 3 den Aufbau eines Masterdatentelegramms nach dem SERCOS III-Standard, das unter Verwendung einer Ausführungsform der erfindungsgemäßen Logikschaltung erzeugt ist; undFigure 3 shows the structure of a master data telegram according to the SERCOS III standard, which is generated using an embodiment of the logic circuit according to the invention; and
Figur 4 eine schematische Darstellung der Schaltelemente einer Ausführungsform einer erfindungsgemäßen Logikschaltung .Figure 4 is a schematic representation of the switching elements of an embodiment of a logic circuit according to the invention.
In Figur Ia wird ein Flussdiagramm einer Datenübertragung im Stand der Technik gezeigt, wobei ausgewählte Datenfelder mit CRC- Prüfwerten versehen werden.In FIG. 1 a, a flow diagram of a data transmission in the prior art is shown, wherein selected data fields are provided with CRC check values.
Im Verfahrensschritt 100 werden die zu übertragenden Daten vorbereitet. Dazu gehört unter anderem die Einteilung der Daten in Datenblöcke, wobei einzelne Datenblöcke in Datentelegrammen übertragen werden. - S -In method step 100, the data to be transmitted is prepared. Among other things, this includes the division of the data into data blocks, whereby individual data blocks are transmitted in data telegrams. - S -
Im Schritt 101 wird zu jedem Datenblock der zugehörige CRC- Prüfwert berechnet. Dies erfolgt im Stand der Technik durch Softwareroutinen, die auf Grund der beschriebenen Anforderungen eine relativ lange Zeitdauer in Anspruch nehmen .In step 101, the associated CRC check value is calculated for each data block. This is done in the prior art by software routines that take a relatively long period of time due to the described requirements.
Im Verfahrensschritt 102 werden dann die Datenblöcke mit den berechneten CRC-Prüfwerten zusammengefasst . Die zusammengefassten Daten werden schließlich im Verfahrensschritt 103 an den Kommunikationscontroller übergeben. Der Kommunikationscontroller führt die anschließende Datenübertragung weitgehend selbständig durch .In method step 102, the data blocks are then combined with the calculated CRC test values. The summarized data are finally transferred in method step 103 to the communication controller. The communication controller performs the subsequent data transfer largely independently.
In Figur Ib ist ein dem in Figur Ia gezeigten Flussdiagramm entsprechendes Flussdiagramm dargestellt, wobei eine bevorzugte Ausgestaltung einer erfindungsgemäßen Logikschaltung verwendet wird.FIG. 1 b shows a flow chart corresponding to the flowchart shown in FIG. 1 a, wherein a preferred embodiment of a logic circuit according to the invention is used.
In Schritt 110 werden wiederum die zu übertragenden Daten in einzelne Datenblöcke unterteilt. Im Verfahrensschritt 111 wird die zur Berechnung von CRC- Prüfwerten dedizierte Logikschaltung initialisiert und konfiguriert. Dabei wird der Logikschaltung u.a. das zu verwendende CRC-Polynom, die Länge des zu verwendenden CRC- Polynoms und die Position der Datenblöcke mitgeteilt, für die CRC-Prüfwerte berechnet werden sollen.In step 110, in turn, the data to be transmitted is divided into individual data blocks. In method step 111, the logic circuit dedicated for calculating CRC test values is initialized and configured. In this case, the logic circuit u.a. the CRC polynomial to be used, the length of the CRC polynomial to be used, and the position of the data blocks for which CRC check values are to be calculated.
Im Verfahrensschritt 112 sind nur noch die Datenblöcke der Logikschaltung bzw. einem Kommunikationscontroller, der eine integrierte Logikschaltung aufweist, zu übergeben. Vor der anschließenden Datenübertragung führt die Logikschaltung bzw. die in den Kommunikationscontroller integrierte Logikschaltung die CRC- PrüfWertberechnung selbständig durch. Auf diese Weise kann das Verfahren beschleunigt werden.In method step 112, only the data blocks of the logic circuit or of a communication controller having an integrated logic circuit are to be transferred. Before the subsequent data transfer leads the logic circuit or in the communication controller integrated logic circuit independently performs the CRC test value calculation. In this way, the process can be accelerated.
Durch die Verwendung einer erfindungsgemäß Logikschaltung können insbesondere Kommunikationscontroller bereitgestellt werden, die für unterschiedliche Übertragungsprotokolle, insbesondere unterschiedliche Feldbussysteme, geeignet sind. Beispielsweise wird bei einem SERCOS I/II- oder CAN- Bus eine 16bit-Prüfsumme verwendet, wohingegen bei einem SERCOS III, safety SERCOS oder EtherCAT-Bus eine 32bit- Prüfsumme verwendet wird.By using a logic circuit according to the invention, in particular communication controllers can be provided which are suitable for different transmission protocols, in particular different fieldbus systems. For example, a 16-bit checksum is used on a SERCOS I / II or CAN bus, whereas a SERCOS III, safety SERCOS or EtherCAT bus uses a 32-bit checksum.
In Figur 2 ist eine Ausführungsform einer erfindungsgemäßen Logikschaltung grob schematisch dargestellt und insgesamt mit 200 bezeichnet. Die Logikschaltung 200 weist einen Eingang 201 und einen Ausgang 202 auf. Der Eingang 201 und der Ausgang 202 können für serielle oder parallele Datenübermittlung ausgebildet sein, wie es im Stand der Technik hinreichend bekannt ist. Es versteht sich, dass es sich bei dem Eingang 201 und dem Ausgang 202 nicht um physikalisch in dieser Form ausgebildete Bauteile wie z.B. Stecker usw. handeln muss, sondern dass ebenso Ein- und Ausgänge einer logischen Schnittstellenbeschreibung von dieser Beschreibung umfasst sind.In FIG. 2, an embodiment of a logic circuit according to the invention is shown roughly schematically and designated overall by 200. The logic circuit 200 has an input 201 and an output 202. The input 201 and the output 202 may be configured for serial or parallel data transmission, as is well known in the art. It is understood that the input 201 and the output 202 are not components physically formed in this form, such as e.g. Plug, etc., but that also inputs and outputs of a logical interface description are included in this description.
An den Eingang 201 werden Eingabedaten 203 bereitgestellt. Die Eingabedaten 203 enthalten verschiedene Datenbereiche bzw. Datenblöcke 203a bis 203e. In dieser schematischen Darstellung entspricht die Unterteilung der Eingabedaten 203 in einzelne Blöcke nicht unbedingt einer zeitlichen, räumlichen oder andersartigen Unterteilungen, sondern stellt vor allem eine schematische Unterteilung dar. Die Eingabedatenblöcke 203a bis 203e enthalten zum einen die Konfigurationsdaten, die zur Initialisierung und Konfiguration der Logikschaltung 200 notwendig sind, und zum anderen die Daten, für die eine CRC- PrüfWertberechnung stattfinden soll. Beispielsweise enthält der Eingabedatenblock 203a das zu verwendende CRC-Polynom, der Eingabedatenblock 203b die Länge des zu verwendenden CRC- Polynoms, der Eingabedatenblock 203c die Menge oder Anzahl der Daten, für die die CRC- PrüfWertberechnung erfolgen soll, und die Eingabedatenblöcke 203d und 203e die Daten, für die die CRC-PrüfWertberechnung erfolgen soll.Input data 203 is provided to the input 201. The input data 203 includes various data areas or data blocks 203a to 203e. In this schematic representation, the subdivision of the input data 203 into individual blocks does not necessarily correspond to a temporal, spatial or other subdivisions, but above all represents a schematic subdivision. The input data blocks 203a to 203e contain, on the one hand, the configuration data necessary for initialization and configuration of the logic circuit 200 and, on the other hand, the data for which a CRC test value calculation is to take place. For example, the input data block 203a includes the CRC polynomial to be used, the input data block 203b the length of the CRC polynomial to be used, the input data block 203c the amount or number of data for which the CRC check value calculation is to be made, and the input data blocks 203d and 203e the Data for which the CRC test value calculation is to take place.
Vorzugsweise kann auch ein Startwert für ein Schieberegister innerhalb der Logikschaltung 200 über den Eingang 201 vorgebbar sein. Üblicherweise haben sich verschiedene Startwerte, bspw. "111111....1" ("1" in jedem Registerbit) oder "0" ("0" in jedem Registerbit) in Abhängigkeit vom ausgewählten CRC-Polynom als vorteilhaft erwiesen. Der Startwert kann innerhalb der Eingabedaten 203 als weiterer Datenbereich bzw. Datenblock (nicht gezeigt) vorgegeben werden.Preferably, a starting value for a shift register within the logic circuit 200 can also be predeterminable via the input 201. Usually, different start values, for example, "111111 .... 1" ("1" in each register bit) or "0" ("0" in each register bit) depending on the selected CRC polynomial have proven to be advantageous. The starting value can be specified within the input data 203 as a further data area or data block (not shown).
Die Eingabedatenblöcke 203a bis 203e werden als Eingabedaten 203 an den Eingang 201 übergeben. DieThe input data blocks 203a to 203e are transferred as input data 203 to the input 201. The
Logikschaltung 200 berechnet dann entsprechend ihrer Konfiguration für die übergebenen Daten die zugehörigen CRC-Prüfwerte .Logic circuit 200 then calculates the associated CRC check values according to its configuration for the data transferred.
Die Logikschaltung 200 stellt schließlich an ihrem Ausgang 202 die Ausgabedaten 204 bereit. In diesem Ausführungsbeispiel enthalten die Ausgabedaten 204 Ausgabedatenblöcke 204a bis 204d. Die Anzahl der Ausgabedatenblöcke wird vorzugsweise durch die Anzahl der Eingabedatenblöcke bestimmt. In diesem Beispiel werden für die zwei Eingabedatenblöcke 203d und 203e jeweils ein CRC- Prüfwert berechnet. Die Eingabedatenblöcke 203d und 203e werden als Ausgabedatenblöcke 204a bzw. 204c ausgegeben, wobei die zugehörigen CRC- Prüfwerte 204b bzw. 204d jeweils als weitere Ausgabedatenblöcke eingefügt werden.The logic circuit 200 finally provides the output data 204 at its output 202. In this embodiment, the output data 204 includes output data blocks 204a to 204d. The number of Output data blocks are preferably determined by the number of input data blocks. In this example, a CRC check value is calculated for each of the two input data blocks 203d and 203e. the input data blocks 203d and 203e are outputted as output data blocks 204a and 204c, with the associated CRC check values are inserted in each case as more output data blocks 204b and 204d.
Auf diese Weise kann eine schnelle CRC-PrüfWertberechnung für variable Datenblöcke erreicht werden, wie sie insbesondere bei einer Datenübertragung nach dem SERCOS III-Standard auftreten, wie näher anhand Figur 3 erläutert wird.In this way, a fast CRC test value calculation for variable data blocks can be achieved, as occur in particular in a data transmission according to the SERCOS III standard, as will be explained in more detail with reference to FIG.
In Figur 3 ist der Aufbau eines beispielhaften Masterdatentelegramms (MDT) nach dem SERCOS III -Standard schematisch gezeigt.FIG. 3 schematically shows the structure of an exemplary master data telegram (MDT) according to the SERCOS III standard.
Bei SERCOS handelt es sich um eine standardisierte Servoantriebsschnittstelle mit Feldbuskopplern. Das Anwendungsspektrum umfasst neben spanenden Bearbeitungstechnologien auch andere Automatisierungslösungen z.B. auf dem Gebiet der Montageroboter, sowie von Druck- und Verpackungsmaschinen.SERCOS is a standardized servo drive interface with fieldbus couplers. The range of applications includes not only machining technologies, but also other automation solutions, e.g. in the field of assembly robots, as well as of printing and packaging machines.
Der Zugriff auf das Übertragungsmedium wird durch ein Zeitschlitzverfahren realisiert. Dabei wird jedem Teilnehmer ein Zeitpunkt zugeordnet, an dem er exklusiv das Zugriffsrecht auf das Übertragungsmedium besitzt.The access to the transmission medium is realized by a time slot method. Each participant is assigned a time at which he exclusively has access to the transmission medium.
Der Kommunikationszyklus wird durch dasThe communication cycle is determined by the
Mastersynchronisationstelegramm (MST) des Masters, z.B. ein Steuerungssystem, gestartet. Die Slaves, z.B. Antriebssysteme oder E/A-Stationen, senden nacheinander jeweils ein' Antriebstelegramm (AT) mit ihren momentanen Istwerten. Im Anschluss sendet der Master das Masterdatentelegramm (MDT) mit den Sollwerten. Dieser Ablauf wiederholt sich in jedem Kommunikationszyklus. Alle Datentelegramme werden von allen Slaves empfangen. Ein MDT enthält daher Daten für alle anzusteuernden Slaves.Master synchronization telegram (MST) of the master, eg a control system, started. The slaves, eg Drive systems or I / O stations send successively one ' drive telegram (AT) with their current actual values. Afterwards, the master sends the master data telegram (MDT) with the setpoints. This process is repeated every communication cycle. All data telegrams are received by all slaves. An MDT therefore contains data for all the slaves to be controlled.
Ein MDT Feld (MDT data field) 300 weist drei Bereiche 301, 302, 303 auf, wobei der Bereich 301 als "MDT hotplug field", der Bereich 302 als "MDT Service Channel field" und der Bereich 303 als "MDT realtime data field" bezeichnet wird. Der Bereich 303 (MDT realtime data field) enthält die Echtzeitdaten, die an alle anzusteuernden Slaves übertragen werden.An MDT field (MDT field) 300 has three areas 301, 302, 303, the area 301 being called "MDT hotplug field", the area 302 being "MDT Service Channel field" and the area 303 being "MDT realtime data field " referred to as. Area 303 (MDT realtime data field) contains the real-time data, which is transmitted to all the slaves to be controlled.
In dem gezeigten Beispiel weist der Bereich 303 drei innere Bereiche 304, 305 und 306 auf, die jeweils Echtzeitdaten für unterschiedliche angeschlossene Slaves beinhalten. In diesem Beispiel sind Daten für drei angeschlossene Slaves enthalten, weshalb die Bereiche 304, 305 und 306 als "realtime data 1", "realtime data 2" und "realtime data 3" bezeichnet werden. Die Anzahl der Slaves, für die Daten übertragen werden, kann sich bei jedem Übertragungszyklus ändern.In the example shown, the area 303 has three inner areas 304, 305, and 306, each containing real-time data for different connected slaves. In this example, data is included for three connected slaves, so areas 304, 305 and 306 are referred to as "realtime data 1", "realtime data 2" and "realtime data 3". The number of slaves for which data is transferred may change each transmission cycle.
Abhängig vom Verwendungszweck der angesprochenen Slaves weisen die Bereiche 304, 305, 306 wiederum einen unterschiedlichen inneren Aufbau auf.Depending on the intended use of the addressed slaves, the regions 304, 305, 306 again have a different internal structure.
In dem gezeigten Beispiel, weist der Bereich 304 (realtime data 1) zwei Bereiche 304a und 304b auf, die als "Standard realtime data 1" (SRD 1) und "safe data Container 1" (SDC 1) bezeichnet werden.In the example shown, area 304 (realtime data 1) has two areas 304a and 304b, which are called "Default real-time data 1 "(SRD 1) and" safe data container 1 "(SDC 1).
Der Bereich 305 (realtime data 1) weist einen Bereich 305a (SRD 1) auf, der Bereich 306 (realtime data 3) weist einen Bereich 306a (SRD 3) und einen Bereich 306b (SDC 3) auf.Area 305 (realtime data 1) has area 305a (SRD 1), area 306 (realtime data 3) has area 306a (SRD 3) and area 306b (SDC 3).
In den Bereichen 304a (SRD 1) , 305a (SRD 2) und 306aIn the areas 304a (SRD 1), 305a (SRD 2) and 306a
(SRD 3) sind die Daten für die jeweiligen Slaves enthalten, die keine erhöhte Fehlersicherheit aufweisen müssen. In den Bereichen 304b (SDC 1) und 306b (SDC 3) hingegen sind die Daten enthalten, die eine erhöhte Fehlersicherheit aufweisen. Zur Bereitstellung der erhöhten Fehlersicherheit werden CRC-Prüfwerte hinzugefügt.(SRD 3) contain the data for the respective slaves, which do not have to have increased error safety. In the areas 304b (SDC 1) and 306b (SDC 3), however, the data are included, which have an increased error safety. CRC check values are added to provide increased error safety.
Im Stand der Technik werden die CRC-Prüfwerte für die Bereiche 304b und 306b über Softwareroutinen berechnet. Der Inhalt der Bereiche 304a, 305a, 306a und der Bereiche 304b und 306b variiert normalerweise bei jedem Übertragungs- zyklus. Auch sind die Unterteilungen des Bereichs 303 (MDT realtime data field) in die Bereiche 304 (realtime data 1) , 305 (realtime data 2) und 306 (realtime data 3) nur beispielhaft und variieren ebenfalls von Anwendung zu Anwendung. Auch ist die Anzahl der genannten Unterteilungen nicht konstant.In the prior art, the CRC check values for areas 304b and 306b are calculated via software routines. The contents of regions 304a, 305a, 306a and regions 304b and 306b will normally vary at each transmission cycle. Also, the subdivisions of area 303 (MDT realtime data field) into areas 304 (realtime data 1), 305 (realtime data 2), and 306 (realtime data 3) are exemplary only and also vary from application to application. Also, the number of subdivisions mentioned is not constant.
Aus diesen Gründen müssen die CRC- Prüfwerte in jedem Übertragungszyklus erneut berechnet werden. Dies nimmt in jedem Übertragungszyklus eine lange Zeitdauer in Anspruch.For these reasons, the CRC check values must be recalculated every transmission cycle. This takes a long time in each transmission cycle.
Durch Verwendung einer bevorzugten Ausführungsform des erfindungsgemäßen Verfahrens zur Berechnung der CRC- Prüfwerte, die in die variierenden Bereichen "SDC" hinzugefügt werden, kann eine wesentliche Zeitersparnis erreicht werden.By using a preferred embodiment of the method according to the invention for calculating the CRC test values that are in the varying ranges "SDC" can be added, a significant time savings can be achieved.
In Figur 4 ist eine bevorzugte Ausführungsform einer erfindungsgemäßen Logikschaltung schematisch dargestellt und insgesamt mit 400 bezeichnet. Die Logikschaltung 400 weist einen ersten Eingang 401 zur Aufnahme eines Generatorpolynoms auf . Weiterhin weist die Logikschaltung 400 einen zweiten Eingang 402 zur Aufnahme einer Nachricht auf. Weiterhin weist die Logikschaltung 400 einen drittenA preferred embodiment of a logic circuit according to the invention is shown schematically in FIG. 4 and indicated as a whole by 400. The logic circuit 400 has a first input 401 for receiving a generator polynomial. Furthermore, the logic circuit 400 has a second input 402 for receiving a message. Furthermore, the logic circuit 400 has a third one
Eingang 403 zur Aufnahme der Länge des zu verwendenden CRC- Polynoms auf. Schließlich weist die Logikschaltung 400 einen Ausgang 404 zur Ausgabe des berechneten CRC-Prüfwerts auf.Input 403 for receiving the length of the CRC polynomial to be used. Finally, the logic circuit 400 has an output 404 for outputting the calculated CRC check value.
Die Nachricht wird einem Schieberegister innerhalb der Logikschaltung 400 zugeführt, welches über eine bei Ausgestaltung der Logikschaltung frei wählbare Anzahl von Bits verfügt. In dem dargestellten Ausführungsbeispiel verfügt das Schieberegister über sechs Bits 421 bis 426. Die frei wählbare Anzahl der Bits des Schieberegisters bestimmt die maximale Größe des mit der Logikschaltung verwendbaren CRC-Polynoms .The message is supplied to a shift register within the logic circuit 400, which has a number of bits freely selectable in the design of the logic circuit. In the illustrated embodiment, the shift register has six bits 421 to 426. The arbitrary number of bits of the shift register determines the maximum size of the CRC polynomial usable with the logic circuit.
Die Logikschaltung 400 verfügt weiterhin überThe logic circuit 400 further has
Speichermittel zur Aufnahme des CRC-Polynoms. Die Speichermittel speichern die einzelnen Bits 411 bis 416 des Generatorpolynoms und können beispielsweise als Flipflops ausgebildet sein. Die Anzahl der Speichermittel entspricht vorzugsweise der Anzahl der Schieberegisterplätze.Storage means for receiving the CRC polynomial. The storage means store the individual bits 411 to 416 of the generator polynomial and can be designed, for example, as flip-flops. The number of storage means preferably corresponds to the number of shift register locations.
Beispielsweise bietet es sich an, eine Anzahl von 32 oder 64 Bits vorzusehen, wobei dann CRC-Prüfsummen mit maximal 32 bzw. 64 Bit berechnet werden können. Optional weist die Logikschaltung auch einen Eingang (nicht gezeigt) zur Aufnahme eines Presets bzw. Initialisierungswertes für das Schieberegisters auf. In Abhängigkeit vom verwendeten CRC- Polynom haben sich haben sich verschiedene Initialisierungswerte als vorteilhaft erwiesen, die vorteilhaft der Logikschaltung ebenfalls von außen zuführbar sind.For example, it is advisable to provide a number of 32 or 64 bits, in which case CRC checksums with a maximum of 32 or 64 bits can be calculated. Optionally, the logic circuit also has an input (not shown) for receiving a preset or initialization value for the shift register. Depending on the CRC polynomial used, various initialization values have proved to be advantageous, which advantageously can also be fed to the logic circuit from the outside.
Zur Bestimmung des CRC- Prüfwerts ist jedes der Polynombits 411 bis 416 über ein AND-Gatter "&" mit einem XOR-Gatter ("=1") verbunden. Die einzelnen XOR-Gatter "=1" sind zwischen den Bits des Schieberegisters angeordnet. Die prinzipielle Funktionsweise einer derartigen Schaltung ist dem Fachmann bekannt und soll daher an dieser Stelle nicht weiter erläutert werden. Beispielsweise kann eine Invertierung stattfinden usw.For determining the CRC check value, each of the polynomials 411 to 416 is connected to an XOR gate ("= 1") through an AND gate "&". The individual XOR gates "= 1" are arranged between the bits of the shift register. The basic mode of operation of such a circuit is known to the person skilled in the art and will therefore not be explained further here. For example, an inversion may occur, etc.
Erfindungsgemäß können in der Logikschaltung 400 CRC- Polynome variabler Länge verwendet werden. Dazu ist jeweils ein Eingang der AND-Gatter "&" mit einer Multiplexer- Schaltung 430 verbunden, die mittels der über den Eingang 403 zugeführten Länge des CRC-Polynoms ein Bit des Schieberegisters auswählt und als höchstwertiges Bit definiert.According to the invention, 400 variable-length CRC polynomials may be used in the logic circuit 400. For this purpose, an input of the AND gates "&" is in each case connected to a multiplexer circuit 430, which selects a bit of the shift register by means of the length of the CRC polynomial supplied via the input 403 and defines it as the most significant bit.
Am Ende der Berechnung des CRC- Prüfwerts ist dieser in den Bits 421, 422, ... inklusive des ausgewählten höchstwertigen Bits abgelegt. Der Prüfwert kann dort beispielsweise seriell ebenfalls über die Multiplexer- Schaltung 430 oder auf andere Weise (beispielsweise parallel) entnommen werden, wozu der Ausgang 404 vorgesehen ist. Obwohl in der dargestellten Ausführungsform die Länge des CRC- Polynoms über den Eingang 403 zugeführt wird, kann dieser Eingang auch intern mit einer Berechnungsschaltung verbunden sein, die die Länge des Polynoms anhand der Bits 411 bis 416 bestimmt.At the end of the calculation of the CRC check value, this is stored in bits 421, 422,... Including the selected most significant bit. The test value can be taken there, for example, also via the multiplexer circuit 430 or in another way (for example, in parallel), for which purpose the output 404 is provided. Although in the illustrated embodiment, the length of the CRC polynomial is supplied via input 403, this input may also be internally connected to a computing circuit which determines the length of the polynomial from bits 411 through 416.
Es versteht sich, dass in den dargestellten Figuren nur beispielhafte Ausführungsformen der Erfindung dargestellt ist. Daneben ist jede andere Ausführungsform denkbar, ohne den Rahmen dieser Erfindung zu verlassen. Beispielsweise kann die Funktionalität der AND-Gatter in Figur 4 auch durch Multiplexer realisiert sein. Umgekehrt kann die Funktionalität des Multiplexers 430 auch durch AND-Gatter erreicht werden. It is understood that in the illustrated figures, only exemplary embodiments of the invention is shown. In addition, any other embodiment is conceivable without departing from the scope of this invention. For example, the functionality of the AND gates in Figure 4 may also be implemented by multiplexers. Conversely, the functionality of the multiplexer 430 can also be achieved by AND gates.
Bezugszeichenreference numeral
101 - 103 Verfahrensschritt101 - 103 process step
110 - 112 Verfahrensschritt 200 Logikschaltung110 - 112 Method step 200 Logic circuit
201 Eingang201 entrance
202 Ausgang202 output
203 Eingabedaten203 input data
203a - 203e Eingabedatenblock 204 Ausgabedaten203a-203e input data block 204 output data
204a - 204d Ausgabedatenblock204a-204d output data block
300 MDT Feld300 MDT field
301 MDT hotplug field301 MDT hotplug field
302 MDT service Channel field 303 MDT realtime data field302 MDT service Channel field 303 MDT realtime data field
304 realtime data 1304 realtime data 1
304a Standard realtime data 1304a standard realtime data 1
304b safe data Container 1304b safe data container 1
305 realtime data 2 305a Standard realtime data 2305 realtime data 2 305a Standard realtime data 2
306 realtime data 3306 realtime data 3
306a Standard realtime data 3306a standard realtime data 3
306b safe data Container 3306b safe data container 3
400 Logikschaltung 401, 402, 403 Eingang400 logic circuit 401, 402, 403 input
404 Ausgang404 exit
411 - 416 Generatorpolynombits411 - 416 generator polynom bits
421 - 426 Schieberegisterbits421 - 426 shift register bits
430 Multiplexer & AND-Gatter430 Multiplexers & AND gates
=1 XOR-Gatter = 1 XOR gate

Claims

Ansprüche claims
1. Logikschaltung zur Berechnung eines CRC-Prüfwerts einer Nachricht, wobei der CRC-Prüfwert eine vorgebbare Länge aufweist, umfassend ' einen Eingang (201; 402) zur Aufnahme der Nachricht (203d, 203e) , einen Eingang (201; 401) zur Aufnahme eines frei vorgebbaren CRC-Polynoms (203a) , Berechnungsmittel (421-426, "&", "=1") zur Berechnung eines CRC-Prüfwerts (204b, 204d) der Nachricht (203d, 203e) anhand des CRC-Polynoms (203a) , undA logic circuit for calculating a CRC check value of a message, the CRC check value having a predeterminable length, comprising an input (201; 402) for receiving the message (203d, 203e), an input (201; 401) for recording a freely definable CRC polynomial (203a), calculating means (421-426, "&", "= 1") for calculating a CRC check value (204b, 204d) of the message (203d, 203e) from the CRC polynomial (203a ) , and
Schaltmittel (430), welche die Berechnungsmittel (421-426, "Sc", "=1") in Abhängigkeit von einer Länge (203b) des CRC- Polynoms (203a) so beschälten, dass die Länge des CRC- Prüfwerts der Länge (203b) des CRC-Polynoms (203a) entspricht .Switching means (430) which polled the calculation means (421-426, "Sc", "= 1") in dependence on a length (203b) of the CRC polynomial (203a) such that the length of the CRC check value is of length ( 203b) of the CRC polynomial (203a).
2. Logikschaltung nach Anspruch 1, wobei die Berechnungsmittel (421-426, "&", "=1") wenigstens ein Schieberegister (421-426) aufweisen, dessen höchstwertiges Bit (422-426) durch die Schaltmittel (430) definiert wird.A logic circuit according to claim 1, wherein said calculating means (421-426, "&", "= 1") comprises at least one shift register (421-426) whose most significant bit (422-426) is defined by the switching means (430) ,
3. Logikschaltung nach Anspruch 2 , umfassend einen Eingang (201) zur Aufnahme eines Initialisierungswerts für das Schieberegister (421-426) .The logic circuit of claim 2, including an input (201) for receiving an initialization value for the shift register (421-426).
4. Logikschaltung nach Anspruch 2 oder 3, wobei die Schaltmittel wenigstens einen Multiplexer (430) aufweisen, an den wenigstens zwei Bits des wenigstens einen Schieberegisters (421-426) geführt werden.4. Logic circuit according to claim 2 or 3, wherein the switching means comprise at least one multiplexer (430), to the at least two bits of the at least one shift register (421-426).
5. Logikschaltung nach einem der vorstehenden Ansprüche, wobei die Berechnungsmittel (421-426, "&", "=1") wenigstens ein XOR-Gatter ("=1") aufweisen.A logic circuit as claimed in any preceding claim, wherein the calculating means (421-426, "&", "= 1") comprises at least one XOR gate ("= 1").
6. Logikschaltung nach einem der vorstehenden Ansprüche, wobei ein Eingang (201; 403) zur Aufnahme der Länge (203b) des CRC-Polynoms (203a) vorgesehen ist.A logic circuit as claimed in any one of the preceding claims, wherein an input (201; 403) is provided for receiving the length (203b) of the CRC polynomial (203a).
7. Logikschaltung nach einem der vorstehenden Ansprüche, wobei wenigstens ein vorbestimmtes CRC-Polynom integriert ist.7. Logic circuit according to one of the preceding claims, wherein at least one predetermined CRC polynomial is integrated.
8. Logikschaltung nach einem der vorstehenden Ansprüche, die in einen Kommunikationscontroller integriert ist.8. Logic circuit according to one of the preceding claims, which is integrated in a communication controller.
9. Logikschaltung nach einem der vorstehenden Ansprüche, die als integrierter Schaltungsbaustein ausgebildet ist.9. Logic circuit according to one of the preceding claims, which is designed as an integrated circuit module.
10. Vorrichtung zur Berechnung von CRC- Prüfwerten, die wenigstens zwei Logikschaltungen nach einem der vorstehenden Ansprüche aufweist.10. A device for calculating CRC test values comprising at least two logic circuits according to one of the preceding claims.
11. Verwendung einer Logikschaltung nach einem der Ansprüche 1 bis 9 oder einer Vorrichtung nach Anspruch 10 in einem Feldbus-Kommunikationssystem.11. Use of a logic circuit according to one of claims 1 to 9 or an apparatus according to claim 10 in a field bus communication system.
12. Verwendung einer Logikschaltung nach einem der12. Use of a logic circuit according to one of
Ansprüche 1 bis 9 oder einer Vorrichtung nach Anspruch 10 in einem Netzwerk nach einem SERCOS-Standard. Claims 1 to 9 or a device according to claim 10 in a network according to a SERCOS standard.
13. Verwendung einer Logikschaltung nach einem der Ansprüche 1 bis 9 oder einer Vorrichtung nach Anspruch 10 für Echtzeitdatenübertragung. 13. Use of a logic circuit according to one of claims 1 to 9 or an apparatus according to claim 10 for real-time data transmission.
PCT/EP2009/004427 2008-09-05 2009-06-19 Logic circuit for calculating crc test values WO2010025786A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE200810045813 DE102008045813A1 (en) 2008-09-05 2008-09-05 Logic circuit for calculating CRC test values
DE102008045813.9 2008-09-05

Publications (1)

Publication Number Publication Date
WO2010025786A1 true WO2010025786A1 (en) 2010-03-11

Family

ID=41319526

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2009/004427 WO2010025786A1 (en) 2008-09-05 2009-06-19 Logic circuit for calculating crc test values

Country Status (2)

Country Link
DE (1) DE102008045813A1 (en)
WO (1) WO2010025786A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4723243A (en) * 1985-12-02 1988-02-02 Advanced Micro Devices, Inc. CRC calculation machine with variable bit boundary
US6128760A (en) * 1998-10-13 2000-10-03 Lsi Logic Corporation Method and apparatus for calculating a CRC remainder
US6701480B1 (en) * 2000-03-08 2004-03-02 Rockwell Automation Technologies, Inc. System and method for providing error check and correction in memory systems

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6253346B1 (en) 1997-11-29 2001-06-26 Korea Telecommunication Authority Data transmission circuit having cyclic redundancy check circuit and data rate control circuit
DE102005029515A1 (en) * 2005-06-25 2006-12-28 Bosch Rexroth Aktiengesellschaft Method for calculating CRC test values and logic circuit
US20070016842A1 (en) * 2005-07-13 2007-01-18 Microchip Technology Incorporated Method and apparatus for configuring a cyclic redundancy check (CRC) generation circuit to perform CRC on a data stream

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4723243A (en) * 1985-12-02 1988-02-02 Advanced Micro Devices, Inc. CRC calculation machine with variable bit boundary
US6128760A (en) * 1998-10-13 2000-10-03 Lsi Logic Corporation Method and apparatus for calculating a CRC remainder
US6701480B1 (en) * 2000-03-08 2004-03-02 Rockwell Automation Technologies, Inc. System and method for providing error check and correction in memory systems

Also Published As

Publication number Publication date
DE102008045813A1 (en) 2010-03-11

Similar Documents

Publication Publication Date Title
EP2588928B1 (en) Communication system for connecting field devices to an overlaid control device
EP0847165A1 (en) Digital data transmission network and method for operating a data transmission network
DE102013207826B3 (en) Method for operating a slave node of a digital bus system
WO2019001718A1 (en) Method for reserving transmission paths having maximum redundancy for the transmission of data packets, and apparatus
WO2012146649A1 (en) Method and device for serial data transmission which is adapted to memory sizes
EP0325692A2 (en) Method for controlling or regulating injection-moulding machines
EP1461910B1 (en) Cyclical time-based communication system, user in such a system and transmission method
EP2093941A1 (en) Field bus system
EP3854028A1 (en) Method for detecting network subscribers in an automation network and automation network
EP1686732A1 (en) Method and system for transmitting protocol data units
DE112007000820B4 (en) Highly responsive master-slave valve setting
EP1509005A1 (en) Method and apparatus for transmitting data over a bus-network using broadcast
EP0732823B1 (en) Method for clock recovery of a digital signal on the reception side
EP1737132A1 (en) Method for calculation of CRC-checksums and logic device
WO2010025786A1 (en) Logic circuit for calculating crc test values
EP3632049B1 (en) Status signal output
DE102008037610A1 (en) Device and method for the selective switching of two masters for assigned slaves
DE102010063528B4 (en) Method for connecting bus lines to buses and device for carrying out the method
WO2004030297A1 (en) Method for the transmission of data telegrammes in a switched cyclical communication system
WO2002078264A2 (en) Method and electronic switching circuit for a scalable communication interface in automation components
EP1546658B1 (en) Method for operating a positional measurement device and corresponding positional measurement device
DE2163105A1 (en) PROCEDURE AND CIRCUIT ARRANGEMENT FOR DECODING AND CORRECTING A SO-CALLED CONVOLUTIONAL CODE
EP3632066B1 (en) Pre-loading of instructions
EP1176764B1 (en) Method of operating a data transmission network
CH705315A1 (en) Table Control System.

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09776779

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 09776779

Country of ref document: EP

Kind code of ref document: A1