KR102275145B1 - Method for transmitting BASIC CAN message and BASIC CAN controller - Google Patents
Method for transmitting BASIC CAN message and BASIC CAN controller Download PDFInfo
- Publication number
- KR102275145B1 KR102275145B1 KR1020190178690A KR20190178690A KR102275145B1 KR 102275145 B1 KR102275145 B1 KR 102275145B1 KR 1020190178690 A KR1020190178690 A KR 1020190178690A KR 20190178690 A KR20190178690 A KR 20190178690A KR 102275145 B1 KR102275145 B1 KR 102275145B1
- Authority
- KR
- South Korea
- Prior art keywords
- basic
- messages
- message
- buffer
- controller
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40143—Bus networks involving priority mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40013—Details regarding a bus controller
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Abstract
Description
본 발명은 베이직 캔 메시지 송신 방법 및 베이직 캔 컨트롤러에 관한 것으로, 보다 상세하게는, 베이직 캔 메시지들이 처리되지 않고 지연(Pending)되는 기간을 단축시켜 송신 주기를 준수할 수 있는, 베이직 캔 메시지 송신 방법 및 베이직 캔 컨트롤러에 관한 것이다.The present invention relates to a Basic CAN message transmission method and a Basic CAN controller, and more particularly, to a Basic CAN message transmission method capable of complying with a transmission period by shortening a pending period without processing Basic CAN messages and to a basic can controller.
CAN(Controller Area Network)이란, 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격을 말하며, 차량에 기본적으로 탑재되고 있는 통신 방식이다. CAN (Controller Area Network) refers to a standard communication standard designed for microcontrollers or devices to communicate with each other without a host computer in a vehicle, and is a communication method that is basically installed in a vehicle.
캔 통신은 메시지 지향성 특성을 갖고 있는데, 캔 통신은 노드의 주소에 의해 데이터가 교환되는 것이 아니라 메시지의 우선순위에 따라 ID(IDentifier)를 할당하고, 이 ID를 이용해 메시지를 구별하는 방식을 사용한다. CAN communication has a message-oriented characteristic, and CAN communication uses a method of assigning an ID (IDentifier) according to the priority of a message, rather than exchanging data by the address of a node, and using this ID to distinguish messages. .
캔 버스 네트워크에서의 캔 통신 방식을 설명하면, 먼저 캔 노드에 메시지를 보내기 전에 캔 버스 라인이 사용 중인지를 판단하고 메시지 간 충돌 검출을 수행한다. 캔 메시지에는 송신 측이나 수신 측의 주소를 포함하지 않고, 캔 메시지의 첫 부분에 캔 네트워크상에서 각각의 노드를 식별할 수 있는 식별자(Identifier : ID)를 가지고 있다. 네트워크상에 연결된 노드들은 네트워크상에 있는 메시지를 수신하고 자신이 필요로 하는 식별자의 메시지만 수신하고 그렇지 않은 메시지는 무시한다. 캔 네트워크에서는 메시지 간 우선순위를 갖는 것이 일반적이며, 식별자의 숫자가 낮을수록 우선순위가 높다. 우선순위가 높은 메시지가 캔 버스의 우선적인 사용권한을 보장받고 낮은 순위의 메시지는 다음 버스 사이클에 전송된다. When explaining the CAN communication method in the CAN bus network, first, before sending a message to the CAN node, it is determined whether the CAN bus line is in use and collision detection is performed between messages. The CAN message does not include the address of the sender or the receiver, but has an identifier (ID) that can identify each node on the CAN network in the first part of the CAN message. Nodes connected to the network receive messages on the network, receive only messages with identifiers they need, and ignore other messages. In CAN networks, it is common to have a priority between messages, and the lower the number of identifiers, the higher the priority. A message with a higher priority is guaranteed to have priority access to the can bus, and a message with a lower priority is transmitted in the next bus cycle.
캔 통신 방식으로는 베이직 캔(BASIC CAN)과 풀 캔(FULL CAN)이 있는데, 베이직 캔(BASIC CAN)은 여러 메시지를 하나의 버퍼로 묶어서 송수신하고, 풀 캔(FULL CAN)은 해당 메시지의 전용 버퍼를 구비하여 처리한다. There are two types of CAN communication methods, BASIC CAN and FULL CAN. BASIC CAN bundles and transmits multiple messages in one buffer, and FULL CAN is dedicated to the message. Provide a buffer for processing.
그런데 베이직 캔(BASIC CAN)과 같은 메시지 전송 방식에서는, 여러 메시지들을 랜덤하게 버퍼에 할당하여 그룹핑하여 처리됨에 따라 낮은 우선순위를 갖는 메시지가 하드웨어 버퍼를 점유하고 있는 경우 우선순위가 높은 메시지들의 처리가 지연되는 문제가 발생한다. 이러한 문제는 특히 주기적으로 전송되어야 할 메시지들의 경우 송신 주기를 보장하지 못하는 문제를 초래하기도 한다. However, in a message transmission method such as BASIC CAN, several messages are randomly assigned to a buffer and grouped and processed. When a message with a low priority occupies a hardware buffer, the processing of messages with high priority is difficult. There is a problem with delays. In particular, in the case of messages to be periodically transmitted, such a problem may cause a problem that the transmission period is not guaranteed.
본 발명의 실시예들은 입력된 복수의 베이직 캔 메시지의 식별자 값을 기준으로 그룹핑하되, 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서가 되도록 복수의 베이직 캔 메시지를 그룹핑함으로써, 각각의 베이직 캔 메시지들이 처리되지 않고 지연(Pending)되는 기간을 단축시켜 송신 주기를 준수할 수 있는, 베이직 캔 메시지 송신 방법 및 베이직 캔 컨트롤러를 제공하고자 한다.Embodiments of the present invention group based on the identifier values of a plurality of input BASIC CAN messages, but by grouping the plurality of BASIC CAN messages so that the identifier values of the plurality of BASIC CAN messages are in the closest order as possible, each BASIC CAN message An object of the present invention is to provide a basic CAN message transmission method and a BASIC CAN controller capable of complying with a transmission period by shortening a pending period without being processed.
본 발명의 실시예들은 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 나머지 베이직 캔 메시지의 우선순위를 높임으로써, 하드웨어 버퍼에 낮은 우선순위의 베이직 캔 메시지가 있을 때 발생하는 스타베이션(Starvation)을 방지할 수 있는, 베이직 캔 메시지 송신 방법 및 베이직 캔 컨트롤러를 제공하고자 한다.Embodiments of the present invention increase the priority of the remaining BASIC CAN messages by decreasing the identifier values of the remaining BASIC CAN messages remaining in the BASIC CAN buffer by a preset value whenever a BASIC CAN message in the hardware buffer is transmitted. An object of the present invention is to provide a basic CAN message transmission method and a BASIC CAN controller that can prevent starvation that occurs when a low-priority BASIC CAN message is present in a buffer.
다만, 본 발명의 해결하고자 하는 과제는 이에 한정되는 것이 아니며, 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위의 환경에서도 다양하게 확장될 수 있을 것이다.However, the problems to be solved by the present invention are not limited thereto, and may be variously expanded in an environment within the scope not departing from the spirit and scope of the present invention.
본 발명의 일 실시예에 따르면, 베이직 캔 버퍼(BASIC CAN Buffer) 및 하드웨어 버퍼(Hardware Buffer)가 구비된 캔 컨트롤러(CAN Controller)에 의해 수행되는 베이직 캔 메시지 송신 방법에 있어서, 입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 상기 입력된 복수의 베이직 캔 메시지를 그룹핑하는 단계; 및 런타임(Runtime) 동안 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 상기 나머지 베이직 캔 메시지의 우선순위를 높이는 단계를 포함하는, 베이직 캔 메시지 송신 방법이 제공될 수 있다.According to an embodiment of the present invention, in a basic CAN message transmission method performed by a CAN controller having a BASIC CAN Buffer and a Hardware Buffer, a plurality of input BASIC grouping based on an identifier (Id) value of a CAN message, but grouping the plurality of input BASIC CAN messages so that the ID values of the plurality of BASIC CAN messages are in a continuous or adjacent order; and whenever a Basic CAN message in the hardware buffer is transmitted during runtime, the identifier value of the remaining BASIC CAN messages remaining in the BASIC CAN buffer is decreased by a preset value to increase the priority of the remaining BASIC CAN messages Including the step, a basic CAN message transmission method may be provided.
상기 방법은, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까* 순서가 되도록 그룹핑된 베이직 캔 메시지를 베이직 캔 버퍼별로 나누어 저장하는 단계를 더 포함할 수 있다. The method may further include dividing the grouped Basic CAN messages for each BASIC CAN buffer and storing the grouped BASIC CAN messages so that the identifier values of the plurality of input BASIC CAN messages are in the closest* order.
상기 나머지 베이직 캔 메시지의 우선순위를 높이는 단계는, 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신된 이후, 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시킬 수 있다.In the step of increasing the priority of the remaining BASIC CAN messages, after the BASIC CAN message in the hardware buffer is transmitted, identifier values of the remaining BASIC CAN messages remaining in the BASIC CAN buffer may be decreased by a preset value.
상기 입력된 복수의 베이직 캔 메시지를 그룹핑하는 단계는, 상기 입력된 복수의 베이직 캔 메시지의 총 개수와 생성할 베이직 캔 버퍼의 개수를 비교하여 그룹핑되는 베이직 캔 메시지의 개수를 계산할 수 있다.In the grouping of the plurality of input BASIC CAN messages, the number of BASIC CAN messages to be grouped may be calculated by comparing the total number of the input BASIC CAN messages with the number of BASIC CAN buffers to be generated.
상기 기설정된 값만큼 식별자 값이 감소된 베이직 캔 메시지는 상기 하드웨어 버퍼로부터 실제로 송신될 때 감소되기 이전의 식별자 값이 유지되어 송신될 수 있다. When the BASIC CAN message in which the identifier value is reduced by the preset value is actually transmitted from the hardware buffer, the identifier value before the decrease may be maintained and transmitted.
한편, 본 발명의 다른 실시예에 따르면, 입력된 베이직 캔 메시지를 임시 저장하는 베이직 캔 버퍼(BASIC CAN Buffer); 상기 베이직 캔 버퍼로부터 베이직 캔 메시지를 전달받아 임시 저장하는 하드웨어 버퍼(Hardware Buffer); 및 상기 입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 상기 입력된 복수의 베이직 캔 메시지를 그룹핑하고, 런타임(Runtime) 동안 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 상기 나머지 베이직 캔 메시지의 우선순위를 높이는 제어부를 포함하는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러가 제공될 수 있다.On the other hand, according to another embodiment of the present invention, a basic can buffer (BASIC CAN Buffer) for temporarily storing the input basic CAN message; a hardware buffer for receiving and temporarily storing the BASIC CAN message from the BASIC CAN buffer; and grouping based on identifier (Id) values of the plurality of input BASIC CAN messages, such that the ID values of the plurality of BASIC CAN messages input are consecutive or in an adjacent order. group, and whenever a BASIC CAN message in the hardware buffer is transmitted during runtime, the identifier value of the remaining BASIC CAN messages remaining in the BASIC CAN buffer is reduced by a preset value to give priority to the remaining BASIC CAN messages A basic CAN controller for transmitting a BASIC CAN message, including a controller for increasing a rank, may be provided.
상기 제어부는, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 그룹핑된 베이직 캔 메시지를 베이직 캔 버퍼별로 나누어 저장할 수 있다.The controller may divide and store the grouped Basic CAN messages for each BASIC CAN buffer so that the identifier values of the plurality of input BASIC CAN messages are in a continuous or adjacent order.
상기 제어부는, 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신된 이후, 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시킬 수 있다.After the Basic CAN message in the hardware buffer is transmitted, the controller may decrease identifier values of the remaining BASIC CAN messages remaining in the BASIC CAN buffer by a preset value.
상기 제어부는, 상기 입력된 복수의 베이직 캔 메시지의 총 개수와 생성할 베이직 캔 버퍼의 개수를 비교하여 그룹핑되는 베이직 캔 메시지의 개수를 계산할 수 있다.The controller may calculate the number of basic CAN messages to be grouped by comparing the total number of the input plurality of BASIC CAN messages with the number of BASIC CAN buffers to be generated.
상기 기설정된 값만큼 식별자 값이 감소된 베이직 캔 메시지는 상기 하드웨어 버퍼로부터 실제로 송신될 때 감소되기 이전의 식별자 값이 유지되어 송신될 수 있다.When the BASIC CAN message in which the identifier value is reduced by the preset value is actually transmitted from the hardware buffer, the identifier value before the decrease may be maintained and transmitted.
개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology may have the following effects. However, this does not mean that a specific embodiment should include all of the following effects or only the following effects, so the scope of the disclosed technology should not be construed as being limited thereby.
본 발명의 실시예들은 입력된 복수의 베이직 캔 메시지의 식별자 값을 기준으로 그룹핑하되, 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 복수의 베이직 캔 메시지를 그룹핑함으로써, 각각의 베이직 캔 메시지들이 처리되지 않고 지연(Pending)되는 기간을 단축시켜 송신 주기를 준수할 수 있다.Embodiments of the present invention group based on the identifier values of a plurality of input BASIC CAN messages, but by grouping the plurality of BASIC CAN messages so that the identifier values of the plurality of BASIC CAN messages are in a continuous or adjacent order, each BASIC CAN message It is possible to observe the transmission period by shortening the period during which the CAN messages are not processed and are pending.
본 발명의 실시예들은 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 나머지 베이직 캔 메시지의 우선순위를 높임으로써, 하드웨어 버퍼에 낮은 우선순위의 베이직 캔 메시지가 있을 때 발생하는 스타베이션(Starvation)을 방지할 수 있다.Embodiments of the present invention increase the priority of the remaining BASIC CAN messages by decreasing the identifier values of the remaining BASIC CAN messages remaining in the BASIC CAN buffer by a preset value whenever a BASIC CAN message in the hardware buffer is transmitted. Starvation, which occurs when there is a low-priority BASIC CAN message in the buffer, can be prevented.
도 1은 본 발명의 일 실시예에 따른 베이직 캔 컨트롤러와 풀 캔 컨트롤러의 구성을 나타낸 도면이다.
도 2는 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.
도 3은 종래 기술과 본 발명의 일 실시예에 따른 베이직 캔 메시지의 그룹핑 동작을 나타낸 도면이다.
도 4는 본 발명의 일 실시예에 따른 베이직 캔 버퍼에서의 우선순위 정렬 동작을 나타낸 도면이다.
도 5는 본 발명의 일 실시예에 따른 베이직 캔 메시지의 식별자 값 감소 동작을 나타낸 도면이다.
도 6은 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.
도 7은 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.1 is a diagram showing the configuration of a basic can controller and a full can controller according to an embodiment of the present invention.
2 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
3 is a diagram illustrating a grouping operation of a BASIC CAN message according to an embodiment of the present invention and the related art.
4 is a diagram illustrating a priority sorting operation in the BASIC CAN buffer according to an embodiment of the present invention.
5 is a diagram illustrating an operation of reducing an identifier value of a Basic CAN message according to an embodiment of the present invention.
6 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
7 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
본 발명은 다양한 변환을 가할 수 있고 여러가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 구체적으로 설명하고자 한다. 그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 기술적 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해될 수 있다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.Since the present invention can apply various transformations and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to a specific embodiment, it can be understood to include all transformations, equivalents or substitutes included in the spirit and scope of the present invention. In describing the present invention, if it is determined that a detailed description of a related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들이 용어들에 의해 한정되는 것은 아니다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms such as first, second, etc. may be used to describe various elements, but the elements are not limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 본 발명에서 사용한 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나 이는 당 분야에 종사하는 기술자의 의도, 판례, 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the present invention are only used to describe specific embodiments, and are not intended to limit the present invention. The terms used in the present invention have been selected as currently widely used general terms as possible while considering the functions in the present invention, but these may vary depending on the intention of those skilled in the art, precedents, or emergence of new technology. In addition, in specific cases, there are also terms arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term and the overall content of the present invention, rather than the name of a simple term.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present invention, terms such as "comprises" or "have" are intended to designate that the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification exist, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.
이하, 본 발명의 실시예들을 첨부 도면을 참조하여 상세히 설명하기로 하며, 첨부 도면을 참조하여 설명함에 있어, 동일하거나 대응하는 구성요소는 동일한 도면번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, and in the description with reference to the accompanying drawings, the same or corresponding components are given the same reference numerals, and the overlapping description thereof will be omitted. do.
도 1은 본 발명의 일 실시예에 따른 베이직 캔 컨트롤러와 풀 캔 컨트롤러의 구성을 나타낸 도면이다.1 is a diagram showing the configuration of a basic can controller and a full can controller according to an embodiment of the present invention.
캔(CAN:Controller Area Network) 통신 네트워크에서 캔 메시지를 처리하는 방식에는 일반적으로 풀 캔(FULL CAN) 방식과 베이직 캔(BASIC CAN)의 두 가지 방식이 있다. In general, there are two methods for processing a CAN message in a CAN (Controller Area Network) communication network: a full CAN method and a BASIC CAN method.
도 1에 도시된 바와 같이, 베이직 캔(BASIC CAN) 방식은 베이직 캔 컨트롤러(BASIC CAN controller)(100)가 포함된 마이크로 컨트롤 유닛(10)에 의해 수행된다. 마이크로 컨트롤 유닛(10)은 캔 트랜시버(101)를 거쳐 각 노드들이 연결되는 캔 버스(CAN Bus)를 통해 메시지들을 처리한다. 베이직 캔 컨트롤러(100)는 여러 메시지들을 적어도 하나의 버퍼로 묶어 송신(Tx)하거나 수신(Rx)하는 동작을 수행한다. 일례로, 베이직 캔 컨트롤러(100)는 하나의 송신 버퍼(Transmit buffer)와 하나의 수신 버퍼(Receive buffer)를 포함하고, 입력된 복수의 메시지를 송신 버퍼에 그룹핑한 후 메시지를 캔 트랜시버(101)를 통해 송신한다. As shown in FIG. 1 , the BASIC CAN method is performed by the
한편, 풀 캔(FULL CAN) 방식은 풀 캔 컨트롤러(Full CAN controller)(200)가 포함된 마이크로 컨트롤 유닛(20)에 의해 수행된다. 마이크로 컨트롤 유닛(20)은 캔 트랜시버(201)를 거쳐 각 노드들이 연결되는 캔 버스(CAN Bus)를 통해 메시지들을 처리한다. 풀 캔 컨트롤러(200)는 메시지들마다 전용 버퍼를 두어 메시지들을 처리한다. 일례로, 풀 캔 컨트롤러(200)는 복수의 송신 버퍼 1 내지 n(Transmit buffer 1~n)과, 복수의 수신 버퍼 1 내지 n(Receive buffer 1~n)을 포함하고, 메시지마다 전용 버퍼를 지정하여 해당 메시지들을 처리할 수 있다. Meanwhile, the FULL CAN method is performed by the
도 2는 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.2 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
도 2에 도시된 바와 같이, 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러(100)는 베이직 캔 버퍼(110), 하드웨어 버퍼(120) 및 제어부(130)를 포함한다. 그러나 도시된 구성요소 모두가 필수 구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 베이직 캔 컨트롤러(100)가 구현될 수도 있고, 그보다 적은 구성요소에 의해서도 베이직 캔 컨트롤러(100)가 구현될 수 있다. As shown in FIG. 2 , the
본 발명의 일 실시예에 따른 베이직 캔 컨트롤러(100)는 첫째로 베이직 캔 메시지를 버퍼로 묶을 때 사용되는 그룹핑 알고리즘을 수행한다. 즉, 베이직 캔 컨트롤러(100)는 입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 그 입력된 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서가 되도록 그 입력된 복수의 베이직 캔 메시지를 그룹핑한다. 일 실시예에 있어서, 상기 복수의 베이직 캔 메시지의 식별자 값이 연속하거나 또는 인접하는 순서가 되도록 그룹핑할 수 있다.The
또한, 본 발명의 일 실시예에 따른 베이직 캔 컨트롤러(100)는 둘째로 런타임(Runtime) 동안 하드웨어 버퍼(120)에 있는 베이직 캔 메시지가 송신될 때마다 베이직 캔 버퍼(110)에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 나머지 베이직 캔 메시지의 우선순위를 높일 수 있다. In addition, the
이하, 도 2의 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러(100)의 각 구성요소들의 구체적인 구성 및 동작을 설명한다.Hereinafter, a detailed configuration and operation of each component of the
베이직 캔 버퍼(BASIC CAN Buffer)(110)는 소프트웨어 버퍼(Software Buffer)로 동작하고, 입력된 베이직 캔 메시지를 임시 저장한다. The
하드웨어 버퍼(Hardware Buffer)(120)는 하드웨어 오브젝트(Hardware Object)로 지칭되고, 베이직 캔 버퍼(110)로부터 베이직 캔 메시지를 전달받아 임시 저정한다.The
제어부(130)는 베이직 캔 버퍼(110)에 입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 그 입력된 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서가 되도록 그 입력된 복수의 베이직 캔 메시지를 그룹핑한다. The
그리고 제어부(130)는 런타임(Runtime) 동안 하드웨어 버퍼(120)에 있는 베이직 캔 메시지가 송신될 때마다 베이직 캔 버퍼(110)에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 나머지 베이직 캔 메시지의 우선순위를 높인다.And, whenever the Basic CAN message in the
이와 같이, 제어부(130)는 소프트웨어 버퍼로 동작하는 베이직 캔 버퍼(110)에서 우선순위를 1차적으로 정렬한 후, 우선순위가 가장 높은 메시지를 하드웨어 버퍼(120)로 내려보낸다. 그 이후 제어부(130)는 하드웨어 버퍼(120)에 들어와 있는 메시지들 간의 우선순위를 비교한 뒤에 송신(Tx)되는 순서를 결정한다. 제어부(130)는 베이직 캔 메시지의 송신시 발생하는 지연(Pending) 현상에 따른 스타베이션(Starvation)을 방지하기 위해 베이직 캔 메시지의 그룹핑 동작과 베이직 캔 버퍼(110) 내에서의 식별자 값을 변경한다.As such, the
실시예들에 따르면, 제어부(130)는 베이직 캔 버퍼(110)에 입력된 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서가 되도록 그룹핑된 베이직 캔 메시지를 베이직 캔 버퍼별로 나누어 저장할 수 있다.According to embodiments, the
실시예들에 따르면, 제어부(130)는 하드웨어 버퍼(120)에 있는 베이직 캔 메시지가 송신된 이후, 베이직 캔 버퍼(110)에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시킬 수 있다. According to embodiments, after the Basic CAN message in the
실시예들에 따르면, 제어부(130)는 베이직 캔 버퍼(110)에 입력된 복수의 베이직 캔 메시지의 총 개수와 생성할 베이직 캔 버퍼(110)의 개수를 비교하여 그룹핑되는 베이직 캔 메시지의 개수를 계산할 수 있다.According to embodiments, the
실시예들에 따르면, 기설정된 값만큼 식별자 값이 감소된 베이직 캔 메시지는 하드웨어 버퍼(120)로부터 실제로 송신될 때 감소되기 이전의 식별자 값이 유지되어 송신될 수 있다. According to embodiments, when the BASIC CAN message in which the identifier value is reduced by a preset value is actually transmitted from the
따라서 본 발명의 일 실시예에 따른 베이직 캔 컨트롤러(100)는 종래의 방식과 다르게 랜덤하게 메시지들을 베이직 캔 버퍼(110)에 할당하지 않고 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서대로 베이직 캔 버퍼(110)에 할당한다. 이는 우선순위가 현저하게 차이 나는 메시지들이 그룹핑되는 것을 방지하기 위함이다. 또한, 본 발명의 일 실시예에 따른 베이직 캔 컨트롤러(100)는 하드웨어 버퍼(120)에 있는 베이직 캔 메시지가 송신될 때마다 베이직 캔 버퍼(110)에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시킨다. 이는 낮은 우선순위의 메시지가 하드웨어 버퍼(120)를 점유하고 있을 때는 우선순위가 높은 메시지들이 오랜 시간 동안 처리되지 못하게 되는 지연(Pending) 이슈를 해결하기 위함이다. Therefore, the
도 3은 종래 기술과 본 발명의 일 실시예에 따른 베이직 캔 메시지의 그룹핑 동작을 나타낸 도면이다.3 is a diagram illustrating a grouping operation of a BASIC CAN message according to an embodiment of the present invention and the related art.
도 3에 도시된 바와 같이, 종래 기술은 순서대로 혹은 랜덤(Random)하게 할당하는 버퍼 그룹핑(Buffer grouping) 방식을 수행한다. As shown in FIG. 3 , the prior art performs a buffer grouping method for sequentially or randomly allocating.
반면, 본 발명의 일 실시예는 베이직 캔 메시지의 식별자 값을 반영하여 최대한 근사한 식별자 값의 메시지들끼리 그룹핑(grouping) 되도록 베이직 캔 메시지를 그룹핑한다. 이는 우선순위가 낮은 메시지가 하드웨어 버퍼(120)를 점유하는 것으로 우선순위가 높은 메시지들이 너무 긴 시간 동안 지연되는 것을 방지한다.On the other hand, according to an embodiment of the present invention, the Basic CAN message is grouped so that messages having the closest identifier value are grouped by reflecting the identifier value of the BASIC CAN message. This prevents low-priority messages from occupying the
종래 기술대로 0x101과 0x610 메시지가 하나의 베이직 캔 버퍼 1에 묶여 배치가 된다면, 하드웨어 버퍼(120)에 0x610 메시지가 위치하여 장시간 처리되지 못하는 경우가 발생한다. 우선순위가 가장 높은 0x101 메시지도 정상적으로 송신되지 못한 채 지연되고 만다.If the 0x101 and 0x610 messages are tied to one BASIC CAN buffer 1 and arranged as in the prior art, the 0x610 message is located in the
이와 같이, 본 발명의 일 실시예는 가장 가까운 식별자 값을 갖는 베이직 캔 메시지들을 그룹핑함으로써, 이러한 메시지 송신 지연 현상을 사전에 예방할 수 있다. 이를 통해, 본 발명의 일 실시예는 주기적으로 전송되어야 할 메시지들의 경우 송신 주기를 보장할 수 있다. As such, an embodiment of the present invention can prevent such a message transmission delay phenomenon in advance by grouping BASIC CAN messages having the closest identifier value. Through this, an embodiment of the present invention can ensure a transmission period in the case of messages to be transmitted periodically.
도 4는 본 발명의 일 실시예에 따른 베이직 캔 버퍼에서의 우선순위 정렬 동작을 나타낸 도면이다.4 is a diagram illustrating a priority sorting operation in the BASIC CAN buffer according to an embodiment of the present invention.
도 4에 도시된 바와 같이, 베이직 캔 버퍼(110)에 0x100 식별자 값을 갖는 메시지 1(MSG1), 0x200 식별자 값을 갖는 메시지 2(MSG2), 0x300 식별자 값을 갖는 메시지 3(MSG3), 0x400 식별자 값을 갖는 메시지 4(MSG4)가 입력될 때, 베이직 캔 컨트롤러(100)는 베이직 캔 버퍼(110) 내부에서 입력된 메시지들의 식별자 값을 기준으로 우선순위대로 정렬한다. 베이직 캔 메시지의 식별자 값이 낮을수록 높은 우선순위를 가진다. 입력된 메시지들은 식별자 값이 낮은 순서대로 하드웨어 버퍼(120)로 전달되도록 우선순위가 높은(식별자 값이 더 낮음) 순서대로 정렬된다.4, message 1 (MSG1) having an identifier value of 0x100 in the basic can buffer 110, message 2 (MSG2) having an identifier value of 0x200, message 3 (MSG3) having an identifier value of 0x300, identifier 0x400 When message 4 (MSG4) having a value is input, the
그 후 정렬되어 있는 순서대로 하드웨어 오브젝트(H/W Object)라고 불리는 하드웨어 버퍼(120)로 보내어 송신된다. 도 4에 도시된 바와 같이, 0x100 식별자 값을 갖는 메시지 1(MSG1)이 첫 번째로 송신되고, 0x200 식별자 값을 갖는 메시지 2(MSG2)가 두 번째로 송신되고, 0x300 식별자 값을 갖는 메시지 3(MSG3)가 세 번째로 송신되고, 0x400 식별자 값을 갖는 메시지 4(MSG4)가 네번째로 송신된다.After that, it is transmitted to the
도 5는 본 발명의 일 실시예에 따른 베이직 캔 메시지의 식별자 값 감소 동작을 나타낸 도면이다.5 is a diagram illustrating an operation of reducing an identifier value of a Basic CAN message according to an embodiment of the present invention.
베이직 캔 컨트롤러(100)는 런타임(Runtime) 동안에는 송신될 때 베이직 캔 버퍼(110)에 남아있는 다른 메시지들의 식별자 값을 낮추는 방식으로 우선순위를 높일 수 있다. 여기서, 실제 전달되는 데이터(data) 내부의 식별자 값은 변경되지 않고 유지된다. The
단계 S101에서, 베이직 캔 컨트롤러(100)는 0x100 메시지, 0x130 메시지, 0x160 메시지, 0x200 메시지를 순서대로 정렬된다. In step S101, the
단계 S102에서, 베이직 캔 컨트롤러(100)는 가장 낮은 식별자 값을 갖는 0x100 메시지를 하드웨어 버퍼(120)로 전달하여 0x100 메시지를 송신한다. In step S102, the
단계 S103에서, 0x100 메시지가 송신될 때, 베이직 캔 컨트롤러(100)는 나머지 0x130 메시지, 0x160 메시지, 0x200 메시지를 각각 0x12F 메시지, 0x15F 메시지, 0x1FF 메시지로 식별자 값을 1씩 감소시키고, 0x12F 메시지를 하드웨어 버퍼(120)로 전달하여 송신한다. In step S103, when the 0x100 message is transmitted, the
단계 S104에서, 0x12F 메시지가 송신될 때, 베이직 캔 컨트롤러(100)는 나머지 0x15F 메시지, 0x1FF 메시지를 각각 0x15E 메시지, 0x1FE 메시지로 식별자 값을 1씩 감소시키고, 0x15E 메시지를 하드웨어 버퍼(120)로 전달하여 송신한다. 이때, 0x1FF 메시지가 입력된다. In step S104, when the 0x12F message is transmitted, the
종래의 기술이라면, 단계 S105-1과 같이, 0x1FF 메시지가 추가로 베이직 캔 버퍼(110)에 들어왔을 때, 감소되지 않은 식별자 값인 0x200 메시지가 0x1FF 메시지보다 우선순위가 낮기 때문에 0x1FF 메시지 뒤로 밀려나게 된다.In the prior art, as in step S105-1, when the 0x1FF message is additionally entered into the BASIC CAN buffer 110, the 0x200 message, which is a non-reduced identifier value, has a lower priority than the 0x1FF message, so it is pushed behind the 0x1FF message. .
그러나 단계 S105와 같이, 본 발명의 일 실시예는 메시지의 식별자 값을 낮추는 방식을 적용함으로써, 감소된 식별자 값인 0x1FE 메시지는 식별자 값이 감소하여 추가로 입력된 0x1FF 메시지보다 우선순위가 높아지므로 0x1FF 메시지보다 먼저 처리될 수 있다. However, as in step S105, an embodiment of the present invention applies a method of lowering the identifier value of the message, so that the 0x1FE message, which is the reduced identifier value, has a higher priority than the additionally input 0x1FF message due to the reduced identifier value, so the 0x1FF message may be processed earlier.
단계 S106에서, 0x1FE 메시지는 0x1FD 메시지로 식별자 값이 감소되어 추가로 입력된 0x1FF 메시지보다 먼저 송신되고, 추가로 입력된 0x1FF 메시지는 0x1FE 메시지로 식별자 값이 감소된다.In step S106, the 0x1FE message is transmitted before the additionally input 0x1FF message because the identifier value is reduced as the 0x1FD message, and the additionally input 0x1FF message is the 0x1FE message with the identifier value reduced.
단계 S107에서, 추가로 입력되어 식별자 값이 감소된 0x1FD 메시지는 마지막으로 송신된다. In step S107, the 0x1FD message, which is additionally input and has a reduced identifier value, is finally transmitted.
본 발명의 일 실시예는 앞에서 설명한 메시지 그룹핑 방법과 메시지의 식별자 값 감소 동작을 함께 적용하여 베이직 캔 메시지의 스타베이션(Starvation)을 방지할 수 있다. According to an embodiment of the present invention, starvation of the BASIC CAN message can be prevented by applying the message grouping method described above and the message identifier value reduction operation together.
한편, 베이직 캔 버퍼(110)가 여러 개 있는 경우, 각 베이직 캔 버퍼에서 보낸 하드웨어 버퍼(120)의 메시지들끼리 다시 한번 우선순위를 정하게 된다. 베이직 캔 컨트롤러(100)는 그 중 우선순위가 높은 메시지를 송신(Tx)되도록 한다. On the other hand, when there are a plurality of Basic CAN buffers 110 , the messages of the
도 6은 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.6 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
단계 S201에서, 베이직 캔 컨트롤러(100)는 복수의 베이직 캔 메시지를 입력받는다. In step S201, the
단계 S202에서, 베이직 캔 컨트롤러(100)는 복수의 베이직 캔 메시지의 식별자 값이 최대한 가까운 순서가 되도록 복수의 베이직 캔 메시지를 그룹핑한다. In step S202 , the
단계 S203에서, 베이직 캔 컨트롤러(100)는 그룹핑된 베이직 캔 메시지를 베이직 캔 버퍼별로 나누어 저장한다. In step S203, the
단계 S204에서, 베이직 캔 컨트롤러(100)는 런타임 동안 하드웨어 버퍼(120)에 있는 베이직 캔 메시지를 송신한다. In step S204, the
단계 S205에서, 베이직 캔 컨트롤러(100)는 베이직 캔 버퍼(110)에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시킨다. In step S205 , the
도 7은 본 발명의 일 실시예에 따른 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러의 구성을 설명하기 위한 구성도이다.7 is a configuration diagram for explaining the configuration of a Basic CAN controller for transmitting a BASIC CAN message according to an embodiment of the present invention.
단계 S301에서, 베이직 캔 컨트롤러(100)는 베이직 캔 송신 메시지의 총 개수(n, n은 자연수)를 확인한다. In step S301, the
단계 S302에서, 베이직 캔 컨트롤러(100)는 생성할 베이직 캔 송신 버퍼의 개수(x, x는 자연수)를 확인한다. 여기서, 생성할 베이직 캔 송신 버퍼의 개수(x)는 하드웨어 스펙에 따라 제한적일 수 있다. In step S302, the
단계 S303에서, 베이직 캔 컨트롤러(100)는 베이직 캔 송신 메시지의 총 개수(n)와 생성할 베이직 캔 송신 버퍼의 개수(x)를 비교하며, 베이직 캔 송신 메시지의 총 개수(n)가 생성할 베이직 캔 송신 버퍼의 개수(x)를 초과하는지(n>x?)를 확인한다. In step S303, the
단계 S304에서, 베이직 캔 컨트롤러(100)는 베이직 캔 송신 메시지의 총 개수(n)가 생성할 베이직 캔 송신 버퍼의 개수(x)를 초과하지 않으면, n개 만큼 베이직 캔 버퍼를 생성하고, 생성된 n개의 베이직 캔 버퍼에 x개의 베이직 캔 메시지를 맵핑한다. In step S304, the
단계 S304에서, 베이직 캔 컨트롤러(100)는 베이직 캔 송신 메시지의 총 개수(n)가 생성할 베이직 캔 송신 버퍼의 개수(x)를 초과하면, 베이직 캔 송신 메시지의 총 개수(n)를 생성할 베이직 캔 송신 버퍼의 개수(x)로 나눈 몫(a)과 나머지(b)를 계산한다. In step S304, the
여기서, n은 베이직 캔 송신 메시지의 총 개수, x는 생성할 베이직 캔 송신 버퍼의 개수, 및 a와 b는 베이직 캔 송신 메시지의 총 개수(n)를 생성할 베이직 캔 송신 버퍼의 개수(x)로 나눈 몫과 나머지를 나타낸다. Here, n is the total number of Basic CAN transmission messages, x is the number of Basic CAN transmission buffers to be generated, and a and b are the number of Basic CAN transmission buffers to generate the total number of Basic CAN transmission messages (n) (x) Represents the quotient and remainder divided by .
단계 S305에서, 베이직 캔 컨트롤러(100)는 b개의 베이직 캔 버퍼에 a+1개씩 베이직 캔 메시지를 맵핑하고, x-b개의 베이직 캔 버퍼에 a개씩 베이직 캔 메시지를 맵핑한다. In step S305, the
단계 S305에서, 베이직 캔 컨트롤러(100)는 런타임(Runtime) 중에는 스타베이션(Starvation)이 일어나지 않도록 송신될 때마다 해당 버퍼에 남아있는 나머지 베이직 캔 메시지들의 식별자 값을 1씩 감소시켜 우선순위를 높인다. In step S305, the
상술한 본 발명에 따른 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체로는 컴퓨터 시스템에 의하여 해독될 수 있는 데이터가 저장된 모든 종류의 기록 매체를 포함한다. 예를 들어, ROM(Read Only Memory), RAM(Random Access Memory), 자기 테이프, 자기 디스크, 플래시 메모리, 광 데이터 저장장치 등이 있을 수 있다.The above-described method according to the present invention may be implemented as computer-readable codes on a computer-readable recording medium. The computer-readable recording medium includes any type of recording medium in which data that can be read by a computer system is stored. For example, there may be a read only memory (ROM), a random access memory (RAM), a magnetic tape, a magnetic disk, a flash memory, an optical data storage device, and the like.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위 내에서 다양한 수정, 변경 및 치환이 가능할 것이다. 따라서, 본 발명에 개시된 실시예 및 첨부된 도면들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예 및 첨부된 도면에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and various modifications, changes, and substitutions are possible within the range that does not depart from the essential characteristics of the present invention by those of ordinary skill in the art to which the present invention pertains. will be. Accordingly, the embodiments disclosed in the present invention and the accompanying drawings are intended to explain, not to limit the technical spirit of the present invention, and the scope of the technical spirit of the present invention is not limited by these embodiments and the accompanying drawings. . The protection scope of the present invention should be construed by the following claims, and all technical ideas within the equivalent range should be construed as being included in the scope of the present invention.
10, 20, 마이크로 컨트롤 유닛
100: 베이직 캔 컨트롤러
101: 캔 트랜시버
200: 풀 캔 컨트롤러
201: 캔 트랜시버
110: 베이직 캔 버퍼
120: 하드웨어 버퍼
130: 제어부10, 20, micro control unit
100: basic can controller
101: can transceiver
200: full can controller
201: can transceiver
110: basic can buffer
120: hardware buffer
130: control unit
Claims (6)
입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 상기 입력된 복수의 베이직 캔 메시지를 그룹핑하는 단계; 및
런타임(Runtime) 동안 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 상기 나머지 베이직 캔 메시지의 우선순위를 높이는 단계를 포함하는, 베이직 캔 메시지 송신 방법. A basic CAN message transmission method performed by a CAN controller having a BASIC CAN Buffer and a Hardware Buffer, the method comprising:
Grouping based on identifier (Id) values of a plurality of input BASIC CAN messages, but grouping the plurality of BASIC CAN messages so that the ID values of the plurality of BASIC CAN messages input are in a continuous or adjacent order to do; and
Increasing the priority of the remaining BASIC CAN messages by decreasing the identifier values of the remaining BASIC CAN messages remaining in the BASIC CAN buffer by a preset value whenever a BASIC CAN message in the hardware buffer is transmitted during runtime Including, Basic CAN message transmission method.
상기 베이직 캔 버퍼로부터 베이직 캔 메시지를 전달받아 임시 저장하는 하드웨어 버퍼(Hardware Buffer); 및
상기 입력된 복수의 베이직 캔 메시지의 식별자(Identifier, Id) 값을 기준으로 그룹핑하되, 상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 상기 입력된 복수의 베이직 캔 메시지를 그룹핑하고, 런타임(Runtime) 동안 상기 하드웨어 버퍼에 있는 베이직 캔 메시지가 송신될 때마다 상기 베이직 캔 버퍼에 남아 있는 나머지 베이직 캔 메시지의 식별자 값을 기설정된 값만큼 감소시켜 상기 나머지 베이직 캔 메시지의 우선순위를 높이는 제어부를 포함하는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러.BASIC CAN Buffer for temporarily storing the input BASIC CAN message;
a hardware buffer for receiving and temporarily storing the BASIC CAN message from the BASIC CAN buffer; and
Grouping based on identifier (Id) values of the plurality of input BASIC CAN messages, and grouping the plurality of BASIC CAN messages so that the identifier values of the plurality of BASIC CAN messages are consecutive or in an adjacent order. grouping, and whenever a Basic CAN message in the hardware buffer is transmitted during runtime, the identifier value of the remaining BASIC CAN messages remaining in the BASIC CAN buffer is reduced by a preset value to prioritize the remaining BASIC CAN messages A basic CAN controller for transmitting a BASIC CAN message, including a control unit that increases the BASIC CAN message.
상기 제어부는,
상기 입력된 복수의 베이직 캔 메시지의 식별자 값이 연속 또는 인접하는 순서가 되도록 그룹핑된 베이직 캔 메시지를 베이직 캔 버퍼별로 나누어 저장하는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러.3. The method of claim 2,
The control unit is
A basic CAN controller for transmitting a BASIC CAN message, which divides and stores the grouped BASIC CAN messages by BASIC CAN buffers so that the identifier values of the plurality of input BASIC CAN messages are in a continuous or adjacent order.
상기 제어부가 상기 나머지 베이직 캔 메시지의 상기 식별자 값을 기설정된 값만큼 감소시키는 것은, 상기 하드웨어 버퍼에 있는 상기 베이직 캔 메시지가 송신된 이후에 수행되는 것을 특징으로 하는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러.3. The method of claim 2,
Wherein the control unit reduces the identifier value of the remaining Basic CAN messages by a preset value is performed after the Basic CAN message in the hardware buffer is transmitted. controller.
상기 제어부는,
상기 입력된 복수의 베이직 캔 메시지의 총 개수와 생성할 베이직 캔 버퍼의 개수를 비교하여 그룹핑되는 베이직 캔 메시지의 개수를 계산하는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러.3. The method of claim 2,
The control unit is
A basic CAN controller for transmitting a BASIC CAN message, which calculates the number of BASIC CAN messages grouped by comparing the total number of the input plurality of BASIC CAN messages with the number of BASIC CAN buffers to be generated.
상기 기설정된 값만큼 식별자 값이 감소된 베이직 캔 메시지는 상기 하드웨어 버퍼로부터 실제로 송신될 때 감소되기 이전의 식별자 값이 유지되어 송신되는, 베이직 캔 메시지 송신을 위한 베이직 캔 컨트롤러.3. The method of claim 2,
A Basic CAN controller for transmitting a BASIC CAN message, wherein the BASIC CAN message in which the identifier value is reduced by the preset value is transmitted while maintaining the identifier value prior to the decrease when the BASIC CAN message is actually transmitted from the hardware buffer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190178690A KR102275145B1 (en) | 2019-12-30 | 2019-12-30 | Method for transmitting BASIC CAN message and BASIC CAN controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190178690A KR102275145B1 (en) | 2019-12-30 | 2019-12-30 | Method for transmitting BASIC CAN message and BASIC CAN controller |
Publications (1)
Publication Number | Publication Date |
---|---|
KR102275145B1 true KR102275145B1 (en) | 2021-07-07 |
Family
ID=76862471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190178690A KR102275145B1 (en) | 2019-12-30 | 2019-12-30 | Method for transmitting BASIC CAN message and BASIC CAN controller |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102275145B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100306457A1 (en) * | 2009-05-28 | 2010-12-02 | Microchip Technology Incorporated | Microcontroller with CAN Module |
KR20110024216A (en) | 2009-09-01 | 2011-03-09 | 한국단자공업 주식회사 | Can communication network system and method for changing priority of can message |
US20150063120A1 (en) * | 2013-08-29 | 2015-03-05 | Mentor Graphics Corporation | Controller area network (can) worst-case message latency with priority inversion |
-
2019
- 2019-12-30 KR KR1020190178690A patent/KR102275145B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100306457A1 (en) * | 2009-05-28 | 2010-12-02 | Microchip Technology Incorporated | Microcontroller with CAN Module |
KR20110024216A (en) | 2009-09-01 | 2011-03-09 | 한국단자공업 주식회사 | Can communication network system and method for changing priority of can message |
US20150063120A1 (en) * | 2013-08-29 | 2015-03-05 | Mentor Graphics Corporation | Controller area network (can) worst-case message latency with priority inversion |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2586837C (en) | Method and apparatus for multiplexing data packets | |
US9571408B2 (en) | Dynamic flow control using credit sharing | |
US5987507A (en) | Multi-port communication network device including common buffer memory with threshold control of port packet counters | |
JP6072783B2 (en) | Memory controller and method of operating such memory controller | |
JP3625280B2 (en) | COMMUNICATION METHOD, COMMUNICATION DEVICE, AND COMMUNICATION SYSTEM | |
US8819309B1 (en) | Low latency bypass buffer | |
US20210168057A1 (en) | Communication device, communication method and computer readable medium | |
US11146494B2 (en) | Scheduling prioritized traffic in a scrambled coded multiple access (SCMA) system | |
KR102275145B1 (en) | Method for transmitting BASIC CAN message and BASIC CAN controller | |
US7023865B2 (en) | Packet switch | |
EP2502789A1 (en) | Method of setting transmission timing of messages to be transmitted | |
US10003551B2 (en) | Packet memory system, method and device for preventing underrun | |
US20220182340A1 (en) | Packet Processing Device and Packet Processing Method | |
CN109905331B (en) | Queue scheduling method and device, communication equipment and storage medium | |
US20230136539A1 (en) | Bridging module, data transmission system, and data transmission method | |
CN109861791B (en) | Periodic data message transmission method, system, device and storage medium | |
US20170099214A1 (en) | Network traffic split among multiple paths | |
CN111415259A (en) | Transaction queuing method, device and storage medium | |
US11018968B2 (en) | Packet transmission method and packet transmitting device | |
US11960427B2 (en) | Bridging module, data transmission system, and data transmission method | |
KR20030027968A (en) | Scheduling Method for Distribution of Wireless Resources of Local Wireless Communication System | |
CN112737977B (en) | Data packet processing method and device | |
CN115190063B (en) | CAN message sending method and system based on routing table | |
US11240178B2 (en) | Data transmission method and data transmission system | |
KR20190021630A (en) | Scheduling method and scheduler for switching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GRNT | Written decision to grant |