KR101689527B1 - Apparatus and method for searching address based on hashing using temporal locality - Google Patents

Apparatus and method for searching address based on hashing using temporal locality Download PDF

Info

Publication number
KR101689527B1
KR101689527B1 KR1020140175623A KR20140175623A KR101689527B1 KR 101689527 B1 KR101689527 B1 KR 101689527B1 KR 1020140175623 A KR1020140175623 A KR 1020140175623A KR 20140175623 A KR20140175623 A KR 20140175623A KR 101689527 B1 KR101689527 B1 KR 101689527B1
Authority
KR
South Korea
Prior art keywords
address
pair
hash
bit
bits
Prior art date
Application number
KR1020140175623A
Other languages
Korean (ko)
Other versions
KR20160069707A (en
Inventor
김태환
표창우
Original Assignee
홍익대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 홍익대학교 산학협력단 filed Critical 홍익대학교 산학협력단
Priority to KR1020140175623A priority Critical patent/KR101689527B1/en
Publication of KR20160069707A publication Critical patent/KR20160069707A/en
Application granted granted Critical
Publication of KR101689527B1 publication Critical patent/KR101689527B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • G06F16/1794Details of file format conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 해시 기반의 주소 검색 장치에 관한 것으로, 주소 검색 요청에 따른 주소 입력 신호를 입력받는 제어부, 명령어 주소 및 목적지 주소로부터 하나의 주소 쌍을 생성하는 주소 쌍 합성부, 명령어 주소 및 목적지 주소로부터 검색을 위한 해시 키(hash key)를 생성하는 해시 생성부, 주소 쌍과 해시 키를 입력받아 하나의 주소 정보를 합성하는 주소 정보 저장부, 주소 정보를 입력받아 주소 쌍 해시 테이블(hash table)에 기록하는 주소 수집부 및 주소 정보를 입력받고 입력된 주소 정보가 주소 쌍 해시 테이블에 저장되어 있는지 여부를 검색한 후 그 검색 결과를 출력하는 주소 검색부를 포함한다.A hash-based address search apparatus includes a controller receiving an address input signal according to an address search request, an address pair synthesizer generating an address pair from a command address and a destination address, A hash generating unit for generating a hash key for search, an address information storing unit for receiving a pair of addresses and a hash key and synthesizing one address information, a hash table for receiving address information, And an address retrieval unit for retrieving whether the input address information is stored in the address pair hash table and outputting the retrieval result.

Description

시간 지역성을 활용한 해시 기반의 주소 검색 장치 및 방법{Apparatus and method for searching address based on hashing using temporal locality}BACKGROUND OF THE INVENTION Field of the Invention [0001] The present invention relates to a hash-based address search apparatus and method using temporal locality,

본 발명은 주소 쌍 테이블에서 검사 대상 주소 값을 검색하는 주소 검색기에 관한 것으로, 특히 하나의 문자열을 보다 빨리 찾을 수 있도록 주소에 직접 접근할 수 있는 짧은 길이의 값이나 키로 변환하는 문자열 처리 기법인 해싱(hashing) 기법에 기초하여 주소 값의 일치 여부를 고속으로 판별할 수 있는 주소 검색 장치 및방법에 관한 것이다.The present invention relates to an address searcher for searching an address value of an inspection target in an address pair table. More specifically, the present invention relates to an address reader for searching a string of addresses, The present invention relates to an address search apparatus and method capable of determining at a high speed whether address values match based on a hashing technique.

주소 검색기는 주소 쌍 테이블에서 검사 대상 주소 값을 검색하는 장치로서, 주소 쌍 테이블은 명령어 주소와 목적지 주소의 쌍을 저장하는 기억 장치이다. 주소 탐색 기법은 검사 대상 주소를 주소 테이블과 비교하여 일치 여부를 확인하는 방식으로 수행되는데, 이 기법은 주소 테이블의 크기가 커질수록 비교 횟수가 늘어날 수 있으며 그에 따라 과부하도 함께 커지는 약점이 존재한다. 따라서, 주소 탐색의 성능을 향상시키기 위해서는 비교 횟수를 감소시켜야 한다. 이하에서 제시되는 선행기술문헌에 따르면, 주소 탐색의 비교 횟수를 줄이기 위해 이진 탐색을 활용하는 경우에는 최대

Figure 112014119583523-pat00001
의 비교가 필요하며, 이를 적용한 실험에서도 약 25%의 과부하를 보였다.The address detector is a device for searching the address pair to be inspected in the address pair table, and the address pair table is a memory device for storing a pair of an instruction address and a destination address. The address search technique is performed by comparing the address of the object to be tested with the address table to confirm whether or not the address is matched. This technique has a drawback in that the number of comparisons increases as the size of the address table increases, and the overload increases accordingly. Therefore, in order to improve the performance of the address search, the number of comparisons must be reduced. According to the prior art documents presented below, when binary search is used to reduce the number of address search comparisons,
Figure 112014119583523-pat00001
, And it was found that the overload was about 25% even in the experiment using this.

이에 대한 대안으로서 주소 쌍 테이블에 해싱 기법을 적용하면 테이블의 크기가 커지더라도 비교 횟수를 고르게 유지할 수 있는 장점이 있다. 즉, 고른 분포를 보이는 해시 테이블을 구성하여 동일한 색인을 가지는 자료들만을 검색하면 전수 검사를 할 때보다 과부하가 감소하게 된다. 따라서, 이러한 해시 테이블을 주소 검색기에 구현할 수 있는 보다 구체적인 기술적 수단의 제시가 요구된다.As an alternative to this, if the hashing technique is applied to the address pair table, the comparison frequency can be maintained even when the size of the table is increased. That is, constructing a uniformly distributed hash table and retrieving only the data with the same index will reduce the overload than when performing the full test. Therefore, a more specific technical means for implementing such a hash table in an address searcher is required.

Ellis Horowitz, Sartaj Sahni, Dinesh P.Mehta, Fundamentals of Data Structures in C++, 2nd edition, Silicon Press, pp.27-29, 2006. Ellis Horowitz, Sartaj Sahni, Dinesh P.Mehta, Fundamentals of Data Structures in C ++, 2nd edition, Silicon Press, pp. 27-29, 2006. T. H. Kim, I. H. Seong, K. S. Han, C. W. Pyo, “Effect of Integrity Checking for Indirect Branch Address Using Binary Search,” Proc. of the KIISE 2012 Fall Conference, vol.39, no.2(A), pp.43-45, 2012. T. H. Kim, I. H. Seong, K. S. Han, C. W. Pyo, "Effect of Integrity Checking for Indirect Branch Address Using Binary Search," Proc. of the KIISE 2012 Fall Conference, vol.39, no.2 (A), pp.43-45, 2012.

본 발명이 해결하고자 하는 기술적 과제는, 종래의 주소 검색 기법에서 주소 테이블의 크기가 커질수록 비교 횟수가 늘어날 수 있으며 그에 따라 과부하도 함께 커지는 문제점을 해결하고, 주소 테이블을 보다 빠르게 접근하여 검색을 희망하는 주소 쌍을 발견하기 위한 실질적인 기술적 수단이 존재하지 않는 기술적 한계를 극복하고자 한다.SUMMARY OF THE INVENTION It is an object of the present invention to solve the problem that the number of comparisons increases as the size of the address table increases in the conventional address search technique, To overcome the technical limitations in which there is no practical technical means for finding the address pair.

상기 기술적 과제를 해결하기 위하여, 본 발명의 일 실시예에 따른 주소 검색 장치는, 주소 검색 요청에 따른 주소 입력 신호를 입력받는 제어부; 명령어 주소 및 목적지 주소로부터 하나의 주소 쌍을 생성하는 주소 쌍 합성부; 상기 명령어 주소 및 상기 목적지 주소로부터 검색을 위한 해시 키(hash key)를 생성하는 해시 생성부; 상기 주소 쌍과 상기 해시 키를 입력받아 하나의 주소 정보를 합성하는 주소 정보 저장부; 상기 주소 정보를 입력받아 주소 쌍 해시 테이블(hash table)에 기록하는 주소 수집부; 및 상기 주소 정보를 입력받고 입력된 주소 정보가 상기 주소 쌍 해시 테이블에 저장되어 있는지 여부를 검색한 후 그 검색 결과를 출력하는 주소 검색부;를 포함한다.According to an aspect of the present invention, there is provided an address search apparatus comprising: a controller receiving an address input signal according to an address search request; An address pair synthesizer for generating one address pair from the command address and the destination address; A hash generating unit for generating a hash key for searching from the instruction address and the destination address; An address information storage unit for receiving the address pair and the hash key and synthesizing one address information; An address collector for receiving the address information and recording the address information in an address pair hash table; And an address search unit for searching whether the received address information is stored in the address pair hash table, and outputting the search result.

일 실시예에 따른 상기 주소 검색 장치에서, 상기 주소 쌍 해시 테이블에 접근하기 위한 해시 주소는, 상기 명령어 주소 및 상기 목적지 주소로부터 소정 개수의 하위 비트 값을 추출하여 연결함으로써 생성된다. 또한, 상기 해시 주소는, 상기 명령어 주소 및 상기 목적지 주소로부터 각각 하위 m 비트(m은 전체 비트 수보다 작은 양의 정수)를 추출하고, 추출된 2개의 비트 값 중 어느 하나를 길이 m만큼 레프트 시프트(left shift) 연산을 통해 상위 비트로 이동시킨 후, 추출된 2개의 비트 값 중 나머지 하나의 비트 값과 비트 합 연산을 통해 결합함으로써 생성될 수 있다.In the address searching apparatus according to an embodiment, a hash address for accessing the address pair hash table is generated by extracting and connecting a predetermined number of lower bit values from the command address and the destination address. The hash address may be obtained by extracting lower m bits (m is a positive integer smaller than the total number of bits) from each of the instruction address and the destination address and outputting one of the extracted two bit values as a left shift shifted to an upper bit through a left shift operation, and then combined with the remaining one of the extracted two bit values through a bit sum operation.

일 실시예에 따른 상기 주소 검색 장치에서, 상기 주소 쌍 합성부는, 상기 명령어 주소의 (m-1)~0번째 비트열을 (k-1)~m번째 합성 비트열에 위치시키고, 상기 목적지 주소의 (m-1)~0번째 비트열을 (m-1)~0번째 합성 비트열에 위치시킴으로써, 합성된 k비트의 주소 쌍을 생성(m은 명령어 주소 및 목적지 주소의 비트 수, k는 합성 비트열의 비트 수로서 k=2m)할 수 있다.In the address searching apparatus according to an embodiment, the address pair combining unit positions the (m-1) th to (0th) bit strings of the instruction address in the (k-1) (m is the number of bits of the command address and the destination address, k is the number of bits of the composite bit (m-1) to 0th bit) K = 2m as the number of bits of the column).

일 실시예에 따른 상기 주소 검색 장치에서, 상기 해시 생성부는, 상기 명령어 주소의 임의의 위치로부터 i비트의 비트열을 추출하고, 상기 목적지 주소의 임의의 위치로부터 j비트의 비트열을 추출한 후 양 비트열을 결합함으로서 합성된 k비트의 해시 키를 생성(k는 합성 비트열의 비트 수로서 k=i+j)할 수 있다.In the address searching apparatus according to an embodiment, the hash generation unit extracts a bit string of i bits from an arbitrary position of the instruction address, extracts a bit string of j bits from an arbitrary position of the destination address, (K is the number of bits of the composite bit string, k = i + j) by combining the bit strings.

일 실시예에 따른 상기 주소 검색 장치에서, 상기 주소 쌍 해시 테이블은, 모든 주소 쌍을 저장하는 주소 쌍 풀(pool); 주소 쌍 저장시 충돌을 일으키는 주소 쌍들을 원형 연결 리스트(circular linked list) 구조의 버킷 체인(bucket chain)으로 형성하는 체인 인덱스 테이블(chain index table); 및 상기 주소 쌍 풀의 인덱스 값과 상기 버킷 체인의 길이를 저장하는 버킷 헤더 테이블(bucket header table);을 포함한다. 또한, 주소 쌍을 검색하는 경우 상기 주소 검색부는, 상기 버킷 헤더 테이블에 저장된 색인이 검색 대상 주소 쌍이 아니면, 상기 검색 대상 주소 쌍을 발견할 때까지 또는 상기 체인의 길이만큼 상기 원형 연결 리스트 구조의 버킷 체인을 검사하며, 상기 버킷 체인 내에서 상기 검색 대상 주소 쌍이 발견된 경우, 상기 버킷 헤더에 저장된 체인 시작 인덱스를 상기 검색 대상 주소 쌍의 풀 인덱스(pool index)로 갱신할 수 있다.In the address search apparatus according to an embodiment, the address pair hash table includes an address pair pool storing all address pairs; A chain index table for forming pairs of addresses causing conflicts when address pairs are stored in a bucket chain of a circular linked list structure; And a bucket header table storing an index value of the address pair pool and a length of the bucket chain. If the index stored in the bucket header table is not a search target address pair, the address search unit searches for a pair of addresses in the bucket header table until the search target address pair is found, Chain, and when the search target address pair is found in the bucket chain, the chain start index stored in the bucket header may be updated to a pool index of the search target address pair.

나아가, 이하에서는 상기 기재된 주소 검색 장치의 각 구성요소를 제어하는 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.Furthermore, the present invention provides a computer-readable recording medium having recorded thereon a program for causing a computer to execute a method of controlling each element of the address search apparatus described above.

본 발명의 실시예들은, 해싱 기법을 적용하여 명령어 주소 및 목적지 주소로부터 일정 개수의 하위 비트 값을 추출하여 연결함으로써 주소 쌍 테이블에 대한 빠른 접근 속도를 보장하고, 값의 변화가 가장 빈번한 하위 비트를 추출하여 이용함으로써 공간의 낭비를 방지하고 해시 주소의 충돌 횟수를 감소시켜 검색 효율을 향상시킬 수 있으며, 주소 저장 과정에서 원형 리스트 구조를 도입하고 주소 쌍 검색 과정에서 해당 버킷에서 최근에 검색된 데이터의 색인을 보관하는 시간 지역성을 활용함으로써 항상 최근에 검색한 주소 쌍 인덱스를 확보할 수 있는 캐싱 효과를 얻을 수 있고 그 결과 검색 시간이 단축되는 효과를 달성할 수 있다.In embodiments of the present invention, a hashing technique is applied to extract a certain number of lower-order bit values from a command address and a destination address, thereby ensuring a fast access speed to the address pair table, and a low- In addition, it is possible to improve the retrieval efficiency by reducing the number of collisions of hash addresses by introducing a circular list structure in the address storing process, and by using indexes of data recently retrieved from the buckets in the address pair retrieval process It is possible to obtain a caching effect that can always obtain the address pair index searched recently, and as a result, the search time can be shortened.

도 1은 본 발명의 일 실시예에 따른 해시 기반의 주소 검색 장치를 도시한 블록도이다.
도 2는 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치에서 주소 쌍 합성부가 주소 쌍을 생성하는 과정을 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치에서 해시 생성부가 해시 키를 생성하는 과정을 설명하기 위한 도면이다.
도 4a 및 도 4b는 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치에서 해싱을 적용한 주소 검색 과정 및 주소 쌍 해시 테이블의 구조를 도시한 도면이다.
도 5는 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 수에 대한 체인 길이가 1인 버킷 체인 비율을 예시한 도면이다.
도 6은 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 수에 대한 주소 쌍 검색 횟수가 1인 비율을 예시한 도면이다.
도 7은 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 패턴 조합에 따른 목적지 주소의 비트 위치를 예시한 도면이다.
1 is a block diagram illustrating a hash-based address search apparatus according to an embodiment of the present invention.
2 is a diagram illustrating a process of generating an address pair combining unit address pair in the address searching apparatus of FIG. 1 according to an embodiment of the present invention.
FIG. 3 is a diagram for explaining a process of generating a hash key by a hash generating unit in the address searching apparatus of FIG. 1 according to an embodiment of the present invention.
4A and 4B are diagrams illustrating an address search process and an address pair hash table applied with hashing in the address search apparatus of FIG. 1 according to an embodiment of the present invention.
FIG. 5 is a diagram illustrating a bucket chain ratio with a chain length of 1 for a bit number as a simulation result using an address search apparatus according to embodiments of the present invention.
FIG. 6 is a diagram illustrating a ratio of the number of address pair search times to the number of bits as a simulation result using the address search apparatus according to the embodiments of the present invention.
FIG. 7 is a diagram illustrating a bit position of a destination address according to a bit pattern combination as a simulation result using an address search apparatus according to embodiments of the present invention.

본 발명의 실시예들을 구체적으로 설명하기에 앞서, 상기된 종래의 주소 검색 기술의 문제점을 해결하기 위해 본 발명의 실시예들이 채택하고 있는 기술적 수단을 개괄적으로 소개하도록 한다. 또한, 이하에서는 32비트 메모리에 대한 해시 기반 주소 검색기를 일 실시예로서 설명하고 있으나, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명의 기술적 원리가 이러한 한정된 비트수의 메모리에 한정되는 것이 아님을 알 수 있다.Before describing embodiments of the present invention in detail, technical solutions adopted by embodiments of the present invention will be introduced to solve the problems of the conventional address search technology. In the following description, a hash-based address detector for a 32-bit memory is described as an embodiment. However, those skilled in the art will recognize that the technical principles of the present invention are limited to such a limited number of bits of memory It can be seen that it is not.

앞서 지적한 바와 같이, 두 개의 주소 값의 일치 여부를 빠르게 판단하기 위해서는 검색이 우수한 자료 구조가 필요하다. 실행 시간에 발생하는 명령어 주소

Figure 112014119583523-pat00002
와 목적지 주소
Figure 112014119583523-pat00003
의 쌍
Figure 112014119583523-pat00004
의 집합으로 해시 테이블(hash table)을 구성한다. 검색 성능은 주소 쌍 테이블의 키 값을 구하기 위한 해시 함수와 해시 값의 충돌 처리 방식에 따라 결정된다.As noted above, a good data structure is needed to quickly determine whether two address values match. Instruction address that occurs at execution time
Figure 112014119583523-pat00002
And destination address
Figure 112014119583523-pat00003
Pair of
Figure 112014119583523-pat00004
And a hash table. The search performance is determined by the hash function for obtaining the key value of the address pair table and the collision processing method of the hash value.

주소 쌍 테이블 접근을 위한 해시 주소는 주소 값의 하위 비트를 추출하여 연결할 수 있다. 전체 비트 수를

Figure 112014119583523-pat00005
라 하면 각 주소로부터 하위
Figure 112014119583523-pat00006
비트와 하위
Figure 112014119583523-pat00007
비트를 추출하여 다음의 수학식 1과 같은 해시 함수를 제시할 수 있다.The hash address for accessing the address pair table can be extracted by connecting the lower bit of the address value. The total number of bits
Figure 112014119583523-pat00005
If you want to
Figure 112014119583523-pat00006
Bit and sub
Figure 112014119583523-pat00007
Bits can be extracted to present a hash function as shown in Equation 1 below.

Figure 112014119583523-pat00008
Figure 112014119583523-pat00008

상기된 수학식 1은 명령어 주소

Figure 112014119583523-pat00009
와 목적지 주소
Figure 112014119583523-pat00010
의 하위
Figure 112014119583523-pat00011
비트를 입력 값으로 받는 해시 함수
Figure 112014119583523-pat00012
을 나타낸다.
Figure 112014119583523-pat00013
Figure 112014119583523-pat00014
각각에서 하위
Figure 112014119583523-pat00015
비트를 추출하여, 이 중 하나의 비트 값을 길이
Figure 112014119583523-pat00016
만큼 레프트 시프트(left shift) 연산으로 상위 비트로 옮긴 후 비트 합 연산으로 두 비트 값을 합친다. 본 발명의 실시예들에서는 명령어 주소
Figure 112014119583523-pat00017
를 상위 비트의 대상으로 구성하였다. 주소의 하위
Figure 112014119583523-pat00018
비트는 값의 변화가 가장 빈번한 부분이기 때문에 다른 부분의 비트들을 사용하는 것보다 해시 주소의 충돌을 감소시키는데 효과적이다.The above equation (1)
Figure 112014119583523-pat00009
And destination address
Figure 112014119583523-pat00010
Child
Figure 112014119583523-pat00011
A hash function that takes a bit as an input value
Figure 112014119583523-pat00012
.
Figure 112014119583523-pat00013
Wow
Figure 112014119583523-pat00014
In each sub
Figure 112014119583523-pat00015
Extracts one bit of the bit length,
Figure 112014119583523-pat00016
Shift to the upper bit by a left shift operation, and add the two bit values by the bit sum operation. In the embodiments of the present invention,
Figure 112014119583523-pat00017
Is composed of the upper bits. Child of address
Figure 112014119583523-pat00018
Since bits are the most frequent part of the change in value, it is more effective to reduce the collision of hash addresses than to use bits in other parts.

특히, 본 발명의 실시예들이 채택하고 있는 주소 쌍 테이블에서는 동일한 주소 쌍 정보의 반복적인 검색이 발생한다. 서버 프로그램과 같이 항상 반복적인 동작이 발생하는 경우를 고려하여 성능 향상을 목적으로 검색에 시간 지역성을 활용하고자 한다. 이를 위해 본 발명의 실시예들이 채택하고 있는 주소 쌍 테이블에 최근 검색한 주소 쌍부터 추가한 순서대로 연속적으로 검색을 수행함으로써 과부하를 줄일 수 있다. 특히, 해시의 버킷을 원형 구조로 형성하고, 최근에 검색된 데이터에 대한 색인을 보관함으로써 이러한 시간 지역성을 달성할 수 있다.Particularly, in the address pair table adopted by the embodiments of the present invention, iterative search of the same address pair information occurs. In order to improve the performance, it is necessary to utilize the time locality in the retrieval in consideration of the case where the repetitive operation always occurs like the server program. For this, the overhead can be reduced by continuously searching the address pair table adopted by the embodiments of the present invention in the order of addition from the address pairs newly searched for. In particular, this temporal locality can be achieved by forming a bucket of the hash into a circular structure and storing the index for recently retrieved data.

이하에서는, 도면을 참조하여 상기된 기술적 과제를 해결하기 위한 본 발명의 실시예들을 구체적으로 설명한다. 다만, 하기의 설명 및 첨부된 도면에서 본 발명의 요지를 흐릴 수 있는 공지 기능 또는 구성에 대한 상세한 설명은 생략한다. 또한, 도면 전체에 걸쳐 동일한 구성 요소들은 가능한 한 동일한 명칭 및 도면 부호로 나타내고 있음에 유의하여야 한다.Hereinafter, embodiments of the present invention for solving the above-mentioned technical problems will be described in detail with reference to the drawings. In the following description and the accompanying drawings, detailed description of well-known functions or constructions that may obscure the subject matter of the present invention will be omitted. It is to be noted that the same components are denoted by the same names and reference numerals as possible throughout the drawings.

도 1은 본 발명의 일 실시예에 따른 해시 기반의 주소 검색 장치(100)를 도시한 블록도이다.1 is a block diagram illustrating a hash-based address search apparatus 100 according to an embodiment of the present invention.

제어부(10)는 주소 검색 요청에 따른 주소 입력 신호를 입력받아 주소 검색 장치(100)의 다른 구성요소들을 제어하는 구성으로서, 주소 검색 요청이 발생하면 제어부로 주소 입력 신호가 들어온다.The control unit 10 receives an address input signal corresponding to an address search request and controls other components of the address search apparatus 100. When an address search request is generated, an address input signal is input to the control unit.

주소 쌍 합성부(20)는 명령어 주소 및 목적지 주소로부터 하나의 주소 쌍을 생성하며, 해시 생성부(30)는 상기 명령어 주소 및 상기 목적지 주소로부터 검색을 위한 해시 키(hash key)를 생성한다. 주소 쌍 합성부(20) 및 해시 생성부(30)에는 명령어 주소와 목적지 주소가 인가되어 각각 주소 쌍과 해시 키를 생성하여 주소 정보 저장부(40)로 출력한다.The address pair combining unit 20 generates one address pair from the command address and the destination address, and the hash generation unit 30 generates a hash key for searching from the command address and the destination address. The address pair combining unit 20 and the hash generating unit 30 generate an address pair and a hash key, respectively, to which an instruction address and a destination address are applied, respectively, and output the address pair and the hash key to the address information storage unit 40.

주소 정보 저장부(40)는 상기 주소 쌍과 상기 해시 키를 입력받아 하나의 주소 정보를 합성한 후, 주소 수집부(50) 및 주소 검색부(60)로 출력한다.The address information storage unit 40 receives the address pair and the hash key, combines the address information, and outputs the combined address information to the address collection unit 50 and the address search unit 60.

주소 수집부(50)는 상기 주소 정보 저장부(40)로부터 주소 정보를 입력받아 주소 쌍 해시 테이블(hash table)(70)에 기록하는 역할을 수행한다.The address collecting unit 50 receives the address information from the address information storage unit 40 and records the address information in an address pair hash table 70.

주소 검색부(60)는 상기 주소 정보 저장부(40)로부터 주소 정보를 입력받고 입력된 주소 정보가 상기 주소 쌍 해시 테이블(70)에 저장되어 있는지 여부를 검색한 후 그 검색 결과를 출력한다. 이때, 검색한 결과는 참(true) 또는 거짓(false)으로 출력할 수 있다.The address searching unit 60 receives the address information from the address information storing unit 40 and searches whether the inputted address information is stored in the address pair hash table 70 and outputs the search result. At this time, the retrieved result can be outputted as true or false.

특히, 상기 주소 쌍 해시 테이블(70)에 접근하기 위한 해시 주소는, 상기 명령어 주소 및 상기 목적지 주소로부터 일정 개수의 하위 비트 값을 추출하여 연결함으로써 빠른 접근 속도를 보장하는 해싱 기법의 장점을 취하면서도, 이와 동시에 값의 변화가 가장 빈번한 하위 비트를 이용하였다는 점에서 해시 주소의 충돌에 따른 검색 지연을 방지할 수 있다는 또 다른 장점을 갖는다.In particular, the hash address for accessing the address pair hash table 70 takes advantage of a hashing technique for ensuring a fast access speed by extracting and connecting a certain number of lower bit values from the instruction address and the destination address, , And at the same time, the lower bit having the most frequent change in the value is used, so that the search delay due to the hash address collision can be prevented.

보다 구체적으로, 상기 해시 주소는, 상기 명령어 주소 및 상기 목적지 주소로부터 각각 하위 m 비트(m은 전체 비트 수보다 작은 양의 정수)를 추출하고, 추출된 2개의 비트 값 중 어느 하나를 길이 m만큼 레프트 시프트(left shift) 연산을 통해 상위 비트로 이동시킨 후, 추출된 2개의 비트 값 중 나머지 하나의 비트 값과 비트 합 연산을 통해 결합함으로써 생성될 수 있다.More specifically, the hash address extracts lower m bits (m is a positive integer smaller than the total number of bits) from the instruction address and the destination address, and extracts any one of the extracted two bit values by a length m Shifted to an upper bit through a left shift operation, and then combined with the remaining one of the extracted two bit values through a bit sum operation.

도 2는 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치에서 주소 쌍 합성부(20)가 주소 쌍을 생성하는 과정을 설명하기 위한 도면으로서, 주소 쌍 합성부(20)의 개념적인 구조를 도시하였다.FIG. 2 is a diagram for explaining a process of generating an address pair by the address pair combiner 20 in the address search apparatus of FIG. 1 according to an embodiment of the present invention. The conceptual structure of the address pair combiner 20 Respectively.

먼저 주소 쌍 합성부(20)는 명령어 주소와 목적지 주소를 입력으로 받는다. 앞서 가정한 바와 같이 32비트 메모리 기반에서, 명령어 주소와 목적지 주소를 합성하기 위해 명령어 주소의 31~0번째 비트열을 63~32번째 합성 비트열에 위치시키고, 목적지 주소의 31~0번째 비트열을 31~0번째 합성 비트열에 위치시킨다. 합성된 64비트의 주소 쌍의 값은 출력을 통해 다른 장치(예를 들어, 도 1에서는 주소 정보 저장부(40)가 될 것이다.)로 전달된다.First, the address pair combining unit 20 receives an instruction address and a destination address as inputs. In order to combine the instruction address and the destination address, the 31st to 0th bit of the instruction address is placed in the 63th to 32nd synthesis bitstream, and the 31st to the 0th bitstream of the destination address 31 to the 0th synthesis bit string. The value of the 64-bit address pair thus synthesized is transferred to another device (for example, the address information storage unit 40 in FIG. 1) via the output.

요약하건대, 주소 쌍 합성부(20)는, 상기 명령어 주소의 (m-1)~0번째 비트열을 (k-1)~m번째 합성 비트열에 위치시키고, 상기 목적지 주소의 (m-1)~0번째 비트열을 (m-1)~0번째 합성 비트열에 위치시킴으로써, 합성된 k비트의 주소 쌍을 생성한다. 여기서, m은 명령어 주소 및 목적지 주소의 비트 수이고, k는 합성 비트열의 비트 수로서 k=2m의 관계가 성립한다.In summary, the address pair combining unit 20 places the (m-1) th to (0) th bit strings of the instruction address in the (k-1) Th bit stream to the (m-1) th to the 0th synthesized bit stream, thereby generating a synthesized k bit address pair. Here, m is the number of bits of the command address and the destination address, and k is the number of bits of the composite bit string, which is k = 2m.

도 3은 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치에서 해시 생성부(30)가 해시 키를 생성하는 과정을 설명하기 위한 도면으로서, 해시 생성부(30)의 개념적인 구조를 도시하였다.FIG. 3 is a diagram for explaining a process of generating a hash key by the hash generation unit 30 in the address search apparatus of FIG. 1 according to an embodiment of the present invention. The conceptual structure of the hash generation unit 30 is shown in FIG. Respectively.

먼저 해시 생성부(30)는 명령어 주소와 목적지 주소를 입력으로 받는다. 앞서 가정한 바와 같이 32비트 메모리 기반에서, 해시 키(hash key)는 명령어 주소 비트열에서 임의의 i 비트열과 목적지 주소 비트열에서 임의의 j 비트열을 추출하여 조합하는 방식으로 생성한다. 임의의 i 비트열은 해시 비트열의 상위에 위치하며 임의의 j 비트열은 해시 비트열의 하위에 위치시킬 수 있다. 이렇게 조합된 해시 키는 출력을 통해 다른 장치(예를 들어, 도 1에서는 주소 정보 저장부(40)가 될 것이다.)로 전달된다.First, the hash generation unit 30 receives an instruction address and a destination address as inputs. As described above, in the case of a 32-bit memory, a hash key is generated by extracting arbitrary j-bit strings from an arbitrary i-bit string and a destination address bit string in an instruction address bit string. An arbitrary i bit string is located above the hash bit string and any j bit string can be located below the hash bit string. The combined hash key is passed through the output to another device (e.g., address information storage 40 in FIG. 1).

요약하건대, 해시 생성부(30)는, 상기 명령어 주소의 임의의 위치로부터 i 비트의 비트열을 추출하고, 상기 목적지 주소의 임의의 위치로부터 j 비트의 비트열을 추출한 후 양 비트열을 결합함으로서 합성된 k 비트의 해시 키를 생성한다. 여기서, k는 합성 비트열의 비트 수로서 k=i+j의 관계가 성립한다.In summary, the hash generation unit 30 extracts a bit string of i bits from an arbitrary position of the address of the instruction, extracts a bit string of j bits from an arbitrary position of the destination address, and then combines the bit string And generates a synthesized k-bit hash key. Here, k is the number of bits of the composite bit stream and k = i + j is satisfied.

도 4a 및 도 4b는 본 발명의 일 실시예에 따른 도 1의 주소 검색 장치(100)에서 해싱을 적용한 주소 검색 과정 및 주소 쌍 해시 테이블(70)의 구조를 도시한 도면이다.4A and 4B are diagrams illustrating a structure of an address search process and an address pair hash table 70 to which hashing is applied in the address search apparatus 100 of FIG. 1 according to an embodiment of the present invention.

본 발명의 실시예들에 따른 주소 검색 장치(100)는 버킷 체이닝(bucket chaining) 방식의 테이블 구조를 가진다. 이를 위해 모든 주소 쌍은 주소 쌍 풀(pool)(72)

Figure 112014119583523-pat00019
에 저장하고, 충돌을 일으키는 주소 쌍들은 체인 인덱스 테이블(chain index table)(73)
Figure 112014119583523-pat00020
를 사용하여 원형 연결 리스트(circular linked list) 구조로 버킷 체인(bucket chain)을 이루게 한다. 버킷 헤더 테이블(bucket header table)(71)
Figure 112014119583523-pat00021
의 각 레코드는 주소 쌍 풀
Figure 112014119583523-pat00022
의 인덱스 값과 버킷 체인의 길이를 저장한다.The address search apparatus 100 according to the embodiments of the present invention has a bucket chaining table structure. For this purpose, all address pairs are address pool pool 72,
Figure 112014119583523-pat00019
The address pairs causing the collision are stored in a chain index table 73,
Figure 112014119583523-pat00020
To form a bucket chain with a circular linked list structure. A bucket header table (71)
Figure 112014119583523-pat00021
Each record in the address pair pool
Figure 112014119583523-pat00022
And the length of the bucket chain.

주소 쌍을 검색할 때 버킷 헤더 테이블(71)

Figure 112014119583523-pat00023
에 저장된 색인이 찾고 있는 주소 쌍이 아니면, 주소 쌍을 찾을 때까지 혹은 체인 길이만큼 원형 체인을 검사한다. 체인 내에서 주소 쌍이 확인되면 버킷 헤더에 저장된 체인 시작 인덱스를 검색된 주소 쌍의 풀 인덱스로 갱신한다. 이러한 갱신 방식에 따를 경우, 버킷 체인의 헤더는 항상 최근에 검색한 주소 쌍 인덱스를 갖고 있게 되어 캐싱(caching) 효과를 볼 수 있다. 반복문 안에서 발생하는 간접 분기는 동일한 목적지로 제어 흐름을 이동할 가능성 높기 때문에 주소 쌍 풀(72)
Figure 112014119583523-pat00024
의 동일 주소 쌍을 반복해서 검색하게 되는데, 두 번째 검색부터는 1 회의 검색으로 두 주소 값의 일치 여부를 판단할 수 있게 되는 장점을 갖는다.When retrieving the address pair, the bucket header table (71)
Figure 112014119583523-pat00023
If the stored index is not the address pair you are looking for, check the circular chain until you find the address pair or by the chain length. If an address pair is found in the chain, the chain start index stored in the bucket header is updated with the full index of the retrieved address pair. According to this update method, the header of the bucket chain always has the address pair index searched recently, and the caching effect can be seen. Since the indirect branching occurring in the loop is highly likely to move the control flow to the same destination,
Figure 112014119583523-pat00024
It is possible to judge whether the two address values coincide with each other by searching one time from the second search.

요약하건대, 본 발명의 실시예들이 채택하고 있는 주소 쌍 해시 테이블(70)은, 모든 주소 쌍을 저장하는 주소 쌍 풀(pool)(72), 주소 쌍 저장시 충돌을 일으키는 주소 쌍들을 원형 연결 리스트(circular linked list) 구조의 버킷 체인(bucket chain)으로 형성하는 체인 인덱스 테이블(chain index table)(73) 및 상기 주소 쌍 풀의 인덱스 값과 상기 버킷 체인의 길이를 저장하는 버킷 헤더 테이블(bucket header table)(71)을 포함한다.In summary, the address pair hash table 70 adopted by the embodiments of the present invention includes an address pair pool 72 for storing all address pairs, address pairs for causing conflicts during address pair storage, a chain index table 73 formed by a bucket chain of a circular linked list structure and a bucket header table 73 for storing the index value of the address pair pool and the length of the bucket chain. table (71).

특히, 주소 쌍을 검색하는 경우 주소 검색부는(60), 상기 버킷 헤더 테이블(71)에 저장된 색인이 검색 대상 주소 쌍이 아니면, 상기 검색 대상 주소 쌍을 발견할 때까지 또는 상기 체인의 길이만큼 상기 원형 연결 리스트 구조의 버킷 체인을 검사하며, 상기 버킷 체인 내에서 상기 검색 대상 주소 쌍이 발견된 경우, 상기 버킷 헤더에 저장된 체인 시작 인덱스를 상기 검색 대상 주소 쌍의 풀 인덱스(pool index)로 갱신하는 것이 바람직하다.In particular, when the address pair is searched, the address searching unit (60) determines whether the index stored in the bucket header table (71) is not a search target address pair, until the search target address pair is found, It is preferable to check the bucket chain of the connection list structure and update the chain start index stored in the bucket header to the pool index of the search target address pair when the search target address pair is found in the bucket chain Do.

이하에서는 상기된 본 발명의 실시예들에 따른 주소 검색기의 효율을 검증하기 위하여 성능 실험을 실시하고 결과를 분석한다. 실험 환경은 인텔 코어2 쿼드 Q6600 2.40GHz x86 프로세서와 4GB 메모리를 가진 네트워크가 연결 된 Fedora Core 14 리눅스(커널 버전 2.6.35.14-106) 시스템으로 구성하였다. 동적 계측화 도구에는 Pin(버전 2.11(49303))을, 컴파일러는 gcc(버전 4.6.3)을 사용하였다. 주소 쌍 테이블의 성능 실험은 SPECint 2006(버전 112(v1.1)) 벤치마크를 대상으로 실시하였다. Hereinafter, a performance test is performed to verify the efficiency of the address searcher according to the embodiments of the present invention, and the results are analyzed. The experimental environment consisted of a Fedora Core 14 Linux (kernel version 2.6.35.14-106) system with a network with Intel Core 2 Quad Q6600 2.40GHz x86 processor and 4GB memory. Pin (version 2.11 (49303)) and compiler gcc (version 4.6.3) were used for the dynamic measurement tool. Performance tests of the address pair table were performed on the SPECint 2006 (version 112 (v1.1)) benchmark.

(1) 해시 주소의 충돌 검사(1) Collision check of hash address

도 5는 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 수에 대한 체인 길이가 1인 버킷 체인 비율을 예시한 도면으로서, 해시 주소의 충돌 가능성에 지표로는 주소 쌍 테이블의 버킷 체인 길이가 1인 비율을 측정하였다. 프로그램 계측화 도구를 사용하여 발생시킨 주소 쌍 트레이스로 주소 쌍 테이블을 형성하고, 동일한 트레이스로 주소 쌍 검색 실험을 수행하였다. 출처 주소와 목적지 주소 각각에서 추출하는 비트 수는 5부터 10까지 바꿔가며 실험을 실시하였다.5 is a diagram illustrating a bucket chain ratio having a chain length of 1 for a number of bits as a simulation result using an address search apparatus according to embodiments of the present invention. The ratio of one bucket chain length was measured. The address pair table was formed by the address pair trace generated by the program measurement tool and the address pair search experiment was performed by the same trace. The number of bits extracted from source address and destination address was varied from 5 to 10.

도 5는 SPECint 2006의 각 프로그램 별 비트 수

Figure 112014119583523-pat00025
에 대한 체인 길이가 1인 버킷 체인의 비율을 나타낸다. 이 지표는
Figure 112014119583523-pat00026
이 주는 해시 주소의 충돌 가능성이 얼마나 높은지를 간접적으로 보여주고 있다. 모든 벤치마크에 대하여
Figure 112014119583523-pat00027
이 커질수록 길이가 1인 버킷 체인의 비율이 증가한다.
Figure 112014119583523-pat00028
이면 길이가 1인 비율이 최대 99%, 평균 97%를 나타냈다. 즉,
Figure 112014119583523-pat00029
이 일정 수준 이상으로 커지면 해시 주소가 거의 충돌하지 않음을 알 수 있다.5 shows the number of bits per program in SPECint 2006
Figure 112014119583523-pat00025
Lt; RTI ID = 0.0 > 1 < / RTI > This indicator
Figure 112014119583523-pat00026
This note indirectly shows how likely the hash address is likely to collide. For all benchmarks
Figure 112014119583523-pat00027
The larger the ratio, the greater the ratio of the bucket chain with a length of one.
Figure 112014119583523-pat00028
The ratio of one person to the other person was 99% and 97%, respectively. In other words,
Figure 112014119583523-pat00029
If it is larger than a certain level, the hash address hardly collides.

(2) 주소 쌍 테이블의 캐싱 기능(2) Caching function of address pair table

도 6은 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 수에 대한 주소 쌍 검색 횟수가 1인 비율을 예시한 도면으로서, 검색 및 캐싱 성능에 대한 지표는 주소 쌍 테이블 내에서 검색 횟수가 1인 비율을 측정하였다.FIG. 6 is a diagram illustrating a ratio of the number of address pair search times to the number of bits as a result of a simulation using the address search apparatus according to the embodiments of the present invention. The number of searches was 1.

도 6은 SPECint 2006의 프로그램 별 비트 수

Figure 112014119583523-pat00030
에 대한 주소 쌍 검색 횟수가 1인 비율을 나타낸다. 이 지표는 체인을 원형 연결 리스트로 구성하였을 때의 캐싱 효과를 보여 준다. 표의 가장 왼쪽 열은 프로그램 명을, 오른쪽 열은 간접 분기 명령어 주소와 목적지 주소에서 추출한 비트 수
Figure 112014119583523-pat00031
에 따라 나타나는 비율을 의미한다. 모든 프로그램에 대하여
Figure 112014119583523-pat00032
이 커질수록 비율이 증가함을 알 수 있다.
Figure 112014119583523-pat00033
이상이면 정상적인 간접 분기 명령의 경우 평균 1.01회의 비교로 검색을 마칠 수 있음을 확인할 수 있다. 이와 같은 현상은 비트 수
Figure 112014119583523-pat00034
이 작아서 해시 테이블에 길이 1을 가지는 주소 쌍의 체인 비율이 낮더라도 원형 체인 구조가 주는 캐시 효과로 성능이 향상될 수 있음을 보여준다. 실험을 통해 활발히 변화하는 하위 주소 비트 범위는
Figure 112014119583523-pat00035
정도임을 확인하였다.
Figure 112014119583523-pat00036
이상일 경우는 성능에 별다른 영향을 주지 않는다. 이 현상은 대부분의 간접 분기가 64 KB 범위 내에서 이동함을 의미한다.FIG. 6 shows the number of bits per program of SPECint 2006
Figure 112014119583523-pat00030
The number of address pair search times is 1. This indicator shows the caching effect when a chain is composed of circular linked lists. The leftmost column of the table shows the program name, the right column shows the number of bits extracted from the indirect branch instruction address and destination address
Figure 112014119583523-pat00031
. ≪ / RTI > About all programs
Figure 112014119583523-pat00032
It is seen that the ratio increases.
Figure 112014119583523-pat00033
, It can be confirmed that the search can be terminated by an average of 1.01 times in the case of the normal indirect branch instruction. This phenomenon occurs when the number of bits
Figure 112014119583523-pat00034
Shows that even if the chain ratio of the address pair having the length 1 in the hash table is low, the cache effect of the circular chain structure can improve the performance. Experimental results show that the active sub-address bit range
Figure 112014119583523-pat00035
Respectively.
Figure 112014119583523-pat00036
The performance is not significantly affected. This phenomenon means that most of the indirect branches move within the 64 KB range.

(3) 비트 패턴 분석(3) Bit pattern analysis

해시 값은 주소 쌍의 하위 비트 조합에 따라 생성된다. 해시 값의 충돌이 커지면 비교 대상이 늘어나 성능 과부하의 주요 원인이 된다. 충돌이 적은 비트 패턴을 분석하면 검색에 필요한 주소 검색의 횟수가 줄어들어 과부하를 줄일 수 있다.The hash value is generated according to the lower bit combination of the address pair. As the hash value collision increases, the number of objects to be compared increases, which is a major cause of performance overload. Analyzing a bit pattern with fewer collisions reduces the number of address lookups required to search and reduces overload.

비트 패턴 분석에는 간접 분기 주소 쌍을 수집하여 개수를 비교하는 실험을 실시하였다. 실험에는 SPEC2006의 403.GCC를 활용하였다. 이 프로그램에서는 1,968,445,893개의 간접 분기 명령어 주소 쌍을 수집하여 겹치지 않는 18,729개의 고유 주소 쌍을 확인하였다. 고유 주소 쌍은 17,500개의 고유 명령어 주소와 3,675개의 고유 목적지 주소를 포함한다. 명령어 주소는 인접한 명령어 주소와의 간격이 최저 2 바이트이고, 목적지 주소는 인접한 목적지 주소의 간격이 최저 3 바이트임을 확인하였다. 이는 해시 값을 생성할 때 최하위 비트의 활용이 불필요함을 의미한다.For the bit pattern analysis, an experiment was performed to compare the number of indirect branch address pairs collected. In the experiment, 403.GCC of SPEC2006 was utilized. In this program, we collected 1,968,445,893 indirect branch instruction address pairs to identify 18,729 unique address pairs that do not overlap. The unique address pair contains 17,500 unique instruction addresses and 3,675 unique destination addresses. We confirmed that the command address has a minimum distance of 2 bytes from the adjacent command address and the destination address has the minimum distance of 3 bytes from the adjacent destination address. This means that it is not necessary to use the least significant bit when generating the hash value.

도 7은 본 발명의 실시예들에 따른 주소 검색 장치를 이용한 시뮬레이션 결과로서 비트 패턴 조합에 따른 목적지 주소의 비트 위치를 예시한 도면이다.FIG. 7 is a diagram illustrating a bit position of a destination address according to a bit pattern combination as a simulation result using an address search apparatus according to embodiments of the present invention.

비트 패턴 조합에는 명령어 주소

Figure 112014119583523-pat00037
와 목적지 주소
Figure 112014119583523-pat00038
의 하위 비트를 추출하여 활용하였다. 도 7의 (a)는
Figure 112014119583523-pat00039
Figure 112014119583523-pat00040
각각에서 하위 12번부터 1번까지의 12비트를 추출하여 24비트로 조합한 경우로 18,645개의 고유 주소 쌍을 생성하였다. 도 7의 (b)는
Figure 112014119583523-pat00041
Figure 112014119583523-pat00042
각각에서 하위 10번부터 1번까지의 10비트를 추출하여 20비트로 조합한 경우로 18,265개의 고유 주소 쌍을 생성하였다. 도 7의 (c)는
Figure 112014119583523-pat00043
Figure 112014119583523-pat00044
각각에서 하위 9번부터 0번까지의 10비트를 추출하여 20비트로 조합한 경우로 18,168개의 고유 주소 쌍을 생성하였다. 도 7의 (d)는
Figure 112014119583523-pat00045
로부터 하위 9번부터 0번까지의 10비트를,
Figure 112014119583523-pat00046
로부터 하위 9번부터 1번까지의 9비트를 추출하여 19비트로 조합한 경우로 17,716개의 고유 주소 쌍을 생성하였다.The bit pattern combination includes a command address
Figure 112014119583523-pat00037
And destination address
Figure 112014119583523-pat00038
And extracts the low - order bits. Figure 7 (a)
Figure 112014119583523-pat00039
Wow
Figure 112014119583523-pat00040
In the case of extracting the 12 bits from the lower 12th to the 1th in each and combining them with 24 bits, 18,645 unique address pairs are generated. 7 (b)
Figure 112014119583523-pat00041
Wow
Figure 112014119583523-pat00042
In the case of extracting 10 bits from the lower 10th to 1st in each and combining them with 20 bits, 18,265 unique address pairs are generated. 7 (c)
Figure 112014119583523-pat00043
Wow
Figure 112014119583523-pat00044
In the case of extracting 10 bits from the lower 9th to 0th in each and combining them with 20 bits, 18,168 unique address pairs are generated. 7 (d)
Figure 112014119583523-pat00045
10 bits from the lower 9th to the 0th bit,
Figure 112014119583523-pat00046
9 bits from the lower 9th to the 1st 9th bit are extracted and combined into 19 bits to generate 17,716 unique address pairs.

비트 패턴의 조합은 도 7의 (b)가 적절함을 알 수 있다. 도 7의 (a)는 16메가바이트(MB)의 저장하는 공간이 필요하지만 실제 저장에 필요한 주소 쌍의 개수가 적어서 공간의 낭비가 발생한다. 도 7의 (c)는 도 7의 (b)와 비교해서 고유 주소 쌍의 개수가 적으므로 상대적으로 충돌이 더 발생할 수 있다. 도 7의 (d)는 실제 고유 주소 쌍의 개수 18,729보다 적은 17,716개의 고유 주소 쌍을 생성하므로 충돌이 커져 비교 횟수가 늘어나게 된다.It can be seen that the combination of bit patterns is appropriate in Fig. 7 (b). FIG. 7A requires space for storing 16 megabytes (MB), but space is wasted because the number of address pairs required for actual storage is small. 7 (c) has a smaller number of unique address pairs as compared with FIG. 7 (b), so that more collisions may occur. 7 (d) generates 17,716 unique address pairs less than the actual number of unique address pairs of 18,729, so that the number of comparisons increases because the number of collisions increases.

앞서 설명한 바와 같이, 주소 검색기의 성능 향상을 위해서는 비교 횟수를 감소시켜야 한다. 주소 쌍으로부터 최소 10비트의 비트 조합을 해시 값으로 활용하면 주소 쌍을 대부분 한 번에 검색이 가능하다. 또한, 반복되는 주소는 한 번에 검색이 가능하므로 검색으로 인한 과부하를 효율적으로 줄일 수 있다. 상기된 비트 패턴 분석 결과는 최하위 비트를 제외한 비트 조합이 성능면에서 더 효과적임을 확인하였다.As described above, in order to improve the performance of the address detector, it is necessary to reduce the number of comparisons. Using a bit combination of at least 10 bits from an address pair as a hash value, most of the address pairs can be retrieved at a time. Also, repeated addresses can be searched at once, which can effectively reduce the overload due to the search. As a result of the above bit pattern analysis, it is confirmed that the bit combination except for the least significant bit is more effective in performance.

상기된 본 발명의 실시예들에 따르면, 해싱 기법을 적용하여 명령어 주소 및 목적지 주소로부터 일정 개수의 하위 비트 값을 추출하여 연결함으로써 주소 쌍 테이블에 대한 빠른 접근 속도를 보장하고, 값의 변화가 가장 빈번한 하위 비트를 추출하여 이용함으로써 공간의 낭비를 방지하고 해시 주소의 충돌 횟수를 감소시켜 검색 효율을 향상시킬 수 있으며, 주소 저장 과정에서 원형 리스트 구조를 도입하고 주소 쌍 검색 과정에서 해당 버킷에서 최근에 검색된 데이터의 색인을 보관하는 시간 지역성을 활용함으로써 항상 최근에 검색한 주소 쌍 인덱스를 확보할 수 있는 캐싱 효과를 얻을 수 있고 그 결과 검색 시간이 단축되는 효과를 달성할 수 있다.According to the embodiments of the present invention, a hashing technique is applied to extract a certain number of lower-order bit values from the instruction address and the destination address and to connect them, thereby ensuring a fast access speed to the address pair table, By extracting and using frequent lower bits, it is possible to prevent waste of space and reduce the number of collisions of hash addresses, thereby improving search efficiency. In addition, a circular list structure is introduced in the address storing process, By utilizing the temporal locality of storing the index of the retrieved data, it is possible to obtain a caching effect that always obtains the address pair index searched recently, and as a result, the search time can be shortened.

특히, 통상적인 캐시 장치와 본 발명의 실시예들이 제안하는 캐시 기법은 검색 방식에 있어서 차이점이 존재한다. 일반적인 캐시 장치는 메모리로부터 미리 복사해둔 자료 값을 해시 테이블을 활용하여 빠르게 접근한다. 이때, 해시 값이 충돌하면 순차적으로 검색을 실시하여 캐시 장치 내 자료 값의 유무를 확인해야만 하므로 추가적인 과부하가 발생한다. 그러나 본 주소 검색 장치에서는 순차적으로 자료 값을 검색하여 가장 마지막에 확인한 자료 값부터 검색을 실시한다. 이로 인해, 반복문과 같이 같은 주소 값을 연속적으로 참조하는 경우에 대한 지역성을 효과적으로 활용할 수 있다는 장점을 갖는다. 또한, 자료 값이 원형 리스트 형태로 연결되어 있으므로 같은 해시 값을 갖는 자료 값을 누락 없이 모두 검색할 수 있다.In particular, there is a difference in the search method between the conventional cache apparatus and the cache scheme proposed by the embodiments of the present invention. A common cache device quickly accesses data values copied from memory in advance using a hash table. At this time, if the hash value collides with each other, it is necessary to perform sequential search to check the presence or absence of the data value in the cache device, so that an additional overload occurs. However, in this address search device, the data values are sequentially searched and the data is searched from the last confirmed data value. This has the advantage of being able to effectively utilize the locality in case of referring to the same address value continuously, such as a loop statement. In addition, since data values are linked in a circular list form, data values having the same hash value can be searched without missing.

한편, 본 발명의 실시예들에서 특히 주소 검색 장치의 각 구성요소를 제어하는 일련의 연산 방법은 컴퓨터로 읽을 수 있는 기록 매체에 컴퓨터가 읽을 수 있는 코드로 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록 장치를 포함한다.Meanwhile, in the embodiments of the present invention, in particular, a series of operation methods for controlling each component of the address search apparatus can be implemented by a computer-readable code on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored.

컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현하는 것을 포함한다. 또한, 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고 본 발명을 구현하기 위한 기능적인(functional) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술 분야의 프로그래머들에 의하여 용이하게 추론될 수 있다.Examples of the computer-readable recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device and the like, and also a carrier wave (for example, transmission via the Internet) . In addition, the computer-readable recording medium may be distributed over network-connected computer systems so that computer readable codes can be stored and executed in a distributed manner. In addition, functional programs, codes, and code segments for implementing the present invention can be easily deduced by programmers skilled in the art to which the present invention belongs.

이상에서 본 발명에 대하여 그 다양한 실시예들을 중심으로 살펴보았다. 본 발명에 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described above with reference to various embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

100 : 주소 검색 장치
10 : 제어부
20 : 주소 쌍 합성부
30 : 해시 생성부
40 : 주소 정보 저장부
50 : 주소 수집부
60 : 주소 검색부
70 : 주소 쌍 해시 테이블
71 : 버킷 헤더 테이블
72 : 주소 쌍 풀
73 : 체인 인덱스 테이블
100: address search device
10:
20: address pair combining unit
30: hash generating unit
40: address information storage unit
50: address collecting section
60: address search section
70: Address pair hash table
71: Bucket header table
72: address pair pool
73: Chain index table

Claims (7)

주소 검색 요청에 따른 주소 입력 신호를 입력받는 제어부;
명령어 주소 및 목적지 주소로부터 하나의 주소 쌍을 생성하는 주소 쌍 합성부;
상기 명령어 주소 및 상기 목적지 주소로부터 검색을 위한 해시 키(hash key)를 생성하는 해시 생성부;
상기 주소 쌍과 상기 해시 키를 입력받아 하나의 주소 정보를 합성하는 주소 정보 저장부;
상기 주소 정보를 입력받아 주소 쌍 저장시 충돌을 일으키는 주소 쌍들을 원형 연결 리스트(circular linked list) 구조의 버킷 체인(bucket chain)을 형성하되, 최근 검색된 주소 쌍에 대한 색인을 저장하는 주소 쌍 해시 테이블(hash table)에 기록하는 주소 수집부; 및
상기 주소 정보를 입력받고, 상기 최근 검색된 주소 쌍부터 상기 주소 쌍 해시 테이블에 주소 쌍이 추가된 순서에 따라 연속적으로 상기 입력된 주소 정보가 저장되어 있는지 여부를 검색한 후 그 검색 결과를 출력하는 주소 검색부;를 포함하는 주소 검색 장치.
A control unit receiving an address input signal according to an address search request;
An address pair synthesizer for generating one address pair from the command address and the destination address;
A hash generating unit for generating a hash key for searching from the instruction address and the destination address;
An address information storage unit for receiving the address pair and the hash key and synthesizing one address information;
A bucket chain of a circular linked list structure is formed by combining the address pairs causing the collision when the address information is stored upon receipt of the address information, and an address pair hash table an address collecting unit for storing the address in a hash table; And
And an address pair search unit for searching whether or not the input address information is stored consecutively in the order in which the address pair is added to the address pair hash table from the recently searched address pair, And an address search unit for searching for an address.
제 1 항에 있어서,
상기 주소 쌍 해시 테이블에 접근하기 위한 해시 주소는,
상기 명령어 주소 및 상기 목적지 주소로부터 소정 개수의 하위 비트 값을 추출하여 연결함으로써 생성되는 것을 특징으로 하는 주소 검색 장치.
The method according to claim 1,
The hash address for accessing the address pair hash table may be,
And extracting and connecting a predetermined number of lower bit values from the command address and the destination address.
제 2 항에 있어서,
상기 해시 주소는,
상기 명령어 주소 및 상기 목적지 주소로부터 각각 하위 m 비트(m은 전체 비트 수보다 작은 양의 정수)를 추출하고, 추출된 2개의 비트 값 중 어느 하나를 길이 m만큼 레프트 시프트(left shift) 연산을 통해 상위 비트로 이동시킨 후, 추출된 2개의 비트 값 중 나머지 하나의 비트 값과 비트 합 연산을 통해 결합함으로써 생성되는 것을 특징으로 하는 주소 검색 장치.
3. The method of claim 2,
The hash-
(M is a positive integer smaller than the total number of bits) from the instruction address and the destination address, and performs a left shift operation on any one of the extracted two bit values by a length m And then combining the bit values of the remaining one of the two extracted bit values through a bit sum operation.
제 1 항에 있어서,
상기 주소 쌍 합성부는,
상기 명령어 주소의 (m-1)~0번째 비트열을 (k-1)~m번째 합성 비트열에 위치시키고, 상기 목적지 주소의 (m-1)~0번째 비트열을 (m-1)~0번째 합성 비트열에 위치시킴으로써, 합성된 k비트의 주소 쌍을 생성(m은 명령어 주소 및 목적지 주소의 비트 수, k는 합성 비트열의 비트 수로서 k=2m)하는 것을 특징으로 하는 주소 검색 장치.
The method according to claim 1,
The address pair combiner comprises:
(M-1) to (0) th bit string of the address of the instruction is located in the (k-1) th to (M is the number of bits of the command address and the destination address, and k is the number of bits of the composite bit string, k = 2m).
제 1 항에 있어서,
상기 해시 생성부는,
상기 명령어 주소의 임의의 위치로부터 i비트의 비트열을 추출하고, 상기 목적지 주소의 임의의 위치로부터 j비트의 비트열을 추출한 후 양 비트열을 결합함으로서 합성된 k비트의 해시 키를 생성(k는 합성 비트열의 비트 수로서 k=i+j)하는 것을 특징으로 하는 주소 검색 장치.
The method according to claim 1,
Wherein the hash-
Extracts a bit string of i bits from an arbitrary position of the instruction address, extracts a bit string of j bits from an arbitrary position of the destination address, and combines the bit strings to generate a synthesized k-bit hash key k Is a number of bits of the composite bit string, k = i + j).
제 1 항에 있어서,
상기 주소 쌍 해시 테이블은,
모든 주소 쌍을 저장하는 주소 쌍 풀(pool);
주소 쌍 저장시 충돌을 일으키는 주소 쌍들을 원형 연결 리스트(circular linked list) 구조의 버킷 체인(bucket chain)으로 형성하는 체인 인덱스 테이블(chain index table); 및
상기 주소 쌍 풀의 인덱스 값과 상기 버킷 체인의 길이를 저장하는 버킷 헤더 테이블(bucket header table);을 포함하는 것을 특징으로 하는 주소 검색 장치.
The method according to claim 1,
Wherein the address pair hash table comprises:
An address pair pool storing all address pairs;
A chain index table for forming pairs of addresses causing conflicts when address pairs are stored in a bucket chain of a circular linked list structure; And
And a bucket header table storing an index value of the address pair pool and a length of the bucket chain.
제 6 항에 있어서,
주소 쌍을 검색하는 경우 상기 주소 검색부는,
상기 버킷 헤더 테이블에 저장된 색인이 검색 대상 주소 쌍이 아니면, 상기 검색 대상 주소 쌍을 발견할 때까지 또는 상기 체인의 길이만큼 상기 원형 연결 리스트 구조의 버킷 체인을 검사하며,
상기 버킷 체인 내에서 상기 검색 대상 주소 쌍이 발견된 경우, 상기 버킷 헤더에 저장된 체인 시작 인덱스를 상기 검색 대상 주소 쌍의 풀 인덱스(pool index)로 갱신하는 것을 특징으로 하는 주소 검색 장치.
The method according to claim 6,
When searching for an address pair,
If the index stored in the bucket header table is not a search target address pair, checks the bucket chain of the circular linked list structure until the search target address pair is found or by the length of the chain,
And updates the chain start index stored in the bucket header to a pool index of the search target address pair when the search target address pair is found in the bucket chain.
KR1020140175623A 2014-12-09 2014-12-09 Apparatus and method for searching address based on hashing using temporal locality KR101689527B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140175623A KR101689527B1 (en) 2014-12-09 2014-12-09 Apparatus and method for searching address based on hashing using temporal locality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140175623A KR101689527B1 (en) 2014-12-09 2014-12-09 Apparatus and method for searching address based on hashing using temporal locality

Publications (2)

Publication Number Publication Date
KR20160069707A KR20160069707A (en) 2016-06-17
KR101689527B1 true KR101689527B1 (en) 2016-12-26

Family

ID=56343785

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140175623A KR101689527B1 (en) 2014-12-09 2014-12-09 Apparatus and method for searching address based on hashing using temporal locality

Country Status (1)

Country Link
KR (1) KR101689527B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100999408B1 (en) * 2008-08-20 2010-12-09 충남대학교산학협력단 Method for searching an ??? using hash tree
KR101028470B1 (en) * 2009-05-07 2011-04-14 이화여자대학교 산학협력단 Method and Apparatus for Searching IP Address

Also Published As

Publication number Publication date
KR20160069707A (en) 2016-06-17

Similar Documents

Publication Publication Date Title
CN102779257B (en) A kind of safety detection method of Android application program and system
US9027010B2 (en) Runtime optimization using meta data for dynamic programming languages
CN102831338B (en) A kind of safety detection method of Android application program and system
JP6091598B2 (en) System, method and computer program for hybrid address translation (hybrid address translation)
US8843912B2 (en) Optimization of an application to reduce local memory usage
Ming et al. Straighttaint: Decoupled offline symbolic taint analysis
US6971092B1 (en) System and method for analyzing data accesses of a trace from a computer-executable program to determine data access patterns
Yuan et al. B2sfinder: Detecting open-source software reuse in cots software
US10664383B2 (en) Automated software program repair of similar code snippets
JP2014130489A (en) Data storage program, data retrieval program, data retrieval device, data storage method, and data retrieval method
CN110569629A (en) Binary code file tracing method
Gope et al. Architectural support for server-side PHP processing
KR20150074143A (en) Malware attack prevention using block code permutation
Jensen et al. PTrie: data structure for compressing and storing sets via prefix sharing
US9696976B2 (en) Method for optimizing processing of character string during execution of a program, computer system and computer program for the same
KR20190080445A (en) Whitelist construction method for analyzing malicious code, computer readable medium and device for performing the method
US20190056921A1 (en) Utilizing created character index for switch statements
CN106502707B (en) Code generation method and device
KR101689527B1 (en) Apparatus and method for searching address based on hashing using temporal locality
Stratis et al. Speeding up test execution with increased cache locality
KR20140093593A (en) Method and system for determining work-group size and computer readable recording medium therefor
US9021450B2 (en) Scalable and precise string analysis using index-sensitive static string abstractions
US20170115973A1 (en) Operating method of semiconductor device and semiconductor system
KR20220067961A (en) Processing-in-memory and method for outputting instruction using processing-in-memory
JP4701611B2 (en) Memory management method for dynamic conversion emulators

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
N231 Notification of change of applicant
E701 Decision to grant or registration of patent right
GRNT Written decision to grant