JP2006303765A - Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same - Google Patents

Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same Download PDF

Info

Publication number
JP2006303765A
JP2006303765A JP2005120776A JP2005120776A JP2006303765A JP 2006303765 A JP2006303765 A JP 2006303765A JP 2005120776 A JP2005120776 A JP 2005120776A JP 2005120776 A JP2005120776 A JP 2005120776A JP 2006303765 A JP2006303765 A JP 2006303765A
Authority
JP
Japan
Prior art keywords
tcp
header
checksum
udp
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005120776A
Other languages
Japanese (ja)
Inventor
Chisato Higuchi
千里 樋口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2005120776A priority Critical patent/JP2006303765A/en
Publication of JP2006303765A publication Critical patent/JP2006303765A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a TCP/IP transmission processing circuit or the like capable of calculating a check sum of an IP header and a check sum of the TCP or the UDP. <P>SOLUTION: The TCP/IP transmission processing circuit 5 includes: a buffer memory 24; a check sum calculation processing section 25 for calculating the check sum of the IP header and the check sum of the TCP or the UDP; a DMA processing section 21 for applying DMA transfer to a frame generated by a higher-order layer; and a check sum control section 22 that receives the frame, writes the frame to the buffer memory 24, allows the check sum calculation processing section 25 to calculate the check sum of the IP header, thereafter allows the check sum calculation processing section 25 to calculate the check sum of the TCP or the UPD, inserts the check sum of the IP header and the check sum of the TCP or the UDP into the frame stored in the buffer memory 24, and transfers the resulting frame to a lower-order layer. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、TCP/IP(Transmission Control Protocol/Internet Protocol)の送信処理を行うためのTCP/IP送信処理回路に関する。さらに、本発明は、そのようなTCP/IP送信処理回路を具備する半導体集積回路に関する。   The present invention relates to a TCP / IP transmission processing circuit for performing transmission processing of TCP / IP (Transmission Control Protocol / Internet Protocol). Furthermore, the present invention relates to a semiconductor integrated circuit including such a TCP / IP transmission processing circuit.

現在、インターネット、LAN(Local Area Network)等において、TCP/IPと呼ばれる通信プロトコルの階層モデルが広く用いられている。図7は、TCP/IP階層モデルの各レイヤとISO(International Organization for Standardization)で制定されたOSI(Open Systems Interconnection)参照モデルの各レイヤとのおおよその対応関係を示す図である。   Currently, a hierarchical model of a communication protocol called TCP / IP is widely used in the Internet, LAN (Local Area Network) and the like. FIG. 7 is a diagram showing an approximate correspondence between each layer of the TCP / IP hierarchical model and each layer of the OSI (Open Systems Interconnection) reference model established by ISO (International Organization for Standardization).

TCP/IP階層モデルのネットワークインタフェース層としてはEthernet(登録商標)が、TCP/IP階層モデルのインターネット層としてはIP(Internet Protocol)が、TCP/IP階層モデルのトランスポート層としてはTCP(Transmission Control Protocol)又はUDP(User Datagram Protocol)が、広く用いられている。なお、Ethernet(登録商標)は、IEEE802.3等に、IPは、RFC(Request For Comments)791等に、TCPは、RFC793等に、UDPは、RFC768等に、それぞれ規定されている。   The network interface layer of the TCP / IP hierarchical model is Ethernet (registered trademark), the Internet layer of the TCP / IP hierarchical model is IP (Internet Protocol), and the transport layer of the TCP / IP hierarchical model is TCP (Transmission Control). Protocol) or UDP (User Datagram Protocol) is widely used. Note that Ethernet (registered trademark) is defined in IEEE 802.3, etc., IP is defined in RFC (Request For Comments) 791, etc., TCP is defined in RFC 793, etc., and UDP is defined in RFC 768, etc.

図8は、Ethernet(登録商標)フレーム(以下、単に「フレーム」という)のフォーマットを示す図である。図8に示すように、フレームは、ヘッダと、ペイロードとを有する。ペイロードには、IPパケットが格納される。なお、フレームが実際にネットワーク上に送信される際には、先頭にプリアンブルが、末尾にフレームチェックシーケンス(Frame Check Sequence)が、それぞれ付加される。   FIG. 8 is a diagram showing a format of an Ethernet (registered trademark) frame (hereinafter simply referred to as “frame”). As shown in FIG. 8, the frame has a header and a payload. An IP packet is stored in the payload. When a frame is actually transmitted on the network, a preamble is added to the head and a frame check sequence is added to the end.

図9は、IPパケットのフォーマットを示す図である。図9に示すように、IPパケットは、IPヘッダと、IPペイロードとを有する。IPヘッダ内には、ヘッダ・チェックサムを格納するための領域が存在する。この領域に格納されるヘッダ・チェックサムは、IPヘッダの16ビット幅の1の補数和の1の補数(16-bit one's complement of the one's complement sum)である。IPペイロードには、TCPパケット又はUDPパケットが格納される。   FIG. 9 is a diagram showing the format of an IP packet. As shown in FIG. 9, the IP packet has an IP header and an IP payload. An area for storing the header checksum exists in the IP header. The header checksum stored in this area is a 16-bit one's complement sum of the 16-bit width one's complement sum of the IP header. A TCP packet or a UDP packet is stored in the IP payload.

図10は、TCPパケットのフォーマットを示す図である。図10に示すように、TCPパケットは、TCP擬似(pseudo)ヘッダと、TCPヘッダと、TCPペイロードとを有する。TCPヘッダ内には、チェックサムを格納するための領域が存在する。この領域に格納されるチェックサムは、TCP擬似ヘッダ、TCPヘッダ、及び、TCPペイロードの16ビット幅の1の補数和の1の補数である。なお、TCP擬似ヘッダは、送信時においてチェックサムの計算用にのみ使用されるものであり、実際にはネットワーク上には送信されない。   FIG. 10 is a diagram illustrating a format of a TCP packet. As shown in FIG. 10, a TCP packet has a TCP pseudo header, a TCP header, and a TCP payload. An area for storing a checksum exists in the TCP header. The checksum stored in this area is a one's complement of the 16-bit wide one's complement sum of the TCP pseudo header, the TCP header, and the TCP payload. Note that the TCP pseudo header is used only for checksum calculation at the time of transmission, and is not actually transmitted on the network.

図11は、UDPパケットのフォーマットを示す図である。図11に示すように、UDPパケットは、UDP擬似ヘッダと、UDPヘッダと、UDPペイロードとを有する。UDPヘッダ内には、チェックサムを格納するための領域が存在する。この領域に格納されるチェックサムは、UDP擬似ヘッダ、UDPヘッダ、及び、UDPペイロードの16ビット幅の1の補数和の1の補数である。なお、UDP擬似ヘッダは、送信時においてチェックサムの計算用に使用されるものであり、実際にはネットワーク上には送信されない。   FIG. 11 is a diagram illustrating a format of a UDP packet. As shown in FIG. 11, the UDP packet has a UDP pseudo header, a UDP header, and a UDP payload. An area for storing a checksum exists in the UDP header. The checksum stored in this area is a 1's complement of the 16-bit wide 1's complement sum of the UDP pseudo header, the UDP header, and the UDP payload. The UDP pseudo header is used for calculating the checksum at the time of transmission, and is not actually transmitted on the network.

このように、TCPパケットを送信する場合には、IPのヘッダ・チェックサム及びTCPのチェックサムの2つのチェックサムの計算を行う必要がある。同様に、UDPパケットを送信する場合には、IPのヘッダ・チェックサム及びUDPのチェックサムの2つのチェックサムの計算を行う必要がある。これらのチェックサムの計算負荷は非常に重いものである。   As described above, when a TCP packet is transmitted, it is necessary to calculate two checksums: an IP header checksum and a TCP checksum. Similarly, when a UDP packet is transmitted, it is necessary to calculate two checksums: an IP header checksum and a UDP checksum. The calculation load of these checksums is very heavy.

関連する技術として、下記の特許文献1には、チェックサムを計算し挿入することでプロセッサのオーバヘッドを減少させたネットワークアダプタシステムが開示されている。このネットワークアダプタシステムは、ネットワークに接続され、プロセッサ、主記憶装置、及びネットワークアダプタを有する。このネットワークアダプタは、(a)DMAバス;(b)DMAバスに接続され、ネットワークパケットを貯蔵する手段;(c)DMAバスに接続され、主記憶装置とパケット貯蔵手段との間でネットワークパケットを転送する手段;(d)DMAバスに接続され、ネットワークパケットの転送中にネットワークパケットのチェックサムを計算する手段:チェックサム計算手段はDMAバス上の転送データを監視するためのスヌープ手段を有する。   As a related technique, the following Patent Document 1 discloses a network adapter system in which the overhead of a processor is reduced by calculating and inserting a checksum. The network adapter system is connected to a network and includes a processor, a main storage device, and a network adapter. The network adapter includes: (a) a DMA bus; (b) means connected to the DMA bus for storing network packets; (c) connected to the DMA bus for transferring network packets between the main memory and the packet storage means. Means for transferring; (d) means connected to the DMA bus for calculating the checksum of the network packet during the transfer of the network packet: the checksum calculating means comprises snoop means for monitoring the transfer data on the DMA bus.

特許文献1には、主記憶装置とパケット貯蔵手段との間でのネットワークパケットの転送中にネットワークパケットのチェックサムを計算することができると記載されているが、2つのチェックサムを計算することに関しては記載されていない。   Patent Document 1 describes that a checksum of a network packet can be calculated during transfer of the network packet between the main storage device and the packet storage means. Is not described.

特開平6−78024号公報(第1頁、図1)JP-A-6-78024 (first page, FIG. 1)

そこで、上記の点に鑑み、本発明は、IPのヘッダ・チェックサム並びにTCP又はUDPのチェックサムの計算を行うことができるTCP/IP送信処理回路を提供することを目的とする。また、本発明はそのようなTCP/IP送信処理回路を具備する半導体集積回路を提供することを更なる目的とする。   Therefore, in view of the above points, an object of the present invention is to provide a TCP / IP transmission processing circuit capable of calculating an IP header checksum and a TCP or UDP checksum. Another object of the present invention is to provide a semiconductor integrated circuit including such a TCP / IP transmission processing circuit.

以上の課題を解決するため、本発明に係るTCP/IP送信処理回路は、TCP/IP(Transmission Control Protocol/Internet Protocol)の送信処理を行うための回路であって、フレームを格納するためのバッファメモリと、IP(Internet Protocol)のヘッダ・チェックサム並びにTCP(Transmission Control Protocol)又はUDP(User Datagram Protocol)のチェックサムの計算を行うためのチェックサム計算処理部と、上位レイヤにおいて作成されたフレームをDMA(Direct Memory Access)転送するためのDMA処理部と、上位レイヤにおいて作成されたフレームをDMA処理部から受け取ってバッファメモリに書き込み、DMA処理部から受け取ったフレームに基づいてチェックサム計算処理部にIPのヘッダ・チェックサムの計算を行わせ、DMA処理部から受け取ったフレームに基づいてチェックサム計算処理部にTCP又はUDPのチェックサムの計算を行わせ、バッファメモリに格納されているフレーム内にチェックサム計算処理部によって計算されたIPのヘッダ・チェックサム並びにTCP又はUDPのチェックサムを挿入して下位レイヤに転送するためのチェックサム制御部とを具備する。   In order to solve the above problems, a TCP / IP transmission processing circuit according to the present invention is a circuit for performing transmission processing of TCP / IP (Transmission Control Protocol / Internet Protocol), and a buffer for storing a frame. Memory, a checksum calculation processing unit for calculating an IP (Internet Protocol) header checksum and a TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) checksum, and a frame created in an upper layer DMA processing unit for DMA (Direct Memory Access) transfer, a frame generated in the upper layer is received from the DMA processing unit and written to the buffer memory, and a checksum calculation processing unit based on the frame received from the DMA processing unit To calculate the IP header checksum and receive it from the DMA processor. The checksum calculation processing unit calculates the TCP or UDP checksum based on the received frame, the IP header checksum calculated by the checksum calculation processing unit in the frame stored in the buffer memory, and A checksum control unit for inserting a TCP or UDP checksum and transferring it to a lower layer.

このTCP/IP送信処理回路において、上位レイヤにおいて作成されたフレームが、MAC(Media Access Control)ヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータ、並びに、TCP又はUDP擬似ヘッダを順に含んでおり、DMA処理部が、上位レイヤにおいて作成されたフレーム内のMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータ、TCP又はUDP擬似ヘッダを順にチェックサム制御部に転送し、チェックサム制御部が、DMA処理部から受け取ったMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータをバッファメモリに書き込み、DMA処理部から受け取ったIPヘッダをチェックサム計算処理部に送ってIPのヘッダ・チェックサムの計算を行わせ、DMA処理部から受け取ったTCP又はUDPヘッダ、TCP又はUDPデータ、並びに、TCP又はUDP擬似ヘッダをチェックサム計算処理部に送ってTCP又はUDPのチェックサムの計算を行わせるようにしても良い。   In this TCP / IP transmission processing circuit, a frame created in an upper layer includes a MAC (Media Access Control) header, an IP header, a TCP or UDP header, TCP or UDP data, and a TCP or UDP pseudo header in order. The DMA processing unit sequentially transfers the MAC header, IP header, TCP or UDP header, TCP or UDP data, TCP or UDP pseudo header in the frame created in the upper layer to the checksum control unit, and performs checksum control. Unit writes the MAC header, IP header, TCP or UDP header, and TCP or UDP data received from the DMA processing unit to the buffer memory, and sends the IP header received from the DMA processing unit to the checksum calculation processing unit. Header checksum total The TCP or UDP header, the TCP or UDP data, and the TCP or UDP pseudo header received from the DMA processing unit are sent to the checksum calculation processing unit to calculate the TCP or UDP checksum. Also good.

また、上位レイヤにおいて作成されたフレームが、MACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータを順に含んでおり、DMA処理部が、上位レイヤにおいて作成されたフレーム内のMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータを順にチェックサム制御部に転送し、その後、上位レイヤにおいて作成されたフレーム内のIPヘッダをチェックサム制御部に再び転送し、チェックサム制御部が、DMA処理部から受け取ったMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータをバッファメモリに書き込み、DMA処理部から受け取ったIPヘッダをチェックサム計算処理部に送ってIPのヘッダ・チェックサムの計算を行わせ、DMA処理部から受け取ったTCP又はUDPヘッダ、並びに、TCP又はUDPデータと、DMA処理部から再び受け取ったIPヘッダに基づいて作成したTCP又はUDP擬似ヘッダに相当するデータとをチェックサム計算処理部に送ってTCP又はUDPのチェックサムの計算を行わせるようにしても良い。   Further, the frame created in the upper layer includes the MAC header, the IP header, the TCP or UDP header, and the TCP or UDP data in order, and the DMA processing unit performs the MAC header in the frame created in the upper layer. , IP header, TCP or UDP header, TCP or UDP data are sequentially transferred to the checksum control unit, and then the IP header in the frame created in the upper layer is transferred again to the checksum control unit, and the checksum control unit Writes the MAC header, IP header, TCP or UDP header, and TCP or UDP data received from the DMA processing unit to the buffer memory, and sends the IP header received from the DMA processing unit to the checksum calculation processing unit. Calculate header checksum, D A TCP or UDP header received from the A processing unit, and TCP or UDP data, and data corresponding to the TCP or UDP pseudo header created based on the IP header received again from the DMA processing unit to the checksum calculation processing unit It may be sent to calculate the TCP or UDP checksum.

また、本発明に係る半導体集積回路は、本発明に係るTCP/IP送信処理回路を具備する。   The semiconductor integrated circuit according to the present invention includes the TCP / IP transmission processing circuit according to the present invention.

以下、図面を参照しながら、本発明の実施の形態について説明する。なお、同一の構成要素については、同一の参照番号で示している。
図1は、本発明の一実施形態としてのTCP/IP(Transmission Control Protocol/Internet Protocol)送信処理回路を用いたコンピュータの概要を示すブロック図である。このコンピュータ1は、ネットワークNに接続された物理層処理回路(PHY)2と、MAC(Media Access Control)処理回路3と、MACブリッジ回路4と、本発明の一実施形態としてのTCP/IP送信処理回路5と、TCP/IP受信処理回路6と、インタフェース回路7と、CPU8と、メインメモリ9と、HDD(ハードディスクドライブ)10と、入力部11と、表示部12とを具備する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, about the same component, it has shown with the same reference number.
FIG. 1 is a block diagram showing an outline of a computer using a TCP / IP (Transmission Control Protocol / Internet Protocol) transmission processing circuit as an embodiment of the present invention. The computer 1 includes a physical layer processing circuit (PHY) 2 connected to a network N, a MAC (Media Access Control) processing circuit 3, a MAC bridge circuit 4, and TCP / IP transmission as an embodiment of the present invention. A processing circuit 5, a TCP / IP reception processing circuit 6, an interface circuit 7, a CPU 8, a main memory 9, an HDD (hard disk drive) 10, an input unit 11, and a display unit 12 are provided.

本実施形態においては、TCP/IP階層モデルのネットワークインタフェース層がEthernet(登録商標)であるものとし、物理層処理回路2、MAC処理回路3、及び、MACブリッジ回路4が、ネットワークインタフェース層を担うものとする。物理層処理回路2は、ネットワークNに接続されており、MAC処理回路3は、物理層処理回路2に接続されており、MACブリッジ回路4は、MAC処理回路3に接続されている。   In this embodiment, the network interface layer of the TCP / IP hierarchical model is assumed to be Ethernet (registered trademark), and the physical layer processing circuit 2, the MAC processing circuit 3, and the MAC bridge circuit 4 serve as the network interface layer. Shall. The physical layer processing circuit 2 is connected to the network N, the MAC processing circuit 3 is connected to the physical layer processing circuit 2, and the MAC bridge circuit 4 is connected to the MAC processing circuit 3.

また、本実施形態においては、TCP/IP階層モデルのインターネット層及びトランスポート層がIP(Internet Protocol)並びにTCP(Transmission Control Protocol)又はUDP(User Datagram Protocol)であるものとし、TCP/IP送信処理回路5、TCP/IP受信処理回路6、及び、インタフェース回路7が、インターネット層及びトランスポート層を担うものとする。TCP/IP送信処理回路5及びTCP/IP受信処理回路6は、MACブリッジ回路4とインタフェース回路7との間にそれぞれ接続されている。   In the present embodiment, the Internet layer and the transport layer of the TCP / IP hierarchical model are assumed to be IP (Internet Protocol) and TCP (Transmission Control Protocol) or UDP (User Datagram Protocol), and TCP / IP transmission processing Assume that the circuit 5, the TCP / IP reception processing circuit 6, and the interface circuit 7 serve as the Internet layer and the transport layer. The TCP / IP transmission processing circuit 5 and the TCP / IP reception processing circuit 6 are respectively connected between the MAC bridge circuit 4 and the interface circuit 7.

また、CPU8、メインメモリ9、HDD10、入力部11、及び、表示部12が、TCP/IP階層モデルのアプリケーション層を担うものとする。例えば、HDD10には、ウェブブラウザプログラム、メールクライアントプログラム等が記録されており、CPU8は、メインメモリ9を作業領域として使用しながら、これらのプログラムを実行する。CPU8、メインメモリ9、HDD10、入力部11、及び、表示部12は、バスBを介して接続されており、バスBは、インタフェース回路7に接続されている。   In addition, the CPU 8, the main memory 9, the HDD 10, the input unit 11, and the display unit 12 assume an application layer of the TCP / IP hierarchical model. For example, the HDD 10 stores a web browser program, a mail client program, and the like, and the CPU 8 executes these programs while using the main memory 9 as a work area. The CPU 8, the main memory 9, the HDD 10, the input unit 11, and the display unit 12 are connected via a bus B, and the bus B is connected to the interface circuit 7.

TCP/IP送信処理回路5は、DMA(Direct Memory Access)処理部21と、チェックサム制御部22と、バッファメモリ24と、チェックサム計算処理部25とを具備する。チェックサム制御部22は、IPチェックサムレジスタ23を有する。   The TCP / IP transmission processing circuit 5 includes a DMA (Direct Memory Access) processing unit 21, a checksum control unit 22, a buffer memory 24, and a checksum calculation processing unit 25. The checksum control unit 22 has an IP checksum register 23.

次に、TCP/IP送信処理回路5の動作について説明する。
図2は、TCP/IP送信処理回路5の第1の動作を示すフローチャートである。TCP/IP送信処理回路5の第1の動作は、アプリケーション層からトランスポート層及びインターネット層を利用するためのAPI(Application Programming Interface)において図3に示すフォーマットのフレームがメインメモリ9(図1参照)内に作成される場合における動作である。
Next, the operation of the TCP / IP transmission processing circuit 5 will be described.
FIG. 2 is a flowchart showing a first operation of the TCP / IP transmission processing circuit 5. The first operation of the TCP / IP transmission processing circuit 5 is that the frame of the format shown in FIG. 3 is the main memory 9 (see FIG. 1) in an API (Application Programming Interface) for using the transport layer and the Internet layer from the application layer. ) In the case of being created in ().

図3に示すフレームは、MACヘッダ(図3中のア参照)、IPヘッダ(図3中のイ参照)、TCPヘッダ(図3中のウ参照)、データ(図3中のエ参照)、及び、TCP擬似ヘッダ(図3中のオ参照)を含んでいる。なお、ここでは、TCPを用いることとしているが、UDPを用いる場合も同様にすれば良い。UDPを用いる場合には、フレームが、TCPヘッダ(図3中のウ参照)に代えてUDPヘッダを、TCP擬似ヘッダ(図3中のオ参照)に代えてUDP擬似ヘッダを含むようにすれば良い。   The frame shown in FIG. 3 includes a MAC header (see (a) in FIG. 3), an IP header (see (a) in FIG. 3), a TCP header (see (c) in FIG. 3), data (see (d) in FIG. 3), And a TCP pseudo header (see (e) in FIG. 3). Note that although TCP is used here, the same applies to the case of using UDP. In the case of using UDP, if the frame includes a UDP header instead of a TCP header (see c in FIG. 3) and a UDP pseudo header instead of a TCP pseudo header (see o in FIG. 3). good.

上位レイヤとしてのアプリケーション層において図3に示すフレームがメインメモリ9内に作成されると、TCP/IP送信処理部5内のDMA処理部21は、メインメモリ9からチェックサム制御部22へフレームのDMA転送を行う(ステップS11)。なお、DMA処理部21は、図3のフレーム中の上方から下方に向かって、すなわち、MACヘッダ、IPヘッダ、TCPヘッダ、データ、TCP擬似ヘッダの順(図3中のア→イ→ウ→エ→オの順)にDMA転送を行う。   When the frame shown in FIG. 3 is created in the main memory 9 in the application layer as the upper layer, the DMA processing unit 21 in the TCP / IP transmission processing unit 5 transfers the frame from the main memory 9 to the checksum control unit 22. DMA transfer is performed (step S11). Note that the DMA processing unit 21 proceeds from the top to the bottom in the frame of FIG. 3, that is, in the order of MAC header, IP header, TCP header, data, and TCP pseudo header (a → i → c → DMA transfer is performed in the order of d to o).

チェックサム制御部22は、DMA処理部21からMACヘッダを受け取ると、受け取ったMACヘッダをバッファメモリ24に書き込む(ステップS21)。   When receiving the MAC header from the DMA processing unit 21, the checksum control unit 22 writes the received MAC header in the buffer memory 24 (step S21).

次に、チェックサム制御部22は、DMA処理部21からIPヘッダを受け取ると、受け取ったIPヘッダをバッファメモリ24に書き込むとともに、チェックサム計算処理部25に送る(ステップS22)。チェックサム計算処理部25は、IPヘッダをチェックサム制御部22から受け取ってIPのヘッダ・チェックサムの計算を行い、計算の結果として得られたIPのヘッダ・チェックサムをチェックサム制御部22に送る(ステップS31)。チェックサム制御部22は、IPのヘッダ・チェックサムをチェックサム計算処理部25から受け取ると、IPチェックサムレジスタ23内に格納する(ステップS23)。   Next, when receiving the IP header from the DMA processing unit 21, the checksum control unit 22 writes the received IP header in the buffer memory 24 and sends it to the checksum calculation processing unit 25 (step S22). The checksum calculation processing unit 25 receives the IP header from the checksum control unit 22, calculates the IP header checksum, and sends the IP header checksum obtained as a result of the calculation to the checksum control unit 22. Send (step S31). Upon receiving the IP header checksum from the checksum calculation processing unit 25, the checksum control unit 22 stores it in the IP checksum register 23 (step S23).

さらに、チェックサム制御部22は、DMA処理部21からTCPヘッダ及びデータを受け取ると、受け取ったTCPヘッダ及びデータをバッファメモリ24に書き込むとともに、チェックサム計算処理部25に送る(ステップS23)。チェックサム計算処理部25は、TCPヘッダ及びデータをチェックサム制御部22から受け取ってTCPのチェックサムの計算を開始する(ステップS32)。   Further, when receiving the TCP header and data from the DMA processing unit 21, the checksum control unit 22 writes the received TCP header and data in the buffer memory 24 and sends the data to the checksum calculation processing unit 25 (step S23). The checksum calculation processing unit 25 receives the TCP header and data from the checksum control unit 22 and starts calculating the TCP checksum (step S32).

そして、チェックサム制御部22は、DMA処理部21からTCP擬似ヘッダを受け取ると、受け取ったTCP擬似ヘッダをチェックサム計算処理部25に送る(ステップS25)。なお、先に説明したように、TCP擬似ヘッダが実際にはネットワーク上に送信されないものであるため、チェックサム制御部22は、TCP擬似ヘッダのバッファメモリ24への書き込みを行わない。従って、バッファメモリ24には、図3中のMACヘッダ、IPヘッダ、TCPヘッダ、及び、データ(図3中のア〜エ)が格納されることとなる。   When the checksum control unit 22 receives the TCP pseudo header from the DMA processing unit 21, the checksum control unit 22 sends the received TCP pseudo header to the checksum calculation processing unit 25 (step S25). As described above, since the TCP pseudo header is not actually transmitted on the network, the checksum control unit 22 does not write the TCP pseudo header to the buffer memory 24. Therefore, the buffer memory 24 stores the MAC header, IP header, TCP header, and data (A to D in FIG. 3) in FIG.

その後、チェックサム制御部22は、バッファメモリ24内に格納されているフレーム(MACヘッダ、IPヘッダ、TCPヘッダ、及び、データを含む)の下位レイヤ(ここでは、図1中のMACブリッジ回路4)への転送を開始する(ステップS26)。なお、チェックサム制御部22は、バッファメモリ24内のMACヘッダ、IPヘッダ、TCPヘッダ、データの順(図3中のア→イ→ウ→エの順)にMACブリッジ回路4に転送する。   After that, the checksum control unit 22 lowers the frame (including the MAC header, IP header, TCP header, and data) stored in the buffer memory 24 (here, the MAC bridge circuit 4 in FIG. 1). ) Is started (step S26). The checksum control unit 22 transfers the MAC header, the IP header, the TCP header, and the data in the buffer memory 24 to the MAC bridge circuit 4 in the order of data (a → b → c → d in FIG. 3).

MACブリッジ回路4への転送において、チェックサム制御部22は、バッファメモリ24内のIPヘッダのヘッダ・チェックサム格納フィールドを読み出したときに、IPチェックサムレジスタ23内に格納されているIPのヘッダ・チェックサムをこのフィールドに挿入して、MACブリッジ回路4に送る。   In the transfer to the MAC bridge circuit 4, when the checksum control unit 22 reads the header / checksum storage field of the IP header in the buffer memory 24, the IP header stored in the IP checksum register 23 is read. Insert a checksum into this field and send it to the MAC bridge circuit 4.

一方、チェックサム計算処理部25は、TCP擬似ヘッダをチェックサム制御部22から受け取ってTCPのチェックサムの計算を終了し、計算の結果として得られたTCPのチェックサムをチェックサム制御部22に送る(ステップS32)。   On the other hand, the checksum calculation processing unit 25 receives the TCP pseudo header from the checksum control unit 22 and finishes calculating the TCP checksum, and sends the TCP checksum obtained as a result of the calculation to the checksum control unit 22. Send (step S32).

チェックサム制御部22は、バッファメモリ24内のTCPヘッダのチェックサム格納フィールドを読み出したときに、チェックサム計算処理部25からTCPのチェックサムを受け取ってこのフィールドに挿入し、MACブリッジ回路4に送る。その後、チェックサム制御部22は、バッファメモリ24内のデータをMACブリッジ回路4に送って、処理を終了する。   When the checksum control unit 22 reads the checksum storage field of the TCP header in the buffer memory 24, the checksum control unit 22 receives the TCP checksum from the checksum calculation processing unit 25 and inserts the TCP checksum into this field. send. Thereafter, the checksum control unit 22 sends the data in the buffer memory 24 to the MAC bridge circuit 4 and ends the process.

MACブリッジ回路4は、チェックサム制御部22から受け取ったフレームをMAC処理回路3に送り、MAC処理回路3は、MACブリッジ回路4から受け取ったフレームの末尾にフレームチェックシーケンス(Frame Check Sequence)を付加して物理層処理回路2に送り、物理層処理回路2は、受け取ったフレームをネットワークN上に送信する。   The MAC bridge circuit 4 sends the frame received from the checksum control unit 22 to the MAC processing circuit 3, and the MAC processing circuit 3 adds a frame check sequence to the end of the frame received from the MAC bridge circuit 4. The physical layer processing circuit 2 transmits the received frame on the network N.

以上説明したように、TCP/IP送信処理回路5によれば、1個のチェックサム計算処理部25を用いて、IPのヘッダ・チェックサム並びにTCP又はUDPのチェックサムの2つのチェックサムの計算を行うことが可能となる。これにより、小さい回路規模でTCP/IPの送信処理の速度を向上させることができる。   As described above, according to the TCP / IP transmission processing circuit 5, the calculation of two checksums of the IP header checksum and the TCP or UDP checksum is performed using one checksum calculation processing unit 25. Can be performed. Thereby, the speed of TCP / IP transmission processing can be improved with a small circuit scale.

なお、図4に示すように、一般に、TCP擬似ヘッダ、UDP擬似ヘッダは、TCPヘッダ、UDPヘッダの前に配置されることとなっている(RFC793、768等)。これに従い、上位レイヤがメインメモリ9内に作成するフレームが図4に示すフォーマットであるとすると、チェックサム制御部22は、MACヘッダ及びIPヘッダ(図4中のア及びイ)のバッファメモリ24への書き込み後、TCP擬似ヘッダ(図4中のウ)のバッファメモリ24への書き込みを行わず、その後、TCPヘッダ及びデータ(図4中のエ及びオ)のバッファメモリ24への書き込みを行う必要がある。すなわち、バッファメモリ24への書き込みの制御が複雑になってしまう。   As shown in FIG. 4, generally, the TCP pseudo header and the UDP pseudo header are arranged before the TCP header and the UDP header (RFC 793, 768, etc.). Accordingly, assuming that the frame created by the upper layer in the main memory 9 has the format shown in FIG. 4, the checksum control unit 22 uses the buffer memory 24 for the MAC header and IP header (a and i in FIG. 4). After writing to the buffer, the TCP pseudo header (c in FIG. 4) is not written to the buffer memory 24, and then the TCP header and data (d and v in FIG. 4) are written to the buffer memory 24. There is a need. That is, the control of writing to the buffer memory 24 becomes complicated.

一方、本実施形態においては、図3に示すように、上位レイヤがメインメモリ9内に作成するフレームにおいて、TCP擬似ヘッダ(図3中のオ参照)がフレームの末尾に配置されている。そのため、チェックサム制御部22は、MACヘッダ、IPヘッダ、TCPヘッダ、及び、データ(図3中のア〜エ)のバッファメモリ24への連続書き込み(バースト書き込み)を行うことができる。このように、書き込みの制御が容易になるとともに、書き込み速度を向上させることができる。   On the other hand, in the present embodiment, as shown in FIG. 3, in the frame created by the upper layer in the main memory 9, the TCP pseudo header (see (e) in FIG. 3) is arranged at the end of the frame. Therefore, the checksum control unit 22 can perform continuous writing (burst writing) of the MAC header, IP header, TCP header, and data (A to D in FIG. 3) to the buffer memory 24. As described above, writing control is facilitated and the writing speed can be improved.

なお、ここでは、TCPを用いる場合におけるTCP/IP送信処理回路5の動作について説明したが、UDPを用いる場合におけるTCP/IP送信処理回路5の動作も同様である。
また、本実施形態においては、ネットワークインタフェース層としてEthernet(登録商標)を用いることとしているが、他のものを用いるようにしても良い。また、アプリケーション層として、HTTP等、種々のものを用いることが可能である。
Although the operation of the TCP / IP transmission processing circuit 5 in the case of using TCP has been described here, the operation of the TCP / IP transmission processing circuit 5 in the case of using UDP is the same.
In the present embodiment, Ethernet (registered trademark) is used as the network interface layer, but other network interfaces may be used. Various applications such as HTTP can be used as the application layer.

次に、TCP/IP送信処理回路5の第2の動作について説明する。
図5は、TCP/IP送信処理回路5の第2の動作を示すフローチャートである。TCP/IP送信処理回路5の第2の動作は、アプリケーション層からトランスポート層及びインターネット層を利用するためのAPI(Application Programming Interface)において図6に示すフォーマットのフレームがメインメモリ9(図1参照)内に作成される場合における動作である。
Next, the second operation of the TCP / IP transmission processing circuit 5 will be described.
FIG. 5 is a flowchart showing a second operation of the TCP / IP transmission processing circuit 5. The second operation of the TCP / IP transmission processing circuit 5 is that the frame of the format shown in FIG. 6 is the main memory 9 (see FIG. 1) in the API (Application Programming Interface) for using the transport layer and the Internet layer from the application layer. ) In the case of being created in ().

図6に示すフレームは、MACヘッダ(図6中のア参照)、IPヘッダ(図6中のイ参照)、TCPヘッダ(図6中のウ参照)、及び、データ(図6中のエ参照)を含んでいる。なお、ここでは、TCPを用いることとしているが、UDPを用いる場合も同様にすれば良い。UDPを用いる場合には、フレームが、TCPヘッダ(図6中のウ参照)に代えてUDPヘッダを含むようにすれば良い。   The frame shown in FIG. 6 includes a MAC header (see a in FIG. 6), an IP header (see a in FIG. 6), a TCP header (see c in FIG. 6), and data (see d in FIG. 6). ) Is included. Note that although TCP is used here, the same applies to the case of using UDP. When UDP is used, the frame may include a UDP header instead of the TCP header (see c in FIG. 6).

上位レイヤとしてのアプリケーション層において図6に示すフレームがメインメモリ9内に作成されると、TCP/IP送信処理部5内のDMA処理部21は、メインメモリ9からチェックサム制御部22へフレームのDMA転送を行う(ステップS41)。なお、DMA処理部21は、図6のフレーム中の上方から下方に向かって、すなわち、MACヘッダ、IPヘッダ、TCPヘッダ、データの順(図6中のア→イ→ウ→エの順)にDMA転送を行う。   When the frame shown in FIG. 6 is created in the main memory 9 in the application layer as the upper layer, the DMA processing unit 21 in the TCP / IP transmission processing unit 5 transfers the frame from the main memory 9 to the checksum control unit 22. DMA transfer is performed (step S41). Note that the DMA processing unit 21 proceeds from the top to the bottom in the frame of FIG. 6, that is, in the order of the MAC header, the IP header, the TCP header, and the data (a → b → c → d in FIG. 6). DMA transfer is performed.

チェックサム制御部22は、DMA処理部21からMACヘッダを受け取ると、受け取ったMACヘッダをバッファメモリ24に書き込む(ステップS51)。   When receiving the MAC header from the DMA processing unit 21, the checksum control unit 22 writes the received MAC header in the buffer memory 24 (step S51).

次に、チェックサム制御部22は、DMA処理部21からIPヘッダを受け取ると、受け取ったIPヘッダをバッファメモリ24に書き込むとともに、チェックサム計算処理部25に送る(ステップS52)。チェックサム計算処理部25は、IPヘッダをチェックサム制御部22から受け取ってIPのヘッダ・チェックサムの計算を行い、計算の結果として得られたIPのヘッダ・チェックサムをチェックサム制御部22に送る(ステップS61)。チェックサム制御部22は、IPのヘッダ・チェックサムをチェックサム計算処理部25から受け取ると、IPチェックサムレジスタ23内に格納する(ステップS53)。   Next, when receiving the IP header from the DMA processing unit 21, the checksum control unit 22 writes the received IP header in the buffer memory 24 and sends it to the checksum calculation processing unit 25 (step S52). The checksum calculation processing unit 25 receives the IP header from the checksum control unit 22, calculates the IP header checksum, and sends the IP header checksum obtained as a result of the calculation to the checksum control unit 22. Send (step S61). Upon receiving the IP header checksum from the checksum calculation processing unit 25, the checksum control unit 22 stores it in the IP checksum register 23 (step S53).

さらに、チェックサム制御部22は、DMA処理部21からTCPヘッダ及びデータを受け取ると、受け取ったTCPヘッダ及びデータをバッファメモリ24に書き込むとともに、チェックサム計算処理部25に送る(ステップS53)。チェックサム計算処理部25は、TCPヘッダ及びデータをチェックサム制御部22から受け取ってTCPのチェックサムの計算を開始する(ステップS62)。なお、バッファメモリ24には、図6中のMACヘッダ、IPヘッダ、TCPヘッダ、及び、データ(図6中のア〜エ)が格納されることとなる。   Further, when receiving the TCP header and data from the DMA processing unit 21, the checksum control unit 22 writes the received TCP header and data in the buffer memory 24 and sends the data to the checksum calculation processing unit 25 (step S53). The checksum calculation processing unit 25 receives the TCP header and data from the checksum control unit 22 and starts calculating the TCP checksum (step S62). The buffer memory 24 stores the MAC header, IP header, TCP header, and data (A to D in FIG. 6) in FIG.

その後、DMA処理部21は、メインメモリ9内のIPヘッダをチェックサム制御部22に再度DMA転送する(ステップS42)。チェックサム制御部22は、IPヘッダを再度受け取ると、受け取ったIPヘッダを用いてTCP擬似ヘッダに相当するデータを作成し、チェックサム計算処理部25に送る(ステップS55)。図10に示すように、TCP擬似ヘッダは、送信元IPアドレス、あて先IPアドレス、プロトコル番号(TCPのプロトコル番号は「6」)、及び、パケット長(TCPヘッダ長とTCPペイロード長の和)の4つの情報を含んでいる。これらの情報のうち、送信元IPアドレス、あて先IPアドレス、及び、プロトコル番号は、IPヘッダに含まれている(図9参照)。また、パケット長は、IPヘッダ内のデータグラム長からIPヘッダ内のヘッダ長を減じることにより、求めることができる。   Thereafter, the DMA processing unit 21 DMA-transfers the IP header in the main memory 9 again to the checksum control unit 22 (step S42). Upon receiving the IP header again, the checksum control unit 22 creates data corresponding to the TCP pseudo header using the received IP header and sends the data to the checksum calculation processing unit 25 (step S55). As shown in FIG. 10, the TCP pseudo header includes a source IP address, a destination IP address, a protocol number (TCP protocol number is “6”), and a packet length (the sum of the TCP header length and the TCP payload length). Contains four pieces of information. Among these pieces of information, the source IP address, the destination IP address, and the protocol number are included in the IP header (see FIG. 9). The packet length can be obtained by subtracting the header length in the IP header from the datagram length in the IP header.

なお、TCP擬似ヘッダと同様に、UDP擬似ヘッダも、送信元IPアドレス、あて先IPアドレス、プロトコル番号(UDPのプロトコル番号は「17」)、及び、パケット長(UDPヘッダ長とUDPペイロード長の和)の4つの情報を含んでいる。これらの情報のうち、送信元IPアドレス、あて先IPアドレス、及び、プロトコル番号は、IPヘッダに含まれており、パケット長は、IPヘッダ内のデータグラム長からIPヘッダ内のヘッダ長を減じることにより、求めることができる。   Similar to the TCP pseudo header, the UDP pseudo header also includes a source IP address, a destination IP address, a protocol number (the UDP protocol number is “17”), and a packet length (the sum of the UDP header length and the UDP payload length). 4). Among these pieces of information, the source IP address, the destination IP address, and the protocol number are included in the IP header, and the packet length is obtained by subtracting the header length in the IP header from the datagram length in the IP header. Can be obtained.

再び図5を参照すると、チェックサム制御部22は、バッファメモリ24内に格納されているフレーム(MACヘッダ、IPヘッダ、TCPヘッダ、及び、データを含む)の下位レイヤ(MACブリッジ回路4)への転送を開始する(ステップS56)。なお、チェックサム制御部22は、バッファメモリ24内のMACヘッダ、IPヘッダ、TCPヘッダ、データの順(図6中のア→イ→ウ→エの順)にMACブリッジ回路4に転送する。   Referring to FIG. 5 again, the checksum control unit 22 moves to the lower layer (MAC bridge circuit 4) of the frame (including the MAC header, IP header, TCP header, and data) stored in the buffer memory 24. Is started (step S56). The checksum control unit 22 transfers the MAC header, IP header, TCP header, and data in the buffer memory 24 to the MAC bridge circuit 4 in the order of data (a → b → c → d in FIG. 6).

MACブリッジ回路4への転送において、チェックサム制御部22は、バッファメモリ24内のIPヘッダのヘッダ・チェックサム格納フィールドを読み出したときに、IPチェックサムレジスタ23内に格納されているIPのヘッダ・チェックサムをこのフィールドに挿入して、MACブリッジ回路4に送る。   In the transfer to the MAC bridge circuit 4, when the checksum control unit 22 reads the header / checksum storage field of the IP header in the buffer memory 24, the IP header stored in the IP checksum register 23 is read. Insert a checksum into this field and send it to the MAC bridge circuit 4.

一方、チェックサム計算処理部25は、TCP擬似ヘッダに相当するデータをチェックサム制御部22から受け取ってTCPのチェックサムの計算を終了し、計算の結果として得られたTCPのチェックサムをチェックサム制御部22に送る(ステップS62)。   On the other hand, the checksum calculation processing unit 25 receives the data corresponding to the TCP pseudo header from the checksum control unit 22 and ends the calculation of the TCP checksum, and the checksum obtained as a result of the calculation is the checksum. The data is sent to the control unit 22 (step S62).

チェックサム制御部22は、バッファメモリ24内のTCPヘッダのチェックサム格納フィールドを読み出したときに、チェックサム計算処理部25からTCPのチェックサムを受け取ってこのフィールドに挿入し、MACブリッジ回路4に送る。その後、チェックサム制御部22は、バッファメモリ24内のデータをMACブリッジ回路4に送って、処理を終了する。   When the checksum control unit 22 reads the checksum storage field of the TCP header in the buffer memory 24, the checksum control unit 22 receives the TCP checksum from the checksum calculation processing unit 25 and inserts the TCP checksum into this field. send. Thereafter, the checksum control unit 22 sends the data in the buffer memory 24 to the MAC bridge circuit 4 and ends the process.

以上説明したように、TCP/IP送信処理回路5によれば、1個のチェックサム計算処理部25を用いて、IPのヘッダ・チェックサム並びにTCP又はUDPのチェックサムの2つのチェックサムの計算を行うことが可能となる。   As described above, according to the TCP / IP transmission processing circuit 5, the calculation of two checksums of the IP header checksum and the TCP or UDP checksum is performed using one checksum calculation processing unit 25. Can be performed.

また、図6に示すように、上位レイヤがメインメモリ9内に作成するフレームにおいて、TCP擬似ヘッダを省略することが可能となる。   Further, as shown in FIG. 6, it is possible to omit the TCP pseudo header in a frame created in the main memory 9 by the upper layer.

なお、ここでは、TCPを用いる場合におけるTCP/IP送信処理回路5の動作について説明したが、UDPを用いる場合におけるTCP/IP送信処理回路5の動作も同様である。   Although the operation of the TCP / IP transmission processing circuit 5 in the case of using TCP has been described here, the operation of the TCP / IP transmission processing circuit 5 in the case of using UDP is the same.

本発明は、TCP/IP送信処理回路において利用可能である。このTCP/IP送信処理回路は、パーソナルコンピュータ、携帯電話装置、PDA、家庭電気製品(テレビジョン装置、冷蔵庫等)等に利用可能である。   The present invention can be used in a TCP / IP transmission processing circuit. This TCP / IP transmission processing circuit can be used in personal computers, mobile phone devices, PDAs, home appliances (television devices, refrigerators, etc.) and the like.

本発明の実施形態に係るTCP/IP送信処理回路を用いたシステムの図。The figure of the system using the TCP / IP transmission processing circuit concerning the embodiment of the present invention. 図1のTCP/IP送信処理回路5の動作を示すフローチャート。3 is a flowchart showing the operation of the TCP / IP transmission processing circuit 5 of FIG. 図1のメインメモリ9に作成されるフレームのフォーマットを示す図。The figure which shows the format of the flame | frame produced in the main memory 9 of FIG. 一般のフレームのフォーマットを示す図。The figure which shows the format of a general frame. 図1のTCP/IP送信処理回路5の動作を示すフローチャート。3 is a flowchart showing the operation of the TCP / IP transmission processing circuit 5 of FIG. 図1のメインメモリ9に作成されるフレームのフォーマットを示す図。The figure which shows the format of the flame | frame produced in the main memory 9 of FIG. OSI参照モデルとTCP/IP階層モデルとの対応関係を示す図。The figure which shows the correspondence of an OSI reference model and a TCP / IP hierarchy model. フレームのフォーマットを示す図。The figure which shows the format of a frame. IPパケットのフォーマットを示す図。The figure which shows the format of an IP packet. TCPパケットのフォーマットを示す図。The figure which shows the format of a TCP packet. UDPパケットのフォーマットを示す図。The figure which shows the format of a UDP packet.

符号の説明Explanation of symbols

1 コンピュータ、 2 物理層処理回路、 3 MAC処理回路、 4 MACブリッジ回路、 5 TCP/IP送信処理回路、 6 TCP/IP受信処理回路、 7 インタフェース回路、 8 CPU、 9 メインメモリ、 10 HDD、 11 入力部、 12 表示部、 21 DMA処理部、 22 チェックサム制御部、 23 IPチェックサムレジスタ、 24 バッファメモリ、 25 チェックサム計算処理部   DESCRIPTION OF SYMBOLS 1 Computer, 2 Physical layer processing circuit, 3 MAC processing circuit, 4 MAC bridge circuit, 5 TCP / IP transmission processing circuit, 6 TCP / IP reception processing circuit, 7 Interface circuit, 8 CPU, 9 Main memory, 10 HDD, 11 Input unit, 12 display unit, 21 DMA processing unit, 22 checksum control unit, 23 IP checksum register, 24 buffer memory, 25 checksum calculation processing unit

Claims (4)

TCP/IP(Transmission Control Protocol/Internet Protocol)の送信処理を行うための回路であって、
フレームを格納するためのバッファメモリと、
IP(Internet Protocol)のヘッダ・チェックサム並びにTCP(Transmission Control Protocol)又はUDP(User Datagram Protocol)のチェックサムの計算を行うためのチェックサム計算処理部と、
上位レイヤにおいて作成されたフレームをDMA(Direct Memory Access)転送するためのDMA処理部と、
上位レイヤにおいて作成されたフレームを前記DMA処理部から受け取って前記バッファメモリに書き込み、前記DMA処理部から受け取ったフレームに基づいて前記チェックサム計算処理部にIPのヘッダ・チェックサムの計算を行わせ、前記DMA処理部から受け取ったフレームに基づいて前記チェックサム計算処理部にTCP又はUDPのチェックサムの計算を行わせ、前記バッファメモリに格納されているフレーム内に前記チェックサム計算処理部によって計算されたIPのヘッダ・チェックサム並びにTCP又はUDPのチェックサムを挿入して下位レイヤに転送するためのチェックサム制御部と、
を具備する、TCP/IP送信処理回路。
A circuit for performing transmission processing of TCP / IP (Transmission Control Protocol / Internet Protocol),
A buffer memory for storing frames;
A checksum calculation processing unit for calculating an IP (Internet Protocol) header checksum and a TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) checksum;
A DMA processing unit for DMA (Direct Memory Access) transfer of a frame created in an upper layer;
A frame created in an upper layer is received from the DMA processing unit and written to the buffer memory, and the checksum calculation processing unit is caused to calculate an IP header checksum based on the frame received from the DMA processing unit. , Causing the checksum calculation processing unit to calculate a TCP or UDP checksum based on the frame received from the DMA processing unit, and calculating the checksum calculation processing unit within the frame stored in the buffer memory. A checksum controller for inserting the IP header checksum and the TCP or UDP checksum and transferring them to a lower layer;
A TCP / IP transmission processing circuit comprising:
上位レイヤにおいて作成されたフレームが、MAC(Media Access Control)ヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータ、並びに、TCP又はUDP擬似ヘッダを順に含んでおり、
前記DMA処理部が、
上位レイヤにおいて作成されたフレーム内のMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータ、TCP又はUDP擬似ヘッダを順に前記チェックサム制御部に転送し、
前記チェックサム制御部が、
前記DMA処理部から受け取ったMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータを前記バッファメモリに書き込み、前記DMA処理部から受け取ったIPヘッダを前記チェックサム計算処理部に送ってIPのヘッダ・チェックサムの計算を行わせ、前記DMA処理部から受け取ったTCP又はUDPヘッダ、TCP又はUDPデータ、並びに、TCP又はUDP擬似ヘッダを前記チェックサム計算処理部に送ってTCP又はUDPのチェックサムの計算を行わせる、請求項1記載のTCP/IP送信処理回路。
The frame created in the upper layer includes a MAC (Media Access Control) header, an IP header, a TCP or UDP header, a TCP or UDP data, and a TCP or UDP pseudo header in order,
The DMA processing unit
Transfer MAC header, IP header, TCP or UDP header, TCP or UDP data, TCP or UDP pseudo header in the frame created in the upper layer to the checksum control unit in order,
The checksum control unit
Write the MAC header, IP header, TCP or UDP header, and TCP or UDP data received from the DMA processing unit to the buffer memory, and send the IP header received from the DMA processing unit to the checksum calculation processing unit. IP header checksum calculation is performed, and the TCP or UDP header, TCP or UDP data, and TCP or UDP pseudo header received from the DMA processor are sent to the checksum calculator to send a TCP or UDP header. The TCP / IP transmission processing circuit according to claim 1, wherein checksum calculation is performed.
上位レイヤにおいて作成されたフレームが、MACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータを順に含んでおり、
前記DMA処理部が、
上位レイヤにおいて作成されたフレーム内のMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、TCP又はUDPデータを順に前記チェックサム制御部に転送し、その後、上位レイヤにおいて作成されたフレーム内のIPヘッダを前記チェックサム制御部に再び転送し、
前記チェックサム制御部が、
前記DMA処理部から受け取ったMACヘッダ、IPヘッダ、TCP又はUDPヘッダ、並びに、TCP又はUDPデータを前記バッファメモリに書き込み、前記DMA処理部から受け取ったIPヘッダを前記チェックサム計算処理部に送ってIPのヘッダ・チェックサムの計算を行わせ、前記DMA処理部から受け取ったTCP又はUDPヘッダ、並びに、TCP又はUDPデータと、前記DMA処理部から再び受け取ったIPヘッダに基づいて作成したTCP又はUDP擬似ヘッダに相当するデータとを前記チェックサム計算処理部に送ってTCP又はUDPのチェックサムの計算を行わせる、請求項1記載のTCP/IP送信処理回路。
The frame created in the upper layer includes a MAC header, an IP header, a TCP or UDP header, and TCP or UDP data in order,
The DMA processing unit
The MAC header, IP header, TCP or UDP header, TCP or UDP data in the frame created in the upper layer are sequentially transferred to the checksum control unit, and then the IP header in the frame created in the upper layer is Transfer again to the checksum control,
The checksum control unit
Write the MAC header, IP header, TCP or UDP header, and TCP or UDP data received from the DMA processing unit to the buffer memory, and send the IP header received from the DMA processing unit to the checksum calculation processing unit. The TCP or UDP header that is calculated based on the TCP or UDP header received from the DMA processing unit and the TCP or UDP data and the IP header received again from the DMA processing unit. The TCP / IP transmission processing circuit according to claim 1, wherein data corresponding to a pseudo header is sent to the checksum calculation processing unit to calculate a TCP or UDP checksum.
請求項1〜3のいずれか1項記載のTCP/IP送信処理回路を具備する半導体集積回路。   A semiconductor integrated circuit comprising the TCP / IP transmission processing circuit according to claim 1.
JP2005120776A 2005-04-19 2005-04-19 Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same Withdrawn JP2006303765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005120776A JP2006303765A (en) 2005-04-19 2005-04-19 Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005120776A JP2006303765A (en) 2005-04-19 2005-04-19 Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same

Publications (1)

Publication Number Publication Date
JP2006303765A true JP2006303765A (en) 2006-11-02

Family

ID=37471549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005120776A Withdrawn JP2006303765A (en) 2005-04-19 2005-04-19 Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same

Country Status (1)

Country Link
JP (1) JP2006303765A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495241B2 (en) 2008-08-29 2013-07-23 Renesas Electronics Corporation Communication apparatus and method therefor
CN105897689A (en) * 2015-02-17 2016-08-24 爱思开海力士有限公司 Embedded system and method thereof
JP2017103648A (en) * 2015-12-02 2017-06-08 キヤノン株式会社 Arithmetic unit, arithmetic method, and communication apparatus
JP2019201249A (en) * 2018-05-14 2019-11-21 キヤノン株式会社 Communication device, communication device control method, and program
US10701041B2 (en) 2015-12-11 2020-06-30 Canon Kabushiki Kaisha Calculation device, calculation method, communication apparatus, and storage medium
US10833703B2 (en) 2017-12-13 2020-11-10 Canon Kabushiki Kaisha DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495241B2 (en) 2008-08-29 2013-07-23 Renesas Electronics Corporation Communication apparatus and method therefor
CN105897689A (en) * 2015-02-17 2016-08-24 爱思开海力士有限公司 Embedded system and method thereof
CN105897689B (en) * 2015-02-17 2020-10-30 爱思开海力士有限公司 Embedded system and method thereof
JP2017103648A (en) * 2015-12-02 2017-06-08 キヤノン株式会社 Arithmetic unit, arithmetic method, and communication apparatus
US10701041B2 (en) 2015-12-11 2020-06-30 Canon Kabushiki Kaisha Calculation device, calculation method, communication apparatus, and storage medium
US10833703B2 (en) 2017-12-13 2020-11-10 Canon Kabushiki Kaisha DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium
US11336297B2 (en) 2017-12-13 2022-05-17 Canon Kabushiki Kaisha DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium
JP2019201249A (en) * 2018-05-14 2019-11-21 キヤノン株式会社 Communication device, communication device control method, and program
JP7142462B2 (en) 2018-05-14 2022-09-27 キヤノン株式会社 COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND PROGRAM

Similar Documents

Publication Publication Date Title
JP4344576B2 (en) Packet communication device
US20180067855A1 (en) Shared buffered memory routing
JP4726601B2 (en) End-to-end data integrity protection for PCI-EXPRESS based input / output adapters
US8495262B2 (en) Using a table to determine if user buffer is marked copy-on-write
US8214535B2 (en) Changing Ethernet MTU size on demand with no data loss
US8495241B2 (en) Communication apparatus and method therefor
US20080304481A1 (en) System and Method of Offloading Protocol Functions
JP2006325054A (en) Tcp/ip reception processing circuit and semiconductor integrated circuit provided with the same
JP2006303765A (en) Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same
US11271856B2 (en) Concept for segmenting an application buffer into data packets
US8576861B2 (en) Method and apparatus for processing packets
KR20190062166A (en) Communication system and method for network address translation
US9137199B2 (en) Stateful NAT64 function in a distributed architecture
US20070127485A1 (en) Apparatus and method for transmitting packet IP offload
AU2013235609B2 (en) Read-throttled input/output scheduler
JP2006332927A (en) Tcp/ip reception processing circuit and semiconductor integrated circuit having it
US11336297B2 (en) DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium
JP6976786B2 (en) Communication device and control method of communication device
JP6618330B2 (en) COMMUNICATION DEVICE AND METHOD, COMPUTER PROGRAM
JP4418409B2 (en) PREMIUM PACKET IDENTIFICATION DEVICE, TERMINAL DEVICE, PREMIER PACKET IDENTIFICATION SYSTEM, AND PREMIER PACKET IDENTIFICATION METHOD
US9281990B2 (en) Ethernet UDP checksum compensation
JP2009130891A (en) Information processing apparatus and frame relay method
JP2004064492A (en) Communication apparatus and method for transmitting/receiving packet
JP5964692B2 (en) Protocol conversion support apparatus, protocol conversion support method, and protocol conversion support program
JP4321390B2 (en) Semiconductor integrated circuit

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070404

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080701