KR102204954B1 - Can controller and method for transmission of data using the same - Google Patents

Can controller and method for transmission of data using the same Download PDF

Info

Publication number
KR102204954B1
KR102204954B1 KR1020170128073A KR20170128073A KR102204954B1 KR 102204954 B1 KR102204954 B1 KR 102204954B1 KR 1020170128073 A KR1020170128073 A KR 1020170128073A KR 20170128073 A KR20170128073 A KR 20170128073A KR 102204954 B1 KR102204954 B1 KR 102204954B1
Authority
KR
South Korea
Prior art keywords
information
data
protocol
load
bus
Prior art date
Application number
KR1020170128073A
Other languages
Korean (ko)
Other versions
KR20180064274A (en
Inventor
양정민
강성원
권영수
Original Assignee
한국전자통신연구원
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 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US15/823,104 priority Critical patent/US10491418B2/en
Publication of KR20180064274A publication Critical patent/KR20180064274A/en
Application granted granted Critical
Publication of KR102204954B1 publication Critical patent/KR102204954B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40071Packet processing; Packet format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

본 발명은 CAN 컨트롤러 및 이를 이용한 데이터 전송 방법에 관한 것이다. 본 발명의 실시예에 따른 CAN 컨트롤러는 리시버, 수신 선입선출 메모리, 송신 선입선출 메모리, 및 트랜스미터를 포함한다. 리시버는 설정된 프로토콜에 따라 CAN 버스로부터 수신된 수신 정보를 분석한다. 수신 선입 선출 메모리는 수신 정보의 식별 데이터 및 버스 로드에 기초하여 이전에 저장된 수신 정보에 겹쳐 쓰여지도록 수신 정보를 저장한다. 송신 선입선출 메모리는 송신 정보의 식별 데이터 및 프로세서 로드에 기초하여 이전에 저장된 송신 정보에 겹쳐 쓰여지도록 송신 정보를 저장한다. 트랜스미터는 프로토콜을 설정하고, 설정된 프로토콜에 따라 송신 선입 선출 메모리에 저장된 송신 정보를 CAN 버스로 송신한다. 본 발명에 따르면, 다양한 CAN 프로토콜이 지원되고, CAN 통신의 신속성이 확보된다.The present invention relates to a CAN controller and a data transmission method using the same. A CAN controller according to an embodiment of the present invention includes a receiver, a receive first-in, first-out memory, a transmit first-in, first-out memory, and a transmitter. The receiver analyzes the received information received from the CAN bus according to the set protocol. The reception first-in, first-out memory stores reception information so as to overwrite previously stored reception information based on the identification data and bus load of the reception information. The transmission first-in, first-out memory stores transmission information so that it is overwritten with previously stored transmission information based on the identification data of the transmission information and the processor load. The transmitter sets the protocol and transmits the transmission information stored in the transmission first-in, first-out memory to the CAN bus according to the set protocol. According to the present invention, various CAN protocols are supported, and speed of CAN communication is ensured.

Description

CAN 컨트롤러 및 이를 이용한 데이터 전송 방법{CAN CONTROLLER AND METHOD FOR TRANSMISSION OF DATA USING THE SAME}CAN controller and data transmission method using it {CAN CONTROLLER AND METHOD FOR TRANSMISSION OF DATA USING THE SAME}

본 발명은 차량용 네트워크 표준인 CAN(Controller Area Network)을 지원하는 아키텍처에 관한 것으로, 좀 더 상세하게는 CAN 컨트롤러 및 이를 이용한 데이터 전송 방법에 관한 것이다.The present invention relates to an architecture supporting a vehicle network standard CAN (Controller Area Network), and more particularly, to a CAN controller and a data transmission method using the same.

차량 시스템에서 ECU(Electronic Control Unit) 또는 주변 전자 장비들 사이의 통신을 위한 차량용 네트워크 프로토콜로 CAN(Controller Area Network)이 표준 통신 규격으로 이용되고 있다. 종래의 차량 시스템에 포함되는 전자 제어 장치들의 수는 한정되었으므로, 각각의 전자 제어 장치들은 Point-to-Point 결선 방식으로 연결되었다. 다만, 이러한 Point-to-Point 결선 방식은 전자 제어 장치들의 증가에 따라, 연결의 복잡도, 비용, 및 무게 등을 급격하게 증가시킬 수 있다. CAN 통신은 직렬 버스 네트워크 방식을 이용하므로, 다양한 전자 제어 장치들 사이의 통신이 용이하다.In a vehicle system, a controller area network (CAN) is used as a standard communication standard as a vehicle network protocol for communication between an ECU (Electronic Control Unit) or peripheral electronic equipment. Since the number of electronic control devices included in a conventional vehicle system is limited, each of the electronic control devices is connected by a point-to-point connection method. However, such a point-to-point connection method can rapidly increase the complexity, cost, and weight of connection as the number of electronic control devices increases. Since CAN communication uses a serial bus network method, communication between various electronic control devices is easy.

CAN 통신은 호스트 없이 CAN 버스를 통하여 전자 제어 장치들이 서로 통신하도록 설계된다. 이를 위하여, 전자 제어 장치는 CAN 버스에 연결되는 CAN 컨트롤러를 포함할 수 있다. CAN 컨트롤러는 전자 제어 장치와 CAN 버스 사이의 통신을 제어한다. 차량 시스템은 탑승자의 안전성을 확보하기 위하여, 신속한 데이터 통신이 요구된다. 따라서, 데이터의 통신의 지연을 최소화하고 CAN 통신의 신속성을 확보할 수 있는 CAN 컨트롤러에 대한 요구가 제기되고 있다.CAN communication is designed to allow electronic control devices to communicate with each other via a CAN bus without a host. To this end, the electronic control device may include a CAN controller connected to the CAN bus. The CAN controller controls the communication between the electronic control unit and the CAN bus. The vehicle system requires rapid data communication in order to ensure the safety of the occupant. Accordingly, there is a demand for a CAN controller capable of minimizing the delay in data communication and securing the speed of CAN communication.

CAN 통신을 위한 프로토콜로써 CAN 2.0 A 및 CAN 2.0 B가 사용되고 있다. 또한, 최근에 CAN 2.0 A FD 및 CAN 2.0 B FD가 추가적으로 개발되었다. CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 각각의 데이터 프레임의 구조는 서로 다르다. 따라서, 이러한 프로토콜의 유형에 맞도록 용이하게 설정 가능한 CAN 컨트롤러에 대한 요구가 제기되고 있다. CAN 2.0 A and CAN 2.0 B are used as protocols for CAN communication. In addition, CAN 2.0 A FD and CAN 2.0 B FD have been additionally developed recently. Each data frame structure of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD is different. Therefore, there is a demand for a CAN controller that can be easily configured to fit this type of protocol.

본 발명은 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD를 모두 지원할 수 있고, CAN 통신의 신속성을 확보할 수 있는 CAN 컨트롤러 및 이를 이용한 데이터 전송 방법을 제공한다.The present invention provides a CAN controller capable of supporting all of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD and securing the speed of CAN communication, and a data transmission method using the same.

본 발명의 실시예에 따른 CAN 컨트롤러는 인터페이스, 트랜스미터, 리시버, 수신 선입선출 메모리, 및 송신 선입선출 메모리를 포함한다. 인터페이스는 수신 선입 선출 메모리에 저장된 수신 정보를 프로세서에 제공하거나, 프로세서로부터 송신 정보를 제공받는다.The CAN controller according to an embodiment of the present invention includes an interface, a transmitter, a receiver, a receive first-in, first-out memory, and a transmit first-in, first-out memory. The interface provides reception information stored in a reception first-in, first-out memory to the processor, or receives transmission information from the processor.

트랜스미터는 프로토콜을 설정하고, 프로토콜에 따라 송신 선입선출 메모리에 저장된 송신 정보를 CAN 버스로 송신한다. 트랜스미터는 프로토콜 생성기를 포함한다. 프로토콜 생성기는 복수의 비트 상태들 중 프로토콜에 대응되는 데이터 프레임의 타겟 비트 상태들을 선택하여 프로토콜을 설정할 수 있다. 프로토콜 생성기는 각각의 타겟 비트 상태들을 순차적으로 천이시켜 송신 정보의 데이터 프레임을 결정할 수 있다. 프로토콜 생성기는 CAN 2.0 A 프로토콜, CAN 2.0 B 프로토콜, CAN 2.0 A FD 프로토콜, 및 CAN 2.0 B FD 프로토콜 중 하나를 선택하고, 선택된 프로토콜에 기초하여 타겟 비트 상태들을 선별할 수 있다.The transmitter sets the protocol and transmits the transmission information stored in the transmission first-in, first-out memory to the CAN bus according to the protocol. The transmitter includes a protocol generator. The protocol generator may set a protocol by selecting target bit states of a data frame corresponding to the protocol from among a plurality of bit states. The protocol generator may sequentially transition each of the target bit states to determine a data frame of transmission information. The protocol generator may select one of CAN 2.0 A protocol, CAN 2.0 B protocol, CAN 2.0 A FD protocol, and CAN 2.0 B FD protocol, and select target bit states based on the selected protocol.

리시버는 설정된 프로토콜에 따라 CAN 버스로부터 수신된 수신 정보를 분석한다. 리시버는 프로토콜 분석기, 마스킹 필터 레지스터, 보-레이트 조절기, 및 에러 감지기를 포함할 수 있다. 프로토콜 분석기는 타겟 비트 상태들을 순차적으로 천이시켜 수신 정보를 분석할 수 있다. 마스킹 필터 레지스터는 수신 정보의 식별 데이터에 근거하여 수신 정보를 필터링할 수 있다. 보-레이트 조절기는 설정된 프로토콜에 따라 수신 정보의 데이터 프레임의 보-레이트를 조절할 수 있다. 에러 감지기는 수신 정보의 에러를 감지하여 수신 선입선출 메모리에 수신 정보의 제공여부를 결정할 수 있다.The receiver analyzes the received information received from the CAN bus according to the set protocol. The receiver may include a protocol analyzer, a masking filter register, a baud-rate adjuster, and an error detector. The protocol analyzer may analyze received information by sequentially transitioning target bit states. The masking filter register may filter reception information based on identification data of the reception information. The baud-rate adjuster may adjust the baud rate of a data frame of received information according to a set protocol. The error detector may detect an error in the received information and determine whether to provide the received information to the receive first-in, first-out memory.

수신 선입선출 메모리는 수신 정보의 식별 데이터 및 CAN 버스의 버스 로드에 기초하여 이전에 저장된 수신 정보에 겹쳐 쓰여지도록 수신 정보를 저장한다. 송신 선입선출 메모리는 송신 정보의 식별 데이터 및 프로세서 로드에 기초하여 이전에 저장된 송신 정보에 겹쳐 쓰여지도록 송신 정보를 저장한다.The reception first-in, first-out memory stores reception information so that it is overwritten with previously stored reception information based on the identification data of the reception information and the bus load of the CAN bus. The transmission first-in, first-out memory stores transmission information so that it is overwritten with previously stored transmission information based on the identification data of the transmission information and the processor load.

CAN 컨트롤러는 식별 데이터 스캐너, 버스 로드 감지기, 및 프로세서 로드 감지기를 더 포함한다. 일례로, 식별 데이터 스캐너는 버스 로드가 프로세서 로드보다 높은 경우, 수신 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 수신 선입선출 메모리의 메모리 블록에 수신 정보를 겹쳐 쓸 수 있다. 일례로, 식별 데이터 스캐너는 프로세서 로드가 버스 로드보다 높은 경우, 송신 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 송신 선입선출 메모리의 메모리 블록에 송신 정보를 겹쳐 쓸 수 있다. 버스 로드 감지기는 버스 로드를 감지하고, 프로세서 로드 감지기는 프로세서 로드를 감지할 수 있다.The CAN controller further includes an identification data scanner, a bus load detector, and a processor load detector. For example, when the bus load is higher than the processor load, the identification data scanner may overwrite the reception information in a memory block of the reception first-in, first-out memory in which information having the same identification data as the identification data of the reception information is stored. For example, when the processor load is higher than the bus load, the identification data scanner may overwrite the transmission information in a memory block of a transmission first-in, first-out memory in which information having the same identification data as the identification data of the transmission information is stored. The bus load detector can detect the bus load, and the processor load detector can detect the processor load.

본 발명의 실시예에 따른 CAN 컨트롤러의 데이터 전송 방법은 데이터 정보를 수신하는 단계, 수신이 예정되는 데이터 정보의 양을 감지하는 단계, 데이터 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 선입선출 메모리의 메모리 블록을 검색하는 단계, 및 수신이 예정되는 데이터 정보의 양에 기초하여 메모리 블록에 데이터 정보를 겹쳐 쓰는 단계를 포함한다.The data transmission method of the CAN controller according to an embodiment of the present invention includes the steps of receiving data information, detecting the amount of data information to be received, and storing information having the same identification data as the identification data of the data information. Retrieving the memory block of the memory, and overwriting the data information on the memory block based on the amount of data information to be received.

일례로, 데이터 정보는 프로세서로부터 제공되는 송신 정보일 수 있다. 이 때, 데이터 정보의 양을 감지하는 단계는 프로세서 로드를 감지하는 단계, 프로세서 로드와 버스 로드를 비교하는 단계를 포함할 수 있다. 데이터 정보를 겹쳐 쓰는 단계에서, 프로세서 로드가 버스 로드 또는 설정된 기준 로드 값보다 큰 경우, 송신 정보를 겹쳐 쓸 수 있다. CAN 컨트롤러의 데이터 전송 방법은 선입선출 메모리에 저장된 정보를 순차적으로 CAN 버스에 출력하는 단계를 더 포함할 수 있다.For example, the data information may be transmission information provided from a processor. In this case, detecting the amount of data information may include detecting a processor load and comparing the processor load and the bus load. In the step of overwriting data information, if the processor load is greater than the bus load or a set reference load value, the transmission information may be overwritten. The data transmission method of the CAN controller may further include sequentially outputting information stored in the first-in, first-out memory to the CAN bus.

일례로, 데이터 정보는 CAN 버스로부터 제공되는 수신 정보일 수 있다. 이 때, 데이터 정보의 양을 감지하는 단계는 CAN 버스의 버스 로드를 감지하는 단계, 프로세서 로드와 버스 로드를 비교하는 단계를 포함할 수 있다. 데이터 정보를 겹쳐 쓰는 단계에서, 버스 로드가 프로세서 로드 또는 설정된 기준 로드 값보다 큰 경우, 수신 정보를 겹쳐 쓸 수 있다. CAN 컨트롤러의 데이터 전송 방법은 선입선출 메모리에 저장된 정보를 순차적으로 프로세서에 출력하는 단계를 더 포함할 수 있다.For example, the data information may be reception information provided from a CAN bus. In this case, detecting the amount of data information may include detecting a bus load of the CAN bus and comparing the processor load with the bus load. In the step of overwriting data information, if the bus load is greater than the processor load or the set reference load value, the received information may be overwritten. The data transmission method of the CAN controller may further include sequentially outputting information stored in the first-in, first-out memory to the processor.

본 발명의 실시예에 따른 CAN 컨트롤러 및 이를 이용한 데이터 전송 방법은 상태 천이의 순서를 설정하여 다양한 CAN 프로토콜을 통합 지원할 수 있고, 버스 로드와 프로세서 로드에 따라 선입선출 메모리에 데이터를 겹쳐 쓰기하여 데이터 통신의 신속성을 확보할 수 있다.The CAN controller and the data transmission method using the same according to an embodiment of the present invention can support various CAN protocols by setting the order of state transitions, and data communication by overwriting data in a first-in-first-out memory according to a bus load and a processor load. Can ensure the speed of the

도 1은 본 발명의 실시예에 따른 CAN 시스템의 블록도이다.
도 2는 도 1에 포함된 CAN 컨트롤러의 블록도이다.
도 3은 도 2의 프로토콜 엔진을 구체화한 블록도이다.
도 4는 CAN 2.0 A 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다.
도 5는 CAN 2.0 B 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다.
도 6은 CAN 2.0 A FD 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다.
도 7은 CAN 2.0 B FD 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다.
도 8은 도 2 또는 도 3의 데이터 버퍼부를 구체화한 블록도이다.
도 9는 본 발명의 실시예에 따른 수신 정보의 전송 방법에 대한 순서도이다.
도 10은 본 발명의 실시예에 따른 송신 정보의 전송 방법에 대한 순서도이다.
1 is a block diagram of a CAN system according to an embodiment of the present invention.
2 is a block diagram of a CAN controller included in FIG. 1.
3 is a block diagram of a concrete protocol engine of FIG. 2.
4 is a diagram showing the structure of a data frame for the CAN 2.0 A protocol.
5 is a diagram showing the structure of a data frame for the CAN 2.0 B protocol.
6 is a diagram showing the structure of a data frame for CAN 2.0 A FD protocol.
7 is a diagram showing the structure of a data frame for the CAN 2.0 B FD protocol.
8 is a block diagram in which the data buffer unit of FIG. 2 or 3 is embodied.
9 is a flowchart for a method of transmitting received information according to an embodiment of the present invention.
10 is a flowchart of a method of transmitting transmission information according to an embodiment of the present invention.

아래에서는, 본 발명의 기술 분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있을 정도로, 본 발명의 실시 예들이 명확하고 상세하게 기재된다. 아래에서는, CAN(Controller Area Network) 통신을 위한 CAN 컨트롤러가 송신 정보 또는 수신 정보를 전달한다. 송신 정보 및 수신 정보는 CAN 컨트롤러의 프로토콜 설정, 보-레이트 조절, 비트 스터핑(Bit Stuffing), 또는 클럭 동기화 등 다양한 원인에 의하여 형식적으로 일부 변화될 수 있다. 송신 정보 및 수신 정보 각각에 포함된 데이터의 의미가 유지된다면, 데이터 통신의 효율성 또는 에러의 최소화의 관점에서 송신 정보 및 수신 정보의 형식이 일부 변하더라도 용어의 변경 없이 송신 정보 및 수신 정보로 지칭될 것이다.In the following, embodiments of the present invention are described clearly and in detail to the extent that a person having ordinary knowledge in the technical field of the present invention can easily implement the present invention. Below, a CAN controller for CAN (Controller Area Network) communication delivers transmission information or reception information. Transmission information and reception information may be partially changed in form due to various reasons such as protocol setting of the CAN controller, baud rate adjustment, bit stuffing, or clock synchronization. If the meaning of the data included in each of the transmission information and the reception information is maintained, even if the format of the transmission information and the reception information changes in terms of efficiency of data communication or minimization of errors, it will be referred to as transmission information and reception information without changing the terms. will be.

도 1은 본 발명의 실시예에 따른 CAN 시스템의 블록도이다. CAN 시스템(100)은 후술될 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 중 어느 하나에 의하여 통신을 수행하는 시스템일 수 있다. 도 1을 참조하면, CAN 시스템(100)은 제1 내지 제3 전자 제어 장치들(110~130) 및 CAN 버스(140)를 포함할 수 있다. 예시적으로 3개의 전자 제어 장치들이 도시되었으나, 전자 제어 장치들의 개수에 제한은 없다. CAN 시스템(100)은 CAN 프로토콜을 이용하는 다양한 분야에 적용될 수 있다. 예를 들어, CAN 시스템(100)은 차량 시스템일 수 있다.1 is a block diagram of a CAN system according to an embodiment of the present invention. The CAN system 100 may be a system that performs communication by any one of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols to be described later. Referring to FIG. 1, the CAN system 100 may include first to third electronic control devices 110 to 130 and a CAN bus 140. Although three electronic control devices are illustrated as an example, there is no limit to the number of electronic control devices. The CAN system 100 can be applied to various fields using the CAN protocol. For example, the CAN system 100 may be a vehicle system.

제1 전자 제어 장치(110)는 제1 프로세서(112) 및 제1 CAN 컨트롤러(114)를 포함한다. 제2 전자 제어 장치(120)는 제2 프로세서(122) 및 제2 CAN 컨트롤러(124)를 포함한다. 제3 전자 제어 장치(130)는 제3 프로세서(132) 및 제3 CAN 컨트롤러(134)를 포함한다. 제1 내지 제3 전자 제어 장치들(110~130) 각각은 CAN 버스(140)와 연결되어 통신을 수행한다. 예를 들어, CAN 시스템(100)이 차량 시스템인 경우, 제1 내지 제3 전자 제어 장치들(110~130) 각각은 엔진, 핸들, 브레이크 등 다양한 차량용 기기들을 전자적으로 제어하기 위한 장치일 수 있다.The first electronic control device 110 includes a first processor 112 and a first CAN controller 114. The second electronic control device 120 includes a second processor 122 and a second CAN controller 124. The third electronic control device 130 includes a third processor 132 and a third CAN controller 134. Each of the first to third electronic control devices 110 to 130 is connected to the CAN bus 140 to perform communication. For example, when the CAN system 100 is a vehicle system, each of the first to third electronic control devices 110 to 130 may be a device for electronically controlling various vehicle devices such as an engine, a steering wheel, and a brake. .

제1 내지 제3 프로세서들(112~132)은 대응되는 전자 제어 장치에 대한 중앙 처리 장치(Central Processing Unit, CPU)의 기능을 수행할 수 있다. 예를 들어, 제1 전자 제어 장치(110)가 엔진을 제어하기 위한 ECU인 경우, 제1 프로세서(112)는 엔진을 제어하기 위하여 요구되는 제어 동작 및 연산 동작을 수행할 수 있다. 제1 프로세서(112)는 이러한 제어 동작 및 연산 동작에 의하여 생성된 정보를 송신 신호로 제1 CAN 컨트롤러(114)에 제공할 수 있다. 또한, 제1 프로세서(112)는 제2 프로세서(122) 또는 제3 프로세서(132)로부터 생성된 정보를 제1 CAN 컨트롤러(114)로부터 제공 받을 수 있다. 따라서, 전자 제어 장치는 다른 전자 제어 장치들과 상호작용할 수 있고, 이러한 상호작용을 통하여 자율 주행과 같은 복잡한 기능이 수행될 수 있다.The first to third processors 112 to 132 may perform a function of a central processing unit (CPU) for a corresponding electronic control device. For example, when the first electronic control device 110 is an ECU for controlling an engine, the first processor 112 may perform a control operation and a calculation operation required to control the engine. The first processor 112 may provide information generated by such a control operation and an operation operation as a transmission signal to the first CAN controller 114. In addition, the first processor 112 may receive information generated by the second processor 122 or the third processor 132 from the first CAN controller 114. Accordingly, the electronic control device can interact with other electronic control devices, and through such interaction, complex functions such as autonomous driving can be performed.

제1 내지 제3 CAN 컨트롤러들(114~134)은 대응되는 전자 제어 장치에 대한 정보의 송수신을 제어한다. 제1 내지 제3 CAN 컨트롤러들(114~134) 각각은 식별 데이터를 포함하는 정보를 CAN 버스(140)에 제공한다. 제1 내지 제3 CAN 컨트롤러들(114~134) 각각은 CAN 버스(140)에 제공된 정보의 식별 데이터를 분석하여 정보의 수신 여부를 결정한다. 식별 데이터는 해당 정보의 속성을 나타내고, 제1 내지 제3 CAN 컨트롤러들(114~134) 각각은 해당 전자 제어 장치의 구동에 필요한 정보인지 식별 데이터를 통하여 판단할 수 있다.The first to third CAN controllers 114 to 134 control transmission and reception of information to a corresponding electronic control device. Each of the first to third CAN controllers 114 to 134 provides information including identification data to the CAN bus 140. Each of the first to third CAN controllers 114 to 134 analyzes identification data of information provided on the CAN bus 140 to determine whether to receive the information. The identification data represents a property of the corresponding information, and each of the first to third CAN controllers 114 to 134 may determine whether information is necessary for driving the corresponding electronic control device through the identification data.

제1 내지 제3 CAN 컨트롤러들(114~134) 각각은 다양한 CAN 프로토콜을 통합 지원할 수 있다. 또한, 제1 내지 제3 CAN 컨트롤러들(114~134) 각각은 제1 내지 제3 프로세서들(112~132) 중 대응되는 프로세서의 로드 또는 CAN 버스(140)의 로드를 감지하여, 최신의 송신 정보 또는 수신 정보를 겹쳐 쓸 수 있다. 따라서, CAN 시스템(100)의 효율성이 확보되고, 로드에 의한 정보의 전송 지연이 방지되어 안정성이 확보될 수 있다. 송신 정보 또는 수신 정보를 겹쳐 쓰는 구체적인 내용은 후술된다.Each of the first to third CAN controllers 114 to 134 may integrally support various CAN protocols. In addition, each of the first to third CAN controllers 114 to 134 detects the load of the corresponding processor or the load of the CAN bus 140 among the first to third processors 112 to 132 and transmits the latest transmission. Information or received information can be overwritten. Accordingly, the efficiency of the CAN system 100 can be ensured, and a delay in transmission of information due to a load can be prevented, thereby ensuring stability. Details of overwriting the transmission information or the reception information will be described later.

CAN 버스(140)는 CAN 시스템(100)의 제1 내지 제3 전자 제어 장치들(110~130) 사이에서 통신 경로를 제공할 수 있다. 제1 내지 제3 전자 제어 장치들(110~130)은 CAN 버스(140)를 통하여 서로 정보를 교환할 수 있다. CAN 버스(140)를 이용하는 경우, 전자 제어 장치들 각각을 직접 연결하지 않고 정보를 교환하므로, 전자 제어 장치들 사이의 연결의 복잡도, 비용, 및 무게 측면에서 효율성이 확보될 수 있다. The CAN bus 140 may provide a communication path between the first to third electronic control devices 110 to 130 of the CAN system 100. The first to third electronic control devices 110 to 130 may exchange information with each other through the CAN bus 140. In the case of using the CAN bus 140, since information is exchanged without directly connecting each of the electronic control devices, efficiency in terms of complexity, cost, and weight of the connection between the electronic control devices can be secured.

도 2는 도 1에 포함된 CAN 컨트롤러의 블록도이다. 설명의 편이상, 도 1의 도면 부호를 참조하여, 도 2의 구성들이 설명된다. CAN 컨트롤러(200)는 도 1의 제1 내지 제3 CAN 컨트롤러들(114~134)로 볼 수 있다. 이하, CAN 버스는 도 1의 CAN 버스(140)의 도면 부호를 참조하여 설명되고, 후술되는 프로세서는 도 1의 제1 프로세서(112)의 도면 부호를 참조하여 설명된다. 2 is a block diagram of a CAN controller included in FIG. 1. For the convenience of description, with reference to the reference numerals in FIG. 1, the configurations of FIG. The CAN controller 200 may be viewed as first to third CAN controllers 114 to 134 of FIG. 1. Hereinafter, the CAN bus will be described with reference to the reference numerals of the CAN bus 140 of FIG. 1, and the processor to be described later will be described with reference to the reference numerals of the first processor 112 of FIG. 1.

도 2를 참조하면, CAN 컨트롤러(200)는 동기화기(210) 및 프로토콜 엔진(220)을 포함한다. 프로토콜 엔진(220)은 인터페이스(221), 데이터 버퍼부(222), 및 트랜시버(223)를 포함한다. CAN 컨트롤러(200)는 제1 내지 제3 전자 제어 장치들(110~130)에 포함될 수 있다. CAN 컨트롤러(200)는 프로세서(112)로부터 데이터 정보를 입력 받아, CAN 버스(140)에 데이터 정보를 출력할 수 있다. 또는, CAN 컨트롤러(200)는 CAN 버스(140)로부터 데이터 정보를 입력 받아, 프로세서(112)에 데이터 정보를 출력할 수 있다.Referring to FIG. 2, the CAN controller 200 includes a synchronizer 210 and a protocol engine 220. The protocol engine 220 includes an interface 221, a data buffer unit 222, and a transceiver 223. The CAN controller 200 may be included in the first to third electronic control devices 110 to 130. The CAN controller 200 may receive data information from the processor 112 and output the data information to the CAN bus 140. Alternatively, the CAN controller 200 may receive data information from the CAN bus 140 and output the data information to the processor 112.

동기화기(210)는 프로세서(112)와 연결되어 데이터 통신을 수행할 수 있다. 동기화기(210)는 주변 장치 버스(Peripheral Bus)를 통하여 프로세서(112)와 연결될 수 있다. 예를 들어, 주변 장치 버스는 APB(Advanced Peripheral Bus)일 수 있다. 주변 장치 버스의 클럭 주파수 및 위상은 CAN 컨트롤러(200)의 클럭 주파수 및 위상과 다를 수 있다. 이 경우, CDC(Clock Domain Crossing)가 발생될 수 있다. 동기화기(210)는 주변 장치 버스의 클럭과 CAN 컨트롤러(200)의 클럭을 동기화시킬 수 있다.The synchronizer 210 may be connected to the processor 112 to perform data communication. The synchronizer 210 may be connected to the processor 112 through a peripheral bus. For example, the peripheral device bus may be an Advanced Peripheral Bus (APB). The clock frequency and phase of the peripheral bus may be different from the clock frequency and phase of the CAN controller 200. In this case, clock domain crossing (CDC) may occur. The synchronizer 210 may synchronize the clock of the peripheral device bus and the clock of the CAN controller 200.

프로토콜 엔진(220)은 프로세서(112)와 CAN 버스(140) 사이의 데이터 통신을 제어한다. 이를 위하여, 프로토콜 엔진(220)은 CAN 버스(140)와의 데이터 통신을 위한 프로토콜을 생성할 수 있다. 프로토콜 엔진(220)은 동기화기(210)를 통하여 제공되는 프로세서(112)의 송신 정보를 수신할 수 있다. 프로토콜 엔진(220)은 송신 정보를 CAN 버스(140)에 송신할 수 있다. CAN 버스(140)에 제공된 송신 정보는 다른 전자 제어 장치에 포함된 CAN 컨트롤러에 제공될 수 있다. 프로토콜 엔진(220)은 CAN 버스(140)를 통하여 제공되는 수신 정보를 수신할 수 있다. 프로토콜 엔진(220)은 수신 정보를 동기화기(210)로 송신할 수 있다. 동기화기(210)는 수신 정보를 프로세서(112)에 제공할 수 있다.The protocol engine 220 controls data communication between the processor 112 and the CAN bus 140. To this end, the protocol engine 220 may generate a protocol for data communication with the CAN bus 140. The protocol engine 220 may receive transmission information of the processor 112 provided through the synchronizer 210. The protocol engine 220 may transmit transmission information to the CAN bus 140. Transmission information provided on the CAN bus 140 may be provided to a CAN controller included in another electronic control device. The protocol engine 220 may receive reception information provided through the CAN bus 140. The protocol engine 220 may transmit the received information to the synchronizer 210. The synchronizer 210 may provide the received information to the processor 112.

인터페이스(221)는 프로토콜 엔진(220)과 프로세서(112) 사이의 데이터 통신을 수행하는 회로로 구현될 수 있다. 인터페이스(221)는 동기화기(210)로부터 수신된 송신 정보를 데이터 버퍼부(222)에 제공할 수 있다. 인터페이스(221)는 데이터 버퍼부(222)로부터 수신 신호를 수신하여 동기화기(210)에 제공할 수 있다. 수신 신호는 동기화기(210)를 통하여 주변 장치 버스에 제공되고, 프로세서(112)에 제공될 수 있다.The interface 221 may be implemented as a circuit for performing data communication between the protocol engine 220 and the processor 112. The interface 221 may provide transmission information received from the synchronizer 210 to the data buffer unit 222. The interface 221 may receive a received signal from the data buffer unit 222 and provide it to the synchronizer 210. The received signal may be provided to the peripheral device bus through the synchronizer 210 and may be provided to the processor 112.

데이터 버퍼부(222)는 트랜시버(223)로부터 제공된 송신 정보를 저장할 수 있다. 데이터 버퍼부(222)는 시간의 흐름에 따라 순차적으로 송신 정보를 저장하고, 저장된 순서로 송신 정보를 인터페이스(221)에 제공할 수 있다. 이를 위하여, 데이터 버퍼부(222)는 선입선출(First In First Out, FIFO) 메모리를 포함할 수 있다. 또한, 데이터 버퍼부(222)는 인터페이스(221)로부터 제공된 수신 정보를 저장할 수 있다. 데이터 버퍼부(222)는 시간의 흐름에 따라 순차적으로 수신 정보를 저장하고, 저장된 순서로 수신 정보를 트랜시버(223)에 제공할 수 있다. 이를 위하여, 데이터 버퍼부(222)는 선입선출 메모리를 포함할 수 있다.The data buffer unit 222 may store transmission information provided from the transceiver 223. The data buffer unit 222 may sequentially store transmission information according to the passage of time, and may provide the transmission information to the interface 221 in the stored order. To this end, the data buffer unit 222 may include a First In First Out (FIFO) memory. Also, the data buffer unit 222 may store reception information provided from the interface 221. The data buffer unit 222 may sequentially store the reception information according to the passage of time, and provide the reception information to the transceiver 223 in the stored order. To this end, the data buffer unit 222 may include a first-in, first-out memory.

데이터 버퍼부(222)는 정상적인 상태에서 데이터가 입력된 순서로 데이터를 출력할 수 있다. 다만, 프로세서(112)의 데이터 처리량이 많거나, CAN 버스(140)에 제공된 데이터의 양이 많은 경우, 데이터 버퍼부(222)가 모든 데이터를 출력하는데 시간이 소요될 수 있다. 특히, CAN 통신 방식이 자주 사용되는 차량 시스템에서, 데이터 출력의 지연은 탑승자의 안전성과 직결될 수 있다. 또한, 실시간으로 주변 상황이 급변하고, 가장 최신의 데이터가 이전의 데이터보다 중요한 차량 시스템의 특성상, 모든 데이터를 출력하기 위하여 데이터 출력을 지연시키는 것은 비효율적일 수 있다. 따라서, 데이터 버퍼부(222)로 제공될 데이터 정보의 양이 많은 경우, 이미 저장된 데이터 정보에 새로운 데이터 정보가 겹쳐 쓰여질 수 있다. 이에 대한 구체적인 내용은 후술된다.The data buffer unit 222 may output data in an order in which data is inputted in a normal state. However, when the amount of data processing of the processor 112 is large or the amount of data provided to the CAN bus 140 is large, it may take time for the data buffer unit 222 to output all data. In particular, in a vehicle system in which the CAN communication method is frequently used, the delay in data output can be directly related to the safety of the occupant. In addition, due to the characteristics of a vehicle system where the surrounding situation changes rapidly in real time, and the most recent data is more important than the previous data, delaying data output to output all data may be inefficient. Accordingly, when the amount of data information to be provided to the data buffer unit 222 is large, new data information may be overwritten on previously stored data information. Details about this will be described later.

트랜시버(223)는 데이터 버퍼부(222)로부터 송신 정보를 수신하여 CAN 버스(140)에 송신한다. 트랜시버(223)는 CAN 버스(140)로부터 수신 정보를 수신하여 데이터 버퍼부(222)에 송신한다. 트랜시버(223)는 프로토콜을 미리 설정할 수 있다. 트랜시버(223)는 설정된 프로토콜에 따라, 송신 정보를 CAN 버스(140)에 송신하고 수신 정보를 CAN 버스(140)로부터 수신할 수 있다. 프로토콜은 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 중 어느 하나일 수 있다. 트랜시버(223)는 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 모두를 지원할 수 있으며, 차량 시스템에 따라 결정된 프로토콜을 선택할 수 있다. 이에 대한 구체적인 내용은 후술된다.The transceiver 223 receives transmission information from the data buffer unit 222 and transmits it to the CAN bus 140. The transceiver 223 receives reception information from the CAN bus 140 and transmits it to the data buffer unit 222. The transceiver 223 may preset a protocol. The transceiver 223 may transmit transmission information to the CAN bus 140 and receive reception information from the CAN bus 140 according to a set protocol. The protocol may be any one of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD. The transceiver 223 may support all of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD, and may select a protocol determined according to the vehicle system. Details about this will be described later.

도 3은 도 2의 프로토콜 엔진을 구체화한 블록도이다. 도 3을 참조하면, 프로토콜 엔진(300)은 인터페이스(310), 데이터 버퍼부(320), 리시버(330), 및 트랜스미터(340)를 포함한다. 도 3의 인터페이스(310)는 도 2의 인터페이스(221)와 실질적으로 동일하므로, 구체적인 설명이 생략된다. 도 3의 데이터 버퍼부(320)는 도 2의 데이터 버퍼부(222)에 대응된다. 도 3의 리시버(330) 및 트랜스미터(340)는 도 2의 트랜시버(223)에 포함되는 구성으로 볼 수 있다.3 is a block diagram of a concrete protocol engine of FIG. 2. Referring to FIG. 3, the protocol engine 300 includes an interface 310, a data buffer unit 320, a receiver 330, and a transmitter 340. The interface 310 of FIG. 3 is substantially the same as the interface 221 of FIG. 2, and thus a detailed description thereof is omitted. The data buffer unit 320 of FIG. 3 corresponds to the data buffer unit 222 of FIG. 2. The receiver 330 and the transmitter 340 of FIG. 3 may be viewed as a configuration included in the transceiver 223 of FIG. 2.

데이터 버퍼부(320)는 수신 선입선출(First In First Out, FIFO) 메모리(322) 및 송신 선입선출 메모리(324)를 포함한다. 수신 선입선출 메모리(322) 및 송신 선입선출 메모리(324)는 원칙적으로 수신된 순서대로 데이터 정보를 저장하고, 저장된 순서대로 데이터 정보를 출력한다. 수신 선입선출 메모리(322)는 리시버(330)로부터 수신된 순서대로 수신 정보를 저장한다. 수신 선입선출 메모리(322)는 저장된 순서대로 수신 정보를 인터페이스(310)에 출력한다. 송신 선입선출 메모리(324)는 인터페이스(310)로부터 수신된 순서대로 송신 정보를 저장한다. 송신 선입선출 메모리(324)는 저장된 순서대로 송신 정보를 트랜스미터(340)에 출력한다. 수신 선입선출 메모리(322)와 송신 선입선출 메모리(324)는 동일한 종류의 메모로 구현될 수 있다.The data buffer unit 320 includes a receive first in first out (FIFO) memory 322 and a transmit first in first out memory 324. In principle, the reception first-in, first-out memory 322 and the transmission first-in, first-out memory 324 store data information in the order of reception, and output data information in the stored order. The reception first-in, first-out memory 322 stores reception information in the order received from the receiver 330. The reception first-in, first-out memory 322 outputs reception information to the interface 310 in the stored order. The transmission first-in, first-out memory 324 stores transmission information in the order received from the interface 310. The transmission first-in, first-out memory 324 outputs transmission information to the transmitter 340 in the stored order. The reception first-in, first-out memory 322 and the transmission first-in, first-out memory 324 may be implemented with the same type of memo.

수신 선입선출 메모리(322)는 CAN 버스(140)의 버스 로드에 따라 수신 정보를 이전에 저장된 정보 대신에 저장할 수 있다. 버스 로드는 CAN 버스(140)에 제공되는 데이터의 양에 의하여 결정된다. CAN 버스에 제공되는 데이터의 양이 많은 경우, 버스 로드는 증가한다. 버스 로드가 큰 경우, 수신 선입선출 메모리(322)에 저장될 수신 정보가 증가할 수 있다. 이 경우, 새로 수신된 수신 정보가 동일한 속성을 갖는 수신 정보에 겹쳐 쓰여질 수 있다. 이 때, 수신 선입선출 메모리(322)에 저장된 수신 정보는 겹쳐 쓰기에 의하여 삭제된 수신 정보의 출력 순서에서 인터페이스(310)로 출력될 수 있다.The reception first-in-first-out memory 322 may store reception information instead of previously stored information according to the bus load of the CAN bus 140. The bus load is determined by the amount of data provided to the CAN bus 140. If the amount of data provided on the CAN bus is large, the bus load increases. When the bus load is large, reception information to be stored in the reception first-in, first-out memory 322 may increase. In this case, newly received reception information may be overwritten on reception information having the same attribute. In this case, the reception information stored in the reception first-in, first-out memory 322 may be output to the interface 310 in the order of outputting received information deleted by overwriting.

송신 선입선출 메모리(324)는 프로세서(112)의 프로세서 로드에 따라 송신 정보를 이전에 저장된 정보 대신에 저장할 수 있다. 프로세서 로드는 프로세서(112)에서 데이터가 처리되는 양에 의하여 결정된다. 프로세서(112)에서 처리된 데이터의 양이 많은 경우, 프로세서 로드는 증가한다. 프로세서 로드가 큰 경우, 송신 선입선출 메모리(324)에 저장될 송신 정보가 증가할 수 있다. 이 경우, 새로 수신된 송신 정보가 동일한 속성을 갖는 송신 정보에 겹쳐 쓰여질 수 있다. 이 때, 송신 선입선출 메모리(324)에 저장된 송신 정보는 겹쳐 쓰기에 의하여 삭제된 송신 정보의 출력 순서에서 트랜스미터(340)로 출력될 수 있다.The transmission first-in, first-out memory 324 may store transmission information instead of previously stored information according to the processor load of the processor 112. The processor load is determined by the amount of data processed by the processor 112. When the amount of data processed by the processor 112 is large, the processor load increases. When the processor load is large, transmission information to be stored in the transmission first-in, first-out memory 324 may increase. In this case, newly received transmission information may be overwritten on transmission information having the same attribute. In this case, the transmission information stored in the transmission first-in-first-out memory 324 may be output to the transmitter 340 in an output order of transmission information deleted by overwriting.

리시버(330)는 CAN 버스(140)로부터 수신 정보를 수신할 수 있다. 리시버(330)는 수신 정보를 데이터 버퍼부(320)에 제공할 수 있다. 데이터 버퍼부(320)에 제공된 수신 정보는 수신 선입선출 메모리(322)에 저장될 수 있다. 리시버(330)는 에러 감지기(331), 수신 보-레이트 조절기(333), 마스킹 필터 레지스터(334), 및 프로토콜 분석기(335)를 포함한다. 에러 감지기(331)는 카운터(332)를 포함한다.The receiver 330 may receive reception information from the CAN bus 140. The receiver 330 may provide the received information to the data buffer unit 320. The reception information provided to the data buffer unit 320 may be stored in the reception first-in, first-out memory 322. The receiver 330 includes an error detector 331, a receive baud rate adjuster 333, a masking filter register 334, and a protocol analyzer 335. The error detector 331 includes a counter 332.

에러 감지기(331)는 수신 정보의 에러를 감지한다. 예를 들어, 에러 감지기(331)는 비트 에러, 스터프(Stuff) 에러, 양식(Form) 에러, CRC(Cyclic redundancy check) 에러, 및 확인(acknowledgement) 비트 에러를 감지할 수 있다. 비트 에러는 하나의 노드로부터 전송된 정보가 CAN 버스에 표현되지 않는 경우에 발생된다. 스터프 에러는 CAN 프로토콜에서 6개의 연속적인 비트 값이 원칙적으로 나타날 수 없음에도 나타난 경우에 발생된다. 양식 에러는 0또는 1로 특정된 비트 값이 다르게 나타난 경우에 발생된다. CRC 에러는 수신 정보의 CRC 영역에 대한 CRC 계산을 통하여 일부 비트가 변경된 것이 확인된 경우에 발생된다. 확인 비트 에러는 리시버(330)가 에러 없이 수신 정보를 수신한 경우 0의 비트 값을 갖는 확인 비트가 다른 값을 가질 때 발생된다. 카운터(332)는 에러 감지기(331)에서 감지된 에러의 개수를 카운팅할 수 있다. 감지된 에러의 개수가 특정 개수 이상인 경우, 에러 감지기(331)는 리시버(330)가 수신 정보를 수신하여 수신 선입선출 메모리(322)에 제공하지 않도록 제어할 수 있다.The error detector 331 detects an error in the received information. For example, the error detector 331 may detect a bit error, a stuff error, a form error, a cyclic redundancy check (CRC) error, and an acknowledgment bit error. A bit error occurs when information transmitted from one node is not represented on the CAN bus. Stuff error occurs when 6 consecutive bit values appear in the CAN protocol even though they cannot appear in principle. A format error occurs when a bit value specified as 0 or 1 appears differently. The CRC error occurs when it is confirmed that some bits have changed through the CRC calculation for the CRC area of the received information. The confirmation bit error occurs when the confirmation bit having a bit value of 0 has a different value when the receiver 330 receives the reception information without an error. The counter 332 may count the number of errors detected by the error detector 331. When the number of detected errors is greater than or equal to a specific number, the error detector 331 may control the receiver 330 not to receive the received information and provide it to the reception first-in, first-out memory 322.

수신 보-레이트 조절기(333)는 수신 정보의 보-레이트를 조절한다. 수신 보-레이트 조절기(333)는 설정된 프로토콜에 따라 수신 정보에 포함된 데이터 영역의 보-레이트를 조절한다. 예를 들어, 수신 보-레이트 조절기(333)는 프로토콜이 CAN 2.0 A 또는 CAN 2.0 B로 설정된 경우, 데이터 영역이 최대 1Mbps로 전송되도록 클럭을 조절할 수 있다. 수신 보-레이트 조절기(333)는 프로토콜이 CAN 2.0 A FD 또는 CAN 2.0 B FD로 설정된 경우, 데이터 영역이 최대 8Mbps로 전송되도록 클럭을 조절할 수 있다. 수신 보-레이트 조절기(333)는 설정된 프로토콜과 무관하게 데이터 영역을 제외한 다른 영역의 보-레이트는 조절하지 않을 수 있다. 예를 들어, 수신 보-레이트 조절기(333)는 후술될 중재 영역, 제어 영역, CRC 영역, 및 확인 영역의 보-레이트를 1Mbps로 유지할 수 있다. 또한, 수신 보-레이트 조절기(333)는 추가적으로 수신 정보의 샘플링 위치를 변경할 수 있다.The received baud rate adjuster 333 adjusts the baud rate of the received information. The reception baud rate adjuster 333 adjusts the baud rate of the data area included in the reception information according to the set protocol. For example, when the protocol is set to CAN 2.0 A or CAN 2.0 B, the reception baud rate controller 333 may adjust the clock so that the data area is transmitted at a maximum of 1 Mbps. When the protocol is set to CAN 2.0 A FD or CAN 2.0 B FD, the reception baud rate controller 333 may adjust the clock so that the data area is transmitted at a maximum of 8 Mbps. The reception baud rate adjuster 333 may not adjust the baud rate of a region other than the data region regardless of the set protocol. For example, the reception baud rate adjuster 333 may maintain the baud rate of the arbitration region, the control region, the CRC region, and the confirmation region to be described later at 1 Mbps. In addition, the reception baud rate adjuster 333 may additionally change the sampling position of the reception information.

마스킹 필터 레지스터(334)는 수신 정보의 식별 데이터에 근거하여 수신 정보를 필터링할 수 있다. 식별 데이터는 수신 정보의 데이터 프레임에 포함된 중재 영역에 제공될 수 있다. 마스킹 필터 레지스터(334)는 리시버(330)가 수신하여 수신 선입선출 메모리(322)에 제공할 수신 정보의 식별 데이터를 설정할 수 있다. 예를 들어, 수신 정보의 식별 데이터가 설정된 식별 데이터의 값과 일치하는 경우, 리시버(330)는 수신 정보를 수신 선입선출 메모리(322)에 제공할 수 있다. 수신 정보의 식별 데이터가 설정된 식별 데이터의 값과 다른 경우, 리시버(330)는 수신 정보를 수신 선입선출 메모리(322)에 제공하지 않을 수 있다. 반대로, 마스킹 필터 레지스터(334)는 수신 선입선출 메모리(322)에 제공하지 않을 수신 정보의 식별 데이터를 설정할 수 있다.The masking filter register 334 may filter reception information based on identification data of the reception information. The identification data may be provided to an arbitration area included in the data frame of the received information. The masking filter register 334 may set identification data of reception information to be received by the receiver 330 and provided to the reception first-in, first-out memory 322. For example, when the identification data of the reception information matches the set identification data value, the receiver 330 may provide the reception information to the reception first-in, first-out memory 322. When the identification data of the reception information is different from the set identification data value, the receiver 330 may not provide the reception information to the reception first-in, first-out memory 322. Conversely, the masking filter register 334 may set identification data of reception information not to be provided to the reception first-in, first-out memory 322.

프로토콜 분석기(335)는 CAN 버스(140)와 연결되어 수신 정보를 수신한다. 프로토콜 분석기(335)는 설정된 프로토콜에 따라 수신 정보를 분석한다. 프로토콜 분석기(335)는 설정된 프로토콜에 의한 데이터 프레임의 구조에 따라 순차적으로 수신 정보의 데이터 프레임을 분석할 수 있다. CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 각각의 데이터 프레임에 포함된 비트들의 구조는 서로 다르다. 따라서, 설정된 프로토콜에 따라 수신 정보의 분석을 위한 상태 천이는 서로 다를 수 있다. 이러한 상태 천이의 구체적인 예는 후술된다.The protocol analyzer 335 is connected to the CAN bus 140 to receive reception information. The protocol analyzer 335 analyzes the received information according to the set protocol. The protocol analyzer 335 may sequentially analyze data frames of received information according to a structure of a data frame according to a set protocol. The structures of bits included in each data frame of the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols are different. Accordingly, state transitions for analysis of received information may be different according to a set protocol. A specific example of this state transition will be described later.

프로토콜 분석기(335)에서 분석된 수신 정보에 기초하여, 에러 감지기(331)는 에러 감지에 요구되는 비트의 위치를 인지할 수 있고, 에러를 감지할 수 있다. 분석된 수신 정보에 기초하여, 수신 보-레이트 조절기(333)는 데이터 영역의 위치를 인지할 수 있고, 설정된 프로토콜에 따라 데이터 영역의 보-레이트를 조절할 수 있다. 분석된 수신 정보에 기초하여, 마스킹 필터 레지스터(334)는 중재 영역 및 식별 데이터의 위치를 인지할 수 있고, 수신 정보의 제공여부를 결정할 수 있다.Based on the received information analyzed by the protocol analyzer 335, the error detector 331 may recognize the position of a bit required for error detection and may detect an error. Based on the analyzed received information, the reception baud-rate adjuster 333 may recognize the location of the data region and adjust the baud rate of the data region according to a set protocol. Based on the analyzed received information, the masking filter register 334 may recognize the location of the arbitration area and the identification data, and may determine whether to provide the received information.

프로토콜 분석기(335)는 수신 정보의 데이터 프레임의 스터프 비트를 제거할 수 있다. 상술하였듯이, CAN 프로토콜에서 6개의 연속적인 비트 값이 나타날 수 없다. 이를 위하여, 리시버(330)에 제공되는 수신 정보는 5개의 연속적인 비트 값이 나타나는 경우, 6번째 비트에 연속적인 비트 값과 반대되는 비트 값을 갖는 스터프 비트가 추가된다. 프로토콜 분석기(335)는 이러한 스터프 비트를 제거할 수 있다. 또한, 프로토콜 분석기(335)는 에러 없이 수신 정보가 수신되는 경우, 확인 비트가 0에서 1의 값을 갖도록 수신 정보를 조절할 수 있다.The protocol analyzer 335 may remove the stuff bits of the data frame of the received information. As mentioned above, 6 consecutive bit values cannot appear in the CAN protocol. To this end, when five consecutive bit values appear in the received information provided to the receiver 330, stuff bits having a bit value opposite to the consecutive bit values are added to the sixth bit. The protocol analyzer 335 may remove these stuff bits. In addition, the protocol analyzer 335 may adjust the reception information so that the confirmation bit has a value of 0 to 1 when reception information is received without an error.

트랜스미터(340)는 데이터 버퍼부(320)로부터 송신 정보를 수신할 수 있다. 트랜스미터(340)는 송신 정보를 CAN 버스(140)에 제공할 수 있다. 트랜스미터(340)는 송신 보-레이트 조절기(343) 및 프로토콜 생성기(345)를 포함한다. 송신 보-레이트 조절기(343)는 리시버(330)에 포함된 수신 보-레이트 조절기(333)와 유사하게, 송신 정보에 포함된 데이터 영역의 보-레이트를 조절한다. 즉, 송신 보-레이트 조절기(343)는 프로토콜이 CAN 2.0 A 또는 CAN 2.0 B로 설정된 경우, 데이터 영역이 최대 1Mbps로 전송되도록 클럭을 조절할 수 있다. 송신 보-레이트 조절기(343)는 프로토콜이 CAN 2.0 A FD 또는 CAN 2.0 B FD로 설정된 경우, 데이터 영역이 최대 8Mbps로 전송되도록 클럭을 조절할 수 있다.The transmitter 340 may receive transmission information from the data buffer unit 320. The transmitter 340 may provide transmission information to the CAN bus 140. The transmitter 340 includes a transmit baud-rate adjuster 343 and a protocol generator 345. The transmit baud rate adjuster 343 adjusts the baud rate of the data area included in the transmit information, similar to the receive baud rate adjuster 333 included in the receiver 330. That is, when the protocol is set to CAN 2.0 A or CAN 2.0 B, the transmission baud rate controller 343 may adjust the clock so that the data area is transmitted at a maximum of 1 Mbps. When the protocol is set to CAN 2.0 A FD or CAN 2.0 B FD, the transmit baud rate controller 343 may adjust the clock so that the data area is transmitted at a maximum of 8 Mbps.

프로토콜 생성기(345)는 CAN 버스(140)와 연결되어 송신 정보를 송신한다. 프로토콜 생성기(345)는 프로토콜을 설정한다. 프로토콜 생성기(345)는 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜을 통합 지원할 수 있다. 프로토콜 생성기(345)는 해당 차량 시스템에 대한 프로토콜의 유형에 맞도록 프로토콜을 선택할 수 있다. 예를 들어, 해당 CAN 컨트롤러를 포함하는 시스템이 CAN 2.0 A 프로토콜을 지원하는 경우, 프로토콜 생성기(345)는 CAN 2.0 A에 대응되는 데이터 프레임을 갖도록 프로토콜을 설정할 수 있다. The protocol generator 345 is connected to the CAN bus 140 to transmit transmission information. The protocol generator 345 sets the protocol. The protocol generator 345 may support integrated CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols. The protocol generator 345 may select a protocol to match the type of protocol for the vehicle system in question. For example, if the system including the corresponding CAN controller supports the CAN 2.0 A protocol, the protocol generator 345 may set the protocol to have a data frame corresponding to CAN 2.0 A.

프로토콜 생성기(345)는 설정된 프로토콜에 따라 송신 정보의 비트들 각각을 결정할 수 있다. 이러한 송신 정보의 비트들을 결정하기 위하여, 프로토콜 생성기(345)는 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜에 포함된 데이터 프레임의 모든 비트 상태들을 판단할 수 있다. 프로토콜 생성기(345)는 모든 비트 상태들 중 설정된 프로토콜에 따라 타겟 비트 상태들을 선택할 수 있다. 프로토콜 생성기(345)는 선택된 타겟 비트 상태들을 순차적으로 천이시켜 송신 정보의 데이터 프레임을 결정할 수 있다. 이러한 데이터 프레임의 상태 천이는 표 1과 같다.The protocol generator 345 may determine each bit of transmission information according to a set protocol. In order to determine the bits of the transmission information, the protocol generator 345 may determine all bit states of a data frame included in the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols. The protocol generator 345 may select target bit states according to a set protocol among all bit states. The protocol generator 345 may determine a data frame of transmission information by sequentially transitioning the selected target bit states. Table 1 shows the state transition of the data frame.

영역domain 비트 상태Bit state CAN 2.0 ACAN 2.0 A CAN 2.0 BCAN 2.0 B CAN 2.0 A FDCAN 2.0 A FD CAN 2.0 B FDCAN 2.0 B FD SOFSOF SOFSOF OO OO OO OO 중재 영역




Arbitration area




ID1ID1 OO OO OO OO
SRRSRR XX OO XX OO IDEIDE XX OO XX OO ID2ID2 XX OO XX OO RTRRTR OO OO XX XX R1R1 XX XX OO OO 제어 영역





Control area





IDEIDE OO XX OO XX
R1R1 XX OO XX XX EDLEDL XX XX OO OO R0R0 OO OO OO OO BRSBRS XX XX OO OO ESIESI XX XX OO OO DLCDLC OO OO OO OO 데이터 영역Data area DATADATA OO OO OO OO CRC 영역

CRC area

SCSC XX XX OO OO
CRCCRC OO OO OO OO CRC_DCRC_D OO OO OO OO 확인 영역
Confirmation area
ACKACK OO OO OO OO
ACK_DACK_D OO OO OO OO EOFEOF EOFEOF OO OO OO OO

표 1을 참조하면, 데이터 프레임은 시작 프레임(Start of frame), 중재 영역(Arbitration Field), 제어 영역(Control Field), 데이터 영역(Data Field), CRC 영역(CRC Field), 확인 영역(Acknowledge Field), 및 종료 프레임(End of frame)으로 구분된다. 중재 영역은 제1 식별 데이터(ID1), SRR(Substitute Remote Request) 비트, IDE(Identifier extension) 비트, 제2 식별 데이터(ID2), RTR(Remote Transmission Request) 비트, 및 중재 영역 예비 비트(R1) 중 적어도 하나를 포함할 수 있다. 제어 영역은 IDE 비트, 제1 제어 영역 예비 비트(R1), EDL(Extended Data Length) 비트, 제2 제어 영역 예비 비트(R0), BRS(Bit Rate Switch) 비트, ESI(Error state indicator) 비트, 및 DLC(Data length code) 비트 중 적어도 하나를 포함할 수 있다. CRC 영역은 SC 비트, CRC 비트, 및 CRC 구획(Delimiter) 비트(CRC_D) 중 적어도 하나를 포함할 수 있다. 확인 영역은 확인 비트(ACK) 및 확인 구획 비트(ACK_D)를 포함할 수 있다.Referring to Table 1, the data frame is a start of frame, an arbitration field, a control field, a data field, a CRC field, and an acknowledgment field. ), and End of frame. The arbitration region includes a first identification data (ID1), a Substitute Remote Request (SRR) bit, an identifier extension (IDE) bit, a second identification data (ID2), a remote transmission request (RTR) bit, and an arbitration region spare bit (R1). It may include at least one of. The control region is an IDE bit, a first control region reserved bit (R1), an extended data length (EDL) bit, a second control region reserved bit (R0), a bit rate switch (BRS) bit, an error state indicator (ESI) bit, And at least one of DLC (Data Length Code) bits. The CRC region may include at least one of an SC bit, a CRC bit, and a CRC delimiter bit (CRC_D). The acknowledgment area may include an acknowledgment bit (ACK) and an acknowledgment partition bit (ACK_D).

CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 각각의 데이터 프레임은 'O'로 표시된 비트 상태에 대응되는 비트를 포함하고, 'X'로 표시된 비트 상태에 대응되는 비트를 포함하지 않는다. 프로토콜 생성기(245)는 설정된 프로토콜에서 'O'로 표시된 비트 상태인 타겟 비트 상태들을 순차적으로 천이시켜 송신 정보의 데이터 프레임을 결정한다. 예를 들어, CAN 2.0 A 프로토콜이 설정된 경우, 프로토콜 생성기(245)는 시작 프레임(SOF), 제1 식별 데이터(ID1), RTR 비트, IDE 비트, 제2 제어 영역 예비 비트(R0), DLC 비트 등으로 순차적으로 상태 천이시켜 데이터 프레임을 결정한다. 이 때, 프로토콜 생성기(245)는 제1 식별 데이터(ID1)를 선택한 후 SRR 비트, 중재 영역의 IDE 비트, 및 제2 식별 데이터를 건너뛰고 RTR 비트로 상태 천이시켜 데이터 프레임을 결정할 수 있다. 각각의 비트 상태에 대응되는 비트들에 대한 설명은 후술된다.The data frame of each of the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols contains a bit corresponding to the bit state indicated by'O' and corresponds to the bit state indicated by'X'. Does not contain bits. The protocol generator 245 determines a data frame of transmission information by sequentially transitioning target bit states, which are bit states indicated by'O' in the set protocol. For example, when the CAN 2.0 A protocol is set, the protocol generator 245 includes a start frame (SOF), a first identification data (ID1), an RTR bit, an IDE bit, a second control area reserved bit (R0), and a DLC bit. The data frame is determined by sequentially making state transitions. At this time, the protocol generator 245 may determine the data frame by selecting the first identification data ID1, skipping the SRR bit, the IDE bit of the arbitration area, and the second identification data, and making a state transition to the RTR bit. A description of the bits corresponding to each bit state will be described later.

프로토콜 생성기(345)는 표 1의 상태 천이를 구현하기 위하여 ASIC(Application Specific Integrated Circuit)와 같은 전용 회로를 이용할 수 있다. 예를 들어, 각각의 비트 상태들을 판단하는 복수의 판단 회로들이 직렬로 연결될 수 있고, 설정된 프로토콜에 따라 'O'로 표시된 비트 상태에 대응되는 판단 회로는 경유되고, 'X'로 표시된 비트 상태에 대응되는 판단 회로는 우회되도록 구현될 수 있다. 또한, 프로토콜 생성기(345)는 소프트 웨어 또는 펌 웨어로 구현되어, 'O'로 표시된 타겟 비트 상태들을 순차적으로 천이시켜 데이터 프레임을 결정 및 분석하도록 프로그램될 수 있다. 프로토콜 분석기(335)도 마찬가지로, 전용 회로, 소프트 웨어 또는 펌 웨어로 구현되어 데이터 프레임을 분석할 수 있다.The protocol generator 345 may use a dedicated circuit such as an Application Specific Integrated Circuit (ASIC) to implement the state transition of Table 1. For example, a plurality of determination circuits for determining each bit state may be connected in series, and a determination circuit corresponding to the bit state indicated by'O' according to the set protocol is passed, and the bit state indicated by'X' is passed through. The corresponding determination circuit may be implemented to be bypassed. In addition, the protocol generator 345 may be implemented as software or firmware, and may be programmed to determine and analyze a data frame by sequentially transitioning target bit states indicated by'O'. Similarly, the protocol analyzer 335 may be implemented as a dedicated circuit, software, or firmware to analyze the data frame.

프로토콜 생성기(345)가 송신 정보를 CAN 버스(140)에 송신할 때, 다른 트랜스미터에서 동시에 송신 정보를 CAN 버스(140)에 송신할 수 있다. 이 경우, 프로토콜 생성기(345)는 우선순위가 높은 트랜스미터에서 먼저 송신 정보를 CAN 버스에 송신하도록 중재할 수 있다. 우선순위는 송신 정보의 식별 데이터에 근거하여 결정될 수 있다. 프로토콜 생성기(345)는 추가적으로 스터프 비트를 추가할 수 있다. CAN 프로토콜에서 프로토콜 생성기(345)는 5개의 연속적인 비트 값이 나타나는 경우, 6번째 비트에 연속적인 비트 값과 반대되는 비트 값을 갖는 스터프 비트를 추가할 수 있다.When the protocol generator 345 transmits the transmission information to the CAN bus 140, another transmitter may simultaneously transmit the transmission information to the CAN bus 140. In this case, the protocol generator 345 may intervene to first transmit transmission information to the CAN bus from a transmitter having a high priority. The priority may be determined based on identification data of transmission information. The protocol generator 345 may additionally add stuff bits. In the CAN protocol, when five consecutive bit values appear, the protocol generator 345 may add a stuff bit having a bit value opposite to the consecutive bit value to the sixth bit.

CAN 프로토콜에 의한 수신 정보 또는 송신 정보는 상술된 데이터 프레임뿐만 아니라 리모트 프레임, 에러 프레임, 및 오버로드 프레임을 포함할 수 있다. 리모트 프레임은 리시버(330)가 다른 노드의 트랜스미터에 정보의 전송을 요청하기 위하여 사용될 수 있다. 에러 프레임은 수신된 정보에서 에러가 감지될 때, 다른 노드들에 감지된 에러를 알리기 위하여 사용될 수 있다. 오버로드 프레임은 리시버(330)가 정보를 수신하기 위한 준비가 완료되지 않은 경우에 사용될 수 있다. CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 각각의 데이터 프레임은 서로 다른 비트 구조를 가질 수 있으나, 리모트 프레임, 에러 프레임, 및 오버로드 프레임은 서로 동일한 비트 구조를 갖는다. 따라서, 프로토콜 생성기(345)는 데이터 프레임에 한하여 타겟 비트 상태들을 선택하여 데이터 프레임을 결정할 수 있다.Reception information or transmission information according to the CAN protocol may include a remote frame, an error frame, and an overload frame as well as the data frame described above. The remote frame may be used by the receiver 330 to request transmission of information to a transmitter of another node. The error frame may be used to inform other nodes of the detected error when an error is detected in the received information. The overload frame may be used when the receiver 330 is not ready to receive information. Each data frame of the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols may have a different bit structure, but the remote frame, error frame, and overload frame have the same bit structure. Have. Accordingly, the protocol generator 345 may determine the data frame by selecting target bit states for only the data frame.

도 4는 CAN 2.0 A 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다. 도 4를 참조하면, CAN 2.0 A 프로토콜에 대한 데이터 프레임은 시작 프레임(Start), 중재 영역, 제어 영역, 데이터 영역, CRC 영역, 확인 영역, 및 종료 프레임(End)로 구분된다. 데이터 프레임은 52 비트 이상 108 비트 이하의 길이를 가질 수 있다.4 is a diagram showing the structure of a data frame for the CAN 2.0 A protocol. Referring to FIG. 4, the data frame for the CAN 2.0 A protocol is divided into a start frame (Start), an arbitration area, a control area, a data area, a CRC area, a confirmation area, and an end frame (End). The data frame may have a length of 52 bits or more and 108 bits or less.

중재 영역은 11 비트의 식별 데이터(ID)와 1 비트의 RTR 비트를 포함할 수 있다. 식별 데이터(ID)는 데이터 프레임의 속성을 나타낼 수 있다. 식별 데이터(ID)에 근거하여 데이터 프레임의 우선순위가 결정될 수 있다. RTR 비트는 데이터 프레임과 리모트 프레임을 결정하는데 사용되며, 데이터 프레임에서 0의 비트 값을 가질 수 있다.The arbitration area may include 11 bits of identification data (ID) and 1 bit of RTR bits. The identification data (ID) may indicate a property of a data frame. The priority of the data frame may be determined based on the identification data ID. The RTR bit is used to determine the data frame and the remote frame, and may have a bit value of 0 in the data frame.

제어 영역은 1 비트의 IDE 비트, 1 비트의 예비 비트(Reserved Bit), 및 4 비트의 DLC 비트를 포함할 수 있다. IDE 비트는 11 비트의 식별 데이터(ID)를 갖는 CAN 2.0 A 프로토콜임을 나타내기 위하여 사용될 수 있으며, 0의 비트 값을 가질 수 있다. DLC 비트는 데이터 영역의 길이를 나타내기 위하여 사용될 수 있다. CAN 2.0 A 프로토콜에서 데이터 영역은 8 비트 이상 64 비트 이하의 길이를 가질 수 있다. 또한, 상술하였듯이, CAN 2.0 A 프로토콜에서 데이터 영역은 최대 1Mbps로 전송될 수 있다.The control area may include an IDE bit of 1 bit, a reserved bit of 1 bit, and a DLC bit of 4 bits. The IDE bit can be used to indicate that it is a CAN 2.0 A protocol with 11 bits of identification data (ID), and can have a bit value of 0. The DLC bit can be used to indicate the length of the data area. In the CAN 2.0 A protocol, the data area can have a length of 8 bits or more and 64 bits or less. In addition, as described above, in the CAN 2.0 A protocol, the data area can be transmitted at a maximum of 1 Mbps.

CRC 영역은 15 비트의 CRC 비트와 1 비트의 CRC 구획 비트를 포함할 수 있다. CRC 비트는 순환 중복 검사(Cyclic redundancy check)를 통하여 에러를 감지하기 위하여 사용될 수 있다. CRC 구획 비트는 CRC 영역과 확인 영역을 구분하기 위하여 제공될 수 있으며, 1의 비트 값을 가질 수 있다. 확인 영역은 1 비트의 확인 비트와 1 비트의 확인 구획 비트를 포함할 수 있다. 확인 비트는 송신 정보에서 1의 비트 값을 갖도록 설정되어, CAN 버스(140)로 제공될 수 있다. 확인 비트는 수신 정보가 에러 없이 수신되는 경우 0의 비트 값을 갖도록 설정될 수 있다. 확인 구획 비트는 확인 영역와 종료 프레임을 구분하기 위하여 제공될 수 있으며, 1의 비트 값을 가질 수 있다.The CRC area may include 15 bits of CRC bits and 1 bit of CRC partition bits. The CRC bit can be used to detect an error through a cyclic redundancy check. The CRC partition bit may be provided to distinguish between the CRC area and the check area, and may have a bit value of 1. The confirmation area may include a 1-bit confirmation bit and a 1-bit confirmation partition bit. The confirmation bit is set to have a bit value of 1 in the transmission information, and may be provided to the CAN bus 140. The confirmation bit may be set to have a bit value of 0 when received information is received without an error. The confirmation partition bit may be provided to distinguish between the confirmation region and the end frame, and may have a bit value of 1.

도 5는 CAN 2.0 B 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다. 도 5를 참조하면, CAN 2.0 B 프로토콜에 대한 데이터 프레임은 시작 프레임(Start), 중재 영역, 제어 영역, 데이터 영역, CRC 영역, 확인 영역, 및 종료 프레임(End)으로 구분된다. 데이터 프레임은 72 비트 이상 128 비트 이하의 길이를 가질 수 있다.5 is a diagram showing the structure of a data frame for the CAN 2.0 B protocol. Referring to FIG. 5, the data frame for the CAN 2.0 B protocol is divided into a start frame (Start), an arbitration area, a control area, a data area, a CRC area, a confirmation area, and an end frame (End). The data frame may have a length of 72 bits or more and 128 bits or less.

중재 영역은 11 비트의 제1 식별 데이터(ID1), 1 비트의 SRR 비트, 1 비트의 IDE 비트, 18 비트의 제2 식별 데이터(ID2), 및 1 비트의 RTR 비트를 포함할 수 있다. 제1 식별 데이터(ID1) 및 RTR 비트는 도 3의 식별 데이터(ID) 및 RTR 비트와 동일한 기능을 수행한다. SRR 비트는 및 IDE 비트는 CAN 2.0 A 프로토콜과의 구별을 위하여 제공될 수 있으며, 1의 비트 값을 가질 수 있다. 도 2의 프로토콜 생성기(345) 또는 프로토콜 분석기(335)는 SRR 비트 및 IDE 비트를 분석하여 제2 식별 데이터(ID2)의 존재를 인식할 수 있다. CAN 2.0 B 프로토콜은 제2 식별 데이터(ID2)가 제공되므로 데이터 프레임의 더욱 다양한 속성들 및 우선순위들을 나타낼 수 있다.The arbitration area may include 11 bits of first identification data ID1, 1 bit of SRR bit, 1 bit of IDE bit, 18 bits of second identification data ID2, and 1 bit of RTR bit. The first identification data ID1 and RTR bits perform the same functions as the identification data ID and RTR bits of FIG. 3. The SRR bit and the IDE bit may be provided for distinguishing from the CAN 2.0 A protocol, and may have a bit value of 1. The protocol generator 345 or the protocol analyzer 335 of FIG. 2 may recognize the existence of the second identification data ID2 by analyzing the SRR bit and the IDE bit. In the CAN 2.0 B protocol, since the second identification data (ID2) is provided, more various attributes and priorities of the data frame can be expressed.

제어 영역은 2 비트의 예비 비트(Reserved Bit), 및 4 비트의 DCL 비트를 포함할 수 있다. DLC 비트는 데이터 영역의 길이를 나타내기 위하여 사용될 수 있다. CAN 2.0 B 프로토콜에서 데이터 영역은 8 비트 이상 64 비트 이하의 길이를 가질 수 있다. 또한, 상술하였듯이, CAN 2.0 B 프로토콜에서 데이터 영역은 최대 1Mbps로 전송될 수 있다. CRC 영역은 도 4의 CAN 2.0 A 프로토콜과 같이 15 비트의 CRC 비트와 1 비트의 CRC 구획 비트를 포함할 수 있다. 확인 영역은 도 4의 CAN 2.0 A 프로토콜과 같이 1 비트의 확인 비트와 1 비트의 확인 구획 비트를 포함할 수 있다.The control region may include 2 bits of reserved bits and 4 bits of DCL bits. The DLC bit can be used to indicate the length of the data area. In the CAN 2.0 B protocol, the data area can have a length of 8 bits or more and 64 bits or less. In addition, as described above, in the CAN 2.0 B protocol, the data area can be transmitted at a maximum of 1 Mbps. The CRC area may include a 15-bit CRC bit and a 1-bit CRC partition bit like the CAN 2.0 A protocol of FIG. 4. The confirmation area may include a 1-bit confirmation bit and a 1-bit confirmation partition bit as in the CAN 2.0 A protocol of FIG. 4.

도 6은 CAN 2.0 A FD 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다. 도 6을 참조하면, CAN 2.0 A FD 프로토콜에 대한 데이터 프레임은 시작 프레임(Start), 중재 영역, 제어 영역, 데이터 영역, CRC 영역, 확인 영역, 및 종료 프레임(End)으로 구분된다. 중재 영역은 도 4의 CAN 2.0 A 프로토콜과 같이, 11 비트의 식별 데이터(ID)와 와 1 비트의 RTR 비트를 포함할 수 있다.6 is a diagram showing the structure of a data frame for CAN 2.0 A FD protocol. Referring to FIG. 6, a data frame for the CAN 2.0 A FD protocol is divided into a start frame (Start), an arbitration area, a control area, a data area, a CRC area, a confirmation area, and an end frame (End). The arbitration area may include 11 bits of identification data (ID) and 1 bit of RTR, as in the CAN 2.0 A protocol of FIG. 4.

제어 영역은 1 비트의 IDE 비트, 1 비트의 EDL 비트, 1 비트의 예비 비트(Reserved bit), 1 비트의 BRS 비트, 1 비트의 ESI 비트, 및 4 비트의 DLC 비트를 포함할 수 있다. IDE 비트는 11 비트의 식별 데이터(ID)를 갖는 CAN 2.0 A 계열의 프로토콜임을 나타내기 위하여 사용될 수 있으며, 0의 비트 값을 가질 수 있다. EDL 비트는 확장된 데이터 영역의 길이를 갖는 FD 프로토콜임을 나타내기 위하여 사용될 수 있으며, 데이터 영역이 8byte 이상의 길이를 갖는 경우 1의 비트 값을 가질 수 있다. BRS 비트는 데이터 영역의 전송시 빠른 보-레이트로 전환하기 위하여 사용될 수 있으며, 1의 비트 값을 가질 수 있다. ESI 비트는 CAN 2.0 A FD 프로토콜에서의 정보 전송시의 에러를 식별하는데 사용될 수 있다. DLC 영역은 데이터 영역의 길이를 바이트 단위로 나타내기 위하여 사용될 수 있다. CAN 2.0 A FD 프로토콜에서 데이터 영역은 8 바이트 이상 64 바이트 이하의 길이를 가질 수 있다. 상술하였듯이, CAN 2.0 A FD 프로토콜에서 데이터 영역은 최대 8Mbps로 전송될 수 있다.The control region may include 1 bit of IDE bit, 1 bit of EDL bit, 1 bit of reserved bit, 1 bit of BRS bit, 1 bit of ESI bit, and 4 bit of DLC bit. The IDE bit can be used to indicate that it is a CAN 2.0 A series protocol with 11 bits of identification data (ID), and can have a bit value of 0. The EDL bit may be used to indicate that the FD protocol has the length of the extended data area, and may have a bit value of 1 when the data area has a length of 8 bytes or more. The BRS bit may be used to switch to a fast baud rate when transmitting the data region, and may have a bit value of 1. The ESI bit can be used to identify errors when transmitting information in the CAN 2.0 A FD protocol. The DLC area may be used to indicate the length of the data area in bytes. In the CAN 2.0 A FD protocol, the data area can have a length of 8 bytes or more and 64 bytes or less. As described above, in the CAN 2.0 A FD protocol, the data area can be transmitted at a maximum of 8 Mbps.

CRC 영역은 17 또는 21 비트의 CRC 비트와 1 비트의 CRC 구획 비트를 포함할 수 있다. CAN 2.0 A 프로토콜과 비교하여 늘어난 데이터 영역의 길이에 따라, 순환 중복 검사(CRC) 계산을 위한 CRC 비트의 길이도 늘어난다. CRC 구획 비트는 CRC 영역과 확인 영역을 구분하기 위하여 제공될 수 있으며, 1의 비트 값을 가질 수 있다. 도시되지 않았으나, CRC 영역은 순환 중복 검사(CRC) 계산시 스터프 비트를 반영하기 위한 스터프 카운트(Stuff Count, SC) 비트를 더 포함할 수 있다. 확인 영역은 도 3의 CAN 2.0 A 프로토콜과 같이 1 비트의 확인 비트와 1 비트의 확인 구획 비트를 포함할 수 있다.The CRC area may include 17 or 21 bits of CRC bits and 1 bit of CRC partition bits. Compared to the CAN 2.0 A protocol, the length of the CRC bit for calculating the cyclic redundancy check (CRC) increases as the length of the data area increases. The CRC partition bit may be provided to distinguish between the CRC area and the check area, and may have a bit value of 1. Although not shown, the CRC area may further include a stuff count (SC) bit for reflecting the stuff bit when calculating the cyclic redundancy check (CRC). The confirmation area may include a 1-bit confirmation bit and a 1-bit confirmation partition bit as in the CAN 2.0 A protocol of FIG. 3.

도 7은 CAN 2.0 B FD 프로토콜에 대한 데이터 프레임의 구조를 나타내는 도면이다. 도 7을 참조하면, CAN 2.0 B FD 프로토콜에 대한 데이터 프레임은 시작 프레임(Start), 중재 영역, 제어 영역, 데이터 영역, CRC 영역, 확인 영역, 및 종료 프레임(End)으로 구분된다. 중재 영역은 도 4의 CAN 2.0 B 프로토콜과 같이, 11 비트의 제1 식별 데이터(ID1), 1 비트의 SRR 비트, 1 비트의 IDE 비트, 18 비트의 제2 식별 데이터(ID2), 및 1 비트의 RTR 비트를 포함할 수 있다.7 is a diagram showing the structure of a data frame for the CAN 2.0 B FD protocol. Referring to FIG. 7, a data frame for the CAN 2.0 B FD protocol is divided into a start frame (Start), an arbitration area, a control area, a data area, a CRC area, a confirmation area, and an end frame (End). The arbitration area is 11 bits of first identification data (ID1), 1 bit of SRR bit, 1 bit of IDE bit, 18 bits of second identification data (ID2), and 1 bit, as in the CAN 2.0 B protocol of FIG. May include the RTR bit of.

제어 영역은 1 비트의 EDL 비트, 1 비트의 예비 비트(Reserved bit), 1 비트의 BRS 비트, 1 비트의 ESI 비트, 및 4 비트의 DLC 비트를 포함할 수 있다. EDL 비트, 예비 비트, BRS 비트, ESI 비트, 및 DLC 비트의 기능은 도 6의 CAN 2.0 A FD 프로토콜에서의 EDL 비트, 예비 비트, BRS 비트, ESI 비트, 및 DLC 비트와 동일하다. CAN 2.0 B FD 프로토콜에서 데이터 영역은 8 바이트 이상 64 바이트 이하의 길이를 가질 수 있다. 상술하였듯이, CAN 2.0 B FD 프로토콜에서 데이터 영역은 최대 8Mbps로 전송될 수 있다. CRC 영역은 도 6의 CAN 2.0 A FD 프로토콜과 같이 17 또는 21 비트의 CRC 비트와 1 비트의 CRC 구획 비트를 포함할 수 있다. 확인 영역은 도 4 내지 도 6의 프로토콜과 같이 1 비트의 확인 비트와 1 비트의 확인 구획 비트를 포함할 수 있다.The control region may include 1 bit of EDL bit, 1 bit of reserved bit, 1 bit of BRS bit, 1 bit of ESI bit, and 4 bit of DLC bit. The functions of the EDL bit, spare bit, BRS bit, ESI bit, and DLC bit are the same as the EDL bit, spare bit, BRS bit, ESI bit, and DLC bit in the CAN 2.0 A FD protocol of FIG. 6. In the CAN 2.0 B FD protocol, the data area can have a length of 8 bytes or more and 64 bytes or less. As described above, in the CAN 2.0 B FD protocol, the data area can be transmitted at a maximum of 8 Mbps. Like the CAN 2.0 A FD protocol of FIG. 6, the CRC area may include a CRC bit of 17 or 21 bits and a CRC partition bit of 1 bit. The confirmation area may include a 1-bit confirmation bit and a 1-bit confirmation partition bit as in the protocol of FIGS. 4 to 6.

도 4 내지 도 7을 종합하면, CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 각각은 서로 다른 데이터 프레임의 구조를 가질 수 있다. 각각의 프로토콜에서 선택되는 비트 상태들은 서로 다를 수 있다. 다만, 표 1에서 도시되었듯이, CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들에서 선택되는 타겟 비트 상태들은 총 21개의 비트 상태들 중에 존재한다. 4 to 7, each of the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols may have different data frame structures. The bit states selected in each protocol may be different. However, as shown in Table 1, target bit states selected from the CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols exist among a total of 21 bit states.

도 2의 프로토콜 생성기(345)는 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들 중에서 하나를 설정할 수 있다. 이 경우, 프로토콜 생성기(345) 및 프로토콜 분석기(335)는 해당 프로토콜에서 선택되는 타겟 비트 상태들을 순차적으로 천이시켜 데이터 프레임을 결정 및 분석할 수 있다. 따라서, 본 발명의 CAN 컨트롤러는 CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, 및 CAN 2.0 B FD 프로토콜들을 통합 지원할 수 있다. 즉, 서로 다른 프로토콜들을 지원하기 위하여 다른 CAN 컨트롤러의 이용이 요구되지 않고, CAN 컨트롤러 내부에 지원되는 프로토콜들의 수만큼의 모듈이 요구되지 않는다.The protocol generator 345 of FIG. 2 may set one of CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols. In this case, the protocol generator 345 and the protocol analyzer 335 may determine and analyze a data frame by sequentially transitioning target bit states selected from a corresponding protocol. Therefore, the CAN controller of the present invention can support integrated CAN 2.0 A, CAN 2.0 B, CAN 2.0 A FD, and CAN 2.0 B FD protocols. That is, in order to support different protocols, the use of different CAN controllers is not required, and modules as many as the number of protocols supported inside the CAN controller are not required.

도 8은 도 2 또는 도 3의 데이터 버퍼부를 구체화한 블록도이다. 도 8을 참조하면, 데이터 버퍼부(400)는 식별 데이터 스캐너(410), 버스 로드 감지기(420), 프로세서 로드 감지기(430), 및 선입선출 메모리(440)를 포함한다. 선입선출 메모리(440)는 복수의 메모리 블록(441~44n)을 포함한다. 선입선출 메모리(440)는 도 3의 수신 선입선출 메모리(322)로 볼 수 있다. 또는, 선입선출 메모리(440)는 도 3의 송신 선입선출 메모리(324)로 볼 수 있다. 설명의 편이상, 도 3의 도면 부호를 참조하여, 도 8의 구성들이 설명된다. 또한, CAN 버스는 도 1의 CAN 버스(140)의 도면 부호를 참조하여 설명되고, 후술되는 프로세서는 도 1의 제1 프로세서(112)의 도면 부호를 참조하여 설명된다. 8 is a block diagram in which the data buffer unit of FIG. 2 or 3 is embodied. Referring to FIG. 8, the data buffer unit 400 includes an identification data scanner 410, a bus load detector 420, a processor load detector 430, and a first-in, first-out memory 440. The first-in, first-out memory 440 includes a plurality of memory blocks 441 to 44n. The first-in, first-out memory 440 can be viewed as the receive first-in, first-out memory 322 of FIG. 3. Alternatively, the first-in, first-out memory 440 may be viewed as the transmission first-in, first-out memory 324 of FIG. 3. For the convenience of explanation, with reference to the reference numerals in FIG. 3, the configurations of FIG. 8 will be described. Further, the CAN bus is described with reference to the reference numerals of the CAN bus 140 of FIG. 1, and the processor to be described later is described with reference to the reference numerals of the first processor 112 of FIG. 1.

데이터 버퍼부(400)는 인터페이스(310)로부터 송신 정보(Td)를 수신하거나, 리시버(330)로부터 수신 정보(Rd)를 수신할 수 있다. 즉, 식별 데이터 스캐너(410), 버스 로드 감지기(420), 프로세서 로드 감지기(430), 및 선입선출 메모리(440)는 하나의 구성으로 도시되었으나, 실제 데이터 버퍼부(400)는 송신 정보(Td)를 처리하는 구성과 수신 정보(Rd)를 처리하는 구성으로 분리될 수 있다. 즉, 식별 데이터 스캐너(410), 버스 로드 감지기(420), 프로세서 로드 감지기(430), 및 선입선출 메모리(440)는 각각 두 개로 구성될 수 있다. 또는, 선입선출 메모리(440)만 두 개로 구성되고, 식별 데이터 스캐너(410), 버스 로드 감지기(420), 및 프로세서 로드 감지기(430)는 하나로 구성되어 송신 정보 및 수신 정보 모두를 처리할 수 있다.The data buffer unit 400 may receive transmission information Td from the interface 310 or receive reception information Rd from the receiver 330. That is, the identification data scanner 410, the bus load detector 420, the processor load detector 430, and the first-in, first-out memory 440 are shown as one configuration, but the actual data buffer unit 400 is transmitted information (Td ) Can be separated into a configuration that processes the received information (Rd). That is, the identification data scanner 410, the bus load detector 420, the processor load detector 430, and the first-in, first-out memory 440 may each be composed of two. Alternatively, only two first-in, first-out memories 440 are configured, and the identification data scanner 410, the bus load detector 420, and the processor load detector 430 may be configured as one to process both transmission information and reception information. .

식별 데이터 스캐너(410)는 송신 정보(Td) 또는 수신 정보(Rd)를 수신한다. 식별 데이터 스캐너(410)는 송신 정보(Td) 또는 수신 정보(Rd)의 식별 데이터를 스캔한다. 상술하였듯이, 식별 데이터는 송신 정보(Td) 또는 수신 정보(Rd)의 데이터 프레임에서의 중재 영역에 존재한다. 식별 데이터 스캐너(410)는 스캔한 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 메모리 블록을 검색할 수 있다. 식별 데이터 스캐너(410)는 수신되는 송신 정보(Td) 또는 수신 정보(Rd)의 출력 지연이 예상되는 경우, 검색된 메모리 블록에 송신 정보(Td) 또는 수신 정보(Rd)를 겹쳐 쓸 수 있다.The identification data scanner 410 receives transmission information (Td) or reception information (Rd). The identification data scanner 410 scans identification data of transmission information (Td) or reception information (Rd). As described above, the identification data exists in the arbitration area in the data frame of transmission information (Td) or reception information (Rd). The identification data scanner 410 may search a memory block in which information having the same identification data as the scanned identification data is stored. The identification data scanner 410 may overwrite the transmission information Td or the reception information Rd on the retrieved memory block when an output delay of the received transmission information Td or the reception information Rd is expected.

식별 데이터 스캐너(410)는 프로세서 로드에 기초하여 송신 정보(Td)를 메모리 블록에 겹쳐 쓸 수 있다. 식별 데이터 스캐너(410)는 프로세서 로드가 기준 로드보다 큰 경우, 송신 정보(Td)를 메모리 블록에 겹쳐 쓸 수 있다. 기준 로드는 기설정된 값일 수 있다. 이 경우, 기준 로드의 값은 변하지 않을 수 있고, 기준 로드의 값은 시스템의 안정성 및 신속성을 고려하여 결정될 수 있다. 또는, 기준 로드는 프로세서 로드일 수 있다. 프로세서 로드가 버스 로드보다 큰 경우, CAN 버스로의 송신 정보(Td)의 전송이 지연될 수 있다. 따라서, 식별 데이터 스캐너(410)는 신속한 송신 정보(Td)의 전송을 위하여 메모리 블록에 송신 정보(Td)를 겹쳐 쓸 수 있다.The identification data scanner 410 may overwrite the transmission information Td on the memory block based on the processor load. When the processor load is greater than the reference load, the identification data scanner 410 may overwrite the transmission information Td in the memory block. The reference load may be a preset value. In this case, the value of the reference load may not change, and the value of the reference load may be determined in consideration of stability and speed of the system. Alternatively, the reference load may be a processor load. When the processor load is larger than the bus load, transmission of the transmission information Td to the CAN bus may be delayed. Accordingly, the identification data scanner 410 may overwrite the transmission information Td on the memory block for rapid transmission of the transmission information Td.

식별 데이터 스캐너(410)는 버스 로드에 기초하여 수신 정보(Rd)를 메모리 블록에 겹쳐 쓸 수 있다. 식별 데이터 스캐너(410)는 버스 로드가 기준 로드보다 큰 경우, 수신 정보(Rd)를 메모리 블록에 겹쳐 쓸 수 있다. 기준 로드는 기설정된 값일 수 있다. 이 경우, 기준 로드의 값은 변하지 않을 수 있고, 기준 로드의 값은 차량 시스템의 안정성 및 신속성을 고려하여 결정될 수 있다. 또는, 기준 로드는 프로세서 로드일 수 있다. 버스 로드가 프로세서 로드보다 큰 경우, 프로세서로의 수신 정보(Rd)의 전송이 지연될 수 있다. 따라서, 식별 데이터 스캐너(410)는 신속한 수신 정보(Rd)의 전송을 위하여 메모리 블록에 수신 정보(Rd)를 겹쳐 쓸 수 있다.The identification data scanner 410 may overwrite the received information Rd on the memory block based on the bus load. When the bus load is larger than the reference load, the identification data scanner 410 may overwrite the received information Rd on the memory block. The reference load may be a preset value. In this case, the value of the reference load may not change, and the value of the reference load may be determined in consideration of stability and speed of the vehicle system. Alternatively, the reference load may be a processor load. When the bus load is larger than the processor load, transmission of the reception information Rd to the processor may be delayed. Accordingly, the identification data scanner 410 may overwrite the received information Rd on the memory block for rapid transmission of the received information Rd.

버스 로드 감지기(420)는 CAN 버스(140)의 버스 로드를 감지한다. 버스 로드 감지기(420)는 CAN 버스(140)에 제공된 데이터의 양을 감지할 수 있다. 버스 로드 감지기(420)는 감지된 버스 로드에 근거하여 버스 로드 정보를 생성할 수 있다. 버스 로드 감지기(420)는 버스 로드 정보를 식별 데이터 스캐너(410)에 제공할 수 있다. 식별 데이터 스캐너(410)는 버스 로드 정보에 근거하여, 수신 정보(Rd) 또는 송신 정보(Td)의 겹쳐 쓰기 여부를 결정할 수 있다.The bus load detector 420 detects the bus load of the CAN bus 140. The bus load detector 420 may detect the amount of data provided to the CAN bus 140. The bus load detector 420 may generate bus load information based on the detected bus load. The bus load detector 420 may provide bus load information to the identification data scanner 410. The identification data scanner 410 may determine whether to overwrite the reception information Rd or the transmission information Td based on the bus load information.

프로세서 로드 감지기(430)는 프로세서 로드를 감지한다. 프로세서 로드 감지기(430)는 프로세서(112)에서 처리되는 데이터의 양을 감지할 수 있다. 프로세서 로드 감지기(430)는 감지된 프로세서 로드에 근거하여 프로세서 로드 정보를 생성할 수 있다. 프로세서 로드 감지기(430)는 프로세서 로드 정보를 식별 데이터 스캐너(410)에 제공할 수 있다. 식별 데이터 스캐너(410)는 프로세서 로드 정보에 근거하여, 송신 정보(Td) 또는 수신 정보(Rd)의 겹쳐 쓰기 여부를 결정할 수 있다.The processor load detector 430 detects the processor load. The processor load detector 430 may detect the amount of data processed by the processor 112. The processor load detector 430 may generate processor load information based on the detected processor load. The processor load detector 430 may provide processor load information to the identification data scanner 410. The identification data scanner 410 may determine whether to overwrite the transmission information Td or the reception information Rd based on the processor load information.

선입선출 메모리(440)는 시간의 흐름에 따라 제공되는 송신 정보(Td) 또는 수신 정보(Rd)를 수신된 순서대로 저장할 수 있다. 또한, 선입선출 메모리(440)는 저장된 순서대로 송신 정보(Td) 또는 수신 정보(Rd)를 출력할 수 있다. 예를 들어, 제1 메모리 블록(441)에 가장 먼저 제공된 제1 송신 정보(T1d)가 저장될 수 있고, 그 다음에 제공된 제2 송신 정보(T2d)가 제2 메모리 블록(442)에 저장될 수 있다. 이 후, 순차적으로 송신 정보는 제n 선입선출 메모리(44n)에 저장될 수 있다. 이 경우, 원칙적으로, 제1 송신 정보(T1d)와 제2 송신 정보(T2d), 그리고 제n 송신 정보(Tnd)까지는 순차적으로 트랜스미터(340)에 출력될 수 있다.The first-in, first-out memory 440 may store transmission information Td or reception information Rd provided according to the passage of time in the order in which they are received. In addition, the first-in, first-out memory 440 may output transmission information Td or reception information Rd in the stored order. For example, the first transmission information T1d provided first in the first memory block 441 may be stored, and the second transmission information T2d provided next may be stored in the second memory block 442. I can. Thereafter, the transmission information may be sequentially stored in the n-th first-in, first-out memory 44n. In this case, in principle, the first transmission information T1d, the second transmission information T2d, and the n-th transmission information Tnd may be sequentially output to the transmitter 340.

제3 메모리 블록(443)에는 제2 송신 정보(T2d) 다음에 제공된 제3 송신 정보가 저장될 수 있다. 다만, 식별 데이터 스캐너(410)는 프로세서 로드가 기준 로드(버스 로드)보다 크다고 판단하여 선입선출 메모리(440)에 송신 정보(Td)를 겹쳐 쓸 수 있다. 이 때, 제3 송신 정보와 송신 정보(Td)의 식별 데이터는 동일할 수 있다. 식별 데이터는 송신 정보의 속성을 나타낸다. 차량 시스템에서 동일한 속성을 갖는 정보 중 최신의 정보가 가장 중요할 것이므로, 송신 정보(Td)는 제3 메모리 블록(443)에 저장된다. 즉, 제3 송신 정보는 삭제된다.Third transmission information provided next to the second transmission information T2d may be stored in the third memory block 443. However, the identification data scanner 410 may determine that the processor load is greater than the reference load (bus load) and may overwrite the transmission information Td in the first-in, first-out memory 440. In this case, the identification data of the third transmission information and the transmission information Td may be the same. The identification data represents an attribute of transmission information. Since the latest information among the information having the same attribute in the vehicle system will be the most important, the transmission information Td is stored in the third memory block 443. That is, the third transmission information is deleted.

송신 정보(Td')는 제2 송신 정보(T2d)가 출력된 다음에 트랜스미터(340)로 출력된다. 즉, 송신 정보(Td)의 겹쳐 쓰기에 의하여 나중에 입력된 정보가 보다 빠르게 출력될 수 있다. 이 경우, 다음에 수신될 송신 정보들의 출력 순서는 하나씩 당겨질 수 있다. 따라서, 프로세서 로드가 큰 경우에도, 최신의 송신 정보가 CAN 버스로 빠르게 출력될 수 있다. 마찬가지로, 버스 로드가 큰 경우에도, 최신의 수신 정보가 프로세서로 빠르게 출력될 수 있다. 상술된 송신 정보(Td)의 전송 과정은 수신 정보(Rd)가 선입선출 메모리(440)에 겹쳐 쓰여지고, 출력되는 과정에도 동일하게 적용된다.The transmission information Td' is output to the transmitter 340 after the second transmission information T2d is output. That is, information input later may be output faster by overwriting the transmission information Td. In this case, the output order of transmission information to be received next can be pulled one by one. Therefore, even when the processor load is large, the latest transmission information can be quickly output to the CAN bus. Similarly, even when the bus load is large, the latest received information can be quickly output to the processor. The transmission process of the transmission information Td described above is applied to the process in which the reception information Rd is overwritten in the first-in, first-out memory 440 and outputs the same.

도 9는 본 발명의 실시예에 따른 수신 정보의 전송 방법에 대한 순서도이다. 도 9의 단계들은 도 8의 데이터 버퍼부(400)에서 수행될 수 있다. 설명의 편이상, 도 8의 도면 부호를 참조하여, 도 8의 단계들이 설명된다. 9 is a flowchart for a method of transmitting received information according to an embodiment of the present invention. The steps of FIG. 9 may be performed in the data buffer unit 400 of FIG. 8. For the convenience of explanation, with reference to the reference numerals in FIG. 8, the steps in FIG. 8 are described.

S110 단계에서, 데이터 버퍼부(400)는 버스 로드 및 프로세서 로드를 감지한다. 버스 로드는 버스 로드 감지기(420)에서 감지될 수 있다. 프로세서 로드는 프로세서 로드 감지기(430)에서 감지될 수 있다.In step S110, the data buffer unit 400 detects a bus load and a processor load. The bus load may be detected by the bus load detector 420. The processor load may be detected by the processor load detector 430.

S120 단계에서, 데이터 버퍼부(400)는 감지된 버스 로드와 프로세서 로드를 비교한다. 식별 데이터 스캐너(410)는 버스 로드 감지기(420)로부터 버스 로드 정보를 수신하고, 프로세서 로드 감지기(430)로부터 프로세서 로드 정보를 수신할 수 있다. 식별 데이터 스캐너(410)는 버스 로드 정보와 프로세서 로드 정보를 비교하여 더 큰 값을 갖는 로드 정보를 판단할 수 있다. 버스 로드가 프로세서 로드보다 큰 경우, S130 단계가 진행된다. 버스 로드가 프로세서 로드보다 크지 않은 경우, S150 단계가 진행된다. 이와 달리, 도 8에서 언급한 바와 같이, 식별 데이터 스캐너(410)는 버스 로드와 기설정된 기준 로드를 비교할 수 있다.In step S120, the data buffer unit 400 compares the sensed bus load and the processor load. The identification data scanner 410 may receive bus load information from the bus load detector 420 and may receive processor load information from the processor load detector 430. The identification data scanner 410 may determine load information having a larger value by comparing the bus load information and the processor load information. If the bus load is larger than the processor load, step S130 proceeds. If the bus load is not larger than the processor load, step S150 proceeds. Alternatively, as mentioned in FIG. 8, the identification data scanner 410 may compare a bus load and a preset reference load.

S130 단계에서, 데이터 버퍼부(400)는 동일한 식별 데이터를 갖는 수신 정보가 이미 저장되어 있는지 여부를 판단한다. 식별 데이터 스캐너(410)는 수신 정보(Rd)의 데이터 프레임을 분석하여, 식별 데이터를 추출할 수 있다. 식별 데이터 스캐너(410)는 선입선출 메모리(440)의 메모리 블록들 중 수신 정보(Rd)와 동일한 식별 데이터를 갖는 수신 정보를 검색할 수 있다. 수신 정보(Rd)와 동일한 식별 데이터를 갖는 수신 정보가 특정 메모리 블록에 저장되어 있는 경우, S140 단계가 진행된다. 수신 정보(Rd)와 동일한 식별 데이터를 갖는 수신 정보가 선입선출 메모리(440)의 모든 메모리 블록들에 저장되어 있지 않은 경우, S150 단계가 진행된다.In step S130, the data buffer unit 400 determines whether reception information having the same identification data is already stored. The identification data scanner 410 may extract identification data by analyzing a data frame of the received information Rd. The identification data scanner 410 may search for reception information having the same identification data as the reception information Rd among memory blocks of the first-in, first-out memory 440. If reception information having the same identification data as the reception information Rd is stored in a specific memory block, step S140 is performed. If the reception information having the same identification data as the reception information Rd is not stored in all memory blocks of the first-in, first-out memory 440, step S150 proceeds.

S140 단계에서, 데이터 버퍼부(400)는 동일한 식별 데이터를 갖는 수신 정보가 저장된 메모리 블록에 수신 정보(Rd)를 겹쳐 쓴다. 이에 따라, 이전에 저장된 수신 정보는 삭제되고, 새롭게 제공된 수신 정보(Rd)가 메모리 블록에 저장된다. S150 단계에서, 선입선출 메모리(440)는 수신 정보(Rd)를 저장한다. S150 단계는 버스 로드가 여유 있는 경우이므로, 선입선출 방식으로 충분히 프로세서로 모든 수신 정보들이 전달될 수 있다. 따라서, 수신 정보(Rd)는 비어있는 메모리 블록에 저장된다. S140 단계 또는 S150 단계가 진행된 후에 S160 단계가 진행된다.In step S140, the data buffer unit 400 overwrites the reception information Rd on a memory block in which reception information having the same identification data is stored. Accordingly, previously stored reception information is deleted, and newly provided reception information Rd is stored in the memory block. In step S150, the first-in, first-out memory 440 stores the reception information Rd. In step S150, since the bus load is sufficient, all received information may be sufficiently transmitted to the processor in a first-in, first-out manner. Accordingly, the received information Rd is stored in an empty memory block. After step S140 or step S150 proceeds, step S160 proceeds.

S160 단계에서, 데이터 버퍼부(400)는 저장된 수신 정보(Rd)를 인터페이스(310)에 제공한다. 선입선출 메모리(440)는 저장된 정보의 출력 순위에 따라 수신 정보(Rd)를 인터페이스(310)로 출력한다. S140 단계에서, 수신 정보(Rd)가 겹쳐 쓰여진 경우, 수신 정보(Rd)는 삭제된 수신 정보의 출력 순위에 따라 인터페이스(310)로 출력된다. S150 단계에서, 수신 정보(Rd)가 비어있는 메모리 블록에 저장된 경우, 수신 정보(Rd)는 이전에 저장된 수신 정보들 모두 출력된 후에 인터페이스(310)로 출력될 수 있다. 단, 이후에 데이터 버퍼부(400)에 제공된 수신 정보가 이전 순위의 수신 정보에 겹쳐 쓰여진 경우, 이후에 겹쳐 쓰여진 수신 정보는 수신 정보(Rd)보다 먼저 인터페이스(310)로 출력될 수 있다.In step S160, the data buffer unit 400 provides the stored reception information Rd to the interface 310. The first-in, first-out memory 440 outputs the received information Rd to the interface 310 according to an output order of stored information. In step S140, when the reception information Rd is overwritten, the reception information Rd is output to the interface 310 according to the output order of the deleted reception information. In step S150, when the reception information Rd is stored in an empty memory block, the reception information Rd may be output to the interface 310 after all previously stored reception information is output. However, when the reception information provided to the data buffer unit 400 is overwritten on the reception information of the previous priority, the reception information overwritten afterwards may be output to the interface 310 before the reception information Rd.

도 10은 본 발명의 실시예에 따른 송신 정보의 전송 방법에 대한 순서도이다. 도 10의 단계들은 도 8의 데이터 버퍼부(400)에서 수행될 수 있다. 설명의 편이상, 도 8의 도면 부호를 참조하여, 도 10의 단계들이 설명된다. S210 단계에서, 데이터 버퍼부(400)는 버스 로드 및 프로세서 로드를 감지한다. 버스 로드는 버스 로드 감지기(420)에서 감지될 수 있다. 프로세서 로드는 프로세서 로드 감지기(430)에서 감지될 수 있다.10 is a flowchart of a method of transmitting transmission information according to an embodiment of the present invention. The steps of FIG. 10 may be performed in the data buffer unit 400 of FIG. 8. For the convenience of explanation, with reference to the reference numerals in FIG. 8, the steps in FIG. 10 are described. In step S210, the data buffer unit 400 detects a bus load and a processor load. The bus load may be detected by the bus load detector 420. The processor load may be detected by the processor load detector 430.

S220 단계에서, 데이터 버퍼부(400)는 감지된 버스 로드와 프로세서 로드를 비교한다. 식별 데이터 스캐너(410)는 버스 로드 감지기(420)로부터 버스 로드 정보를 수신하고, 프로세서 로드 감지기(430)로부터 프로세서 로드 정보를 수신할 수 있다. 식별 데이터 스캐너(410)는 버스 로드 정보와 프로세서 로드 정보를 비교하여 더 큰 값을 갖는 로드 정보를 판단할 수 있다. 버스 로드가 프로세서 로드보다 작은 경우, S230 단계가 진행된다. 버스 로드가 프로세서 로드보다 작지 않은 경우, S250 단계가 진행된다. 이와 달리, 도 8에서 언급한 바와 같이, 식별 데이터 스캐너(410)는 프로세서 로드 정보와 기설정된 기준 로드를 비교할 수 있다.In step S220, the data buffer unit 400 compares the sensed bus load and the processor load. The identification data scanner 410 may receive bus load information from the bus load detector 420 and may receive processor load information from the processor load detector 430. The identification data scanner 410 may determine load information having a larger value by comparing the bus load information and the processor load information. If the bus load is smaller than the processor load, step S230 proceeds. If the bus load is not smaller than the processor load, step S250 proceeds. Alternatively, as mentioned in FIG. 8, the identification data scanner 410 may compare processor load information and a preset reference load.

S230 단계에서, 데이터 버퍼부(400)는 동일한 식별 데이터를 갖는 송신 정보가 이미 저장되어 있는지 여부를 판단한다. 식별 데이터 스캐너(410)는 수신 정보(Td)의 데이터 프레임을 분석하여, 식별 데이터를 추출할 수 있다. 식별 데이터 스캐너(410)는 선입선출 메모리(440)의 메모리 블록들 중 송신 정보(Td)와 동일한 식별 데이터를 갖는 송신 정보를 검색할 수 있다. 송신 정보(Td)와 동일한 식별 데이터를 갖는 송신 정보가 특정 메모리 블록에 저장되어 있는 경우, S240 단계가 진행된다. 송신 정보(Td)와 동일한 식별 데이터를 갖는 송신 정보가 선입선출 메모리(440)의 모든 메모리 블록들에 저장되어 있지 않은 경우, S250 단계가 진행된다.In step S230, the data buffer unit 400 determines whether transmission information having the same identification data is already stored. The identification data scanner 410 may extract identification data by analyzing a data frame of the received information Td. The identification data scanner 410 may search for transmission information having the same identification data as the transmission information Td among memory blocks of the first-in, first-out memory 440. When transmission information having the same identification data as the transmission information Td is stored in a specific memory block, step S240 proceeds. If the transmission information having the same identification data as the transmission information Td is not stored in all memory blocks of the first-in, first-out memory 440, step S250 proceeds.

S240 단계에서, 데이터 버퍼부(400)는 동일한 식별 데이터를 갖는 송신 정보가 저장된 메모리 블록에 송신 정보(Td)를 겹쳐 쓴다. 이에 따라, 이전에 저장된 송신 정보는 삭제되고, 새롭게 제공된 송신 정보(Td)가 메모리 블록에 저장된다. S250 단계에서, 선입선출 메모리(440)는 송신 정보(Td)를 저장한다. S250 단계는 프로세서 로드가 여유 있는 경우이므로, 선입선출 방식으로 충분히 CAN 버스(140)로 모든 송신 정보들이 전달될 수 있다. 따라서, 송신 정보(Td)는 비어있는 메모리 블록에 저장된다. S240 단계 또는 S250 단계가 진행된 후에 S260 단계가 진행된다.In step S240, the data buffer unit 400 overwrites the transmission information Td on a memory block in which transmission information having the same identification data is stored. Accordingly, previously stored transmission information is deleted, and newly provided transmission information Td is stored in the memory block. In step S250, the first-in, first-out memory 440 stores transmission information Td. In step S250, since the processor load is sufficient, all transmission information may be sufficiently transmitted to the CAN bus 140 in a first-in, first-out manner. Accordingly, the transmission information Td is stored in an empty memory block. After step S240 or step S250 is performed, step S260 is performed.

S260 단계에서, 데이터 버퍼부(400)는 저장된 송신 정보(Td)를 트랜스미터(340)에 제공한다. 선입선출 메모리(440)는 저장된 정보의 출력 순위에 따라 송신 정보(Td)를 트랜스미터(340)로 출력한다. S240 단계에서, 송신 정보(Td)가 겹쳐 쓰여진 경우, 송신 정보(Td)는 삭제된 송신 정보의 출력 순위에 따라 트랜스미터(340)로 출력된다. S250 단계에서, 송신 정보(Td)가 비어있는 메모리 블록에 저장된 경우, 송신 정보(Td)는 이전에 저장된 송신 정보들 모두 출력된 후에 트랜스미터(340)로 출력될 수 있다. 단, 이후에 데이터 버퍼부(400)에 제공된 송신 정보가 이전 순위의 송신 정보에 겹쳐 쓰여진 경우, 이후에 겹쳐 쓰여진 송신 정보는 송신 정보(Td)보다 먼저 트랜스미터(340)로 출력될 수 있다.In step S260, the data buffer unit 400 provides the stored transmission information Td to the transmitter 340. The first-in, first-out memory 440 outputs the transmission information Td to the transmitter 340 according to the output order of the stored information. In step S240, when the transmission information Td is overwritten, the transmission information Td is output to the transmitter 340 according to the output order of the deleted transmission information. In step S250, when the transmission information Td is stored in an empty memory block, the transmission information Td may be output to the transmitter 340 after all previously stored transmission information is output. However, when the transmission information provided to the data buffer unit 400 is overwritten on the transmission information of the previous priority, the transmission information overwritten afterwards may be output to the transmitter 340 before the transmission information Td.

위에서 설명한 내용은 본 발명을 실시하기 위한 구체적인 예들이다. 본 발명에는 위에서 설명한 실시 예들뿐만 아니라, 단순하게 설계 변경하거나 용이하게 변경할 수 있는 실시 예들도 포함될 것이다. 또한, 본 발명에는 상술한 실시 예들을 이용하여 앞으로 용이하게 변형하여 실시할 수 있는 기술들도 포함될 것이다.The contents described above are specific examples for carrying out the present invention. The present invention will include not only the embodiments described above, but also embodiments that can be changed in design or easily changed. In addition, the present invention will also include techniques that can be easily modified and implemented in the future using the above-described embodiments.

100: CAN 시스템 200: CAN 컨트롤러
220, 300: 프로토콜 엔진 221, 310: 인터페이스
222, 320, 400: 데이터 버퍼부 330: 리시버
335: 프로토콜 분석기 340: 트랜스미터
345: 프로토콜 생성기 410: 식별 데이터 스캐너
440: 선입선출 메모리
100: CAN system 200: CAN controller
220, 300: protocol engine 221, 310: interface
222, 320, 400: data buffer unit 330: receiver
335: protocol analyzer 340: transmitter
345: protocol generator 410: identification data scanner
440: first in, first out memory

Claims (18)

설정된 프로토콜에 따라 CAN 버스로부터 수신된 수신 정보를 분석하는 리시버;
이전에 저장된 수신 정보를 출력하기 전에 상기 수신 정보의 식별 데이터 및 상기 CAN 버스의 버스 로드에 기초하여 이전에 저장된 수신 정보에 겹쳐 쓰여지도록 상기 수신 정보를 저장하는 수신 선입선출 메모리;
상기 수신 선입선출 메모리에 저장된 수신 정보를 프로세서에 제공하거나, 상기 프로세서로부터 송신 정보를 제공 받는 인터페이스;
이전에 저장된 수신 정보를 출력하기 전에 상기 송신 정보의 식별 데이터 및 상기 프로세서의 프로세서 로드에 기초하여 이전에 저장된 송신 정보에 겹쳐 쓰여지도록 상기 송신 정보를 저장하는 송신 선입선출 메모리; 및
상기 프로토콜을 설정하고, 상기 프로토콜에 따라 상기 송신 선입선출 메모리에 저장된 송신 정보를 상기 CAN 버스로 송신하는 트랜스미터를 포함하는 CAN 컨트롤러.
A receiver for analyzing received information received from the CAN bus according to the set protocol;
A reception first-in, first-out memory for storing the reception information to be overwritten with previously stored reception information based on the identification data of the reception information and a bus load of the CAN bus before outputting the previously stored reception information;
An interface for providing reception information stored in the reception first-in, first-out memory to a processor or for receiving transmission information from the processor;
A transmission first-in, first-out memory for storing the transmission information so as to overwrite previously stored transmission information based on identification data of the transmission information and a processor load of the processor before outputting previously stored reception information; And
And a transmitter configured to set the protocol and transmit transmission information stored in the transmission first-in, first-out memory to the CAN bus according to the protocol.
제1 항에 있어서,
상기 트랜스미터는,
복수의 비트 상태들 중 상기 프로토콜에 대응되는 데이터 프레임의 타겟 비트 상태들을 선택하여 상기 프로토콜을 설정하는 프로토콜 생성기를 포함하는 CAN 컨트롤러.
The method of claim 1,
The transmitter,
A CAN controller comprising a protocol generator configured to set the protocol by selecting target bit states of a data frame corresponding to the protocol from among a plurality of bit states.
제2 항에 있어서,
상기 프로토콜 생성기는,
각각의 상기 타겟 비트 상태들을 순차적으로 천이시켜 상기 송신 정보의 데이터 프레임을 결정하는 CAN 컨트롤러.
The method of claim 2,
The protocol generator,
A CAN controller that sequentially transitions each of the target bit states to determine a data frame of the transmission information.
제2 항에 있어서,
상기 프로토콜 생성기는,
CAN 2.0 A 프로토콜, CAN 2.0 B 프로토콜, CAN 2.0 A FD 프로토콜, 및 CAN 2.0 B FD 프로토콜 중 하나를 선택하고, 상기 선택된 프로토콜에 기초하여 상기 타겟 비트 상태들을 선별하는 CAN 컨트롤러.
The method of claim 2,
The protocol generator,
A CAN controller that selects one of a CAN 2.0 A protocol, a CAN 2.0 B protocol, a CAN 2.0 A FD protocol, and a CAN 2.0 B FD protocol, and selects the target bit states based on the selected protocol.
제2 항에 있어서,
상기 리시버는,
상기 타겟 비트 상태들을 순차적으로 천이시켜 상기 수신 정보를 분석하는 프로토콜 분석기를 포함하는 CAN 컨트롤러.
The method of claim 2,
The receiver,
CAN controller including a protocol analyzer for sequentially transitioning the target bit states to analyze the received information.
제1 항에 있어서,
상기 리시버는,
상기 수신 정보의 식별 데이터에 근거하여 상기 수신 선입선출 메모리에 상기 수신 정보의 제공여부를 결정하는 마스킹 필터 레지스터;
상기 설정된 프로토콜에 따라 상기 수신 정보의 데이터 프레임의 보-레이트를 조절하는 보-레이트 조절기; 및
상기 수신 정보의 에러를 감지하여 상기 수신 선입선출 메모리에 상기 수신 정보의 제공여부를 결정하는 에러 감지기를 포함하는 CAN 컨트롤러.
The method of claim 1,
The receiver,
A masking filter register that determines whether to provide the reception information to the reception first-in, first-out memory based on the identification data of the reception information;
A baud rate adjuster for adjusting a baud rate of the data frame of the received information according to the set protocol; And
A CAN controller comprising an error detector configured to detect an error in the received information and determine whether to provide the received information to the received first-in, first-out memory.
제1 항에 있어서,
상기 버스 로드가 상기 프로세서 로드보다 높은 경우, 상기 수신 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 상기 수신 선입선출 메모리의 메모리 블록에 상기 수신 정보를 겹쳐 쓰는 식별 데이터 스캐너를 더 포함하는 CAN 컨트롤러.
The method of claim 1,
When the bus load is higher than the processor load, the CAN controller further comprises an identification data scanner that overwrites the reception information on a memory block of the reception first-in, first-out memory in which information having the same identification data as the identification data of the reception information is stored. .
제7 항에 있어서,
상기 버스 로드를 감지하여, 버스 로드 정보를 상기 식별 데이터 스캐너에 제공하는 버스 로드 감지기; 및
상기 프로세서 로드를 감지하여, 프로세서 로드 정보를 상기 식별 데이터 스캐너에 제공하는 프로세서 로드 감지기를 더 포함하는 CAN 컨트롤러.
The method of claim 7,
A bus load detector that detects the bus load and provides bus load information to the identification data scanner; And
CAN controller further comprising a processor load detector for detecting the processor load and providing processor load information to the identification data scanner.
제1 항에 있어서,
상기 프로세서 로드가 상기 버스 로드보다 높은 경우, 상기 송신 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 상기 송신 선입선출 메모리의 메모리 블록에 상기 송신 정보를 겹쳐 쓰는 식별 데이터 스캐너를 더 포함하는 CAN 컨트롤러.
The method of claim 1,
When the processor load is higher than the bus load, the CAN controller further comprises an identification data scanner that overwrites the transmission information on a memory block of the transmission first-in, first-out memory in which information having the same identification data as the identification data of the transmission information is stored. .
CAN 컨트롤러가 데이터 정보를 수신하는 단계;
상기 CAN 컨트롤러가 수신이 예정되는 데이터 정보의 양을 감지하는 단계;
상기 CAN 컨트롤러가 상기 데이터 정보의 식별 데이터와 동일한 식별 데이터를 갖는 정보가 저장된 선입선출 메모리의 메모리 블록을 검색하는 단계; 및
이전에 저장된 수신 정보 또는 송신 정보를 출력하기 전에 상기 CAN 컨트롤러가 상기 수신이 예정되는 데이터 정보의 양에 기초하여 상기 메모리 블록에 상기 데이터 정보를 겹쳐 쓰는 단계를 포함하는 CAN 컨트롤러의 데이터 전송 방법.
Receiving, by the CAN controller, data information;
Sensing, by the CAN controller, an amount of data information to be received;
Searching, by the CAN controller, a memory block of a first-in, first-out memory storing information having the same identification data as the identification data of the data information; And
And overwriting, by the CAN controller, the data information on the memory block based on the amount of data information to be received, before outputting previously stored reception information or transmission information.
제10 항에 있어서,
상기 데이터 정보는 프로세서로부터 제공되는 송신 정보이고,
상기 데이터 정보의 양을 감지하는 단계는,
상기 CAN 컨트롤러가 상기 프로세서의 프로세서 로드를 감지하는 단계를 포함하는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 10,
The data information is transmission information provided from a processor,
The step of detecting the amount of data information,
The CAN controller data transmission method comprising the step of detecting the processor load of the processor.
제11 항에 있어서,
상기 CAN 컨트롤러가 상기 선입선출 메모리에 저장된 정보를 순차적으로 CAN 버스에 출력하는 단계를 더 포함하는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 11,
The CAN controller data transmission method further comprising the step of sequentially outputting the information stored in the first-in, first-out memory to the CAN bus.
제11 항에 있어서,
상기 데이터 정보의 양을 감지하는 단계는,
상기 CAN 컨트롤러가 상기 프로세서 로드와 CAN 버스의 버스 로드를 비교하는 단계를 더 포함하고,
상기 데이터 정보를 겹쳐 쓰는 단계에서, 상기 프로세서 로드가 상기 버스 로드보다 큰 경우 상기 송신 정보를 겹쳐 쓰는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 11,
The step of detecting the amount of data information,
The CAN controller further comprises comparing the processor load and the bus load of the CAN bus,
In the step of overwriting the data information, when the processor load is larger than the bus load, the transmission information is overwritten by a CAN controller.
제11 항에 있어서,
상기 데이터 정보를 겹쳐 쓰는 단계에서, 상기 프로세서의 로드가 설정된 기준 로드 값보다 큰 경우 상기 송신 정보를 겹쳐 쓰는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 11,
In the step of overwriting the data information, when the load of the processor is greater than a set reference load value, the data transmission method of the CAN controller overwrites the transmission information.
제10 항에 있어서,
상기 데이터 정보는 CAN 버스로부터 제공되는 수신 정보이고,
상기 데이터 정보의 양을 감지하는 단계는,
상기 CAN 컨트롤러가 상기 CAN 버스의 버스 로드를 감지하는 단계를 포함하는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 10,
The data information is reception information provided from the CAN bus,
The step of detecting the amount of data information,
The CAN controller data transmission method comprising the step of detecting the bus load of the CAN bus.
제15 항에 있어서,
상기 CAN 컨트롤러가 상기 선입선출 메모리에 저장된 정보를 순차적으로 프로세서에 출력하는 단계를 더 포함하는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 15,
The CAN controller data transmission method further comprising the step of sequentially outputting the information stored in the first-in, first-out memory to the processor.
제15 항에 있어서,
상기 데이터 정보의 양을 감지하는 단계는,
상기 CAN 컨트롤러가 프로세서의 로드와 상기 버스 로드를 비교하는 단계를 더 포함하고,
상기 데이터 정보를 겹쳐 쓰는 단계에서, 상기 버스 로드가 상기 프로세서 로드보다 큰 경우 상기 수신 정보를 겹쳐 쓰는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 15,
The step of detecting the amount of data information,
The CAN controller further comprises comparing the load of the processor and the load of the bus,
In the step of overwriting the data information, when the bus load is larger than the processor load, the data transmission method of the CAN controller overwrites the received information.
제15 항에 있어서,
상기 데이터 정보를 겹쳐 쓰는 단계에서, 상기 버스 로드가 설정된 기준 로드 값보다 큰 경우 상기 수신 정보를 겹쳐 쓰는 CAN 컨트롤러의 데이터 전송 방법.
The method of claim 15,
In the step of overwriting the data information, when the bus load is greater than a set reference load value, the data transmission method of the CAN controller overwrites the received information.
KR1020170128073A 2016-12-05 2017-09-29 Can controller and method for transmission of data using the same KR102204954B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/823,104 US10491418B2 (en) 2016-12-05 2017-11-27 Can controller and data transmission method using the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160164677 2016-12-05
KR20160164677 2016-12-05

Publications (2)

Publication Number Publication Date
KR20180064274A KR20180064274A (en) 2018-06-14
KR102204954B1 true KR102204954B1 (en) 2021-01-20

Family

ID=62629459

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170128073A KR102204954B1 (en) 2016-12-05 2017-09-29 Can controller and method for transmission of data using the same

Country Status (1)

Country Link
KR (1) KR102204954B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102274671B1 (en) * 2019-12-06 2021-07-08 현대오트론 주식회사 Apparatus and method for setting baud rate of electronic control unit based on can communication
CN115902387B (en) * 2023-02-15 2023-06-06 北京志翔科技股份有限公司 Test fixture and test method of load identification module

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110007759A1 (en) * 2009-04-23 2011-01-13 Microchip Technology Incorporated Method for CAN Concatenating CAN Data Payloads

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110007759A1 (en) * 2009-04-23 2011-01-13 Microchip Technology Incorporated Method for CAN Concatenating CAN Data Payloads

Also Published As

Publication number Publication date
KR20180064274A (en) 2018-06-14

Similar Documents

Publication Publication Date Title
US10491418B2 (en) Can controller and data transmission method using the same
US11943233B2 (en) Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
US10713106B2 (en) Communication device, communication method and non-transitory storage medium
KR101936450B1 (en) Method and device for serial data transmission which is adapted to memory sizes
US9361178B2 (en) Method and device for improving the data transmission security in a serial data transmission having flexible message size
KR102011528B1 (en) Method and device for serial data transmission having a flexible message size and a variable bit length
JP4926648B2 (en) In-vehicle gateway device
KR102007547B1 (en) Method and device for serial data transmission having a flexible message size and a variable bit length
JP2006333438A (en) Gateway apparatus and routing method
CN106598018B (en) Controller Area Network (CAN) device and method for operating the same
US20170324675A1 (en) Communication system and communication device
US20230048058A1 (en) Anomaly determination method, anomaly determination device, and recording medium
US11016925B2 (en) Protocol-tolerant communications in controller area networks
JP2008113097A (en) Gateway device and transfer control method
US20160173397A1 (en) Communication control device, method of communicating a frame, and storage medium
US7428608B2 (en) Communication system, communication circuit and communication method
KR102204954B1 (en) Can controller and method for transmission of data using the same
CN108632242B (en) Communication device and receiving device
US20160147702A1 (en) Communication control device, method of communicating a frame, and storage medium
US8989203B2 (en) Electronic device, communication control method, and recording medium
US20210001793A1 (en) Anomaly handling method and anomaly handling device
US7724775B2 (en) Data transmission circuit and method for controlling the data transmission circuit
KR20140058517A (en) Method and device for serial data transmission having a flexible message size and a variable bit length

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant