Transmitting device, transmitting method, and mobile body
The transmitting and receiving devices efficiently generate and process packets with data from multiple applications by minimizing copy operations, addressing CPU load and latency issues in packet switching.
Patent Information
- Application Number
- JP2022565321
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-24
- Filing Date
- 2021-11-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-11-22
AI Technical Summary
Existing technologies face challenges in reducing the CPU load associated with copying data from multiple applications into a single packet and recombining data from multiple applications in packet switching methods, leading to increased latency and processing delays.
A transmitting device and method that includes a first writing unit to read and write data from a transmission buffer to a memory area, and a packet generation unit to create packets with data from multiple applications, while a receiving device manages buffers and processes data to minimize copying operations.
The solution enables high-speed generation and processing of packets containing data from multiple applications with different time constraints, reducing latency and CPU load by minimizing the number of copy operations.
Smart Images

Figure 0007584018000001 
Figure 0007584018000002 
Figure 0007584018000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a transmitting device, a receiving device, a transmitting method, a receiving method, and a mobile object. [Background technology]
[0002] In packet switching, a series of data is divided into packets and transmitted from a transmitting device to a receiving device. The network interface cards (NICs) that transmitting and receiving devices have often implemented a FIFO buffer called a ring buffer that holds structures called descriptors in a ring shape. A descriptor is information that describes a pointer to the memory area where the packet is stored and the packet size. When a packet is received, the packet is written from the NIC to the memory area specified by the descriptor using Direct Memory Access (DMA). When a packet is transmitted, the packet in the memory area specified by the descriptor is transferred from memory to the NIC using DMA, and the packet is transmitted from the NIC.
[0003] When an application sends or receives data, packetization or recomposition is usually performed within the kernel of the operating system (OS). Packetization is performed by copying a portion of a series of data (for example, a datagram segment) to a memory area specified by a descriptor. Recomposition is also performed by copying received packets to a continuous memory area so that the application can handle it as a series of data. Since this copying process generally places a high load on the CPU, a technology has been proposed that eliminates the copying process by the CPU by directly operating the memory area specified by the descriptor from the application, thereby achieving low latency and high speed.
[0004] However, when data from multiple applications is combined into one packet, or when data from multiple applications included in one packet is recombined for each application, it is not easy to reduce the amount of copying. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] Rizzo, Luigi. "Netmap: a novel framework for fast packet I / O." In 21st USENIX Security Symposium (USENIX Security 12), pp. 101-112. 2012.Harvard Summary of the Invention [Problem to be solved by the invention]
[0006] The present disclosure provides a transmitting device, a receiving device, a transmitting method, a receiving method, and a mobile object that reduce the load of a transmitting process or a receiving process when data of a plurality of applications is transmitted or received in a single packet. [Means for solving the problem]
[0007] The transmitting device of the present disclosure includes a first writing unit that reads first data related to a first application from a transmission buffer that stores the first data, and writes the read first data to a first memory area, and a packet generating unit that, when a request to transmit second data related to a second application occurs after the first data has been written to the first memory area, reads the first data in the first memory area and generates a packet including the first data and the second data.
[0008] The moving body of the present disclosure includes a first sensor that detects the first data, a second sensor that detects the second data, and the transmitting device.
[0009] The receiving device of the present disclosure includes a buffer management unit that allocates a first buffer to a packet when a packet including first data and second data is received, a packet processing unit that writes the first data and the second data included in the packet to the first buffer, a first reading unit that reads the first data from the first buffer and outputs the first data to a first application, a writing unit that reads the second data from the first buffer after the first data is read from the first buffer and writes the second data to a receiving buffer, and a second reading unit that reads the second data from the receiving buffer and outputs the second data to a second application.
[0010] A receiving device of the present disclosure includes a buffer management unit that, when a packet including first data and second data is received, allocates a first buffer to the first data and a second buffer to the second data, a packet processing unit that writes the first data to the first buffer and writes the second data to the second buffer, a first reading unit that reads the first data from the first buffer and outputs the first data to a first application, a writing unit that reads the second data from the second buffer and writes the second data to a receiving buffer, and a second reading unit that reads the second data from the receiving buffer and outputs the second data to a second application.
[0011] The transmission method disclosed herein reads first data from a transmission buffer that stores first data related to a first application, writes the read first data to a first memory area, and when a request to transmit second data related to a second application occurs after the first data has been written to the first memory area, reads the first data in the first memory area, generates a packet including the first data and the second data, and transmits the packet. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram of a communication system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram of a transmission device according to the embodiment. [Diagram 3] FIG. 2 is a block diagram of a receiving device according to the embodiment. [Figure 4] FIG. 4 is a detailed block diagram of a transmission processing unit in the transmission device according to the embodiment. [Diagram 5] FIG. 4 is a diagram showing an example of the configuration of a packet buffer. [Figure 6] FIG. 4 is a diagram showing an example of an operation for generating a packet in the first embodiment. [Figure 7] 5 is a flowchart showing an example of an operation of the transmission device according to the first embodiment. [Figure 8] FIG. 11 is a detailed block diagram of a transmission processing unit in a transmission device according to a second embodiment. [Figure 9] FIG. 13 is a diagram showing a schematic diagram of a buffer state indicated by two descriptors. [Figure 10] FIG. 4 is a diagram showing an example of an operation for generating a packet in the first embodiment. [Figure 11] 10 is a flowchart showing an example of an operation of a transmitting device according to a second embodiment. [Figure 12] FIG. 13 is a diagram showing another example of the configuration of a transmission processing unit in the transmission device according to the third embodiment. [Figure 13] FIG. 13 is a diagram showing a schematic diagram of a buffer state indicated by two descriptors. [Figure 14] FIG. 13 is a diagram showing an example of an operation for generating a packet in the third embodiment. [Figure 15] 13 is a flowchart showing an example of an operation of a transmission device according to a third embodiment. [Figure 16] FIG. 13 is a detailed block diagram of a reception processing unit in a receiving device according to a fourth embodiment. [Figure 17] FIG. 2 is a diagram illustrating a buffer indicated by a descriptor. [Figure 18] FIG. 13 is a diagram showing an example of an operation of receiving a packet in the fourth embodiment. [Figure 19]13 is a flowchart showing an example of an operation of a receiving device according to the fourth embodiment. [Figure 20] FIG. 13 is a detailed block diagram of a reception processing unit in a receiving device according to a fifth embodiment. [Figure 21] FIG. 13 is a diagram showing a schematic diagram of a buffer state indicated by two descriptors. [Figure 22] 13 is a flowchart showing an example of the operation of a receiving device according to the fifth embodiment. [Figure 23] FIG. 2 is a block diagram of an example of the hardware configuration of each device in the embodiment described above. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment of the present disclosure will be described with reference to the drawings. The drawings are merely illustrative of an embodiment of the present disclosure, and the embodiment of the present disclosure is not limited to the form disclosed in the drawings. The same elements in multiple drawings are given the same reference numerals, and descriptions of elements that have already been described will be omitted as appropriate.
[0014] (First embodiment) Fig. 1 is a block diagram of a communication system according to the present embodiment. The communication system in Fig. 1 includes a plurality of moving objects M each equipped with a transmission device 10, and a reception device 20. The transmission device 10 and the reception device 20 correspond to an example of a communication device or a wireless communication device according to the present embodiment.
[0015] The moving body M is any moving body, such as an automobile, a robot, a ship, a drone, a mobile terminal (such as a smartphone or a tablet terminal), or a train. In this embodiment, the transmitting device 10 is mounted on the moving body, but the transmitting device 10 may be mounted on a fixed terminal or machine. In this embodiment, it is assumed that the moving body M is an automobile. The automobile may be either an automobile having a function of assisting the user in driving, or an autonomous vehicle that drives by making autonomous decisions.
[0016] The transmitting device 10 is connected to a communication network 30. The communication network 30 is, for example, a network such as a mobile network or a wireless LAN (Local Area Network). Examples of the mobile network include a 3G network, an LTE network, and a next-generation (5G) network, but any type of network may be used. The communication network 30 may be a wireless network or a wired network. The communication network 30 may include a plurality of types of networks. In this case, the transmitting device 10 may select a network to be used for communication with the receiving device 20 from a plurality of types of networks. In this embodiment, the transmitting device 10 performs wireless communication, but may be configured to perform wired communication. The communication network 30 may include one or more relay devices that relay data or packets.
[0017] The transmitting device 10 acquires data from one or more sensors provided on the moving body M. The one or more sensors may be provided on a fixed terminal or machine. The one or more sensors detect data to be provided to one or more applications in the receiving device. The data detected by the multiple sensors is data for different applications. The data for the multiple applications belong to different data flows. The transmitting device 10 transmits the data detected by each sensor to the receiving device 20. More specifically, the transmitting device 10 generates a packet including data from one or more sensors (data for one or more applications) and transmits the generated packet to the receiving device 20. Examples of the multiple sensors include a camera, a GPS, a LiDAR (Light Detecting And Ranging), a speed sensor, an acceleration sensor, a sensor for detecting control information of the automobile (such as an engine rotation state and an accelerator pedal depression state), a sensor for detecting sudden braking, and a sensor for detecting an obstacle (a fallen object, a vehicle ahead). Examples of the sensor are not limited to those mentioned above. For example, the sensor may detect data input from a user such as a passenger in the automobile via an operation unit.
[0018] The receiving device 20 is connected to a communication network 30 by wire or wirelessly. The receiving device 20 is disposed in, for example, a mobile network. The receiving device 20 may be an edge controller of the mobile network. The receiving device 20 receives packets including data for one or more applications from the transmitting device 10. The receiving device 20 includes one or more applications that process the data transmitted from the transmitting device 10. The receiving device 20 passes the data acquired from the transmitting device 10 to the corresponding applications.
[0019] Examples of the multiple applications include an application for generating a high definition map, an application for generating an optimization model for engine control, an application for generating road safety information, etc. Different applications may have different time constraints for data transmission, i.e., time constraints for providing data to the applications. As an example, the application for generating a high definition map and the application for generating an optimization model for engine control have long time constraints for data transmission (e.g., one hour, one day, etc.). On the other hand, the application for generating road safety information has short time constraints for data transmission (e.g., 10 seconds or less, etc.). As an example, data with short time constraints corresponds to high priority data, and data with long time constraints corresponds to low priority data.
[0020] The receiving device 20 may function as a relay device, in which case the receiving device 20 may transmit the data received from the transmitting device 10 to another device (for example, a server) that includes one or more applications.
[0021] The transmitting device 10 and the receiving device 20 may communicate with each other via a relay device such as a base station or a router. For example, the transmitting device 10 wirelessly connects to a nearby base station by executing a predetermined connection process. The transmitting device 10 communicates with the receiving device 20 via the connected base station. One or more routers may be disposed between the base station and the receiving device 20. The receiving device 20 may be connected to the base station wirelessly or by wire. The receiving device 20 may be connected to multiple base stations or may be connected to the base station one-to-one.
[0022] 2 is a block diagram of the transmission device 10. The transmission device 10 corresponds to an example of a communication device or a wireless communication device according to the present embodiment.
[0023] The transmitting device 10 includes a plurality of data acquiring units 101A and 101B, a plurality of buffer units 102A and 102B, a transmission processing unit 103, a control unit 104, a transmitting unit 105, and at least one antenna 107. The transmitting device 10 may include a part that is connected by wire together with the antenna 107, or may include a part that is connected by wire instead of the antenna 107.
[0024] In the example of Fig. 2, two data acquisition units are provided, but three or more may be provided. Similarly, two buffer units are provided, but three or more may be provided. One set of a transmitter and an antenna is provided, but two or more may be provided.
[0025] Data acquisition units 101A and 101B are connected to sensors 1A and 1B, respectively. Sensor 1A detects data to be provided to application A. Sensor 1B detects data to be provided to application B. In the example of FIG. 2, there are two sensors, but there may be three or more sensors.
[0026] Examples of the multiple sensors include a camera, a GPS, a sensor for detecting driving information of the vehicle (LiDAR (Light Detecting And Ranging)), a speed sensor, an acceleration sensor, a sensor for detecting control information of the vehicle (engine rotation state, accelerator depression state, etc.), a sensor for detecting sudden braking, a sensor for detecting obstacles (falling objects, vehicles ahead), etc. The sensor may output data at regular intervals in a time series, or may output data at a specific timing, such as when an event occurs. Examples of sensors are not limited to those mentioned above. For example, the sensor may detect data input by a user, such as a passenger in the vehicle, via an operation unit.
[0027] Data detected from each sensor at regular intervals or at specific timing is provided to each application.
[0028] Data acquisition units 101A and 101B acquire data detected by sensors 1A and 1B. The data detected by sensor 1A is described as data A, and the data detected by sensor 1B is described as data B. Assume that data A is, for example, data from an application with long time constraints, and data B is, for example, data from an application with short time constraints. Data acquisition units 101A and 101B provide the acquired data A and B to buffer units 102A and 102B. Data detected by the sensors includes, for example, attribute information of the sensor, detection time, and data body.
[0029] The buffer units 102A and 102B receive data A and B from the data acquisition units 101A and 101B, and store the received data A and B internally. That is, the buffer units 102A and 102B buffer the data A and B acquired from the data acquisition units 101A and 101B. The buffer unit 102A manages the order in which the data A is received, and outputs the data A in the order in which it is received. The buffer unit 102B manages the order in which the data B is received, and outputs the data B in the order in which it is received. The buffer units 102A and 102B are, for example, configured with a recording medium such as a memory device or a hard disk.
[0030] The control unit 104 controls the reading and transmission of data from the buffer units 102A and 102B. For example, the control unit 104 controls the reading of data from the buffer units 102A and 102B in accordance with the time constraints of an application. The control unit 104 provides a transmission request for data A and a transmission request for data B to the transmission processing unit 103.
[0031] The transmission processing unit 103 reads out the data A and B from the buffer units 102A and 102B under the control of the control unit 104, and generates a packet including the read out data A and B (a packet in which the data A and B are multiplexed). As an example, the transmission processing unit 103 processes IP (Internet Protocol), UDP (Internet Protocol), or TCP (Internet Protocol), and further processes at least one of the upper and lower protocols. When multiplexing both data, a common UDP header or TCP header may be added to both data A and B, or a UDP header or TCP header may be added independently to each of the data A and B, and the data may be multiplexed into one packet. A protocol that multiplexes at least one of a UDP datagram and a TCP segment may be introduced as an upper layer of UDP or TCP. In this embodiment, any method may be used as long as it is possible to multiplex data of multiple applications into one packet.
[0032] The transmitting unit 105 communicates with the receiving device 20 via the communication network 30. The transmitting unit 105 processes the lower layer protocol on the packet provided from the transmission processing unit 103, and transmits the processed packet via the antenna 107. More specifically, the transmitting unit 105 modulates and DA converts the processed packet to an analog signal, extracts a signal of a desired band, and up-converts the extracted signal to a radio frequency. The transmitting unit 105 amplifies the radio frequency signal with an amplifier, and transmits the amplified radio frequency signal via the antenna 107. The processing of the lower layer protocol includes, for example, processing of a data link layer and a physical layer. The data link layer includes, for example, a protocol of Ethernet (registered trademark) or IEEE802.11. At least one of the processing of the data link layer and the physical layer may be performed by the transmission processing unit 103.
[0033] 3 is a block diagram of the receiving device 20. The receiving device 20 includes data processing units (applications) 201A and 201B, buffer units 202A and 202B, a reception processing unit 203, a receiving unit 205, and an antenna 207. The receiving device 20 corresponds to an example of a wireless communication device or a communication device according to this embodiment. In this embodiment, the receiving device 20 performs wireless communication, but a configuration in which wired communication is performed is also not excluded.
[0034] In the example of Fig. 3, there are two data processing units, but there may be three or more. Similarly, there are two buffer units, but there may be three or more. Also, there is one set of a receiving unit and an antenna, but there may be two or more.
[0035] The receiving unit 205 receives packets transmitted from the transmitting device 10 via the communication network 30. More specifically, the receiving unit 205 receives a wireless signal via the antenna 207, amplifies the received signal, and down-converts it to a baseband frequency. It extracts a signal of a desired band from the down-converted signal and performs AD conversion on the extracted signal. It demodulates the digital signal obtained by the AD conversion. The receiving unit 205 processes the demodulated packet in accordance with a lower layer protocol, and provides the processed packet to the reception processing unit 203.
[0036] The reception processing unit 203 processes protocols higher than the above-mentioned lower layer, and separates the packets into data A and data B. The reception processing unit 203 provides data A to buffer unit 202A, and provides data B to buffer unit 202B.
[0037] The buffer units 202A and 202B store data provided from the reception processing unit 203 therein. That is, the buffer units 202A and 202B buffer the data provided from the reception processing unit 203. The buffer units 202A and 202B output the buffered data in the order in which they received it. The method of outputting data from the buffer units 202A and 202B may differ depending on the type of data to be output. As an example, the buffer units 202A and 202B may output data in response to a request from the data processing units 201A and 201B. Alternatively, the buffer units 202A and 202B may output data immediately after the data is input. Alternatively, the buffer units 202A and 202B may output the buffered data at regular time intervals. As an example, the buffer units 202A and 202B are configured by a recording medium such as a memory device or a hard disk.
[0038] The data processing units 201A and 201B are application execution units that process data provided from the buffer units 202A and 202B by executing respective applications. As an example, the data processing unit 201A includes an application A and a CPU, and the CPU executes the application A. As an example, the data processing unit 201B includes an application B and a CPU, and the CPU executes the application B. Examples of applications include generation of high-resolution maps, generation of an optimized model for engine control, and generation of road safety information, but these are merely examples and there are various other applications.
[0039] 4 is a detailed block diagram of the transmission processing unit 103. The transmission processing unit 103 includes a writing unit 120 (third writing unit), a transmission buffer 121, a writing unit 122A (first writing unit), a writing unit 122B (second writing unit), a buffer management unit 123, a packet generation unit 125, and a storage unit 126 (memory device). The transmission buffer 121 and the storage unit 126 are configured by a recording medium such as a memory. The memory may be a volatile memory, a non-volatile memory, or both. The transmission buffer 121 and the storage unit 126 may be the same recording medium or different recording media. The processes of the writing unit 120, the writing unit 122A, the writing unit 122B, the buffer management unit 123, and the packet generation unit 125 are executed by a processor such as a CPU (Central Processing Unit), for example. As an example, all or part of the processing of writing unit 122A, buffer management unit 123, and packet generation unit 125 is executed by an OS (Operating System), and all or part of the processing of writing unit 120 and writing unit 122B is executed by an application for data transmission. The application of writing unit 120 and the application of writing unit 122B may be the same or different.
[0040] The transmission buffer 121 is a storage area (e.g., a memory area) of a predetermined size. The writing unit 120 writes the data A to the transmission buffer 121 every time the data A is input from the buffer unit 102A. The data A is stored sequentially in the transmission buffer 121. The data A is stored sequentially from a predetermined address in the transmission buffer 121. The transmission buffer 121 is configured, for example, by a FIFO buffer.
[0041] The buffer management unit 123 secures (creates) a memory area for storing the descriptors in the storage unit 126 when the transmission processing unit 103 is initialized. The memory area for the descriptors is, for example, configured with a ring buffer.
[0042] Furthermore, in response to a request from the writing unit 122A, the buffer management unit 123 allocates (creates) one or more packet buffers (first buffers) which are memory areas in the storage unit 126. The packet buffer has a memory area equal to or larger than the size of the packets created by the transmission processing unit 103. As an example, the packet buffer has a fixed size. Note that the buffer management unit 123 may create a predetermined number (one or more) of packet buffers in the storage unit 126 in advance.
[0043] 5 shows an example of the configuration of a packet buffer. The packet buffer has a memory area HR for a header, an area RB (second memory area) for data B, and an area RA (first memory area) for data A. The area RA for data A starts from a start address SA, and the area for data B starts from a start address SB. The area RA for data A may be located before the area RB for data B. The area RB for data B has a size according to the maximum size of data B, as an example. The area RA for data A is determined according to the size of the area RB for data B, the size of the area HR for the header, and the maximum size of a packet, as an example.
[0044] The buffer management unit 123 manages the packet buffer with a buffer identifier and a descriptor corresponding to the buffer identifier. The descriptor has various attributes such as, for example, the address (pointer) of the packet buffer, the size of the stored data, the application identifier, the start address SB, the start address SA, etc. The descriptor is managed by a ring buffer, for example.
[0045] When data A is stored in the transmission buffer 121, the writing unit 122A reads data A stored in the transmission buffer 121 that has not yet been read, from the head side. The writing unit 122A writes (stores) the read data A from a start address SA in the packet buffer based on the information of the descriptor. The start address SA may be specified by an application. The size of the data A read from the transmission buffer 121 is equal to or smaller than the size of the area RA for data A. Note that the size of the data A written to the transmission buffer 121 (read from the buffer unit 202A) and the size of the data A read from the transmission buffer 121 (written to the packet buffer) do not need to be the same. When data A remains in the transmission buffer 121, a packet buffer may be generated and data A may be read from the transmission buffer 121 and written into the generated packet buffer until the number of packet buffers reaches a threshold value (an integer equal to or greater than 1). If data A needs to be processed using a protocol independent of data B, writing unit 122A may process data A using that protocol before writing the data to the packet buffer.
[0046] When data B is input from buffer unit 102B, write unit 122B obtains, from buffer management unit 123 or write unit 122A, information on a descriptor related to the bucket buffer into which data B is to be written. The packet buffer into which data B is to be written is a packet buffer into which data A has already been written. Based on the information on the descriptor, write unit 122B identifies a start address SB of the packet buffer. The start address SB may be specified by an application. Write unit 122B writes data B from the start address SB of the packet buffer. As an example, the writing by write unit 122B is performed by DMA (Direct Memory Access). The size of data B to be written is equal to or smaller than the size of area RB for data B. When write unit 122B completes writing data B, it provides information on a descriptor related to the bucket buffer into which data B has been written to packet generation unit 125. That is, it sends notification information that writing data B to the packet buffer has been completed, or a packet transmission request, to packet generation unit 125. When data B is to be processed according to a protocol independent of that for data A, writing unit 122B may process data B according to that protocol before writing the data to the packet buffer.
[0047] When packet generation unit 125 receives notification information that writing of data B to the packet buffer is completed (when a request to send data B is generated), it accesses the file descriptor corresponding to the packet buffer. Packet generation unit 125 generates a header based on the information of data A and data B stored in the packet buffer. Header writing unit 131 of packet generation unit 125 writes the generated header to the header area HR in the packet buffer.
[0048] The size of the header may be the same as the header area HR, or it may be smaller than the header area HR. For example, the size of the header area HR may be provided with some margin so that multiple types of headers or variable-length headers can be accommodated. The header is stored adjacent to the data B area RB, toward the end address (right-justified along the paper). However, the header may also be stored from the start address of the header area HR (left-justified along the paper).
[0049] The packet generator 125 reads all data from the header to the end address of the packet buffer in the packet buffer, and forms a packet. That is, the header stored in the HR area, all data in the area RB for data B, and all data in the area RA for data A are combined to form a packet. The packet generator 125 reads data by DMA, for example. If there is an area in the area RB where data B is not stored, the data of the area is also included in the all data of the area RB for data B. If there is an area in the area RA where data A is not stored, the data of the area is also included in the all data of the area RA for data A. Depending on the type of protocol processed by the transmission processor 103, an error detection code (FCS or CRC) or the like may be added to the end of the packet, or the packet may be encoded using an error correction code.
[0050] The packet generating unit 125 includes in the header position information A (first position information) indicating the position where data A is stored, and position information B (second position information) indicating the position where data B is stored. The position information A includes, for example, the start byte position and the end byte position of the range where data A is included in the packet. Alternatively, the position information A includes the start byte position of the range where data A is included in the packet and size information of data A. The position information A can be calculated based on the range where data A is stored in the data A area RA. Similarly, the position information B includes the start byte position and the end byte position of the range where data B is included in the packet. Alternatively, the position information B includes the start byte position of the range where data B is included in the packet and size information of data B. The position information B can be calculated based on the range where data B is stored in the data A area RB.
[0051] The packet buffer descriptor may include information indicating the address range in which data B is stored, the data size, the area RB for data B, the address range in which data A is stored, the data size of data A, and the area RA for data A. Packet generator 125 may generate a packet header using this information included in the descriptor.
[0052] The packet generator 125 provides the generated packets to the transmitter 105. The transmitter 105 processes the packets in accordance with the lower layer protocols, and transmits the processed packets via the antenna 107.
[0053] After the data is read from the packet buffer, the buffer management unit 123 may delete the packet buffer, or may reuse it for generating other packets.
[0054] 6(A) to 6(C) show an example of the operation of generating a packet. In FIG. 6(A), data A (assumed to be data A_1) is written to the transmission buffer 121 first, and then data A (assumed to be data A_2) is written in the second write. Data A_1 is read from the transmission buffer 121, and the data A_1 is written from the start address SA of the packet buffer 1. That is, data A_1 is copied from the transmission buffer 121 to the packet buffer 1. Data in the remaining area RA1 in the data A area RA where data A is not stored may be any data. After data A_1 is read, data A_2 is read from the transmission buffer 121, and the data A_2 is written from the start address SA of the packet buffer 2. That is, data A_2 is copied from the transmission buffer 121 to the packet buffer 2. Data in the remaining area RA2 in the data A area RA where data A is not stored may be any data. If unread data A exists in the transmission buffer 121 and the third packet buffer and subsequent packet buffers can be created, data A may be written in the same manner to the third packet buffer 3. The packet buffers are used for the process of writing the next data B in the order in which they were created.
[0055] 6B, data B (assumed to be data B_1) is input to the writing unit 122B. The writing unit 122B receives information (descriptor of packet buffer 1) specifying the first generated packet buffer 1 from the buffer management unit 123. The writing unit 122B writes the data B_1 from the start address SB of the packet buffer 1. Any data may be stored in the remaining area RB1 of the area RB for data B where the data B_1 is not stored.
[0056] 6C, the packet generator 125 generates a header (HD1) based on information about data B_1 and data A_1 in the packet buffer 1. The packet generator 125 may generate the header HD1 based on information about a descriptor. The header writer 131 of the packet generator 125 writes the header HD1 into the header area HR in the packet buffer 1.
[0057] The packet generator 125 reads all data following the header HD1 contained in the packet buffer 1 from the packet buffer 1, and provides the transmitter 105 with a packet based on the read data.
[0058] Thereafter, when the next data B (assumed to be data B_2, not shown) is input from the buffer unit 102B, a packet is generated using the packet buffer 2 in which the data A_2 is stored. The details of the packet generation are the same as when the packet buffer 1 is used, and therefore the explanation is omitted.
[0059] FIG. 7 is a flowchart showing an example of the operation of the transmission device 10 according to the first embodiment. Each time data A is input from the buffer unit 102A, the writing unit 120 writes or stores the data A in the transmission buffer 121 in order (S101). The data A is continuous with the end address of the data A stored immediately before. The buffer management unit 123 creates a packet buffer in the storage unit 126 and creates a descriptor for the packet buffer (S102). The descriptor is stored in a memory area for the descriptor (e.g., a ring buffer) in the storage unit 126. The writing unit 122A writes the data A from a start address SA in the packet buffer indicated by the descriptor (S103). The packet buffer into which the data A has been written is held until a transmission request for data B is generated. When the writing unit 122B receives data B from the buffer unit 102B, it obtains information (descriptor) of the packet buffer into which data B is to be written from the writing unit 122A. The writing unit 122B accesses the packet buffer and writes data B from start address SB in the packet buffer (S104). The packet generating unit 125 generates a header based on the information on data A and data B or the information on the descriptor, and writes the header in the header area HR in the packet buffer (S105). The packet generating unit 125 reads all data from the header to the end of the packet buffer, generates a packet based on all the read data, and provides it to the transmitting unit 105 (S106). The transmitting unit 105 transmits the packet via the antenna 107 (S107).
[0060] If a packet buffer in which data A has been written does not exist when a request to transmit data B is generated, data B may be transmitted using a packet buffer in which data A has not been written. In this case, the packet buffer may be prepared in advance, or the buffer management unit 123 may be caused to generate a packet buffer in response to a request from the writing unit 122B or the like. Alternatively, a header may be generated directly from data B without using a packet buffer, and the header may be added to data B to generate a packet.
[0061] As described above, according to the first embodiment, when data of a plurality of applications is transmitted in one packet, the packet can be generated with only a small number of copies (one time in this example). For example, data B with a short time constraint (high priority) is transmitted in one packet together with data A with a long time constraint (low priority) that has been prepared in advance as soon as data B is generated. Specifically, since data A has a long time constraint, data A is stored in a packet buffer in advance so that it can be transmitted at any time together with data B, and is prepared for transmission. When a transmission request for data B occurs, data B is written to this packet buffer (a packet buffer in which data A has already been stored), and a packet including data A and data B can be generated without copying data B. Therefore, a packet including data of a plurality of applications (for example, data of a plurality of applications with different time constraints) can be generated at high speed, and delays in packet transmission can be prevented.
[0062] Second embodiment 8 is a detailed block diagram of the transmission processing unit 103 of the transmission device 10 according to the second embodiment. Blocks that are the same as or correspond to those in the block diagram (FIG. 4) of the transmission device 10 according to the first embodiment are given the same reference numerals, and detailed explanations are omitted. The following description will focus on the differences from the first embodiment.
[0063] The buffer management unit 123 generates a buffer for data A in the storage unit 126 in response to a request from the writing unit 122A. The buffer for data A is a memory area for storing data A. The buffer management unit 123 generates a descriptor for the buffer for data A and stores the generated descriptor in a memory area for descriptors (such as a ring buffer). The descriptor has various attributes, such as an address of the buffer for data A and an identifier of an application for data A, for example. The writing unit 122A reads data A that has not yet been read from the transmission buffer 121 from the leading side, and stores the read data A in the buffer for data A from the leading address. A plurality of buffers for data A may be generated in the storage unit 126, and data A read from the transmission buffer 121 may be written in each of them. Information specifying the address range in which data A is written may be written in the descriptor. For example, a start address and an end address of data A, or a set of a start address and a data size of data A may be written.
[0064] The buffer management unit 123 generates a buffer for header & data B in the storage unit 126 in response to a request from the writing unit 122B. The buffer for header & data B is a memory area for storing a header and data B. The buffer for header & data B includes a header area HR and a data B area RB. The head address of the data B area RB corresponds to the start address SB. The buffer management unit 123 generates a descriptor for the buffer for header & data B, and stores the generated descriptor in a memory area for descriptors (such as a ring buffer). The descriptor has various attributes, such as an address of the buffer for header & data B, an identifier of the application of data B, and the start address SB, for example. The buffer management unit 123 may generate multiple buffers for header & data B in parallel in response to multiple requests from the writing unit 122B.
[0065] The sizes of the data A buffer and the header & data B buffer may be determined in the same manner as the data A area RA, the header area HR, and the data B area RB in the first embodiment.
[0066] The writing unit 122B obtains information (descriptor) of the header & data B buffer into which data B input from the buffer unit 102B should be written from the buffer management unit 123. The writing unit 122B writes data from a start address SB in the header & data B buffer. Writing by the writing unit 122B is performed by DMA, for example. Information specifying the address range into which data B has been written may be written into the descriptor. For example, a set of the start address and end address of data B, or the start address and data size of data B may be written.
[0067] The packet generating unit 125 includes a header writing unit 131 and a combining unit 132. The packet generating unit 125 obtains information (descriptor) of the header & data B buffer in which data B has been written from the writing unit 122B. The packet generating unit 125 also obtains information (descriptor) of the data A buffer in which the oldest data A not yet transmitted is stored from the writing unit 122A. The packet generating unit 125 generates a header based on information of data B in the header & data B buffer and data A in the data A buffer. As an example, the header may be generated based on the descriptor of the header & data B buffer and the file descriptor of the data A buffer. The header writing unit 131 stores the generated header in the header area HR in the header & data B buffer.
[0068] 9 shows a schematic representation of a descriptor (Descriptor 2) for the data A buffer and a descriptor (Descriptor 1) for the header & data B buffer. Descriptor 2 and Descriptor 1 are stored in a memory area (ring buffer) 129 for descriptors. Descriptor 2 stores information specifying the address range in which data A is stored in the data A buffer. Descriptor 1 stores information specifying the address range in which the header and data B are stored in the header & data B buffer.
[0069] The synthesis unit 132 of the packet generation unit 125 reads the header and the data B following the header from the header & data B buffer, reads the data A from the data A buffer, and generates a packet based on the header, data B, and data A. As an example, the header, data B, and data A are combined to form a packet. As an example, the reading of the synthesis unit 132 is performed by DMA. The synthesis unit 132 provides the packet to the transmission unit 105.
[0070] 10 shows an example of the operation of generating a packet. Data A (assumed to be data A_1) is written to the transmission buffer 121 first, and then data A (assumed to be data A_2) is written in the second write. Data A_1 is read from the transmission buffer 121, and data A_1 is written from the top address of the data A buffer 1. That is, data A_1 is copied from the transmission buffer 121 to the data A buffer 1. Data in the remaining area RA1 in which data A is not stored in the data A buffer 1 may be arbitrary. Similarly, after data A_1 is read, data A_2 is read from the transmission buffer 121, and data A_2 is written from the top address of the data A buffer 2. That is, data A_2 is copied from the transmission buffer 121 to the data A buffer 2. Data in the remaining area RA2 in which data A_2 is not stored in the data A buffer 2 may be arbitrary. If unread data A exists in the transmission buffer 121 and the third and subsequent buffers for data A can be generated, data A may be written to the third and subsequent buffers for data A in the same manner. The data A buffers are used for packet generation processing in the order in which they were generated.
[0071] Next, data B (assumed to be data B_1) is input from buffer unit 102B to write unit 122B, which receives information specifying the buffer for header & data B (descriptor of the buffer for header & data B) from buffer management unit 123. Write unit 122B writes data B_1 from start address SB of the buffer for header & data B. Data in remaining area RB1 of area RB for data B, where data B_1 is not stored, may be arbitrary.
[0072] Next, the packet generation unit 125 generates a header (HD1) based on information about data B_1 in the header & data B buffer and data A_1 in the data A buffer 1. The packet generation unit 125 may generate the header HD1 based on information about a descriptor of the header & data B buffer and a descriptor of the data A buffer 1. The header writing unit 131 writes the header HD1 to the header area HR in the header & data B buffer.
[0073] The synthesis unit 132 reads the header HD1 and the data B_1 from the buffer for header & data B, reads the data A_1 from the buffer for data A, and generates a packet. For example, the header HD1, the data B_1, and the data A_1 are combined to generate a packet. The synthesis unit 132 provides the generated packet to the transmission unit 105.
[0074] Thereafter, when the next data B (assumed to be data B_2, not shown) is input from the buffer unit 102B, a packet is generated using the data A buffer 2 in which the data A_2 is stored. The details of the packet generation are the same as when the data A buffer 1 is used, and therefore will not be described.
[0075] FIG. 11 is a flowchart showing an example of the operation of the transmission device 10 according to the second embodiment. Each time data A is input from the buffer unit 102A, the writing unit 120 writes or stores data A in the transmission buffer 121 in order (S201). Data A is continuous to the end address of the data A stored immediately before. The buffer management unit 123 creates a buffer for data A in the storage unit 126 and creates a descriptor for the buffer for data A (S202). The descriptor is stored in a memory area for descriptors (e.g., a ring buffer) in the storage unit 126. The writing unit 122A writes data A from the start address of the buffer for data A indicated in the descriptor (S203). However, a configuration is also possible in which data A is written using an address in the middle of the buffer for data A as the start address. The buffer for data A into which data A has been written is held until a request to transmit data B is generated. When the writing unit 122B receives data B from the buffer unit 102B, the writing unit 122A requests the buffer management unit 123 to generate a buffer for header & data B, and obtains information (descriptor) of the buffer for header & data B. The writing unit 122B accesses the buffer for header & data B and writes data B from the start address SB (S204). The packet generating unit 125 generates a header based on the information on data A and data B or the information on the descriptor, and the header writing unit 131 writes the header in the header area HR in the buffer for header & data B (S205). The combining unit 132 reads the header and data B following the header from the buffer for header & data B, and reads data A from the buffer for data A. The combining unit 132 generates a packet based on the read header, data B, and data A, and provides the generated packet to the transmitting unit 105 (S206). The transmitting unit 105 transmits the packet via the antenna 107 (S207).
[0076] As described above, according to the second embodiment, when data of a plurality of applications is included in one packet and transmitted, a packet can be generated with only a small number of copies (one time in this example). For example, data A has a long time constraint, so it is stored in a buffer for data A in advance so that it can be transmitted together with data B. When a transmission request for data B with a short time constraint (high priority) occurs, data B is promptly stored in a buffer for header & data B. After generating a header and storing it in a buffer for header & data B, the header, data B, and data A are read from these buffers to generate a packet. This makes it possible to generate a packet including data A and data B without copying data B. Therefore, a packet including data of a plurality of applications (for example, data of a plurality of applications with different time constraints) can be generated at high speed. Also, according to the second embodiment, by using separate buffers for data A and data B, a packet that does not include redundant data (data in areas RA1 and RB1 in the first embodiment) can be easily generated.
[0077] Third embodiment 12 shows another example of the configuration of the transmission processing unit 103 of the transmission device 10 according to the third embodiment. The following mainly describes the differences from the configuration of the second embodiment shown in FIG.
[0078] The buffer management unit 123 generates a buffer for data B in the storage unit 126. The buffer management unit 123 generates a descriptor for the buffer for data B, and stores the generated descriptor in a memory area for descriptors (such as a ring buffer). When the writing unit 122B receives data B from the buffer unit 102B, it obtains information (descriptor) of the buffer for data B from the buffer management unit 123, and writes data B from the starting address of the buffer for data B. As an example, the writing of data B is performed by DMA. The packet generation unit 125 generates a header based on information about data B in the buffer for data B and data A in the buffer for data A. As an example, the packet generation unit 125 generates a header based on information about the descriptor of the buffer for data B and the descriptor of the buffer for data A.
[0079] 13 shows a schematic representation of a descriptor (Descriptor 2) for the buffer for data A and a descriptor (Descriptor 1) for the buffer for data B. Descriptor 2 and Descriptor 1 are stored in a memory area (ring buffer) 129 for descriptors. Descriptor 2 stores information specifying the address range in which data A is stored in the buffer for data A, etc. Descriptor 1 stores information specifying the address range in which a header and data B are stored in the buffer for data B, etc.
[0080] The synthesis unit 132 reads data B from the buffer for data B and data A from the buffer for data A, and generates a packet using the header. For example, the header, data B_1, and data A_1 are combined to generate a packet. Reading by the synthesis unit 132 is performed by DMA, for example. The synthesis unit 132 provides the generated packet to the transmission unit 105. That is, the header is directly combined with data B and data A without being written to the buffer for data B, etc. The packet generation unit 125 provides the packet to the transmission unit 105.
[0081] 14 shows an example of an operation for generating a packet. The process of writing data A to the data A buffer 1, data A buffer 2, etc. is the same as in the second embodiment, so a description thereof will be omitted.
[0082] Data B (assumed to be data B_1) is input from buffer unit 102B to write unit 122B, which receives information specifying the buffer for data B (descriptor of the buffer for data B) from buffer management unit 123. Write unit 122B writes data B_1 from the top address of the buffer for data B. Data in the remaining area RB1 of the buffer for data B where data B_1 is not stored may be any data.
[0083] Next, the packet generation unit 125 generates a header (HD1) based on information on data B_1 in the buffer for data B and data A_1 in the buffer for data A 1. The packet generation unit 125 may generate the header HD1 based on information on a descriptor of the buffer for data B and a descriptor of the buffer for data A 1.
[0084] The synthesis unit 132 reads data B_1 from the data B buffer, reads data A_1 from the data A buffer, and generates a packet based on the header HD1, the data B_1, and the data A_1. For example, the header HD1, the data B_1, and the data A_1 are combined to generate a packet. The synthesis unit 132 provides the generated packet to the transmission unit 105.
[0085] Thereafter, when the next data B (assumed to be data B_2, not shown) is input from the buffer unit 102B, a packet is generated using the data A buffer 2 in which the data A_2 is stored. The details of the packet generation are the same as when the data A buffer 1 is used, and therefore will not be described.
[0086] FIG. 15 is a flowchart showing an example of the operation of the transmitting device 10 according to the third embodiment. Steps S301 to S303 are the same as steps S201 to S203 in FIG. 11 in the second embodiment. When the writing unit 122B receives data B from the buffer unit 102B, the writing unit 122A requests the buffer management unit 123 to generate a buffer for data B, and acquires information (descriptor) of the buffer for data B. The writing unit 122B accesses the buffer for data B and writes data B from the start address SB (S304). The packet generating unit 125 generates a header based on the information on data A and data B or the information on the descriptor (S305). The combining unit 132 reads data B from the buffer for data B, and reads data A from the buffer for data A. The combining unit 132 generates a packet based on the generated header, data B, and data A, and provides the generated packet to the transmitting unit 105 (S306). The transmitting unit 105 transmits the packet via the antenna 107 (S307).
[0087] As described above, according to the third embodiment, a packet is generated by directly combining data B and data A without storing a header in a buffer, so that the processing load can be reduced. Also, the packet generation process can be simplified.
[0088] (Fourth embodiment) 16 is a detailed block diagram of the reception processing unit 203 in the receiving device 20 according to the fourth embodiment. The reception processing unit 203 includes a reception buffer 221, a writing unit 222, a buffer management unit 223, a packet processing unit 225, a reading unit 227A (second reading unit), a reading unit 227B (first reading unit), and a storage unit 126 (memory device). The reception buffer 221 and the storage unit 226 are configured by a recording medium such as a memory. The memory may be a volatile memory, a non-volatile memory, or both. The reception buffer 221 and the storage unit 226 may be the same recording medium or different recording media. The processes of the writing unit 222, the buffer management unit 223, the packet processing unit 225, the reading unit 227A, and the reading unit 227B are executed by a processor such as a CPU (Central Processing Unit), for example.
[0089] The receiving buffer 221 is a storage area (memory area, etc.) having a predetermined size. The receiving buffer 221 is, for example, configured as a FIFO buffer.
[0090] The buffer management unit 223 secures a memory area for the descriptors in the storage unit 226 when the reception processing unit 203 is initialized. The memory area for the descriptors is, for example, configured with a ring buffer.
[0091] Furthermore, the buffer management unit 223 allocates (creates) a packet buffer (first buffer) which is a memory area in the storage unit 226 for a received packet in response to a request from the packet processing unit 225. The packet buffer has a memory area equal to or larger than the size of a packet received by the packet processing unit 225. As an example, the packet buffer has a fixed size. Note that the buffer management unit 223 may create a predetermined number (one or more) of packet buffers in the storage unit 226 in advance.
[0092] The buffer management unit 223 manages the packet buffer with a buffer identifier and a descriptor corresponding to the buffer identifier. The descriptor has various attributes such as the address (pointer, etc.) of the packet buffer, the identifier of the application, the size of the stored data, etc. The descriptor is managed by a ring buffer, for example.
[0093] The packet processing unit 225 receives a reception request for a packet including data A (second data) and data B (first data) from the receiving unit 205. The packet processing unit 225 requests the buffer management unit 223 to allocate (create) a packet buffer, and acquires information (descriptor) of the packet buffer from the buffer management unit 223. The packet processing unit 225 writes a packet into the packet buffer from the top address. The packet processing unit 225 may provide notification information indicating that the packet has been written to the writing unit 222, the buffer management unit 223, etc. Information about the written packet (packet size, etc.) may be written into the descriptor. The packet processing unit 225 also processes the header of the packet.
[0094] 17(A) and 17(B) are schematic diagrams showing a packet buffer descriptor (Descriptor 1). The example of FIG. 17(A) shows an example where a packet is written to the packet buffer indicated by Descriptor 1 when a packet of the first embodiment is received. The example of FIG. 17(B) shows an example where a packet is written to the packet buffer indicated by Descriptor 1 when a packet of the second or third embodiment is received. Descriptor 1 is stored in the memory area (ring buffer) 229 for descriptors. Descriptor 1 may also store information specifying the address range in which packets are stored in the packet buffer.
[0095] The reading unit 227B obtains packet buffer information (descriptor) from the buffer management unit 223 or the packet processing unit 225, and reads data B from the start address SB of the packet buffer. As an example, the position of data B in the packet is identified based on header information, and the start address SB is calculated from the position of data B and the address of the packet buffer. The reading by the reading unit 227B is performed by DMA as an example. The reading unit 227B provides the read data B to the buffer unit 202B. The reading unit 227B may provide notification information indicating that the reading of data B has been completed to the writing unit 222, the buffer management unit 223, etc.
[0096] The writing unit 222 obtains information (descriptor) of the packet buffer from the buffer management unit 223 or the packet processing unit 225, and reads data A from the start address SA of the packet buffer. As an example, the position of data A in the packet is specified based on information in the header, and the start address SA is calculated from the position of data A and the address of the packet buffer. The reading of data A is performed after data B is read by the reading unit 227B. By reading data B first, data B with a shorter time constraint can be output preferentially. The writing unit 222 writes the read data A to the receiving buffer 221. The data A to be written is continuous with the end address of the data A written previously. The reading unit 227A reads data A that has not yet been read from the receiving buffer 221, and provides the data A to the buffer unit 202A. As an example, the data A may be read at a timing according to the time constraint of the application, or may be read at a fixed time interval or each time data A is stored in the receiving buffer 221.
[0097] After data B and data A are read out from the packet buffer, the buffer management unit 223 may delete the packet buffer, or may reuse the packet buffer for writing other packets.
[0098] FIG. 18 shows an example of an operation for receiving a packet. In response to a packet reception request, a packet is written to the packet buffer by the packet processing unit 225. The reading unit 227B first identifies the start address SB of the packet buffer based on the header of the packet, and reads data B (assumed to be data B_1) from the start address SB. The reading unit 227B provides the read data B to the buffer unit 202B. Next, the writing unit 222 identifies the start address SA of the packet buffer based on the header of the packet, and reads data A (assumed to be data A_1) from the start address SA. The writing unit 222 writes the data A_1 to the receiving buffer 221. That is, the data A_1 is copied from the packet buffer to the receiving buffer. The reading unit 227A reads the data A_1 from the receiving buffer 221, and provides it to the buffer unit 202A. If the next packet is received before data A_1 is read, data B (assumed to be data B_2) contained in the packet is read, and then data A (assumed to be data A_2) contained in the packet is written consecutively to the last address of data A_1. The size of data A read from receive buffer 221 does not need to be the same as the size of data A written to receive buffer 221. For example, a part of data A_1 and the remaining part may be read at different times.
[0099] FIG. 19 is a flowchart showing an example of the operation of the receiving device 20 according to the fourth embodiment. A packet reception request is input from the receiving unit 205. The buffer management unit 223 generates a packet buffer and generates a descriptor for the packet buffer. Note that the packet buffer and the descriptor may be generated before the input of the packet. The packet processing unit 225 writes the packet to the packet buffer (S401). The reading unit 227B accesses the packet buffer based on the descriptor and identifies the position of data B based on the header (S402). The reading unit 227B reads data B from the packet buffer and provides data B to the buffer unit 202B (S402). After data B is read from the reading unit 227B, the writing unit 222 accesses the packet buffer based on the descriptor and identifies the position of data A based on the header (S403). The writing unit 222 reads data A from the packet buffer and writes data A to the receiving buffer 221 (S403). Data A follows the end address of the previously stored data A. Read unit 227A reads data A from receive buffer 221, and provides data A to buffer unit 202A (S404).
[0100] As described above, according to the fourth embodiment, when a packet including data of multiple applications is received, each data included in the packet can be read out with only a small number of copies (one time in this example). For example, since the time constraint for data B is short, data B is immediately read out from the packet buffer storing the packet and output. For data A, which has a long time constraint, data B is read out from the packet buffer and stored in the receive buffer after data B is read out. This makes it possible to read out data A and data B while satisfying their respective time constraints without copying data B. Therefore, packets including data of multiple applications (for example, data of multiple applications with different time constraints) can be received and processed at high speed. Furthermore, according to the fourth embodiment, packets generated in the first embodiment and packets generated in the second or third embodiment can both be received and processed at high speed.
[0101] Fifth embodiment Fig. 20 is a detailed block diagram of the reception processing unit 203 in the reception device 20 according to the fifth embodiment. The reference numeral referring to the packet processing unit has been changed to reference numeral 231. The following mainly describes the differences from the configuration of Fig. 8 of the fourth embodiment.
[0102] In response to a request from the packet processing unit 225 that has received a packet reception request, the buffer management unit 223 allocates a data B buffer (first buffer) for data B (first data) and a data A buffer (second buffer) for data A (second data) in the storage unit 226. The buffer management unit 223 generates a descriptor for the data B buffer and stores the generated descriptor in a memory area for descriptors (such as a ring buffer). The buffer management unit 223 generates a descriptor for the data A buffer and stores the generated descriptor in a memory area for descriptors. When the packet processing unit 231 receives a packet from the receiving unit 205, it processes the header of the packet, then obtains information (descriptor) of the data B buffer from the buffer management unit 223, and writes data B from the start address of the data B buffer. The packet processing unit 231 acquires information (descriptor) of the data A buffer from the buffer management unit 223, and writes the data A from the leading address of the data A buffer.
[0103] FIG. 21 shows a schematic representation of a descriptor (Descriptor 2) for the buffer for data A and a descriptor (Descriptor 1) for the buffer for data B. Descriptor 2 and Descriptor 1 are stored in a memory area (ring buffer) 229 for descriptors. Descriptor 2 stores information specifying the address range in which data A is stored in the buffer for data A, etc. Descriptor 1 stores information specifying the address range in which a header and data B are stored in the buffer for data B, etc.
[0104] The reading unit 227B obtains information (descriptor) of the buffer for data B from the buffer management unit 223 or the packet processing unit 225, and reads data B from the starting address of the buffer for data B. The reading by the reading unit 227B is performed by DMA, for example. The reading unit 227B provides the read data B to the buffer unit 202B. The reading unit 227B may provide notification information indicating that the reading of data B has been completed to the writing unit 222, the buffer management unit 223, etc.
[0105] The writing unit 222 obtains information (descriptor) of the buffer for data A from the buffer management unit 223 or the packet processing unit 225, and reads data A from the first address of the buffer for data A. The reading of data A may be performed in parallel with the reading of data B, or after the reading of data B. Since data A and data B are stored in separate buffers, the timing of reading data A can be determined independently of the timing of reading data B. The writing unit 222 writes the read data A to the receiving buffer 221. The data A to be written is continuous with the last address of the data A written previously. The reading unit 227A reads data A that has not yet been read from the receiving buffer 221, and provides data A to the buffer unit 202A.
[0106] 22 is a flowchart showing an example of the operation of the receiving device 20 according to the fifth embodiment. A packet is input from the receiving unit 205. The buffer management unit 223 generates a buffer for data B and a buffer for data A, and generates a descriptor for each buffer. Note that the buffer for data B, the buffer for data A, and the descriptor for each buffer may be generated before the input of the packet. After the packet processing unit 225 processes the header, it writes data B to the buffer for data B and writes data A to the buffer for data A (S501). The reading unit 227B accesses the buffer for data B based on the descriptor and reads data B from the buffer for data B (S502). The reading unit 227B provides data B to the buffer unit 202B (S502). The writing unit 222 accesses the buffer for data A based on the descriptor and reads data A from the buffer for data A (S503). The writing unit 222 writes the data A to the receiving buffer 221 (S503). The data A is continuous to the end address of the previously stored data A. The reading unit 227A reads the data A from the receiving buffer 221 and provides the data A to the buffer unit 202A (S504).
[0107] As described above, according to the fifth embodiment, when a packet including data of a plurality of applications is received, each data included in the packet can be read out with only a small number of copies (one time in this example). For example, data B and data A included in the packet are written to a buffer for data B and a buffer for data A, respectively. That is, data B and data A are divided into a plurality of descriptors and transferred to a memory (buffer). Data B is read out immediately from the buffer for data B and output. Data A is written (copied) from the buffer for data A to the receive buffer, and is read out from the receive buffer at a timing according to the time constraint of application A. This makes it possible to read out data A and data B while satisfying their respective time constraints without copying data B. Therefore, a packet including data of a plurality of applications (for example, data of a plurality of applications with different time constraints) can be received and processed at high speed. Also, according to the fourth embodiment, both the packet generated in the first embodiment and the packet generated in the second or third embodiment can be received and processed at high speed.
[0108] (Modification) In the fifth embodiment, instead of the buffer for data B, a buffer for header & data B may be generated, and the header and data B may be written to the buffer for header & data B. The reading unit 227B reads data B from the buffer for header & data B. The position of data B in the buffer for header & data B can be identified based on the header.
[0109] Sixth embodiment A part or all of each device (transmitting device 10 or receiving device 20) in the above-mentioned embodiment may be configured with hardware, or may be configured with information processing of software (programs) executed by a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit) or the like. In the case of being configured with information processing of software, software for realizing at least a part of the functions of each device in the above-mentioned embodiment may be stored in a non-transient storage medium (non-transient computer-readable medium) such as a flexible disk, a CD-ROM (Compact Disc-Read Only Memory), or a USB (Universal Serial Bus) memory, and the software information processing may be executed by reading the software into a computer. The software may also be downloaded via a communication network. Furthermore, the software may be implemented in a circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array), so that the information processing is executed by hardware.
[0110] There is no limitation on the type of storage medium that stores the software. The storage medium is not limited to removable media such as magnetic disks or optical disks, but may be fixed storage media such as hard disks or memory. The storage medium may be provided inside the computer or outside the computer.
[0111] 23 is a block diagram showing an example of a hardware configuration of each device (the transmitting device 10 or the receiving device 20) in the above-mentioned embodiment. Each device may be realized as a computer 90 including, for example, a processor 91, a main storage device 92 (memory), an auxiliary storage device 93 (memory), a network interface 94, and a device interface 95, which are connected via a bus 96.
[0112] Although the computer 90 in FIG. 23 includes one of each component, it may include a plurality of the same components. Although one computer 90 is shown in FIG. 23, the software may be installed in a plurality of computers, and each of the plurality of computers may execute the same or different parts of the software. In this case, it may be in the form of distributed computing in which each computer communicates via a network interface 94 or the like to execute the processing. That is, each device (transmitting device 10 or receiving device 20) in the above-mentioned embodiment may be configured as a system in which one or more computers execute instructions stored in one or more storage devices to realize the function. Also, it may be configured such that information transmitted from a terminal is processed by one or more computers provided on a cloud, and the processing results are transmitted to the terminal.
[0113] Various calculations of each device (transmitting device 10 or receiving device 20) in the above-mentioned embodiment may be executed in parallel using one or more processors, or using multiple computers via a network. Also, various calculations may be distributed to multiple arithmetic cores in a processor and executed in parallel. Also, a part or all of the processes, means, etc. of the present disclosure may be executed by at least one of a processor and a storage device provided on a cloud that can communicate with a computer 90 via a network. Thus, each device in the above-mentioned embodiment may be in the form of parallel computing using one or more computers.
[0114] The processor 91 may be an electronic circuit (processing circuit, processing circuitry, CPU, GPU, FPGA, ASIC, or the like) including a computer control device and an arithmetic device. The processor 91 may also be a semiconductor device or the like including a dedicated processing circuit. The processor 91 is not limited to an electronic circuit using electronic logic elements, and may be realized by an optical circuit using optical logic elements. The processor 91 may also include an arithmetic function based on quantum computing.
[0115] The processor 91 can perform arithmetic processing based on data and software (programs) input from each device, etc., in the internal configuration of the computer 90, and output the arithmetic results and control signals to each device, etc. The processor 91 can control each component constituting the computer 90 by executing the OS (Operating System) of the computer 90, applications, etc.
[0116] Each device (transmitting device 10 or receiving device 20) in the above-described embodiment may be realized by one or more processors 91. Here, the processor 91 may refer to one or more electronic circuits arranged on one chip, or may refer to one or more electronic circuits arranged on two or more chips or two or more devices. When multiple electronic circuits are used, the electronic circuits may communicate with each other by wire or wirelessly.
[0117] The main memory 92 is a memory device that stores instructions executed by the processor 91 and various data, and information stored in the main memory 92 is read by the processor 91. The auxiliary memory 93 is a memory device other than the main memory 92. These memory devices refer to any electronic components capable of storing electronic information, and may be semiconductor memories. The semiconductor memories may be either volatile or non-volatile memories. The memory devices for saving various data in each device (transmitting device 10 or receiving device 20) in the above-mentioned embodiments may be realized by the main memory 92 or the auxiliary memory 93, or may be realized by an internal memory built into the processor 91. For example, the temporary storage units 140 and 240 in the above-mentioned embodiments may be realized by the main memory 92 or the auxiliary memory 93.
[0118] A plurality of processors may be connected (coupled) to one storage device (memory), or a single processor may be connected. A plurality of storage devices (memories) may be connected (coupled) to one processor. When each device (transmitting device 10 or receiving device 20) in the above-mentioned embodiment is composed of at least one storage device (memory) and a plurality of processors connected (coupled) to this at least one storage device (memory), a configuration in which at least one processor among the plurality of processors is connected (coupled) to at least one storage device (memory) may be included. This configuration may also be realized by storage devices (memories) and processors included in a plurality of computers. Furthermore, a configuration in which a storage device (memory) is integrated with a processor (for example, a cache memory including an L1 cache and an L2 cache) may be included.
[0119] The network interface 94 is an interface for connecting to the communication network 97 wirelessly or by wire. The network interface 94 may be an appropriate interface, such as one conforming to an existing communication standard. The network interface 94 may exchange information with an external device 98A connected via the communication network 97. The communication network 97 may be any one of a wide area network (WAN), a local area network (LAN), a personal area network (PAN), or a combination thereof, as long as information is exchanged between the computer 90 and the external device 98A. An example of a WAN is the Internet, an example of a LAN is IEEE802.11 or Ethernet (registered trademark), and an example of a PAN is Bluetooth (registered trademark) or Near Field Communication (NFC).
[0120] The device interface 95 is an interface such as a USB that directly connects to an external device 98B.
[0121] The external device 98A is a device connected to the computer 90 via a network. The external device 98B is a device connected directly to the computer 90.
[0122] The external device 98A or the external device 98B may be, for example, an input device. The input device is, for example, a device such as a camera, a microphone, a motion capture device, various sensors, a keyboard, a mouse, or a touch panel, and provides acquired information to the computer 90. Alternatively, the input device may be a device equipped with an input unit, a memory, and a processor, such as a personal computer, a tablet terminal, or a smartphone.
[0123] Moreover, the external device 98A or the external device 98B may be, for example, an output device. The output device may be, for example, a display device such as an LCD (Liquid Crystal Display), a CRT (Cathode Ray Tube), a PDP (Plasma Display Panel), or an organic EL (Electro Luminescence) panel, or may be a speaker that outputs sound or the like. Also, the output device may be a device equipped with an output unit, a memory, and a processor, such as a personal computer, a tablet terminal, or a smartphone.
[0124] Furthermore, the external device 98A or the external device 98B may be a storage device (memory). For example, the external device 98A may be a network storage or the like, and the external device 98B may be a storage device such as an HDD.
[0125] Furthermore, the external device 98A or the external device 98B may be a device having some of the functions of the components of each device (the transmitting device 10 or the receiving device 20) in the above-mentioned embodiment. In other words, the computer 90 may transmit or receive some or all of the processing results of the external device 98A or the external device 98B.
[0126] In this specification (including the claims), when the expression "at least one of a, b, and c" or "at least one of a, b, or c" (including similar expressions) is used, it includes any of a, b, c, ab, ac, bc, or abc. It may also include multiple instances of any element, such as aa, abb, aabbcc, etc. Furthermore, it also includes the addition of elements other than the enumerated elements (a, b, and c), such as having d, as in abcd.
[0127] In this specification (including claims), when expressions such as "data as input / based on / according to / in response to" (including similar expressions) are used, unless otherwise specified, it includes cases where various data itself is used as input, and cases where various data that have been processed in some way (e.g., noise-added, normalized, intermediate representation of various data, etc.) are used as input. In addition, when it is stated that a result is obtained "based on / according to / in response to data," it includes cases where the result is obtained based only on the data, and may also include cases where the result is obtained influenced by other data, factors, conditions, and / or states other than the data. In addition, when it is stated that "data is output," it includes cases where various data itself is used as output, and cases where various data that have been processed in some way (e.g., noise-added, normalized, intermediate representation of various data, etc.) are output, unless otherwise specified.
[0128] In this specification (including the claims), the terms "connected" and "coupled" are intended as open-ended terms including any of direct connection / coupling, indirect connection / coupling, electrically connection / coupling, communicatively connection / coupling, functionally connection / coupling, physically connection / coupling, etc. The terms should be interpreted appropriately depending on the context in which the terms are used, but any connection / coupling form that is not intentionally or naturally excluded should be interpreted as being included in the terms without any restriction.
[0129] In this specification (including the claims), when the expression "A configured to B" is used, it may include that the physical structure of element A has a configuration capable of performing operation B, and that the permanent or temporary setting / configuration of element A is configured / set to actually perform operation B. For example, when element A is a general-purpose processor, it is sufficient that the processor has a hardware configuration capable of performing operation B, and is configured to actually perform operation B by setting a permanent or temporary program (instruction). Also, when element A is a dedicated processor or dedicated arithmetic circuit, it is sufficient that the circuit structure of the processor is implemented to actually perform operation B, regardless of whether control instructions and data are actually attached.
[0130] In this specification (including the claims), terms implying containing or possessing (e.g., "comprising / including" and "having") are intended to be open-ended terms that include the inclusion or possession of things other than the object indicated by the object of the term. When the object of such terms implies no quantity or a singular number (such as an article "a" or "an"), the expression should be construed as not being limited to a specific number.
[0131] In this specification (including the claims), even if expressions such as "one or more" or "at least one" are used in some places and expressions that do not specify a quantity or suggest a singular number (expressions using the articles a or an) are used in other places, the latter expressions are not intended to mean "one." In general, expressions that do not specify a quantity or suggest a singular number (expressions using the articles a or an) should be interpreted as not necessarily being limited to a specific number.
[0132] In this specification, when a particular advantage / result is described as being obtained from a particular configuration of an embodiment, it should be understood that the same effect can also be obtained from one or more other embodiments having the same configuration, unless there is a reason to the contrary. However, it should be understood that the presence or absence of the effect generally depends on various factors, conditions, and / or states, and that the effect is not necessarily obtained by the configuration. The effect is merely obtained by the configuration described in the embodiment when various factors, conditions, and / or states are satisfied, and the effect is not necessarily obtained in the invention according to the claim that specifies the configuration or a similar configuration.
[0133] In this specification (including the claims), when a term such as "maximize" is used, it includes finding a global maximum, finding an approximation of a global maximum, finding a local maximum, and finding an approximation of a local maximum, and should be interpreted appropriately according to the context in which the term is used. It also includes finding approximations of these maxima probabilistically or heuristically. Similarly, when a term such as "minimize" is used, it includes finding a global minimum, finding an approximation of a global minimum, finding a local minimum, and finding an approximation of a local minimum, and should be interpreted appropriately according to the context in which the term is used. It also includes finding approximations of these minima probabilistically or heuristically. Similarly, when a term such as "optimize" is used, it includes finding a global optimum, finding an approximation of a global optimum, finding a local optimum, and finding an approximation of a local optimum, and should be interpreted appropriately according to the context in which the term is used. It also includes finding approximations of these optimums probabilistically or heuristically.
[0134] In this specification (including claims), when a plurality of pieces of hardware perform a predetermined process, each piece of hardware may cooperate to perform the predetermined process, or a portion of the hardware may perform all of the predetermined process. Also, a portion of the hardware may perform a portion of the predetermined process, and another piece of hardware may perform the remainder of the predetermined process. In this specification (including claims), when an expression such as "one or more pieces of hardware perform a first process, and the one or more pieces of hardware perform a second process" is used, the hardware performing the first process and the hardware performing the second process may be the same or different. In other words, it is sufficient that the hardware performing the first process and the hardware performing the second process are included in the one or more pieces of hardware. The hardware may include an electronic circuit, or a device including an electronic circuit.
[0135] In this specification (including the claims), when multiple storage devices (memories) store data, each of the multiple storage devices (memories) may store only a portion of the data, or may store the entire data.
[0136] Although the embodiments of the present disclosure have been described in detail above, the present disclosure is not limited to the individual embodiments described above. Various additions, modifications, replacements, and partial deletions are possible within the scope of the conceptual idea and intent of the present invention derived from the contents defined in the claims and their equivalents. For example, in all the above-mentioned embodiments, when numerical values or formulas are used in the explanation, they are shown as examples and are not limited to these. In addition, the order of each operation in the embodiments is shown as an example and is not limited to these. [Explanation of symbols]
[0137] 1A Sensor 1B Sensor 10 Transmitting device 20 Receiving device 30 Communication Network 90 Computer 91 Processor 92 Main memory 93 Auxiliary storage device 94 Network Interface 95 Device Interfaces 96 Bus 97 Communication Networks 98A External device 98B External device 101A, 101B Data acquisition section 102A Buffer section 102B Buffer section 103 Transmission processing unit 104 Control section 105 Transmitter 107 Antenna 120 Writing section 121 Send Buffer 122A Inlet 122B Inlet 123 Buffer Management Unit 125 Packet Generator 126 Storage section 129 Ring Buffer 132 Synthesis Section 140 Temporary storage 201A, 201B Data processing section 202A, 202B Buffer section 203 Receiving processing unit 205 Receiving unit 207 Antenna 221 Receive Buffer 222 Writing section 223 Buffer Management Unit 225 Packet Processing Unit 226 Memory section 227A, 227B reading section 229 Ring Buffer 231 Packet Processing Unit
Claims
1. A buffer management unit that manages allocation of memory areas in a storage unit capable of storing data; a transmission buffer capable of storing data; a third writing unit that writes the first data into the transmission buffer when the first data is input from a first buffer unit that stores the first data related to a first application; a first writing unit that detects that the first data has been written to the transmission buffer, requests the buffer management unit to allocate a first buffer including a first memory area and a second memory area, and, in response to the first buffer being allocated to the storage unit by the buffer management unit, reads the first data from the transmission buffer and writes the read first data to the first memory area in the first buffer; a second writing unit that, when the second data is input from a second buffer unit that stores second data related to a second application, identifies the first buffer secured in the storage unit and writes the second data into the second memory area in the first buffer; a packet generating unit that, when writing of the second data is completed, reads the first data in the first memory area of the first buffer and the second data in the second memory area of the first buffer, and generates a packet including the read first data and the read second data; A transmitting device comprising:
2. the first writing unit writes the first data to the first memory area in the first buffer by copying the first data from the transmission buffer by a CPU; the second writing unit writes the first data to the second memory area by DMA; The transmitting device according to claim 1 .
3. The first buffer in which the first data has been written to the first memory area is held until the second data is written to the second memory area of the first buffer. The transmitting device according to claim 1 .
4. The first buffer includes the first memory area, the second memory area, and a third memory area for a header; the packet generation unit generates first position information that identifies a position in the packet where the first data is included, based on a range in the first memory area where the first data is stored; the packet generation unit generates second position information that identifies a position in the packet where the second data is included, based on a range in the first memory area in which the second data is stored; the packet generation unit generates a header including the first location information and the second location information, and stores the generated header in the third memory area; the packet generation unit reads the header from the third memory area, and generates the packet including the read header, and the read first data and second data. The transmitting device according to claim 1 .
5. The third writing unit sequentially writes the first data input from the first buffer unit to the transmission buffer; the first writing unit requests the buffer management unit to allocate the first buffer in the order in which the first data in the transmission buffer was written to the transmission buffer, and secures the first buffer in the storage unit; the second writing unit, each time the second data is input from the second buffer unit, identifies the first buffer in an order in which the first buffers were secured, and writes the second data into the second memory area in the identified first buffer; the packet generation unit generates the packets in order from the first buffer in which the second data has been written. A transmitting device according to any one of claims 1 to 4.
6. The second data is data with a shorter transmission time constraint than the first data. A transmitting device according to any one of claims 1 to 5.
7. A transmitter for transmitting the packet The transmitting device according to any one of claims 1 to 6, comprising:
8. A first sensor that detects the first data; A second sensor that detects the second data; The first buffer section; The second buffer section; A transmitting device according to claim 5, the first buffer unit sequentially stores the first data detected by a first sensor that detects the first data, and outputs the first data to the third write unit in the order in which they were stored; the second buffer unit sequentially stores the second data detected by a second sensor that detects the second data, and outputs the second data to the second writing unit in the order in which they were stored. Mobile body.
9. When first data related to a first application is input from a first buffer unit storing the first data, the first data is written to a transmission buffer; Detecting that the first data has been written to the transmission buffer, and allocating a first buffer including a first memory area and a second memory area in a storage unit; reading the first data from the transmission buffer in response to the first buffer being secured, and writing the read first data to a first memory area in the first buffer; when the second data is input from a second buffer unit storing second data related to a second application, the first buffer secured in the storage unit is identified, and the second data is written to the second memory area in the first buffer; when writing of the second data is completed, reading the first data in the first memory area of the first buffer and the second data in the second memory area of the first buffer, and generating a packet including the read first data and the read second data; transmitting said packet; Transmission method.
Citation Information
Patent Citations
Methods for exchanging network management messages using UDP over HTTP protocol
US20140006481A1
