This application is based upon and claims the benefit of priority from Japanese patent application No. 2012-115364, filed on May 21, 2012, the disclosure of which is incorporated herein in its entirety by reference.
The present invention relates to a semiconductor device, an electronic device, an electronic system, and a method of controlling the electronic device, and for example, is suitably applicable to a memory apparatus that is capable of adding an error correcting code and a memory control method.
In recent years, a semiconductor device used in an in-vehicle system or the like has been required to have high quality and high reliability. More specifically, a semiconductor device used in an in-vehicle system or the like is required to have quality of single ppm (Parts-Per-Million) level or higher. The same quality is required also in data transfer in the semiconductor device. Accordingly, in the semiconductor device, a function of detecting and correcting an error by bit inversion is implemented in access to a memory such as a random access memory (RAM).
Japanese Unexamined Patent Application Publication No. 2009-259113 and Japanese Unexamined Patent Application Publication No. 10-285147 each disclose a technique related to a device for managing a non-volatile memory and a data transfer system including an error correction function.
The present inventors have found various problems in a process of developing a semiconductor device used in an in-vehicle system or the like and a controller controlling them, for example. Each exemplary embodiment disclosed in this application provides an electronic device and a semiconductor device suitable for the in-vehicle system or the like.
Other problems and novel features will be made apparent from the description in this specification and the accompanying drawings.
One exemplary aspect disclosed in this specification includes an electronic device, which includes a memory (storage device) and a memory controller.
According to the exemplary aspect, it is possible to provide a high-quality semiconductor device, an electronic device, various electronic systems including the electronic device, and a method of controlling the electronic device.
The above and other aspects, advantages and features will be more apparent from the following description of certain embodiments taken in conjunction with the accompanying drawings, in which:
Hereinafter, with reference to the drawings, an exemplary embodiment of the present invention will be described. First, one exemplary aspect of an in-vehicle system which is one example of an electronic system which may be equipped with an electronic device according to this exemplary embodiment will be described.
<Configuration of in-Vehicle System 100 (Electronic System)>
The forward camera 110 is a camera (image pickup device) that captures images in a front side of the vehicle provided with the in-vehicle system 100. The forward camera 110 captures images in the forward direction of the vehicle according to an instruction from an image capturing unit 133 that will be described later. As shown in
The backward camera 120 is a camera (image pickup device) that captures images in a rear side of the vehicle provided with the in-vehicle system 100. The backward camera 120 captures images in the backward direction of the vehicle according to an instruction from the image capturing unit 133 which will be described later. The imaging object includes, as shown in
A semiconductor device 130 is an application system-on-a-chip (SoC) including various functions to operate each application of the in-vehicle system 100. The semiconductor device 130 includes an image processing engine 131, a central processing unit (CPU) 132, and the image capturing unit 133. The semiconductor device 130 writes various data into a storage device 140 or reads various data from the storage device 140, thereby controlling the in-vehicle system 100.
The image processing engine 131 is a processing unit that performs various image processing using images acquired by the image capturing unit 133. The image processing engine 131 reads out image data and an image processing program from the storage device 140 as appropriate, and performs various image processing on the image data that is read out. The image processing engine 131 writes data of the processing result into the storage device 140 as appropriate. As a matter of course, a part (or all) of the processing of the image processing engine 131 may be achieved as software which causes a computer to execute a program.
The CPU 132 is a central processing unit that executes various processing in the in-vehicle system 100 based on any desired program. The CPU 132 includes an L1 cache which is temporary information storage means capable of achieving faster access. The CPU 132 reads out an image processing program or an operating system (OS) program (not shown) as appropriate from the storage device 140 to execute the program. Further, the CPU 132 writes arbitrary data into the storage device 140.
The image capturing unit 133 controls image capturing processing of the forward camera 110 and the backward camera 120 according to the control from other processing units (the image processing engine 131 and the CPU 132). The image capturing unit 133 writes image data captured by the forward camera 110 and the backward camera 120 into the storage device 140.
The storage device 140 is a memory apparatus that stores various data. The storage device 140 is a memory such as a DRAM. The detailed configuration of the storage device 140 will be described later with reference to
The engine system control microcomputer 150 (engine control device) is a microcomputer to mainly control the engine of the vehicle. The engine system control microcomputer 150 includes an engine control unit (ECU) 151.
The ECU 151 is a processing unit that controls the engine of the vehicle. More specifically, the ECU 151 performs engine control regarding brakes, acceleration, deceleration and the like. Further, the ECU 151 may perform so-called steering control. The ECU 151 appropriately reads out the processing data 141 stored in the storage device 140 via the application SoC 130 when such control is performed. The ECU 151 performs control according to the value of the processing data 141 that is read out. The ECU 151 reads out positional information or the like, for example, to perform engine control using the positional information.
An in-vehicle network 160 is a network to perform information transmission between the application SoC 130 and the engine system control microcomputer 150. The in-vehicle network 160 is achieved, for example, by a technique of controller area network (CAN) or FlexRay.
Next, the electronic device 10 according to this exemplary embodiment will be described.
The CPU 132 is a central processing unit that reads out necessary data or program from the storage device 140 in the electronic device 10 to perform processing. When reading data from the storage device 140, the CPU 132 issues a read request including a read address to a read controller 50 which will be described later. Further, the CPU 132 writes data indicative of the result of operation into the storage device 140 in the electronic device 10. When writing data in the storage device 140, the CPU 132 issues a write request including a write address and write data to a write controller 60 which will be described later. The details of the data reading from the storage device 140 and the data writing into the storage device 140 will be appropriately described later.
A system bus 90 is an information transmission path to perform data transmission between the CPU 132 and a memory controller 30. Further, the system bus 90 transfers various data input through the in-vehicle network to the memory controller 30, the CPU 132, and the like.
The storage device 140 stores data and programs used by the CPU 132. The storage device 140 is a volatile memory in which stored data is erased when the power of the in-vehicle system 100 is interrupted, and includes, for example, a dynamic random access memory (DRAM). A method of storing data in the storage device 140 according to this exemplary embodiment will be described later with reference to
With reference to
The access controller 40 reads out data from the storage device 140 according to the read control by the read controller 50 described later to supply the data that is read out to the read controller 50. Further, the access controller 40 writes data to be written into the storage device 140 according to the write control by the write controller 60 described later.
The read controller 50 receives the read request (not shown) from the CPU 132. The read controller 50 reads out data from the storage device 140 using the read request. At this time, the read controller 50 also reads out an error correcting code (ECC) corresponding to the data that is read out. Further, the read controller 50 performs error correction processing on the data that is read out according to an error detection level supplied from the error detection level processing unit 70 which will be described later
With reference to
The data comparison unit 51 includes, as shown in
The data path P2 is a path to perform error detection processing for every 32 bits on the data that is read out. An ECC_32 (ECC generation unit) 51-9 generates an ECC for every 32 bits of the data that is read out from the storage device 140. A comparator 51-10 compares the ECC read out from the storage device 140 with the ECC generated by the ECC_32 (ECC generation unit) 51-9 to supply the result of comparison to the selector 52. An ECC_32 (ECC generation unit) 51-11 and a comparator 51-12 also perform the similar processing.
The data path P3 is a path to perform error detection processing for every 64 bits on the data that is read out. An ECC_64 (ECC generation unit) 51-13 generates an ECC for every 64 bits of the data that is read out from the storage device 140. A comparator 51-14 compares the ECC read out from the storage device 140 with the ECC generated by the ECC_64 (ECC generation unit) 51-13 to supply the result of comparison to the selector 52.
The data path P4 is a path that directly supplies data read out from the storage device 140 without performing error detection processing on the data read out from the storage device 140.
The error detection level is input to the selector 52 from the error detection level processing unit 70. The selector 52 performs selection processing according to the error detection level. Specifically, the selector 52 selects read data and the ECC from one of the data paths 21 to P4 to supply the data and the ECC to the data corrector 53.
The data corrector 53 performs error correction processing using an ECC on the data received via the data paths P1 to P3, to supply the data after error correction to the CPU 132 which has made the request. Note that the data corrector 53 may perform error correction processing using an ECC using a known technique. When the data received through the data path P4 is selected, the data corrector 53 directly supplies the data to the CPU 132 without performing error correction processing.
Note that the read controller 50 may be configured as shown in
Reference is made back again to
With reference to
The ECC processing unit 61 includes, as shown in
The ECC_16 (ECC generation unit) 61-1 supplies the ECC that is generated and 16-bit data to the selector 62. ECC_16 (ECC generation units) 61-2 to 61-4 perform the similar processing to the ECC_16 (ECC generation unit) 61-1.
The data path P6 is a path to generate an ECC for every 32 bits of the data to be written. An ECC_32 (ECC generation unit) 61-5 generates an ECC for every 32 bits of the data to be written. An ECC_32 (ECC generation unit) 61-5 supplies 32-bit data and the ECC that is generated to the selector 62. An ECC_32 (ECC generation unit) 61-6 performs the similar processing to the ECC_32 (ECC generation unit) 61-5.
The data path P7 is a path to generate an ECC for every 64 bits of the data to be written. An ECC_64 (ECC generation unit) 61-7 generates an ECC for every 64 bits of the data to be written. The ECC_64 (ECC generation unit) 61-7 supplies the ECC that is generated and 64-bit data to the selector 62.
The data path P8 is a path to write only the data into the storage device 140 without generating an ECC for data to be written.
The error detection level is input to the selector 62 from the error detection level processing unit 70. The selector 62 performs selection processing according to the error detection level. Specifically, the selector 62 selects any one of the data paths P1 to P4. Then, the selector 62 selects the write data and the ECC to supply the write data and the ECC to the access controller 40, and writes the data and the ECC in the storage device 140.
The write controller 60 may have a configuration as shown in
A data management method of the storage device 140 will be described with reference to
An address (address (32′h0000—0000) shown in
By allocating data (associating the real data and with ECC in a predetermined bit ratio) as shown in
Reference is again made back to
The error detection level processing unit 70 includes a hash processing unit 71 and a lookup table 72. First, with reference to
The lookup table 72 is a data table storing a valid flag, the most significant 20 bits, and the error detection level. An index (1—in
The valid flag is information indicating whether the data column is valid. When 1 is set in the valid flag, it means that the data column is valid. When 0 is set in the valid flag, it means that the data column is invalid. When 0 (invalid) is set, it is regarded that data indicating that ECC is not generated (“0b00”) is set to the error detection level. The most significant 20 bits indicate the values of the most significant 20 bits of the address of the read request or the write request. The error detection level is information that indicates the error correction level (generating an ECC in a unit of 64 bits, generating an ECC in a unit of 32 bits, or generating an ECC in a unit of 16). The error detection level is set so as not to include the data indicating that ECC is not generated (“0b00”). In this way, it is possible to reduce the capacity of the lookup table 72.
The hash processing unit 71 calculates an index to access the lookup table 72, and accesses the lookup table 72 to determine the error detection level supplied to the read controller 50 and the write controller 60. Hereinafter, with reference to
The hash processing unit 71 reads out the most significant 20 bits of the address of the read request or the write request. The hash processing unit 71 substitutes the most significant 20 bits into a hash function which will be described later, to determine the index which is a search position of the lookup table 72. The hash processing unit 71 determines whether the same values of the most significant 20 bits are set in the index that is determined.
When the same values of the most significant 20 bits are set, the hash processing unit 71 acquires the error detection level from the table column of this index. The hash processing unit 71 then supplies the error detection level that is acquired to the read controller 50 or the write controller 60.
Meanwhile, when the same values of the most significant 20 bits are not set in the index in the search position, the hash processing unit 71 calculates an index indicating another search position using the hash function to perform determination again. After a predetermined number of conflicts (a state in which a data column including the values of the most significant 20 bits same to the most significant 20 bits of the input address cannot be found), the hash processing unit 71 ends the search. When the search is ended in a state of conflict, the hash processing unit 71 supplies the error detection level “0b00” indicating that ECC processing is not performed to the read controller 50 or the write controller 60.
Next, with reference to
The hash processing unit 71 determines the search position using the following (Expression 1).
h
snm(km)=hnm(km)+h0m(km) [Expression 1]
hnm(km)=km % cn
h0m(km)=km % B
h0m(km): index to be searched (no conflict)
hsnm(km): index to be searched (n-th time after conflict)
hnm(km): search width in n-th time
km: most sign cant 20 bits of address
Hereinafter, detailed search procedures will be described.
(1) The hash processing unit 71 calculates, from (Expression 2) included in the (Expression 1) stated above, an index to be accessed first.
h
0m(km)=km % B [Expression 2]
(2) The hash processing unit 71 sets the index calculated in the (Expression 2) as a search position to acquire data from the lookup table 72, thereby determining whether the most significant 20 bits that are acquired match the most significant 20 bits of the address included in the request. When they are matched, the hash processing unit 71 determines that this search is hit. In the case of hit, the hash processing unit 71 acquires the error detection level from the index of the lookup table 72.
(3) When the search is not hit but conflict, the hash processing unit 71 calculates the next search position from (Expression 3) included in the (Expression 1) stated above.
(4) The hash processing unit 71 sets the index calculated in the (Expression 3) as the search position to acquire data from the lookup table 72, thereby determining whether the most significant 20 bits that are acquired match the most significant 20 bits of the address included in the request. When they are matched, the hash processing unit 71 determines that this search is hit. In the case of hit, the hash processing unit 71 acquires the error detection level from the index of the lookup table 72.
(5) When the search is not hit but conflict, the hash processing unit 71 calculates the next search position from (Expression 4) included in the (Expression 1) shown above. The hash processing unit 71 repeats the process of (5) for a predetermined number of times until the search results in hit. When the search does not result in hit even after a predetermined number of searches, the hash processing unit 71 supplies the error detection level “0b00” (value indicating that ECC processing is not performed) to the read controller 50 or the write controller 60.
h
snm(km)=hnm(km)+h0m(km) [Expression 4]
Next, hash processing will be described using specific data examples. In the following description, each data is defined as shown in the following (Expression 5).
B=1013,c1=997,c2=971 [Expression 5]
When the most significant 20 bits of the address are 0x04E20 (0d20000), the hash processing unit 71 performs calculation processing as shown in the following (Expression 6) to determine the index which is the search position.
0x04E20 mod 1013=753 [Expression 6]
In this example, it is assumed that the most significant 20-bit address “0x04E20” is stored in an index 753 of the lookup table 72. The hash processing unit 71 reads out the error detection level from the index 753 of the lookup table 72 and supplies the error detection level to the read controller 50 or the write controller 60.
Subsequently, consider that a request in which the most significant 20 bits of the address are 0x0560A (0d22026) is processed. The hash processing unit 71 performs calculation processing as shown in the following (Expression 7), to determine the index which is the search position.
0x0560A mod 1013=753 [Expression 7]
However, the most significant 20-bit address “0x04E20” is stored in the index 753 of the lookup table 72. Accordingly, the hash processing unit 71 determines that this search is conflict. The hash processing unit 71 performs calculation processing as shown in the following (Expression 8), to determine the index which is the re-search position.
0x0560A mod 997=92 [Expression 8]
Index845 (753+92) (searched address)
In this example, it is assumed that the most significant 20-bit address “0x0560A” is stored in an index 845 of the lookup table 72. The hash processing unit 71 reads out the error detection level from the index 845 of the lookup table 72 and supplies the error detection level to the read controller 50 or the write controller 60.
Subsequently, consider that a request in which the most significant 20 bits of the address are 0xFBF33 (0d1031987) is processed. The hash processing unit 71 performs calculation processing as shown in the following (Expression 9), to determine the index which is the search position.
0xFBF33 mod 1013=753 [Expression 9]
However, the most significant 20-bit address “0x04E20” is stored in the index 753 of the lookup table 72. Accordingly, the hash processing unit 71 determines that this search is conflict. The hash processing unit 71 performs calculation processing as shown in the following (Expression 10), to determine the index which is the re-search position.
0x0560A mod 997=92 [Expression 10]
Index 845 (753+92) (searched address)
However, the most significant 20-bit address “0x0560A” is stored in the index 845 of the lookup table 72. Accordingly, the hash processing unit 71 determines that this search is conflict. The hash processing unit 71 performs calculation processing as shown in the following (Expression 11), to determine again the index which is the re-search position.
The hash processing unit 71 searches for an index 525 of the lookup table 72. When the search is hit, the hash processing unit 71 acquires the error detection level. When the search is not hit (in the case of conflict), the hash processing unit 71 continues to perform re-searching up to a predetermined number of times.
The number of times required to search the lookup table 72 is determined according to the depth of the lookup table (B shown above). When the depth of the lookup table is increased, the number of times of search can be decreased. For example, when the depth (B) of the lookup table is 1013 as stated above, up to three searches are required, whereas when the depth (B) of the lookup table is 2026, up to two searches are required. The hash processing unit 71 may determine the number of times of search as a condition by referring to the relation with the depth of the lookup table 72.
Next, the effects of the electronic device 10 according to this exemplary embodiment will be described. First, for comparison to the electronic device 10 according to this exemplary embodiment, a non-volatile memory apparatus disclosed in Patent literature 1 will be described. This non-volatile memory apparatus changes the length of data input to or output from a non-volatile memory according to an address to a memory. However, the non-volatile memory apparatus does not manage data according to a management unit of a control device (to be exact, an OS on which a CPU that writes/reads data into/from a memory operates). Further, the non-volatile memory apparatus does not consider that an error correcting code is not added.
Meanwhile, the electronic device 10 according to this exemplary embodiment manages each data for each management unit of the OS, as shown in
Furthermore, the electronic device 10 according to this exemplary embodiment is able to easily set the error detection level of each data by use of the lookup table 72. In summary, it is possible to easily set the importance of data, and to protect data according to the importance (error detection level). Further, by providing a valid bit in the lookup table 72, it is possible to change the error detection level at any desired timing during the operation of the electronic device 10.
The lookup table 72 does not include data indicating that an ECC is not generated (“0b00”), as described above. Accordingly, the lookup table 72 stores only a minimum amount of data. Accordingly, it is possible to reduce the size of the lookup table 72.
Further, when the search does not result in hit even after a predetermined number of searches, the hash processing unit 71 regards that data indicating that ECC is not generated (“0b00”) is set. Accordingly, it is possible to prevent an exhaustive search of the lookup table 72 by the hash processing unit 71, thereby being able to improve the processing speed.
Furthermore, the storage device 140 associates the area that stores data with the area that stores ECCs (error correcting codes) in a constant bit rate (in the example shown in
Further, as described above, open addressing double hashing is used, for example, as a hash logic. By employing such a simple configuration, it is possible to simplify the circuit and to increase the processing speed.
While the invention made by the present inventors has been described in detail based on the exemplary embodiment, the present invention is not limited to the exemplary embodiment stated above, but may be changed as a matter of course in various ways without departing from the spirit of the present invention. For example, while description has been made above assuming the case of RAM, it is not limited to it. The storage device 140 is not limited to a RAM such as a dynamic random access memory (DRAM). Further, the storage device 140 is not necessarily a volatile memory but may be a non-volatile memory that retains stored data even after power is off. In summary, the memory arranged in the electronic device may be a desired storage device which can perform reading and writing operations.
While described above is the case in which the memory apparatus according to the present invention is installed in an in-vehicle system, the memory apparatus according to the present invention may be installed in any another information processing system. For example, it is needless to say that the memory apparatus according to the exemplary embodiment may be used for a control system or the like of an industrial robot.
While the invention has been described in terms of several embodiments, those skilled in the art will recognize that the invention can be practiced with various modifications within the spirit and scope of the appended claims and the invention is not limited to the examples described above.
Further, the scope of the claims is not limited by the embodiments described above.
Furthermore, it is noted that, Applicant's intent is to encompass equivalents of all claim elements, even if amended later during prosecution.
Number | Date | Country | Kind |
---|---|---|---|
2012-115364 | May 2012 | JP | national |