JP3512146B2 - Device driver device - Google Patents

Device driver device

Info

Publication number
JP3512146B2
JP3512146B2 JP27365697A JP27365697A JP3512146B2 JP 3512146 B2 JP3512146 B2 JP 3512146B2 JP 27365697 A JP27365697 A JP 27365697A JP 27365697 A JP27365697 A JP 27365697A JP 3512146 B2 JP3512146 B2 JP 3512146B2
Authority
JP
Japan
Prior art keywords
interrupt
communication
data
dma
memory
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.)
Expired - Fee Related
Application number
JP27365697A
Other languages
Japanese (ja)
Other versions
JPH1196106A (en
Inventor
雄一 ▲高▼▲柳▼
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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP27365697A priority Critical patent/JP3512146B2/en
Publication of JPH1196106A publication Critical patent/JPH1196106A/en
Application granted granted Critical
Publication of JP3512146B2 publication Critical patent/JP3512146B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、様々な外部装置を
有するデスクトップパソコン、ノートパソコン、車載端
末等において、任意の拡張バス(10base-Tや高速車載L
ANなど)で接続された外部装置とデバイス間のデータ
送受信を行うためのデバイスドライバ装置に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a desktop personal computer having various external devices, a notebook personal computer, an in-vehicle terminal or the like, and an optional expansion bus (10base-T or high-speed in-vehicle L).
The present invention relates to a device driver device for transmitting / receiving data between an external device and a device connected via an AN or the like.

【0002】[0002]

【従来の技術】車載端末のハードウエアの設計開発で
は、車載端末と外部装置との間で双方向通信を行うため
に、各接続形態とそれに伴う通信プロトコルに合わせた
形でそれぞれ通信ドライバを作成している。
2. Description of the Related Art In the design and development of in-vehicle terminal hardware, in order to perform bidirectional communication between an in-vehicle terminal and an external device, a communication driver is created in accordance with each connection form and the accompanying communication protocol. is doing.

【0003】接続形態及び通信プロトコルに合わせた形
で作成した通信ドライバは、例えばデータ伝送量の増大
に伴うバスのI/Fが変更になった場合、それに合わせ
て通信ドライバを1から作り直していた。また、アプリ
ケーションの処理中に種々の割込みが発生するが、ある
特定の割込番号で構築されたデバイスドライバは同じ割
込番号の割付が可能なハードウエアでなければ接続して
も割り込みを入れることができなかった。
The communication driver created according to the connection form and the communication protocol, for example, when the I / F of the bus is changed due to an increase in the amount of data transmission, the communication driver is recreated from 1 according to the change. . Also, while various interrupts occur during application processing, a device driver built with a specific interrupt number must generate an interrupt even if it is connected to hardware that does not allow assignment of the same interrupt number. I couldn't.

【0004】[0004]

【発明が解決しようとする課題】このように、従来は単
に接続形態のバスが違うためだけの理由で送受信デバイ
スドライバが複数のバージョン存在し、ある部分を修正
する際に全てのバージョンに対して修正をかけなければ
ならずメンテナンス工数が多いという課題が生じてい
た。
As described above, in the related art, there are a plurality of versions of the transmission / reception device driver simply because the buses of the connection forms are different. There was a problem that a lot of maintenance man-hours had to be applied.

【0005】本発明は、以上のような実情に鑑みてなさ
れたものであり、接続形態や通信プロトコルなどのハー
ドウエア環境の違いを自動的に吸収して容易に複数台の
間で双方向通信を可能にするデバイスドライバ装置を提
供することを目的とする。
The present invention has been made in view of the above circumstances, and automatically absorbs a difference in hardware environment such as a connection form and a communication protocol to easily perform bidirectional communication between a plurality of devices. It is an object of the present invention to provide a device driver device that enables the above.

【0006】[0006]

【課題を解決するための手段】本発明は、上記課題を解
決するために以下のような手段を講じた。
The present invention has taken the following means in order to solve the above problems.

【0007】[0007]

【0008】[0008]

【0009】[0009]

【0010】[0010]

【0011】請求項に記載の発明は、デバイスに接続
された外部装置のアプリケーション部に対して割込みを
入れる割込機能と前記デバイスとの間でDMA( Direct
memory access )転送によるデータ伝送を実行するD
MA機能とを備え、前記外部装置に搭載したアプリケー
ションで使用している割込番号の登録された割込番号テ
ーブルから空いている割込番号を検出し、検出した空き
割込番号を前記外部装置との双方向通信に使用する送信
用及び受信用の割込番号として登録する構成を採る。
The invention according to claim 1 connects to a device.
An interrupt to the application section of the external device
DMA ( Direct
memory access ) D to perform data transfer by transfer
And a MA function, the detecting the interrupt number vacant from registered interrupt number table of the interrupt number used by an application installed in an external device, the external device by detecting empty interrupt number was It is configured to be registered as an interrupt number for transmission and reception used for two-way communication with.

【0012】この構成により、割込番号を任意に切り替
えることにより他の外部装置が接続されている状態をそ
のまま変更することなく汎用的に使用することができ、
またDMA転送の最小単位を外部装置のメモリ制限に合
わせることによりメモリの増設を行うこと無く高速な双
方向通信が可能になる。また、接続されているハードウ
エアのメーカ及び他の外部装置に依存することなく、複
数の台数で双方向通信をおこなうことが可能となる。
With this configuration, the interrupt number can be switched arbitrarily.
The state that other external devices are connected is
It can be used universally without changing,
In addition, the minimum unit of DMA transfer must meet the memory limit of the external device.
By doing so, high-speed
Directional communication becomes possible. In addition, bidirectional communication can be performed by a plurality of units without depending on the manufacturer of the connected hardware and other external devices.

【0013】[0013]

【0014】[0014]

【0015】請求項に記載の発明は、デバイスに接続
された外部装置のアプリケーション部に対して割込みを
入れる割込機能と前記デバイスとの間でDMA( Direct
memory access )転送によるデータ伝送を実行するD
MA機能とを備え、前記外部装置に搭載したオペレーテ
ィングシステムがメモリ領域の管理に使用しているメモ
リ管理部からメモリ容量の制限情報を抽出し、抽出した
制限情報からDMA転送時の1ブロック当りのデータ転
送量を計算する構成を採る。
The invention according to claim 2 is connected to a device.
An interrupt to the application section of the external device
DMA ( Direct
memory access ) D to perform data transfer by transfer
An MA having a MA function is used to extract memory capacity limit information from a memory management unit used by the operating system mounted on the external device to manage a memory area, and one block per block at the time of DMA transfer is extracted from the extracted limit information. Adopt a configuration that calculates the data transfer amount.

【0016】この構成により、割込番号を任意に切り替
えることにより他の外部装置が接続されている状態をそ
のまま変更することなく汎用的に使用することができ、
またDMA転送の最小単位を外部装置のメモリ制限に合
わせることによりメモリの増設を行うこと無く高速な双
方向通信が可能になる。また、実行環境においてメモリ
が64バイト以内でおこなえることになる。そのた
め、接続するマシンにメモリ増設することなく標準の形
態で利用できるし、また各種OSの制限がないことを意
味する。例えばMS−DOSでは64バイトを越える
データ確保はできない。そのため64Kバイトを越える
データ転送は64Kバイトを1つの単位とするような処
理をアプリケーションで工夫せざるおえなかった。その
ため、それに伴い大規模データの場合に通信の転送時間
がかかっていた。また、システムとしての最大メモリ確
保量をシステム毎に検討しなければならないという問題
があった。ところが、本発明によると、自動的にDMA
転送時の最小単位を算出するために、アプリケーション
がデータの分割をすることなく通信が可能となるもので
ある。
With this configuration, the interrupt number can be switched arbitrarily.
The state that other external devices are connected is
It can be used universally without changing,
In addition, the minimum unit of DMA transfer must meet the memory limit of the external device.
By doing so, high-speed
Directional communication becomes possible. Also, the memory will be carried out at up to 64 K bytes in the execution environment. Therefore, it means that it can be used in a standard form without adding memory to the connected machine, and that there are no restrictions on various OSs. For example, the data securing exceeding 64 K bytes in MS-DOS can not. Therefore, for data transfer exceeding 64 Kbytes, the application had to devise a process such that 64 Kbytes were one unit. As a result, the transfer time of communication has been increased in the case of large-scale data. In addition, there is a problem that the maximum memory reservation amount as a system must be examined for each system. However, according to the present invention, the DMA is automatically
The application enables communication without dividing the data in order to calculate the minimum unit at the time of transfer.

【0017】[0017]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して具体的に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be specifically described below with reference to the drawings.

【0018】図1は、本発明にかかる一実施の形態の機
能ブロック図である。本実施の形態は、パーソナルコン
ピュータと同等の機能(ハードウエア・ソフトウエア)
をもつ車載端末とこれに様々なバス(10base-Tや高速車
載LANなど)で接続されるデバイスとの間の双方向通
信を行うための通信ドライバ装置の例である。
FIG. 1 is a functional block diagram of an embodiment according to the present invention. This embodiment has the same functions (hardware and software) as a personal computer.
It is an example of a communication driver device for performing bidirectional communication between a vehicle-mounted terminal having a terminal and a device connected to the vehicle-mounted terminal by various buses (10base-T, high-speed vehicle-mounted LAN, etc.).

【0019】通信ドライバ装置1は、外部装置となる車
載端末と所定の接続形態で接続されるデバイス2との間
の双方向通信を行うための通信ドライバであり、車載端
末上のアプリケーションの双方向通信指示部3からデー
タが与えられ、又はデバイス2からのデータを双方向通
信指示部3へ通知する。
The communication driver device 1 is a communication driver for performing bidirectional communication between an in-vehicle terminal which is an external device and a device 2 connected in a predetermined connection form. Data is given from the communication instruction unit 3 or data from the device 2 is notified to the bidirectional communication instruction unit 3.

【0020】この通信ドライバ装置1は、初期化部1
1、双方向通信部12、送受信用データメモリ13、メ
ッセージ分解/変換/組立部14、フレーム送受信部1
5、主側DMA16、送信割込通知部17、受信割込通
知部18を備える。
The communication driver device 1 includes an initialization unit 1
1, bidirectional communication unit 12, transmission / reception data memory 13, message disassembly / conversion / assembly unit 14, frame transmission / reception unit 1
5, a DMA 16 on the main side, a transmission interrupt notification unit 17, and a reception interrupt notification unit 18.

【0021】初期化部11は、システム立上げ時にアプ
リケーションと無関係に初期化の処理を実行する部分で
あり、初期化処理の中に通信プロトコルの選定、割込番
号の自動割り当て、DMA転送のための初期化メモリ領
域の計算(最大メモリ領域)が含まれている。
The initialization section 11 is a section which executes initialization processing independently of an application when the system is started up. For initialization of communication protocol selection, automatic allocation of interrupt numbers and DMA transfer. Contains the initialization memory area calculation (max memory area).

【0022】双方向通信部12は、双方向通信指示部3
(外部接続装置の双方向用のアプリケーション部)から
指示されたデータ種別を判別して、小規模データ、大規
模データ、同報データへと振り分けを行う部分である。
双方向通信部12には、RS232C、TCP/IP、
高速車載LANなどの複数の通信プロトコルに対応でき
るようになっていて、後述するプロトコルフォーマット
設定ファイル19の設定内容に従って通信環境が整備さ
れる。
The bidirectional communication section 12 includes a bidirectional communication instruction section 3
This is a part that discriminates the data type instructed from the (bidirectional application part of the external connection device) and distributes it to small-scale data, large-scale data, and broadcast data.
The bidirectional communication unit 12 includes RS232C, TCP / IP,
It is possible to support a plurality of communication protocols such as a high-speed in-vehicle LAN, and the communication environment is prepared according to the setting contents of the protocol format setting file 19 described later.

【0023】送受信用データメモリ13は、小規模デー
タ、大規模データ、グループ同報及び一斉同報などの送
信データ及び受信データを保存する領域である。小規模
データはデフォルト状態では16バイト以下のデータ長
をさすものとするが、ユーザが設定ファイルに記述する
ことで、そのデータ長を変えることが可能である。な
お、小規模データの場合はDMAを用いることによる効
果があまり得られないために、バス(シリアル・パラレ
ル)系由でデータを転送する。大規模データは、デフォ
ルト状態では16バイトを越えるデータ長を意味する。
大規模データの場合は1ブロックで決定される最小単位
に分割・組立をおこないDMA転送による接続装置間の
双方向データ通信をおこなうものである。グループ同報
及び一斉同報データは、設定ファイルに記述された内容
に基づき、グループ単位または一斉に同じ情報を接続さ
れている装置全てに同報通信するものである。
The transmission / reception data memory 13 is an area for storing transmission data and reception data such as small-scale data, large-scale data, group broadcast and simultaneous broadcast. In the default state, the small-scale data has a data length of 16 bytes or less, but the user can change the data length by describing it in the setting file. In the case of small-scale data, the effect obtained by using the DMA is not so great, so the data is transferred by a bus (serial / parallel) system. Large-scale data means a data length exceeding 16 bytes in the default state.
In the case of large-scale data, the data is divided / assembled into the minimum unit determined by one block, and bidirectional data communication is performed between the connection devices by DMA transfer. The group broadcast and broadcast data is for broadcasting the same information to all connected devices in group units or all at once, based on the contents described in the setting file.

【0024】メッセージ分解/変換/組立部14は、プ
ロトコルフォーマット設定ファイル19の設定内容に合
わせた形でアプリケーションからの要求データや受信デ
ータをそれぞれのデバイスで認識できるような形に解釈
変換するものである。
The message disassembling / converting / assembling unit 14 interprets and converts the request data and the received data from the application into a form that can be recognized by each device according to the setting contents of the protocol format setting file 19. is there.

【0025】フレーム送受信部15は、プロトコル設定
フォーマットファイル19の中身に合わせた形でのフレ
ームの送受信を行う部分である。
The frame transmission / reception section 15 is a section for transmitting / receiving a frame in accordance with the contents of the protocol setting format file 19.

【0026】主側DMA16は、外部接続されている外
部装置のDMA(Direct memoryaccess)機能を構成し
ている部分であり、この主側DMA16と従側のDMA
21との間で通信ケーブルを通して双方向にデータがや
りとりされる。
The master side DMA 16 is a part constituting a DMA (Direct memory access) function of an externally connected external device, and the master side DMA 16 and the slave side DMA 16 are provided.
Data is bidirectionally exchanged with the device 21 through the communication cable.

【0027】送信割込通知部17は、アプリケーション
の送信が完了したことをデバイスドライバ側からアプリ
ケーション側に通知するものであり、受信割込通知部1
8は、アプリケーションに対してデータが受信されたこ
とをデバイスドライバ側からアプリケーションに通知す
る部分である。送信割込通知部17及び受信割込通知部
18は初期化部11が自動設定した割込番号を使用して
割込みを発生させる。
The transmission interrupt notifying section 17 is for notifying the application side from the device driver side that the transmission of the application is completed, and the reception interrupt notifying section 1
Reference numeral 8 is a part for informing the application that the device driver has received the data. The transmission interrupt notifying unit 17 and the reception interrupt notifying unit 18 use the interrupt numbers automatically set by the initialization unit 11 to generate an interrupt.

【0028】プロトコルフォーマット設定ファイル19
は、外部装置とどのように接続されるのかを記述するも
のであり、シリアル・パラレル・TCP/IP・高速車載LA
Nなどの基本通信条件を記述するものである。デバイス
ドライバ側はこのプロトコルフォーマット設定ファイル
19の設定内容を参照しながら初期化及びデータの送受
信をおこなう。
Protocol format setting file 19
Describes how to connect to an external device, including serial, parallel, TCP / IP, and high-speed in-vehicle LA.
It describes basic communication conditions such as N. The device driver side performs initialization and data transmission / reception while referring to the setting contents of the protocol format setting file 19.

【0029】図2にプロトコルフォーマット設定ファイ
ル19の設定例が示されている。
FIG. 2 shows a setting example of the protocol format setting file 19.

【0030】プロトコルフォーマット設定ファイル19
は、通信するための通信プロトコルを記述するための設
定ファイルであり、利用者が各々用意する。プロトコル
フォーマット設定ファイル19には、[通信手順]、
[通信速度][データ長][パリティ][ストップビッ
ト][CR,CR/LF変換][ポート][フロー制
御][OS]等が設定される。たとえば、ユーザは接続
形態に対応した通信手順を[通信手順]から選択する。
図2は[通信手順]から高速車載LANを選択した例を
図示している。また、ユーザは通信速度、パリティ有り
無しなどを設定する。各々の設定の中で「;」で始まる
記述は無効であることを示している。TCP/IP及び
高速車載LANの場合は、通信スピード等は接続される
LANボードに設定された通信速度に規定されるので、
[通信速度]以降の記述は無効となる。システムが稼働し
ているOSを記述する項目には、MS−DOS,WIN
DOWS95(Microsoft Corporationの登録商標)等
のOS名を設定する。
Protocol format setting file 19
Is a setting file for describing the communication protocol for communication and is prepared by the user. In the protocol format setting file 19, [communication procedure],
[Communication speed] [Data length] [Parity] [Stop bit] [CR, CR / LF conversion] [Port] [Flow control] [OS] etc. are set. For example, the user selects a communication procedure corresponding to the connection form from [communication procedure].
FIG. 2 illustrates an example in which a high-speed vehicle LAN is selected from [Communication Procedure]. In addition, the user sets the communication speed, the presence / absence of parity, and the like. The description starting with “;” in each setting is invalid. In the case of TCP / IP and high-speed in-vehicle LAN, the communication speed is specified by the communication speed set on the LAN board to be connected.
The description after [Communication speed] is invalid. The items that describe the operating system are MS-DOS, WIN
Set the OS name such as DOWS95 (registered trademark of Microsoft Corporation).

【0031】デバイス2は、デバイスドライバ装置1と
いろいろな通信プロトコルを用いた線(有線及び無線)
で接続されているものとし、デバイスドライバ側(外部
装置)からDMA転送された時の受け口となる従側DM
A21を備えている。
The device 2 is a line (wired or wireless) using the device driver apparatus 1 and various communication protocols.
It is assumed that the device is connected by the device driver side (external device), and the slave side DM is a receiving port when the DMA transfer is performed.
Equipped with A21.

【0032】また、双方向通信指示部3は、外部に接続
された外部装置との情報の双方向通信をコントロールす
るアプリケーション部であり、一斉同報通信などを含
む。外部装置のOS上に割込番号の状態が登録されてい
る割込ハンドラテーブル31やメモリ情報を管理するメ
モリマネジャ32等がサポートされている。
The bidirectional communication instructing section 3 is an application section for controlling bidirectional communication of information with an external device connected to the outside, and includes simultaneous broadcast communication and the like. The interrupt handler table 31 in which the state of the interrupt number is registered on the OS of the external device, the memory manager 32 for managing the memory information, and the like are supported.

【0033】次に、図3を用いて本実施の形態のデバイ
スドライバが空いている割込番号をいかに検出するかを
示す。このデバイスドライバ装置1は、初期化部11が
最初のシステム立上げ時に外部装置のOS上にサポート
されている割込ハンドラテーブル31を読み込む。割込
ハンドラテーブル31には、どの割込番号が使用されて
いて、どの割込み番号が使用されていないかがわかるよ
うになっている。そこで、初期化部11が割込ハンドラ
テーブル31を参照して個々の割込み番号について空い
ているかどうかをチェックする(ステップS1)。図
に示す例では割込番号1、4が空き状態になっている。
Next, FIG. 3 shows how the device driver of this embodiment detects a vacant interrupt number. In the device driver device 1, the initialization unit 11 reads the interrupt handler table 31 supported by the OS of the external device when the system is first started up. In the interrupt handler table 31, it is possible to know which interrupt number is used and which interrupt number is not used. Therefore, the initialization unit 11 refers to the interrupt handler table 31 to check whether each interrupt number is free (step S1). Figure 3
In the example shown in, the interrupt numbers 1 and 4 are in an empty state.

【0034】次に、空いている割込番号をサーチして小
さい番号から2つを選び割込テーブル31に登録する
(ステップS2)。そして、その割込番号に対する関数
ベクタの設定をその割込番号に対応する位置へと強制的
に書き込む(ステップS3)。割込番号1に対応した関
数ベクタは、システムの受信処理部のベクトル番地を示
し、割込番号4に対応した関数ベクタは、システムの送
信処理部のベクトル番地を示す。この結果、データが送
受信された場合に特定の割り込みがデバイスドライバ側
に通知されるようになる。
Next, a vacant interrupt number is searched, two small numbers are selected and registered in the interrupt table 31 (step S2). Then, the setting of the function vector for the interrupt number is forcibly written to the position corresponding to the interrupt number (step S3). The function vector corresponding to the interrupt number 1 indicates the vector address of the reception processing unit of the system, and the function vector corresponding to the interrupt number 4 indicates the vector address of the transmission processing unit of the system. As a result, when data is transmitted / received, a specific interrupt is notified to the device driver side.

【0035】このように、割込ハンドラテーブル31か
ら空いている割込番号を2つ検出して送信用及び受信用
として任意の2つの割込番号を持たせることにより、接
続されているハードウエアのメーカー及び外部装置に依
存すること無く、複数台の間で双方向通信を行うことが
できるようになる。
As described above, two free interrupt numbers are detected from the interrupt handler table 31 and given two arbitrary interrupt numbers for transmission and reception, thereby connecting the connected hardware. It becomes possible to perform two-way communication between a plurality of devices without depending on the manufacturer and external device.

【0036】次に、図4を用いてDMAを用いてのデー
タを転送するための最小限のパケット設定の方法につい
て説明する。
Next, a minimum packet setting method for transferring data using DMA will be described with reference to FIG.

【0037】通信ドライバ装置1の初期化部11は、シ
ステムを立ち上げた時にシステムが稼働しているOSに
応じたメモリ情報取得関数を呼び出す。WINDOWS
95の場合を例にとると、Global Memory Statusをコ
ールすることになる(ステップT1)。メモリ情報取得
関数を使って外部装置のOS上にサポートされているメ
モリマネジャ32からメモリ情報を読み出す。
The initialization unit 11 of the communication driver device 1 calls a memory information acquisition function corresponding to the OS on which the system is operating when the system is started up. WINDOWS
Taking the case of 95 as an example, Global Memory Status is called (step T1). The memory information is read from the memory manager 32 supported by the OS of the external device using the memory information acquisition function.

【0038】図5に示すメモリ情報構造体50を用意
し、メモリ情報構造体50の各部(1単位当りのサイ
ズ、使用可能物理メモリサイズ等)に、システムから読
み出したメモリ情報の該当値を代入するようにする(ス
テップT2)。
The memory information structure 50 shown in FIG. 5 is prepared, and the corresponding value of the memory information read from the system is substituted into each part (size per unit, usable physical memory size, etc.) of the memory information structure 50. (Step T2).

【0039】メモリ情報の設定されたメモリ情報構造体
50の内容を参照し、システムに該当するDMAでの1
フレーム当たりのパケットサイズを算出する(ステップ
T3)。また、メモリ情報構造体50の使用可能物理メ
モリサイズに格納されている値からメモリサイズとして
トータルで所定値を越えているかどうかを判定する(ス
テップT4)。ここでは、プロトコルフォーマット設定
ファイル19の[OS]に設定されたMS−DOSが6
4kバイトを超えるデータは確保できないので、その6
4kバイトを所定値として用いている。
By referring to the contents of the memory information structure 50 in which the memory information is set, 1 in the DMA corresponding to the system is set.
The packet size per frame is calculated (step T3). Further, it is determined from the value stored in the usable physical memory size of the memory information structure 50 whether the total memory size exceeds a predetermined value (step T4). Here, the MS-DOS set in the [OS] of the protocol format setting file 19 is 6
Since the data exceeding 4 kbytes cannot be secured, 6
4 kbytes are used as the predetermined value.

【0040】メモリサイズとして64Kバイトを越えな
い場合は、最小8フレーム単位で分割できるようにDM
A転送の最小単位を決定する(ステップT5)。一方、
メモリサイズとして64Kバイトを越えている場合は、
ページフレームを256単位に区切れるように使用可能
な物理サイズを計算して1単位当たりのDMA転送の最
小単位を決定する(ステップT6)。そして、DMAの
メモリアドレスとして汎用的に空いているアドレスをメ
モリマネジャ32のメモリ情報から見つけ出してその最
小単位とメモリ開始アドレスを通信ドライバ装置1の双
方向通信部12に認識させる(ステップT7)。
If the memory size does not exceed 64 Kbytes, the DM is divided so that it can be divided into a minimum of 8 frames.
The minimum unit of A transfer is determined (step T5). on the other hand,
If the memory size exceeds 64K bytes,
The usable physical size is calculated so that the page frame is divided into 256 units, and the minimum unit of DMA transfer per unit is determined (step T6). Then, a generally vacant address is found as a DMA memory address from the memory information of the memory manager 32, and the minimum unit and the memory start address are recognized by the bidirectional communication unit 12 of the communication driver device 1 (step T7).

【0041】このように、システム立上げ時に外部装置
のシステムの使用に応じてDMA転送の最小単位が決め
られて双方向通信部12を含む必要箇所に指示されるも
のとなる。
As described above, when the system is started up, the minimum unit of the DMA transfer is determined according to the use of the system of the external device and is instructed to the necessary place including the bidirectional communication section 12.

【0042】以上のような初期設定のなされた通信ドラ
イバ装置1において、双方向通信指示部3からデータの
送信が指示されると、双方向通信部12がデータ種別を
判定して、小規模データ、大規模データ、同報データの
いずれかに振り分ける。
In the communication driver device 1 which has been initialized as described above, when the bidirectional communication instructing section 3 instructs the data transmission, the bidirectional communication section 12 determines the data type and the small-scale data is sent. , Large-scale data, or broadcast data.

【0043】小規模データの場合は、ヘッダに小規模デ
ータであることを示す識別子を付けて送受信用データメ
モリ13へ保存する。
In the case of small-scale data, an identifier indicating that the data is small-scale data is attached to the header and stored in the transmission / reception data memory 13.

【0044】メッセージ組立/変換/分解部14は、送
受信用データメモリ13に送信データが保存されたこと
を検知すると、プロトコルフォーマット設定ファイル1
9の設定に合せた形でアプリケーションからの要求デー
タをデバイス2で認識できるように変換する。
When the message assembling / converting / disassembling unit 14 detects that the transmission data is stored in the transmission / reception data memory 13, the protocol format setting file 1
The request data from the application is converted so as to be recognized by the device 2 in accordance with the setting of 9.

【0045】メッセージ組立/変換/分解部14で変換
されたデータをフレーム送受信部15でプロトコルフォ
ーマット設定ファイル19の設定に合せた形でフレーム
組立してDMAを使わずにデバイス2へ伝送する。
The data converted by the message assembling / converting / disassembling unit 14 is frame-assembled by the frame transmitting / receiving unit 15 according to the setting of the protocol format setting file 19 and transmitted to the device 2 without using DMA.

【0046】また、双方向通信部12において大規模デ
ータの判定をした場合、DMA転送を行うので上述した
初期設定で計算した最小単位に区切って送受信用データ
メモリ13へ保存することとなる。フレーム送受信部1
5ではヘッダに大規模データの識別子が設定されていれ
ば、主側DMA16を使って従側となるデバイス2の従
側DMA21へ直接データ転送する。この時のフレーム
構成は初期設定時にプロトコルフォーマット設定ファイ
ル19の設定内容に従って作成したフレームのひな形を
使用する。
Further, when the bidirectional communication unit 12 judges a large-scale data, since the DMA transfer is performed, the data is divided into the minimum units calculated in the above-mentioned initial setting and stored in the transmission / reception data memory 13. Frame transmitter / receiver 1
In 5, when the large-scale data identifier is set in the header, the master DMA 16 is used to directly transfer data to the slave DMA 21 of the slave device 2. The frame configuration at this time uses a template of the frame created according to the setting contents of the protocol format setting file 19 at the time of initial setting.

【0047】送信が完了すると、フレーム送受信部15
から送信完了の通知を受けた送信割込通知部17が上述
した初期設定で獲得した送信用の割込み番号を使って双
方向通信指示部3に対して送信完了通知を上げる。
When the transmission is completed, the frame transmitting / receiving unit 15
The transmission interrupt notifying unit 17 which has received the notification of the transmission completion from the above notifies the bidirectional communication instructing unit 3 of the transmission completion notification by using the transmission interrupt number acquired in the above-described initial setting.

【0048】一方、デバイス2から通信ドライバ装置1
に外部装置へのデータが入力する場合、フレーム送受信
部15で受信した要求データを受信割込通知部18へ通
知する。受信割込通知部18は、初期設定で獲得した受
信用の割込み番号を使って双方向通信指示部3に対して
受信要求通知を上げる。
On the other hand, from the device 2 to the communication driver device 1
When data is input to the external device, the request data received by the frame transmitting / receiving unit 15 is notified to the reception interrupt notifying unit 18. The reception interrupt notification unit 18 sends a reception request notification to the bidirectional communication instructing unit 3 using the reception interrupt number acquired in the initial setting.

【0049】通信ドライバ装置1からデバイスに対して
受信許可を出すと、例えばDMA転送で主側DMA16
にデータが転送されてくる。フレーム送受信部15がメ
ッセージ部分をメッセージ組立/変換/分解部14に渡
すと、メッセージ組立/変換/分解部14がプロトコル
フォーマット設定ファイル19の設定に合せた形で外部
装置に読めるようにデータ変換して送受信用データメモ
リ13に保存する。
When the communication driver unit 1 issues a reception permission to the device, for example, the DMA 16 on the main side is transferred by DMA transfer.
Data is transferred to. When the frame transmitting / receiving unit 15 transfers the message part to the message assembling / converting / disassembling unit 14, the message assembling / converting / disassembling unit 14 converts the data in a form suitable for the setting of the protocol format setting file 19 so that the external device can read the data. The data is stored in the transmission / reception data memory 13.

【0050】双方向通信部12は、送受信用データメモ
リ13に受信データが書き込まれると小規模データ、大
規模データの別に振り分ける。システム立上げ時に計算
しておいたデータ種類に応じた最小単位を使って双方向
通信指示部3に受信データを転送する。
When the received data is written in the transmission / reception data memory 13, the bidirectional communication section 12 sorts the received data into small-scale data and large-scale data. The received data is transferred to the bidirectional communication instructing unit 3 using the minimum unit according to the data type calculated when the system is started up.

【0051】このように本実施の形態は、プロトコルフ
ォーマット設定ファイル19を利用者が記述することに
より、RS232Cのシリアル通信、パラレル通信、T
CP/IP、高速車載LAN通信といかなる通信形態を
とろうが通信ドライバ装置1側でそれに合せた形でのフ
レームの組立を行い、送信用及び受信用の割込番号、空
きメモリ領域を自動的に算出し、DMAと割込みを用い
たデータの双方向通信を行うようにしたもである。した
がって、システムの接続されているハードウエアのシス
テム構成が異なっていても、例えば空いている割り込み
番号やメモリ状態が違う環境であっても双方向通信を可
能にするとともに、通信手順がRS232Cのシリアル通信、
パラレル通信、TCP/IP、高速車載LAN通信とい
かなる通信形態をとろうが、共通的に複数の台間で双方
向または、一斉同報通信をDMAと割り込みを用いるこ
とにより高速で実現することを可能とする。利用者は設
定ファイルを単に記述するだけでよく、あとはデバイス
ドライバのレベルで通信を実現するため、開発工数及び
メンテナンス工数を削減することが可能となりシステム
開発の効率化をはかることが可能となる。
As described above, in this embodiment, the user describes the protocol format setting file 19 so that RS232C serial communication, parallel communication, and T232C communication can be performed.
Regardless of the form of communication such as CP / IP and high-speed in-vehicle LAN communication, the communication driver device 1 side assembles a frame in a suitable form, and automatically creates an interrupt number for transmission and reception and an empty memory area. And the bidirectional communication of data using DMA and interrupt is performed. Therefore, even if the system configuration of the hardware connected to the system is different, for example, bidirectional communication is possible even in an environment where there are different interrupt numbers and memory states, and the communication procedure is RS232C serial. communication,
Regardless of the form of communication such as parallel communication, TCP / IP, high-speed in-vehicle LAN communication, it is common to realize bi-directional or simultaneous broadcast communication between multiple units at high speed by using DMA and interrupt. It is possible. The user only has to write the setting file, and since the communication is realized at the device driver level, the development man-hours and maintenance man-hours can be reduced, and the efficiency of system development can be improved. .

【0052】[0052]

【発明の効果】以上詳記したように本発明によれば、接
続形態や通信プロトコルなどのハードウエア環境の違い
を自動的に吸収して容易に複数台の間で双方向通信を可
能にするデバイスドライバ装置を提供できる。
As described above in detail, according to the present invention, the difference in the hardware environment such as the connection form and the communication protocol is automatically absorbed to easily enable the bidirectional communication between a plurality of devices. A device driver device can be provided.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明にかかる一実施の形態の通信ドライバ装
置の機能ブロック図
FIG. 1 is a functional block diagram of a communication driver device according to an embodiment of the present invention.

【図2】上記一実施の形態におけるプロトコルフォーマ
ット設定ファイルの記述例を示す図
FIG. 2 is a diagram showing a description example of a protocol format setting file in the above embodiment.

【図3】上記一実施の形態における割り込み検出手段を
実現するための流れ図
FIG. 3 is a flow chart for realizing an interrupt detecting means in the above-described embodiment.

【図4】上記一実施の形態におけるDMAのメモリ設定
をおこなうための流れ図
FIG. 4 is a flow chart for performing DMA memory setting according to the embodiment.

【図5】上記一実施の形態におけるメモリ情報構造体の
構成図
FIG. 5 is a configuration diagram of a memory information structure according to the above embodiment.

【符号の説明】[Explanation of symbols]

1 通信ドライバ装置 2 デバイス 3 双方向通信指示部 11 初期化部 12 双方向通信部 13 送受信用データメモリ 14 メッセージ分解/変換/組立部 15 フレーム送受信部 16 主側DMA 17 送信割込通知部 18 受信割込通知部 19 プロトコルフォーマット設定ファイル 31 割込ハンドラテーブル 32 メモリマネジャ 1 Communication driver device 2 devices 3 two-way communication instruction unit 11 Initialization section 12 Two-way communication unit 13 Transmission / reception data memory 14 Message disassembly / conversion / assembly department 15 frame transceiver 16 Master DMA 17 Send interrupt notification section 18 Reception interrupt notification section 19 Protocol format setting file 31 Interrupt handler table 32 memory manager

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 デバイスに接続された外部装置のアプリ
ケーション部に対して割込みを入れる割込機能と前記デ
バイスとの間でDMA(Direct memory access)転送
によるデータ伝送を実行するDMA機能とを備え、前記
外部装置に搭載したアプリケーションで使用している割
込番号の登録された割込番号テーブルから空いている割
込番号を検出し、検出した空き割込番号を前記外部装置
との双方向通信に使用する送信用及び受信用の割込番号
として登録することを特徴とするデバイスドライバ装
置。
1. An interrupt function for interrupting an application section of an external device connected to a device, and a DMA function for executing data transfer by DMA (Direct memory access) transfer with the device , The above
The ratio used by the application installed in the external device
Free numbers from the registered interrupt number table
Detecting the incoming number and using the detected vacant interrupt number as the external device
Interrupt number for sending and receiving used for two-way communication with
A device driver device characterized by being registered as .
【請求項2】 デバイスに接続された外部装置のアプリ
ケーション部に対して割込みを入れる割込機能と前記デ
バイスとの間でDMA( Direct memory access )転送
によるデータ伝送を実行するDMA機能とを備え、外部
装置に搭載したオペレーティングシステムがメモリ領域
の管理に使用しているメモリ管理部からメモリ容量の制
限情報を抽出し、抽出した制限情報からDMA転送時の
1ブロック当りのデータ転送量を計算することを特徴と
するデバイスドライバ装置。
2. An application of an external device connected to the device
Interrupt function to insert an interrupt to the application
DMA ( Direct memory access ) transfer
When a DMA transfer is performed, the memory capacity limit information is extracted from the memory management unit used by the operating system installed in the external device to manage the memory area. A device driver device for calculating the amount of data transfer per block of
JP27365697A 1997-09-19 1997-09-19 Device driver device Expired - Fee Related JP3512146B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27365697A JP3512146B2 (en) 1997-09-19 1997-09-19 Device driver device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27365697A JP3512146B2 (en) 1997-09-19 1997-09-19 Device driver device

Publications (2)

Publication Number Publication Date
JPH1196106A JPH1196106A (en) 1999-04-09
JP3512146B2 true JP3512146B2 (en) 2004-03-29

Family

ID=17530734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27365697A Expired - Fee Related JP3512146B2 (en) 1997-09-19 1997-09-19 Device driver device

Country Status (1)

Country Link
JP (1) JP3512146B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012034375A (en) * 2011-08-22 2012-02-16 Hitachi Automotive Systems Ltd Data communication device and controller using the same
EP2602967B1 (en) * 2011-10-07 2019-04-17 LG Electronics Inc. Method for accessing multiple networks and corresponding communication equipment
US9078079B2 (en) 2011-10-07 2015-07-07 Lg Electronics Inc. Multi-network access method and communication device thereof
JP5494727B2 (en) * 2012-05-25 2014-05-21 横河電機株式会社 Communication device
CN116541229B (en) * 2023-07-07 2023-10-31 西安羚控电子科技有限公司 Data-driven communication debugging method and system

Also Published As

Publication number Publication date
JPH1196106A (en) 1999-04-09

Similar Documents

Publication Publication Date Title
US8751721B2 (en) Method and apparatus for configuring electronic devices to perform selectable predefined functions using device drivers
US8103813B2 (en) Method and system for hardware based implementation of USB 1.1 over a high speed link
US5890015A (en) Method and apparatus for implementing a wireless universal serial bus host controller by interfacing a universal serial bus hub as a universal serial bus device
JP3497834B2 (en) Route repeater, USB communication system, USB communication control method
JP4801849B2 (en) Information processing apparatus and communication method switching method
US6185607B1 (en) Method for managing network data transfers with minimal host processor involvement
CN101102305A (en) Method and system for managing network information processing
JPH09160870A (en) Method and device for reporting of data transfer between hardware and software
JP4498389B2 (en) Multi-node computer system
US20130332504A1 (en) Station, target apparatus, initiator apparatus, communication system, and communication method
JP3512146B2 (en) Device driver device
JPH10229410A (en) Data processor, electronic device, and communication system
CN116566761B (en) SPI dual-host sharing arbitration system and method
JPH117434A (en) System for processing quick arrival message in ansyncronous data communication system for plural nodes
CN1328678C (en) DMA controller system including real-time data communication component
JP2000269996A (en) System, communication unit, equipment method for generating logical map information and tool device
US9619005B2 (en) Apparatus and method for saving power of USB device
JP2000269961A (en) Element for data transfer between usb host and network and flow control method controlling the transfer
JP3360727B2 (en) Packet transfer system and packet transfer method using the same
JP3799741B2 (en) Bus controller
KR960006472B1 (en) Fddi firmware driving method for ticom iop environment
JPH11175437A (en) Radio lan controller and radio lan control method
JP2001186146A (en) Data transfer controller and electronic device
JPH0589000A (en) Real time information transfer control system
JP2003023471A (en) Packet transmission/reception processing circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20031224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040105

LAPS Cancellation because of no payment of annual fees