WO2014141566A1 - 半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法 - Google Patents

半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法 Download PDF

Info

Publication number
WO2014141566A1
WO2014141566A1 PCT/JP2013/084908 JP2013084908W WO2014141566A1 WO 2014141566 A1 WO2014141566 A1 WO 2014141566A1 JP 2013084908 W JP2013084908 W JP 2013084908W WO 2014141566 A1 WO2014141566 A1 WO 2014141566A1
Authority
WO
WIPO (PCT)
Prior art keywords
key data
divided
data
address
search
Prior art date
Application number
PCT/JP2013/084908
Other languages
English (en)
French (fr)
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 CN201380074530.4A priority Critical patent/CN105190762B/zh
Priority to JP2013558841A priority patent/JP5575997B1/ja
Priority to US14/364,826 priority patent/US9240237B2/en
Priority to TW103104479A priority patent/TWI540578B/zh
Publication of WO2014141566A1 publication Critical patent/WO2014141566A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C15/00Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
    • G11C15/04Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores using semiconductor elements
    • G11C15/046Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores using semiconductor elements using non-volatile storage elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90339Query processing by using parallel associative memories or content-addressable memories
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C15/00Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
    • G11C15/02Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores using magnetic elements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C15/00Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
    • G11C15/04Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores using semiconductor elements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/12Group selection circuits, e.g. for memory block selection, chip selection, array selection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a semiconductor device and an entry address writing / reading method for the semiconductor device. More specifically, the present invention relates to an associative memory (CAM: Content Addressable Memory) designed to reduce power consumption during data retrieval by dividing a retrieval memory mat.
  • CAM Content Addressable Memory
  • search data called key data is input.
  • the CAM outputs an address called an entry address where the key data is stored.
  • the problem of increased power consumption increases with the scale of the CAM, and is currently regarded as a very serious problem.
  • Patent Document 1 proposes a data search device aiming at reducing power consumption while utilizing the high-speed search performance of CAM.
  • the data search device of Patent Document 1 newly orders a plurality of rule data with priorities determined according to the order of magnitude, and assigns them to a plurality of memory blocks according to the order. Further, when searching for data, this search device designates one memory block to be searched and executes search processing.
  • the data search apparatus of Patent Document 1 activates only one designated block and does not need to activate another block when performing a search process. It is said that the power consumption at the time of search can be reduced compared to.
  • the data search device disclosed in Patent Document 1 can reduce power consumption at the time of search as compared with a normal memory, in order to execute the search process, the data search device is not included in a block at a time. Need to access the entire memory space. For this reason, the conventional data search apparatus has a problem that the circuit configuration is complicated and the power consumption during the search is large. As described above, the technique disclosed in Patent Document 1 does not provide a fundamental solution to the current problem.
  • the inventors of the present invention diligently studied the means for solving the above problems, and as a result, the search memory mat was divided into a plurality of parts, and the key data was divided into a plurality of parts. The new knowledge of writing the entry address corresponding to the key data was obtained. In this way, by dividing the key data into a plurality of pieces and writing them in the search memory mat, when searching for this key data, the search memory mat is partially activated to perform data search. Will be able to. As a result, the present invention can realize a significant reduction in power consumption as compared with the conventional CAM.
  • the inventors of the present invention have conceived that the problems of the prior art can be solved based on the above knowledge, and have completed the present invention.
  • a first aspect of the present invention relates to a semiconductor device.
  • the semiconductor device of the present invention includes a search memory mat 102 and a control circuit 105.
  • the search memory mat 102 is assigned a location for registering an entry address in the y-axis direction (column direction), and key data is assigned in the x-axis direction (row direction).
  • the search memory mat 102 divides a region to which key data is assigned into a plurality along the x-axis direction, thereby forming a plurality of divided memories 102a, 102b.
  • the control circuit 105 is connected to the search memory mat.
  • the control circuit 105 includes an input unit 1051, a dividing unit 1052, and a writing unit 1053.
  • Key data (input data) is input to the input unit 1051.
  • the dividing unit 1052 divides key data (input data) input to the input unit into a plurality of pieces.
  • the writing unit 1053 assigns each of the key data divided by the dividing unit to the divided memory using the divided key data as an address, and writes the entry address corresponding to each of the divided key data in the divided memory.
  • the area to which the key data of the search memory mat 102 is assigned is divided into a plurality of parts.
  • the search memory mat 102 is divided into a plurality of divided memories 102a, 102b.
  • the present invention stores the key data by writing the entry address corresponding to the key data in such a plurality of divided memories 102a, 102b. That is, according to the present invention, when key data is input to the control circuit 105, the key data is divided into a plurality of pieces. Then, the control circuit 105 writes the entry address assigned to the key data for each of the divided key data in the divided memories 102a, 102b.
  • the control circuit 105 uses the location where the entry address assigned to the y-axis of the search memory mat 102 is registered as the contents (binary data) of the divided key data. An entry address corresponding to the divided key data is written at a location indicated by the divided key data.
  • the semiconductor device of the present invention divides the search memory mat 102 into a plurality of pieces, and writes the entry address corresponding to the divided key data therein.
  • the key data reading process can be performed at low power consumption and at high speed. That is, as described above, in the present invention, the key data is divided into a plurality of pieces, and the entry address for each of the divided key data is stored in the divided memory. For this reason, when searching for this entry address, it is not necessary to activate the entire search memory mat 102 at a time, and the search memory mat 102 is partially activated for each divided memory 102a, 102b. It becomes possible. Therefore, according to the present invention, it is possible to execute data search with power consumption extremely lower than that of the conventional CAM while realizing data search at the same high speed as that of the conventional CAM.
  • control circuit 105 preferably further includes a collision information storage unit 1054.
  • collision information storage unit 1054 When a plurality of entry addresses are written in the same divided memory by the writing unit, the collision information storage unit 1054 writes information indicating entry address collision in the divided memory.
  • the writing unit 1053 of the control circuit 105 uses the divided key data as an address for each of the divided key data, and the entry address corresponding to the divided key data as the divided memory. Therefore, a plurality of entry addresses may be written at the same address in the same divided memory.
  • the phenomenon that a plurality of entry addresses are written at the same address is expressed as “collision” in the present specification.
  • the semiconductor device of the present invention registers information (flag or the like) indicating the collision at the collided address, and performs the writing process as it is. continue. This speeds up the entry address writing process.
  • the present invention does not avoid the collision of entry addresses, but performs the writing process without worrying about the collision of entry addresses.
  • the present invention simplifies the algorithm in the writing process / reading process, and further realizes both high-speed data retrieval and low power consumption.
  • the control circuit 105 further includes a reading unit 1055.
  • the reading unit 1055 functions when key data as search target data is input to the input unit. That is, in the present invention, when key data as search target data is input to the input unit, the dividing unit divides the key data as the search target data into a plurality of pieces. Thereafter, the reading unit 1055 accesses the divided memory using each of the key data divided by the dividing unit as an address, and reads the entry address corresponding to each of the divided key data from the divided memory.
  • the key data is divided into a plurality of pieces, and the entry address for each of the divided key data is stored in the divided memory. Therefore, in the process of searching for the entry address, it is not necessary to activate the entire search memory mat 102 at a time, and the search memory mat 102 is partially activated for each divided memory 102a, 102b. Is possible. Therefore, according to the present invention, it is possible to execute data search with power consumption extremely lower than that of the conventional CAM while realizing data search at the same high speed as that of the conventional CAM.
  • the reading unit 1055 when the division unit accesses the divided memory using the key data divided by the dividing unit as an address, the reading unit 1055 performs division when information indicating a collision is written in the divided memory.
  • the key data is processed without considering the corresponding entry address without reading it.
  • the search memory mat 102 when the search memory mat 102 is searched using the divided key data as an address, if a plurality of entry addresses collide at the same address, the division is performed.
  • the key data is excluded from the search target and treated as “don't care”.
  • the present invention searches the search memory mat 102 after dividing one key data as search target data into a plurality of pieces. For this reason, even if some of the divided key data are treated as “don't care”, if the entry address can be read out by at least one divided key data, It is possible to check whether or not the key data corresponding to this entry address matches the key data as the search target data. Therefore, when the collision occurs, the entry address is not forcibly read out, it is treated as not considered, and the processing is continued as it is, thereby speeding up the reading process.
  • the semiconductor device preferably includes a confirmation memory mat 104.
  • the confirmation memory mat 104 stores each entry address and each key data in association with each other.
  • the control circuit 105 preferably includes a confirmation unit 1056.
  • the confirmation unit 1056 reads the key data corresponding to the entry address read by the reading unit 1055 from the confirmation memory mat, and whether or not the key data matches the key data as the search target data input to the input unit. To check.
  • the semiconductor device of the present invention has a storage area for constructing the confirmation memory mat 104, and can store the correspondence between the entry address and the key data therein. For example, when new key data is input, the semiconductor device assigns an entry address to the new key data, and stores the correspondence between the new key data and the entry address in the confirmation memory mat 104. Just keep it. In this way, when the entry address is read by the above-described reading process, if the confirmation memory mat 104 is referred to, does the entry address correspond to the key data input as the search target data? You can check whether. In particular, when there is a collision of entry addresses in the search memory mat 102, and the “don't care” process is performed by the read unit, the read is performed using the confirmation memory mat 102. It is effective to check whether the entry address is appropriate. In this way, according to the present invention, it is possible to increase the possibility that data search can be accurately performed even when entry address collision occurs.
  • the semiconductor device further includes an encoding circuit 106.
  • the encoding circuit 106 is a circuit that is arranged before the input unit 1051 of the control circuit 105. That is, the encoding circuit 106 encodes the key data by a predetermined process, and outputs the encoded key data to the input unit of the control circuit.
  • the semiconductor device of the present invention writes the entry address corresponding to the divided key data in the divided memories 102a, 102b,... Of the search memory mat 102, and when a plurality of entry addresses are written to the same address of the divided memory.
  • the collision information is to be registered.
  • data bias occurs when a plurality of almost the same data is continuously registered, for example, when ID numbers are registered in descending order.
  • data having almost the same content is continuously registered, the data is not uniformly distributed in the search memory mat 102, but is concentratedly registered at almost the same address in the search memory mat 102.
  • the key data is encoded by the encoding circuit 106 before the key data is input to the input unit 1051 of the control circuit 105.
  • Encoding here includes processing such as distributing key data (binary data) by a predetermined algorithm and rearranging the order of key data (binary data).
  • distributing key data binary data
  • rearranging the order of key data binary data
  • the present invention reads the already written entry addresses from all the addresses hit in the search, and confirms each entry address. Reference memory mats sequentially. Thereby, even if all the outputs from the search memory mat 102 are in the search ignored state, there is a possibility that the correct answer can be derived by the data search. As a result, the possibility that data search can be performed accurately increases.
  • a second aspect of the present invention relates to an entry address write / read method for a semiconductor device.
  • the method according to the present invention relates to a method for writing an entry address corresponding to key data to a semiconductor device.
  • This semiconductor device includes a search memory mat 102 having a configuration in which an entry address registration location is assigned in the y-axis direction and key data is assigned in the x-axis direction, and a control circuit 105 connected to the search memory mat 102.
  • a plurality of divided memories 102a, 102b,... are formed by dividing an area to which key data is assigned into a plurality of areas along the x-axis direction.
  • key data is input to the control circuit 105 of the semiconductor device. Thereafter, the control circuit divides the input key data into a plurality of pieces. Then, the control circuit assigns each of the divided key data to the divided memory using the divided key data as an address, and writes the entry address corresponding to each of the divided key data into the divided memory.
  • data search processing can be performed at high speed with low power consumption.
  • an automatic switch capable of hardware-like dynamic reconstruction can be realized. Further, in the present invention, if the basic input information group is input by burst transfer, basically only the microcode is sufficient for performing the search process, and no program is required. Of course, image compression and encryption can be performed in the same way.
  • the present invention it is possible to eliminate the bias of input data (search data) and reduce the frequency of data collision. Further, according to the present invention, it is possible to realize a semiconductor device that can cope with data collision.
  • FIG. 6 is a diagram showing an SRAM-CAM switch or search operation according to an embodiment of the present invention.
  • FIG. 6 is a diagram showing a write operation of SRAM-CAM showing an embodiment of the present invention. It is a figure which shows the search operation
  • FIG. 4 is a diagram showing changes in three types of data after coding key data which is original information input to the SRAM-CAM, key data after grouping 4 bits and changing the group arrangement, and encoding in units of 8 bits. is there.
  • the present invention relates to a semiconductor device and an entry address write / read method for the semiconductor device.
  • Elements of the basic concept of the present invention are as follows. (1) The control circuit of the semiconductor device divides data to be searched, that is, key data into a plurality (n division), and accesses the memory circuit (search memory mat) using the divided key data as an address. . (2) The control circuit registers the entry address corresponding to the divided key data at the address of the accessed memory circuit. (3) This entry address registration process is performed for all the memory circuits corresponding to the division number (n) of the key data. (4) After the entry address registration, when key data as search target data is input to the control circuit, the control circuit divides the input key data into a plurality (n divisions).
  • the control circuit accesses the memory circuit using the divided key data as an address, and outputs an entry address registered in the memory circuit. Desirably, (5) When all of the output entry addresses match, the control circuit adopts it as an entry address for obtaining it. On the other hand, if the output entry address does not match, the control circuit determines that data matching the search target data is not registered.
  • FIG. 1 is a functional block diagram showing the main functional configuration of a semiconductor device according to the present invention.
  • the semiconductor device of the present invention includes a search memory mat 102 and a control circuit 105.
  • the semiconductor device of the present invention preferably further includes a confirmation memory mat 104 and an encoding circuit 106.
  • the control circuit 105 is connected to each of the search memory mat 102, the confirmation memory mat 104, and the encoding circuit 106, and has a function of comprehensively controlling information processing in the semiconductor device.
  • the search memory mat 102 shown in FIG. 1 has a configuration in which an entry address is registered in the y-axis direction and key data is assigned in the x-axis direction.
  • the “y-axis direction” means either the column direction (vertical direction) or the row direction (horizontal direction) in a matrix array
  • the “x-axis direction” means the column direction ( It means the other direction of the vertical direction) and the row direction (horizontal direction). That is, in the search memory mat 102, one key data is stored in association with one entry address.
  • the search memory mat 102 is basically configured such that a location for registering a plurality of entry addresses in the y-axis direction is assigned, and one key data can be assigned to each entry address in the x-axis direction. .
  • a CAM associative memory
  • the function of providing the user with the entry address of the place where the key data is found is provided. That is, “key data” means desired information registered in the search memory mat.
  • the “entry address” means meta information indicating a location (address) in a search memory mat where key data is registered.
  • each “location where an entry address is registered” assigned in the y-axis direction of the search memory mat 102 is given address data for specifying the location. It is done. For example, in the example shown in FIG. 8, there are four “locations where entry addresses are registered” in the y-axis direction.
  • the address of each “location where the entry address is registered” is specified by, for example, 2-bit data. For example, address data “00”, “01”, “10”, and “11” are given to four “locations where entry addresses are registered”, respectively.
  • This address data is data for specifying the address of “location where entry address is registered” in the memory space of search memory 102.
  • the address data for specifying the “location where the entry address is registered” may be data of 3 bits or more.
  • the address data for specifying the “location where the entry address is registered” may be data of 2 to 6 bits or 3 to 5 bits.
  • the key data can be written or read with a desired number of bits.
  • the entry address is preferably defined by 2 bits or more, for example.
  • the entry address may be 2 to 6 bits, and may be 3 to 5 bits.
  • the search memory mat 102 is constructed by a plurality of divided memories 102a, 102b, 102c.
  • the plurality of divided memories divide an area in the x-axis direction to which key data is allocated in the storage space of the search memory mat 102 into a plurality along the y-axis direction. That is, by dividing the search memory mat 102 into a plurality of divided memories 102a, 102b, 102c,..., An area to which key data is allocated is divided into a plurality of areas.
  • Each divided memory can be configured using a storage device such as an SRAM. In this sense, it can be said that the present invention is a CAM realized by using a plurality of SRAMs.
  • a CAM realized using an SRAM is referred to as an SRAM-CAM.
  • the search memory mat 102 in which the area to which the key data is assigned is divided into a plurality of parts has a configuration as shown in FIG.
  • the storage space of the search memory mat 102 is divided into a plurality of areas in the y-axis direction and the x-axis direction. Is done.
  • the partitioned storage space (cell) specified by the y-axis and the x-axis is expressed as the location or address of the search memory mat 102 in the present specification.
  • the control circuit 105 basically includes an input unit 1051, a dividing unit 1052, a writing unit 1053, a reading unit 1055, and an output unit 1057.
  • the control circuit 105 preferably further includes a collision information storage unit 1054 and a confirmation unit 1056.
  • These elements 1051 to 1056 conceptually classify the functions of the control circuit 105. That is, the control circuit 105 uses these elements 1051 to 1056 to perform a process of writing an entry address to the search memory mat 102 and reading an entry address registered in the search memory mat 102.
  • basic processing executed by the control circuit 105 will be described with reference to the flowcharts of FIGS.
  • FIG. 2 and FIG. 3 are flowcharts showing the writing process performed by the control circuit 105.
  • the writing process is a process of writing an entry address corresponding to the new key data in the search memory mat when storing the new key data (input data).
  • key data (input data) to be newly registered in the search memory mat is input to the semiconductor device (step S1).
  • the key data as input data may be directly input to the input unit 1051 of the control circuit 105, or may be input to the control circuit 105 via the encoding circuit 106. It may be input to the unit 1051.
  • the encoding circuit 106 performs an encoding process of the key data (step S2). Note that the encoding process performed here will be described in detail later in [Embodiment 4].
  • the input unit 1051 sends the key data to the dividing unit 1052. That is, the input unit 1051 is an input interface in the control circuit 105.
  • the dividing unit 1052 divides key data as input data into a plurality of pieces (step S3). That is, the dividing unit 1052 divides binary data of input key data (binary format data that can be handled by a computer) into a plurality of pieces. For example, the dividing unit 1052 preferably divides the key data into a number equal to the number of divided memories 102a, 102b, 102c. In short, it is preferable that the division number n by which the division unit 1052 divides the key data is the number N of divided memories that form the search memory mat 102. As a result, all of the key data divided by the dividing unit 1052 (also referred to as “divided key data”) can be registered in the divided memories in order.
  • the dividing unit 1052 when dividing the binary data of the key data, the dividing unit 1052 preferably divides the binary data into predetermined bits. For example, when “2699” is input as key data, the key data “2699” is expressed as “101010001011” in binary. For example, the dividing unit 1052 may divide this key data into two bits, such as “10” “10” “10” “00” “10” “11”. Further, the dividing unit 1052 may divide the key data into 3 bits or 4 bits. For example, the number of bits to be divided may be 2 to 10 bits each.
  • the dividing unit 1052 outputs the input key data by a plurality of 2 bits each. It is preferable to divide into two.
  • the dividing unit 1052 may divide the input key data into a plurality of 3 bits each. preferable. Thereby, in the subsequent processing, each of the key data divided by the dividing unit 1052 can be appropriately assigned to the divided memory that constructs the search memory mat 102 by using the divided key data as an address.
  • the dividing unit 1052 sends the key data divided as described above to the writing unit 1053.
  • the writing unit 1053 performs a process of assigning a unique entry address to the key data received from the dividing unit 1052 and writing it to the confirmation memory mat 104 (step S4). That is, in this step S4, when new key data is newly registered in the search memory mat 102, one entry address is assigned to the new key data, and the correspondence between the new key data and the entry address is determined as follows. It is stored in the confirmation memory mat 104. An example of the data structure of the confirmation memory mat 104 is shown in the lower right of FIG. Thus, the confirmation memory mat 104 can also function as a database for storing the correspondence between key data and entry addresses. Further, as will be described later, the confirmation memory mat 104 is also used for final confirmation as to whether or not the entry address read by the control circuit is correct when performing a read process.
  • the confirmation memory mat 104 may be configured by a storage device such as SRAM.
  • step S5 the writing unit 1053 performs a process of writing the plurality of divided key data divided by the dividing unit 1052 into the divided memories 102a, 102b, 102c,... Of the search memory mat 102.
  • the process performed in step S5 is described in more detail in FIG.
  • the flow diagram of FIG. 3 illustrates a case where binary data of key data (KD) is divided into n pieces of divided key data, and the order of the divided key data is defined as kth. That is, as shown in FIG. 3, first, “1” is substituted for “k”, and the processing of the first (first) divided key data among the n divided key data is started (step S5A). ).
  • the writing unit 1053 allocates the entry address of the first (kth) divided key data to the search memory mat 102 (step S5B). Specifically, the writing unit 1053 refers to the address data for specifying the “location where the entry address (EA) is registered” assigned to the y-axis of the search memory mat 102, while referring to the first (kth) address data.
  • the search memory mat 102 is accessed using binary data representing the divided key data as an address, and the entry address (EA) associated with the divided key data is assigned to the location (address) of the accessed search memory mat 102. Assign. This process will be described in detail later with reference to FIG.
  • the writing unit 1053 assigns an entry address (EA) associated with the first (kth) divided key data to an appropriate location (address) of the search memory mat 102.
  • the appropriate location (address) of the search memory mat 102 can be specified by the order of the currently processed split key data (kth) and the binary data of the split key data. That is, first, an area in the x-axis direction of the search memory mat 102 to which the entry address of the divided key data is written is specified with reference to the order of the divided key data (kth). For example, the entry address of the first divided key data is written in the first divided memory 102a among the plurality of divided memories 102a, 102b, 103c,.
  • the entry address of the split key data includes the binary data indicating the split key data and the address data for specifying the “location where the entry address (EA) is registered” assigned in the y-axis direction of the search memory mat 102.
  • EA entry address
  • the entry address “00” of the split key data is in the area in the y-axis direction (location where the entry address (EA) is registered) to which the address data “10” is assigned in the search memory mat 102.
  • EA entry address
  • the entry address “00” of the split key data is in the area in the y-axis direction (location where the entry address (EA) is registered) to which the address data “10” is assigned in the search memory mat 102.
  • EA entry address
  • the writing unit 1053 has already written another entry address at the location (address) to which the entry address (EA) of the first (k-th) divided key data is assigned, and there is a collision of entry addresses. It is confirmed whether or not it occurs (step S5C). For example, if another key data is already written in the search memory mat 102 before the key data currently being written, entry address collision may occur.
  • step S5C when the writing unit 1053 determines that no entry address conflict has occurred, the writing unit 1053 searches the entry address corresponding to the first (kth) divided key data as it is. Write to an appropriate location (address) in the memory mat 102 (step S5D).
  • the collision information storage unit 1054 sets the location (address) of the search memory mat 102 in which the collision has occurred.
  • the information indicating the collision is written (step S5E).
  • the collision information storage unit 1054 may add a flag bit or the like to the location (address) where the collision occurs to record that the collision has occurred.
  • the writing unit 1053 writes the corresponding entry addresses for all of the plurality of divided key data into appropriate locations (addresses) in the search memory mat 102.
  • the writing unit 1053 ends the writing process.
  • FIGS. 4 and 5 are flowcharts showing the reading process performed by the control circuit 105.
  • the reading process here is a process of reading the entry address corresponding to the key data when data matching the key data (search data) to be searched has already been written in the search memory mat 102. is there.
  • key data (search data) to be searched in the search memory mat 102 is input to the semiconductor device (step S6).
  • the key data as the search data may be directly input to the input unit 1051 of the control circuit 105 as shown in FIG. 1, or may be input to the control circuit 105 via the encoding circuit 106. It may be input to the unit 1051.
  • the encoding circuit 106 when key data as search data is input to the encoding circuit 106, the encoding circuit 106 performs an encoding process on the key data (step S7). Note that the encoding process performed here will be described in detail later in [Embodiment 4].
  • the input unit 1051 sends the key data to the dividing unit 1052.
  • the dividing unit 1052 divides key data as search data into a plurality of pieces (step S8).
  • the dividing process (step S8) performed by the dividing unit 1052 in the reading process is performed by the same algorithm as the dividing process (step S3) performed by the dividing unit 1052 in the above-described writing process.
  • step S8 since the process in step S8 is the same as the process in step S3, description thereof is omitted.
  • the dividing unit 1052 sends the divided key data to the reading unit 1055.
  • the reading unit 1055 accesses the divided memories 102a, 102b, 102c,... Of the search memory mat 102 based on the plurality of divided key data divided by the dividing unit 1052, and the entry corresponding to each of the plurality of divided key data. Processing for reading the address is performed (step S9). The process performed in step S9 is described in more detail in FIG.
  • the flow diagram of FIG. 5 shows a case where binary data of key data (KD) is divided into n pieces of divided key data, and the order of the divided key data is defined as kth. That is, as shown in FIG. 3, first, “1” is assigned to “k”, and the processing of the first (first) divided key data out of the n divided key data is started (step S9A). ).
  • the reading unit 1055 searches the search memory mat 102 based on the first (kth) divided key data (step S9B). Specifically, the reading unit 1055 refers to the address data for specifying the “location where the entry address (EA) is registered” assigned to the y-axis of the search memory mat 102, while referring to the address data.
  • the search memory mat 102 is accessed using binary data representing the split key data as an address, and information written in the address of the search memory mat 102 accessed here is extracted. This process will be described in detail later with reference to FIG.
  • step S9B the reading unit 1055 accesses the appropriate location (address) of the search memory mat 102 in the same manner as the method performed by the writing unit 1053 in step S5B. That is, the appropriate location (address) of the search memory mat 102 can be specified by the order of the currently processed split key data (kth) and the binary data of the split key data. Since the method for identifying an appropriate location in the search memory mat 102 has been described in step S5B, description thereof is omitted here.
  • the reading unit 1055 confirms whether or not information (collision flag) indicating a collision is written in the address accessed based on the first (kth) divided key data (step S9C).
  • the “information indicating collision” here is information written by the collision information storage unit 1054 in step S5F described above.
  • step S9C when it is determined in step S9C that entry address collision has occurred, the reading unit 1055 uses the first (k-th) divided key data as a search target and “don't care”. Treat as a thing (step S9D). That is, for the split key data treated as “don't care”, the process ends without reading the corresponding entry address (to step S9G). If there is a collision of entry addresses at the specified address, the concept of “don't care” for the entry address is introduced to efficiently retrieve data at high speed and with low power consumption. Can be performed.
  • the reading unit 1055 reads one entry address written in the location (address) of the accessed search memory mat 102 (step 9E). ). That is, the entry address read by the reading unit 1055 may be an entry address corresponding to key data (search data) input as a search target. However, even if the entry address corresponding to one divided key data can be read, it cannot be said that this entry address is the entry address corresponding to the key data (search data) as the search target. Then, an entry address corresponding to each divided data is read out.
  • step S9C the reading unit 1055 confirms whether or not the entry address read in step S9C does not match the previously read entry address based on other divided data. Note that the process for the first split key data is initially performed, and there is no entry address that has been read before, so the process proceeds to step S9G after step S9F.
  • reading processing based on the second (k + 1) th divided key data is performed following the first (kth) divided key data.
  • step 9F it is determined that the entry address read based on the second divided key data does not match the previously read entry address based on the first divided data (step 9F). ).
  • the entry address read based on the second divided key data may be “00”, whereas the entry address read previously based on the first divided data may be “01”.
  • the reading unit 1055 determines that the key data input as the search target is not registered in the search memory mat 102 and “no matching data” (step S9I). Then, the reading unit 1055 does not return to the main flow shown in FIG. 4 but ends the entire reading process here.
  • step S10 the confirmation unit 1056 of the control circuit 105 refers to the confirmation memory mat 104 based on the entry address read by the reading unit 1055.
  • the confirmation memory mat 104 as described in step S4, entry addresses and key data are stored in association with each other in the correct combination. That is, here, the confirmation unit 1056 reads the key data associated with this entry address from the confirmation memory mat 104 based on the entry address read by the reading unit 1055. Then, the confirmation unit 1056 confirms whether or not the key data read from the confirmation memory mat 104 matches the entry address of the key data input as a search target. In this way, by referring to the confirmation 104 based on the entry address read by the reading unit 1055, whether or not this entry address really matches the entry address of the key data input as the search target. Can be confirmed.
  • the present invention introduces the concept of “don't care” when a plurality of entry addresses are registered at the same location (address) and a “collision” occurs. . Then, when multiple entry addresses are read based on the divided key data, some of them show the same value, but others are “don't care”. Sometimes obtained. For this reason, in terms of probability, an error may occur in the read entry address. Therefore, in order to eliminate such uncertainty, in the present invention, the confirmation memory mat 104 is referred to.
  • step S10 when it is determined that there is no error in the entry address read by the reading unit 1055 as a result of referring to the confirmation memory mat 104, the confirmation unit 1056 sends this entry address to the output unit 1057. Then, the output unit 1057 outputs one entry address received from the confirmation unit 1056 to the outside of the control circuit 105 as a search result (step S10). That is, the output unit 1057 is an output interface in the control circuit 105.
  • control circuit 105 searches the data registered in the search memory mat 102 in response to a search request from the user, and corresponds to the key data input as the search data. Output one entry address.
  • the semiconductor device according to the present invention has the basic configuration shown in FIG.
  • This semiconductor device basically performs the writing process / reading process shown in FIGS. These processes show the basic concept of the present invention. More specific processing in the present invention will be described in more detail in the following [Example 1] to [Example 6].
  • the present invention provides a completely new logical methodology based on a conventional circuit configuration, particularly a memory circuit. That is, the present invention relates to a programless architecture that skillfully utilizes the configuration of key data and its entry address. In other words, the present invention relates to a brain-type architecture.
  • the memory space of the memory circuit is divided into a plurality of clusters, and data to be written into the clusters is also divided in the same manner.
  • the divided data itself is regarded as an address for accessing the cluster. Further, this address is assigned to the y-axis of the memory space, and data to be input to the cluster is assigned to the x-axis of the memory space.
  • the memory space in the x direction is divided into a plurality of memories that can be written / read independently, and the divided cluster inputs are assigned to the divided memories.
  • the present invention can realize a switch and a search with high speed and low power consumption by introducing the concept of “don't care” when addresses collide by the above configuration. Based on the idea of becoming
  • the inventor of the present invention has come up with the idea that a switch capable of selectively distributing the order of input / output data and a control circuit for controlling these switches are provided at the input and output sections of the divided memory.
  • the divided memory can be handled as a LUT (Look Up Table), and the cluster in the memory can be handled as a logic circuit.
  • the semiconductor device of the present invention is a so-called homogeneous circuit. Accordingly, the semiconductor device of the present invention can be used by switching functions as a logic circuit and a memory as necessary.
  • the semiconductor device of the present invention can dynamically move a necessary cluster to be set to an adjacent position, thereby enabling high-speed search processing with low power consumption.
  • the semiconductor device of the present invention can be provided with a switch circuit in the input part and the output part of the divided memory.
  • the control circuit of the semiconductor device is further configured to logically select the divided memory.
  • the divided memory further has a configuration capable of performing a logical operation by inputting data as an LUT (Look Up Table), and if necessary, a plurality of blocks can be arranged.
  • the entry address writing / reading method for the semiconductor device of the present invention when a plurality of entry addresses are written at the same address of the divided memory specified by the divided key data, information indicating a collision with the address of the divided memory. Is going to be remembered. Further, according to the method of the present invention, when all of the information read based on the divided key data is information indicating a collision, the matching memory mat is sequentially referred to by the read collision information, and the matching key is detected. It is configured to extract addresses.
  • the search memory mat 102 includes a plurality of divided memories. For example, when the total number of entries in the search memory mat 102 is set to 4096 entries, the size of the address that can identify 4096 entries is 12 bits. Also, if the size of the key data for retrieving the entry address from the retrieval memory mat 102 is 144 bits, it is 12 when this is divided by the 12 bits. That is, the number of divided memories is 12.
  • the control circuit 105 attached to the search memory mat 102 divides the key data into 12 parts and assigns them to the respective divided memories that correspond beforehand.
  • the binary data of the divided key data is used as an address for accessing the corresponding divided memory.
  • the entry address corresponding to the key data is written in the location of the search memory mat designated by the divided key data. This entry address is written in all the divided memories divided into twelve.
  • the control circuit 105 divides the input 144-bit key data into 12 by the same procedure as the writing.
  • the control circuit 105 accesses a predetermined divided memory using the divided key data as an address.
  • the control circuit 105 reads the data written in the designated divided memory. This read data is an entry address corresponding to the key data.
  • the size of the input key data can be further increased.
  • the size of the key data can be expanded from 144 bits to 288 bits.
  • two search memory mats 102 may be arranged in parallel.
  • the total number of entries in the search memory mat 102 can be increased.
  • the basic unit of the total number of search memory mat entries and the number of search memory mats arranged in parallel or in series are not limited to the above, and can be freely expanded or reduced according to demand. it can.
  • the search memory mat may be configured as a look-up table LUT (Look Up Table) type logic circuit. Further, the configuration of the search memory mat can be set as a part of the expanded memory space.
  • LUT Look Up Table
  • FIG. 1 shows an example of a semiconductor device that realizes the present invention.
  • FIG. 6 shows an example of a memory circuit configuration using SRAM-CAM.
  • a memory configuration and a basic principle of a semiconductor device configured by SRAM-CAM will be described.
  • the principle of the present invention can be realized as long as the semiconductor device includes a memory space (memory mat) for accessing a memory array including a row address (row address) and a column address (column address).
  • the semiconductor device includes a proximity cache memory mat 101, a control circuit 105, a search memory mat 102, a comparison and latch circuit 103, and a confirmation memory mat 104.
  • the search memory mat 102 is constructed by a plurality of divided memories 102a, 102b, 102c,. Note that the proximity cache memory mat 101 need not be provided if it is not necessary.
  • an object of the present invention is to overcome the shortcomings of CAM often used in Internet switches and routers.
  • the conventional CAM has a drawback of consuming a large amount of power because all bits are activated when searching for data. Therefore, according to the present invention, at the time of retrieval, not all bits are activated as in the conventional CAM, but only the designated entry on the y axis is activated.
  • the present invention it is possible to perform a search with 1 / (number of entries) active bits as compared with the conventional CAM. That is, the present invention can output a search result by operating only one address (1 / entry number) as many as the number of entries on the y-axis as compared with the conventional CAM. For this reason, in the present invention, the output encoder used by the conventional CAM is not required, and a NAND circuit tree structure that consumes a large amount of power is not required. Therefore, according to the present invention, search processing can be executed with low power consumption.
  • KD key data
  • EA entry address
  • a search memory mat is obtained by a predetermined algorithm.
  • 102 is written. That is, the control circuit 105 divides the input key data into a predetermined number, and accesses the corresponding divided memories 102a, 102b, 102c,..., 102h using the divided key data as addresses. Then, the control circuit 105 writes the key data and the entry address in the accessed divided memories 102a, 102b, 102c,. The write operation of the control circuit 105 is performed on all of the divided memories 102a, 102b, 102c,.
  • the key data input for newly registering in the search memory mat 102 is referred to as “input data”
  • search key data input for searching the search memory mat 102
  • the control circuit 105 assigns a location (address) for registering an entry address (EA) to the y axis of the search memory mat 102 and assigns a key address (KD) to the x axis.
  • the operation of the control circuit 105 will be described in association with the basic operation of the CAM.
  • the key data input at the time of data search is assigned to the x axis, and the location (address) for registering the entry address is on the y axis. It is what you assign.
  • the search memory mat 102 the area in the x-axis direction is divided into a plurality of basic cells.
  • the number for dividing the search memory mat 102 is n (n is a natural number of 2 or more).
  • Each basic cell stores an entry address (EA) at a location specified by key data divided into an appropriate number of bits. In the example of FIG. 6, the case where n is 8 is shown.
  • the number of bits of the entry address stored in each basic cell is determined by the number of bits of the divided key data, but the number of bits of the key data is arbitrary.
  • an entry address (EA) is assigned to the y axis
  • key data (KD) corresponding to the entry address is assigned to the x axis. That is, key data corresponding to the entry address is written on the x axis of the confirmation memory mat 104.
  • FIG. 7 shows the timing of the search operation of the memory circuit shown in FIG. 6 by the connection of the first clock and the second clock.
  • the key data (KD) is input to the control circuit 105
  • the entry address (EA) stored in each divided mat is read, and the operation until the read entry address is latched in the latch circuit 103a. Executed.
  • the second clock the data of the latch circuit 103a is compared by the comparator 103b, the entry address where the match is confirmed is input to the confirmation memory mat 104, and the match is confirmed with reference to the confirmation memory mat 104.
  • An operation is performed in which the entry address is output from the CAM.
  • FIG. 7 shows the switch or search operation by the SRAM-CAM according to the embodiment of the present invention.
  • one search operation is completed in a machine cycle of 2 clocks.
  • the conventional CAM requires at least 3 clocks and generally requires 5 to 10 clocks for performing one search operation. That is, in the conventional CAM, since power supply for operating all the bits is indispensable, a pipeline operation is required. Furthermore, since the conventional CAM consumes one clock in the encoder, at least three clocks are required.
  • the SRAM-CAM of the present invention can complete the search operation in two clocks as shown in FIG. 7 by devising a key data input method. That is, in the SRAM-CAM of the present invention, the search operation can be executed with the power of 1 / number of entries (1 / number of entries) as compared with the conventional CAM.
  • FIG. 8 shows a write operation of the SRAM-CAM according to the embodiment of the present invention.
  • KD “2699”, “3779”, “1859”, “1440”
  • more key data than the number of entries can be registered. This is because the key data length is sufficiently larger than the number of entries.
  • the key data length is more than twice the number of entries.
  • the search memory mat 102 is divided into six (number of search memory mat divisions: N).
  • the search memory mat 102b is constructed by the six divided memories 102a, 102b, 102c, 102d, 102e, and 102f.
  • the key data written to the search memory mat is represented by 12 bits.
  • Such 12-bit key data is written into six divided memories.
  • the control circuit 105 divides the input key data into six (number of divisions of key data: n). Therefore, the number of bits of the divided key data is 2 bits each.
  • each of the plurality of divided memories 102a to 102f constituting the search memory mat 102 is assigned a place for registering a plurality of entry addresses in the y-axis direction.
  • the storage areas of the divided memories 102a to 102f are each divided into a plurality of pieces in the y-axis direction.
  • each of the divided memories 102a to 102f has four locations for registering entry addresses.
  • address data for specifying an address in the memory space in the search memory mat 102 is given to each location where the entry address is registered.
  • the address data is 2-bit information.
  • the address data is represented by binary data “00” “01” “10” “11”.
  • address data “00”, “01”, “10”, and “11” may be given in order from the top to the location where the entry address is registered.
  • an entry address (EA) is assigned to each of “2699”, “3779”, “1859”, and “1440”, which is key data (KD) that has been input.
  • each entry address is 2-bit data. That is, the entry addresses are “00” “01” “10” “11”. Thus, one entry address is associated with one key data.
  • the correspondence between the key data and the entry address may be stored in the confirmation memory mat 104 or may be stored in another memory.
  • the upper left of FIG. 8 shows the correspondence between the entry address (EA) and the key data (KD).
  • key data input as data to be written to the entry address “00” is “2699”.
  • This key data “2699” is represented as “10 10 10:00 10 11” in binary.
  • the binary value of the divided key data is used as an address for accessing the divided search memory mat 102. That is, the control circuit 105 writes “00”, which is the entry address of the key data “2699”, in each of the plurality of divided memories 102 a to 102 f constituting the search memory mat 102.
  • the data written in the memory mat is in a reverse form to the normal CAM.
  • the key data “2699” is divided into six parts and represented as “10” “10” “10” “00” “10” “11”.
  • the control circuit 105 writes the entry address “00” in the search memory mat 102 including the divided memories 102a to 102f divided using these divided key data as addresses. More specifically, the control circuit 105 uses the first divided key data “10” as the address among the six divided input data “2699” as the address data “10” in the first divided memory 102a. The specified location is accessed, and the entry address “00” corresponding to the input data “2699” is written in this location.
  • the control circuit 105 specifies the second divided key data “10” of the input data “2699” with the address data “10” in the second divided memory 102b, using this “10” as an address. And the entry address “00” is written in this location. Further, the control circuit 105 accesses the place specified by the address data “10” in the third divided memory 102c using the third divided key data “10” as an address, and enters the entry address “00” in this place. Write. Also, the control circuit 105 accesses the location specified by the address data “00” in the fourth divided memory 102d using the fourth divided key data “00” as an address, and enters the entry address “00” in this location. Write.
  • control circuit 105 accesses the place specified by the address data “10” in the fifth divided memory 102e using the fifth divided key data “10” as an address, and enters the entry address “00” in this place. Write. Similarly, the control circuit 105 accesses the place specified by the address data “11” in the sixth divided memory 102f using the sixth divided key data “11” as an address, and enters the entry address “00” in this place. "Is written.
  • the entry address “00” corresponding to the input key data “2699” is written in the divided memory of the search memory mat 102 designated by the key data “2699”.
  • the key data “2699” is represented by “10, 10, 10:00, 10 and 11”, it is divided into 6 bits by 2 bits.
  • Each of the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat divided into six.
  • the entry address corresponding to the input key data is written in the search memory mat.
  • the key data as the search target is divided into a plurality of steps in the same procedure as when the key data is written. For example, when the key data to be searched is “2699”, this binary data is divided into six “10, 10, 00, 10 and 11”.
  • the entry address “00” is read.
  • the entry address “00” is read.
  • FIG. 8 shows a state in which the entry address is read from each of the divided memories 102a to 102h.
  • the entry address “00” can be searched with any one of the divided key data.
  • the confirmation memory mat 104 provided in the present embodiment is only for confirmation, and is not an essential component in principle.
  • the search memory mat 102 is composed of a plurality of divided memories, and the processing for dividing the key data for input and search is performed, so that the problems of the conventional CAM can be solved. That is, according to the present invention, it is not necessary to activate all the bits as in the conventional CAM, so that the disadvantage of consuming large power can be solved.
  • the search in order to output the search result, the search can be performed with an active bit that is 1 / number of entries on the y-axis (1 / number of entries). As described above, according to the present invention, it is possible to operate only one entry address corresponding to the number of entries on the y-axis (1 / number of entries). Therefore, the present invention eliminates the need for an output encoder composed of a NAND circuit tree that consumes a large area used in the output section of the conventional CAM.
  • the key data “3779” is key data input as data to be written to the entry address “01”.
  • the key data “3779” is expressed in binary, it becomes “11 10 11 00 00 11”.
  • the storage area of the y-axis of the search memory mat 102 divided into six is accessed, and the entry address “01” corresponding to the key data “3779” is written into the search memory mat 102.
  • the key data “3779” is divided into six parts and is represented as “11” “10” “11” “00” “00” “11”.
  • the control circuit 105 writes the entry address “01” in the search memory mat 102 including the plurality of divided memories 102a to 102f using these divided key data as addresses. That is, the control circuit 105 uses the first divided key data “11” among the divided key data of the input key data “3779” as an address, and is located at the location specified by the address data “11” in the first divided memory 102a. Access is made, and the entry address “01” corresponding to the key data “3779” is written in this place.
  • the control circuit 105 accesses the place specified by the address data “10” in the second divided memory 102b using the second divided key data “10” as an address, and enters the entry address “01” in this place. "Is written. However, when the entry address is written in the second divided memory 102b, the entry address “00” of the key data “2699” is already written in the location of the second divided memory 102b. As described above, when an entry address is written in the search memory mat 102, a phenomenon called collision may occur. The address where this collision phenomenon has occurred is displayed as a filled portion in FIG. 8B. The key data of the filled portion is processed as “don't care” in the search process performed later.
  • the collision flag can be, for example, 2-bit data. For example, when the collision flag is 2 bits, “00” indicates an unwritten initial state, “01” indicates a written state, “10” indicates a collision state, and “11” indicates other states. The state can be indicated.
  • the location specified by the address data “10” in the third divided memory 102c is accessed using the third divided key data “11” as an address, and the entry address is stored in this location.
  • the entry address “01” is written in the third to sixth divided memories 102d to 102f, respectively.
  • the fourth and sixth addresses are already used by writing other key data “2699”, a collision flag is written. As a result, the fourth and sixth addresses are processed as “don't care” in the search processing performed later.
  • the entry address “01” is written in the search memory mat 102 designated by the key data “3799”.
  • the process of writing the two key data “2699” and “3799” into the search memory mat 102 is completed.
  • a collision occurs in the writing operation of the second, fourth, and sixth divided key data, and a “don't care” process is performed in a later search process. .
  • three of the six divided key data are not handled as search targets, and thus the search target is reduced from six to three.
  • control circuit 105 searches the corresponding entry addresses “10” and “11” for the third and fourth key data “1859” and “1440” in the same procedure as the key data described above.
  • Write to the mat 102 As shown in FIG. 8C, in the writing process of the key data “1859”, an address collision has newly occurred in the fifth divided memory 102e. Also, as shown in FIG. 8D, an address collision has occurred in the writing process of the key data “1440” and the first and third divided memories 102a and 102c.
  • FIG. 8E shows a write state of the confirmation memory mat (SRAM) 104.
  • the binary data “10 10 10 00 10 11” of the key data “2699” as the first input data is divided and sequentially written in the memory address “00” of the confirmation memory mat 104.
  • binary data “11 10 11 00 00 11” of the key data “3779” as the second input data is sequentially written in the memory address “01” of the confirmation memory mat 104.
  • the binary data of the key data “1859” as the third input data is sequentially written in the memory address “10” of the confirmation memory mat 104
  • the fourth input data is written in the memory address “11”.
  • the binary data of the key data “1440” is sequentially written.
  • the above process is a basic process for writing the entry address corresponding to the key data input to the search memory mat 102. Subsequently, a process for searching the search memory mat 102 based on the input key data and reading an entry address corresponding to the key data will be described.
  • FIG. 9 is a diagram showing an example of the search / read operation of the SRAM-CAM according to the embodiment of the present invention.
  • FIG. 9 shows the case where entry address collision occurs during the writing process, that is, the case where the darkly shaded entry address shown in FIG. 8 is “don't care”. It shows that the search can be correctly performed based on the search input data.
  • FIG. 9A shows a case where key data “2699” is input as search data.
  • the input key data “2699” is represented by binary data “10 10 10:00 10 11”. Further, the binary data of the key data “2699” is divided into six as “10” “10” “10” “00” “10” “11”.
  • the plurality of divided key data are used as addresses for accessing “locations where entry addresses are registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the read data from the second divided memory 102b of the search memory mat 102 is excluded from the search target. Whether or not to perform the “don't care” process may be determined by temporarily reading data from the memory and using the flag portion attached to the read data. Strictly speaking, the control circuit 105 does not output the entry address for data that is not subject to search, but performs the read operation from the memory circuit.
  • the entry address actually used for the search is the first division. This is the entry address “00” written in the memory 105a and the fifth divided memory 105e.
  • the key data corresponding to the entry address “00” is “10 10 10 00”. It turns out that it is 10 11 ”. This “10 10 10:00 10 11” is “2699” in decimal notation.
  • the entry address “00” read in the reading process is the key data “2699” input as the search data. That is, in the present invention, the entry address is read from the search memory mat 102 and the confirmation memory mat 104 is accessed using the entry address while applying the “don't care” process. Therefore, the present invention compares the key data, which is output data from the confirmation memory mat 104, with the key data input as the search target, confirms that they match, and outputs this entry address.
  • FIG. 9B shows a case where “3779” is input as the key data of the search input data.
  • the input key data “3779” is binary data and is represented by “11 10 11 00 00 11”. This binary data is divided into six parts such as “11”, “10”, “11”, “00”, “00”, and “11”, and assigned to the “location where entry address is registered” assigned to the y axis of the search memory mat 102. Each is used as an address for access.
  • the entry address “01” is read.
  • Data is read from the second divided memory 102b using the second divided key data “10” as an address. This data has an address collision when the input data “3779” is input, and therefore “don't consider (don 't care)' is excluded from the search.
  • the value read from the search memory mat 102 based on the key data “3779” as the search data is the entry address written in the first divided memory 102a and the third divided memory 102c. It means “01”.
  • the control circuit 105 compares the key data as the output data from the confirmation memory mat 104 with the key data input as the search target, and outputs the data after confirming that they match.
  • FIG. 9C shows processing when key data “1504” that has not been written in the search memory mat 102 is input as key data to be searched.
  • binary data of “1504” is divided into six such as “01” “01” “11” “10” “00” “00”. Each of the six divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y axis of the search memory mat 102.
  • an address collision occurs during the writing process, and therefore “don't care” processing is performed.
  • the entry address “11” is read.
  • the entry address “01” is read.
  • the entry address “01” read here is different from the entry address “11” read out earlier. That is, the entry address read based on the key data “1504” has a mismatch between “11” and “01”. Then, it can be seen that the key data “1504” is not yet recorded in the search memory mat 102. Therefore, the control circuit 10 can determine “no matching data” at the stage of processing the third divided key data.
  • the confirmation process using the confirmation memory mat 104 described above becomes unnecessary.
  • all the entry addresses read from the memory are one. Even if it does, the problem that the key data input as the search data and the key data corresponding to the entry address output in the reading process may not coincide may occur.
  • such a problem can be solved by referring to the confirmation memory mat 104. That is, when the confirmation memory mat 104 is accessed based on the entry address read from the search memory mat 102, and the key data to be searched does not match the key data output from the confirmation memory mat 104 , “No matching data” can be determined.
  • FIG. 10 is a graph showing the number of search mismatch (NG) occurrences when key data is written by the number of entries. That is, the graph of FIG. 10 shows an example in which a plurality of processes “don't care” occur in the search memory mat 102 and the probability of malfunctioning is simulated from the random number table.
  • FIG. 10A shows a case where the key data is 4 bits or more and the number of entries in the search memory mat is 4.
  • FIG. 10B shows a case where the key data is 8 bits or more and the number of entries in the search memory mat is 8. From the simulation result shown in FIG. 10A, it can be seen that by setting the key data length to 8 bits or more, the number of occurrences of search mismatch (NG) approaches zero as much as possible.
  • the number of bits of key data is preferably at least twice the number of entries in the search memory mat.
  • the semiconductor device of the present invention writes the entry address of the input data to the plurality of divided memories constituting the search memory mat 102 using the divided key data obtained by dividing the input data as an address. Since the divided key data is obtained by dividing the input data into a plurality of pieces, a collision state may occur when writing these divided key data to the search memory mat 102.
  • Such an entry address write operation to a plurality of divided memories is referred to as a “first operation”.
  • An example of the processing steps of the first operation is also shown in FIG.
  • the first operation described above is an operation for creating basic information data for performing a switching operation or search processing in the search memory mat.
  • this first operation even when a plurality of entry addresses are written at the same address, the collision flag is set and the input proceeds as it is. Then, when searching in the search memory mat, an address for which a collision flag is set is processed as “don't care”.
  • the problem of address collision that occurs when an entry address is written to a divided memory is solved when a search operation is performed.
  • bit length of the input key data KD
  • EA number of entry addresses
  • the confirmation memory mat 104 has an area for storing an entry address (EA) in the y-axis direction, and an area for storing key data (KD) in association with the entry address in the x-axis direction.
  • EA entry address
  • KD key data
  • the input key data and the entry address are written to the confirmation memory mat 104 at the same time as the input key data is written to the search memory mat 102.
  • basic information data for confirmation is prepared in the confirmation memory mat 104.
  • Such a key data writing operation on the confirmation memory mat 104 is referred to as a “second operation”. An example of the processing steps of the first operation is also shown in FIG.
  • the control circuit 105 searches the search memory mat 102 based on the input key data and performs a process of reading an entry address corresponding to the key data.
  • the control circuit 105 divides the key data input as the search data according to the above-described key data (KD) dividing method, activates the search memory mat with the divided key data, and The entry address (EA) read based on the division key data is output.
  • KD key data
  • EA entry address
  • This search process is referred to as “third operation”.
  • the entry address in which the address collision is recorded in the above-described writing process (first operation) is handled as “don't care” in the reading process, and the entry address is not output.
  • the control circuit 105 reads one or more entry addresses based on a plurality of division key data, and when all of the read entry addresses match, the confirmation basic information data is obtained using the entry addresses.
  • the stored confirmation memory mat 104 is referred to. That is, the control circuit 105 uses the entry address read in the search process and the key data input as the search target to store the entry address stored in the y-axis of the confirmation memory mat 104 and the key stored in the x-axis. Compare with the data. Then, the control circuit 105 confirms that the entry address matches the key data, and outputs one entry address.
  • Such an operation referring to the confirmation memory mat 104 is referred to as a “fourth operation”. An example of the processing steps of the fourth operation is also shown in FIG.
  • the entry address output in the third operation and the third operation is a switch connection or search address.
  • the present invention realizes the memory circuit configuration that enables four operations from the first operation to the fourth operation, that is, the logical system configuration thereof, with the SRAM-CAM memory circuit shown in FIG.
  • m is a natural number of 2 or more definition blocks are prepared as search memory mats 102. Further, when the number of entries in the search memory mat 102 is set to an arbitrary size, it is determined that the entry address is divided for one block and input from the lower order up to 1 / m of the number of entries is determined. Then, input of a predetermined number or more of entry addresses is terminated for one block, the operation is continued by moving to another memory block, and large basic information data is stored in a plurality of memory blocks.
  • the key data length is required to be 1/8 bit or more of the number of entries.
  • the remaining entry addresses higher than 1 / m are input in the same manner as the first memory block in order from the lower address.
  • switching of operations between the memory blocks can be controlled by the selector.
  • the upper and lower search addresses are synthesized and input to the y-axis as the address axis of the confirmation search mat, and the first to fourth operations described in the first embodiment can be performed.
  • FIG. 11 shows an embodiment in which the number of entries in the search memory mat 102 is 256.
  • the search memory mat 102 includes two memory mats.
  • 0 to 127 entries are input to the first search memory mat 102
  • 128 to 255 entries are input to the second search memory mat 102. input. This makes it possible to maintain the probability of occurrence of malfunction almost completely below the practical level. Switching between the two memory mats constituting the search memory mat 102 may be performed using the first flag F1 added to the header.
  • search memory mat 102 Since the actual search memory mat 102 requires 2 bits as a flag, in the case of 256 entry ⁇ 32-bit key data, eight 256 word ⁇ 10 bit SRAMs are used as the search memory mat, and 256 words are used as the confirmation memory mat 104. A single x32-bit SRAM is configured.
  • FIG. 12 shows a simulation result of the probability of malfunction when m is 2, that is, when the number of entries written in the memory is limited to 1 ⁇ 2.
  • the entry width number of entries
  • the key data length is 32 bits in terms of probability and no malfunction occurs.
  • an EXCEL random number function is applied as CAM write data.
  • the unwritten area increases accordingly. That is, when the contents of the SRAM are the same, for example, when the data at the address “00... 00” is the same as the data at the address “00... 01”, the contents at the address “00. .
  • the unwritten area increases (it becomes easier to register). This can be used to increase the number of writes.
  • the reason for explaining this is that, for example, in the case of CAM search, the same data such as a header tends to be used many times. As a result, the unwritten area tends to increase when viewed in each SRAM.
  • this embodiment is summarized from the aspect of its effect.
  • the scale can be easily increased, and the power consumption can be significantly reduced by 1 / number of entries (1 / entry number) compared to a general CAM.
  • the registered entry address can be normally searched if at least one divided memory (SRAM) in which the entry address is written remains. Even if there are a plurality of addresses not to be searched in the divided memory (SRAM), a correct search can be performed by using the confirmation memory mat (SRAM).
  • SRAM confirmation memory mat
  • the contents of the confirmation memory mat may be any device that can write the input data in accordance with the address, and can also be realized by a register or the like.
  • the entry address writing process is limited to an area where no malfunction occurs due to the collision of addresses in the divided memory. In addition to this, it is possible to further prevent malfunctions by increasing the number of entry addresses that can be input.
  • the entry address (EA) can be increased from 2 bits (FIG. 14 (a)) to 3 bits (FIG. 14 (b)).
  • the number of entry addresses in the confirmation memory mat 104 can be increased.
  • an extension flag (FRG) is set to identify a normal entry address (normal address) and an extended entry address (extended address). You can do it.
  • FSG extension flag
  • the third bit of the entry address is “0”, it indicates a normal address, and when the third bit of the entry address is “1”, the extension address It is shown that.
  • FIGS. 15 and 16 show an example of data writing processing and an example of data searching processing when the entry address (EA) is 3 bits.
  • FIG. 15 shows an example of the write operation. As shown in FIG. 15, when the entry address (EA) is represented by 3 bits, the number of entry addresses (EA) becomes eight. For example, in the example of FIG. 15, in addition to the four key data “2699” “3779” “1859” “1440” shown in FIG. According to the procedure of one operation, data is written in each of the search memory mat 1002 and the confirmation memory mat 1004.
  • the search memory mat 1002 is written using these as addresses. Then, for the first divided key data “00”, the 3-bit entry address “001” is written to the memory address “00”. Although “00” is described in FIG. 15, “001” is actually written.
  • the entry address (EA) When the entry address (EA) is changed from 2 bits to 3 bits, for example, when the increased 1 bit is “0”, the same processing as when the entry address is 2 bits is performed, and the increased 1 bit is “1”. In this case, it is used for identification of an extended address. Specifically, if the second divided key data “01” of the key data “408” is an address, an address collision occurs with “1440” already written (see FIG. 8D). Perform “don't care” processing. Assuming that the third divided key data “10” of the key data “408” is an address, this address has already been “don't care” processed during the writing process of “1440”. The processing is terminated without writing.
  • the write operation can be performed in the same manner as in the first embodiment by performing the write operation using the upper 2 bits of the 3 bits of the entry address.
  • FIG. 16 shows a search example using the extended entry address written in FIG.
  • key data “2699” is input as search data
  • “000” is read from the first divided memory (SRAM) of the divided search memory mat 1004. Since the “don't care” process is performed on the memory addresses corresponding to the second to sixth divided key data, the read data is not searched.
  • the confirmation memory mat 1004 is accessed using “000” as an address, “10 10 10 00 10 11” is read out.
  • the confirmation result of the search memory mat 102 matches the input data “2699”.
  • the key data “408” is input as the search data
  • the first and fourth to “001” entry addresses of the divided search memory mat 1002 are read. From the remaining search memory mats 1002, since all the accessed data has been “don't care”, the read data is excluded from the search target.
  • the confirmation memory mat 1004 is accessed with the read entry address “001”, it can be seen that “00 01 10 01 1 00” matches the input data “408”.
  • FIG. 17A shows a state in which key data “1440” is searched by masking the fourth to sixth search memory mats 1002 divided.
  • “11” is output from the search memory mat 1002
  • the confirmation memory mat 1004 is accessed with the memory address “11”
  • the output from the search memory mat 1002 and the input data are It can be seen that the key data matches.
  • FIG. 17B shows an example in which the input data “1440” is searched by masking the second, fourth, and sixth memory mats.
  • the first, third, and fifth entries are “don't care”, and the second, fourth, and sixth entries are masked. Will be lost. That is, in this case, it is determined that there is no search data.
  • the bit representing the tree of the first flag F1 as the first control bit and the related address RF as the second, third, fourth,... Flag bits in the header.
  • the bit of the first flag F1 When the bit of the first flag F1 is not active, the single hit mode in which the operation is performed in the same manner as in the first and second embodiments is set.
  • the first flag F1 when the first flag F1 is active, it corresponds to the multi-hit, and as shown in FIG. 18, the requested key data is processed by the third operation, and after the entry address is output, this is buffered. Temporarily store in memory BSRAM.
  • the fourth operation is stopped, and at the second clock, the upper address of the related address tree of the entry address output by the third operation is hit in the cache memory mat, the data is extracted, and temporarily stored together with the address do.
  • the address corresponding to the second address in the related address tree is hit with the second corresponding data in the cache memory mat, and the corresponding address and data are extracted. This is continued to the lower priority order in the related flag tree.
  • an operation to make the flag inactive is performed. Since this is a feedback loop, the new search is canceled during this iteration (while the flag is active). Temporarily store in a new fourth operation and output a plurality of associated addresses. Add data as needed.
  • the flag is set to “11”.
  • the flag is “11”, without confirming the memory mat 104, if it is confirmed that all of the read entry addresses match except for the search ignored portion, the data is determined as the entry address. This means that the search operation can be controlled by a part of the data in the cache memory accessed by the entry address.
  • FIG. 19 is a diagram explaining this.
  • FIG. 19 shows the difference from general CAM multi-hit.
  • general CAM multi-hit as shown in FIG. 19A, a plurality of entry addresses are output for one key data.
  • SRAM-CAM multi-hit of this embodiment as shown in FIG. 19B, one entry address is output in response to the input of a plurality of key data.
  • FIG. 20 describes a method for enabling multi-hit similar to a general CAM in the SRAM-CAM of the present invention.
  • a general CAM as shown in FIG. 20A, a plurality of entry addresses “m”, “n”, and “p” are hit for one key data “A”.
  • the entry addresses “m”, “n”, and “p” correspond to one key data “A”.
  • the data 0 part uses 0 or 1 data as a flag when the multi-hit is on, and uses 0 or 1 data when the multi-hit is off. The flag is switched until the data 1 portion becomes 0. When the data 1 portion becomes 0, the key data input stop is canceled.
  • a plurality of SRAMs accessed by entry addresses can be provided, and a plurality of SRAMs can be controlled by data 0. Also, the output of multi-hit data can be accelerated by using a multi-port SRAM.
  • the multi-hit clock timing is shown in FIG.
  • the speed of the SRAM can be increased and a multiport operation can be performed.
  • FIG. 21 shows an example of 4-port operation.
  • the system clock, the RAM0 clock, the RAM1 clock, the RAM2 clock, and the RAM3 clock can be easily generated with a counter and a simple logic circuit by a quadruple speed clock. Note that when the system output is latched by the invert signal of the RAM 3 clock, the timing is the same as the system output.
  • the normal operation is performed with the system clock and the RAM0 clock.
  • CAM-like operation and search engine that can be used for the switch router have been described, but this configuration can be extended to a function based on LUT (Look Up Table).
  • LUT Look Up Table
  • a control circuit such as a small-scale switch may be provided above and below the search memory mat.
  • the limit of the method described in the first and second embodiments in which the overlap is “don't care” by inputting the entry address into the memory is before all the memory columns overlap. This problem is more likely to occur when there is a data gap than random data.
  • the countermeasure at that time is to replace the flag attached to the entry address.
  • the flag When an address that has been written is selected when writing data, the flag is set to “10” and writing is not performed, and the input data information of the flag of “10” is ignored when searching. However, due to data gaps, the flags of all memory mats may become “10” at the time of retrieval, and retrieval may not be possible. In order to avoid this, even if the flags of all input data are “10” at the time of retrieval, the data is handled as key data as retrieval data only when all read information of the SRAM matches.
  • FIG. 22 shows a state in which the LUT control circuit (LUTC) is added to the search memory mat. That is, FIG. 22 shows a configuration in which a switch circuit network is added to the input unit and the logical output unit of the search memory mat 102 of FIG.
  • LUT control circuit LUT control circuit
  • FIG. 22 shows an example of an adder that is a source of four arithmetic operations and shifts. An operation step necessary for the four arithmetic operations is configured by a switch circuit. That is, FIG. 23 shows a case where a plurality of LTUs are provided, and shows an example when a 16-bit adder is selected.
  • SW is a switch circuit that switches between two inputs
  • b_DV is a bit distribution circuit
  • C is a connector, and is a circuit that can be set to ON / OFF and forcibly set to 0 when OFF.
  • the function can be dynamically changed by making the peripheral circuit of the LUT compatible with a plurality of LUTs. Further, by cooperating with a plurality of circuit blocks, the processing efficiency can be increased and the area of the system can be reduced.
  • an 8-bit adder ⁇ 2 is obtained.
  • FIG. 24 shows an example of the entire configuration showing the number of bits.
  • the search memory mat becomes a block that can perform a logical operation by the additional switch circuit (LUT control circuit).
  • the configuration of the unit part of the 256 entry ⁇ 32 key CAM array is as follows. That is, (1) The CAM main body realizes the CAM function up to the multi-hit function. (2) The LUT is composed of (a) eight 256-word ⁇ 10-bit SRAMs, (b) one 256-word ⁇ 32-bit SRAM, and (c) one 256-word ⁇ 48-bit SRAM. Become. Among these, (b) and (c) may be nine 256 word ⁇ 10 bit SRAMs. This increases the utilization efficiency as the LUT.
  • a homogeneous circuit group unit that can be used as an area-efficient logic circuit or memory can be realized.
  • the blocks shown in FIG. 24 are arranged in an array, they can be used as programmable logic blocks or memory blocks.
  • MB indicates a multibus.
  • Such a homogeneous block array that can be configured with the same memory and logic mat can dispose the necessary processing blocks adjacent to each other, thereby eliminating the bus neck and ensuring high speed operation with low power consumption. Moreover, any processing is possible by such a homogeneous block arrangement.
  • FIG. 25 (a) illustrates the switch or search operation
  • FIG. 25 (b) illustrates the logical operation procedure (FIG. 25 (b)).
  • FIG. 25 shows a configuration in which all processes can be performed by switching according to an instruction from a circuit that controls the entire system.
  • CB indicates a proximity connection bus
  • LI indicates a logic input
  • LO indicates a logic output.
  • a portion surrounded by an alternate long and short dash line indicates a subroutine and is one loop / clock.
  • FIG. 25 shows the case of a switch or search
  • FIG. 25B shows the case of a logical operation. That is, when this is expanded, it is possible also in block units, and a dynamic reconfiguration concept is born as a system (FIG. 26).
  • FIG. 26 shows an example of a 4 ⁇ 4 block arrangement. It turns out that this is the beginning of a brain computer.
  • FIG. 26 is a diagram showing a configuration of an SRAM_CAM array with a logical operation function added.
  • the example shown in FIG. 26 is a configuration example in the case where 16 4 ⁇ 4 16 dynamic reconfiguration memory blocks are arranged.
  • all of the blocks are configured by SRAM, and by incorporating a function switching register, it is possible to instantaneously switch to any form.
  • the local bus (LB) is the content written as the adjacent bus (CB) in FIG. 25, which allows information and processing to be shared between neighbors in one clock, achieving high speed and low power consumption.
  • the global bus (GB) is mainly used at the time of block shift at the time of dynamic reconfiguration, and the main role is burst transfer of block data groups.
  • FIG. 26 shows an SRAM-CAM array, where GB is a global bus and LB is a local bus.
  • Blocks A, D, E, H, I, L, M, and P are CAM function blocks, and the others are LUT function blocks. Each block sets function designation by a program. Thereby, the search is performed in the CAM function block, and various arithmetic processes are executed in the LUT function block.
  • a portion in which two blocks are surrounded by a broken line means that a processing unit block is composed of two blocks. Further, assuming that one set of data width of the global bus (GB) is n bytes, 16 n bytes can be processed in this example.
  • the LUT method of this embodiment has a great advantage that the four arithmetic operations can be performed with one clock as shown in FIG. 27 (FIG. 27). That is, 6 steps are required for 4-bit multiplication in the process of shift, addition, and register latch, which is a general arithmetic method, but the LUT method of this embodiment provides an answer that can be accessed by inputting x and y addresses. Since it only needs to be pulled out, it is completed in one step.
  • FIG. 27A shows a binary 4-bit multiplier, H is a half-adder, F is a full adder, and a symbol ⁇ in the figure is a flip-flop circuit (F / F). Further, the ripple carry adder has 6 addition stages and a latency of 2. This has the same function as the LUT multiplier shown in FIG.
  • FIG. 28 shows the concept of the idea when the number of entries is larger than 256.
  • the number of entries is larger than 256, for example, 4k
  • the 16 areas can be allocated to memory areas, LUTs, arithmetic units, comparators, etc., and the functions can be improved by dynamically switching. If the entry address is 12 bits, 4 bits among them can be designated as an area, and 8 bits can be designated as an in-area address.
  • FIG. 29 shows an embodiment in which key data of input data and key data as search data are encoded.
  • This [Embodiment 4] relates to step S2 shown in FIG. 2 and step S7 shown in FIG.
  • the semiconductor device according to the fourth embodiment aims to eliminate the bias of the plurality of key data input to the control circuit by encoding the input data and the key data as the search data.
  • FIG. 29 shows an example of the SRAM-CAM memory circuit configuration.
  • the key data bias occurs, for example, when a plurality of key data having almost the same binary data is written continuously to the search memory mat. For example, assuming that the key data “00 01 10 01 10 01” is input after the key data “00 01 10 01 1 00” is input, the two key data are the last 1 Only the bit is different.
  • a plurality of key data is input after being randomized to some extent in order to reduce the probability of an address “collision”. However, if almost the same key data is continuously input as in the above example, address “collisions” frequently occur. Therefore, in this embodiment, input key data is encoded, and binary data of a plurality of key data is artificially randomized.
  • encoding includes distributing key data according to a predetermined rule (algorithm). Further, “encoding” includes not only encoding by an equation (algorithm) but also rearranging the order of data bits representing key data.
  • the semiconductor device includes a proximity cache memory mat 101, an encoding circuit 106, a control circuit 105, a search memory mat 102, a comparison + latch circuit 103, and a confirmation memory 104.
  • the proximity cache memory mat 101 need not be provided if it is not necessary.
  • key data (KD) as original information is first input to the encoding circuit 106.
  • the key data that is the original information is encoded by the encoding circuit 106 according to a predetermined algorithm.
  • the encoding circuit 106 encodes the input key data according to a predetermined algorithm, and outputs the encoded key data.
  • the key data encoded by the encoding circuit 106 is input to the control circuit 105.
  • the control circuit 105 uses the encoded key data as an address for searching the search memory mat 102 or an address for newly writing to the search memory mat 102.
  • control circuit 105 can handle the encoded key data in exactly the same way as the key data described in the first embodiment. That is, the control circuit 105 divides the encoded key data into a plurality of parts, and accesses the search memory mat 102 using the divided key data as an address. Then, the control circuit 105 writes the entry address in the accessed search memory mat 102 or reads the entry address written in the accessed search memory mat 102. These writing process and reading process are the same as those described in the first embodiment. This writing process and reading process are performed for all the divided search memory mats 102.
  • control circuit 105 assigns a location (address) for storing an entry address (EA) to the y axis of the search memory mat 102, and assigns the encoded key data (KD) after encoding to the x axis.
  • the search memory mat 102 is divided into basic cells having an appropriate number of bits corresponding to the encoded key data assigned to the x axis (number of divisions: N).
  • N is a natural number of 2 or more. In the example of FIG. 29, N is 8.
  • the number of bits allocated to each basic cell is arbitrary.
  • the control circuit 105 assigns an entry address to the y axis of the confirmation memory mat 104 and assigns key data corresponding to the entry address to the x axis. Therefore, key data is written in the confirmation memory mat 104 according to the entry address.
  • the key data stored in the confirmation memory mat 104 does not correspond to the input data encoded by the encoding circuit 106 but corresponds to the key data as the original information before being input to the encoding circuit 106. .
  • the key data input to the search memory mat 102 is encoded key data obtained by encoding key data as original information input at the time of writing or searching.
  • the key data stored in the confirmation memory mat 104 is data before encoding, that is, key data itself as original information input at the time of writing or searching. That is, the reference process for the confirmation memory mat 104 is performed on the key data as the original information before encoding input to the encoding circuit 106.
  • FIG. 35 shows the operation timing of the semiconductor device shown in FIG. 29 by the connection of the first clock and the second clock.
  • key data is input to the encoding circuit 106, key data as original information is encoded, and the encoded key data is output to the control circuit 105.
  • the encoded key data is input to the control circuit 105, the writing process or the reading process for the search memory mat 102 is performed, and the entry address is latched into the latch circuit 103a. The processing so far is executed with the first clock.
  • the second clock the data from the latch circuit 103 a is compared by the comparator 103 b and the comparison result is input to the confirmation memory mat 104.
  • the second clock it is confirmed that the data in the confirmation memory mat 104 matches the input data before encoding, and finally the data read from the confirmation memory mat 104 is output.
  • the encoding circuit 106 encodes key data as original information input when data is written or read.
  • the encoding circuit 106 has a function of removing the bias of the key data and changing the bit length by appropriately setting the encoding conditions. As will be described later, this encoding process is performed by mixing, spreading, or adding redundancy. For example, encoded bits are generated from original information using a generator polynomial, and the length of redundant bits changes according to a parameter specified at the time of code generation.
  • the method (1) As a method of inputting encoded data to the search memory mat 102 (SRAM-CAM), (1) a method of using original information + encoded bits, or (2) a method of using only encoded bits Is mentioned.
  • the method (1) will be described first, and then the method (2) will be described. Note that the method (2) is more effective in removing bit bias because the original information is spread over a wide range in the encoded bits.
  • FIG. 30 is a diagram for explaining the degree of scattering of encoded bits and data.
  • FIG. 30 shows a case where 28-bit key data is input to the encoding circuit.
  • the code generation parameter shown in FIG. 30 is an index representing the degree of scattering of original information as input data or key data. For example, when encoding processing is performed on 28-bit original information to obtain 6 encoded bits, the encoded input data input to the control circuit 105 has a total number of 34 bits. In this case, the code generation parameter representing the degree of scattering is 1 bit. In addition, when encoding processing is performed on 28-bit original information to obtain 27-bit encoded bits, the input data after encoding input to the control circuit 105 has a total bit number of 55 bits.
  • the code generation parameter representing the degree of scattering is 5 bits. Further, when encoding processing is performed on 28-bit original information to obtain 70-bit encoded bits, the input data after encoding input to the control circuit 105 has a total number of 98 bits. In this case, the code generation parameter indicating the degree of scattering is 11 bits.
  • FIG. 31 is a diagram showing an embodiment of the present invention, and shows original information and encoded bits output from the encoding circuit 106.
  • a Bose-Chodori Bockengem code (BCH code: Bose Chaudhurin Hocquenghem code) is used.
  • BCH code Bose Chaudhurin Hocquenghem code
  • the BCH code is a kind of parameterized error correction code, and is characterized in that it can be decoded by a simple algebraic technique called syndrome decoding.
  • the BCH code can be encoded and decoded by a small device with low power, but the present invention uses only the encoding function and does not use the decoding function.
  • the BCH code is composed of a value composed of XOR (indicated by addition +) of the original data of a plurality of bits. From the viewpoint of encoding, the BCH code can be searched even if it is encoded only with encoded bits not including the original data portion.
  • coding includes low-density parity check code (LDPC), QSBC (QuadruplewingSwing-By Code: registered trademark of Toshiba Corporation), and the like. . In the present invention, these LDPC and QSBC may be used instead of the BCH code.
  • each bit of the coded bits is “a6 + a2 + a0”, “a6 + a5 + a2 + a1 + a0”, “a6 + a5 + a4 + a2 + a1”, “a5 + a4 + a3 + a1 + a0” “A6 + a4 + a3”, “a5 + a3 + a2”, “a4 + a2 + a1”, “a3 + a1 + a0”.
  • the value of each bit of the key data as the original information is mixed and diffused in each bit of the generated encoded bits to ensure redundancy.
  • Information bits that are k-bit original information are “a k ⁇ 1 , a k ⁇ 2 ,... a 1 , a 0 ”, and m coded bits are “c m ⁇ 1 , cm 2”. ,..., C 1 , c 0 ”, the n-bit BCH codes are“ a k ⁇ 1 , a k ⁇ 2 ,... A 1 , a 0 , c m ⁇ 1 , cm 2 , .., C 1 , c 0 ′′.
  • Generation of the BCH code requires m coded bits.
  • the generation of the BCH code is to obtain a remainder R (x) obtained by dividing x m P (x) by G (x).
  • a circuit for calculating the quotient and the remainder when dividing by is generally as shown in FIG.
  • FIG. 34 shows a circuit used to actually generate a BCH code.
  • the remainder R (x) can be obtained by inputting a k ⁇ 1 , a k ⁇ 2 ,... A 1 , a 0 and then outputting the information stored in the shift register by a shift operation.
  • the (15, 7) code shown in FIG. 31 can be generated.
  • the encoding circuit 106 of the present invention is configured by using the expression representing the calculation result of FIG. 31 without using the circuit of FIG.
  • This code becomes input data after encoding. That is, key data input to the search memory mat 102 is generated via the control circuit 105.
  • FIG. 32 is a diagram showing 8-bit original information and 20-bit encoded bits generated from this, in another example of the present invention.
  • 20 encoded bits are generated by encoding the key data “a7 a6 a5 a4 a3 a2 a1 a0” as 8-bit original information.
  • Each bit of the encoded bits is “a1 + a2 + a3”, “a0 + a1 + a2”, “a0 + a2 + a3 + a6 + a7”, “a3 + a5”, “a2 + a4 + a7”, “A1 + a3 + a6 + a7”, “a0 + a2 + a5 + a6”, “a2 + a3 + a4 + a5 + a6”, “a1 + a2 + a3 + a4 + a5 + a7”, “a0 + a1” + a2 + a3 + a4 + a6 + a7 ”,“ a0 + a1” + a2 + a3 + a4 + a6 + a7
  • the bit values are mixed and spread to ensure redundancy, and the scattering degree is clearly increased as compared with the case of Fig. 31.
  • the 20-bit code generated from this original information The conversion bit is expressed by the XOR logical expression of the original information, and can be directly converted into the XOR logical circuit of the original information.
  • the condition required for the encoding circuit 106 is that the output of the encoding circuit 106 matches when writing data and when searching. That is, the encoding circuit 106 executes the same encoding when data is written and when it is retrieved. Thus, the encoding circuit 106 only needs to be guaranteed not to generate different encoded bits when data is written and when data is retrieved. By doing so, it is possible to maintain the correspondence between the SRAMs constituting the search memory mat 102.
  • key data “167”, “235”, “116”, and “90” as input data corresponding to the four entry addresses are displayed in () for easy understanding. That is, the key data displayed in () is data before being encoded. These data are encoded by the encoding circuit 106 and converted into key data “2699”, “3779”, “1859”, “1440”.
  • the control circuit 105 assigns entry addresses “00”, “01”, “10”, and “11” to “2699”, “3779”, “1859”, and “1440”, which are key data after encoding, respectively. Is assumed.
  • the key data “167” input as data to be written to the entry address “00” is converted to “2699” by the encoding circuit 106.
  • the encoded key data “2699” is represented as “10 10 10:00 10 11” in binary data.
  • the control circuit 105 divides the encoded key data into a plurality of pieces. In the example shown in FIG. 36, the encoded key data is divided into six. Each of the divided key data is written into the search memory mat 102 divided into six. At this time, the data written to the search memory mat 102 is the entry address “00” corresponding to the encoded key data “2699”.
  • the encoded key data “2699” is divided into six by the control circuit 105 to be “10” “10” “10” “00” “10” “11”. Represented.
  • the control circuit 105 writes the entry address “00” in the first divided memory 102a using the first divided key data “10” as an address.
  • the control circuit 105 writes the entry address “00” in the second divided memory 102b using the second divided key data “10” as an address.
  • the control circuit 105 writes the entry address “00” into the third divided memory 102c using the third divided key data “10” as an address.
  • control circuit 105 applies the entry address “4” to the fourth to sixth divided memories 102d, 102e, and 102f for the fourth to sixth divided key data “00”, “10”, and “11”. 00 ”is written. As a result, the entry address “00” is written in the search memory mat 102 designated by the encoded key data “2699”.
  • the key data “235” input as data to be written to the entry address “01” is converted into “3779” by the encoding circuit 106.
  • the encoded key data “3779” is expressed as “11 10 11 00 00 11” in binary data.
  • the control circuit 105 writes the entry address “01” corresponding to the encoded key data “3779” into the search memory mat 102 divided into six.
  • the encoded key data “3779” is divided into six by the control circuit 105 and expressed as “11” “10” “11” “00” “00” “11”. It is.
  • the control circuit 105 writes the entry address “01” into the search memory mat 102 using these divided key data as addresses. That is, the control circuit 105 writes the entry address “01” in the first divided memory 102a using the first divided key data “11” as an address. Further, the control circuit 105 writes the entry address “01” to the second divided memory 102b using the second divided key data “10” as an address. At this time, the entry address “00” has already been written to the address of the second divided memory 102b by writing the encoded key data “2699”.
  • the control circuit 105 writes a collision flag at a location where the address has collided, and processes it as “don't care” in the subsequent read processing. Further, as shown in FIG. 36B, the control circuit 105 further writes the entry address “01” in the third divided memory 102c using the third divided key data “11” as an address. Similarly, the control circuit 105 uses the fourth to sixth key data “00”, “00”, and “11” as addresses, and enters the entry address “01” for the fourth to sixth divided memories 102d, 102e, and 102f. Write.
  • the control circuit 105 sets a collision flag at this address. However, in the search processing performed later, it is processed as “don't care”.
  • the entry address “01” is written in the search memory mat 102 designated by the encoded key data “3799”.
  • the key data “116” “90” as the original information is converted into “1859” “1440” by the encoding circuit, and the encoded key data “1859” “1440” is used as an address for retrieval.
  • the entry addresses “10” and “11” are written in the memory mat 102.
  • FIG. 36C in the writing process of the encoded key data “1859”, an address collision newly occurs in the fifth divided memory 102e.
  • FIG. 36D in the writing process of the encoded key data “1440”, an address collision has newly occurred in the first and third divided memories 102a and 102c.
  • the upper part of FIG. 36E shows an example of the writing state of the confirmation memory mat (SRAM) 104.
  • SRAM confirmation memory mat
  • binary data “10 10 10 00” of the key data “167” is written to the entry address “00”
  • the key is entered to the entry address “01”.
  • Binary data “11 10 11 00” of data “235” is written
  • binary data “01 11 01 00” of key data “116” is written to entry address “10”
  • key data “11” is written to entry address “11”.
  • Binary data “01 01 10 10” of 90 ” is written respectively.
  • the encoded key data “2699”, “3779”, “ 1859 "and” 1440 may be written.
  • FIG. 37 is a diagram showing a search operation of the semiconductor device (SRAM-CAM) according to the present invention.
  • FIG. 37A shows the search operation when “167” is input as the key data of the original information and converted into the encoded key data “2699” by the encoding circuit 106.
  • the encoded key data “2699” is represented as “10 10 10:00 10 11” in binary data. This binary data is divided into six in the control circuit 105.
  • Each of the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the entry address “00” is read.
  • data is read from the second divided memory 102b using the second divided key data “10” as an address.
  • this data has an address collision when the encoded key data “3799” shown in FIG. 36B is input, a “don't care” process is performed. That is, the read data from the second divided memory 102b is not searched.
  • the data read from the search memory mat 102 based on the encoded key data “2699” is the data in the first divided memory 102a and the fifth divided memory 102e. These data are both “00” and match. Accordingly, it can be estimated that the entry address corresponding to the encoded key data “2699” is “00”.
  • the control circuit 105 compares the key data that is output data from the confirmation memory mat 104 with the key data as the search data before encoding, confirms that they match, and sets the entry address. Output.
  • FIG. 37B shows a case where the encoded key data “3779” is input as a search target.
  • the key data “3779” is represented by binary data “11 10 11 00 00 11” and is divided into 6 by the control circuit 105.
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the entry address “01” is read.
  • Data is read from the second divided memory 102b using the second divided key data “10” as an address, but this data has an address collision, and is processed as “don't care”. To do.
  • the second divided key data “10” is excluded from the search target.
  • the entry address “01” is read.
  • the third to sixth divided memories 102d, 102e, and 102f having the addresses of the fourth divided key data “00”, the fifth divided key data “00”, and the sixth divided key data “11”, respectively. Access to is excluded from the search by the “don't care” process.
  • the value read from the search memory mat 102 by the encoded key data “3779” is the entry address “01” of the first and third divided memories 102a and 102c. become.
  • the control circuit 105 compares the key data as the output data from the confirmation memory mat 104 with the key data as the search data before encoding and confirms that they match, and then outputs the entry address.
  • FIG. 37C shows a case where key data “94” not written in the search memory mat 102 is encoded, and the encoded key data “1504” is inputted as a search target. Yes.
  • the encoding circuit 106 encodes the key data “94” and converts it into “1504”.
  • the encoded key data “1504” is represented by binary data “01 01 11 10 00 00”.
  • the encoded key data is divided into six by the control circuit 105. The divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the data read from the search memory mat 102 based on the encoded input data “1504” is the entry address “11” as the output of the second divided memory 102b. Entry address “01” as the output of the third divided memory 102c, entry address “11” as the output of the fourth divided memory 102d, and entry address “11” as the output of the sixth divided memory 102f It turns out that. Note that access to the divided memory 102e using the fifth divided key data “00” as an address is excluded from the search target by the “don't care” process. In this case, there are a plurality of types of entry addresses read from the search memory mat 102. That is, the entry address does not match. Therefore, the control circuit 105 can determine that data matching the key data as the search data does not exist in the search memory mat 102 at this stage without using the confirmation memory mat 104. .
  • the bit length of the key data input to the SRAM-CAM is 24 bits, and the bit length of the encoded key data generated by encoding is also 24 bits.
  • the encoded key data is divided into six as described above, and the search memory mat 102 divided into six is searched with the divided key data. From this assumption, it can be seen that the SRAM-CAM search memory mat 102 is composed of six SRAMs of 16 words ⁇ 4 bits. Therefore, the number of SRAM-CAM entries is 16.
  • FIG. 38 shows an example in which 10 encoded bits can be generated from 8 bits of original information.
  • bits from c2 to c9 are used except for c0 and c1.
  • 8 encoded bits are generated from 8 bits of original information.
  • the 24-bit key data is divided into 6 groups of 4 bits, and the group arrangement is exchanged according to a predetermined algorithm in units of groups. Then, two groups are encoded in units of 8 bits from the left end of the replaced group. This method is illustrated in FIG.
  • FIG. 39 shows key data (FIG. 39 (a)), which is the original information input to the SRAM-CAM, and key data (FIG. 39 (b)) after grouping and changing the group arrangement by 4 bits.
  • 3 shows changes in three types of data, ie, key data (FIG. 39C) after encoding in units of 8 bits. Numbers (1) to (6) in Marunouchi are used to distinguish groups.
  • the three types of data in FIGS. 39A, 39B, and 39C have 16 SRAM-CAM entries, and 16 types of data can be written in the search memory mat 102. Described. In order to see the influence of the bias, it is assumed that the data of 3 groups ((1) to (3)) of the 6 groups of the original information are all the same value.
  • the numbers in the locations indicated by the entry addresses and (1) to (6) in FIG. 39 are binary numbers represented by 4 bits expressed in decimal numbers. In the entry address “0” of the key data as the original information, the six numbers “4”, “1”, “13”, “14”, “11”, “5” from (1) to (6) The values of each group of (1) to (6) when the 24-bit original information is divided by 4 bits are shown.
  • the original information of (1), (2), (3), (4), (5), (6) is (2), (5), (6), (3), (1), and (4) are rearranged in this order.
  • the rearranged entry address “0” has 24-bit binary data “1”, “11”, “5”, “13”, “4”, “14”.
  • this data is regarded as 8-bit data of (2), (5), (6), (3), (1), and (4) by encoding in units of 8 bits
  • the encoded bits shown in FIG. Are converted by an XOR combinational logic circuit.
  • the result of encoding in units of 8 bits is shown in FIG. 39 (c). That is, as shown in FIG. 39C, when encoding is performed, at the entry address “0”, “1”, “7”, “1”, “10”, “6”, “12 "24-bit data represented by" ".
  • FIG. 40 (a) shows a case where the key data as the original information is written in the SRAM-CAM search memory mat 102 without being encoded, and the data written in the search memory mat 102 is read out.
  • FIG. 40A shows key data as original information, the contents of the search memory mat 102, and the read results of the search memory mat 102 in order from the left.
  • FIG. 40B shows a case where the data is written to the search memory mat 102 and the data is read after performing the above-described 8-bit unit encoding. That is, FIG. 40B shows a case where 16 types of key data are written and read from the search memory mat 102 because the number of entries in the search memory mat 102 is 16.
  • FIG. 40B shows, in order from the left, data that has been encoded in 8-bit units, the contents of the search memory mat 102, and the read results of the search memory mat 102.
  • the bias in the divided memories (1), (2), and (3) increases, and a state where only one type of data is written occurs. .
  • FIG. 40 (a) when data is written in the search memory mat 102 in the order of entry addresses, the entry addresses “1”, (2), and (3) are indicated by decimal numbers. 0 "is written, and an address collision occurs in a subsequent write operation.
  • the information written in the filled state is “0”.
  • the data (4), (5), and (6) are assumed to be in a random state, it can be seen from the search memory mat 102 that address collisions occur randomly. In FIG. 40, the address conflict is displayed in a filled state.
  • FIG. 40B shows an example in the case where an encoding process in units of 8 bits is performed.
  • FIG. 40 (b) by performing the encoding process, extreme collisions such as those shown in (1), (2), and (3) shown in FIG. 40 (a) do not occur. It was.
  • the read result of the search memory mat 102 is the same when the encoding process is performed and when the encoding process is not performed. This is a fixed state in which one of the two data to be encoded does not change at all, as shown in the data after the arrangement change of the group before performing the 8-bit unit encoding in FIG. This is because it is data.
  • the group arrangement change and the 8-bit unit encoding are performed once again using the data after the 8-bit unit encoding as the original information, and this result is used as the second 8-bit unit encoding.
  • the group arrangement change and the 8-bit unit encoding are performed once again using the data after the 8-bit unit encoding as the original information, and this result is used as the second 8-bit unit encoding.
  • FIG. 41 (a) shows the result when the key data as the original information is written to and read from the SRAM-CAM search memory mat without encoding
  • FIG. 41 (b) shows the second 8-bit data. The results are shown when the unit coding is performed and the data is written into and read from the search memory mat.
  • writing into the search memory mat 102 with the data encoded in the second 8-bit unit and reading out the written data causes all six divided memories to have an address collision. The state disappears.
  • FIG. 41B it can be seen that all of the entry addresses read from the divided memory coincide with the entry address of the key data, and all of the 16 entry data can be correctly searched.
  • encoding is performed in units of 8 bits, but the encoding need not be 8 bits, and various combinations can be selected. That is, the present invention can generate various encoded bits by selecting the code generation parameter and the number of bits of the original information. For example, even if the configuration of the search memory mat 102 is not changed, the original information is set to 12 bits or 16 bits to generate 10 encoded bits, of which 8 bits are used as in this embodiment. Alternatively, the original information may be 24 bits and the encoded bits may be 24 bits. If the original information is 16 bits, and if the resulting encoded bits are 8 bits, then select 4 groups so that they do not overlap among 6 4-bit groups (1) to (6) , 24 encoded bits can be generated.
  • FIG. 42 is a diagram for explaining an SRAM-CAM write operation that enables a search result to be output even when a collision state has occurred in all columns of key data input during a search.
  • the configuration of the semiconductor memory circuit and the SRAM-CAM switch or search operation are the same as those in the first embodiment, and thus description thereof is omitted.
  • the write operation to the search memory mat 102 in this embodiment will be described.
  • the entry address is 2 bits and 4 words, and the key data length as input data is 12 bits.
  • the search memory mat 102 is divided into six.
  • the key data “2699”, “2691”, “1859”, and “1440” are written in the entry addresses “00”, “01”, “10”, and “11”, respectively.
  • the key data “2699” input as data to be written to the entry address “00” becomes “10 10 10 00 10 11” in binary data.
  • This value is written in the search memory mat 102 as the y-axis address of the divided memories 102a to 102f divided into six.
  • the data to be written is, for example, the entry address “00” of the key data “2699”.
  • the key data “2699” is divided into six parts, which are represented as “10”, “10”, “10”, “00”, “10”, and “11”.
  • the entry address “00” is written to the memories 102a to 102f. That is, the control circuit 105 writes the entry address “00” in the first divided memory 102a using the first divided key data “10” as an address. Further, the control circuit 105 writes the entry address “00” in the second divided memory 102b using the second divided key data “10” as an address. Further, the control circuit 105 writes the entry address “00” into the third divided memory 102c using the third divided key data “10” as an address.
  • control circuit 105 uses the fourth to sixth divided key data “00”, “10”, and “11” as addresses, and the entry address “00” to the fourth to sixth divided memories 102d, 102e, and 102f. Write. As a result, the entry address “00” is written in the search memory mat 102 designated by the key data “2699”.
  • the key data “2691” input as data to be written to the entry address “01” is represented as “10 10 10 00 00 11” in binary. This value is written into the search memory mat 102 as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat divided into six. At this time, the data to be written is “01” input as the entry address.
  • the key data “2691” is divided into six parts and expressed as “10”, “10”, “10”, “00”, “00”, and “11”, and these are used as addresses for entry addresses.
  • “01” is written to the search memory mat 102. That is, the control circuit 105 writes the entry address “01” in the first divided memory 102a using the first divided key data “10” as an address.
  • the entry address “00” has already been written in the address of the first divided memory 102a, so that an address collision occurs.
  • FIG. 42B the portion where the address conflict has occurred is shown in a solid color. The part where the address conflict has occurred is processed as “don't care” in the subsequent read processing.
  • the control circuit 105 writes the entry address “01” to the second divided memory 102b using the second divided key data “10” as an address. Further, the control circuit 105 assigns the third to sixth divided key data “10”, “00”, “00”, and “11” as addresses to the third to sixth divided memories 102c, 102d, 102e, and 102f, respectively. On the other hand, the entry address “01” is written. However, since the entry address of the key data “2699” has already been written in the second to fourth and sixth addresses, the control circuit 105 sets a collision flag and “not consider” in the subsequent read processing. (Don't care) ". As a result, the entry address “01” is written in the search memory mat 102 designated by the key data “2691”.
  • the control circuit 105 writes the entry addresses “10” and “11” in the search memory mat 102 of the SRAM-CAM using the key data “1859” and “1440” as addresses.
  • FIG. 42C in the writing process of the key data “1859”, an address collision occurs in the fourth to sixth divided memories 102d, 102e, and 102f.
  • FIG. 42D in the key data “1440”, an address collision occurs in the first, third, and fifth divided memories 102a, 102c, and 102e.
  • FIG. 42E shows a write state of the confirmation memory mat (SRAM) 104.
  • SRAM confirmation memory mat
  • FIG. 43 is a diagram showing a search operation of the SRAM-CAM according to [Embodiment 5] of the present invention.
  • FIG. 43 shows whether or not the input data is correctly retrieved when the overlapping portion of the address shown in FIG. 42, that is, the darkly shaded entry is “don't care”. It represents.
  • FIG. 43A shows a case where key data “2699” is input as search data.
  • the key data “2699” as the search data is represented by binary “10 10 10:00 10 11”, and is divided into 6 bits by 2 bits by the control circuit 105.
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the control circuit 105 reads the entry address “00” from the first divided memory 102a using the first divided key data as an address, an address collision occurs in this data, and therefore “don't care” is considered. ) ”To process. Therefore, the control circuit 105 excludes the read data from the first divided memory 102a from the search target.
  • control circuit 105 performs the second division key data “10”, the third division key data “10”, the fourth division key data “00”, and the sixth division key data “11”. Are used as addresses to access the divided memories 102b, 102c, 102d, and 102f. However, since there is an address conflict for these accesses, the control circuit 105 excludes the read data from the search by “don't care” processing. On the other hand, the control circuit 105 can read the entry address “00” from the fifth divided memory 102e by using “10” of the fifth divided data as an address.
  • the data actually used for the search is the fifth divided memory 102e.
  • the entry address “00” read from the address is read.
  • control circuit 105 when the control circuit 105 reads the value of the key data accessed by the entry address “00” using the confirmation memory mat 104, it becomes “10 10 10 10 10 11”, which is the key data as input data. You can see that That is, the control circuit 105 compares the output data, which is the key data from the confirmation memory mat 104, with the input data and confirms that it is correct, and then outputs the entry address.
  • FIG. 43B shows a case where key data “1859” as search data is input.
  • Key data “1859” as search data is represented by “01 11 01 00 00 11” and is divided into 6 bits by 2 bits by the control circuit 105.
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • the control circuit 105 reads the data of the first divided memory 102a using the first divided key data “01” as an address, but this data is “don't care” because of an address collision. Do processing. Further, the control circuit 105 can read the entry address “10” by reading data from the second divided memory 102b using the second divided key data “11” as an address. The control circuit 105 can obtain the entry address “10” by reading the data from the third divided memory 102c using the third divided key data “01” as an address.
  • the access to the divided memories 102d, 102e, and 102f using the fourth divided key data “00”, the fifth divided key data “00”, and the sixth divided key data “11” as addresses is as follows. Due to the “don't care” process, the search is excluded.
  • the value read from the search memory mat 102 by the key data “1859” as the search data is the entry address “10” that is output from the second divided memory 102b, and 3 This is the entry address “10” which is the output from the second divided memory 102c.
  • the control circuit 105 confirms that the output data as the key data from the confirmation memory mat 104 is correct compared with the search data, and outputs the entry address.
  • FIG. 43 (c) shows a case where “2691” is input as key data as search data.
  • the key data “2691” as the search data is represented by a binary of “10 10 10 00 00 11”.
  • the control circuit 105 divides the binary data of the key data “2691” into 6 pieces every 2 bits.
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into six.
  • a “don't care” process is performed.
  • a “don't care” process is performed and the data is excluded from the search target. That is, in the example shown in FIG. 43C, there is an address collision in all the divided digits obtained by dividing the key data.
  • the control circuit 105 first reads out the entry address written in the address from the addresses of the divided memories 102a to 102f that are set to “don't care”. That is, even if a collision occurs in each of the divided memories 102a to 102f, one entry address is written together with the collision flag. The control circuit 105 reads the entry address written together with the collision flag from each of the divided memories 102a to 102f. Then, the control circuit 105 sequentially refers to the confirmation memory mat 104 shown in FIG. 43 (e) using the entry address written together with the collision flag. In the example shown in FIG. 43 (e), the entry addresses in the collision state are “00” and “01”.
  • control circuit 105 when the control circuit 105 reads the value of the key data corresponding to the entry address “00” from the confirmation memory mat 104, it can be seen that it is “10 10 10 00 10 11”. This key data “10 10 10:00 10 11” does not match the key data input as the search target data. Therefore, the control circuit 105 determines that “00” is not the requested entry address. Next, when the control circuit 105 reads the value of the key data corresponding to the entry address “01” of the confirmation memory mat 104, it is found that it is “10 10 10 00 00 11”. This key data, “10 10, 10 00 00 11”, matches the key data input as the search target data. Therefore, the control circuit 105 can determine that “01” is the entry address to be obtained.
  • control circuit 105 outputs this entry address “01” as a search result. In this way, even when all of the divided search data are in a collision state, it is possible to extract key data that matches the key data by sequentially referring to the confirmation memory mat 104 with the entry address in the collision state. It becomes.
  • a “don't care” process is performed. In this “don't care” processing, either (1) the entry address writing operation is stopped or (2) the entry address already written is overwritten with another entry address. The For this reason, in the search memory mat 102, the entry address written first is written in the former (1), and the entry address written last is written in the latter (2). Is written. For this reason, even if there is a collision in the address, there is a possibility that the entry address to be searched is included in the address. Therefore, in the embodiment of the present invention, attention is paid to this possibility, and the entry address included in the address where the collision has occurred is extracted to increase the possibility of finding the search target. . As a result, in the embodiment of the present invention, even if an all-column collision state occurs in the search data input at the time of search, if the entry address to be searched is included in the search data, the search result is output. can do.
  • N L / log 2 ⁇ M
  • M Key data length
  • N Total number of entries
  • the number of divided memories is increased to reduce the collision frequency. For example, in the case of a data length of 12 bits, each bit is usually specified as the first bit to the twelfth bit, but in the following, for convenience, it will be referred to as the 0th bit to the 11th bit.
  • FIG. 44 is a diagram showing a write operation of the search memory mat according to the sixth embodiment of the present invention.
  • the write operation to the search memory mat 102 in the present invention will be described.
  • the entry address is 2 bits and 4 words and the key data length is 12 bits.
  • the minimum number of divided memories is six.
  • FIG. 44 an example in which the search memory mat 102 is divided into six divided memories 102a to 102f and further added six divided memories 102g to 102l to form 12 divided memories. Show. That is, in this embodiment, the number of divisions of the search memory mat 102 is doubled as compared with [Embodiment 1].
  • it is assumed that “2699”, “2691”, “1859”, and “1440” are written to the entry addresses “00”, “01”, “10”, and “11” as key data.
  • the numbers shown as [1: 0], for example, at the bottom of the search memory mat 102 mean "key data selection bits".
  • the “key data selection bit” here is information for selecting the bit number of the key data stored in each divided memory for each of the plurality of divided memories 102a to 102f.
  • the “key data selection bit” is the sixth divided memory 102f in which the 0th bit and the 1st bit are the 6th binary data of the input 12-bit key data.
  • the second and third bits are stored in the fifth divided memory 102e
  • the fourth and fifth bits are stored in the fourth divided memory 102d
  • the sixth and seventh bits are the third.
  • the 8th and 9th bits are stored in the second divided memory 102b
  • the 10th and 11th bits are stored in the first divided memory 102a.
  • the fourth and sixth bits are stored in the twelfth divided memory 102l, and the fifth and seventh bits are the eleventh.
  • the 0th and 8th bits are stored in the 10th divided memory 102j
  • the 1st and 9th bits are stored in the 9th divided memory 102i
  • the 2nd and 10th bits Are stored in the eighth divided memory 102h
  • the “key data selection bit” is set so that the third bit and the eleventh bit are stored in the seventh divided memory 102g.
  • the input 12-bit key data is expanded to 24 bits and is distributed and stored in a total of 12 divided memories including the additional divided memory. Therefore, the six additional divided memories store the bit data stored in the six divided memories in an overlapping manner.
  • the duplication of bit data can be set to a desired value, whereby the number of additional SRAMs can be arbitrarily set.
  • the key data “2699” input as data to be written to the entry address “00” is “10 10 10 00 10 11” in binary data.
  • the bit data to be stored in the additional divided memory is redundantly added to the input key data. That is, 12-bit data is added as lower bits to the 12-bit key data.
  • the key data after the addition is set to “10 10 10 00 10 11 11 00 11 11 10 10 00” (24 bits).
  • Data is written in the search memory mat 102 as this value as the y-axis address of the search memory mat 102 divided into twelve. At this time, the data written to the search memory mat is “00” input as the entry address of the key data “2699”.
  • the key data “2699” is expressed by 24 bits.
  • This data is divided into 12 parts and expressed as “10” “10” “10” “00” “10” “11” “11” “00” “11” “01” “10” “00”.
  • the control circuit 105 writes the entry address “00” into the twelve divided mats 102a to 102l using these twelve divided key data as addresses. That is, the entry address “00” is written to the first divided memory 102a using the first divided key data “10” as an address.
  • the entry address “00” is written in the second divided memory 102b using the second divided key data “10” as an address. Further, the entry address “00” is written in the third divided memory 102c using the third divided key data “10” as an address. Similarly, the entry address “00” is written in the fourth to sixth divided memories 102d to 102f using the fourth to sixth divided key data “00”, “10”, and “11” as addresses. Further, similarly, the seventh to twelfth divided key data “11”, “00”, “11”, “01”, “10”, and “00” are used as addresses in the seventh to twelfth divided memories 102g to 102l. The entry address “00” is also written in the six additional divided memories. As a result, the entry address “00” is written in the search memory mat 102 designated by the key data “2699”.
  • the key data “2691” input as data to be written to the entry address “01” is represented as “10 10 10 00 00 11” in binary.
  • the bit data to be stored in the additional divided memory is added to the input key data in an overlapping manner. That is, 12-bit data is added as lower bits to the 12-bit key data.
  • the key data after the addition is “10 10 10:00 00 11 1 00 11 01 1 00” (24 bits).
  • the 24-bit key data is divided into 12 pieces of divided key data.
  • this divided key data is written into the search memory mat 102 as an address for accessing the y axis of the search memory mat 102 divided into twelve. At this time, the data written to the search memory mat 102 is “01” input as the entry address.
  • the split key data is processed as “don't care”.
  • the entry address “01” is written in the second divided memory 102b using the second divided key data “10” as an address.
  • the third to sixth divided key data “10”, “00”, “00”, and “11” are used as addresses, and the entry addresses “01” are assigned to the third to sixth divided memories 102c, 102d, 102e, and 102f, respectively. "Is written. However, since the second to fourth and sixth addresses are already used by writing the key data “2699”, they are processed as “don't care”.
  • the seventh to twelfth divided key data “10”, “00”, “11”, “01”, “10”, “00” are used as addresses, respectively, and the seventh to twelfth additional divided memories 102g to 102l.
  • the entry address “01” is written into the six.
  • the 8th to 12th addresses are already used by writing the divided key data “2699”, they are processed as “don't care”.
  • entry address “01” is written in the divided memory designated by the key data “2691”.
  • entry addresses “10” and “11” are written in the search memory mat 102 using the key data “1859” and “1440” as addresses.
  • FIG. 44C when the key data “1859” is written, an address collision occurs in the fourth to sixth and ninth divided memories.
  • FIG. 44D in the key data “1440”, an address conflict occurs in the first, third, fifth, seventh, eighth, and twelfth divided memories.
  • FIG. 44E shows a write state of the confirmation memory mat (SRAM) 104.
  • SRAM confirmation memory mat
  • FIG. 45 shows the search operation of the search memory mat 102 in [Embodiment 6] of the present invention.
  • FIG. 45 shows whether or not the input data is correctly searched when the overlapping portion of the address shown in FIG. 44, that is, the darkly shaded entry is set to “don't care”. It represents.
  • FIG. 45A shows a case where key data “2699” is input as search data.
  • the key data “2699” is represented by binary data “10 10 10:00 10 11”.
  • 12-bit data is added as lower bits to the 12-bit key data in accordance with the key data selection bit.
  • the key data after the addition is “10 10 10:00 10 11 11 00 11 01 1 00” (24 bits).
  • This divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 divided into twelve.
  • the entry address is read from the search memory mat 102 using these divided key data as addresses.
  • the entry address is read from the search memory mat 102 using these divided key data as addresses.
  • the data used for the search are the fifth divided memory 102e and the seventh data. This is the entry address “00” which is the output of the divided memory 102g.
  • the control circuit 105 compares the key data, which is output data from the confirmation memory mat 104, with the search data and confirms that they match, and then outputs the entry address.
  • FIG. 45B shows a case where key data “1859” is input as search data.
  • the key data “1859” is represented by “01 11 01 00 00 11”.
  • 12-bit data is added as lower bits to the 12-bit key data according to the key data selection bit.
  • the key data after the addition is “01 11 01 00 00 11 00 10 11 11 00 10” (24 bits).
  • These divided key data are respectively used as addresses for accessing “locations where entry addresses are registered” assigned to the y-axis of the search memory mat 102 divided into twelve.
  • the first divided key data “01” is used as an address to read data from the first divided memory 102a. However, since an address conflict has occurred, a “don't care” process is performed.
  • the first split key data is not subject to search.
  • the entry address “10” is read.
  • data is read from the third divided memory 102c using the third divided key data “01” as an address an entry address “10” is obtained.
  • the fourth “00”, the fifth “00”, the sixth “11”, the seventh “00”, the eighth “10”, and the ninth “11” are addressed to the divided memories. Access is excluded from the search by the “don't care” process. Further, when data is read from the tenth divided memory 102j using the tenth divided key data “11” as an address, the entry address “10” is read. When data is read from the eleventh divided memory 102k using the eleventh divided key data “00” as an address, the entry address “10” is read. Further, when data is read from the twelfth divided memory 102l using the twelfth divided key data “10” as an address, an entry address “10” is obtained.
  • the values read from the search memory mat 102 by the key data “1859” as the search data are the second divided memory 102b, the third divided memory 102c, and the tenth. This is the entry address “10” that is the output of the divided memory 102j, the eleventh divided memory 102k, and the twelfth divided memory 102l.
  • the control circuit 105 When the value of the key data accessed by the entry address “10” is read using the confirmation memory mat 104, it becomes “01 11 01 00 00 11”, which is found to match the key data as the search data. That is, the control circuit 105 outputs the entry address after confirming that the key data, which is the output data from the confirmation memory mat 104, matches the search data.
  • FIG. 45 (c) shows a case where “2691” is input as key data as search data.
  • key data “2691” is represented by binary data “10 10 10 00 00 11”.
  • 12 bits of data are added as lower bits to the 12 bits of key data according to the key data selection bits.
  • the key data after the addition is “10 10 10:00 00 11 1 00 11 01 1 00” (24 bits).
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat 102 ′ divided into twelve.
  • the value read from the search memory mat 102 by the key data “2691” as search data is the entry address “01” output from the seventh divided memory 102g.
  • the control circuit 105 confirms that the key data, which is the output data from the confirmation memory mat 104, matches the search data, and outputs the entry address.
  • the search memory mat 102 is divided into six divided memories 102a to 102f using FIG.
  • this “2691” is represented by binary data “10 10 10 00 00 11”.
  • the divided key data is used as an address for accessing the “location where the entry address is registered” assigned to the y-axis of the search memory mat divided into six.
  • the data of each divided memory is obtained by using the first “10”, the second “10”, the third “10”, the fourth “00”, the fifth “00”, and the sixth “11” as addresses. When they are read, since they are address conflicts, “don't care” processing is performed. For this reason, it is not sufficient to divide the search memory mat 102 into six divided memories 102a to 102f under this condition, and it becomes impossible to output search results from the search memory mat.
  • the collision frequency can be reduced by increasing the number of divided memories as described above, and according to the present embodiment, the search result can be output. The possibility can be increased.
  • the present invention is not limited to the one having all the configurations described above.
  • the semiconductor device of the present invention is configured by an SRAM.
  • the present invention can be similarly realized by other memory circuits.
  • a high-speed nonvolatile memory such as an MRAM can be preferably used.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Static Random-Access Memory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

【課題】低電力性と高速検索の機能とを実現する新規の半導体装置及びそれを用いた方法を提供する。 【解決手段】本発明の半導体装置は、y軸方向にエントリアドレスを登録する場所が割り当てられ、x軸方向にキーデータが割り当てられる構成を持つ検索メモリマット102と、検索メモリマットに接続された制御回路105と、を備える。検索メモリマットは、キーデータが割り当てられる領域をy軸方向に沿って複数に分割することにより、複数の分割メモリが形成されている。制御回路は、キーデータが入力される入力部1051と、入力部に入力されたキーデータを複数に分割する分割部1052と、分割部が分割したキーデータのそれぞれを当該分割したキーデータをアドレスとして分割メモリに割り当てて、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリに書き込む書込部1053と、を有する。

Description

半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法
 本発明は、半導体装置、及び半導体装置に対するエントリアドレスの書き込み/読み出し方法に関する。具体的に説明すると、本発明は、検索メモリマットを分割することで、データの検索時における消費電力を低減させることを図った連想メモリ(CAM:Content Addressable Memory)に関するものである。
 近年、クラウドコンピューティングの時代となり、インターネットスイッチやルータの高性能化や消費電力の低減が緊急の課題であるとされている。また、インターネットの検索エンジンとしては、より高速かつ低消費電力で確実な検索操作を行うことができるものが求められている。このような要求に応えるために、近年、インターネットスイッチや検索エンジンでは、CAMを使用することが多くなってきている。
 ここで、一般的なCAMは、CAM内に記憶されているデータ検索を行う際に、キーデータと呼ばれる検索データが入力される。そして、CAMは、キーデータと同じデータがメモリに記憶されている場合に、そのキーデータが記憶されているエントリアドレスと呼ばれる番地を出力する。一般的に、このような検索機能を実現するためには、CAM内の全メモリ空間へのアクセスが必要となり、回路構成が複雑になるだけではなく、消費電力が大きくなるという問題があった。特に、この消費電力が大きくなるという問題は、CAMの規模に伴って大きくなるものであるため、現在では非常に深刻な問題であるとされている。
 このような問題に対し、例えば特許文献1では、CAMの高速検索性を活かしつつ、低消費電力化を図ることを目的としたデータ検索装置が提案されている。特許文献1のデータ検索装置は、プライオリティが決められた複数のルールデータを、その大小の順序に応じて新たに順序付けし、その順序に応じて複数のメモリブロックに割り当てる。また、この検索装置は、データの検索を行う際には、検索すべき一つのメモリブロックを指定して検索処理を実行する。このように、特許文献1のデータ検索装置は、検索処理を行う際に、指定された一つのブロックのみをアクティブにし、他のブロックをアクティブにする必要がないことから、その分、通常のCAMと比較して検索時の消費電力を低減することができるとされている。
特開2004-185792号公報
 しかしながら、上記特許文献1に開示されたデータ検索装置は、通常のメモリと比較して検索時の消費電力を低減することが可能であるものの、検索処理を実行するためには、一度にブロック内の全メモリ空間にアクセスする必要がある。このため、従来のデータ検索装置は、回路構成が複雑であるとともに、検索時における消費電力が大きいという問題を有していた。このように、上記特許文献1の技術は、現在の問題に対する根本的な解決策を提示するものではなかった。
 従って、現在では、引き続き、CAMの高速な検索性能を維持しつつ、検索処理時における消費電力を低減することのできる新規な半導体装置が求められている。
 そこで、本発明の発明者らは、上記問題点を解決する手段について鋭意検討した結果、検索メモリマットを複数に分割し、キーデータを複数に分割したうえで、分割した検索メモリマットに、分割したキーデータに対応するエントリアドレスを書き込むという新たな知見を得た。このように、キーデータを複数に分割して検索メモリマットに書き込むようにすることで、このキーデータの検索を行う際には、検索メモリマットを部分的にアクティブにしてデータの検索を行うことができるようになる。その結果、本発明は、従来のCAMと比較して大幅な低消費電力化を実現することができる。そして、本発明者らは、上記知見に基づけば従来技術の課題を解決できることに想到し、本発明を完成させた。
 本発明の第1の側面は、半導体装置に関する。ここでは、まず、半導体装置にデータを書き込む処理について説明する。
 本発明の半導体装置は、検索メモリマット102と制御回路105を備える。
 検索メモリマット102は、y軸方向(列方向)にエントリアドレスを登録する場所が割り当てられ、x軸方向(行方向)にキーデータが割り当てられる。
 ここで、検索メモリマット102は、キーデータが割り当てられる領域をx軸方向に沿って複数に分割することにより、複数の分割メモリ102a、102b…が形成されている。
 また、制御回路105は、検索メモリマットに接続されている。
 ここで、制御回路105は、入力部1051と、分割部1052と、書込部1053とを有する。
 入力部1051には、キーデータ(入力データ)が入力される。
 分割部1052は、入力部に入力されたキーデータ(入力データ)を、複数に分割する。
 書込部1053は、分割部が分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして分割メモリに割り当てて、当該分割したキーデータそれぞれに対応するエントリアドレスを当該分割メモリに書き込む。
 上記構成のように、本発明の半導体装置では、まず、検索メモリマット102のうちのキーデータが割り当てられる領域が、複数に分割されている。これにより、検索メモリマット102は、複数の分割メモリ102a、102b…に分割される。ここで、本発明は、このような複数の分割メモリ102a、102b…に対して、キーデータに対応するエントリアドレスを書き込むことで、キーデータを記憶する。すなわち、本発明は、制御回路105にキーデータが入力されると、このキーデータを複数に分割する。そして、制御回路105は、分割したキーデータのそれぞれについて、このキーデータに割り当てられているエントリアドレスを、分割メモリ102a、102b…に書き込んでいく。また、このとき、制御回路105は、分割メモリにエントリアドレスを書き込むにあたり、検索メモリマット102のy軸に割り当てられたエントリアドレスを登録する場所を、分割したキーデータの内容(バイナリデータ)として、その分割したキーデータによって示される場所に、その分割したキーデータに対応するエントリアドレスを書き込んでいく。
 このようにして、本発明の半導体装置は、検索メモリマット102を複数に分割したうえで、そこに複数に分割したキーデータに対応するエントリアドレスを書き込む。このような書込処理を行っておくことで、キーデータの読出処理を、低消費電力で、且つ高速に行うことができる。すなわち、上記のように、本発明では、キーデータが複数に分割され、この分割されたキーデータのそれぞれについてのエントリアドレスが、分割メモリに記憶される。このため、このエントリアドレスを検索する際には、検索メモリマット102全体を一度に活性化させる必要はなく、検索メモリマット102を分割メモリ102a、102b…ごとに部分的に活性化させて検索することが可能となる。従って、本発明によれば、従来のCAMと同様の高速性でデータ検索を実現しつつ、従来のCAMよりも極めて低い消費電力でデータ検索を実行することができる。
 本発明の半導体装置において、制御回路105は、さらに、衝突情報記憶部1054を有することが好ましい。
 衝突情報記憶部1054は、書込部によって同一の分割メモリに複数のエントリアドレスが書き込まれる場合に、当該分割メモリにエントリアドレスの衝突を表す情報を書き込む。
 本発明の半導体装置では、制御回路105の書込部1053が、複数に分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして、当該分割したキーデータに対応するエントリアドレスを当該分割メモリに書き込むものであるため、同じ分割メモリの同じアドレスに複数のエントリアドレスが書き込まれる可能性がある。このように、同じアドレスに複数のエントリアドレスが書き込まれる現象を、本願明細書では「衝突」と表現している。ここで、本発明の半導体装置は、エントリアドレスの書込処理を行うにあたり「衝突」が生じた場合に、その衝突したアドレスに衝突を表す情報(フラグ等)を登録し、そのまま書込処理を続行する。これにより、エントリアドレスの書込処理を高速化できる。また、本発明は、エントリアドレスの衝突を避けるのではなく、エントリアドレスが衝突したとしても気にせずに書込処理を行う。これにより、本発明は、書込処理/読出処理におけるアルゴリズムを簡素化し、さらには、データ検索の高速性と低消費電力性の両立を実現している。
 続いて、半導体装置からデータを読み出す処理について説明する。
 本発明の半導体装置において、制御回路105は、さらに、読出部1055を有する。
 読出部1055は、入力部に、検索対象データとしてのキーデータが入力されたときに機能する。すなわち、本発明では、入力部に検索対象データとしてのキーデータが入力されると、分割部が、当該検索対象データとしてのキーデータを複数に分割する。その後、読出部1055は、分割部が分割したキーデータのそれぞれをアドレスとして分割メモリにアクセスし、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリから読み出す。
 上述したように、本発明の半導体装置では、キーデータが複数に分割され、この分割されたキーデータのそれぞれについてのエントリアドレスが、分割メモリに記憶されている。このため、このエントリアドレスを検索する処理では、検索メモリマット102全体を一度に活性化させる必要はなく、検索メモリマット102を分割メモリ102a、102b…ごとに部分的に活性化させて検索することが可能となる。従って、本発明によれば、従来のCAMと同様の高速性でデータ検索を実現しつつ、従来のCAMよりも極めて低い消費電力でデータ検索を実行することができる。
 本発明の半導体装置において、読出部1055は、分割部が分割したキーデータをアドレスとして分割メモリにアクセスしたときに、当該分割メモリに衝突を表す情報が書き込まれていた場合には、当該分割したキーデータについては対応するエントリアドレスを読み出さずに、配慮しないものとして処理する。
 上記のように、本発明の半導体装置は、分割したキーデータをアドレスとして、検索メモリマット102を検索した際に、同一のアドレスに複数のエントリアドレスの衝突が生じている場合には、その分割したキーデータについては検索対象から除外し、「配慮しない(don’t care)」ものとして扱う。本発明は、検索対象データとしての一つのキーデータを複数に分割したうえで、検索メモリマット102を検索している。このため、仮に分割したキーデータのうちの幾つかが「配慮しない(don’t care)」として扱われた場合であっても、少なくとも一つの分割したキーデータによってエントリアドレスを読み出すことができれば、このエントリアドレスに対応したキーデータと、検索対象データとしてのキーデータが一致するかどうかを確認することが可能となる。従って、このように、衝突が生じているときには無理にエントリアドレスを読み出さずに、配慮しないものとして扱い、敢えてそのまま処理を続行することで、読出処理を高速化させることができる。
 ただし、データの読出処理を行うにあたり、エントリアドレスの衝突が存在すると、理論的には、データ検索の精度が低下すると考えられる。このため、続いては、エントリアドレスの衝突が生じている場合であっても、正確にデータ検索を行うことのできる可能性を高める手法の例について説明する。
 衝突対策の第1の例として、半導体装置は、確認メモリマット104を備えることが好ましい。この確認メモリマット104は、各エントリアドレスと各キーデータを対応付けて記憶している。
 また、この場合に、制御回路105は、確認部1056を有することが好ましい。この確認部1056は、読出部1055が読み出したエントリアドレスに対応するキーデータを、確認メモリマットから読み出し、当該キーデータが、入力部に入力された検索対象データとしてのキーデータと一致するか否かを確認する。
 上記構成のように、本発明の半導体装置は、確認メモリマット104を構築する記憶領域を持ち、そこにエントリアドレスとキーデータの対応関係を記憶しておくことができる。例えば、半導体装置は、新規なキーデータが入力されてきたときに、その新規なキーデータにエントリアドレスを割り当てて、その新規なキーデータとエントリアドレスの対応関係を、確認メモリマット104に記憶しておけばよい。このようにすることで、上述した読出処理によってエントリアドレスを読み出したときに、確認メモリマット104を参照すれば、そのエントリアドレスが、検索対象データとして入力されたキーデータに対応するものであるかどうかを確認することができる。特に、検索メモリマット102にエントリアドレスの衝突が発生しており、読出部により「配慮しない(don’t care)」処理が行われた場合には、確認メモリマット102を利用して、読み出したエントリアドレスが適切なものであるかを確認することは有効である。このようにして、本発明によれば、エントリアドレスの衝突が生じている場合であっても、正確にデータ検索を行うことのできる可能性を高めることができる。
 衝突対策の第2の例として、半導体装置は、さらに、符号化回路106を備えるものであることが好ましい。この符号化回路106は、制御回路105の入力部1051の前段に配置される回路である。すなわち、符号化回路106は、キーデータを予め定められた処理により符号化し、当該符号化したキーデータを制御回路の入力部へと出力する。
 本発明の半導体装置は、分割したキーデータに対応するエントリアドレスを、検索メモリマット102の分割メモリ102a、102b…に書き込むものであり、分割メモリの同一のアドレスに複数のエントリアドレスが書き込まれるときには、衝突情報を登録することとしている。ここで、メモリに書き込むために入力されたキーデータに偏りがあると、データの衝突頻度が高くなり、検索不能データ列が多くなるという問題が発生する。すなわち、データの偏りは、例えばID番号を降順で登録する場合のように、ほとんど同じデータを続けて複数登録するような場合に発生する。ほとんど同じ内容のデータが続けて登録されると、検索メモリマット102内に均一に分散さずに、検索メモリマット102のほとんど同じアドレスに集中して偏って登録される。そうすると、検索メモリマット102内において、エントリアドレスの衝突が発生する可能性が高くなる。そこで、上記した構成のように、制御回路105の入力部1051にキーデータを入力する前に、符号化回路106によって、当該キーデータを符号化する。ここにいう符号化には、キーデータ(バイナリデータ)を所定のアルゴリズムで分散させることや、キーデータ(バイナリデータ)の順番を並び替えるような処理が含まれる。このように、ほとんど同じキーデータが続けて入力された場合であっても、これらのキーデータを符号化することにより、これらのデータの偏りを解消することが可能となる。データの偏りが解消すれば、検索メモリマット102内で衝突が発生する可能性を低下させることができる。その結果、正確にデータ検索を行うことのできる可能性が高まる。
 衝突対策の第3の例として、制御回路105の読出部1055がアクセスした全ての分割メモリに、衝突を表す情報が書き込まれていた場合について説明する。分割メモリの全てに衝突が生じている可能性は極めて低いものであるが、理論的には発生し得る。
 そこで、読出部1055は、分割部が分割したキーデータのそれぞれをアドレスとして分割メモリにアクセスしたときに、全ての分割メモリに衝突を表す情報が書き込まれていた場合には、当該全ての分割メモリに既に書き込まれているエントリアドレスを読み出すことが好ましい。
 また、このような場合において、確認部1056は、読出部が読み出したエントリアドレスで確認メモリマットを順次参照し、検索対象データとしてのキーデータと一致するキーアドレスを当該確認メモリマットから抽出したうえで、当該抽出したキーデータに対応するエンドリアドレスを出力することが好ましい。
 上記のように、検索メモリマット102からの出力が全て検索無視状態であっても、本発明は、検索にヒットした全てのアドレスから、すでに書き込まれているエントリアドレスを読み出し、各エントリアドレスで確認メモリマットを順次参照する。これにより、検索メモリマット102からの出力が全て検索無視状態であっても、データ検索で正解を導き出すことのできる可能性がある。その結果、正確にデータ検索を行うことのできる可能性が高まる。
 本発明の第2の側面は、半導体装置に対するエントリアドレスの書き込み/読み出し方法に関する。まず、半導体装置にエントリアドレスを書き込む方法について説明する。
 本発明に係る方法は、半導体装置に対し、キーデータに対応するエントリアドレスを書き込む方法に関する。この半導体装置は、y軸方向にエントリアドレスを登録する場所が割り当てられ、x軸方向にキーデータが割り当てられる構成を持つ検索メモリマット102と、この検索メモリマット102に接続された制御回路105を備えている。
 検索メモリマット102は、キーデータが割り当てられる領域をx軸方向に沿って複数に分割することにより、複数の分割メモリ102a、102b…が形成されている。
 ここで、本発明の方法は、まず、半導体装置の制御回路105にキーデータが入力される。その後、制御回路が、入力されたキーデータを、複数に分割する。そして、制御回路が、分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして分割メモリに割り当て、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリに書き込む。
 続いて、上述した書込処理によって半導体装置に書き込んだエントリアドレスを読み出す方法について説明する。
 この読出処理では、まず、制御回路に検索対象データとしてのキーデータが入力される。その後、制御回路が、入力された検索対象データとしてのキーデータを、複数に分割する。そして、制御回路が、分割したキーデータのそれぞれをアドレスとして分割メモリにアクセスし、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリから読み出す。
 上記工程に従って、半導体装置に対してエントリアドレスの書き込み/読み出しを行うことで、データ検索を高速で行うことができるとともに、データ検索時における消費電力を抑えることができる。
 本発明によれば、データの検索処理を低消費電力で高速に行うことができる。
 また、本発明によれば、ハードウエア的な動的再構築が可能な自動スイッチを実現できる。また、本発明では、基本入力情報群をバースト転送で入力すれば、基本的には、検索処理を行うにあたりマイクロコードのみがあれば十分であり、プログラムが不要となる。もちろん同じ方法で画像圧縮や暗号化も可能である。
 また、通常の画像処理やあいまい処理では、膨大なデータベースの中で処理することから、ステップ数の多いプログラムが必要となる。これに対し、本発明よれば、基本的に、プログラムのステップ数を少なくすることができ、プログラムの簡素化を図ることができる。
 さらに、本発明によれば、入力データ(検索データ)の偏りを解消して、データの衝突頻度を低減することができる。また、本発明では、仮にデータの衝突が発生した場合でも対応可能な半導体装置を実現できる。
 さらに、本発明によれば、検索時に入力される検索データに全列衝突の状態が発生しても検索結果を出力可能とする半導体装置を実現できる。
 さらに、本発明によれば、検索用メモリマットの分割数を増加することにより衝突頻度の低減を可能とする半導体装置を実現できる。
本発明の一実施形態に係る半導体装置の主たる構成を示す機能ブロック図である。 本発明の一実施形態に係る書き込み方法のメインフローを示すフロー図である。 本発明の一実施形態に係る書き込み方法のサブフローを示すフロー図である。 本発明の一実施形態に係る読み出し方法のメインフローを示すフロー図である。 本発明の一実施形態に係る読み出し方法のサブフローを示すフロー図である。 本発明の一実施例を示す半導体メモリ回路構成を示す図である。 本発明の一実施例を示すSRAM-CAMのスイッチまたは検索の動作を示す図である。 本発明の一実施例を示すSRAM-CAMの書き込み動作を示す図である。 本発明の一実施例を示すSRAM-CAMの検索動作を示す図である。 本発明の一実施例を示すSRAM-CAMのエントリ数分だけキーデータを書き込んだ時の検索時NG発生数を示す図である。 本発明の他の実施例を示す半導体メモリ回路構成を示す図であり、256のエントリ数で適応した例を示す構成図である。 図11において、エントリ幅(エントリ数)が256であってもキーデータ長が32ビットで誤動作が無くなる確率を示す図である。 エントリアドレスのデータが同じである時、未書き込み領域が増え、書き込み数を増やすことができる構成を示す図である。 本発明の更に他の実施例を示す拡張機能を示す構成図である。 図14における書き込み動作を示す図である。 図14における検索動作を示す図である。 キーワード検索の基本となるマスク操作を示す図である。 マルチヒット機能の実現例を示す構成図である。 一般的なCAMのマルチヒットとの違いを示す図である。 一般的なCAMのマルチヒットを可能とする構成を示す図である。 マルチヒットのクロックタイミングを示すタイミング図である。 検索メモリマットにLUT制御回路が付加された状態を示す構成図である。 四則演算およびシフトの元になる加算器の一例を示す構成図である。 256エントリ×32キーのCAMアレイの単位部分の構成図である。 スイッチまたは検索を示す構成図である。 ダイナミックリコンフィギュレーションメモリの一例を示す構成図である。 演算のクロック低減の一例を示す構成図である。 エントリ数が256より大きい場合の考え方を示した概念図である。 本発明の第4の実施例を示す半導体メモリ回路構成を示す図である。 符号化ビットとデータの散乱度合いを説明する図である。 本発明の第4の実施例を示すSRAM-CAMの符号化回路が出力する元情報と符号化ビットを示す図である。 本発明の第4の実施例を示すSRAM-CAMの符号化回路が出力する他の元情報と符号化ビットを示す図である。 本発明の第4の実施例を示すSRAM-CAMの符号化回路の構成図である。 本発明の第4の実施例を示すSRAM-CAMの符号化回路の他の構成図である。 本発明の第4の実施例を示すSRAM-CAMのスイッチまたは検索の動作を示す図である。 本発明の第4の実施例を示すSRAM-CAMの書き込み動作を示す図である。 本発明の第4の実施例を示すSRAM-CAMの検索動作を示す図である。 本発明の第4の実施例を示すSRAM-CAMの符号化回路が出力する元情報と符号化ビットを示す図である。 SRAM-CAMに入力する元情報であるキーデータと4ビットずつグループ分けしグループの配列変更を行った後のキーデータと8ビット単位で符号化した後の3種類のデータの変化を示す図である。 キーデータ及びキーデータに対し配列変更・符号化処理を実行したときの検索メモリマットの内容及び読出し結果を示す図である。 キーデータに対し配列変更・符号化処理を2回実行したときの検索メモリマットの内容及び読出し結果を示す図である。 本発明の第5の実施例を示すSRAM-CAMの書き込み動作を示す図である。 本発明の第5の実施例を示すSRAM-CAMの検索動作を示す図である。 本発明の第4の実施例を示すSRAM-CAMの書き込み動作を示す図である。 本発明の第4の実施例を示すSRAM-CAMの検索動作を示す図である。
 以下、図面を用いて本発明を実施するための形態について説明する。本発明は、以下に説明する形態に限定されるものではなく、以下の形態から当業者が自明な範囲で適宜修正したものも含む。
 なお、本明細書において、「書き込み/読み出し」との用語は、「書き込み及び読み出しの両方又はいずれか一方」を意味する用語として用いる。
 本発明は、半導体装置、及び半導体装置に対するエントリアドレスの書き込み/読み出し方法に関する。本発明の基本的な考え方の要素は以下のとおりである。
(1)半導体装置の制御回路は、検索対象となるデータ、すなわち、キーデータを複数に分割(n分割)し、その分割したキーデータをアドレスにして、メモリ回路(検索メモリマット)にアクセスする。
(2)制御回路は、アクセスしたメモリ回路のアドレスに、分割したキーデータに対応するエントリアドレスを登録する。
(3)このエントリアドレスの登録処理は、キーデータの分割数(n)に対応したメモリ回路の全てに対して行われる。
(4)このエントリアドレスの登録の後で、制御回路に検索対象データとしてのキーデータが入力されると、制御回路は、入力されたキーデータを複数に分割(n分割)する。そして、制御回路は、分割したキーデータをアドレスとしてメモリ回路にアクセスし、メモリ回路に登録されているエントリアドレスを出力する。
 なお、望ましくは、
(5)制御回路は、出力したエントリアドレスが全て一致したときに、それを求めるエントリアドレスとして採用する。他方、制御回路は、出力したエントリアドレスに不一致があれば、検索対象データと一致するデータは登録されていないと判定する。
 以上は、本発明における基本的な考え方である。なお、本発明を、実際に機能を実現できる製品に実装する場合には、様々な解決すべき問題も残っているが、それらの問題を解
決する方法については、後述の実施例において詳しく説明する。
 まず、図1~図5を参照して、本発明の概要について説明する。
 図1は、本発明に係る半導体装置の主たる機能構成を示した機能ブロック図である。
 図1に示されるように、本発明の半導体装置は、検索メモリマット102と制御回路105とを備える。また、図1に示されるように、本発明の半導体装置は、さらに、確認メモリマット104と符号化回路106とを備えることが好ましい。制御回路105は、検索メモリマット102、確認メモリマット104、及び符号化回路106のそれぞれと接続されており、半導体装置における情報処理を総合的に制御する機能を担っている。
 図1に示された検索メモリマット102は、y軸方向にエントリアドレスが登録される場所が割り当てられ、x軸方向にキーデータが割り当てられる構成を持つ。ここにいう「y軸方向」とは、行列からなるアレイにおける列方向(縦方向)と行方向(横方向)のいずれか一方の方向を意味し、「x軸方向」とは、列方向(縦方向)と行方向(横方向)のいずれか他方の方向を意味している。つまり、検索メモリマット102では、一つのエントリアドレスに対して、一つのキーデータが対応付けて記憶される。このように、検索メモリマット102は、y軸方向に複数のエントリアドレスを登録する場所が割り当てられて、各エントリアドレスに対してx軸方向に一つのキーデータ割り当てることのできる構成を基本としている。
 また、本発明の半導体装置によって実現可能なCAM(連想メモリ)は、一般的に、検索メモリマットに登録されている複数のキーデータの中から、ユーザによって指定されたキーデータを検索して探し出し、このキーデータが発見された場所のエントリアドレスをユーザに提供するという機能を持つものである。つまり、「キーデータ」とは、検索メモリマット内に登録される所望の情報を意味する。また、「エントリアドレス」とは、キーデータが登録されている検索メモリマット内の場所(アドレス)を示すメタ情報を意味している。
 また、例えば後述する図8等に示されるように、検索メモリマット102のy軸方向に割り当てられた「エントリアドレスを登録する場所」には、それぞれ、その場所を特定するための番地データが与えられる。例えば、図8に示された例において、「エントリアドレスを登録する場所」は、y軸方向に4つずつ存在している。それぞれの「エントリアドレスを登録する場所」の番地は、例えば2ビットのデータによって特定されている。例えば、4つの「エントリアドレスを登録する場所」には、それぞれ、“00”、“01”、“10”、及び“11”の番地データが与えられている。この番地データとは、検索メモリ102のメモリ空間における「エントリアドレスを登録する場所」の番地を特定するためのデータである。なお、「エントリアドレスを登録する場所」は、8つ以上存在していてもよい。この「エントリアドレスを登録する場所」を特定するための番地データは、3ビット以上のデータであってもよい。例えば、この「エントリアドレスを登録する場所」を特定するための番地データは、2ビット~6ビット又は3ビット~5ビットのデータであってもよい。
 また、本発明の半導体装置において、キーデータは、所望のビット数のものを書き込んだり読み出したりすることができる。また、エントリアドレスについては、例えば2ビット以上で定義することが好ましい。例えば、エントリアドレスは、2ビット~6ビットとすることができ、3ビット~5ビットであってもよい。
 また、図1に示されるように、検索メモリマット102は、複数の分割メモリ102a、102b、102c…によって構築されている。複数の分割メモリは、検索メモリマット102の記憶空間のうち、キーデータが割り当てられるx軸方向の領域を、y軸方向沿って複数に分割するものである。つまり、検索メモリマット102を複数の分割メモリ102a、102b、102c…に分割して構築することで、キーデータが割り当てられる領域が複数に分割される。各分割メモリは、SRAMなどの記憶装置を用いて構成することができる。この意味において、本発明は、複数のSRAMを利用して実現したCAMであるということができる。本願明細書では、SRAMを用いて実現したCAMを、SRAM-CAMと称している。例えば、後述するが、キーデータが割り当てられる領域が複数に分割された検索メモリマット102は、図8に示されるような構成となる。
 このようにして、検索メモリマット102のキーデータが割り当てられるx軸方向の領域を複数に分割することで、検索メモリマット102の記憶空間は、y軸方向とx軸方向のそれぞれが複数に分割される。このように、y軸とx軸で特定される区画された記憶空間(セル)を、本願明細書では、検索メモリマット102の場所やアドレスと表現している。
 例えば、検索メモリマット102の総エントリ数を、仮に、4096エントリと定めた場合、4096エントリを識別できるアドレスのサイズは、12ビットになる。また、検索メモリ102に入力されるキーデータの大きさが144ビットであるとすると、これを前記の12ビットで割ると12となる。すなわち、このような場合に、分割メモリの数は、少なくとも12以上必要となる。
 このような条件を考慮すると、最低限必要となる検索メモリマット102の分割数Nは、以下の式により求めることができる。
 (式)N=L/log・M
     L:キーデータ長
     M:総エントリ数
     N:検索メモリマットの分割数(分割メモリの最小個数)
 他方、図1に示されるように、制御回路105は、基本的に、入力部1051、分割部1052、書込部1053、読出部1055、及び出力部1057を有している。また、制御回路105は、さらに、衝突情報記憶部1054と確認部1056とを有していることが好ましい。これらの要素1051~1056は、制御回路105の機能を概念的に分類して示したものである。すなわち、制御回路105は、これらの要素1051~1056を利用して、検索メモリマット102に対しエントリアドレスを書き込んだり、検索メモリマット102に登録されているエントリアドレスを読み出したりする処理を行う。
 以下では、制御回路105により実行される基本的な処理について、図2~図5のフロー図を参照しながら説明する。
 まず、制御回路105により行われるエントリアドレスの書込処理を説明する。
 ここで、図2及び図3は、制御回路105が行う書込処理を示すフロー図である。ここでの書込処理とは、新しいキーデータ(入力データ)を記憶するにあたり、その新しいキーデータに対応したエントリアドレスを検索メモリマットに書き込む処理である。
 図2に示されるように、書込処理においては、まず、検索メモリマット内に新たに登録するためのキーデータ(入力データ)が、半導体装置に入力される(ステップS1)。ここで、入力データとしてのキーデータは、図1に示されるように、制御回路105の入力部1051に直接入力されることとしてもよいし、符号化回路106を経由して制御回路105の入力部1051に入力されるものであってもよい。
 ここで、キーデータが符号化回路106に入力された場合には、符号化回路106によってキーデータの符号化処理が行われる(ステップS2)。なお、ここで行われる符号化処理については、後の[実施例4]において詳しく説明する。
 他方、入力データとしてのキーデータが制御回路105の入力部1051に直接入力された場合、この入力部1051は、キーデータを分割部1052へと送出する。つまり、入力部1051は、制御回路105における入力インターフェースである。
 続いて、分割部1052は、入力データとしてのキーデータを複数に分割する(ステップS3)。つまり、分割部1052は、入力されたキーデータのバイナリデータ(コンピュータが扱うことのできる2進形式データ)を複数に分割する。例えば、分割部1052は、検索メモリマット102を構築する分割メモリ102a、102b、102c…の数と等しい数にキーデータを分割することが好ましい。要するに、分割部1052がキーデータを分割する分割数nは、検索メモリマット102を構築する分割メモリの数Nであることが好ましい。これにより、分割部1052によって複数に分割したキーデータ(「分割キーデータ」ともいう)の全てを、それぞれ順番に、複数の分割メモリに対して登録していくことができる。
 また、分割部1052は、キーデータのバイナリデータを分割するにあたり、このバイナリデータを所定ビットずつに分けることが好ましい。例えば、キーデータとして“2699”が入力された場合に、このキーデータ“2699”をバイナリで表すと“101010001011”となる。例えば、分割部1052は、このキーデータを、“10”“10”“10”“00”“10”“11”のように、2ビットずつに分割することとしてもよい。また、分割部1052は、キーデータを、3ビットずつに分割することとしてもよいし、4ビットずつに分割することもできる。例えば、分割するビット数は、2~10ビットずつとすればよい。
 さらに具体的に説明すると、分割部1052が分割したキーデータのビット数(α)は、検索メモリマット102のy軸方向に割り当てられる「エントリアドレスを登録する場所」を特定するための番地データのビット数(β)と等しいことが好ましい(α=β)。例えば、検索メモリマット102内の「エントリアドレスを登録する場所」を特定するための番地データが2ビットで表されている場合には、分割部1052は、入力されたキーデータを2ビットずつ複数に分割することが好ましい。同様に、検索メモリマット102に割り当てられるエントリアドレスを登録する場所が3ビットの番地データで特定される場合には、分割部1052は、入力されたキーデータを3ビットずつ複数に分割することが好ましい。これにより、後の処理において、分割部1052が分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして、検索メモリマット102を構築する分割メモリに適切に割り当てることができる。
 図1に示されるように、書込処理においては、分割部1052は、上記のようにして分割したキーデータを書込部1053へと送出する。
 次に、書込部1053は、分割部1052から受け取ったキーデータに対して、固有のエントリアドレスを割り当てて、確認メモリマット104に書き込む処理を行う(ステップS4)。すなわち、このステップS4では、新規のキーデータを新しく検索メモリマット102に登録するに際し、この新規のキーデータに対して一つのエントリアドレスを割り当てて、新規のキーデータとエントリアドレスの対応関係を、確認メモリマット104に記憶しておく。確認メモリマット104のデータ構造の例は、図8の右下に示されている。このように、確認メモリマット104は、キーデータとエントリアドレスの対応関係を記憶しておくためのデータベースとしても機能させることができる。また、確認メモリマット104は、後述するとおり、読出処理を行う際に、制御回路が読み出したエントリアドレスが正しいものであるか否かの最終確認を行う際にも利用される。なお、確認メモリマット104は、SRAM等の記憶装置によって構成すればよい。
 その後、書込部1053は、分割部1052によって分割された複数の分割キーデータを、それぞれ、検索メモリマット102の分割メモリ102a、102b、102c…に書き込む処理を行う(ステップS5)。このステップS5において行われる処理は、図3においてより詳しく説明されている。
 図3のフロー図は、キーデータ(KD)のバイナリデータをn個の分割キーデータに分割し、この分割キーデータの順序をk番目と定義した場合を示している。
 すなわち、図3に示されるように、まず、“k”に“1”が代入されて、n個の分割キーデータのうち1番目(最初)の分割キーデータの処理が開始される(ステップS5A)。
 次に、書込部1053は、1番目(k番目)の分割キーデータのエントリアドレスを、検索メモリマット102に割り付ける(ステップS5B)。具体的に、書込部1053は、検索メモリマット102のy軸に割り当てられた「エントリアドレス(EA)を登録する場所」を特定するための番地データを参照しながら、1番目(k番目)の分割キーデータを表すバイナリデータをアドレスとして検索メモリマット102にアクセスし、ここでアクセスした検索メモリマット102の場所(アドレス)に対し、この分割キーデータに対応付けられたエントリアドレス(EA)を割り付ける。ここでの処理は、後に、図8等を参照してより詳しく説明する。
 要するに、書込部1053は、検索メモリマット102の適切な場所(アドレス)に、1番目(k番目)の分割キーデータに対応付けられたエントリアドレス(EA)を割り付けていく。この検索メモリマット102の適切な場所(アドレス)は、現在処理されている分割キーデータの順序(k番目)と、分割キーデータのバイナリデータによって特定することができる。つまり、まず、分割キーデータの順序(k番目)を参照して、この分割キーデータのエントリアドレスを書き込む検索メモリマット102のx軸方向の領域を特定する。例えば、1番目の分割キーデータのエントリアドレスは、検索メモリマット102を構築する複数の分割メモリ102a、102b、103c…のうち、1番目の分割メモリ102aに書き込まれる。次に、分割キーデータのバイナリデータを参照して、この分割キーデータのエントリアドレスを書き込む検索メモリマット102のy軸方向の領域を特定する。すなわち、分割キーデータのエントリアドレスは、その分割キーデータを示すバイナリデータと、検索メモリマット102のy軸方向に割り当てられた「エントリアドレス(EA)を登録する場所」を特定するための番地データとが一致するy軸方向の領域に書き込まれる。例えば、検索メモリマット102のy軸方向に“00”“01”“10”“11”という4つの番地データが割り当てられており、分割キーデータのバイナリデータが“10”であり、さらにこの分割キーデータに対応するエントリアドレスが“00”である場合を想定する。この場合に、この分割キーデータのエントリアドレス“00”は、検索メモリマット102のうち、“10”の番地データが割り当てられたy軸方向の領域(エントリアドレス(EA)を登録する場所)に書き込まれる。このようにして、現在処理されている分割キーデータの順序(k番目)と、分割キーデータのバイナリデータとに基づいて、この分割キーデータのエントリアドレスを割り付ける検索メモリマット102の適切な場所(アドレス)を求めることができる。
 続いて、書込部1053は、1番目(k番目)の分割キーデータのエントリアドレス(EA)を割り付けた場所(アドレス)に、他のエントリアドレスが既に書き込まれており、エントリアドレスの衝突が発生するか否かを確認する(ステップS5C)。例えば、現在書込処理をしているキーデータの前に、別のキーデータが既に検索メモリマット102に書き込まれている場合には、エントリアドレスの衝突が発生し得る。
 まず、ステップS5Cにおいて、書込部1053がエントリアドレスの衝突が発生していないと判断した場合、書込部1053は、そのまま1番目(k番目)の分割キーデータに対応するエントリアドレスを、検索メモリマット102の適切な場所(アドレス)に書き込む(ステップS5D)。
 他方、ステップS5Cにおいて、書込部1053がエントリアドレスの衝突が発生していると判断した場合は、衝突情報記憶部1054が、当該衝突の発生している検索メモリマット102の場所(アドレス)に、衝突を表す情報を書き込む(ステップS5E)。例えば、衝突情報記憶部1054は、衝突の発生している場所(アドレス)に、フラグビットなどを追加して、衝突が起こったことを記録すればよい。
 上記ステップS5D又はステップS5Eのいずれかの処理が終了した後、書込部1053は、“k”に“1”を加えて、この“k+1”の値を“k”に代入する(ステップS5F)。そして、書込部1053は、ステップS5Gを経て得られた“k”の値が“n(キーデータの分割数)”と等しくなったか否かを確認する(ステップS5G)。kがn未満(k<n)である場合、書込部1053は、ステップS5Bに戻る。例えば、1番目(k番目)の分割キーデータの処理が完了した後には、2番目(k+1番目)の分割キーデータの処理を続けて行う。他方、kがnと等しくなった(k=n)場合、書込部1053は、図3に示されたサブフローを終了し、図2に示されたメインフローへと戻る。
 上記の各ステップ(S1~S5)により、書込部1053は、複数の分割キーデータの全てについて、対応するエントリアドレスを、検索メモリマット102の適切な場所(アドレス)に書き込んでいく。全ての分割キーデータのエントリアドレスを書き終えると、書込部1053は、書込処理を終了させる。
 続いて、制御回路105により行われるエントリアドレスの読出処理を説明する。
 ここで、図4及び図5は、制御回路105が行う読出処理を示すフロー図である。ここでの読込処理とは、検索対象であるキーデータ(検索データ)と一致するデータが、すでに検索メモリマット102内に書き込まれている場合に、そのキーデータに対応したエントリアドレスを読み出す処理である。
 図4に示されるように、読出処理においては、まず、検索メモリマット102内を検索する対象となるキーデータ(検索データ)が、半導体装置に入力される(ステップS6)。ここで、検索データとしてのキーデータは、図1に示されるように、制御回路105の入力部1051に直接入力されることとしてもよいし、符号化回路106を経由して制御回路105の入力部1051に入力されるものであってもよい。
 ここで、検索データとしてのキーデータが符号化回路106に入力された場合には、符号化回路106によって、このキーデータの符号化処理が行われる(ステップS7)。なお、ここで行われる符号化処理については、後の[実施例4]において詳しく説明する。
 他方、検索データとしてのキーデータが制御回路105の入力部1051に直接入力された場合、この入力部1051は、キーデータを分割部1052へと送出する。
 続いて、分割部1052は、検索データとしてのキーデータを複数に分割する(ステップS8)。ここで、読出処理で分割部1052が行う分割処理(ステップS8)は、前述した書込処理で分割部1052が行う分割処理(ステップS3)と同じアルゴリズムで行われる。このように、ステップS8での処理は、ステップS3での処理と同じであるため、説明を省略する。
 図1に示されるように、読出処理においては、分割部1052は、分割したキーデータを読出部1055へと送出する。
 その後、読出部1055は、分割部1052によって分割された複数の分割キーデータに基づいて、検索メモリマット102の分割メモリ102a、102b、102c…アクセスし、複数の分割キーデータのそれぞれに対応するエントリアドレスを読み出す処理を行う(ステップS9)。このステップS9において行われる処理は、図5においてより詳しく説明されている。
 図5のフロー図は、キーデータ(KD)のバイナリデータをn個の分割キーデータに分割し、この分割キーデータの順序をk番目と定義した場合を示している。
 すなわち、図3に示されるように、まず、“k”に“1”が代入されて、n個の分割キーデータのうち1番目(最初)の分割キーデータの処理が開始される(ステップS9A)。
 次に、読出部1055は、1番目(k番目)の分割キーデータに基づいて、検索メモリマット102内を検索する(ステップS9B)。具体的に、読出部1055は、検索メモリマット102のy軸に割り当てられた「エントリアドレス(EA)を登録する場所」を特定するための番地データを参照しながら、1番目(k番目)の分割キーデータを表すバイナリデータをアドレスとして検索メモリマット102にアクセスし、ここでアクセスした検索メモリマット102のアドレス内に書き込まれている情報を抽出する。ここでの処理は、後に、図8等を参照してより詳しく説明する。
 要するに、ステップS9Bにおいて、読出部1055は、書込部1053がステップS5Bで行った方法を同じ方法で、検索メモリマット102の適切な場所(アドレス)にアクセスする。つまり、この検索メモリマット102の適切な場所(アドレス)は、現在処理されている分割キーデータの順序(k番目)と、分割キーデータのバイナリデータによって特定することができる。検索メモリマット102の適切な場所を特定する方法は、ステップS5Bにおいて説明したため、ここでの説明は省略する。
 続いて、読出部1055は、1番目(k番目)の分割キーデータに基づいてアクセスしたアドレスに、衝突を表す情報(衝突フラグ)が書き込まれているか否かを確認する(ステップS9C)。ここにいう「衝突を表す情報」は、上述したステップS5Fにおいて、衝突情報記憶部1054により書き込まれた情報である。
 ここで、ステップS9Cにおいて、エントリアドレスの衝突が発生している判断した場合に、読出部1055は、1番目(k番目)の分割キーデータを検索対象として「配慮しない(don’t care)」ものとして扱う(ステップS9D)。すなわち、「配慮しない(don’t care)ものとして扱われた分割キーデータについては、それに対応するエントリアドレスを読み出さずに、処理を終了させる(ステップS9Gへ)。このように、読出処理においてアクセスしたアドレスに、エントリアドレスの衝突が生じている場合には、そのエントリアドレスを「配慮しない(don’t care)」という概念を導入することで、高速且つ低消費電力で、効率的にデータ検索を行うことが可能となる。
 他方、ステップS9Cにおいて、エントリアドレスの衝突が発生していないと判断した場合、読出部1055は、アクセスした検索メモリマット102の場所(アドレス)に書き込まれている一つのエントリアドレスを読み出す(ステップ9E)。すなわち、ここで読出部1055が読み出すエントリアドレスは、検索対象として入力されたキーデータ(検索データ)に対応するエントリアドレスである可能性がある。ただし、一つの分割キーデータに対応するエントリアドレスを読み出すことができても、このエントリアドレスが、検索対象としてのキーデータ(検索データ)に対応するエントリアドレスであるとは言い切れないため、引き続き、各分割データに対応するエントリアドレスの読出処理をおこなっていく。
 次に、読出部1055は、ステップS9Cで読み出したエントリアドレスが、他の分割データに基づいて以前に読み出したエントリアドレスと不一致であるかどうかを確認する(ステップS9F)。なお、最初は、1番目の分割キーデータについての処理を行っており、以前に読み出したエントリアドレスが存在しないため、ステップS9Fを通過して、ステップS9Gへと移行する。
 上記ステップS9D又はステップS5Fのいずれかの処理が終了した後、読出部1055は、“k”に“1”を加えて、この“k+1”の値を“k”に代入する(ステップS9G)。そして、読出部1055は、ステップS9Gを経て得られた“k”の値が“n(キーデータの分割数)”と等しくなったか否かを確認する(ステップS9H)。kがn未満(k<n)である場合、読出部1055は、ステップS5Bに戻る。例えば、1番目(k番目)の分割キーデータに基づいた読出処理が完了した後には、2番目(k+1番目)の分割キーデータに基づいた読出処理を続けて行う。他方、kがnと等しくなった(k=n)場合、読出部1055は、図5に示されたサブフローを終了し、図4に示されたメインフローへと戻る。
 その後、1番目(k番目)の分割キーデータに続いて、2番目(k+1番目)の分割キーデータに基づく読出処理を行う。ここで、例えば、ステップ9Fにおいて、2番目の分割キーデータに基づいて読み出したエントリアドレスが、1番目の分割データに基づいて以前に読み出したエントリアドレスと不一致であったと判断されたとする(ステップ9F)。例えば、2番目の分割キーデータに基づいて読み出したエントリアドレスが“00”であったのに対し、1番目の分割データに基づいて以前に読み出したエントリアドレスが“01”である可能性もある。この場合には、読出部1055は、検索対象として入力されたキーデータは、検索メモリマット102内に登録されておらず、「一致データ無し」と判定する(ステップS9I)。そして、読出部1055は、図4で示したメインフローへとは戻らずに、ここで読出処理全体を終了させる。このように、本発明では、例えば、2番目の分割キーデータを処理した段階で「一致データ無し」と判定することができるため、3番目以降の分割キーデータの読出処理を実行しなくとも、早期に結果を出すことができる。これにより、検索処理の高速化を図ることができる。
 図4に示されるように、エントリアドレスの読出処理(ステップS9)を終えると、制御回路105による処理は、ステップS10へと進む。ステップS10においては、制御回路105の確認部1056が、読出部1055の読み出したエントリアドレスに基づいて、確認メモリマット104を参照する。確認メモリマット104には、ステップS4で説明したとおり、エントリアドレスとキーデータが正しい組み合わせで対応付けて記憶されている。つまり、ここで、確認部1056は、読出部1055の読み出したエントリアドレスに基づいて、このエントリアドレスに対応付けられているキーデータを確認メモリマット104から読み出す。そして、確認部1056は、確認メモリマット104から読み出したキーデータが、検索対象として入力されたキーデータのエントリアドレスと一致するかどうかを確認する。このように、読出部1055が読み出したエントリアドレスに基づいて確認用104を参照することで、このエントリアドレスが、本当に、検索対象として入力されたキーデータのエントリアドレスと一致するものであるか否かを確認することができる。
 例えば、複数に分割されたキーデータに基づいて複数のエントリアドレスを読み出したときに、すべてのエントリアドレスが同じ値であれば、そのエントリアドレスは正しいものであることがわかる。しかし、本発明では、上述したとおり、複数のエントリアドレスが同じ場所(アドレス)に登録されて“衝突”が発生したときに、「配慮しない(don’t care)」という概念を導入している。そうすると、複数に分割されたキーデータに基づいて複数のエントリアドレスを読み出したときに、そのうちの幾つかは同じ値を示すものの、その他のものは「配慮しない(don’t care)」という結果が得られることもある。このため、確率論的には、読み出したエントリアドレスにエラーが発生する場合もある。そこで、このような不確実性を排除するために、本発明では、確認メモリマット104を参照することとしている。
 ステップS10において、確認メモリマット104を参照した結果、読出部1055が読み出したエントリアドレスに誤りがないと判断した場合、確認部1056は、このエントリアドレスを、出力部1057へと送出する。そして、出力部1057は、確認部1056から受け取った一つのエントリアドレスを、検索結果として、制御回路105の外部へと出力する(ステップS10)。つまり、出力部1057は、制御回路105における出力インターフェースである。
 上記の各ステップ(S6~S10)により、制御回路105は、ユーザからの検索要求に応じて、検索メモリマット102に登録されているデータの検索を行い、検索データとして入力されたキーデータに対応する一つのエントリアドレスを出力する。
 上記のように、本発明に係る半導体装置は、図1に示された基本構成を有する。この半導体装置は、基本的に、図2~図5に示した書き込み処理/読み出し処理を行う。これらの処理は、本発明の基本概念を示すものである。本発明におけるより具体的な処理は、下記[実施例1]~[実施例6]においてより詳しく説明する。
 本発明は、上述のように、従来の回路構成、特にメモリ回路をベースとしながら、まったく新しい論理的方式論を提供するものである。すなわち、本発明は、キーデータとそのエントリアドレスの構成を巧みに利用したプログラムレスのアーキテクチャに関する。別の言い方をすれば、本発明は、脳型のアーキテクチャに関するものである。
 本発明においては、まず、メモリ回路のメモリ空間を複数のクラスタに分割するとともに、このクラスタに書き込むデータも同様にして分割する。また、本発明では、分割したデータ自体を、クラスタにアクセスするためのアドレスとして捉える。さらに、このアドレスをメモリ空間のy軸に割り当て、クラスタに入力するデータをメモリ空間のx軸に割り当てる。そして、本発明では、x方向のメモリ空間を独立に書き込み/読み出しができる複数のメモリに分割し、分割された複数のメモリに、分割したクラスタの入力を割り当てることとしている。
 さらに、本発明は、上記の構成により、アドレスが衝突したときに「配慮しない(don’t care)」という概念を導入することで、高速且つ低消費電力でスイッチや検索を実現することができるようになるという発想に基づいている。
 また、本発明の発明者は、分割メモリの入力と出力部に、入出力されるデータの順序を選択的に分配できるスイッチと、これらのスイッチを制御する制御回路を設けることを発想した。これにより、分割メモリをLUT(Look Up Table)として扱うことも可能となり、メモリ内のクラスタを論理回路として扱うことも可能となる。すなわち、本発明の半導体装置は、いわゆる均質回路となる。これにより、本発明の半導体装置は、必要に応じて、論理回路やメモリとしての機能を切り替えて用いることができる。また、本発明の半導体装置は、設定する必要クラスタを隣接した位置に動的に移動することも可能となり、低消費電力で高速な検索処理が可能となる。
 さらに、本発明の半導体装置は、分割メモリの入力部と出力部にスイッチ回路を設けることもできる。この場合、半導体装置の制御回路が、さらに、論理的に分割メモリを選択できるように構成される。この分割メモリは、さらに、LUT(Look Up Table)としてデータが入力されていることで論理演算が可能な構成を備えており、必要ならばこれを複数ブロック配列することを可能としている。
 また、本発明の半導体装置に対するエントリアドレス書き込み/読み出し方法は、分割キーデータで特定される分割メモリの同一のアドレスに複数のエントリアドレスが書き込まれた場合、その分割メモリのアドレスに衝突を表す情報を記憶することとしている。また、本発明の方法は、分割キーデータに基づいて読み出された情報のすべてが衝突を表す情報の場合には、読み出された衝突情報で確認メモリマットを順次参照して、一致するキーアドレスを抽出するように構成している。
 ここで、本発明の理解を容易にするために、検索メモリマット及び分割メモリについて、具体的な数値を当てはめて説明する。検索メモリマット102は、複数の分割メモリを備える。例えば、検索メモリマット102の総エントリ数を、4096エントリと定めた場合、4096エントリを識別できるアドレスのサイズは、12ビットになる。また、検索メモリマット102からエントリアドレスを検索するためのキーデータの大きさが144ビットであるとすると、これを前記の12ビットで割ると12となる。すなわち、分割メモリの数は12となる。
 検索メモリマット102に付属している制御回路105は、144ビットのキーデータが入力されると、これを12分割して、それぞれを予め対応させた各分割メモリに割り当てる。分割したキーデータのバイナリデータは、対応する分割メモリにアクセスするためのアドレスとして用いられる。そして、この分割したキーデータにより指定された検索メモリマットの場所には、キーデータに対応するエントリアドレスを書き込む。このエントリアドレスは、12分割された全ての分割メモリに書き込まれる。
 次に、書き込まれた情報を読み出す場合、制御回路105は、書き込みと同じ手順で、入力した144ビットのキーデータを12分割する。また、制御回路105は、分割されたキーデータをアドレスとして予め定めた分割メモリにアクセスする。そして、制御回路105は、指定された分割メモリに書き込まれたデータを読み出す。この読み出されたデータが、キーデータに対応するエントリアドレスである。
 ここで、入力されるキーデータの大きさを更に大きくすることもできる。例えば、キーデータの大きさ144ビットから288ビットに拡張することも可能である。この場合には、検索メモリマット102を並列的に2つ並べた構成すればよい。また、検索メモリマット102の総エントリ数を拡大することもできる。例えば、検索メモリマット102の総エントリ数を4096から8192に拡大するときには、検索メモリマット102を直列的に2つ並べて構成すればよい。なお、検索メモリマットの総エントリ数の基本単位や、並列的又は直列的に並べる検索メモリマットの個数は、上記に限定されるものではなく、要求により自由に拡大したり縮小したりすることができる。
 なお、後述するが、上記の検索メモリマットにスイッチ機能を付加することも可能である。この場合、検索メモリマットをルックアップテーブルLUT(Look Up Table)方式の論理回路として構成することもできる。さらに、拡大メモリ空間の一部として検索メモリマットの構成含むように設定することもできる。
 上記の説明は、本発明の理解を容易にするための具体例である。したがって、本発明は、上記のものに限定されるものではない。
 図1は、本発明を実現する半導体装置の例を示している。特に、図6は、SRAM-CAMによるメモリ回路構成の一例を示している。なお、本実施例では、SRAM-CAMによって構成された半導体装置のメモリ構成や基本原理について説明する。しかしながら、例えば、ロウアドレス(row address)とカラムアドレス(column address)からなるメモリアレイにアクセスを行なうメモリ空間(メモリマット)を備える半導体装置であれば、本発明の原理を実現可能である。
 図6に示されるように、本発明の一実施例に係る半導体装置は、近接キャッシュメモリマット101、制御回路105、検索メモリマット102、比較及びラッチ回路103、確認メモリマット104を備えている。また、検索メモリマット102は、複数の分割メモリ102a、102b、102c、…、102hによって構築されている。なお、近接キャッシュメモリマット101は、必要としない場合には設ける必要はない。
 まず、本発明は、インターネットのスイッチやルータでよく用いられているCAMの欠点を克服することを目的とするものである。すなわち、従来のCAMは、データの検索を行う際に、全ビットを活性するため大電力を消費するという欠点を有している。そこで、本発明は、検索時において、従来のCAMのように全ビットを活性するのではなく、y軸の指定エントリのみを活性にすることとしている。これにより、本発明によれば、従来のCAMと比較して、エントリ数分の一(1/エントリ数)の活性ビットでの検索が可能となる。すなわち、本発明は、従来のCAMと比較すると、y軸のエントリ数分の一(1/エントリ数)のアドレスのみを動作させるだけで、検索結果を出力することができる。このため、本発明では、従来のCAMが使用していた出力エンコーダが不要となり、また、大きな電力を消費するナンド回路のツリー構造が不要となる。従って、本発明によれば、低消費電力で検索処理を実行できる。
 図6に示されるように、本発明の半導体装置(SRAM-CAM)では、入力データであるキーデータ(KD)とエントリアドレス(EA)が制御回路105に入力され、所定のアルゴリズムで検索メモリマット102に書き込まれる。つまり、制御回路105は、入力されたキーデータを所定数に分割し、分割したキーデータをアドレスとして、予め定められた対応する分割メモリ102a、102b、102c、…、102hにアクセスする。そして、制御回路105は、このアクセスした分割メモリ102a、102b、102c、…、102hに、キーデータとエントリアドレスを書き込む。この制御回路105の書き込み動作は、分割メモリ102a、102b、102c、…、102hの全てに対して行なわれる。なお、本願明細書では、検索メモリマット102に新しく登録するために入力されたキーデータを、「入力データ」と称し、検索メモリマット102内を検索するために入力されたキーデータを、「検索データ」と称することもある。
 制御回路105は、検索メモリマット102のy軸にエントリアドレス(EA)を登録する場所(アドレス)を割り付け、そのx軸にキーアドレス(KD)を割り付ける。この制御回路105の動作を、CAMの基本動作に対応付けて説明すると、データ検索の際に入力されるキーデータをx軸に割り付け、エントリアドレスを登録するための場所(アドレス)をy軸に割り付けるものである。
 検索メモリマット102は、x軸方向の領域が、複数の基本セルに分割される。検索メモリマット102を分割する数は、n(nは2以上の自然数)である。各基本セルには、適切な大きさのビット数に分割されたキーデータにより指定された場所にエントリアドレス(EA)が格納される。図6の例では、nを8とした場合を示している。各基本セルに格納するエントリアドレスのビット数は分割されたキーデータのビット数により定まるが、キーデータのビット数は、任意である。
 確認メモリマット104は、y軸にエントリアドレス(EA)が割り付けられ、x軸にエントリアドレスに対応するキーデータ(KD)が割り付けられる。つまり、確認メモリマット104のx軸には、エントリアドレスに対応したキーデータが書き込まれている。
 図7は、図6で示したメモリ回路の検索動作のタイミングを、第1クロック及び第2クロックの繋がりで示している。第1のクロックでは、キーデータ(KD)を制御回路105に入力し、分割された各マットに格納されたエントリアドレス(EA)を読み出し、読み出したエントリアドレスをラッチ回路103aへラッチする動作までが実行される。続いて、第2クロックでは、ラッチ回路103aのデータを比較器103bで比較し、一致が確認されたエントリアドレスを確認メモリマット104へ入力し、確認メモリマット104を参照して一致が確認されたエントリアドレスを、CAMの出力とする動作が実行される。
 このように、図7では、本発明の実施例に係るSRAM-CAMによるスイッチ又は検索の動作が示されている。図7に示されるように、本実施例では、一度の検索動作が、2クロックのマシンサイクルで完了する。これに対して、従来のCAMは、一度の検索動作を行うにあたり、最低でも3クロックを必要とし、一般的には5から10クロックを必要とする。すなわち、従来のCAMは、全ビットを動作させるための電力供給が不可欠であるため、パイプライン的操作が必要になる。さらに、従来のCAMは、エンコーダで1クロック消費するため、最低でも3クロックが必要となる。この点、本発明のSRAM-CAMは、キーデータの入力方法を工夫することにより、図7で示したように、2クロックで検索動作を完了させることができる。つまり、本発明のSRAM-CAMでは、従来のCAMと比較して、エントリ数分の一(1/エントリ数)の電力で検索動作を実行できる。
 図8は、本発明の実施例に係るSRAM-CAMの書込動作を示している。図8では、4つのキーデータ(KD=“2699”“3779”“1859”“1440”)のエントリアドレスを、検索メモリマット102に入力した場合の例を示している。なお、図8に示した例では、4つのキーデータのエントリアドレスをすべて入力した後であっても、検索メモリマット102にはまだ空白が存在している。このため、図8の例では、エントリ数以上のキーデータを登録することができる。これは、キーデータ長がエントリ数に対して十分大きいためである。図8の例では、キーデータ長がエントリ数の2倍以上となっている。
 図8を用いて、検索メモリマット102にエントリアドレスの書き込む動作の例を説明する。図8の例では、検索メモリマット102を6つに分割している(検索メモリマットの分割数:N)。これにより、検索メモリマット102bは、6つの分割メモリ102a、102b、102c、102d、102e、102fにより構築される。また、図8の例では、検索メモリマットに書き込まれるキーデータは、12ビットで表される。このような12ビットのキーデータを、6つの分割メモリに書き込んでいく。このため、制御回路105は、入力されたキーデータを6つに分割する(キーデータの分割数:n)。従って、分割されたキーデータのビット数は、それぞれ2ビットとなる。
 また、図8に示されるように、検索メモリマット102を構成する複数の分割メモリ102a~102fのそれぞれには、そのy軸方向に、複数のエントリアドレスを登録するための場所が割り当てられている。このように、各分割メモリ102a~102fの記憶領域は、それぞれy軸方向に複数に分割されている。図8に示された例において、各分割メモリ102a~102fは、エントリアドレスを登録する場所を4つずつ有している。また、図8に示されるように、エントリアドレスを登録する場所には、それぞれ、検索メモリマット102内のメモリ空間における番地を特定するための番地データが与えられている。図8に示された例において、番地データは2ビットの情報である。例えば、番地データは、“00”“01”“10”“11”のバイナリデータで表される。図8に示されるように、エントリアドレスを登録する場所には、上から順に、“00”“01”“10”“11”の番地データを与えればよい。
 まず、入力データされたキーデータ(KD)である“2699”“3779”“1859”“1440”のそれぞれに、エントリアドレス(EA)を割り当てる。図8の例では、エントリアドレスは、それぞれ2ビットのデータである。すなわち、エントリアドレスは、“00”“01”“10”“11”である。このように、一つのキーデータには、一つのエントリアドレスが対応付けられる。キーデータとエントリアドレスの対応関係は、確認メモリマット104に記憶することとしてもよいし、他のメモリに記憶することもできる。図8の左上には、エントリアドレス(EA)とキーデータ(KD)の対応関係が示されている。
 まず、エントリアドレス“00”に書き込まれるべきデータとして入力されたキーデータは、“2699”である。このキーデータ“2699”は、バイナリで表わすと“10 10 10 00 10 11”となる。本実施例では、この6分割されたキーデータのバイナリ値を、分割された検索メモリマット102にアクセスするためのアドレスとして用いる。すなわち、制御回路105は、検索メモリマット102を構築する複数の分割メモリ102a~102fのそれぞれに、キーデータ“2699”のエントリアドレスである“00”を書き込む。このように、本発明の半導体装置では、メモリマットに書き込まれるデータが通常のCAMとは逆転した形になっている。
 図8(a)に示されるように、キーデータ“2699”は、6分割されて、“10”“10”“10”“00”“10”“11”として表わされている。制御回路105は、これらの分割キーデータをアドレスとして分割された分割メモリ102a~102fを備えた検索メモリマット102に対して、エントリアドレス“00”を書き込む。具体的に説明すると、制御回路105は、6分割された入力データ“2699”のうち、1番目の分割キーデータ“10”をアドレスとして、1番目の分割メモリ102a内の番地データ“10”で特定される場所にアクセスし、この場所に、入力データ“2699”に対応するエントリアドレス“00”を書き込む。続いて、制御回路105は、入力データ“2699”の2番目の分割キーデータ“10”については、この“10”をアドレスとして、2番目の分割メモリ102b内の番地データ“10”で特定される場所にアクセスし、この場所に、エントリアドレス“00”を書き込む。また、制御回路105は、3番目の分割キーデータ“10”をアドレスとして、3番目の分割メモリ102c内の番地データ“10”で特定される場所にアクセスし、この場所にエントリアドレス“00”を書き込む。また、制御回路105は、4番目の分割キーデータ“00”をアドレスとして、4番目の分割メモリ102d内の番地データ“00”で特定される場所にアクセスし、この場所にエントリアドレス“00”を書き込む。また、制御回路105は、5番目の分割キーデータ“10”をアドレスとして、5番目の分割メモリ102e内の番地データ“10”で特定される場所にアクセスし、この場所にエントリアドレス“00”を書き込む。同様に、制御回路105は、6番目の分割キーデータ“11”をアドレスとして、6番目の分割メモリ102f内の番地データ“11”で特定される場所にアクセスし、この場所にエントリアドレス“00”を書き込む。
 これにより、キーデータ“2699”で指定された検索メモリマット102の分割メモリに対して、入力されたキーデータ“2699”に対応するエントリアドレス“00”が書き込まれたことになる。このように、キーデータ“2699”は、“10 10 10 00 10 11”で表わされるので、それを2ビットずつに6分割する。そして、分割したキーデータのそれぞれを、6分割された検索メモリマットのy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとして用いる。
 上記のようにして、入力されたキーデータに対応するエントリアドレスを検索メモリマットに書き込んでおく。そして、検索メモリマットを検索するときには、キーデータを書き込んだときと同様の手順で、検索対象としてのキーデータを複数に分割する。例えば、検索対象としてのキーデータが、“2699”である場合、このバイナリデータを“10 10 10 00 10 11”の6つに分割する。これにより、1番目の分割キーデータ“10”をアドレスとして検索メモリマット102のデータを読み出すと、エントリアドレスの“00”が読み出される。続いて、2番目の“10”をアドレスとして検索メモリマット102のデータを読み出すと、エントリアドレスの“00”が読み出される。以下同様に、3番目~6番目のデータ“10”“00”“10”“11”をそれぞれアドレスとして検索メモリマット102をアクセスすると、上記と同様に検索メモリマット102からエントリアドレスの“00”が読み出される。なお、図8は分割メモリ102a~102hの各々から、エントリアドレスが読み出された状態を示している。
 すなわち、分割されたキーデータのいずれか一つで、エントリアドレス“00”を検索することが可能となる。なお、この意味において、本実施例で備えている確認メモリマット104は、あくまでも確認用であり、原理的には必須の構成要件ではない。
 上記のように検索メモリマット102を複数の分割メモリによって構成するとともに、入力用及び検索用のキーデータを分割する処理を行うことで、従来のCAMの問題点を解消できる。つまり、本発明によれば、従来のCAMのように全ビットを活性にする必要がなくなるため、大電力を消費するという欠点を解消することができる。本発明の実施例においては、検索結果を出力するのに、y軸のエントリ数分の一(1/エントリ数)の活性ビットで検索が可能となる。、このように、本発明は、y軸のエントリ数分の一(1/エントリ数)のエントリアドレスのみ動作させることが可能となる。従って、本発明では、従来のCAMの出力部で使用していた大面積を消費するナンド回路のツリーで構成される出力エンコーダが不要になる。
 続いて、図8に戻り説明を続ける。上記と同様にして、次の入力データであるキーデータ“3779”の入力時の動作を説明する。この、キーデータ“3779”は、エントリアドレス“01”に書き込まれるべきデータとして入力されるキーデータである。キーデータ“3779”をバイナリで表わすと“11 10 11 00 00 11”となる。このバイナリ値をアドレスとして、6分割された検索メモリマット102のy軸の記憶領域にアクセスし、検索メモリマット102に対して、キーデータ“3779”に対応するエントリアドレス“01”を書き込む。
 図8(b)では、キーデータ“3779”が6分割されて、“11”“10”“11”“00”“00”“11”として表わされている。制御回路105は、これらの分割キーデータをアドレスとして、複数の分割メモリ102a~102fを備えた検索メモリマット102に対して、エントリアドレス“01”を書き込む。つまり、制御回路105は、入力キーデータ“3779”の分割キーデータのうち、最初の分割キーデータ“11”をアドレスとして、最初の分割メモリ102a内の番地データ“11”で特定される場所にアクセスし、この場所にキーデータ“3779”に対応するエントリアドレス“01”を書き込む。続いて、制御回路105は、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102b内の番地データ“10”で特定される場所にアクセスし、この場所にエントリアドレス“01”を書き込む。ただし、2番目の分割メモリ102bにエントリアドレスを書き込む際、この2番目の分割メモリ102bの場所には、既に、キーデータ“2699”のエントリアドレス“00”が書き込まれている。このように、検索メモリマット102にエントリアドレスを書き込もうとする際に、衝突という現象が発生する場合もある。この衝突現象が発生したアドレスは、図8(b)では、塗りつぶされた部分として表示されている。この塗りつぶされた部分のキーデータは、この後に行われる検索処理では、「配慮しない(don’t care)」ものとして処理される。
 また、本発明では、上記の衝突が起こったことを記録するために、衝突フラグを設けることが好ましい。衝突フラグは、例えば2ビットのデータとすることができる。例えば、衝突フラグを2ビットとした場合、“00”の時は未書込みの初期状態を示し、“01”は書込み済み状態を示し、“10”は衝突状態を示し、“11”はその他の状態を示すことができる。
 図8(b)では、続けて、3番目の分割キーデータ“11”をアドレスとして、3番目の分割メモリ102c内の番地データ“10”で特定される場所にアクセスし、この場所にエントリアドレス“01”を書き込む。同様に、4番目から6番目の分割キーデータ“00”“00”“11”についても、これらをアドレスとして、それぞれ3番目から6番目の分割メモリ102d~102fにエントリアドレス“01”を書き込む。ただし、4番目と6番目のアドレスについては、既に他のキーデータ“2699”の書き込みによって使用されているため、衝突フラグが書き込まれる。これにより、4番目と6番目のアドレスについては、この後で行なわれる検索処理では「配慮しない(don’t care)」として処理される。
 以上の処理により、キーデータ“3799”で指定された検索メモリマット102に、エントリアドレス“01”が書き込まれたことになる。ここまでで、2つのキーデータ“2699”“3799”を検索メモリマット102に書き込む処理が完了する。ただし、キーデータ“3799”については、2、4、6番目の分割キーデータの書き込み動作で衝突が発生し、後の検索処理で「配慮しない(don’t care)」処理を行なうことになる。このため、キーデータ“3799”に着目すると、6つの分割キーデータのうち、3つが検索対象として扱われないため、検索対象が6個から3個に減少したことになる。
 制御回路105は、同様にして、3番目及び4番目のキーデータ“1859”及び“1440”について、上記したキーデータと同様の手順で、対応するエントリアドレス“10”及び“11”を検索メモリマット102に書き込む。図8(c)に示されるように、キーデータ“1859”の書き込み処理では、新たに5番目の分割メモリ102eでアドレス衝突が生じている。また、図8(d)に示されるように、キーデータ“1440”の書き込み処理、新たに1番目と3番目の分割メモリ102a、102cでアドレス衝突が生じている。
 図8(e)には、確認メモリマット(SRAM)104の書き込み状態を示している。この確認メモリマット104のメモリアドレス“00”には、第1の入力データであるキーデータ“2699”のバイナリデータ“10 10 10 00 10 11”が分割されて順次書き込まれている。また、確認メモリマット104のメモリアドレス“01”には、第2の入力データであるキーデータ“3779”のバイナリデータ“11 10 11 00 00 11”が順次書き込まれている。以下同様に、確認メモリマット104のメモリアドレス“10”には、第3の入力データであるキーデータ“1859”のバイナリデータが順次書き込まれ、メモリアドレス“11”には、第4の入力データであるキーデータ
“1440”のバイナリデータが順次書き込まれている。
 以上の処理が、検索メモリマット102に入力されたキーデータに対応するエントリアドレスを書き込む基本的な処理となる。
 続いて、以下では、入力されたキーデータに基づいて検索メモリマット102内を検索し、このキーデータに対応するエントリアドレスを読み出す処理について説明する。
 図9は、本発明の実施例のSRAM-CAMの検索・読出動作の例を示した図である。図9は、書込処理時にエントリアドレスの衝突が生じた場合、つまり、図8に示した濃く網掛けされたエントリアドレスを「配慮しない(don’t care)」とした場合であっても、検索入力データに基づいて正しく検索可能であることを示している。
 図9(a)は、検索データとして、キーデータ“2699”が入力された場合を示している。入力されたキーデータ“2699”は、バイナリデータで“10 10 10 00 10 11”と表わされる。また、このキーデータ“2699”のバイナリデータは、“10”“10”“10”“00”“10”“11”のように6分割される。そして、これら複数の分割キーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとして用いる。
 まず、6つの分割キーデータのうち、最初の分割キーデータ“10”をアドレスとして、検索メモリマット102内の番地データ“10”で特定される場所にアクセスすると、最初の分割メモリ10aのうちの“10”に対応した場所(アドレス)から、エントリアドレス“00”が読み出される。同様に、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102b内の番地データ“10”で特定される場所にアクセスする。しかしながら、この2番目の分割メモリ102bの場所(アドレス)には、図8(b)の第2の入力データ“3799”の書き込み時に、アドレスの衝突が生じている。このため、制御回路は、2番目の分割キーデータ“10”に基づいた検索処理では、検索結果を「配慮しない(don’t care)」ものとして処理を行う。よって、検索メモリマット102の2番目の分割メモリ102bからの読み出しデータは、検索の対象外とされる。「配慮しない(don’t care)」処理を行うか否かは、メモリからデータを一旦読み出し、その読み出したデータに付与されているフラグ部分で判断すればよい。このように、厳密に言うと、制御回路105は、検索の対象外としたデータについてはエントリアドレスの出力は行なわないものの、メモリ回路からの読み出し動作は行う。
 3番目の分割キーデータ“10”、4番目の分割キーデータ“00”、及び6番目の分割キーデータ“11”をアドレスとした検索メモリマット102へのアクセスについても、同様に、「配慮しない(don’t care)」処理によって、読み出されたデータが検索の対象外とされる。他方、5番目の分割キーデータ“10”をアドレスとして、検索メモリマット102の5番目の分割メモリ102f内の番地データ“10”で特定される場所にアクセスすると、衝突フラグが発生していないため、エントリアドレス“00”を読み出すことができる。図9(a)の右側の図は、キーデータ“2699”に基づいて、検索メモリマット102から読み出されたエントリアドレス(EA)を並べて表示したものである。
 図9(a)で示されるように、検索データとしてのキーデータ“2699”に基づいて検索メモリマット102から読み出されるエントリアドレスのうち、実際に検索に使用されるエントリアドレスは、1番目の分割メモリ105aと5番目の分割メモリ105eに書き込まれていたエントリアドレス“00”ということになる。
 ここで、エントリアドレス“00”に基づいて、図8(e)に示す確認メモリマット104からキーデータの値を読み出すと、このエントリアドレス“00”に対応するキーデータは、“10 10 10 00 10 11”であることがわかる。この、“10 10 10 00 10 11”は、十進法表すと“2699”である。これにより、読出処理で読み出されたエントリアドレス“00”が、検索データとして入力されたキーデータ“2699”のものであることが分かる。つまり、本発明では、「配慮しない(don’t care)」処理を適用しながらも、検索メモリマット102からエントリアドレスを読み出し、このエントリアドレスを用いて、確認メモリマット104にアクセスする。そこで、本発明は、確認メモリマット104からの出力データであるキーデータと、検索対象として入力されたキーデータを比較し、一致することを確認して、このエントリアドレスを出力する。
 図9(b)は、検索入力データのキーデータとして、“3779”が入力された場合を示している。入力されたキーデータ“3779”は、バイナリデータで“11 10 11 00 00 11”で表わされる。このバイナリデータは、“11”“10”“11”“00”“00”“11”のように6分割され、検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“11”をアドレスとして、最初の分割メモリ102aからデータを読み出すと、エントリアドレス“01”が読み出される。2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bからデータを読み出すが、このデータは、入力データ“3779”の入力時にアドレス衝突が生じているため、「配慮しない(don’t care)」ものとして、検索の対象外となる。
 3番目の分割キーデータ“11”をアドレスとして検索メモリマット102の分割メモリ102cからデータを読み出すと、エントリアドレス“01”が読み出される。また、4番目の分割キーデータ“00”、5番目の分割キーデータ“00”、6番目の分割キーデータ“11”をそれぞれアドレスとした検索メモリマット102へのアクセスは、衝突が生じているために、「配慮しない(don’t care)」処理によって、検索の対象外となる。
 図9(b)に示されるように、検索データとしてのキーデータ“3779”に基づいて検索メモリマット102から読み出される値は、最初の分割メモリ102a3番目の分割メモリ102cに書き込まれていたエントリアドレス“01”ということになる。
 ここで、エントリアドレス“01”により、図8(e)に示した確認メモリマット104に格納されているキーデータの値を読み出すと、“11 10 11 00 00 11”となり、入力データとしてキーデータ“3779”と一致することが分かる。つまり、「配慮しない(don’t care)」処理を適用しつつも、検索メモリマット102から読み出したデータから読み出されるエントリアドレスを用いて、確認メモリマット104にアクセスする。そして、制御回路105は、確認メモリマット104からの出力データとしてのキーデータと、検索対象として入力されたキーデータと比較し、一致することを確認した上で出力する。
 次に、図9(c)には、検索メモリマット102に書き込まれていないキーデータ“1504”が、検索対象のキーデータとして入力された場合の処理が示されている。
 まず、検索データとしてキーデータ“1504”が入力されると、“1504”のバイナリデータは、“01”“01”“11”“10”“00”“00”のように6分割される。この6つの分割キーデータは、それぞれ、検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとして用いられる。最初の分割キーデータ“01”をアドレスとして、最初の分割メモリ102aからデータを読み出すと、書込処理時にアドレス衝突しているため、「配慮しない(don’t care)」処理が行なわれる。次いで、2番目の分割キーデータ“01”をアドレスとして、2番目の分割メモリ102bからデータを読み出すと、エントリアドレス“11”が読み出される。次に、3番目の分割キーデータ“11”をアドレスとして、3番目の分割メモリ102cからデータを読み出すと、エントリアドレス“01”が読み出される。しかし、ここで読み出されたエントリアドレス“01”は、先に読み出されたエントリアドレス“11”と異なる値となっている。すなわち、キーデータ“1504”に基づいて読み出されたエントリアドレスには、“11”と“01”において不一致が発生している。そうすると、検索メモリマット102には、未だキーデータ“1504”が記録されていないことがわかる。従って、制御回路10は、3番目の分割キーデータを処理した段階で、「一致データ無し」と判定することができる。
 このように、検索メモリマット102から読み出されたエントリアドレスに不一致が発生した場合は、上述した確認メモリマット104を用いた確認処理が不要となる。なお、本実施例には示していないが、同じ分割メモリに複数のアドレス衝突があり「配慮しない(don’t care)」処理が行われる場合、メモリから読み出されたエントリアドレスの全てが一致していても、検索データとして入力されたキーデータと、読み出し処理で出力されたエントリアドレスに対応するキーデータとが、一致しないという問題が発生することもあり得る。ただし、このような問題は、確認メモリマット104を参照することで解消できる。つまり、検索メモリマット102から読み出されたエントリアドレスに基いて、確認メモリマット104にアクセスし、検索対象としてのキーデータと、確認メモリマット104から出力されたキーデータとが一致しない場合には、「一致データ無し」と判定することができる。
 図10は、エントリ数分だけキーデータを書き込んだ時の検索不一致(NG)発生数を示したグラフである。つまり、図10のグラフでは、「配慮しない(don’t care)」という処理が、検索メモリマット102内に複数発生し、誤動作する確率を乱数表からシミュレーションした例を示している。図10(a)は、キーデータが4ビット以上で、検索メモリマットのエントリ数が4の場合を示している。また、図10(b)は、キーデータが8ビット以上で、検索メモリマットのエントリ数が8の場合を示している。図10(a)に示されたシミュレーション結果を見ると、キーデータ長を8ビット以上に設定することで、検索不一致(NG)の発生数が限りなくゼロに近づくことがわかる。同様に、図10(b)に示されたシミュレーション結果を見ると、キーデータ長を16ビット以上に設定することで、検索不一致(NG)の発生数が限りなくゼロに近づくことがわかる。つまり、これらのシミュレーション結果をみると、キーデータのビット数を、検索メモリマットのエントリ数の2倍以上とすることで、半導体装置が誤動作して検索不一致(NG)を発生させることを、ほぼ確実に防止することができることがわかる。よって、キーデータのビット数は、検索メモリマットのエントリ数の2倍以上であることが好ましい。
 上述したように、本発明の半導体装置は、検索メモリマット102を構成する複数の分割メモリに対して、入力データを分割した分割キーデータをアドレスにして、その入力データのエントリアドレスを書き込む。分割キーデータは入力データを複数に分割したものであるため、これらの分割キーデータを検索メモリマット102に書き込む際には、衝突状態が発生する可能性がある。
 このような複数の分割メモリへのエントリアドレスの書き込み操作を「第1操作」とする。なお、第1操作の処理工程の例は、図2にも示されている。
 以上の第1操作は、検索メモリマット内のスイッチング操作または検索処理を行うための基本情報データを作成する操作となる。
 この第1操作では、同じアドレスに複数のエントリアドレスが書き込まれる場合であっても、衝突フラグを設定して、そのまま入力を進める。そして、検索メモリマット内を検索する際に、衝突フラグが設定されているアドレスについては、「配慮しない(don’t care)」として処理する。このように、本発明では、分割メモリにエントリアドレスを書き込むときに発生するアドレス衝突の問題を、検索動作を行うときに解決している。
 ここで、本実施例で説明したように、入力されるキーデータ(KD)のビット長がエントリアドレス(EA)の数に対して十分大きい場合、例えば2倍以上ある場合について考える。
 例えば、キーデータのビット長が、エントリアドレスの大きさに対して小さい場合は、キーデータを分割するときに、分割部分の最初のデータの一部が次の分割キーデータに重なるようにキーデータを分割することにより、分割部分のデータの総和を元のキーデータビット長より大きくすることができる。このキーデータの拡張により、キーデータのビット長が、エントリアドレスの大きさに対して小さい場合でもキーデータのビット長を、エントリアドレスの大きさに対して十分大きくすることができる。ただし、キーデータの拡張は、分割キーデータ同士の完全な重なりが生じないようにする必要がある。
 また、後に説明する検索動作では、検索結果として出力されるデータが正しいものであることを確認できるようにすることが、データの信頼度を確保するために重要である。このために、本発明の実施例では、メモリ空間の一部を確認メモリマット104に割り当てる。この確認メモリマット104は、y軸方向にエントリアドレス(EA)を記憶する領域を有し、x軸方向に、エントリアドレスに対応付けてキーデータ(KD)の記憶する領域を有している。そして、本発明の実施例では、入力されたキーデータを検索メモリマット102に書き込むと同時に、この確認メモリマット104にも、入力されたキーデータとエントリアドレスの書き込みを行う。このようにして、確認メモリマット104に、確認用の基本情報データを用意する。このような確認メモリマット104に対するキーデータの書込操作を、「第2操作」とする。なお、第1操作の処理工程の例は、図2にも示されている。
 その後、制御回路105は、ユーザからの要求に応じて、入力されたキーデータに基づいて検索メモリマット102内を検索し、このキーデータに対応するエントリアドレスを読み出す処理を行う。エントリアドレスの読出処理では、制御回路105が、検索データとして入力されたキーデータを、上述したキーデータ(KD)の分割方法に従って分割し、分割キーデータで検索メモリマットを活性化させて、該当分割キーデータに基づいて読みだしたエントリアドレス(EA)を出力する。この検索処理を、「第3操作」とする。ただし、上述した書込処理(第1操作)でアドレスの衝突を記録したエントリアドレスについては、読出処理において「配慮しない(don’t care)」ものとして扱い、エントリアドレスは出力しない。
 また、制御回路105は、複数の分割キーデータに基づいて1つ以上のエントリアドレスを読み出し、その読み出したエントリアドレスの全てが一致したときには、そのエントリアドレスを使用して、確認用基本情報データが格納された確認メモリマット104を参照する。すなわち、制御回路105は、検索処理で読み出したエントリアドレス、及び検索対象として入力されたキーデータを、確認メモリマット104のy軸に記憶されているエントリアドレス、及びx軸に記憶されているキーデータと比較する。そして、制御回路105は、エントリアドレスとキーデータが一致したことを確認して、一つのエントリアドレスを出力する。このような確認メモリマット104を参照する操作を、「第4操作」とする。なお、第4操作の処理工程の例は、図4にも示されている。なお、上記第3操作及び第3操作で出力されるエントリアドレスが、スイッチ接続または検索のアドレスとなる。
 以上、本発明は、第1操作~第4操作までの4つの操作を可能とするメモリ回路構成、すなわちこれらの論理方式構成を、図6に示したSRAM-CAMのメモリ回路で実現する。
 次に、本発明の実施例として、「配慮しない(don’t care)」という処理が複数回発生しても、半導体装置が誤動作する確率を減らす他の方法について説明する。
 まず最初にこの実施例の概要を説明すると、この実施例では、検索メモリマット102として、m個(mは2以上の自然数)の定義ブロックを用意する。また、検索メモリマット102のエントリ数をある任意の大きさに定めたときに、1つのブロックに対して、エントリアドレスを分割し、下位からエントリ数の1/mまで入力することを決める。そして、1つのブロックに対しては、一定数以上のエントリアドレスの入力を打ち切り、別のメモリブロックに移ってその操作を継続し、大きな基本情報データを複数のメモリブロックに格納する。この方法においては、キーデータ長がエントリ数の1/8ビット以上あることを条件とする。残り1/mより上位のエントリアドレスについても、下位アドレスから順番に最初のメモリブロックと同様に入力する。本実施例においては、各メモリブロックの間の操作の切り替え等を、セレクタによりこれを制御することができる。これにより、上位下位検索アドレスが合成され、前記確認用検索マットのアドレス軸としてのy軸に入力されて、実施例1で説明した第1から第4操作を行なうことができる。
 図11は、検索メモリマット102のエントリ数を256とした場合の実施例を示す。
 図11に示されるように、検索メモリマット102は、2つのメモリマットで構成されている。ここで、y軸方向のエントリの大きさを256としたときに、0から127エントリまでを、第1の検索メモリマット102に入力し、128から255エントリまでを第2の検索メモリマット102に入力する。これにより、ほぼ完全に誤動作発生の確率を実用レベル以下に維持することが可能となる。この検索メモリマット102を構成する2つのメモリマット間の切り替えは、ヘッダに付加されている第1フラグF1を使用して行えばよい。実際の検索メモリマット102には、フラグとして2ビットが必要なので、256エントリ×32ビットキーデータの場合、検索メモリマットとして256ワード×10ビットのSRAMが8個と、確認メモリマット104として256ワード×32ビットのSRAMが1個で構成することになる。
 以上説明したように、検索メモリマット102への書込み可能なエントリ数を1/m(mは2以上の自然数)に制限することで誤動作発生の確率を減らすことができる。図12には、mが2の場合、即ち、メモリに書き込むエントリ数を1/2に制限した場合の誤動作発生の確率のシミュレーション結果が示されている。図12に示されるように、エントリ幅(エントリ数)が256ワード(8ビット)であっても、確率的にはキーデータ長が32ビットで誤動作がなくなる。なお、図12に示したシミュレーションでは、CAMの書き込みデータとしてEXCELの乱数関数を適用した。
 以上は、誤動作を防ぐ方法の例について説明したが、本発明の他の実施例としては、未書き込み領域をなくして、検索メモリマット102に対して効率的にエントリアドレスを登録する方法もある。
 書き込むことができるエントリアドレスである登録エントリアドレスの数は、SRAM単位で見ると、登録エントリアドレスが全てユニークである場合に限り、未書き込み領域がなくなる。ユニークとは、nワード×nビット構成のSRAMを想定したとき、SRAMのアドレスとSRAMの内容が同じ場合と、この状態でSRAMの内容またはアドレスを任意に入れ替えた場合の2つである。
 しかし、図13に示すように、複数個所でSRAMの内容、またはアドレスの重なりが生じると、その分、未書き込み領域が増える。すなわち、SRAMの内容が同じ場合、例えば「00…00」番地のデータが「00…01」番地のデータと同じ場合、「00…00」番地の内容が右図のように未書き込み領域になる。つまり、ユニークでないデータが増えると未書き込み領域が増える(登録しやすくなる)という結果になる。これを利用して、書き込み数を増やすことができる。これを説明している理由は、たとえばCAMの検索の場合、ヘッダ等のように同じデータを何度も使用する傾向がある。この結果、個々のSRAMで見ると未書込み領域が多くなる傾向があるためである。
 ここで、本実施例をその効果の面から纏める。
 まず、SRAMを使用しているので大規模化が容易で一般的なCAMに比べエントリ数分の一(1/エントリ数)の大幅な低電力化ができる。
 次に、書込み動作が終了した後、エントリアドレスを書き込んだ分割メモリ(SRAM)が1個でも残れば登録したエントリアドレスを正常に検索できる。
 分割メモリ(SRAM)の中に検索対象外のアドレスが複数個存在しても、確認メモリマット(SRAM)を用いることで正しい検索が可能になる。本実施例では、SRAMを用いて説明したが、確認メモリマットの内容は、入力データをアドレスに従って書き込めるデバイスであれば良く、レジスタ等で実現することもできる。
 本実施例によれば、キーデータのエントリ登録時にアドレス衝突が生じたとき、「配慮しない(don’t care)」処理を行なうことによって、検索の対象外となる検索対象外を導入したことにより未書込み領域が増加した。この未書き込み領域を利用することでエントリアドレスを拡張することが可能である。
 また、本実施例によれば、キーデータのエントリ登録時に、検索メモリマット102の全分割メモリ(SRAM)が検索対象外となる場合はキーデータのエントリ登録ができないが、この状態はCAMを構成するSRAMのエリアがオーバーフローしていることを表しており、対応策としては検索メモリマットを複数個準備し、この状態が発生したら切り替えることで解決できる。
 次に、実施例3では、実施例1及び実施例2で説明した半導体装置について、さらなる機能拡張を行う手順について説明する。
 実施例1や実施例2においては、誤動作防止のため、エントリアドレスの書き込み処理を、分割メモリのアドレスの衝突により誤動作しない領域に制限するようにしている。これに加え、入力可能なエントリアドレスの数を増やすことによっても、さらに誤動作を防止することが可能となる。
 例えば、図14に示されるように、エントリアドレス(EA)を2ビット(図14(a))から、3ビット(図14(b))に増やすこともできる。これにより、確認メモリマット104のエントリアドレスの数を増やすことができる。図14に示されるように、エントリアドレスを3ビットする場合には、拡張フラグ(FRG)を設定して、通常のエントリアドレス(通常アドレス)と、拡張したエントリアドレス(拡張アドレス)を識別するようにすればよい。例えば、図14の例では、エントリアドレスの3ビット目が“0”である場合には、通常アドレスであることを示し、エントリアドレスの3ビット目が“1”である場合には、拡張アドレスであることを示している。
 図15及び図16は、エントリアドレス(EA)を3ビットとした場合において、データを書き込む処理の例と、データを検索する処理の例を示している。
 図15は、書き込み動作の例を示したものである。図15に示されるように、エントリアドレス(EA)を3ビットで表わすことで、エントリアドレス(EA)の数が8個となる。例えば、図15の例では、図8に示した4つのキーデータ“2699”“3779”“1859”“1440”の他に、5つめのキーデータ“408”を、実施例1で説明した第1操作の手順に従って、検索メモリマット1002と確認メモリマット1004のそれぞれに書き込むこととしている。
 キーデータ“408”のバイナリデータは“00 01 10 01 10 00”であるため、検索メモリマット1002に対しては、これらをアドレスとして書き込みを行なう。すると、最初の分割キーデータ“00”については、メモリアドレス“00”に対して、3ビットのエントリアドレス“001”を書き込むことになる。図15では、“00”と記載されているが、実際には、“001”を書き込む。
 エントリアドレス(EA)が2ビットから3ビットなったことにより、例えば、増加した1ビットが“0”のときには、エントリアドレスが2ビットのときと同じ処理を行い、増加した1ビットが“1”のときは、拡張アドレスであることの識別に使用するものとする。具体的には、キーデータ“408”の2番目の分割キーデータ“01”をアドレスとすると、既に書き込まれている“1440”との間でアドレス衝突を起すため(図8(d)参照)「配慮しない(don’t care)」処理を行う。キーデータ“408”の3番目の分割キーデータ“10”をアドレスとすると、既にこのアドレスは“1440”の書き込み処理の際に「配慮しない(don’t care)」処理が行なわれているため、書き込みを行なわず処理を終了する。同様に4番目の分割キーデータ“01”では、メモリアドレスに“001”を書き込む。図15では、“00”と記載されているが、実際には“001”を書き込む。5、6番目の分割キーデータの“10”“00”では、それぞれのメモリアドレスで「配慮しない(don’t care)」処理を行なう。
 検索メモリマット1002に対しては、エントリアドレスの3ビットのうち、上位2ビットを用いて書き込み動作を行なうことで、実施例1と同様に書き込み動作を行うことができる。
 一方、確認メモリマット1004に対しては、3ビットによりエントリ数が2倍に増えていることから、3ビットの下位1ビットが図15のように増える。つまり、エントリアドレス“001”に対して、入力データ“00 01 10 01 10 00”を書き込む。
 次に、図16において、図15で書き込まれた拡張されたエントリアドレスを用いた検索例を示す。
 図16(a)に示されるように、検索データとしてキーデータ“2699”が入力された場合、分割された検索メモリマット1004の最初の分割メモリ(SRAM)から“000”が読み出される。2番目から6番目の分割キーデータ対応したメモリアドレスに対しては、「配慮しない(don’t care)」処理が行なわれているため、読み出されたデータは検索対象外になる。そして、“000”をアドレスとして確認メモリマット1004にアクセスすると“10 10 10 00 10 11”が読み出される。このように、検索メモリマット102の確認結果が、入力データ“2699”と一致することが分かる。
 次に、図16(b)に示されるように、検索データとしてキーデータ“408”が入力された場合、分割された検索メモリマット1002の1番目と4番目から“001”のエントリアドレスが読み出され、残りの検索メモリマット1002からは、アクセスされたデータが何れも「配慮しない(don’t care)」処理が行なわれているため、読み出されたデータは検索対象外になる。読み出されたエントリアドレス“001”で確認メモリマット1004にアクセスすると、“00 01 10 01 10 00”と入力データ“408”と一致することが分かる。
 次に、キーワード検索の基本となるマスク操作の方法について、図17を用いて説明する。図17(a)は、キーデータ“1440”で、分割された検索メモリマット1002の4番目から6番目をマスクして検索した様子を示している。この場合、図17(a)の状態において、検索メモリマット1002からは“11”が出力され、確認メモリマット1004にメモリアドレス“11”でアクセスすると、検索メモリマット1002からの出力と入力データとしてのキーデータとが一致することが分かる。
 一方、図17(b)は、入力データ“1440”に対して、2番目、4番目、及び6番目のメモリマットをマスクして検索した例を示している。この場合、1番目、3番目、及び5番目のエントリが「配慮しない(don’t care)」とされており、2番目、4番目、及び6番目はマスクされているため、検索メモリマット1002の出力はなくなってしまう。つまり、この場合では、検索データなしと判断される。
 次に、本発明の実施例におけるマルチヒットの定義、及び検索エンジンへの拡張について説明する。
 実施例1や実施例2と同様に、ヘッダに第1コントロールビットとしての第1フラグF1のビットと、第2、第3、第4・・・フラグビットとしての関連アドレスRFのツリーを表すビットを追加して、第1操作から第3操作を完了する。第1フラグF1のビットが活性でないときは、実施例1や実施例2と同様に操作を行う単一ヒットモードとなる。他方、第1フラグF1が活性である場合は、マルチヒットへの対応とし、図18に示すように、要求されたキーデータを第3操作で処理し、エントリアドレスを出力した後に、これをバッファメモリBSRAMに一時貯蔵する。この場合第4操作を中止して、第2クロックで、第3操作により出力されたエントリアドレスの関連アドレスツリーの上位アドレスをキャッシュメモリマットでヒットし、データを抽出して、そのアドレスと共に一時貯蔵をする。次のクロックで、関連アドレスツリーの第2番目にあるアドレスを、前記キャッシュメモリマットで第2該当データをヒットし、該当アドレスとデータを抽出する。これを関連フラグツリーにおける優先順位下位まで続ける。第1関連アドレスに戻ったときに、フラグが不活性になる操作を行う。これはフィードバックループであるため、この繰り返しの間(フラグの活性な間)は新規検索を中止する。新しい第4操作で一時貯蔵し、関連付けた複数のアドレスを出力する。必要に応じてデータの付加を行う。
 これにより、検索エンジンの重要な役目である複数の類似検索が可能となる。図6において、フラグF1が存在する場合、先ほどの入力エントリ数の1/2入力もフラグが必要であったが、ビット数の追加を行い、フラグ機能を追加してデータに関連付けてフラグRFを用意する。このフラグは、いくつかに分類し、ツリー検索が可能なフラグとなる。このセット情報が近接キャッシュメモリマットに書き込みされているため、サブルーチン操作を開始し、複数の検索アドレスおよびデータを出力する。
 CAMをマルチヒットとして利用できるようにするには、複数のキーデータを1つのエントリに対応させる必要がある。現状では、1つのエントリアドレスに複数のキーデータを対応させようとすると、検索メモリマット102の出力が全て検索無視状態になり、確認メモリマット104の読出しができなくなる。この問題を次の方法により解決する。
 複数のキーデータを1つのエントリアドレスに対応させる場合は、フラグを“11”に設定する。“11”フラグのときは、確認メモリマット104を使用せずに、検索無視の部分を除いて、読み出したエントリアドレスの全てが一致することを確認したら、そのデータをエントリアドレスと判定する。
 これは、エントリアドレスでアクセスするキャッシュメモリのデータの一部のデータで、検索の動作を制御できるようになることを意味する。
 それを説明した図が、図19である。図19は、一般的なCAMのマルチヒットとの違いを示している。一般的なCAMのマルチヒットでは、図19(a)に示すように、一つのキーデータに対して複数のエントリアドレスを出力する。一方、本実施例のSRAM-CAMのマルチヒットでは、図19(b)に示すように、複数のキーデータの入力に対し、一つのエントリアドレスを出力する。
 本発明のSRAM-CAMにおいて、一般的なCAMと類似なマルチヒットを可能とする方法を図20に記述する。一般的なCAMでは、図20(a)に示すように、一つのキーデータ“A”に対して、複数のエントリアドレス“m”“n”“p”がヒットしている。これに対し、本実施例のSRAM-CAMでは、図20(b)に示すように、一つのキーデータ“A”に対して、エントリアドレス“m”“n”“p”が対応している。データ0の部分は、フラグとして、マルチヒットがonの場合に0若しくは1のデータを用い、マルチヒットがoffの場合に0若しくは1のデータを用いる。データ1の部分が0になるまでフラグを切替え、0となったところで、キーデータの入力停止を解除する。
 このようにすることで、エントリアドレスでアクセスするSRAMを複数個設け、データ0で複数のSRAMを制御することができる。また、マルチポートのSRAMを使用することでマルチヒットデータの出力を高速化させることができる。
 マルチヒットのクロックタイミングを示すと図21のようになる。システム動作に対してSRAMの動作に余裕がある場合、SRAMを高速化させてマルチポート的な動作をさせることができる。この図21は、4ポート動作の例を示している。システムクロック、RAM0クロック、RAM1クロック、RAM2クロック、RAM3クロックは、4倍速クロックにより、カウンターと簡単な論理回路で容易に生成可能である。なお、システム出力をRAM3クロックのインバート信号でラッチすると、システム出力と同じタイミングになる。また、通常の動作は、システムクロックとRAM0クロックで動作させる。マルチヒットのときは、RAM0~RAM3のOR信号(4倍速クロック)でエントリ先のSRAMを動作させ、SRAMのラッチ出力をRAM3クロックのインバート信号でラッチすると、システム出力と同一タイミングの4つの並列出力を得ることができる。
 以上、スイッチルータに使用可能なCAM的動作と検索エンジンを実現する方式を述べたが、この構成はLUT(Look Up Table)をベースとした機能にも拡張可能である。そのためには、検索メモリマットのマット上下に小規模のスイッチなどの制御回路を付けることとすればよい。
 エントリアドレスのメモリへの入力で重なりを「配慮しない(don’t care)」とする実施例1、2に記載の方法の限界は、メモリ列全てが重なる前までである。この問題は、ランダムデータよりデータの隔たりがあると起り易い。そのときの対応策は、エントリアドレスに付随しているフラグの読み替えを行なうことである。
 データ書込み時に書き込み済みのアドレスが選択されると、フラグを“10”として書込みを行なわず、検索時に“10”のフラグの入力データ情報を無視する。しかし、データの隔たりにより、検索時に全メモリマットのフラグが“10”になり検索不能に陥ることがある。これを回避するためには、検索時に全入力データのフラグが“10”であってもSRAMの読み出し情報が全て一致する場合に限り、そのデータを検索データとしてのキーデータとして扱うようにする。
 論理回路への適用方法は、均質回路群単位(Unified cluster circuit)の概念形成であり、飛躍的応用範囲が広がることとなる。検索メモリマットにLUT制御回路(LUTC)が付加された状態を図22に示す。すなわち、図22は、図6の検索メモリマット102の入力部と論理出力部にスイッチ回路網を付加された構成を示している。
 この図22において、CTSは制御信号、LOは論理出力を示す。検索メモリマット102は、LUT(Look Up Table)102’として利用する。四則演算およびシフトの元になる加算器の例を示すと図23のようになる。四則演算に必要な演算ステップがスイッチ回路で構成されている。すなわち、図23は、複数のLTUを持つ場合を示しており、16ビット加算器選択時の例を示している。SWは2つの入力を切り替えるスイッチ回路、b_DVはビット分配回路、Cはコネクタで、オン/オフ設定可能でオフの時に強制的に0にする回路である。なお、LUTの周辺回路を複数のLUTに対応できるようにすることで、ダイナミックに機能が変更できるようになる。また、複数の回路ブロックと協調することで処理効率を上げ、システムの面積を縮小することができる。また、コネクタCの出力を0に設定すると、8ビット加算器×2となる。
 さらに、ビット数を示した全体構成例を図24に示す。このように、検索メモリマットが、付加スイッチ回路(LUT制御回路)により論理動作を行うことができるブロックとなる。
 図24において、256エントリ×32キーのCAMアレイの単位部分の構成を示すと、次のようになる。すなわち、(1)CAM本体は、マルチヒット機能までのCAM機能を実現するものとなる。(2)LUTは、(a)256ワード×10ビットのSRAMが8個、(b)256ワード×32ビットのSRAMが1個、(c)256ワード×48ビットのSRAMが1個の構成となる。このうち、(b)と(c)は、256ワード×10ビットのSRAMが9個でもよい。このほうが、LUTとしての利用効率が高くなる。なお、このようにすれば、面積効率の良い論理回路あるいはメモリとして使用できる均質回路群単位が実現できる。図24に示したブロックをアレイ状に配置するとプログラマブル論理ブロックあるいはメモリブロックとして使用できる。概念的には、CAM機能+プログラマブル論理ブロックあるいはメモリブロックと等価な形に構成することができる。なお、MBはマルチバスを示す。
 このようなメモリと論理が同じマットで構成できる均質ブロック配列は、必要処理ブロックを隣接に配置することが可能になるため、バスネックを解消でき、低消費電力で高速動作を確保できる。また、このような均質ブロック配列により、あらゆるプロセッシングが可能となる。
 図25のうち、図25(a)は、スイッチまたは検索の動作を説明しており、図25(b)は、論理演算の手順(図25(b))を説明している。図25では、システム全体を制御する回路からの指示で切り替えることで、あらゆる処理が可能となる構成を示している。なお、図25(b)において、CBは近接接続バスを示し、LIは論理入力を示し、LOは論理出力を示している。また、一点鎖線で囲まれた部分は、サブルーチンを示し、1ループ/クロックである。
 本実施例では、必要データ群を隣接して配置するため、隣接と1クロックで並列演算を行うことが可能である。それを図25では、第1クロックというタイミングで表示している。これにより、可能な限り隣接状態で構成することができる。図25(a)は、スイッチまたは検索の場合を示し、図25(b)は、論理演算の場合を示す。すなわち、これを拡張するとブロック単位でも可能であり、システムとしてダイナミックリコンフィグレーション(Dynamic reconfiguration)概念が生まれる(図26)。すなわち4×4ブロック配列の例を示すと図26のようになり、あらゆる構成が瞬時に切り替えられることが容易に判明する。これこそ脳型コンピュータの端緒であることがわかる。
 図26は、論理演算機能を加味したSRAM_CAMアレイの構成を示す図である。図26に示した例は、ダイナミックリコンフィギュレーション(Dynamic reconfiguration)メモリプロックを4×4の16個並べた場合の構成例である。図26に示した例では、すべてがSRAMで構成されたブロックであり、さらに機能切り替えレジスタを内蔵することで、どのような形にも瞬時に切り替えることができる。ローカルバス(LB)は、図25の隣接バス(CB)と書かれた内容であり、これにより、隣接間の情報や処理の共有化が1クロックででき、高速化と低消費電力が達成できる。グローバルバス(GB)は、ダイナミックリコンフィギュレーション時のブロックシフト時に主に使用され、ブロックデータ群のバースト転送が主たる役目である。
 図26は、SRAM-CAMアレイを示したものであり、GBはグローバルバス、LBはローカルバスである。ブロックA,D,E,H,I,L,M,PはCAM機能ブロック、その他はLUT機能ブロックである。各ブロックは、機能指定をプログラムで設定する。これにより、CAM機能ブロックで検索し、LUT機能ブロックで各種演算処理を実行する。2つのブロックを破線で囲ってある部分は、2ブロックで処理単位ブロックを構成することを意味する。また、グローバルバス(GB)の1組のデータ幅をnバイトとすると、本例では16nバイトの処理が可能となる。また、本実施例のLUT方式は、図27に示すように、四則演算処理が1クロックでできる利点が大きい(図27)。すなわち、一般的な演算方式であるシフトと加算とレジスタラッチのプロセスでの4ビット乗算では、6ステップが必要となるが、本実施例のLUT方式では、x、yアドレス入力でアクセスできる答えを引き出すのみで済むため、1ステップで完了する。なお、図27(a)は2進4ビット乗算器であり、Hは半加算器、Fは全加算器、図中○で示したものはフリップフロップ回路(F/F)である。また、リップルキャリー加算器の加算段数は6段で、レイテンシーは2である。そして、これは、図27(b)に示すLUT方式の乗算器と同一機能である。
 さらに、図28に、エントリ数が256より大きい場合の考え方の概念を示す。エントリ数が256より大きく、例えば4kの場合は、256×16=4kから16面の領域“0000”~“1111”を確保できる。この16面の領域を、メモリ領域、LUT、演算器、及び比較器等に割り当て、ダイナミックに切り替えることで機能向上を図ることができる。エントリアドレスを12ビットとすると、この内の4ビットを領域指定とし、8ビットを領域内アドレスとすることができる。
 図29は、入力データのキーデータと、検索データとしてのキーデータを符号化する処理を行う実施例を示している。この[実施例4]は、図2に示したステップS2、及び図4に示したステップS7に関連するものである。
 すなわち、実施例4に係る半導体装置は、入力データ及び検索データとしてのキーデータの符号化を行うことで、制御回路に入力される複数のキーデータの偏りを解消することを目的としている。複数のキーデータの偏りを解消することで、検索メモリマットに書き込む際の衝突頻度を低減すると共に、仮に衝突が発生した場合でも適切に検索処理を行うことができるようにすることができる。特に、図29は、SRAM-CAMのメモリ回路構成の一例を示している。
 キーデータの偏りとは、例えば、ほとんど同じバイナリデータを有する複数のキーデータが、連続して検索メモリマットに書き込まれる場合などに発生する。例えば、“00 01 10 01 10 00”というキーデータが入力された後に、続けて“00 01 10 01 10 01”というキーデータが入力された場合を想定すると、2つのキーデータは、最後の1ビットしか異なる点がない。本発明の半導体装置は、アドレスの“衝突”が発生する確率を低下させるために、複数のキーデータがある程度ランダム化されて入力されることが好ましい。しかし、上記した例のように、ほとんど同じキーデータが続けて入力されると、アドレスの“衝突”が頻繁に発生することとなる。そこで、本実施例では、入力されるキーデータを符号化させて、人為的に、複数のキーデータのバイナリデータをランダム化させることとしている。
 ここで、「符号化」とは、所定の規則(アルゴリズム)に従ってキーデータの分散化を行うことを含む。また、「符号化」には、数式(アルゴリズム)による符号化のみならず、キーデータを表すデータビットの順序を並び替えることを含むものとする。
 図29に示されるように、半導体装置は、近接キャッシュメモリマット101、符号化回路106、制御回路105、検索メモリマット102、比較+ラッチ回路103、及び確認用メモリ104を含む。近接キャッシュメモリマット101は、必要でない場合は設ける必要はない。
 図29に示したSRAM-CAMでは、元情報であるキーデータ(KD)が、まず最初に符号化回路106に入力される。そして、元情報であるキーデータは、符号化回路106によって、所定のアルゴリズムに従って符号化される。符号化回路106は、所定のアルゴリズムに従い、入力されたキーデータを符号化して、符号化後のキーデータを出力する。符号化回路106により符号化されたキーデータは、制御回路105に入力される。制御回路105は、符号化されたキーデータを、検索メモリマット102を検索するためのアドレス、あるいは検索メモリマット102に新たに書き込むためのアドレスとして用いる。
 つまり、制御回路105は、符号化後のキーデータを、[実施例1]などで説明したキーデータと全く同じように扱うことができる。すなわち、制御回路105は、符号化後のキーデータを複数に分割し、分割したキーデータをアドレスにして検索メモリマット102にアクセスする。そして、制御回路105は、アクセスした検索メモリマット102にエントリアドレスを書き込んだり、アクセスした検索メモリマット102に書き込まれているエントリアドレスを読み出す。これらの書込処理及び読出処理は、[実施例1]等で説明した処理と同じである。この書込処理及び読出処理は、分割した検索メモリマット102全てに対して行なわれる。
 まず、制御回路105は、検索メモリマット102のy軸にエントリアドレス(EA)を格納するための場所(アドレス)を割り付け、そのx軸に符号化後の分割したキーデータ(KD)を割り付ける。
 検索メモリマット102は、x軸に割り付けられた符号化後のキーデータに対応する適切な大きさのビット数の基本セルに分割される(分割数:N)。ここで、Nは2以上の自然数である。図29の例では、Nは8となる。他方、各基本セルに対するビット数の割り付けは、任意とする。また、制御回路105は、確認メモリマット104のy軸にエントリアドレスを割り付け、x軸にエントリアドレスに対応するキーデータをそれぞれ割り付ける。このため、確認メモリマット104には、エントリアドレスに従って、キーデータが書き込まれている。なお、確認メモリマット104に格納されるキーデータは、上記符号化回路106により符号化された入力データではなく、符号化回路106に入力される前の元情報としてのキーデータに対応している。
 即ち、検索メモリマット102に入力されるキーデータは、書き込み時または検索時に入力される元情報としてのキーデータを符号化した符号化後のキーデータである。これに対し、確認メモリマット104に格納されるキーデータは符号化前のデータ、つまり書き込み時または検索時に入力される元情報としてのキーデータそのものである。つまり、確認メモリマット104に対する参照処理は、符号化回路106に入力される符号化前の元情報としてのキーデータに対して行われる。
 図35は、図29で示した半導体装置の動作タイミングを、第1クロック及び第2クロックの繋がりで示している。まず、第1クロックでは、キーデータが符号化回路106に入力され、元情報としてのキーデータが符号化され、符号化後のキーデータが制御回路105へと出力される。また、第1クロックでは、制御回路105に符号化後のキーデータが入力され、検索メモリマット102に対する書込処理または読出処理が行われ、エントリアドレスがラッチ回路103aへとラッチされる。ここまでの処理が、第1のクロックで実行される。続いて、第2クロックでは、ラッチ回路103aからのデータが比較器103bによって比較され、その比較結果が確認メモリマット104へと入力される。そして、第2クロックにおいては、確認メモリマット104のデータと符号化前の入力データが一致することの確認が行われ、最終的に、確認メモリマット104から読み出されたデータが出力される。
 以下、本実施例の符号化回路106の動作及び回路構成について説明する。符号化回路106は、データの書き込み時または読み出し時に入力される元情報としてのキーデータを符号化する。そして、符号化回路106は、符号化の条件を適当に設定することで、キーデータの偏りを除去したり、ビット長を変更したりする機能を有している。この符号化処理は、後述するように、データを混合したり、拡散したり、若しくは冗長性を付加したりすることにより行われる。例えば、符号化ビットは、生成多項式を用いて元情報から生成され、冗長ビットの長さは符号生成時に指定するパラメータに応じて変化する。検索メモリマット102(SRAM-CAM)に符号化されたデータを入力する方法としては、(1)元情報+符号化ビットの形で使用する方法、又は(2)符号化ビットのみを使用する方法が挙げられる。本実施例においては、上記(1)の方法を最初に説明し、その後で上記(2)の方法について説明する。なお、(2)の方法は、符号化ビットの中に元情報が広い範囲に渡って拡散される構成になっているため、ビットの偏りの除去により有効である。
 図30は、符号化ビットとデータの散乱度合いを説明するための図である。図30では、28ビットのキーデータが符号化回路に入力される場合を示している。図30に示された符号生成パラメータは、入力データまたはキーデータとしての元情報の散乱度合いを表す指標となっている。例えば、28ビットの元情報に対して符号化処理を施し、6ビットの符号化ビットを得る場合、制御回路105に入力される符号化後の入力データは総ビット数34ビットとなる。この場合、散乱度合いを表す符号生成パラメータは、1ビットとなる。また、28ビットの元情報に対して符号化処理を施し、27ビットの符号化ビットを得る場合、制御回路105に入力される符号化後の入力データは総ビット数55ビットとなる。この場合、散乱度合いを表す符号生成パラメータは、5ビットとなる。また、28ビットの元情報に対し符号化処理を施し、70ビットの符号化ビットを得る場合、制御回路105に入力される符号化後の入力データは総ビット数98ビットとなる。この場合、散乱度合いを表す符号生成パラメータは、11ビットとなる。
 従って、散乱度合いを高くして符号生成パラメータのビット数を増大させるためには、符号化ビット数を増大すれば良いことがわかる。但し、符号化ビット数を増大すると検索メモリマット102を構成するSRAM数を増やす必要がある。これに対し、上記(2)符号化ビットのみを使用する方法では、元情報のビット数分だけ総ビット数が減少するため、検索メモリマット102を構成するSRAM数を節約することができる。また、生成される符号化ビットには冗長性があるので、生成された符号化ビットを全ビット使用する必要はなく、一部を削除することができる。このように、符号化ビットの一部を削除することにより、検索メモリマット102を構成するSRAM数の節約だけでなく、キーデータのビット長をSRAMの構成に合う形に適切に調整することができる。
 ここで、元情報としてのキーデータを7ビットとし、符号化ビットを8ビットとする場合について説明する。図31は、本発明の一実施例を示す図であり、符号化回路106が出力する元情報と符号化ビットを示している。本実施例においては、符号化処理に使用する符号の一例として、ボーズ・チョドーリ・ボッケンジェム符号(BCH符号:Bose Chaudhurin Hocquenghem符号)を利用する。BCH符号は、パラメータ化された誤り訂正符号の一種で、シンドローム復号という簡潔な代数学的手法で復号できる点を特徴としている。BCH符号は、低電力で小型の機器で符号化及び復号化が可能であるが、本発明では符号化の機能のみを使用し、復号の機能は使用しない。BCH符号は、複数ビットの元データのXOR(加算+で表示されている)からなる値で構成されている。BCH符号は、符号化という観点から見ると、元データの部分を含まない符号化ビットのみで符号化を行っても検索が可能となる。なお、符号化には、BCH符号化以外に、低密度パリティ検査符号(LDPC:Low-density parity-check code)や、QSBC(Quadruple Swing-By Code:(株)東芝の登録商標)などがある。本発明では、これらのLDPCやQSBCを、BCH符号に替えて用いてもよい。
 図31に示されるように、7ビットの元情報としてのキーデータ“a6 a5 a4 a3 a2 a1 a0”を符号化処理することで、8ビットの符号化ビット(15,7)符号が生成されている。符号化ビットの各ビットは、“a6+a2+a0”、“a6+a5+a2+a1+a0”、“a6+a5+a4+a2+a1”、“a5+a4+a3+a1+a0”、“a6+a4+a3”、“a5+a3+a2”、“a4+a2+a1”、“a3+a1+a0”となる。このように、生成される符号化ビットの各ビットには、元情報としてのキーデータの各ビットの値が混合及び拡散されて、冗長性が確保されたものとなっている。
 符号化回路106にて実行されるBCH符号化処理について、その詳細を説明する。
kビットの元情報である情報ビットを、“ak-1、ak-2、・・・a1、a0”とし、mビットの符号化ビットを“cm-1、cm-2、・・・c1、c0”とすると、nビットのBCH符号は、“ak-1、ak-2、・・・a1、a0、cm-1、cm-2、・・・c1、c0”のように表される。BCH符号の生成は、mビットの符号化ビットを求めることになる。
 このベクトルを表現した多項式は、式(1)となる。
Figure JPOXMLDOC01-appb-M000001
 また、情報ビット部分をP(x)とし、符号ビットをR(x)とすると、式(2)のとおり表現できる。
Figure JPOXMLDOC01-appb-M000002
 また生成多項式と呼ぶm次の多項式G(x)を導入し、G(x)で割り切れるもののみを符号語とするとF(x)とG(x)の間には、次式(3)が成り立つ。なお、次式(3)では、F(x)がG(x)で割り切れるということを式で表現するため、F(x)をG(x)で割ったときの商を“Q(x)”としている。
Figure JPOXMLDOC01-appb-M000003
 式(2)及び式(3)より次式(4)が得られる。
Figure JPOXMLDOC01-appb-M000004
 この式から、BCH符号の生成はxmP(x)をG(x)で割った余りR(x)を求めることである。
 K-1次の多項式、式(5)
Figure JPOXMLDOC01-appb-M000005
 をm次の多項式、式(6)
Figure JPOXMLDOC01-appb-M000006
で割ったときの商と余りを計算する回路は一般的には図33に示すようになる。
 更に、図33に示された回路をxmP(x)をG(x)で割る回路に変形すると、図34の構成のようになる。図34は、実際にBCH符号を生成するのに用いられる回路を示している。余りR(x)は、ak-1、ak-2、・・・a1、a0を入力後、シフトレジスタに蓄えられている情報をシフト操作により出力することにより得ることができる。この図34に示された符号化回路で演算することで、図31に示した(15,7)符号を生成できる。本発明の符号化回路106には図34の回路は使用せずに、図31の演算結果を表す式を用いて構成する。この式を用いることで、図34の回路のように符号化に何サイクルも要せずに、符号化することができる。(15,7)符号は、生成パラメータが2(t=2)のケースであり、上述の図31に示される元情報に符号化ビットが付加された15ビットの符号になる。そして、この符号が、符号化後の入力データとなる。即ち、制御回路105を介して、検索メモリマット102に入力されるキーデータが生成される。t=4では図32のようになり、より散乱度が増している。図32は、本発明の他の例で、8ビットの元情報とこれから生成される20ビットの符号化ビットを示す図である。
 図32において、8ビットの元情報としてのキーデータ“a7 a6 a5 a4 a3 a2 a1 a0 ”に対する符号化処理により20ビットの符号化ビットが生成されている。符号化ビットの各ビットは、“a1+a2+a3処、“a0+a1+a2”、“a0+a2+a3+a6+a7”、“a3+a5”、“a2+a4+a7”、“a1+a3+a6+a7”、“a0+a2+a5+a6”、“a2+a3+a4+a5+a6”、“a1+a2+a3+a4+a5+a7”、“a0+a1+a2+a3+a4+a6+a7”、“a0+a5”、“a1+a2+a3+a4+a6+a7”、“a0+a1+a2+a3+a5+a6”、“a0+a3+a4+a5+a6”、“a1+a4+a5+a6”、“a0+a3+a4+a5+a6”、“a1+a4+a6+a7”、“a0+a3+a5+a6+a7”、“a1+a3+a4+a5”、“a0+a2+a3+a4+a7”となる。このように、生成される符号化ビットの各ビットには、元情報としてのキーデータの各ビットの値が混合、拡散され冗長性が確保されたものとなっている。そして、図31の場合に比べ、散乱度は明らかに増大している。この元情報から生成される20ビットの符号化ビットは元情報のXOR論理式で表されており、そのまま元情報のXOR論理回路に変換できる。
 上記の符号化回路106に要求される条件としては、データの書き込み時と検索時で符号化回路106の出力が一致することである。即ち、符号化回路106は、データの書き込み時と検索時で同一の符号化を実行する。このように、符号化回路106は、データの書き込み時と検索時で異なる符号化ビットを生成することがないように保証されていれば良い。このようにすることで、検索メモリマット102を構成する各SRAMの対応関係を維持することができる。
 図36を用いて、本発明の検索メモリマット102への書き込み動作を説明する。図36では、説明を分かりやすくするため、4つのエントリアドレスに対応する入力データとしてのキーデータ“167”、“235”、“116”、“90”は、(  )内に表示されている。すなわち、(  )内に表示されているキーデータは、符号化される前のデータである。そして、これらのデータが、符号化回路106によって符号化されて、“2699”、“3779”、“1859”、“1440”というキーデータに変換されている。
 図36の例では、検索メモリマット102は、6つの分割メモリに分割されている(分割数N=6)。そして、制御回路105が、符号化後のキーデータである“2699”“3779”“1859”“1440”のそれぞれに対し、エントリアドレス“00”“01”“10”“11”を割り当てた場合を想定している。
 つまり、エントリアドレス“00”に書き込まれるべきデータとして入力されたキーデータ“167”は、符号化回路106により、“2699”に変換される。また、符号化後のキーデータ“2699”は、バイナリデータで表わすと“10 10 10 00 10 11”となる。符号化後のキーデータが制御回路105に入力されると、この制御回路105は、この符号化後のキーデータを複数に分割する。図36に示された例では、符号化後のキーデータは、6つに分割されている。この分割したキーデータのそれぞれを、6分割された検索メモリマット102に対して書き込む。この際、検索メモリマット102に書き込まれるデータは、符号化後のキーデータ“2699”に対応したエントリアドレス“00”である。
 図36(a)に示されるように、符号化されたキーデータ“2699”は、制御回路105によって6分割されて、“10”“10”“10”“00”“10”“11”として表わされる。制御回路105は、最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aに対して、エントリアドレス“00”を書き込む。次に、制御回路105は、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bに対し、エントリアドレス“00”を書き込む。更に、制御回路105は、3番目の分割キーデータ“10”をアドレスとして、3番目の分割メモリ102cに対して、エントリアドレス“00”を書き込む。また、制御回路105は、4番目から6番目の分割キーデータ“00”“10”“11”についても同様に、4番目から6番目の分割メモリ102d、102e、102fのそれぞれに、エントリアドレス“00”を書き込んでいく。
 これにより、符号化後のキーデータ“2699”で指定された検索メモリマット102に対し、エントリアドレス“00”が書き込まれたことになる。
 続いて、エントリアドレス“01”に書き込まれるべきデータとして入力されたキーデータ“235”は、符号化回路106により、“3779”に変換される。符号化後のキーデータ“3779”は、バイナリデータで表わすと“11 10 11 00 00 11”となる。ここで、制御回路105は、6分割された検索メモリマット102に対して、この符号化後のキーデータ“3779”に対応したエントリアドレス“01”を書き込んでいく。
 図36(b)に示されるように、符号化後のキーデータ“3779”は、制御回路105によって6分割され、“11”“10”“11”“00”“00”“11”として表わされる。制御回路105は、これらの分割キーデータをアドレスとして、検索メモリマット102に対して、エントリアドレス“01”を書き込む。つまり、制御回路105は、最初の分割キーデータ“11”をアドレスとして、最初の分割メモリ102aにエントリアドレス“01”を書き込む。また、制御回路105は、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bに対し、エントリアドレス“01”を書き込む。この際、既に、符号化後のキーデータ“2699”の書き込みによって、2番目の分割メモリ102bのアドレスには、エントリアドレス“00”が書き込まれている。そこで、制御回路105は、アドレスの衝突した箇所に衝突フラグを書き込み、後の読み出し処理においては、「配慮しない(don’t care)」ものとして処理する。また、図36(b)に示されるように、さらに、制御回路105は、3番目の分割キーデータ“11”をアドレスとして、3番目の分割メモリ102cにエントリアドレス“01”を書き込む。同様に、制御回路105は、4番目から6番目のキーデータ“00”“00”“11”をアドレスとして、4番目から6番目の分割メモリ102d、102e、102fに対し、エントリアドレス“01”を書き込む。ただし、4番目と6番目の分割メモリ102d、102fのアドレスには既に、符号化後のキーデータ“2699”のエントリアドレスが書き込まれているため、制御回路105は、このアドレスに衝突フラグを設定し、後に行なわれる検索処理では「配慮しない(don’t care)」ものとして処理する。
 これにより、符号化後のキーデータ“3799”で指定された検索メモリマット102に、エントリアドレス“01”が書き込まれたことになる。同様にして、元情報であるキーデータ“116”“90”を符号化回路で“1859”“1440”に変換し、これらの符号化後のキーデータ“1859”“1440”をアドレスとして、検索メモリマット102にエントリアドレス“10”“11”を書き込む。なお、図36(c)に示されるように、符号化後のキーデータ“1859”の書き込み処理では、新たに5番目の分割メモリ102eにおいてアドレス衝突が生じる。また、図36(d)に示されるように、符号化後のキーデータ“1440”の書き込み処理では、新たに1番目及び3番目の分割メモリ102a、102cにおいてアドレス衝突が生じている。
 図36(e)上段は、確認メモリマット(SRAM)104の書き込み状態の例を示している。
 図36(e)上段に示されるように、確認メモリマット104においては、エントリアドレス“00”にキーデータ”167”のバイナリデータ“10 10 10 00”が書き込まれ、エントリアドレス“01”にキーデータ“235”のバイナリデータ“11 10 11 00”が書き込まれ、エントリアドレス“10”にキーデータ“116”のバイナリデータ“01 11 01 00”が書き込まれ、エントリアドレス”11”にキーデータ“90”のバイナリデータ“01 01 10 10”がそれぞれ書き込まれている。
 また、図36(e)下段に示されるように、確認メモリマット104のエントリアドレス“00”“01”“10”“11”に、符号化後のキーデータ“2699”、“3779”、“1859”、“1440”を書き込むこととしてもよい。
 図37は、本発明に係る半導体装置(SRAM-CAM)の検索動作を示した図である。図37(a)は、元情報のキーデータとして“167”が入力され、符号化回路106によって符号化後のキーデータ“2699”に変換されたときの検索動作を示している。符号化後のキーデータ“2699”は、バイナリデータでは“10 10 10 00 10 11”として表わされる。このバイナリデータが、制御回路105において6つに分割される。分割されたキーデータは、それぞれ、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとして用いられる。最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aからデータを読み出すと、エントリアドレス“00”が読み出される。また、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bからデータを読み出す。しかし、このデータは、図36(b)で示した符号化後のキーデータ“3799”の入力時に、アドレス衝突が生じているため、「配慮しない(don’t care)」処理を行なう。すなわち、2番目の分割メモリ102bからの読み出しデータは検索の対象外となる。
 また、3番目の分割キーデータ“10”、4番目の分割キーデータ“00”、及び6番目の分割キーデータ“11”のそれぞれをアドレスとした検索処理も同様に、アドレスの衝突が生じていることから、「配慮しない(don’t care)」処理によって、読み出したデータは検索の対象外とする。また、5番目の分割キーデータ“10”については、これをアドレスとして5番目の分割メモリ102eにアクセスすると、エントリアドレス“00”を読み出すことができる。
 図37(a)に示されるように、符号化後のキーデータ“2699”に基づいて、検索メモリマット102から読み出されたデータは、最初の分割メモリ102aのデータと5番目の分割メモリ102eのデータが、共に“00”であり一致している。これにより、符号化後のキーデータ“2699”に対応するエントリアドレスは、“00”であると推測できる。
 そこで、確認メモリマット104を用いて、エントリアドレス“00”によりアクセスされるキーデータの値を読み出すと、“10 10 10 00”となり、符号化前の入力データであるキーデータ“10 10 10 00”と一致することが分かる。このように、制御回路105は、確認メモリマット104からの出力データであるキーデータと、符号化前の検索データとしてのキーデータを比較し、両者が一致することを確認して、エントリアドレスを出力する。
 図37(b)は、符号化後のキーデータ“3779”が、検索対象として入力された場合を示している。キーデータ“3779”は“11 10 11 00 00 11”のバイナリデータで表わされ、制御回路105によって6分割される。分割されたキーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“11”をアドレスとして、最初の分割メモリ102aからデータを読み出すと、エントリアドレス“01”が読み出される。2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bからデータを読み出すが、このデータにはアドレス衝突が生じているため、「配慮しない(don’t care)」ものとして処理する。これにより、2番目の分割キーデータ“10”は検索の対象外とされる。
 3番目の分割キーデータ“11”をアドレスとして、3番目の分割メモリ102cからデータを読み出すと、エントリアドレス“01”が読み出さる。他方、4番目の分割キーデータ“00”、5番目の分割キーデータ“00”、及び6番目の分割キーデータ“11”のそれぞれをアドレスとした3~6番目の分割メモリ102d、102e、102fへのアクセスは、「配慮しない(don’t care)」処理によって、検索の対象外となる。
 図37(b)に示されるように、符号化後のキーデータ“3779”によって検索メモリマット102から読み出される値は、1番目及び3番目の分割メモリ102a、102cのエントリアドレス“01”ということになる。
 そこで、確認メモリマット104を用いて、エントリアドレス“01”によってアクセスされるキーデータの値を読み出すと、“11 10 11 00”となり、符号化前のキーデータ“11 10 11 00”と一致する。つまり、制御回路105は、確認メモリマット104からの出力データとしてのキーデータと、符号化前の検索データとしてのキーデータと比較して一致することを確認した上で、エントリアドレスを出力する。
 続いて、図37(c)は、検索メモリマット102に書き込まれていないキーデータ“94”が符号化され、符号化後のキーデータ“1504”が、検索対象として入力された場合を示している。
 図37に示されるように、符号化回路106は、キーデータ“94”を符号化して、“1504”に変換する。符号化後のキーデータ“1504”は、バイナリデータデータ“01 01 11 10 00 00”で表わされる。符号化後のキーデータは、制御回路105において6分割される。分割されたキーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初のキーデータ“01”をアドレスとして、最初の分割メモリ102aからデータを読み出すと、アドレス衝突しているため「配慮しない(don’t care)」処理が行なわれる。また、2番目の分割キーデータ“01”をアドレスとして、2番目の分割メモリ102bのデータを読み出すと、エントリアドレス“11”が出力される。
 また、図37(c)に示されるように、符号化後の入力データ“1504”に基づいて検索メモリマット102から読み出されるデータは、2番目の分割メモリ102bの出力としてのエントリアドレス“11”、3番目の分割メモリ102cの出力としてのエントリアドレス“01”、及び4番目の分割メモリ102dの出力としてのエントリアドレス“11”と、6番目の分割メモリ102fの出力としてのエントリアドレス“11”ということになる。なお、5番目の分割キーデータ“00”をアドレスとした分割メモリ102eへのアクセスは「配慮しない(don’t care)」処理によって、検索の対象外とされている。この場合に、検索メモリマット102から読み出されるエントリアドレスは、複数種類存在する。すなわち、エントリアドレスに不一致が発生している。このため、制御回路105は、確認メモリマット104を用いなくても、この段階で、検索データとしてのキーデータと一致するデータは、検索メモリマット102内に存在していないと判定することができる。
 次に、図38~図41を参照して、符号化ビットのみを用いて符号化した場合の実施例について説明する。説明を簡単にするため、SRAM-CAMに入力するキーデータのビット長を24ビットとし、符号化により生成される符号化後のキーデータのビット長も24ビットとする。また、符号化後のキーデータを前記の説明と同じように6分割し、分割したキーデータで、6分割された検索メモリマット102を検索する構成になっているとする。この前提から、SRAM-CAMの検索メモリマット102は、16ワード×4ビットのSRAM6個で構成されることが分かる。このため、SRAM-CAMのエントリ数は16となる。
 24ビットの元情報から24ビットの符号化ビットを生成する方法には様々な方法がある。ここでは、図38を用いて、符号化ビットの生成方法の一例を説明する。図38は、8ビットの元情報から10ビットの符号化ビットを生成することができる例を示している。ただし、符号化ビットの10ビットの中では、元情報が拡散されているため、c0とc1を除きc2からc9までのビットを使用するものとする。このようにすると、8ビットの元情報から8ビットの符号化ビットが生成されることになる。しかし、このままでは24ビットのキーデータに対して8ビット単位でしか符号化できない。8ビット単位で24ビットの符号化を行うと、キーデータに偏りがあったとき対処できないという問題が発生する。そこで、24ビットのキーデータを4ビットずつ6つのグループに分け、グループ単位で所定のアルゴリズムに従いグループの配列を入れ替える操作を行う。そして、入れ替えたグループの左端から2グループずつ8ビット単位で符号化する。この方法は、図39に示されている。
 図39は、SRAM-CAMに入力する元情報であるキーデータ(図39(a))と、4ビットずつグループ分けしグループの配列変更を行った後のキーデータ(図39(b))と、8ビット単位で符号化した後のキーデータ(図39(c))、の3種類のデータの変化を示している。丸内の数字(1)から(6)は、グループの区別を行うために記したものである。
 図39(a)(b)(c)の3種類のデータは、SRAM-CAMのエントリ数が16であり、検索メモリマット102には16種類のデータを書き込むことができるため、エントリ番号順に16個記述している。また、偏りの影響を見るために、元情報の6グループの内3グループ((1)から(3))のデータは、全て同じ値である場合を想定している。図39のエントリアドレスと(1)から(6)とが示す場所の数字は、4ビットで表される2進数を10進数で表記したものである。元情報としてのキーデータのエントリアドレス“0”において、(1)から(6)の6つの数字“4”、“1”、“13”、“14”、“11”、“5”は、24ビットの元情報を4ビットずつ区切ったときの(1)から(6)の各グループの値を示している。従って、このグループの配列変更を実施すると、図39(b)に示したように、(1)、(2)、(3)、(4)、(5)、(6)の元情報が、(2)、(5)、(6)、(3)、(1)、(4)の順に並び替えられる。また、並び替え後のエントリアドレス“0”は、その24ビットのバイナリデータが、“1”、“11”、“5”、“13”、“4”、“14”となる。このデータを8ビット単位の符号化で(2)(5)、(6)(3)、(1)(4)の8ビットのデータと見做して、図38に示された符号化ビットのXOR論理式に従い、XOR組み合わせ論理回路で変換する。この8ビット単位の符号化を実施した結果は、図39(c)に示されている。すなわち、図39(c)に示されるように、符号化を実施すると、エントリアドレス“0”のところでは、“1”、“7”、“1”、“10”、“6”、“12”で表される24ビットのデータとなっている。
 図40(a)は、元情報としてのキーデータを符号化しないでSRAM-CAMの検索メモリマット102に書き込み、検索メモリマット102に書き込まれたデータを読み出した場合を示している。図40(a)は、左から順に、元情報としてのキーデータ、検索メモリマット102の内容、及び検索メモリマット102の読み出し結果を示している。図40(b)は、前述した8ビット単位の符号化を実施した後で、検索メモリマット102に書き込み、そのデータを読み出した場合を示している。すなわち、図40(b)は、検索メモリマット102のエントリ数が16であるため、16種のキーデータを書込み、検索メモリマット102から読み出した場合を示している。図40(b)は、左から順に、8ビット単位の符号化を実施したデータ、検索メモリマット102の内容、及び検索メモリマット102の読み出し結果を示している。
 図40(a)に示されるように、符号化を行わないと、(1)、(2)、(3)の分割メモリでの偏りが大きくなり、1種類のデータしか書き込まれない状態が生じる。また、図40(a)に示されるように、エントリアドレス順に検索メモリマット102への書き込みを行うと、(1)、(2)、(3)のメモリマットには10進数でエントリアドレスの“0”が書き込まれ、その後の書き込み操作ではアドレス衝突状態になる。図40において、塗りつぶし状態で書き込まれている情報は“0”である。また、(4)、(5)、(6)のデータは、ランダム状態を仮定しているため、検索メモリマット102で見るとアドレス衝突がランダムに発生していることが分かる。図40では、アドレス衝突は、塗りつぶし状態で表示されている。この検索メモリマット102に書き込まれた内容を読み出すと(1)、(2)、(3)は完全な衝突状態になり、SRAM-CAMとして機能しているのは、実質的には(4)、(5)、(6)の3つのメモリマットしかないことが分かる。このように、アドレス衝突が多発して、6つの分割メモリの内3つしか機能していないため、16エントリの内5エントリの読み出し、すなわちエントリアドレス“1”、“6”、“7”、“10”、“11”の読み出しで、(1)から(6)が全て衝突状態になる。しかしながら、(1)から(6)の全衝突が発生していないところでは、検索メモリマット102に書き込まれているエントリアドレスと分割したキーデータのエントリアドレスが一致するので正しい検索ができているともいえる。
 図40(b)は、8ビット単位の符号化処理を実施した場合の例である。図40(b)に示されるように、符号化処理を行うことにより、図40(a)で示した(1)、(2)、(3)で発生したような極端な衝突は発生しなくなった。ただし、検索メモリマット102の読出し結果は、符号化処理をした場合と符号化処理しない場合とで、同じ結果となっている。これは、図39の8ビット単位の符号化を実施する前のグループの配列変更実施後のデータに示しているように、符号化の対象となる2つのデータの内の1つが全く変化しない固定データになっているためである。そこで、8ビット単位の符号化実施後のデータを元情報として、もう一度、グループ配列変更と8ビット単位の符号化を行い、この結果を2回目の8ビット単位の符号化の実施とし、このデータを用いて検索メモリマット102への書き込みと、読み出しを実施する。
 図41(a)は、元情報としてのキーデータを符号化しないでSRAM-CAMの検索メモリマットに書き込み、読み出しを行った場合の結果を示し、図41(b)は、2回目の8ビット単位の符号化を行い、このデータを用いて検索メモリマットに書き込みと読み出しを行った場合の結果を示している。図41(b)に示されるように、2回目の8ビット単位の符号化を行ったデータで検索メモリマット102に書き込み、書き込んだデータを読み出すと6つの分割メモリが全てアドレス衝突になるような状態はなくなる。また、図41(b)に示されるように、分割メモリから読み出されるエントリアドレスの全てが、キーデータのエントリアドレスと一致し、16個のエントリデータの全てが正しく検索できていることが分かる。
 この結果から、データの偏りが大きい場合であっても、符号化処理を複数回行うことで、より効果的にデータの偏りを除去できることが分かる。本実施例では、符号化を8ビット単位で行っているが、符号化は8ビットである必要はなく様々な組み合わせを選択することができる。すなわち、本発明は、符号生成パラメータや元情報のビット数を選択することで、様々な符号化ビットを生成することができる。例えば、検索メモリマット102の構成を変えない場合であっても、元情報を12ビットあるいは16ビットにし、10ビットの符号化ビットを生成し、このうち本実施例のように8ビット使用してもよく、元情報を24ビットにして、符号化ビットを24ビットにしてもよい。元情報を16ビットにした場合は、得られる符号化ビットを8ビットにした場合において、6個の4ビットグループ(1)~(6)の中から重ならないように4つのグループを選択すれば、24ビットの符号化ビットを生成できる。
 図42は、検索時に入力されるキーデータの全列に衝突の状態が発生した場合であっても、検索結果を出力できるようにしたSRAM-CAMの書き込み動作を説明するための図である。
 本実施例において、半導体メモリ回路の構成、及びSRAM-CAMのスイッチ又は検索の動作については実施例1と同様であるため説明を省略する。
 図42を参照して、本実施例における検索メモリマット102への書き込み動作を説明する。なお、本実施例では、エントリアドレスが2ビット4ワード、入力データとしてのキーデータ長が12ビットの場合を想定している。図42の例では、検索メモリマット102は6分割されている。
 また、本実施例では、キーデータ“2699”“2691”“1859”“1440”を、エントリアドレス“00”“01”“10”“11”のそれぞれに書き込む場合を想定している。
 エントリアドレス“00”に書き込まれるべきデータとして入力されたキーデータ“2699”は、バイナリデータで表わすと“10 10 10 00 10 11”となる。この値を6分割された分割メモリ102a~102fのy軸のアドレスとして、検索メモリマット102にデータを書き込む。この際、書き込まれるデータは、例えば、キーデータ“2699”のエントリアドレス“00”である。
 図42(a)に示されるように、キーデータ“2699”が6分割され、“10”“10”“10”“00”“10”“11”として表わされ、これらをアドレスとして、分割メモリ102a~102fに対して、エントリアドレス”00”が書き込まれる。つまり、制御回路105は、最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aに対し、エントリアドレス“00”を書き込む。また、制御回路105は、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bに対し、エントリアドレス“00”を書き込む。更に、制御回路105は、3番目の分割キーデータ“10”をアドレスとして、3番目の分割メモリ102cに対し、エントリアドレス“00”を書き込む。また、制御回路105は、4番目から6番目の分割キーデータ“00”“10”“11”をアドレスとして、4番目から6番目の分割メモリ102d、102e、102fに対し、エントリアドレス“00”を書き込む。
 これにより、キーデータ“2699”で指定された検索メモリマット102に、エントリアドレス“00”が書き込まれたことになる。
 同様にして、エントリアドレス“01”に書き込まれるべきデータとして入力されたキーデータ“2691”は、バイナリで表わすと“10 10 10 00 00 11”となる。この値を6分割された検索メモリマットのy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとして、検索メモリマット102にデータを書き込む。この際、書き込まれるデータは、エントリアドレスとして入力された“01”である。
 図42(b)に示されるように、キーデータ“2691”が6分割され、“10”“10”“10”“00”“00”“11”として表わされ、これらをアドレスとしてエントリアドレス“01”が検索メモリマット102に対して書き込まれる。つまり、制御回路105は、最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aに対し、エントリアドレス“01”を書き込む。この際、既に、キーデータ“2699”の書き込み処理において、最初の分割メモリ102aのアドレスには、エントリアドレス“00”が書き込まれていることから、アドレスの衝突が生じる。図42(b)では、アドレスの衝突が生じた部分を、塗りつぶして示している。このアドレスの衝突が生じた部分は、後の読み出し処理において、「配慮しない(don’t care)」として処理される。
 図42(b)に示されるように、さらに、制御回路105は、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bに対し、エントリアドレス“01”を書き込む。また、制御回路105は、3番目から6番目の分割キーデータ“10”“00”“00”“11”をアドレスとして、それぞれ、3番目から6番目の分割メモリ102c、102d、102e、102fに対し、エントリアドレス“01”を書き込む。ただし、2番目~4番目と6番目のアドレスには既に、キーデータ“2699”のエントリアドレスが書き込まれているため、制御回路105は、衝突フラグを設定し、後の読み出し処理において「配慮しない(don’t care)」ものとして処理する。
 これにより、キーデータ“2691”で指定された検索メモリマット102に対しエントリアドレス“01”が書き込まれたことになる。
 同様に、制御回路105は、キーデータ“1859”“1440”をアドレスとして、SRAM-CAMの検索メモリマット102に、エントリアドレス“10”“11”を書き込む。図42(c)に示されるように、キーデータ“1859”の書き込み処理においては、4番目~6番目の分割メモリ102d、102e、102fでアドレス衝突が生じる。また、図42(d)に示されるように、キーデータ“1440”では、1、3、5番目の分割メモリ102a、102c、102eでアドレス衝突が生じている。
 図42(e)は、確認メモリマット(SRAM)104の書き込み状態を示している。
 図42(a)において、エントリアドレス“00”にキーデータ”2699”のバイナリデータが書き込まれ、エントリアドレス“01”にキーデータ“2691”のバイナリデータが書き込まれ、エントリアドレス“10”にキーデータ“1859”のバイナリデータが書き込まれ、エントリアドレス”11”にキーデータ“1440”のバイナリデータが書き込まれている。
 図43は、本発明の[実施例5]に係るSRAM-CAMの検索動作を示す図である。
 図43は、図42に示したアドレスの重なった部分、つまり、濃く網掛けされたエントリを「配慮しない(don’t care)」とした場合に、入力データが正しく検索されているか否かを表わしている。
 図43(a)では、検索データとしてのキーデータ“2699”が入力された場合を示している。検索データとしてのキーデータ“2699”は、“10 10 10 00 10 11”のバイナリで表わされ、制御回路105によって、2ビットずつに6分割される。分割されたキーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。まず、制御回路105は、最初の分割キーデータをアドレスとして、最初の分割メモリ102aからエントリアドレス“00”を読み出すと、このデータはアドレス衝突が生じているため、「配慮しない(don’t care)」ものして処理する。よって、制御回路105は、最初の分割メモリ102aからの読み出しデータを検索の対象外とする。また、制御回路105は、2番目の分割キーデータ“10”、3番目の分割キーデータの“10”、4番目の分割キーデータの“00”、及び6番目の分割キーデータの“11”のそれぞれをアドレスとして、各分割メモリ102b、102c、102d、102fへアクセスする。ただし、制御回路105は、これらのアクセスについてはアドレスの衝突が生じているため、「配慮しない(don’t care)」処理によって、読み出したデータを検索の対象外とする。他方、制御回路105は、5番目の分割データの“10”をアドレスとして、5番目の分割メモリ102eからエントリアドレス“00”を読み出すことができる。
 図43(a)に示されるように、検索データとしてのキーデータ“2699”によって検索メモリマット102から読み出されたデータのうち、実際に検索に使用されるデータは、5番目の分割メモリ102eから読み出されたエントリアドレス“00”ということになる。
 そこで、制御回路105は、確認メモリマット104を用いて、エントリアドレス“00”によりアクセスされるキーデータの値を読み出すと、“10 10 10 00 10 11”となり、これは入力データとしてのキーデータと一致することが分かる。つまり、制御回路105は、確認メモリマット104からのキーデータである出力データと入力データを比較して正しいことを確認した上で、エントリアドレスを出力する。
 図43(b)は、検索データとしてのキーデータ“1859”が入力された場合を示している。検索データとしてのキーデータ“1859”は“01 11 01 00 00 11”で表わされ、制御回路105によって2ビットずつ6分割される。分割キーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。制御回路105は、最初の分割キーデータ“01”をアドレスとして、最初の分割メモリ102aのデータを読み出すが、このデータは、アドレス衝突が生じているため、「配慮しない(don’t care)」処理を行なうようにする。また、制御回路105は、2番目の分割キーデータ“11”をアドレスとして、2番目の分割メモリ102bからデータを読み出すと、エントリアドレス“10”を読み出すことができる。また、制御回路105は、3番目の分割キーデータ“01”をアドレスとして、3番目の分割メモリ102cからデータを読み出すと、エントリアドレス“10”を得ることができる。
 なお、4番目の分割キーデータ“00”、5番目の分割キーデータ“00”、及び6番目の分割キーデータ“11”のそれぞれをアドレスとした分割メモリ102d、102e、102fへのアクセスは、「配慮しない(don’t care)」処理によって、検索の対象外となる。
 図43(b)に示されるように、検索データとしてのキーデータ“1859”によって検索メモリマット102から読み出される値は、2番目の分割メモリ102bからの出力であるエントリアドレス“10”と、3番目の分割メモリ102cからの出力であるエントリアドレス“10”ということになる。
 確認メモリマット104を用いて、エントリアドレス“10”をアドレスとしてアクセスされるキーデータの値を読み出すと、“01 11 01 00 00 11”となり、これは検索データとしてのキーデータと一致していることが分かる。つまり、制御回路105は、確認メモリマット104からのキーデータとしての出力データが、検索データと比較して正しいことを確認して、エントリアドレスを出力する。
 図43(c)に、検索データとしてのキーデータとして“2691”が入力された場合を示す。検索データとしてのキーデータ“2691”は、“10 10 10 00 00 11”のバイナリで表わされる。制御回路105は、キーデータ“2691”のバイナリデータを、2ビットずつに6分割する。分割キーデータは、6分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aのデータを読み出すと、「配慮しない(don’t care)」処理が行われる。また、2番目の分割キーデータ“10”、3番目の分割キーデータ“10”、4番目の分割キーデータ“00”、5番目の分割キーデータ“00”、分割キーデータ6番目の“11”をアドレスとして、各分割メモリ102b、102c、102d、102e、102fのデータを読み出すと、「配慮しない(don’t care)」処理が行なわれて、検索の対象外となる。即ち、図43(c)に示した例では、キーデータを分割した全ての分割桁で、アドレスの衝突が生じている状態となっている。
 この場合、制御回路105は、まず、「配慮しない(don’t care)」とした各分割メモリ102a~102fのアドレスから、そのアドレスに書き込まれているエントリアドレスを読み出す。すなわち、各分割メモリ102a~102fには衝突が生じている場合であっても、衝突フラグとともに、一つのエントリアドレスが書き込まれている。制御回路105は、この衝突フラグとともに書き込まれているエントリアドレスを、各分割メモリ102a~102fから読み出しておく。そして、制御回路105は、衝突フラグとともに書き込まれているエントリアドレスを用いて、図43(e)に示された確認メモリマット104を順次参照する。この図43(e)に示された例において、衝突した状態のエントリアドレスは“00”と“01”である。最初に、制御回路105は、確認メモリマット104から、エントリアドレス“00”に対応したキーデータの値を読み出すと“10 10 10 00 10 11”であることがわかる。このキーデータ“10 10 10 00 10 11”は、検索対象データとして入力されたキーデータと一致していない。よって、制御回路105は、“00”は求めているエントリアドレスではないと判断する。次に、制御回路105は、確認メモリマット104のエントリアドレス“01”に対応しているキーデータの値を読み出すと、“10 10 10 00 00 11”であることがわかる。このキーデータ、“10 10 10 00 00 11”は、検索対象データとして入力されたキーデータと一致している。よって、制御回路105は、“01”が求めるエントリアドレスであると判断することができる。そして、制御回路105は、検索結果として、このエントリアドレス“01”を出力する。このように、分割した検索データの全てが衝突した状態にあるときでも、確認メモリマット104を衝突した状態のエントリアドレスで順次参照することで、キーデータと一致するキーデータを抽出することが可能となる。
 すなわち、本発明の実施例においては、エントリアドレスの書き込み処理時にアドレスの衝突が発生すると、「配慮しない(don’t care)」処理を行う。この「配慮しない(don’t care)」処理では、(1)エントリアドレスの書き込み動作を止めるか、(2)既に書き込まれているエントリアドレスに他のエントリアドレスを上書きする処理のいずれかがなされる。このため、検索メモリマット102には、前者(1)の場合は、最初に書き込まれたエントリアドレスが書き込まれた状態になっており、後者(2)の場合は、最後に書き込まれたエントリアドレスが書き込まれた状態になっている。このため、アドレスに衝突が発生した状態であっても、そのアドレスには、検索の対象となるエントリアドレスが含まれている可能性がある。そこで、本発明の実施例ではこの可能性に着目し、衝突が発生したアドレスの中に含まれているエントリアドレスを抽出することで、検索対象を発見することのできる可能性を高めることとしている。これにより、本発明の実施例では、検索時に入力される検索データに全列衝突の状態が発生しても、その中に検索の対象となるエントリアドレスが含まれていれば、検索結果を出力することができる。
 まず前提として、先述したとおり、検索メモリマット102を分割するときには、最低限以下の個数が必要となる。
 (式)N=L/log・M
     L:キーデータ長
     M:総エントリ数
     N:検索メモリマットの分割数(分割メモリの最小個数)
 例えば、キーデータ長が32ビットであり、検索メモリマットの総エントリ数が8ビット256ワードである場合、分割メモリは最低限の4個必要となる。また、キーデータ長が同一である場合、検索メモリマットの総エントリ数が増加すれば、必要最低限の分割数は減少する。しかし、分割メモリの個数が減少すると情報の分散が小さくなり、衝突確率が上がる傾向にある。そのため本実施例では、以下に説明するとおり、分割メモリの数を増加して、衝突頻度を低減させることとしている。なお、例えば12ビットのデータ長の場合、通常は1ビット目から12ビット目として各ビットを特定するが、以下では便宜上、0ビット目から11ビット目と称し説明する。
 図44は、本発明の第6の実施例を示す検索メモリマットの書き込み動作を示す図である。図44を参照して、本発明における検索メモリマット102への書き込み動作を説明する。なお、本実施例では、エントリアドレスが2ビット4ワード、キーデータ長が12ビットの場合を想定している。この場合、上述の式により、最低限必要となる分割メモリの個数は6個となる。図44では、検索メモリマット102が、分割メモリ102a~102fの6個に分割されており、さらに追加用分割メモリ102g~102lの6個を加え、12個の分割メモリとされた場合の例を示している。すなわち、本実施例では、[実施例1]と比較して、検索メモリマット102の分割数を2倍としている。また、本実施例では、キーデータとして、“2699”“2691”“1859”“1440”をエントリアドレス“00”“01”“10”“11”に書き込む場合を想定している。
 なお、検索メモリマット102にデータを書き込む際の具体的な動作を説明する前に、追加用分割メモリ102g~102lに書きこまれるデータについて説明する。
 図44(a)において、検索メモリマット102の下部に、例えば[1:0]等として示した数字は、「キーデータ選択ビット」を意味している。ここにいう「キーデータ選択ビット」とは、複数の分割メモリ102a~102f毎に、各分割メモリに格納するキーデータのビット番号を選択するための情報である。例えば、図44(a)に示した例において、「キーデータ選択ビット」は、入力された12ビットのキーデータのバイナリデータのうち、その0ビット目と1ビット目が6番目の分割メモリ102fに格納され、2ビット目と3ビット目が5番目の分割メモリ102eに格納され、4ビット目と5ビット目が4番目の分割メモリ102dに格納され、6ビット目と7ビット目が3番目の分割メモリ102cに、8ビット目と9ビット目が2番目の分割メモリ102bに格納され、10ビット目と11ビット目が1番目の分割メモリ102aに格納されることを示している。
 また、図44(a)に示されるように、12ビットのキーデータのうち、4ビット目と6ビット目が12番目の分割メモリ102lに格納され、5ビット目と7ビット目が11番目の分割メモリ102kに格納され、0ビット目と8ビット目が10番目の分割メモリ102jに格納され、1ビット目と9ビット目が9番目の分割メモリ102iに格納され、2ビット目と10ビット目が8番目の分割メモリ102hに格納され、3ビット目と11ビット目が7番目の分割メモリ102gに格納されるように、「キーデータ選択ビット」が設定されている。
 このように、本実施例において、入力された12ビットのキーデータは、24ビットに拡張され、追加分割メモリを含む合計12個の分割メモリに分散して格納される。このため、6個の追加分割メモリには、6個の分割メモリに格納されるビットデータが重複して格納される。なお、このビットデータの重複は所望の値に設定でき、それにより追加用SRAMの個数も任意に設定することができる。
 次に、検索メモリマット102に対する書き込み動作を具体的に説明する。
 エントリアドレス“00”に書き込まれるべきデータとして入力されたキーデータ“2699”は、バイナリデータで表わすと“10 10 10 00 10 11”となる。そして、上述のとおり「キーデータ選択ビット」に従って、入力されたキーデータに、追加分割メモリに格納すべきビットデータを重複して追加する。すなわち、12ビットのキーデータに、12ビットのデータを下位ビットとして追加する。これにより、追加後のキーデータを“10 10 10 00 10 11 11 00 11 01 10 00”(24ビット)とする。この値を12分割された検索メモリマット102のy軸のアドレスとして、検索メモリマット102にデータを書き込む。この際、検索メモリマットに書き込まれるデータは、キーデータ“2699”のエントリアドレスとして入力された“00”である。
 図44(a)に示されるように、12ビットのキーデータ“2699”の下位に、キーデータ選択ビットに従った12ビットが追加される。これにより、キーデータ“2699”は、24ビットで表現される。そして、このデータは、12分割されて、“10”“10”“10”“00”“10”“11”“11”“00”“11”“01”“10”“00”として表わされる。制御回路105は、これらの12個の分割キーデータをアドレスとして、12個の分割マット102a~102lに対して、エントリアドレス“00”を書き込む。つまり、最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aに対し、エントリアドレス“00”が書き込まれる。次に、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bに、エントリアドレス“00”が書き込まれる。さらに、3番目の分割キーデータ“10”をアドレスとして、3番目の分割メモリ102cに、エントリアドレス“00”が書き込まれる。同様に、4番目から6番目の分割キーデータ“00”“10”“11”をアドレスとして、4番目から6番目の分割メモリ102d~102fにエントリアドレス“00”が書き込まれる。さらに、同じように、7番目から12番目の分割キーデータ“11”“00”“11”“01”“10”“00”をアドレスとして、7番目から12番目の分割メモリ102g~メモリ102lの6個の追加分割メモリにも、エントリアドレス“00”が書き込まれる。
 これにより、キーデータ“2699”で指定された検索メモリマット102に、エントリアドレス“00”が書き込まれたことになる。
 同様にして、エントリアドレス“01”に書き込まれるべきデータとして入力されたキーデータ“2691”は、バイナリで表わすと“10 10 10 00 00 11”となる。そして、上述のとおりキーデータ選択ビットに従って、入力されたキーデータに追加分割メモリに格納すべきビットデータを重複して追加する。つまり、12ビットのキーデータに、12ビットのデータを下位ビットとして追加する。追加後のキーデータは、“10 10 10 00 00 11 10 00 11 01 10 00”(24ビット)となる。この24ビットのキーデータを、12個の分割キーデータに分割する。そして、この分割キーデータを12分割された検索メモリマット102のy軸にアクセスするためのアドレスとして、検索メモリマット102にデータを書き込む。この際、検索メモリマット102に書き込まれるデータは、エントリアドレスとして入力された“01”である。
 図44(b)では、キーデータ“2691”に、上記のとおりキーデータ選択ビットに従って12ビットが下位に追加され、その後12分割されて、“10”“10”“10”“00”“00”“11”“10”“00”“11”“01”“10”“00”として表わされる。これらの分割キーデータをアドレスとして、分割された検索メモリマット102に対して、エントリアドレス“01”が書き込まれる。つまり、最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aにエントリアドレス“01”が書き込まれる。この際、既に、キーデータ“2699”の書き込みによって、分割メモリ102aのアドレスには、エントリアドレス“00”が書き込まれており、アドレスの衝突が生じる。図44(b)において、塗りつぶして示された部分が衝突の生じている部分であり、この衝突の生じた部分において、分割キーデータは、「配慮しない(don’t care)」として処理される。図44(b)では、さらに、2番目の分割キーデータ“10”をアドレスとして、2番目の分割メモリ102bにエントリアドレス“01”を書き込む。また、3番目から6番目の分割キーデータ“10”“00”“00”“11”をアドレスとして、それぞれ、3番目から6番目の分割メモリ102c、102d、102e、102fに、エントリアドレス“01”を書き込む。ただし、2番目から4番目と6番目のアドレスは既に、キーデータ“2699”の書き込みによって使用されているため、「配慮しない(don’t care)」として処理される。続いて、7番目から12番目の分割キーデータ“10”“00”“11”“01”“10”“00”をアドレスとしてそれぞれ、7番目から12番目の6個の追加分割メモリ102g~102lの6個に、エントリアドレス“01”を書き込む。ただし、8番目から12番目のアドレスも既に、分割キーデータ“2699”の書き込みによって使用されているため、「配慮しない(don’t care)」として処理される。
 これにより、キーデータ“2691”で指定された分割メモリに、エントリアドレス“01”が書き込まれたことになる。同様にして、キーデータ“1859”“1440”をアドレスとして、検索メモリマット102にエントリアドレス“10”“11”を書き込む。図44(c)に示されるように、キーデータ“1859”の書き込みによっては、4番目から6番目、9番目の分割メモリでアドレスの衝突が生じている。また、図44(d)に示されるように、キーデータ“1440”では、1、3、5、7、8、12番目の分割メモリでアドレスの衝突が生じている。
 図44(e)は、確認メモリマット(SRAM)104の書き込み状態を示している。
 図44(e)に示されるように、確認メモリマットには、エントリアドレス“00”にキーデータ”2699”のバイナリデータが書き込まれ、エントリアドレス“01”にキーデータ“2691”のバイナリデータが書き込まれ、エントリアドレス“10”にキーデータ“1859”のバイナリデータが書き込まれ、エントリアドレス”11”にキーデータ“1440”のバイナリデータが書き込まれている。
 図45は、本発明の[実施例6]における検索メモリマット102の検索動作を示している。図45は、図44に示したアドレスの重なった部分、つまり、濃く網掛けされたエントリを「配慮しない(don’t care)」とした場合に、入力データが正しく検索されているか否かを表わしている。
 図45(a)では、検索データとしてキーデータ“2699”が入力された場合を示している。キーデータ“2699”は、バイナリデータ“10 10 10 00 10 11”で表わされる。そして、図44で説明したとおり、キーデータ選択ビットに従い、12ビットのキーデータに、12ビットのデータを下位ビットとして追加する。追加後のキーデータは、“10 10 10 00 10 11 11 00 11 01 10 00”(24ビット)となる。この分割キーデータは、12分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aのデータであるエントリアドレスを読み出すと、アドレス衝突が生じているため、「配慮しない(don’t care)」処理を行なう。よって、分割メモリマット102aからの読み出しデータは検索の対象外とされる。2番目の以降の分割キーデータについても同様に、これらの分割キーデータをアドレスとして、検索メモリマット102からエントリアドレスを読み出す。ここで、5番目の分割キーデータ“10”をアドレスとして、5番目の分割メモリ102eからデータを読み出すとエントリアドレス“00”が読み出される。また、7番目の分割キーデータ“11”をアドレスとして、7番目の分割メモリマット102gを読み出すとエントリアドレス“00”が得られる。その他の分割キーデータについては、「配慮しない(don’t care)」処理によって検索の対象外とされる。
 図45(a)に示されるように、検索データとしてのキーデータ“2699”によって検索メモリマット102から読み出されるデータの内、検索に使用されるデータは、5番目の分割メモリ102eと7番目の分割メモリ102gの出力であるエントリアドレス“00”ということになる。
 確認メモリマット104を用いて、エントリアドレス“00”をアドレスとしてアクセスされるキーデータの値を読み出すと、“10 10 10 00 10 11”となり、検索データとしてのキーデータと一致することが分かる。つまり、制御回路105は、確認メモリマット104からの出力データであるキーデータと検索データを比較して一致することを確認した上で、エントリアドレスを出力する。
 図45(b)は、検索データとしてキーデータ“1859”が入力された場合を示している。キーデータ“1859”は“01 11 01 00 00 11”で表わされる。そして、図44で説明したとおり、キーデータ選択ビットに従って、12ビットのキーデータに、12ビットのデータを下位ビットとして追加する。追加後のキーデータは、“01 11 01 00 00 11 00 10 11 11 00 10”(24ビット)となる。これらの分割キーデータは、12分割された検索メモリマット102のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“01”をアドレスとして、最初の分割メモリ102aのデータを読み出すが、アドレス衝突が生じているため、「配慮しない(don’t care)」処理を行なうようにされている。よって、最初の分割キーデータは、検索の対象外となる。2番目の分割キーデータ“11”をアドレスとして、2番目の分割メモリ102bからデータを読み出すと、エントリアドレス“10”が読み出される。3番目の分割キーデータ”01”をアドレスとして、3番目の分割メモリ102cからデータを読み出すと、エントリアドレス“10”が得られる。
 4番目の“00”、5番目の“00”、6番目の“11”、7番目の“00”、8番目の“10”、9番目の“11”をそれぞれアドレスとした分割メモリへのアクセスは、配慮しない(don’t care)」処理によって、検索の対象外となる。また、10番目の分割キーデータ“11”をアドレスとして、10番目の分割メモリ102jからデータを読み出すと、エントリアドレス“10”が読み出される。11番目の分割キーデータ“00”をアドレスとして、11番目の分割メモリ102kからデータを読み出すと、エントリアドレス“10”が読み出される。また、12番目の分割キーデータ“10”をアドレスとして、12番目の分割メモリ102lからデータを読み出すと、エントリアドレス“10”が得られる。
 図45(b)で示したように、検索データとしてのキーデータ“1859”によって検索メモリマット102から読み出される値は、分割された2番目の分割メモリ102b、3番目の分割メモリ102c、10番目の分割メモリ102j、11番目の分割メモリ102k、及び12番目の分割メモリ102lの出力であるエントリアドレス“10”ということになる。
 確認メモリマット104を用いて、エントリアドレス“10”によりアクセスされるキーデータの値を読み出すと、“01 11 01 00 00 11”となり、検索データとしてのキーデータと一致することが分かる。つまり、制御回路105は、確認メモリマット104からの出力データであるキーデータが検索データと比較して一致することを確認した上で、エントリアドレスを出力する。
 図45(c)は、検索データとしてのキーデータとして“2691”が入力された場合を示している。検索データとしてキーデータ“2691”は、バイナリデータ“10 10 10 00 00 11”で表わされる。そして、図44で説明したとおりキーデータ選択ビットに従って、12ビットのキーデータに、12ビットのデータを下位ビットとして追加する。追加後のキーデータは、“10 10 10 00 00 11 10 00 11 01 10 00”(24ビット)となる。分割キーデータは、12分割された検索メモリマット102’のy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。最初の分割キーデータ“10”をアドレスとして、最初の分割メモリ102aのデータを読み出すと、アドレス衝突しているため「配慮しない(don’t care)」処理が行なわれる。2番目の”10”、3番目の“10”、4番目の“00”、5番目の“00”、6番目の“11”をアドレスとして、各分割メモリ102b、102c、102d、102e、102fのデータを読み出すと、アドレス衝突しているため「配慮しない(don’t care)」処理が行なわれる。
 続いて7番目の分割キーデータ“10”をアドレスとして、7番目の分割メモリ102gからデータを読み出すと、エントリアドレス“01”が読み出さる。他方、8番目の“00”、9番目の“11”、10番目の“01”、11番目の“10”、12番目の“00”をアドレスとして、各分割メモリのデータを読み出すと、アドレス衝突しているため「配慮しない(don’t care)」処理が行なわれて、検索の対象外とされる。
 図45(c)で示したように、検索データとしてのキーデータ“2691”によって検索メモリマット102から読み出される値は、7番目の分割メモリ102gの出力のエントリアドレス“01”ということになる。
 確認メモリマット104を用いて、エントリアドレス“01”によりアクセスされるキーデータの値を読み出すと、“10 10 10 00 00 11”となり、検索データとしてのキーデータと一致することが分かる。つまり、制御回路105は、確認メモリマット104からの出力データであるキーデータが検索データと比較して一致することを確認して、エントリアドレスを出力する。
 ここで、図45(c)を用いて、仮に検索メモリマット102を分割メモリ102a~102fの6個に分割した場合を考える。この場合、検索データとしてのキーデータ“2691”が入力されると、この“2691”はバイナリデータ“10 10 10 00 00 11”で表わされる。分割キーデータは、6分割された検索メモリマットのy軸に割り当てられた「エントリアドレスを登録する場所」にアクセスするためのアドレスとしてそれぞれ用いられる。1番目の“10”、2番目の“10”、3番目の“10”、4番目の“00”、5番目の“00”、6番目の“11”をアドレスとして各分割メモリのデータを読み出すと、いずれもアドレス衝突しているため「配慮しない(don’t care)」処理が行なわれる。このため、この条件において、検索メモリマット102を分割メモリ102a~102fの6個に分割するだけでは不十分であり、検索メモリマットから検索結果を出力することが不可能となる。
 よって、本実施例によれば、上述のようにして分割メモリの数を増加することで、衝突頻度を低減することができる、また、本実施例によれば、検索結果を出力することができる可能性を高めることができる。
 以上、本発明を実施例に沿って説明したが、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。つまり、上記した実施例は本発明を分かりやすくするために、本発明の内容を詳細に説明したものである。従って、本発明は、上記説明した全ての構成を備えるものに限定されるものではない。
 例えば、上記の説明では、本発明の半導体装置をSRAMによって構成した例を説明したが、本発明は他のメモリ回路でも同様に実現可能である。特に、本発明としては、高速不揮発性メモリ、例えばMRAMを好適に用いることができる。
101:近接キャッシュメモリマット
102、1002:検索メモリマット
102a、102b、102c、…、102l:分割メモリ
103:比較ラッチ回路
104、1004:確認用メモリ
105:制御回路
1051:入力部
1052:分割部
1053:書込部
1054:衝突情報記憶部
1055:読出部
1056:確認部
1057:出力部
106:符号化回路

Claims (9)

  1.  y軸方向にエントリアドレスを登録する場所が割り当てられ、x軸方向にキーデータが割り当てられる構成を持つ検索メモリマット(102)と、
     前記検索メモリマットに接続された制御回路(105)と、を備える
     半導体装置であって、
     前記検索メモリマット(102)は、
      前記キーデータが割り当てられる領域をy軸方向に沿って複数に分割することにより、複数の分割メモリ(102a、102b…)が形成されており、
     前記制御回路(105)は、
      キーデータが入力される入力部(1051)と、
      前記入力部に入力されたキーデータを、複数に分割する分割部(1052)と、
      前記分割部が分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして前記分割メモリに割り当てて、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリに書き込む書込部(1053)と、を有する
     半導体装置。
  2.  前記制御回路(105)は、さらに、
      前記書込部によって分割メモリの同一のアドレスに複数のエントリアドレスが書き込まれる場合には、当該分割メモリにエントリアドレスの衝突を表す情報を書き込む衝突情報記憶部(1054)を、有する
     請求項1に記載の半導体装置。
  3.  前記制御回路(105)は、さらに、
      前記入力部に、検索対象データとしてのキーデータが入力され、前記分割部が、当該検索対象データとしてのキーデータを複数に分割した場合に、
      前記分割部が分割したキーデータのそれぞれをアドレスとして前記分割メモリにアクセスし、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリから読み出す読出部(1055)を、有する
     請求項2に記載の半導体装置。
  4.  前記読出部(1055)は、
      前記分割部が分割したキーデータをアドレスとして前記分割メモリにアクセスしたときに、当該分割メモリに前記衝突を表す情報が書き込まれていた場合には、当該分割したキーデータについては対応するエントリアドレスを読み出さずに、配慮しないものとして処理する
     請求項3に記載の半導体装置。
  5.  前記半導体装置は、さらに、
      各エントリアドレスと各キーデータを対応付けて記憶した確認メモリマット(104)を備え、
     前記制御回路(105)は、さらに、
      前記読出部(1055)が読み出したエントリアドレスに対応するキーデータを、前記確認メモリマットから読み出し、当該キーデータが、前記入力部に入力された前記検索対象データとしてのキーデータと一致するか否かを確認する確認部(1056)を、有する
     請求項4に記載の半導体装置。
  6.  前記半導体装置は、さらに、
     キーデータを予め定められた処理により符号化し、当該符号化したキーデータを前記制御回路の入力部へと出力する符号化回路(106)を備える
     請求項1に記載の半導体装置。
  7.  前記読出部(1055)は、
      前記分割部が分割したキーデータのそれぞれをアドレスとして前記分割メモリにアクセスしたときに、全ての分割メモリに前記衝突を表す情報が書き込まれていた場合には、当該全ての分割メモリに既に書き込まれているエントリアドレスを読み出すものであり、
     前記確認部(1056)は、
      前記読出部が読み出したエントリアドレスで前記確認メモリマットを順次参照し、前記検索対象データとしてのキーデータと一致するキーアドレスを当該確認メモリマットから抽出したうえで、当該抽出したキーデータに対応するエンドリアドレスを出力する
     請求項4に記載の半導体装置。
  8.  y軸方向にエントリアドレスを登録する場所が割り当てられ、x軸方向にキーデータが割り当てられる構成を持つ検索メモリマット(102)を備える半導体装置に対し、前記キーデータに対応する前記エンドリアドレスを書き込む方法であって、
     前記検索メモリマット(102)は、
      前記キーデータが割り当てられる領域をy軸方向に沿って複数に分割することにより、複数の分割メモリ(102a、102b…)が形成されており、
     前記方法は、
      前記半導体装置の制御回路(105)にキーデータが入力される工程と、
      前記制御回路が、前記入力されたキーデータを、複数に分割する工程と、
      前記制御回路が、前記分割したキーデータのそれぞれを、当該分割したキーデータをアドレスとして前記分割メモリに割り当てて、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリに書き込む工程と、を含む
     方法。
  9.  請求項8に記載の方法により、前記半導体装置に対して書き込んだ前記エントリアドレスを読み出す方法であって、
      前記制御回路に検索対象データとしてのキーデータが入力される工程と、
      前記制御回路が、前記入力された検索対象データとしてのキーデータを、複数に分割する工程と、
      前記制御回路が、前記分割したキーデータのそれぞれをアドレスとして前記分割メモリにアクセスし、当該分割したキーデータのそれぞれに対応するエントリアドレスを当該分割メモリから読み出す工程と、を含む
     方法。
PCT/JP2013/084908 2013-03-13 2013-12-26 半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法 WO2014141566A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201380074530.4A CN105190762B (zh) 2013-03-13 2013-12-26 半导体装置及写入/读取登录位址于半导体装置中的方法
JP2013558841A JP5575997B1 (ja) 2013-03-13 2013-12-26 半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法
US14/364,826 US9240237B2 (en) 2013-03-13 2013-12-26 Semiconductor device and method of writing/reading entry address into/from semiconductor device
TW103104479A TWI540578B (zh) 2013-03-13 2014-02-11 A semiconductor device, and a method of writing / reading a registered address in a semiconductor device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013051050 2013-03-13
JP2013-051050 2013-03-13

Publications (1)

Publication Number Publication Date
WO2014141566A1 true WO2014141566A1 (ja) 2014-09-18

Family

ID=51536251

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/084908 WO2014141566A1 (ja) 2013-03-13 2013-12-26 半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法

Country Status (5)

Country Link
US (1) US9240237B2 (ja)
JP (2) JP5575997B1 (ja)
CN (1) CN105190762B (ja)
TW (1) TWI540578B (ja)
WO (1) WO2014141566A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016185848A1 (ja) * 2015-05-18 2016-11-24 長瀬産業株式会社 半導体装置,情報処理システム,及び情報書込/読出方法
WO2016185849A1 (ja) * 2015-05-18 2016-11-24 長瀬産業株式会社 半導体装置及び情報書込/読出方法
JP2020053041A (ja) * 2018-09-24 2020-04-02 三星電子株式会社Samsung Electronics Co.,Ltd. データベース処理システム及びデータベースの処理方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9225275B2 (en) 2010-04-07 2015-12-29 Black & Decker Inc. Power tool with light unit
US9722334B2 (en) 2010-04-07 2017-08-01 Black & Decker Inc. Power tool with light unit
WO2016193947A1 (en) * 2015-06-05 2016-12-08 King Abdullah University Of Science And Technology Resistive content addressable memory based in-memory computation architecture
US10684961B1 (en) * 2015-10-02 2020-06-16 Amazon Technologies, Inc. External memory protection for content addressable memory
US9923579B2 (en) * 2016-03-08 2018-03-20 International Business Machines Corporation Clock path technique for using on-chip circuitry to generate a correct encode pattern to test the on-chip circuitry
US10254782B2 (en) * 2016-08-30 2019-04-09 Micron Technology, Inc. Apparatuses for reducing clock path power consumption in low power dynamic random access memory
US11587611B2 (en) * 2021-07-20 2023-02-21 Macronix International Co., Ltd. Memory device with input circuit, output circuit for performing efficient data searching and comparing within large-sized memory array
TWI789836B (zh) * 2021-07-20 2023-01-11 旺宏電子股份有限公司 用於資料搜尋之記憶體裝置及資料搜尋方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5468124A (en) * 1977-11-10 1979-06-01 Nec Corp Converting unit
JPH03105444A (ja) * 1989-09-19 1991-05-02 Fujitsu Ltd メモリアドレス制御回路
JPH11353322A (ja) * 1998-06-09 1999-12-24 Chokosoku Network Computer Gijutsu Kenkyusho:Kk 検索回路

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5847798B2 (ja) * 1978-03-09 1983-10-25 富士通株式会社 記憶装置
JPS5847798A (ja) 1981-09-09 1983-03-19 象印チエンブロツク株式会社 電動チエンブロック
JPH0358743U (ja) * 1989-06-09 1991-06-07
JPH0358743A (ja) 1989-07-27 1991-03-13 Takeda Miso Jozo Kk 乾燥おからを用いた水吸収材
JP3662618B2 (ja) 1995-02-01 2005-06-22 川崎マイクロエレクトロニクス株式会社 マルチプロトコルアドレス検索用連想メモリおよびその検索方法
JPH10187550A (ja) * 1996-12-26 1998-07-21 Rohm Co Ltd Icカード
JP3524707B2 (ja) 1996-12-28 2004-05-10 株式会社堀場製作所 マイクロフローセンサ素子
JP3644494B2 (ja) * 2001-04-13 2005-04-27 日本電気株式会社 情報検索装置
JP3938124B2 (ja) 2002-11-20 2007-06-27 ソニー株式会社 データ検索装置
US8645620B2 (en) * 2007-06-29 2014-02-04 International Business Machines Corporation Apparatus and method for accessing a memory device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5468124A (en) * 1977-11-10 1979-06-01 Nec Corp Converting unit
JPH03105444A (ja) * 1989-09-19 1991-05-02 Fujitsu Ltd メモリアドレス制御回路
JPH11353322A (ja) * 1998-06-09 1999-12-24 Chokosoku Network Computer Gijutsu Kenkyusho:Kk 検索回路

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016185848A1 (ja) * 2015-05-18 2016-11-24 長瀬産業株式会社 半導体装置,情報処理システム,及び情報書込/読出方法
WO2016185849A1 (ja) * 2015-05-18 2016-11-24 長瀬産業株式会社 半導体装置及び情報書込/読出方法
JP2016219074A (ja) * 2015-05-18 2016-12-22 長瀬産業株式会社 半導体装置及び情報書込/読出方法
JP2016219073A (ja) * 2015-05-18 2016-12-22 長瀬産業株式会社 半導体装置,情報処理システム,及び情報書込/読出方法
CN107533865A (zh) * 2015-05-18 2018-01-02 长瀬产业株式会社 半导体装置及信息写入/读取方法
TWI621016B (zh) * 2015-05-18 2018-04-11 Nagase & Co Ltd 半導體裝置及資訊寫入/讀取方法
US10423666B2 (en) 2015-05-18 2019-09-24 Nagase & Co., Ltd. Writing method and semiconductor device including a search memory mat with write processing terminated when one piece of divided key data is successfully written
CN107533865B (zh) * 2015-05-18 2020-10-16 长瀬产业株式会社 半导体装置及信息写入/读取方法
JP2020053041A (ja) * 2018-09-24 2020-04-02 三星電子株式会社Samsung Electronics Co.,Ltd. データベース処理システム及びデータベースの処理方法
JP7187410B2 (ja) 2018-09-24 2022-12-12 三星電子株式会社 データベース処理システム及びデータベースの処理方法

Also Published As

Publication number Publication date
JPWO2014141566A1 (ja) 2017-02-16
JP2014199710A (ja) 2014-10-23
US9240237B2 (en) 2016-01-19
CN105190762A (zh) 2015-12-23
TWI540578B (zh) 2016-07-01
CN105190762B (zh) 2018-06-12
TW201445567A (zh) 2014-12-01
US20150070957A1 (en) 2015-03-12
JP5575997B1 (ja) 2014-08-20

Similar Documents

Publication Publication Date Title
JP5575997B1 (ja) 半導体装置及び半導体装置に対するエントリアドレス書き込み/読み出し方法
Shanbhag et al. Efficient top-k query processing on massively parallel hardware
US10545865B2 (en) Systems and methods for implementing low-latency lookup circuits using sparse hash functions
US9639458B2 (en) Reducing memory accesses for enhanced in-memory parallel operations
CN109964203B (zh) 数据并行计算设备的排序
KR101513380B1 (ko) 구성 정보에 따라 원자 메모리 동작들을 수행하기 위한 방법들 및 메모리들
US10114795B2 (en) Processor in non-volatile storage memory
CN112506567B (zh) 数据读取方法和数据读取电路
WO2020220935A1 (zh) 运算装置
US20220244959A1 (en) System and method for parallel combinatorial design
US6694407B1 (en) Cache memory with data transfer control and method of operating same
KR100474357B1 (ko) 다단계 분할을 이용한 기억소자 할당방법
US11705207B2 (en) Processor in non-volatile storage memory
CN110990299B (zh) 非规整组相联cache组地址映射方法
CN112988064B (zh) 一种面向并发多任务的磁盘图处理方法
US8495275B2 (en) List structure control circuit
US9715343B2 (en) Multidimensional partitioned storage array and method utilizing input shifters to allow multiple entire columns or rows to be accessed in a single clock cycle
US20140310461A1 (en) Optimized and parallel processing methods with application to query evaluation
JPWO2009044486A1 (ja) 表形式データをソートする方法、マルチコア型装置、及び、プログラム
KR101155433B1 (ko) 멀티 코어 프로세서에 최적화된 문자열 검색 장치 및 그것의 문자열 검색 방법
KR20190029270A (ko) 다중 캐시 메모리를 구비한 지능형 반도체 장치 및 지능형 반도체 장치에서의 메모리 접근 방법
Vianes et al. Study and Comparison of Hardware Methods for Distributing Memory Bank Accesses in Many-core Architectures
CN118012575A (zh) 一种面向国产化平台的多媒体数据解包的软件模拟方法
CN111860798A (zh) 运算方法、装置及相关产品
JPS5925302B2 (ja) 多重階層記憶装置の制御方式

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380074530.4

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2013558841

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14364826

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13877894

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13877894

Country of ref document: EP

Kind code of ref document: A1