This is a Continuation of U.S. patent application Ser. No. 16/683,934 filed on Nov. 14, 2019, which claims the benefit of Japanese Patent Application No. 2018-241052 filed on Dec. 25, 2018 including the specification, drawings and abstract are incorporated herein by reference in their entirety.
The present disclosure relates to semiconductor device and, illustratively, to exclusive control of accesses of data in semiconductor device.
With respect to data processing in semiconductor device, as the processing by each module is advanced, the required memory bandwidth is increased. In order to cope with this, Japanese Unexamined Patent Application Publication No. 10-27127 (Patent Document 1), for example, discloses a technique of “compressing data and storing it in a storage device, expanding it at the time of operation, and using it”, and a technique of “reducing the amount of data transferred between a storage device and an arithmetic unit and improving the process rate of a computer”.
The art is as follows: “A data compression circuit 5 and a expansion circuit 6 are provided between the arithmetic unit 1 and the bus control circuit 4 for writing the arithmetic result to the storage device, and the arithmetic result is compressed and the input data from the storage device is decompressed. The compressed data is stored in the physical address 8 obtained by converting the logical address 7 obtained by the address generator 2 by the paging control circuit 3. In the paging conversion process, the information of the compression method is stored in the page table. When the compressed data from the storage device is referred, the expansion process is performed based on the information in the page table, and the arithmetic unit 1 performs the arithmetic operation.”
Japanese Unexamined Patent Application Publication No. 2017-102524 (Patent Document 2) discloses “a semiconductor device capable of performing compression and expansion more appropriately”. The semiconductor device includes: “The semiconductor device 100 includes an arithmetic module 110 and a memory control module 120; the arithmetic module 110 includes an arithmetic unit 111 that executes arithmetic processing; and a compression circuit 11 that compresses data resulting from the arithmetic processing; the memory control module 120 includes an access circuit 121 that writes the compressed data to the memory and reads the written data from the memory; and an expansion circuit 21 that expands data read from the memory and outputs the expanded data to the arithmetic module 110 (see [ABSTRACT]).
According to the technique disclosed in Patent Document 2, in order to efficiently compress data, the arithmetic module includes a buffer. The buffer holds the data until the of data required for compression is accumulated. When the of data in the buffer is less than the required for compression at the time when the arithmetic module finishes processing, the terminal data continues to remain in the buffer. For example, when the processing result of one signal processing module is used by another signal processing module, the other signal processing module cannot use the data having the correct end, and thus the consistency of the data is not realized.
Further, when the lossless compression method is used, since the amount of data after compression is variable, information indicating the amount of data after compression (hereinafter also referred to as “compression information”) exists for each unit of data amount required for compression. Since the buffer for storing the compressed information also exists in the processing module for performing the compression/expansion, the compressed information corresponding to the data at the end continues to remain in the buffer. Accordingly, there is a need for a technique that ensures data consistency even when lossless compression and expansion is performed. There is also a need for a technique that ensures data consistency without changing the configuration of a signal processing module or a module that performs compression/expansion, or incorporating control for checking the timing of data input/output between modules. In yet another aspect, there is a need for a technique that enables extrusion of a buffer even in the case of processing in which the processing unit of a signal processing module is not clear, that is, in the case where the end of processing at the timing of extrusion of data from the buffer is not clear.
The present disclosure has been made in view of the above-described background, and in some aspects, a technique is disclosed in which data consistency is ensured even when lossless compression processing is performed.
The semiconductor device according to an embodiment comprises a first compression/expansion module for compressing or expanding data, a second compression/expansion module for compressing or expanding data, a memory for storing the compressed data generated by the first compression/expansion module or the compressed data generated by the second compression/expansion module, and a managing module for exclusively controlling accesses to the memory by the first compression/expansion module and the second compression/expansion module in units of defined data sizes. The first compression/expansion module includes: a lossless compression processing unit for compressing data and outputting compressed data and compression information indicating a data amount of the compressed data; a lossless expansion processing unit for expanding the compressed data and outputting data before compression; and a compression information management unit for controlling writing or reading of the compressed data in the memory in units of a predetermined data size based on data for managing access. When a write access to the memory is performed, the compression information management unit permits writing to the region in a predetermined data size unit when the management module indicates that the area accessed by the write access is not occupied by another compression/expansion module, and when a lead access to the memory is performed, allows reading from the area in a predetermined data size unit when the management module indicates that the area accessed by the read access is not occupied by another compression/expansion module.
In some aspects, data consistency is ensured even when lossless compression processing is performed.
Other objects and novel features will become apparent from the description of this specification and the accompanying drawings.
Embodiments according to the technical idea disclosed in this specification will be described below with reference to the drawings. In the following description, the same components are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.
Referring to
As shown in
As shown in
In some aspects, the sum of the frequency bands of memory required by each signal processing module may exceed the bandwidths of memory 150. Therefore, it is conceivable to compress the data. As data compression, a compression/expansion module (CEM: Compression/Expansion Module) may be provided in a data input/output unit of each signal processing module. In order to efficiently compress data, it is necessary to process data in units of a certain amount of data, and the CEM has a buffer.
Referring now to
As shown in
As shown in
Thereafter, at time t(7), the CPU110 transmits an instruction to execute processing to the signal processing module 130. In response to the execution instruction, the signal processing module 130 starts execution of processing at timing t(8). From time t(9), the processed data is stored to buffer 331 in the CEM330. Once a processing unit is completed, the signal processing module 130 sends a buffer flash request to the CEM330 at time t(10). In response to the buffer flush request, the CEM330 outputs the data stored in the buffer 331 to the external memory 150. At time t(11), the CEM330 transmits a notification (buffer flush acknowledge) indicating that all data stored in the buffer 331 has been stored in the memory 150 to the signal processing module 130. When the signal processing module 130 receives the notification, at time t (12), it outputs the end break to the CPU110.
Referring to
As shown in
Referring to
Thereafter, at time t(6), the CPU110 transmits an instruction to execute processing to the signal processing module 130. In response to the execution instruction, the signal processing module 130 starts execution of processing at timing t(7). From time t(8), the processed data is stored to buffer 331 in the CEM330. Once a certain processing unit is completed, the signal processing module 130 outputs the module termination interruption to the CPU110 at time t(9), and also sends a buffer flush request to the CEM330. In response to the buffer flush request, the CEM330 outputs the data stored in the buffer 331 to the external memory 150. At time t(10), the CEM330 transmits a compression/expansion process termination interruption to the CPU110 as a notification (buffer flush acknowledge) indicating that all data stored in the buffer 331 has been stored in the memory 150.
A technique for realizing data consistency even when the end of processing is not clear will be described with reference to
Semiconductor device 700 includes a signal processing module 120,130, a memory controller 140, a memory 150, an exclusive control flag management module 710, and a compression/expansion module (CEM) 720,730. The signal processing module 120 and the signal processing module 130 are configured to communicate with each other, and in some aspects, either signal processing module is configured to use data processed by other signal processing module. The memory 150 is, for example, a DDR SDRAM(Double-Data-Rate Synchronous Dynamic Random Access Memory, but may be another memory.
The compression/expansion modules 720 and 730 and the memory controller 140 are connected to the bus 160, respectively. The exclusive control flag management module 710 is connected to the compression/expansion modules 720 and 730. The compression/expansion module 720 is further connected to the signal processing module 120. The compression/expansion module 730 is further connected to the signal processing module 130.
In one aspect, the signal processing module 120, 130 directs lossless compression of data for a transaction. The signal processing modules 120 and 130 are implemented by a combination of software and hardware as an arithmetic processing device such as CPUs for executing instructions. In other aspects, the signal processing modules 120 and 130 may also be configured as ASIC(Application Specific Integrated Circuit) or other hardware.
In an aspect, the exclusive control flag management module 710 may be implemented as a combination of a plurality of circuit elements configured to perform arithmetic processing for managing writing of compressed data and compressed information to the memory 150 and reading of compressed data and compressed information from the memory 150. In another aspect, the exclusive control flag management module 710 may be configured by a processor that executes the arithmetic processing.
In one aspect, the compression/expansion module 720 is implemented as a circuit configured to perform a process of losslessly compressing data output by the signal processing module 120 to generate compressed data, and a process of losslessly expanding the compressed data to decompress the uncompressed data. In another aspect, the compression/expansion module 720 may be implemented as combinations of instructions for implementing these processes and an arithmetic device for executing the instructions. The same applies to the compression/expansion module 730. In addition, although
The compression/expansion module 720 includes a lossless compression processing unit 721, a lossless expansion processing unit 722, and a compression information management unit 723. The compression/expansion module 730 includes a lossless compression processing unit 731, a lossless expansion processing unit 732, and a compression information management unit 733.
The lossless compression processing unit 721 performs data compression processing on the transaction of the signal processing module 120, and generates compressed data and compressed information. The compression information indicates the data amount of the compressed data. The compressed data and the compressed information are stored in the memory 150 by the memory controller 140. For example, when confirming that data can be written to the memory 150, the lossless compression processing unit 721 sends the write command (wcmd) and the compressed data (wdata) to be written to the memory controller 140.
On the other hand, when the compression/expansion module 720 receives a read command from the signal processing module 120, the lossless expansion module 722 sends a read command (rcmd) to the memory controller 140. The memory controller 140 reads compressed data from the memory 150 in response to the read commands, and sends the read compressed data (read data) to the compression/expansion module 720. The lossless expansion processing unit 722 performs expansion processing on the compressed data, and transmits the decompressed data to the signal processing module 120. The signal processing module 120 performs predetermined processing using the decompressed data.
The compression information management unit 723 is configured to be able to communicate with the lossless compression processing unit 721, the lossless expansion processing unit 722, and the memory controller 140. Further, the compressed information management unit 723 is configured to be able to communicate with the exclusive control flag management module 710. In one aspect, the compression information management unit 723 communicates compression information with the memory controller 140. In another aspect, the compressed information management unit 723 requests locking of the address space based on the first access to the address space.
The lossless compression processing unit 731 executes the same processing as the lossless compression processing unit 721. More specifically, the lossless compression processing unit 731 performs the lossless compression processing of the data on the transaction of the signal processing module 130. If the result of the check of the exclusive control indicates that the data can be written to the memory 150, the compression/expansion module 730 transmits the write command (wcmd) and the compressed data to be written to the memory controller 140, and the compressed data is stored in the memory 150 by the memory controller 140.
On the other hand, when the compression/expansion module 730 receives an instruction from the signal processing module 130, the compression/expansion module 730 confirms that the memory 150 is accessible. When the memory controller 140 reads the compressed data from the memory 150 to the compression/expansion module 730, the lossless expansion processing unit 732 performs expansion processing on the data. The compressed information management unit 733 is configured to be able to communicate with the exclusive control flag management module 710. The compression information management unit 733 communicates compression information with the memory controller 140.
In one embodiment, the size of the address space subject to exclusive control is defined based on a unit of compression processing for generating compressed data and compression information. For example, in one aspect, exclusive control of accesses to memory regions shared in memory 150 may be managed in units of data sizes managed by compression/expansion modules 720 and 730. As an example, when the unit of compression processing is 256 bytes and the unit of management of compression information is 64, the exclusive control is executed in units of 16k (=256×64=16,384) bytes. With such a configuration, the buffer can be pushed out data even when the end of the processing at the timing of pushing out the data from the buffer is not clear. The exclusive control is performed between the compressed information management unit 723 and the exclusive control flag management module 710.
The exclusive control flag management module 710 manages the flag for exclusive control. In one aspect, the exclusive control flag management module 710 includes flags 711 and 712. In one aspect, the flags are provided as many as the number of compression/expansion modules. In the example shown in
In one aspect, when the first access to the 16 kbyte space in the memory 150 is performed by the lossless compression processing unit 721, information indicating the access is sent to the compression information management unit 723. In response to the reception of the information, the compressed information management unit 723 requests the exclusive control flag management module 710 to lock the space. The exclusive control flag management module 710 attempts to lock the space, and returns information indicating whether or not the space has been locked to the compressed information management unit 723. When the exclusive control flag management module 710 cannot lock the space, a retry for requesting the exclusive control flag management module 710 to lock the space again is executed. The frequency of the retries can be appropriately set by the manufacturer of the semiconductor device 700.
In one aspect, when the compression/expansion module 720 attempts to write access to the memory 150, the compression/expansion module 720 releases the lock of the 16 kbyte space when all of the compression data and compression information for the 16 kbyte space that the compression/expansion module 720 has is stored in the memory 150. When the compression/expansion module 720 releases the lock of the space, the content of the flag of the exclusive control flag management module 710 is updated to that effect. In another aspect, when a read access is performed, the compression/expansion module 720 releases the lock of the 16 kbyte space when the compression information for the 16 kbyte space temporarily held by the compression/expansion module 720 is overwritten by the compression information read from the compression information management unit 723.
When there is no access to the locked 16 kbyte space from the signal processing module 120 for a predetermined time, the compression/expansion module 720 pushes all data and compression information for the corresponding 16 kbyte space to the memory 150 and releases the lock of the space at the time of the write access.
On the other hand, at the time of a read access, the compression/expansion module 720 invalidates the compression information for the corresponding 16-kbyte space, and releases the locking of the space.
Next, referring to
At a certain time, the memory 150 includes areas 811 to 814 and 821 to 824, the size of each area is predetermined. Compressed data 810 and compression information 820 are stored. The compressed data 810 includes compressed data (A), compressed data (B), compressed data (C), compressed data (D), and the like. The compression information 820 includes compression information (A), compression information (B), compression information (C), and compression information (D).
The compressed data 810 is data generated by compression processing by the lossless compression processing unit 721 or the lossless compression processing unit 731. The compression information 820 includes a data amount of the compressed data 810. For example, the compression information (A) indicates the data amount of the compressed data (A). The same applies to the compression information (B), the compression information (C), and the compression information (D).
For example, when the lossless compression processing unit 721 compresses the data generated by the processing by the signal processing module 120 and writes the data as compressed data (A) in the region 811, first, the compression/expansion module 720 accesses the exclusive control flag management module 710 via the compression information management unit 723.
As an example, the lossless compression processing unit 721 accesses the exclusive control flag management module 710 via the compression information management unit 723 and checks the content of the exclusive control management flag. Since the memory space in the memory 150 is not dedicated to any signal processing module in the first aspect of writing compressed data, the exclusive control management flag (e.g., flag 711) indicates that the memory space (e.g., region 811) is not dedicated to any signal processing module.
Therefore, the compression information management unit 723 rewrites the content of the flag 711 to the top address of the region 811 to be secured, and transmits the content of the flag (the top address of the area 811) to the lossless compression processing unit 721. Upon receiving the content, the lossless compression processor 721 sends an instruction (e.g., wcmd) for writing the compressed data (A) in the region 811 and for writing the compression information (A) in the area 821, the compressed data (A) and the compression information (A) to the memory controller 140.
The memory controller 140 writes the compressed data (A) in the region 811 and the compression information (A) in the area 821 based on the instruction. When the writing of the compressed data (A) and the compression information (A) is completed, the memory controller 140 sends a signal indicating the completion of the writing to the lossless compression processing unit 721.
When the lossless compression processing unit 721 receives the signal, the compression information management unit 723 is notified that the region 811 has been released from the exclusive possession of the signal processing module 120. The compressed information management unit 723 clears the content of the flag 711 to indicate that the region 811 is not exclusively allocated to any signal processing module. Therefore, after that, other signal processing module, for example, the signal processing module 130, can access the region 811, and, for example, can read the compressed data stored in the area 811.
Next, in the case of a read access, when the compression information for the 16-kbyte space temporarily held by the compression/expansion module 730 is overwritten with the newly read compression information, the compression information management unit 723 releases the lock of the 16-kbyte space.
More specifically, as an example, when the signal processing module 130 attempts to perform an operation using data stored in the memory 150, it instructs the compression/expansion module 730 to read the compressed data from the memory 150. In the compression/expansion module 730, the compression information management unit 733 accesses the exclusive control flag management module 710 and checks whether or not access to the compressed data to be read is possible. For example, when the signal processing module 130 attempts to use the compressed data (A) stored in the region 811, the compression information management unit 733 checks the contents of all the flags included in the exclusive control flag management module 710. In the configuration example of
As described above, according to the semiconductor device 700 according to the first embodiment, even if the data is compressed, the consistency of the data can be realized without changing the function of the signal processing module such as the signal processing module or adding the control of the software executed by the processor that controls the signal processing module. Also, data consistency can be achieved even if there is no explicit start or end of data processing in the signal processing module. For example, even when processing is performed in a case where the processing unit of the signal processing module is not clear, that is, even when the end of the processing at the timing of pushing out data from the buffer is not clear, since the processing unit is defined by a predetermined data size, it is possible to perform pushing out data from the buffer.
A second embodiment will be described with reference to
The semiconductor device 900 includes an exclusive control flag management module 910 instead of the exclusive control flag management module 710 included in the semiconductor device 700. The exclusive control flag managing module 910 includes a forced release instructing unit 911 in addition to flags (e.g., flags 711 and 712) held by the semiconductor device 700. The rest of the configuration is the same as that of the semiconductor device 700. The same components are denoted by the same reference numerals. Therefore, description of the same configuration will not be repeated.
The forced release instructing unit 911 is connected to each of the compression/expansion modules 720 and 730, and instructs the compression/expansion module that occupies a certain address space of the memory 150 to release the address space.
In one aspect, when an attempt of a lock the address space by a signal processing module fails a set number of times, the exclusive control flag management module 910 outputs an instruction to the compression/expansion module locking the address space to forcibly release the address space. The set number of times can be appropriately set for each of the signal processing modules by the manufacturer of the semiconductor device 900. The compression/expansion module that has received the instruction to release the address space immediately releases the address space.
For example, when a write access is performed, the compression/expansion module that has received the release instruction writes all the compressed data and compression information for the 16 kbyte space corresponding to the address space into the memory 150, and when the writing is completed, releases the lock of the 16 kbyte space.
On the other hand, when the read access is performed, the compression/expansion module that has received the release instruction invalidates the compression information for the 16 kbyte space corresponding to the address space, and releases the lock of the space.
As described above, the semiconductor device 900 according to the present embodiment can prioritize the exclusive use of the address space for each of the signal processing modules. This makes it possible to individually set, for example, a signal processing module requiring immediate response is provided with high priority, and a signal processing module having high robustness is provided with low priority. As a result, it is possible to provide the semiconductor device 900 having operation characteristics according to the application.
A third embodiment will be described below. The semiconductor device 1000 according to the present embodiment differs from the semiconductor device 700 and the semiconductor device 900 according to the above-described embodiment in that a lossless compression unit, a lossless expansion unit, and an exclusive control flag managing module are mounted on a memory controller. Note that the same reference numerals are assigned to the same components as those included in the semiconductor device according to the above-described embodiment. These functions are the same. Therefore, description of the same configuration will not be repeated.
Referring to
The write access analysis unit 1021 analyzes the transaction of the signal processing module 120, and based on the result of the analysis and the data from the compression information management unit 723, determines whether or not the compression processing for writing to the memory 150 can be executed. When the result of the write access analysis unit 1021 indicates that the compression processing can be executed, the compression/expansion module 1020 sends the data to be compressed and an instruction to execute the compression processing to the memory controller 1040. In response to the instruction, the lossless compression processing unit 721 performs compression processing on the data, and stores the compressed data and the compression information in a predetermined area.
On the other hand, the read access analysis unit 1022 analyzes the transaction of the signal processing module 120, and based on the result of the analysis and the data from the compression information management unit 723, determines whether or not the expansion processing of the compressed data stored in the memory 150 can be executed. When the result of the read access analysis unit 1022 indicates that the expansion processing can be executed, the compression/expansion module 1020 specifies an area in which the compressed data to be expanded is stored, and sends an instruction for reading the compressed data from the memory 150 to the lossless expansion processing unit 722. In response to the instruction, the lossless expansion processing unit 722 accesses the specified area, performs expansion processing on the compressed data, and sends the expanded data to the read access analysis unit 1022. The read access analysis unit 1022 sends the expanded data to the signal processing module 120.
Although one embodiment of the compression/expansion processing executed by the signal processing module 120 has been illustrated, the same applies to the case where the signal processing module 130 executes the compression/expansion processing.
As described above, according to the semiconductor device 1000 according to the present embodiment, the exclusive control flag managing module 710, the lossless compression unit 721, and the lossless expansion unit 722 are mounted on the memory controller 1040. With such a configuration, the lossless compression unit 721 and the lossless expansion unit 722, which are large in scale (large in occupied area), are grouped together in one place, so that the entire scale (size) of the semiconductor device 1000 can be suppressed. In addition, since the memory controller 1040 includes the exclusive control flag management module 710, the memory controller 1040 can manage transactions of all the signal processing modules, so that data consistency among all the signal processing modules can be realized. The fourth embodiment will be described below. The semiconductor device 1100 according to the present embodiment differs from the semiconductor device 1000 according to the third embodiment in that it has a function of forcibly releasing an address space. Referring to
According to the semiconductor device 1100 shown in
Referring to
In step S1210, the lossless compression processing unit 721 of the compression/expansion module 720 compresses the data received from the signal processing module 120, and generates compressed data and compression information representing the data amount of the compressed data.
In step S1220, the lossless compression processor 721 accesses the management information (e.g., flags 711 and 712) for controlling the writing of the compressed data to the memories 150 in units of predetermined data sizes via the compression data management unit 723.
In step S1230, when write access to the memory 150 is performed, the compression data management unit 723 permits writing to the memory area in a predetermined data size unit based on the fact that the management data (any flag) indicates that the area accessed by the write access is not exclusively owned by another compression/expansion module (for example, the compression/expansion module 730). For example, when the flag of the exclusive control flag management module 710 indicates that the top address of the area requesting access is not used by another signal processing module 130, the compression information management unit 723 permits writing by the lossless compression processing unit 721. On the other hand, when the flag of the exclusive control flag management module 710 indicates that the head address is being used by another signal processing module 130, the compression information management unit 723 prohibits writing by the lossless compression processing unit 721.
In step S1240, the lossless compression processing unit 721, upon receiving the permission from the compression information management unit 723, writes the compressed data into the permitted memory area. When detecting the completion of writing, the compression information management unit 723 changes the content of the flag 711 to the content of the compression/expansion module 720 that is no longer exclusive, in order to release the memory area.
Thereafter, in another aspect, a transaction using the compressed data stored in memory 150 may be performed by signal processing module 130. Therefore, the signal processing module 130 transmits a request for compressed data to the compression/expansion module 730.
In the step S1250, when a read access to the memory 150 is performed in response to the request, based on the management data (the above-mentioned flags) indicating that the region to be accessed by the read access is not exclusively owned by other compression/expansion module (for example, the compression/expansion module 720), readings from the area are permitted for the specified data size unit.
In step S1260, the lossless expansion process 732 reads the compressed data and the compressed information from the region based on the read permission. The lossless expansion processing unit 732 performs expansion processing of the compressed data using the compressed information, and expands to the data before compression. The expanded data is transmitted to the signal processing module 130.
Although the invention made by the present inventor has been specifically described based on the embodiment, the present invention is not limited to the embodiment described above, and it is needless to say that various modifications can be made without departing from the gist thereof.
Number | Date | Country | Kind |
---|---|---|---|
2018-241052 | Dec 2018 | JP | national |
Number | Date | Country | |
---|---|---|---|
Parent | 16683934 | Nov 2019 | US |
Child | 17517929 | US |