JPS61148556A - Control code detector of communication - Google Patents

Control code detector of communication

Info

Publication number
JPS61148556A
JPS61148556A JP59270900A JP27090084A JPS61148556A JP S61148556 A JPS61148556 A JP S61148556A JP 59270900 A JP59270900 A JP 59270900A JP 27090084 A JP27090084 A JP 27090084A JP S61148556 A JPS61148556 A JP S61148556A
Authority
JP
Japan
Prior art keywords
character
control code
input
control
code
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.)
Pending
Application number
JP59270900A
Other languages
Japanese (ja)
Inventor
Masashi Suenaga
雅士 末永
Yoshihiro Miyazaki
義弘 宮崎
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59270900A priority Critical patent/JPS61148556A/en
Publication of JPS61148556A publication Critical patent/JPS61148556A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

PURPOSE:To make high-speed retrieval possible by referring to a table and performing the logical operation using elements in this table to convert characters to information which discriminates whether characters are a control code or not. CONSTITUTION:A retrieval table 4 of elements is provided in a communication controller, and elements in this table are so constituted that valid bits related to the first character of a control character code and valid bits 6 related to the second character are adjacent. In case that a control code is retrieved from a character string 1, an element 9 corresponding to a character 2 to be retrieved is extracted from the table, and an element 10 obtained by retrieving the control code with respect to a character 3 preceding the character 2 is preserved in a storage, and AND among data obtained by shifting this element 10 by one bit, the element 9, and a mask 7 where bits other than valid bits are ''0'' at the retrieval time is operated to generate a discriminator 8 which discriminates whether the character 2 or the combination of the character 2 and the preceding character 3 is the control code or not. The character string is transferred to the control code detection processing in accordance with content of this discriminator. Thus, retrieval is performed in a high speed with a minimum quantity of hardware.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はディジタル通信制御に係り、特に、外部より入
力した文字列の中より外部から処理fe瞳に対して特定
の処理を要求している事を意味する制御文字コードの検
出を行なう事が可能な通信制御装置に関する。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to digital communication control, and in particular, the present invention relates to digital communication control, and in particular, to a process in which a specific process is requested from the outside to the processing fe pupil from among a character string input from the outside. The present invention relates to a communication control device capable of detecting a control character code meaning .

〔発明の背景〕[Background of the invention]

まず、システム構成を第6図に示す。 First, the system configuration is shown in FIG. 6.

通信制#装置14は処理装置11と外部機器15間に位
置し、処理装置から発行されたコマンドに従って装置に
内蔵されたマイクロプロセッサにより、外部機器と処理
装置間のデータ転送の制御を行なう。通信制御装置には
、立方電機■“無手順上位リンクユニット”3G2A2
−LKOO5のように、受信した文字列中から開始文字
、終結文字を検出することができるものかめる。開始文
字、終結文字は接続する外部機器によって異なり、文字
数が一文字のもの、二文字のもの、同意義の文字が多種
あるものもあり、通信制御装置の汎用性を高めるために
は、下記の二つの条件を満足することが必要である。
The communication system # device 14 is located between the processing device 11 and the external device 15, and controls data transfer between the external device and the processing device using a built-in microprocessor according to commands issued from the processing device. The communication control device is Cubo Denki's "non-procedure upper link unit" 3G2A2.
- It is possible to detect a start character and an end character from a received character string, such as LKOO5. The start character and end character differ depending on the external device connected. Some have one character, some have two characters, and some have many different characters with the same meaning. In order to increase the versatility of the communication control device, the following two characters are recommended. It is necessary to satisfy two conditions.

畠  外部機器から入力される文字列の中から、テキス
ト開始文字コード、終結文字コード、アテンション割込
文字コード、及び、通信装置と外部機器間の待ち制御に
使用するX0N10F’F文字コード等制御文字コード
の検出が可能であること。
Hatake: Control characters such as the text start character code, end character code, attention interrupt character code, and X0N10F'F character code used for waiting control between the communication device and the external device from among the character strings input from the external device. The code must be detectable.

(2)制御文字コードに関しては文字棟、文字数ともに
XoNloFF文字コード以外は接続する外部機器の仕
様によって異なるため、それらを外部機器に合せて設定
可能であること。
(2) Regarding control character codes, both the character structure and the number of characters other than the XoNloFF character code vary depending on the specifications of the external device to be connected, so these should be able to be set according to the external device.

又、制御コードの仕様が複雑であっても、処理速度を落
とすことなく、高速に処理を行なって高いスループット
を確保することも必要である。以下に文字列の中かbw
定の文字を検索する方法の従来例について説明する。
Furthermore, even if the specifications of the control code are complex, it is necessary to perform processing at high speed without reducing the processing speed to ensure high throughput. Below is the string or bw
A conventional example of a method for searching for specific characters will be explained.

文字列の中から特定の文字を検索する方法には、文字列
の一文字目から順に検索を行なおうとする文字との比較
を行なう方法がある。検索を行なう文字が一文字である
場合、この方法では文字列中の各文字に対して一回の八
ピット比較を行なうだけでよいが、二文字の場合は十人
ビットの比較を行なうか、八ビットの比較を二回行なわ
ねばならない一更に、検索を行なう文字が一種類ではな
い場合、すなわち、複数S類ある場什、検索を行なう文
字が一文字ならばn回の八ビット比較、二文字ならばn
回の子方ビット比較、又は、2n回の八ピット比較を行
なわねばならない。これは文字の検索に必要な処理時間
を増大させ、スループットを低下させることにより、外
部とのデータ伝送速度を高速化する場合の障害となる。
One way to search for a specific character in a string is to compare it with the character to be searched for, starting from the first character in the string. If the character to be searched is a single character, this method only requires one 8-bit comparison for each character in the string, but if there are two characters, a 10-bit comparison or an 8-bit comparison is performed for each character in the string. Bit comparison must be performed twice.Furthermore, if there is more than one type of character to be searched, that is, if there are multiple S classes, if the character to be searched is one character, n-time 8-bit comparisons are required; if two characters are to be searched, n times Ban
Either 2n child bit comparisons or 2n 8-pit comparisons must be performed. This increases the processing time required to search for characters and reduces throughput, which becomes an obstacle to increasing the data transmission speed with the outside.

ここで、検索を行なう文字が多種にわたる場合の検索方
法は米国[)igital Equipment社″″
VAXIIARCITECTURE  HANDBOO
K”中にて解説されている’5CANC”命令の処理方
法の様に、検索を行なう前に、256要素からなるテー
ブルを設け、各要素にバリッド(有効)ビットを持たせ
、俣紫を行なう文字に対応する要素のバリッドビットf
:″1”にセットし、その他の要素のバリッドビットは
0”にセットしておき、文字列中マスク(要素との論理
積をとってバリッドビットが@ I 11のときのみ、
0でない数値となるような数値)との論理積算の結果に
よって、その文字が検索を行なおうとする文字であるか
否かを判定するという方法がある。この方法でろれば検
索を行なう文字が複数でめっても、テーブル中の検索を
行なう文字すべてに対応する要素のバリッドビットを′
1”にセットしておけばよく、種類が増加しても検索処
理に要する時間は増加しない。しかも、検出された文字
によって検出後の処理が異なる場合、すなわち、ろる文
字はその後に続くテキストの開始文字であって、他のめ
る文字はそのテキストの終結文字でめるといった場合は
検出後の通信制御装置と処理装置の処理も異なるが、こ
のような場合はテーブル中の各要素にそれぞれ複数のバ
リッドビット、開始文字に対応するバリッドビットと終
結文字に対応するバリッドビットを設けることに上り容
易に検出後の処理の分岐判定を一文字に限ら終ており、
二文字恢出を行なう場合は、テーブルの要素数を二文字
分、すなわち、256”=65536とせねばならず大
幅な/・−ドウニア増となり、しかも、テーブルの初期
設定にも時間がかかつてし1い、二文字からなる文字の
検出には適さない。
Here, if there are many different characters to search for, the search method is as follows:
VAXIIARCITECTURE HANDBOO
Like the processing method for the '5CANC' instruction explained in ``K'', before the search, a table consisting of 256 elements is created, each element has a valid bit, and Matamurasaki is performed. Valid bit f of the element corresponding to the character
: Set to ``1'', set the valid bits of other elements to 0'', and mask in the string (only when the valid bit is @I 11 after logical AND with the element,
There is a method of determining whether or not the character is the character to be searched based on the result of logical multiplication with a non-zero numerical value. With this method, even if there are multiple characters to be searched, the valid bits of the elements corresponding to all the characters to be searched in the table are
1", and the time required for the search process will not increase even if the number of types increases. Moreover, if the post-detection processing differs depending on the detected character, in other words, Roru characters will be ignored in the text that follows. If the starting character is the starting character of the text, and other characters are ending with the ending character of the text, the processing of the communication control device and the processing device after detection will be different, but in such a case, each element in the table should have multiple characters. By providing a valid bit corresponding to the start character and a valid bit corresponding to the end character, it is easy to limit the branch judgment of processing after detection to one character.
When performing two-character calculation, the number of elements in the table must be set to two characters, that is, 256" = 65536, which results in a significant /... It is not suitable for detecting characters consisting of one or two characters.

〔発明の目的〕 本発明の目的は多種類の一文字又は二文字構成の制御文
字コードを同速、かつ、最小限度のハードウェアで検索
を行なうことの可能な通信制御装置を提供することにあ
る。
[Object of the Invention] An object of the present invention is to provide a communication control device that can search for a wide variety of one-character or two-character control character codes at the same speed and with a minimum amount of hardware. .

〔発明の概要〕[Summary of the invention]

本発明は第5図に示すように、通信制−I@l装置内部
に256要素の検索テーブル4を設け、このテーブルの
要素の構成を制御文字コードの一文字目に関するバリッ
ドビット5と二文字目に関するバリッドビット6を隣接
したものとし、文字例1の中から制御コードの検索を行
なう場合、被検索文F2に対応する要素9をテーブルよ
p抜き出し、−文字手前の文字3について制御コードの
検索を行なったときに得た要素10を記憶内に保存して
いたものを一ピットずらしたものと要素9と検索時に有
効なピット以外を0”にしてしまうようなマスク7との
論理積をと9文字2又は文字2とその前の文字3の組合
せが制御コードであるか否かを判別するための判別子8
を作成し、この判別子の内容によシ制御コード検出処理
へ遷移することに特徴がある。この場合、判別子8の内
容は文字9が制御コードの第二文字である場合 It 
IITとなるバリッドビットV、と文字の一つ前の文字
10が制御コードの第一文字である場合、1′″となる
バリッドビットV1との論理積であり、文字と一つ前の
文字の組合せが制御コードに該当するときのみ′1″と
なる。
As shown in FIG. 5, the present invention provides a search table 4 of 256 elements inside the communication system-I@l device, and the configuration of the elements of this table is set to valid bit 5 for the first character of the control character code and valid bit 5 for the second character of the control character code. When searching for a control code from character example 1 with valid bits 6 adjacent to each other, extract element 9 corresponding to searched sentence F2 from the table, and search for a control code for character 3 before the - character. The element 10 obtained when performing the above is stored in memory, shifted by one pit, and the element 9 is ANDed with the mask 7 that sets all pits other than those valid at the time of search to 0''. 9 Discriminator 8 for determining whether character 2 or the combination of character 2 and character 3 before it is a control code.
This method is characterized in that it creates a discriminator and transitions to control code detection processing based on the contents of this discriminator. In this case, the content of discriminator 8 is if character 9 is the second character of the control code.
It is the AND of valid bit V, which is IIT, and valid bit V1, which is 1'' when the character 10 before the character is the first character of the control code, and is the combination of the character and the character before it. It becomes '1' only when corresponds to a control code.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を第1図ないし第4図により説明
する。
Embodiments of the present invention will be described below with reference to FIGS. 1 to 4.

通信制御装置の内部構成を第1図に示す。FIG. 1 shows the internal configuration of the communication control device.

′通信制御装置は、内部バス19上にマイクロプロセッ
サ17及びメモリ18を待ち、システムバスインターフ
ェース16 ト外mイア p −7x−、<2−0によ
り、それぞれ、処理装置、外部機器との入出力が可能な
構成となっている。処理装置、外部機器間のデータの入
出力はマイクロプロセッサによって制御でれ、外部機器
からのデータをメモリに蓄えておくことができるため、
高速度の入出力を行なった場合も入力に対する応答性を
確保できる。
'The communication control device waits for the microprocessor 17 and memory 18 on the internal bus 19, and performs input/output with the processing device and external equipment through the system bus interface 16 and external devices, respectively. The configuration allows for Data input/output between the processing unit and external devices is controlled by a microprocessor, and data from external devices can be stored in memory.
Responsiveness to input can be ensured even when high-speed input/output is performed.

第2図にメモリ18内の構成を示す。検索テーブル4は
256個の要素により構成され、先頭の要素は文字コー
ト責00)16に対応し、次の要素は文子コード(01
)16、最終の要素は文字コード(FF)16に対応す
る。要素保存エリア10は一つ前に入力された文字に対
応する要素を記憶しておくエリアである。第3図は検索
テーブル4の各要素及び要素保存エリア10のフォーマ
ットを示す。 第4図は一文字入力に対するマイクロプ
ロセッサ17の制御フローでおる。入力された文字に対
応する要素とその前に入力された文字に対応する要素(
要素保存エリアより読出す)を−ピットシフト(又はロ
ーテート)シたものとの論理績をとり、この論理積の有
効ピットを抽出するため、更に、マスクパターンとの論
理積をとっている。この演算結果がOの場合は、その文
字は制御文字コードではなく、0でない場合は制御文字
コードである旨判断することが可能となる。
FIG. 2 shows the internal configuration of the memory 18. Search table 4 is composed of 256 elements, the first element corresponds to the character code (00)16, and the next element corresponds to the character code (01).
)16, the last element corresponds to character code (FF)16. The element storage area 10 is an area for storing the element corresponding to the previously input character. FIG. 3 shows the format of each element of the search table 4 and the element storage area 10. FIG. 4 shows the control flow of the microprocessor 17 for inputting one character. The element corresponding to the input character and the element corresponding to the character input before it (
Then, in order to extract the valid pits of this logical product, a logical product is performed with the mask pattern. If the result of this operation is O, it can be determined that the character is not a control character code, and if it is not 0, it can be determined that it is a control character code.

制御文字コードが一文字である場合は、全要素について
その種の制御文字コードの一文字目である意のピットを
1″にセットしておき、制御文字コードに対応する要素
について、その種の制御文字コードの二文字目である意
のピットを#1″にセットする。これにより制御文字コ
ードの検索は、二文字構成のものと同じ方法で行ない、
レリえば、アテンション文字は一文字構成開始文字は二
文字構成といった制御文字コードの文字数が異なる場合
も同じプログラムで検索が行なえる。第4図はデータ人
力時に開始文字及びアテンション文字を同時に検索する
アルゴリズムを示す。このアルゴリズムでは検索テーブ
ル−回の参照で同時にXoNloFF文字の検索を行な
っており、同時に四種の制御コードの検索が単純なアル
ゴリズムで行なわれている。テーブルの大きさは高々2
56バイトでよく、又、安価なへビットマイクロプロセ
ッサによって処理を行なっても昼々十数ステップで検索
が行なえ、処理速度も十分実用にたえる値が得られる。
If the control character code is one character, set the meaning pit, which is the first character of that kind of control character code, to 1'' for all elements, and then set that kind of control character for the element corresponding to the control character code. Set the second character of the code, the meaning pit, to #1''. This allows you to search for control character codes in the same way as for two-character codes,
If so, the same program can perform a search even if the number of characters in the control character code is different, such as an attention character being one character and a starting character being two characters. FIG. 4 shows an algorithm for simultaneously searching for a start character and an attention character when data is manually input. In this algorithm, the XoNloFF character is simultaneously searched by referring to the search table once, and four types of control codes are simultaneously searched using a simple algorithm. The size of the table is at most 2
It only takes 56 bytes, and even if the processing is performed using an inexpensive Hebit microprocessor, the search can be performed in about 10 steps during the day, and the processing speed is sufficiently high for practical use.

なお、12は主記憶装置、13はシステムバス、15は
外部機器、21は、バリッドビットである。
Note that 12 is a main storage device, 13 is a system bus, 15 is an external device, and 21 is a valid bit.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、二文字制御文字コードの検索をテーブ
ルの参照とそのテーブルの要素を用いた単純な論理演算
によって制御コードであるか否かを判断するのに充分な
情報に変換することにより、高速に行なう事ができ、又
、安価なへビットマイクロプロセッサによっても容易に
処理が行なえる。
According to the present invention, by converting a search for a two-character control character code into information sufficient to determine whether or not it is a control code by referring to a table and performing a simple logical operation using the elements of the table. , can be performed at high speed, and can be easily processed by an inexpensive Hebit microprocessor.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のメモリ内の構成図、第2図
は通信制御装置の内部構成図、第3図は実施列にて取上
げた検索ケーブルのバリッドビットの配置図、第4図は
実施例の処理の流れを示すフローチャート、第5図は処
理の流れを示す図、第6図は通信制御装置、処理装置、
及び外部機器間相互の関係を示す接続図である。 1・・・外部より入力された文字列、4・・・検索用テ
ーブル、9・・・テーブル中の要素の一例、14・・・
通信制1目 外部機器へ 蕃3図 VxoN  VvorF   VY2     VTI
    Vs2     VSI     V12  
  VAI箒4−図 第5[21
Fig. 1 is a diagram of the internal configuration of a memory according to an embodiment of the present invention, Fig. 2 is an internal configuration diagram of a communication control device, Fig. 3 is a layout diagram of valid bits of a search cable taken up in the implementation column, and Fig. 4 is a diagram of an internal configuration of a communication control device. The figure is a flowchart showing the process flow of the embodiment, FIG. 5 is a diagram showing the process flow, and FIG. 6 is a communication control device, a processing device,
and a connection diagram showing mutual relationships between external devices. 1...Character string input from outside, 4...Search table, 9...Example of elements in the table, 14...
Communication system 1st line to external device 3rd line VxoN VvorF VY2 VTI
Vs2 VSI V12
VAI broom 4-Figure 5 [21

Claims (1)

【特許請求の範囲】[Claims] 1、処理装置のシステムバスに接続されるシステムバス
インターフェースと外部機器に接続される外部インター
フェースとメモリとそれらを制御し前記外部機器と前記
処理装置間のデータの入出力制御を行なうマイクロプロ
セッサより成る外部機器−処理装置間通信制御装置にお
いて、制御コードの第一文字であるバリッドビットと第
二文字であるバリッドビットとをnビットずらして配置
したデータを構成要素とする検索用テーブル、一文字前
に入出力処理を行なつた文字に対応する前記検索用テー
ブルの要素を保存するための要素保存エリアをメモリ上
に持ち、前記要素保存エリアに格納された一文字前に入
出力処理を行なつた文字に対応する要素をnビットずら
して現在入出力を行なつている文字に対応する要素が前
記制御コードの第一文字であることを示す前記バリッド
ビットと一文字前の文字に対応する要素が制御コードの
第二文字であることを示す前記バリッドビットとのビッ
ト位置が合うようにしたものと現在入出力を行なつてい
る文字に対応する要素との論理積をとり、演算結果より
無効ビットを消滅させるため、更に、マスクパターンと
の論理積をとりこの演算結果が0であるか否を判別する
ことにより、前記外部機器より入力された文字列の中か
ら二文字制御コードを高速に検出することを特徴とする
。通信制御装置の制御コード検出装置。
1. Consists of a system bus interface connected to the system bus of the processing device, an external interface connected to external equipment, a memory, and a microprocessor that controls them and controls data input/output between the external equipment and the processing device. In a communication control device between an external device and a processing device, a search table whose constituent elements are data in which the valid bit, which is the first character of the control code, and the valid bit, which is the second character, are shifted by n bits. It has an element storage area in memory for storing the element of the search table corresponding to the character that has undergone output processing, and the character that has undergone input/output processing one character before is stored in the element storage area. The corresponding element is shifted by n bits to indicate that the element corresponding to the character currently being input/output is the first character of the control code, and the element corresponding to the previous character is the first character of the control code. To perform a logical AND operation between the bit position of the valid bit indicating that it is two characters and the element corresponding to the character currently being input/output, and eliminate the invalid bit from the operation result. , further characterized in that the two-character control code is detected at high speed from the character string input from the external device by performing a logical product with the mask pattern and determining whether the result of this operation is 0 or not. shall be. Control code detection device for communication control equipment.
JP59270900A 1984-12-24 1984-12-24 Control code detector of communication Pending JPS61148556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59270900A JPS61148556A (en) 1984-12-24 1984-12-24 Control code detector of communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59270900A JPS61148556A (en) 1984-12-24 1984-12-24 Control code detector of communication

Publications (1)

Publication Number Publication Date
JPS61148556A true JPS61148556A (en) 1986-07-07

Family

ID=17492542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59270900A Pending JPS61148556A (en) 1984-12-24 1984-12-24 Control code detector of communication

Country Status (1)

Country Link
JP (1) JPS61148556A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63204846A (en) * 1987-02-19 1988-08-24 Fujitsu Ltd Transmission control system
JP2003273918A (en) * 2002-03-12 2003-09-26 Nippon Telegr & Teleph Corp <Ntt> Method for filtering packet
JP2004015592A (en) * 2002-06-10 2004-01-15 Internatl Business Mach Corp <Ibm> Mac address pointer structure and method for rearranging mac address

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63204846A (en) * 1987-02-19 1988-08-24 Fujitsu Ltd Transmission control system
JP2003273918A (en) * 2002-03-12 2003-09-26 Nippon Telegr & Teleph Corp <Ntt> Method for filtering packet
JP2004015592A (en) * 2002-06-10 2004-01-15 Internatl Business Mach Corp <Ibm> Mac address pointer structure and method for rearranging mac address

Similar Documents

Publication Publication Date Title
US5737733A (en) Method and system for searching compressed data
JPS58119032A (en) Information processing system
JPS61148556A (en) Control code detector of communication
JPH024026B2 (en)
JP2595934B2 (en) Kana-Kanji conversion processor
JPH056398A (en) Document register and document retrieving device
JPS60105040A (en) Sentence retrieving system
JPS6162975A (en) Dictionary index processor
JP2967275B2 (en) Kana-Kanji conversion device
JPS6175952A (en) Document input processing system
JPS6211385B2 (en)
JP2772125B2 (en) Dictionary search method
JP3018579B2 (en) Name search processor
JPH0231421B2 (en)
JPS607582A (en) Character reader
JPS63187334A (en) Character-string pattern matching device
JP3087699B2 (en) Standard information simple input system and standard information simple input method
JPS59180720A (en) Key input-output device of electronic computer
JPS6327968A (en) Documentation device
JPH0567157A (en) Character string retrieval system
JPS58103036A (en) Bidirectional data converting device
JPS59167737A (en) Kana-kanji converting device
JPS6327928A (en) Specific character string retrieval reference system
JPS5852719A (en) Character data inputting method
JPH03211627A (en) Data type conversion system